* [PATCH 2/2] zd1211rw: improve ejecting of fake CDROM
2009-12-08 14:21 ` [PATCH 1/2] ar9170usb: add Sphairon Homelink 1202 USB ID Stefan Seyfried
@ 2009-12-08 14:21 ` Stefan Seyfried
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Seyfried @ 2009-12-08 14:21 UTC (permalink / raw)
To: linux-wireless; +Cc: linux-kernel, Stefan Seyfried
From: Stefan Seyfried <seife@sphairon.com>
The zd1211rw always assumed that the storage device is at endpoint 1,
but there are devices (Spairon Homelink 1202) that are at endpoint 0.
Try both, starting with 1 to make sure to not break existing setups.
Signed-off-by: Stefan Seyfried <seife@sphairon.com>
---
drivers/net/wireless/zd1211rw/zd_usb.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index ac19ecd..4daf1c9 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1078,11 +1078,15 @@ static int eject_installer(struct usb_interface *intf)
int r;
/* Find bulk out endpoint */
- endpoint = &iface_desc->endpoint[1].desc;
- if (usb_endpoint_dir_out(endpoint) &&
- usb_endpoint_xfer_bulk(endpoint)) {
- bulk_out_ep = endpoint->bEndpointAddress;
- } else {
+ for (r = 1; r >= 0; r--) {
+ endpoint = &iface_desc->endpoint[r].desc;
+ if (usb_endpoint_dir_out(endpoint) &&
+ usb_endpoint_xfer_bulk(endpoint)) {
+ bulk_out_ep = endpoint->bEndpointAddress;
+ break;
+ }
+ }
+ if (r == -1) {
dev_err(&udev->dev,
"zd1211rw: Could not find bulk out endpoint\n");
return -ENODEV;
--
1.6.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] zd1211rw: improve ejecting of fake CDROM
@ 2009-12-11 18:07 Xose Vazquez Perez
0 siblings, 0 replies; 2+ messages in thread
From: Xose Vazquez Perez @ 2009-12-11 18:07 UTC (permalink / raw)
To: linux-wireless
Stefan Seyfried <seife@sphairon.com> wrote:
> The zd1211rw always assumed that the storage device is at endpoint 1,
> but there are devices (Spairon Homelink 1202) that are at endpoint 0.
> Try both, starting with 1 to make sure to not break existing setups.
should eject_installer code go into usb storage infrastructure
unusual_devs.h initializers.[ch] ?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-11 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 18:07 [PATCH 2/2] zd1211rw: improve ejecting of fake CDROM Xose Vazquez Perez
-- strict thread matches above, loose matches on Subject: below --
2009-12-08 14:21 [PATCH 0/2] Add support for Sphairon Homelink 1202 USB WLAN Stefan Seyfried
2009-12-08 14:21 ` [PATCH 1/2] ar9170usb: add Sphairon Homelink 1202 USB ID Stefan Seyfried
2009-12-08 14:21 ` [PATCH 2/2] zd1211rw: improve ejecting of fake CDROM Stefan Seyfried
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.