git: 1446317d9ca2 - main - sysutils/mmc-utils: Update to 20230807 version

From: Marius Strobl <marius_at_FreeBSD.org>
Date: Tue, 19 Sep 2023 16:32:35 UTC
The branch main has been updated by marius:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1446317d9ca26af6087a9ae888b8c2ce795728b5

commit 1446317d9ca26af6087a9ae888b8c2ce795728b5
Author:     Marius Strobl <marius@FreeBSD.org>
AuthorDate: 2023-09-19 16:30:14 +0000
Commit:     Marius Strobl <marius@FreeBSD.org>
CommitDate: 2023-09-19 16:32:09 +0000

    sysutils/mmc-utils: Update to 20230807 version
    
    This improves the ffu command.
    
    Approved by:    netchild
---
 sysutils/mmc-utils/Makefile                |  4 ++--
 sysutils/mmc-utils/distinfo                |  6 +++---
 sysutils/mmc-utils/files/patch-mmc__cmds.c | 26 +++++++++++++-------------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/sysutils/mmc-utils/Makefile b/sysutils/mmc-utils/Makefile
index b840ebfa181a..78943d7a7de8 100644
--- a/sysutils/mmc-utils/Makefile
+++ b/sysutils/mmc-utils/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	mmc-utils
-DISTVERSION=	20230612
+DISTVERSION=	20230807
 DISTVERSIONSUFFIX=	-${MMC_GITSHASH}
 CATEGORIES=	sysutils
 MASTER_SITES=	https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/${MMC_GITHASH}${EXTRACT_SUFX}?dummy=/
@@ -13,7 +13,7 @@ LICENSE_COMB=	multi
 
 IGNORE_DragonFly=	only supported on FreeBSD
 CFLAGS+=	-DVERSION='\"${MMC_GITSHASH}\"'
-MMC_GITHASH=	6d593efc3cd00e4debd0ffc5806246390dc66242
+MMC_GITHASH=	613495ecaca97a19fa7f8f3ea23306472b36453c
 MMC_GITSHASH=	${MMC_GITHASH:C/^(........).*/\1/}
 PLIST_FILES=	man/man1/mmc.1.gz sbin/mmc
 USES=		gmake
diff --git a/sysutils/mmc-utils/distinfo b/sysutils/mmc-utils/distinfo
index bd8bf27c8961..9e6bbc22b8f0 100644
--- a/sysutils/mmc-utils/distinfo
+++ b/sysutils/mmc-utils/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1689355687
-SHA256 (mmc-utils-20230612-6d593efc.tar.gz) = 9f1088b316762d10b3785ed84f1fbc075d63a3c3d0d72e4effb569e87d2cac34
-SIZE (mmc-utils-20230612-6d593efc.tar.gz) = 50537
+TIMESTAMP = 1695128311
+SHA256 (mmc-utils-20230807-613495ec.tar.gz) = 1d45d75ac4c1178c4f33c9f0e63b5c9f87cf1442a00e9033b2cbba919549825d
+SIZE (mmc-utils-20230807-613495ec.tar.gz) = 50739
diff --git a/sysutils/mmc-utils/files/patch-mmc__cmds.c b/sysutils/mmc-utils/files/patch-mmc__cmds.c
index 305e2ec7461f..f04c447f5649 100644
--- a/sysutils/mmc-utils/files/patch-mmc__cmds.c
+++ b/sysutils/mmc-utils/files/patch-mmc__cmds.c
@@ -1,4 +1,4 @@
---- mmc_cmds.c.orig	2023-02-09 14:16:51 UTC
+--- mmc_cmds.c.orig	2023-08-07 11:14:42 UTC
 +++ mmc_cmds.c
 @@ -28,7 +28,12 @@
  #include <errno.h>
@@ -13,10 +13,10 @@
  
  #include "mmc.h"
  #include "mmc_cmds.h"
-@@ -88,8 +93,15 @@ int write_extcsd_value(int fd, __u8 index, __u8 value,
- 			(value << 8) |
- 			EXT_CSD_CMD_SET_NORMAL;
- 	idata.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
+@@ -95,8 +100,15 @@ int write_extcsd_value(int fd, __u8 index, __u8 value,
+ 
+ 	fill_switch_cmd(&idata, index, value);
+ 
 +#if defined(__FreeBSD__)
 +	if (timeout_ms != 0) {
 +		fprintf(stderr, "Command timeout not supported\n");
@@ -29,7 +29,7 @@
  
  	ret = ioctl(fd, MMC_IOC_CMD, &idata);
  	if (ret)
-@@ -121,8 +133,19 @@ static __u32 get_size_in_blks(int fd)
+@@ -128,8 +140,19 @@ static __u32 get_size_in_blks(int fd)
  {
  	int res;
  	int size;
@@ -49,7 +49,7 @@
  	if (res) {
  		fprintf(stderr, "Error getting device size, errno: %d\n",
  			errno);
-@@ -1974,8 +1997,10 @@ int do_read_extcsd(int nargs, char **argv)
+@@ -1981,8 +2004,10 @@ int do_read_extcsd(int nargs, char **argv)
  		       (ext_csd[EXT_CSD_CMDQ_DEPTH] & 0x1f) + 1);
  		printf("Command Enabled [CMDQ_MODE_EN]: 0x%02x\n",
  		       ext_csd[EXT_CSD_CMDQ_MODE_EN]);
@@ -60,7 +60,7 @@
  	}
  out_free:
  	return ret;
-@@ -2646,6 +2671,7 @@ int do_cache_dis(int nargs, char **argv)
+@@ -2648,6 +2673,7 @@ int do_cache_dis(int nargs, char **argv)
  	return do_cache_ctrl(0, nargs, argv);
  }
  
@@ -68,15 +68,15 @@
  static int erase(int dev_fd, __u32 argin, __u32 start, __u32 end)
  {
  	int ret = 0;
-@@ -2800,6 +2826,7 @@ out:
+@@ -2802,6 +2828,7 @@ out:
  	close(dev_fd);
  	return ret;
  }
 +#endif
  
- 
- int do_ffu(int nargs, char **argv)
-@@ -3145,6 +3172,7 @@ int do_preidle(int nargs, char **argv)
+ static void set_ffu_single_cmd(struct mmc_ioc_multi_cmd *multi_cmd,
+ 			       __u8 *ext_csd, unsigned int bytes, __u8 *buf,
+@@ -3137,6 +3164,7 @@ int do_preidle(int nargs, char **argv)
  	return 0;
  }
  
@@ -84,7 +84,7 @@
  int do_alt_boot_op(int nargs, char **argv)
  {
  	int fd, ret, boot_data_fd;
-@@ -3247,3 +3275,4 @@ dev_fd_close:
+@@ -3239,3 +3267,4 @@ dev_fd_close:
  		exit(1);
  	return 0;
  }