diff options
author | Johann Wilhelm <johann.wilhelm@student.tugraz.at> | 2007-09-05 07:49:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:24 -0400 |
commit | d853d872c14b9adc4adad29e56cd378b291f86e0 (patch) | |
tree | 7304314552d5b4e27d155797d6b56c1a4aa720f7 /drivers/usb/storage/initializers.c | |
parent | 63f991b2871bdb1431e8ff62cae2b7b94b4e5b0c (diff) |
USB: usb-storage: Initialize Huawei E220 properly
This is a reworked version of this patch:
http://www.mail-archive.com/linux-usb-devel%40lists.sourceforge.net/msg55094/activate_huawei_dev.patch
That properly initializes the HUAWEI E220 devices into multi-port mode.
Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/initializers.c')
-rw-r--r-- | drivers/usb/storage/initializers.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index 3a41740cad97..ee5b42aa5363 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c | |||
@@ -90,3 +90,17 @@ int usb_stor_ucr61s2b_init(struct us_data *us) | |||
90 | 90 | ||
91 | return (res ? -1 : 0); | 91 | return (res ? -1 : 0); |
92 | } | 92 | } |
93 | |||
94 | /* This places the HUAWEI E220 devices in multi-port mode */ | ||
95 | int usb_stor_huawei_e220_init(struct us_data *us) | ||
96 | { | ||
97 | int result; | ||
98 | |||
99 | us->iobuf[0] = 0x1; | ||
100 | result = usb_stor_control_msg(us, us->send_ctrl_pipe, | ||
101 | USB_REQ_SET_FEATURE, | ||
102 | USB_TYPE_STANDARD | USB_RECIP_DEVICE, | ||
103 | 0x01, 0x0, us->iobuf, 0x1, 1000); | ||
104 | US_DEBUGP("usb_control_msg performing result is %d\n", result); | ||
105 | return (result ? 0 : -1); | ||
106 | } | ||