This looks like what I fixed for Red Hat some time ago for our partner Dell who shipped some pretty silly Lexar OEM USB keys. Please try the attached patch, it migth fix the oops. It is important for me to know the result, because I plan to push this into Marcelo's 2.4.27.
However, Stern is right, the root cause is that the device microcode goes belly up and disconnects. My fix only prevents oopsing but is not going to make the device work (probably). Once you got rid of oopses, you will need to work with Mrs Stern and Dharm to find what operating the device didn't like, then fix that.
-- Pete
FYI,
When I applied this patch to 2.4.25, I get one reject and one compile error. Here's the scsiglue.c.rej I had to patch by hand:
***************
*** 218,224 ****
US_DEBUGP("device_reset() called\n" ); spin_unlock_irq(&io_request_lock);
rc = us->transport_reset(us);
spin_lock_irq(&io_request_lock);
return rc;
}
--- 218,231 ----
US_DEBUGP("device_reset() called\n" ); spin_unlock_irq(&io_request_lock);
+ down(&(us->dev_semaphore));
+ if (!us->pusb_dev) {
+ up(&(us->dev_semaphore));
+ spin_lock_irq(&io_request_lock);
+ return SUCCESS;
+ }
rc = us->transport_reset(us);
+ up(&(us->dev_semaphore));
spin_lock_irq(&io_request_lock);
return rc;
}To fix the scsiglue.c compile error, you need to add a declaration for rc inside device_reset:
static int device_reset( Scsi_Cmnd *srb )
{
int rc;Peter Santoro
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
