From nobody Thu Feb 16 16:54:39 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 4PHgz3685kz3rB9G; Thu, 16 Feb 2023 16:54:39 +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 4PHgz35TpSz45wb; Thu, 16 Feb 2023 16:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566479; 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=BsqjoaSq2Vb6domIzfg8RHVJsRT4M1ZuVF/XiFUF9Fc=; b=WNrPbCSlE7mLrxII3kDDhyC6VI1pIzTemAaFjElWCtX0rCQydkGIE9fQrDXUa5iHAoWnT1 IDvfEdMVhDgg6+PV8iie5zAoo5cF63n/V8KI0DyZSh9RhBIUYYWnXj2eIZYi5gIC3fXnXK ada4ffr+V+JOcq5RL+3QIIvVYNrPliDP16ijWX40OfD3yaS9PX+nWkKh20R6AZ8/h0/Mib 9VPwpbCOdxYfRHGjB9gKWbaRPSrprUo38HrVYUmMxhA8+aQaQYDhhXt7GhWh5z94ltiEjD NDxhGH4IuepsLgt7g1Q9F0LAiHD3o7+Ux3RQBK85XHBJLhFA+exMRhbqRRm/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676566479; 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=BsqjoaSq2Vb6domIzfg8RHVJsRT4M1ZuVF/XiFUF9Fc=; b=jSiPT5/jEZtU4fsJ3IcQ4QVfaq16Mpp3A+TA/yPww0bhlBsb1quw8dCG7bTbacl9RAGrcf uwrNo7a4XHDM2R5jU9rdXz+7Rb+3WkFdywrVQQp3B5iNfyk2vjZpyH6FAH5KktBDtGU/dB Lp+cqP4Gv77W+IW4oDZn+RErhwfkC4is7GiXEWwb+wudugqC32JrA1d4p+DkRR6gonNGX3 ExDkcJA7w+EwByj8FH/Aw7o+8ieBkmMnl8X50NkDeOL7gn/YTvYIP5vJ2UvC4NcNNe98jh lnVfZUfReuPuMEJ8Vo5+W3aCXU0fEEDffaLLh16gLZtwhYan2guqA2PsvKjs5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676566479; a=rsa-sha256; cv=none; b=jv+IXZMUYr7oTYxJfBjKlO4ieUE2OilBwebGWjJfxNrJ2PXzVNPJ5zAUKWI+2OkIIkNQhu GOYphSSfnSiK1ZxaZqURUGTYClSOa24mGwZ/mp4qYNDWSSjPRkz5hnGLeUvUWdfulQuqEb Uloxgqrz20SoHBFRHVKDEi7uo0NKPq/B+MZT7+TndG1Dj0odMz+rh0g/T+tUxM2XF5A5wp xaaKmZTSwXi9kDukU5YY/cd4ONhK9z1I9G9L3YMjUdt7XDbP1T/+909BYfQNbaANHjlD9c 3e8TYPAITgBsFIGkqsETON7nKLcuwY67ACc6vucFdgl0S1zMJEY30rhnvqpjNw== 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 4PHgz34Y44z1BBJ; Thu, 16 Feb 2023 16:54:39 +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 31GGsdcf085517; Thu, 16 Feb 2023 16:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GGsdPn085516; Thu, 16 Feb 2023 16:54:39 GMT (envelope-from git) Date: Thu, 16 Feb 2023 16:54:39 GMT Message-Id: <202302161654.31GGsdPn085516@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: e20b6a8ec68e - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 commit e20b6a8ec68e3f6805a5281d2691c2ac97f6bb93 Author: Michael Paepcke AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-16 16:36:39 +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 (cherry picked from commit 1997d3a4a9f20a846cf762306fd5193526a1d603) --- 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