Re: usbserial option driver newid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2015-03-04 at 22:00 -0500, Rick Farina wrote:
> On 03/04/15 13:01, Greg KH wrote:
> > And again, a kernel patch is the real way to fix it for everyone.
> 
> 
> Okay, got a lot of things figured out and have everything working now.
> Glad I spent the extra time because I found some neat things on the device.
> 
> I've made the following changes:
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index f0c0c53..9d11676 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -80,11 +80,13 @@ static void option_instat_callback(struct urb *urb);
>  #define OPTION_PRODUCT_GTM380_MODEM            0x7201
> 
>  #define HUAWEI_VENDOR_ID                       0x12D1
> +#define HUAWEI_PRODUCT_E3276_HILINK            0X1001

Actually, I don't think the 0x1001 ID should be in 'option' at all.  I
believe that's actually the mass-storage ID of some Huawei devices
*before* they get switched to modem mode.  That ID is already listed in
storage/unusual_devs.h *and* handled by usb_modeswitch, so it doesn't
really have a place in the option driver, which only deals with TTYs.

I think you just need 0x1566.

Dan

>  #define HUAWEI_PRODUCT_E173                    0x140C
>  #define HUAWEI_PRODUCT_E1750                   0x1406
>  #define HUAWEI_PRODUCT_K4505                   0x1464
>  #define HUAWEI_PRODUCT_K3765                   0x1465
>  #define HUAWEI_PRODUCT_K4605                   0x14C6
> +#define HUAWEI_PRODUCT_E3276_HILINK_DEBUG      0x1566
>  #define HUAWEI_PRODUCT_E173S6                  0x1C07
> 
>  #define QUANTA_VENDOR_ID                       0x0408
> 
> However, there is a bunch of code that looks like this below the code
> block I added to:
>         { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID,
> HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
>                 .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
>         { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff,
> 0xff, 0xff),    /* Huawei E1820 */
>                 .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
> 
> I assume that I don't need to add anything like this since just echoing
> the usbid into new_id seems to work fine?  I've tested using it as a
> serial interface to send direct AT commands to the modem as well as
> actually dialing up with the modem and establishing connections.
> Everything seems to be working so it is safe to assume that the only
> change I need to make is the one I made in the diff above?
> 
> I am a little confused in that my older e3276 (before the switch to
> "hilink") seems to be supported by the option driver, however, it's
> usbid is not seen anywhere in the serial folder:
> 
> Bus 002 Device 010: ID 12d1:1506 Huawei Technologies Co., Ltd.
> Modem/Networkcard
> 
> 
> [374876.873580] usb 2-6: new high-speed USB device number 10 using xhci_hcd
> [374877.043245] option 2-6:1.0: GSM modem (1-port) converter detected
> [374877.043338] usb 2-6: GSM modem (1-port) converter now attached to
> ttyUSB0
> [374877.043432] option 2-6:1.1: GSM modem (1-port) converter detected
> [374877.043507] usb 2-6: GSM modem (1-port) converter now attached to
> ttyUSB1
> 
> The closest I can find in the code is this line, but it doesn't make
> sense because if this line does match 0x1506 then one of the lines above
> it should have matched 0x1001 and it clearly doesn't.
> 
>         { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06,
> 0x15) },
> 
> Looking at commit ee6f827d I am adding it wrong, but I don't understand
> how to add the new product ids correctly.  Any pointers?
> 
> Thanks,
> Zero
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux