On Tue, 7 Dec 2004, David Brownell wrote:
> > On Saturday 04 December 2004 11:51 am, Alan Stern wrote:
>
> > > In fact, I suggested skipping the class-specific reset entirely and
> > > proceeding directly to the port reset, because that's what Windows does.
>
> That worked for me, as in the attached patch. It turned
> out that the class-specific reset was succeeding (because
> the "port reset only if class-specific failed" logic
> never did a port reset!), but was effectively a NOP
> (because nothing seemed to happen). So this wasn't a
> case of drive firmware (Maxtor) not responding any more...
>
> I did notice two odd things with this patch though:
>
> - It deadlocked if I tried the "lock_for_reset" stuff,
> so I commented that out.
Yes, I see. You wrote:
+ /* The class reset won't generally solve the problem, maybe
+ * because Windows won't use it. So try a hard reset first,
+ * if it's safe; likely that'll work well.
+ */
+ if (us->pusb_dev->actconfig->desc.bNumInterfaces == 1) {
+// lock_device_for_reset() seems to deadlock things...
+// result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
+// if (result == 0) {
This test is supposed to be: (result >= 0). Then you need to save the
value of result.
+ result = usb_reset_device(us->pusb_dev);
+ dev_warn(&us->pusb_intf->dev, "usb reset --> %d\n",
+ result);
+// usb_unlock_device(us->pusb_dev);
The unlock is supposed to happen only when the saved value of result above
is > 0.
+// }
+ } else
+ result = -EINVAL;
> - Multiple resets were needed; see the log below.
> The third reset happened about 35 seconds after
> the sequence started, and until that happened it
> seemed like absolutely nothing happened.
It's hard to tell what happened from the log you included. Most likely
some other types of resets or timeouts intervened.
> I think it might be a good idea to try out a cleaned-up
> version of this patch more widely.
I'll try to put one together this week.
Alan Stern
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel