FreeBSD Bugzilla – Attachment 145319 Details for
Bug 192345
[u3g] [cdce] patch for huawei 4G/LTE modems: E3272, E3372
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
typo fix in comment
e3272-mc990d.patch (text/plain), 7.19 KB, created by
Ivan Rozhuk
on 2014-08-03 19:27:09 UTC
(
hide
)
Description:
typo fix in comment
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2014-08-03 19:27:09 UTC
Size:
7.19 KB
patch
obsolete
>Index: /usr/src/sys/dev/usb/net/if_cdce.c >=================================================================== >--- /usr/src/sys/dev/usb/net/if_cdce.c (revision 269431) >+++ /usr/src/sys/dev/usb/net/if_cdce.c (working copy) >@@ -277,6 +277,15 @@ > {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, > {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, > {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16), >+ USB_DRIVER_INFO(0)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46), >+ USB_DRIVER_INFO(0)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76), >+ USB_DRIVER_INFO(0)}, > }; > > static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = { >Index: /usr/src/sys/dev/usb/serial/u3g.c >=================================================================== >--- /usr/src/sys/dev/usb/serial/u3g.c (revision 269431) >+++ /usr/src/sys/dev/usb/serial/u3g.c (working copy) >@@ -76,14 +76,6 @@ > #define U3G_CONFIG_INDEX 0 > #define U3G_BSIZE 2048 > >-#define U3GSP_GPRS 0 >-#define U3GSP_EDGE 1 >-#define U3GSP_CDMA 2 >-#define U3GSP_UMTS 3 >-#define U3GSP_HSDPA 4 >-#define U3GSP_HSUPA 5 >-#define U3GSP_HSPA 6 >-#define U3GSP_MAX 7 > > /* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */ > #define U3GINIT_HUAWEI 1 /* Requires Huawei init command */ >@@ -327,6 +319,8 @@ > U3G_DEV(HUAWEI, K4505, U3GINIT_HUAWEI), > U3G_DEV(HUAWEI, K4505_INIT, U3GINIT_HUAWEISCSI), > U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), >+ U3G_DEV(HUAWEI, E3272_INIT, U3GINIT_HUAWEISCSI), >+ U3G_DEV(HUAWEI, E3272, 0), > U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), > U3G_DEV(KYOCERA2, KPC680, 0), > U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), >@@ -345,6 +339,7 @@ > U3G_DEV(NOVATEL, MC547, 0), > U3G_DEV(NOVATEL, MC679, 0), > U3G_DEV(NOVATEL, MC950D, 0), >+ U3G_DEV(NOVATEL, MC990D, 0), > U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT), > U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT), > U3G_DEV(NOVATEL, U720, 0), >@@ -607,6 +602,16 @@ > return (0); > } > >+/* Huawei specific: see if_cdce.c for more ids. */ >+#define U3G_HUAWEI_IS_CDC(info, iface_descr) \ >+ ((info)->idVendor == USB_VENDOR_HUAWEI && \ >+ (iface_descr)->bInterfaceClass == UICLASS_VENDOR && \ >+ (iface_descr)->bInterfaceSubClass == 0x02 && \ >+ ((iface_descr)->bInterfaceProtocol == 0x16 || \ >+ (iface_descr)->bInterfaceProtocol == 0x46 || \ >+ (iface_descr)->bInterfaceProtocol == 0x76)) >+ >+ > static void > u3g_sael_m460_init(struct usb_device *udev) > { >@@ -814,6 +819,10 @@ > if (uaa->info.bInterfaceClass != UICLASS_VENDOR) { > return (ENXIO); > } >+ /* Huawei specific: skip cdce devices. */ >+ if (U3G_HUAWEI_IS_CDC(&uaa->info, &uaa->info)) { >+ return (ENXIO); >+ } > return (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)); > } > >@@ -857,6 +866,9 @@ > id = usbd_get_interface_descriptor(iface); > if (id == NULL || id->bInterfaceClass != UICLASS_VENDOR) > continue; >+ /* Huawei specific: skip cdce devices. */ >+ if (U3G_HUAWEI_IS_CDC(&uaa->info, id)) >+ continue; > usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex); > iface_valid |= (1<<i); > } >@@ -890,7 +902,7 @@ > sc->sc_iface[nports] = id->bInterfaceNumber; > > if (bootverbose && sc->sc_xfer[nports][U3G_INTR]) { >- device_printf(dev, "port %d supports modem control", >+ device_printf(dev, "port %d supports modem control\n", > nports); > } > >Index: /usr/src/sys/dev/usb/serial/umodem.c >=================================================================== >--- /usr/src/sys/dev/usb/serial/umodem.c (revision 269431) >+++ /usr/src/sys/dev/usb/serial/umodem.c (working copy) >@@ -122,6 +122,18 @@ > USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), > USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, > /* Huawei Modem class match */ >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x01)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x02)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x10)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x12)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x61)}, >+ {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), >+ USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x62)}, > {USB_IFACE_CLASS(UICLASS_CDC), > USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), > USB_IFACE_PROTOCOL(0xFF)}, >Index: /usr/src/sys/dev/usb/usb_msctest.c >=================================================================== >--- /usr/src/sys/dev/usb/usb_msctest.c (revision 269431) >+++ /usr/src/sys/dev/usb/usb_msctest.c (working copy) >@@ -99,8 +99,8 @@ > 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; > static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, > 0x48, 0x47 }; >-static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, >- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, >+static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x20, 0x00, 0x00, 0x01, >+ 0x01, 0x00, 0x01, 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, >@@ -482,6 +482,7 @@ > sc->data_timeout = (data_timeout + USB_MS_HZ); > sc->actlen = 0; > sc->cmd_len = cmd_len; >+ sc->error = 0; > memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB)); > memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len); > DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":"); >@@ -843,11 +844,14 @@ > break; > default: > DPRINTF("Unknown eject method (%d)\n", method); >- err = 0; >+ err = USB_ERR_INVAL; > break; > } >+ /* Supress error. */ >+ if (err == USB_ERR_STALLED) >+ err = 0; > DPRINTF("Eject CD command status: %s\n", usbd_errstr(err)); > > bbb_detach(sc); >- return (0); >+ return (err); > } >Index: /usr/src/sys/dev/usb/usbdevs >=================================================================== >--- /usr/src/sys/dev/usb/usbdevs (revision 269431) >+++ /usr/src/sys/dev/usb/usbdevs (working copy) >@@ -2341,9 +2341,11 @@ > product HUAWEI E3131 0x1506 3G modem > product HUAWEI K3765_INIT 0x1520 K3765 Initial > product HUAWEI K4505_INIT 0x1521 K4505 Initial >+product HUAWEI E3272_INIT 0x155b LTE modem initial > product HUAWEI ETS2055 0x1803 CDMA modem > product HUAWEI E173 0x1c05 3G modem > product HUAWEI E173_INIT 0x1c0b 3G modem initial >+product HUAWEI E3272 0x1c1e LTE modem > > /* HUAWEI 3com products */ > product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g >@@ -3237,6 +3239,7 @@ > product NOVATEL U727_2 0x5100 Merlin U727 CDMA > product NOVATEL U760 0x6000 Novatel U760 > product NOVATEL MC760 0x6002 Novatel MC760 >+product NOVATEL MC990D 0x7001 Novatel MC990D > product NOVATEL MC547 0x7042 Novatel MC547 > product NOVATEL MC679 0x7031 Novatel MC679 > product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192345
:
145259
|
145278
|
145289
|
145319
|
145389
|
188286
|
188288
|
188479
|
188484
|
188485