From b2bc5352def2167d499f14feee58673e7c94fb9f Mon Sep 17 00:00:00 2001 From: xxh Date: Tue, 5 Nov 2013 12:44:02 +0800 Subject: [PATCH] support more ZTE CDROM DATA CARD --- drivers/usb/storage/initializers.c | 14 ++++++++++++- drivers/usb/storage/initializers.h | 2 ++ drivers/usb/storage/unusual_devs.h | 33 ++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index dd13a5881d98..e707d6550ec5 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c @@ -116,7 +116,7 @@ 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"); + //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, @@ -206,3 +206,15 @@ int usb_stor_zte_k4505_init(struct us_data *us) printk("usb_stor_bulk_transfer_buf performing result is %d, transfer the actual length=%d\n", result, act_len); return (result ? 0 : -ENODEV); } + +int usb_stor_zte_init(struct us_data *us) +{ + int result; + result =usb_stor_control_msg(us,us->send_ctrl_pipe, + 0xA1, + 0xC0, + 0x01,0x0,NULL,0x0,1000); + printk("usb_stor_zte_int result is %d\n",result); + return 0; +} + diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h index 87ea5bc302ec..ec6ea761e3ba 100644 --- a/drivers/usb/storage/initializers.h +++ b/drivers/usb/storage/initializers.h @@ -50,3 +50,5 @@ int usb_stor_ucr61s2b_init(struct us_data *us); int usb_stor_huawei_init(struct us_data *us); int usb_stor_zte_k4505_init(struct us_data *us); + +int usb_stor_zte_init(struct us_data *us); diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index a6c3f5c0cd8d..1fc5ab252059 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1537,6 +1537,39 @@ UNUSUAL_DEV(0x19d2, 0x0101, 0x0000, 0xffff, USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_k4505_init, 0), +UNUSUAL_DEV(0x19d2, 0x1225, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), + +UNUSUAL_DEV(0x19d2, 0x1239, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), + +UNUSUAL_DEV(0x19d2, 0x1240, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), + +UNUSUAL_DEV(0x19d2, 0x1241, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), +UNUSUAL_DEV(0x19d2, 0x1242, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), +UNUSUAL_DEV(0x19d2, 0x1243, 0x0000, 0x0000, + "ZTE EJECT CDROM", + "USB MMC Storage", + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_zte_init, + 0), /* Reported by Vilius Bilinkevicius