From nobody Sun Feb 19 03:16:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PK9gh1VZQz3sb6V; Sun, 19 Feb 2023 03:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PK9gh0PG1z4KCv; Sun, 19 Feb 2023 03:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676776592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OAvIfU6A2N2wLWLTwB9E7jqa4fgDtilHdgYNFT0S/A=; b=HU3AaL07wrsYK2FdPQCQqE8d/hzKCgUhDd9hJExOElf8jZb4ih1/IjEXLXwxsl1XGGNEpk 2Vwp8pv0Ps89HqXkjelNEW0vdFJzwTrCrtDeNifF2stcl8NCPN5XdV24k55Fzr24bmBzBf 6uO/aqMmjADjVFzoS7PESsn3Z83TYylltTfw3rd0AZeeb7+cd213QVJ6YR/aokAlubt+cm 133AvAxKfR71zXsZzQ6Fi12VjBNJlxw/spXEokoz4e1v6vo9x4zIp5GWGsJ+k42gos/jdK BWdDHV6cM0HWsJ8ujnW1Kv3aNNcVfv+cWqf1xVwS/slkqy4x1lFJwXFedIzMjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676776592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OAvIfU6A2N2wLWLTwB9E7jqa4fgDtilHdgYNFT0S/A=; b=RQy31kZHPi8KJ8PvS6Ut1fsL5T8FFjqX6J0YEGjaqSJEDhRP4k21Gb7q3c6WIB75ktCoOe RtT4SGKg80SfK8hlsZxJ+rU0wXg+vqurqE1dW7Un0OhIdncFtW0ZcgPwAA8j6pGD9CYtRt /7CVxtoaSow/JLeBh7GWbmA3RHJONiKfdz5oKgUyG2QkcyV0oIKbp4VcAsKgDJE2vH3INs GVJsrjFMLQ34nPpWDI5924h47bjnP+8MDvQ+mP/I/DHdITCrPI8q6URrT6ILK7DyJ2ThXR dAfOEUUEv8kwltq7VNyawf2d4JjQn8VEVU4XKXLnWNby8uW7EBH3UgyOG4JlNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676776592; a=rsa-sha256; cv=none; b=vj0WTOlk6kxSw0arPvxRXs0S5Kw8NSMPLg0Kc0MKPKIfz9shc4Gr1kdqyWntoAdFg/zCsi BmUf77uyp779RJwyX7GbvJhPmCWDd/61M2IE2PgFCTWvdOdQU4fw3Y4tfpYFKkoi9CxVvJ 5FzkTxw9YbwjqVG7gSd5SX46zXgFBNbTtYF+Sybb8GYNtJ5l11D2/eNaRBzq1n3R2YoD4s gDqwEVaeY7v9GXvJTDkFLRFYXwXKl3CF6hj8TJS8ieT8nqGnUYeJTp4wDqqP/MTRwemWoV ZBfhAU7vyJpey9rtIYcaOTjeuOCrcZQG4a0dx93m/bw7WXLzCQTqwNYYakSHuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PK9gg6cZ0zmjv; Sun, 19 Feb 2023 03:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31J3GVRZ083848; Sun, 19 Feb 2023 03:16:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31J3GVDJ083847; Sun, 19 Feb 2023 03:16:31 GMT (envelope-from git) Date: Sun, 19 Feb 2023 03:16:31 GMT Message-Id: <202302190316.31J3GVDJ083847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 97e58ca95015 - releng/13.2 - usb: add new scsi_huawei eject3 & eject4 driver support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 97e58ca95015fa4c3a73e335fe4dcf2390c2da69 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=97e58ca95015fa4c3a73e335fe4dcf2390c2da69 commit 97e58ca95015fa4c3a73e335fe4dcf2390c2da69 Author: Michael Paepcke AuthorDate: 2023-02-16 16:58:31 +0000 Commit: Warner Losh CommitDate: 2023-02-19 03:13:06 +0000 usb: add new scsi_huawei eject3 & eject4 driver support Add initialization for new Huawei 4G E3372_NCM, E3372v153_NCM, E5573Cs322_NCM, E5573Cs322_ECM, and E5573Cs322_ACM. Remove now-obsolete Huawei 3G E3131 init sequence. These devices are obsolete, share IDs with new devices and the 3G networks are shutdown. These old devices work correctly via the 4G code while still allowing the shared IDs to work differently for the new devices. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/633 Approved by:re (cperciva) (cherry picked from commit 1997d3a4a9f20a846cf762306fd5193526a1d603) (cherry picked from commit e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93) --- sys/dev/usb/net/if_cdce.c | 2 ++ sys/dev/usb/serial/u3g.c | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index f3c73567b7ce..0b6445e5908d 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -266,6 +266,8 @@ static int cdce_driver_loaded(struct module *, int, void *); static const STRUCT_USB_HOST_ID cdce_switch_devs[] = { {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3272_INIT, MSC_EJECT_HUAWEI2)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372v153_INIT, MSC_EJECT_HUAWEI2)}, + {USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E3372_INIT, MSC_EJECT_HUAWEI3)}, }; static const STRUCT_USB_HOST_ID cdce_host_devs[] = { diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 0b020af53b71..0e20f42feb39 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -89,7 +89,9 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RWTUN, #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ #define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ #define U3GINIT_HUAWEISCSI2 10 /* Requires Huawei SCSI init command (2) */ -#define U3GINIT_TCT 11 /* Requires TCT Mobile init command */ +#define U3GINIT_HUAWEISCSI3 11 /* Requires Huawei SCSI init command (3) */ +#define U3GINIT_HUAWEISCSI4 12 /* Requires Huawei SCSI init command (4) */ +#define U3GINIT_TCT 13 /* Requires TCT Mobile init command */ enum { U3G_BULK_WR, @@ -319,8 +321,6 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E173, 0), U3G_DEV(HUAWEI, E173_INIT, U3GINIT_HUAWEISCSI), - U3G_DEV(HUAWEI, E3131, 0), - U3G_DEV(HUAWEI, E3131_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), @@ -343,6 +343,12 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E3272_INIT, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E3272, 0), + U3G_DEV(HUAWEI, E3372_INIT, U3GINIT_HUAWEISCSI3), + U3G_DEV(HUAWEI, E3372v153_INIT, U3GINIT_HUAWEISCSI2), + U3G_DEV(HUAWEI, E3372v153_NCM, 0), + U3G_DEV(HUAWEI, E5573Cs322_NCM, 0), + U3G_DEV(HUAWEI, E5573Cs322_ECM, 0), + U3G_DEV(HUAWEI, E5573Cs322_ACM, 0), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), @@ -814,6 +820,10 @@ u3g_test_autoinst(void *arg, struct usb_device *udev, method = U3GINIT_HUAWEISCSI; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI2)) method = U3GINIT_HUAWEISCSI2; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI3)) + method = U3GINIT_HUAWEISCSI3; + else if (usb_test_quirk(uaa, UQ_MSC_EJECT_HUAWEISCSI4)) + method = U3GINIT_HUAWEISCSI4; else if (usb_test_quirk(uaa, UQ_MSC_EJECT_TCT)) method = U3GINIT_TCT; else if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa) == 0) @@ -837,6 +847,12 @@ u3g_test_autoinst(void *arg, struct usb_device *udev, case U3GINIT_HUAWEISCSI2: error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI2); break; + case U3GINIT_HUAWEISCSI3: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI3); + break; + case U3GINIT_HUAWEISCSI4: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI4); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; @@ -887,7 +903,7 @@ u3g_driver_loaded(struct module *mod, int what, void *arg) default: return (EOPNOTSUPP); } - return (0); + return (0); } static int