lkml.org 
[lkml]   [2010]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] USB: expose Huawei E1550 3G modem
    From: Stefan Assmann <sassmann@redhat.com>

    The Huawei E1550 3G modem is hidden by default and can be exposed by sending
    some magic initialization code. This patch takes care of that.

    Signed-off-by: Stefan Assmann <sassmann@redhat.com>
    ---
    drivers/usb/storage/initializers.c | 21 +++++++++++++++++++++
    drivers/usb/storage/initializers.h | 3 +++
    drivers/usb/storage/unusual_devs.h | 5 +++++
    3 files changed, 29 insertions(+), 0 deletions(-)

    diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c
    index 105d900..6f2d3be 100644
    --- a/drivers/usb/storage/initializers.c
    +++ b/drivers/usb/storage/initializers.c
    @@ -102,5 +102,26 @@ int usb_stor_huawei_e220_init(struct us_data *us)
    USB_TYPE_STANDARD | USB_RECIP_DEVICE,
    0x01, 0x0, NULL, 0x0, 1000);
    US_DEBUGP("Huawei mode set result is %d\n", result);
    +
    + return 0;
    +}
    +
    +/* This exposes the HUAWEI E1550 3G modem */
    +int usb_stor_huawei_e1550_init(struct us_data *us)
    +{
    + int result;
    + static char init_string[] =
    + "\x55\x53\x42\x43\x00\x00\x00\x00"
    + "\x00\x00\x00\x00\x00\x00\x00\x11"
    + "\x06\x00\x00\x00\x00\x00\x00\x00"
    + "\x00\x00\x00\x00\x00\x00\x00";
    +
    + memcpy(us->iobuf, init_string, sizeof(init_string) - 1);
    + result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
    + us->iobuf,
    + US_BULK_CB_WRAP_LEN,
    + NULL);
    + US_DEBUGP("Huawei mode set result is %d\n", result);
    +
    return 0;
    }
    diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
    index 529327f..5de8c86 100644
    --- a/drivers/usb/storage/initializers.h
    +++ b/drivers/usb/storage/initializers.h
    @@ -48,3 +48,6 @@ int usb_stor_ucr61s2b_init(struct us_data *us);

    /* This places the HUAWEI E220 devices in multi-port mode */
    int usb_stor_huawei_e220_init(struct us_data *us);
    +
    +/* This exposes the HUAWEI E1550 3G modem */
    +int usb_stor_huawei_e1550_init(struct us_data *us);
    diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
    index ccf1dbb..907a480 100644
    --- a/drivers/usb/storage/unusual_devs.h
    +++ b/drivers/usb/storage/unusual_devs.h
    @@ -1814,6 +1814,11 @@ UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000,
    "Mass Storage",
    US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
    0),
    +UNUSUAL_DEV( 0x12d1, 0x1446, 0x0000, 0x0000,
    + "HUAWEI MOBILE",
    + "Mass Storage",
    + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e1550_init,
    + 0),

    /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
    UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001,
    --
    1.7.0.1


    \
     
     \ /
      Last update: 2010-04-19 14:47    [W:0.065 / U:5.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site