Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 16:54:38 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 356e03eace32 - stable/13 - usb: add new scsi_huawei eject3 & eject4 sequences
Message-ID:  <202302161654.31GGscmF085491@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=356e03eace327e3b255834d4a1e6a7278663ce85

commit 356e03eace327e3b255834d4a1e6a7278663ce85
Author:     Michael Paepcke <fbsd@paepcke.de>
AuthorDate: 2023-02-16 16:36:03 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-16 16:36:37 +0000

    usb: add new scsi_huawei eject3 & eject4 sequences
    
    Add new Huawei eject3 and eject4 command sequences.
    
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/633
    
    (cherry picked from commit 7d4b2b5834dba66732596d68d7f817d18affb67f)
---
 sys/dev/usb/usb_msctest.c | 16 ++++++++++++++++
 sys/dev/usb/usb_msctest.h |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c
index 5dcf8d151119..338c17983d92 100644
--- a/sys/dev/usb/usb_msctest.c
+++ b/sys/dev/usb/usb_msctest.c
@@ -107,6 +107,12 @@ static uint8_t scsi_huawei_eject[] =	{ 0x11, 0x06, 0x00, 0x00, 0x00, 0x00,
 static uint8_t scsi_huawei_eject2[] =	{ 0x11, 0x06, 0x20, 0x00, 0x00, 0x01,
 					  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 					  0x00, 0x00, 0x00, 0x00 };
+static uint8_t scsi_huawei_eject3[] =	{ 0x11, 0x06, 0x20, 0x00, 0x00, 0x01,
+					  0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
+					  0x00, 0x00, 0x00, 0x00 };
+static uint8_t scsi_huawei_eject4[] =	{ 0x11, 0x06, 0x30, 0x00, 0x00, 0x00,
+					  0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+					  0x00, 0x00, 0x00, 0x00 };
 static uint8_t scsi_tct_eject[] =	{ 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 };
 static uint8_t scsi_sync_cache[] =	{ 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
 					  0x00, 0x00, 0x00, 0x00 };
@@ -1005,6 +1011,16 @@ usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method)
 		    &scsi_huawei_eject2, sizeof(scsi_huawei_eject2),
 		    USB_MS_HZ);
 		break;
+	case MSC_EJECT_HUAWEI3:
+		err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
+		    &scsi_huawei_eject3, sizeof(scsi_huawei_eject3),
+		    USB_MS_HZ);
+		break;
+	case MSC_EJECT_HUAWEI4:
+		err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
+		    &scsi_huawei_eject4, sizeof(scsi_huawei_eject4),
+		    USB_MS_HZ);
+		break;
 	case MSC_EJECT_TCT:
 		/*
 		 * TCTMobile needs DIR_IN flag. To get it, we
diff --git a/sys/dev/usb/usb_msctest.h b/sys/dev/usb/usb_msctest.h
index ba4e094bab60..08a7de1b5b9c 100644
--- a/sys/dev/usb/usb_msctest.h
+++ b/sys/dev/usb/usb_msctest.h
@@ -36,6 +36,8 @@ enum {
 	MSC_EJECT_CMOTECH,
 	MSC_EJECT_HUAWEI,
 	MSC_EJECT_HUAWEI2,
+	MSC_EJECT_HUAWEI3,
+	MSC_EJECT_HUAWEI4,
 	MSC_EJECT_TCT,
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302161654.31GGscmF085491>