From d94cd7786201f8211a2bfb562dad1379f0cefd73 Mon Sep 17 00:00:00 2001 From: xxh Date: Fri, 28 Jun 2013 16:59:52 +0800 Subject: [PATCH] support Huawei HiLink dongle vid pid 0x12d1 0x1f01 --- drivers/usb/storage/initializers.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index 56f607f1d874..dd13a5881d98 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c @@ -112,7 +112,21 @@ static int usb_stor_huawei_feature_init(struct us_data *us) * So it is unnecessary to read its response. */ static int usb_stor_huawei_scsi_init(struct us_data *us) -{ +{ + int idProduct; + idProduct = us->pusb_dev->descriptor.idProduct; + if(idProduct==0x1F01){ + printk("This is SCSI HUAWEI HILINK Dongle\n"); + int result = 0; + int act_len = 0; + unsigned char cmd[32] = {0x55, 0x53, 0x42, 0x43, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x06, 0x30, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + result = usb_stor_bulk_transfer_buf (us, us->send_bulk_pipe, cmd, 31, &act_len); + printk("usb_stor_bulk_transfer_buf performing result is %d, transfer the actual length=%d\n", result, act_len); + return result; + }else{ int result = 0; int act_len = 0; struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf; @@ -131,6 +145,7 @@ static int usb_stor_huawei_scsi_init(struct us_data *us) US_BULK_CB_WRAP_LEN, &act_len); US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result); return result; + } } /* -- 2.34.1