Re: USB serial regression 2.6.31.1 -> 2.6.31.2 [PATCH]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "Alan Stern" <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> > >  Signed-off-by: Ben Efros <ben@xxxxxxxxxxxxx>
> > 
> > Tested-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> > 
> > > --- linux-2.6.31.1/drivers/usb/storage/transport.c       
> 2009-09-24 08:45:25.000000000 -0700
> > > +++ linux-2.6.31.1.new/drivers/usb/storage/transport.c       
> 2009-10-11 08:06:26.000000000 -0700
> > > @@ -696,7 +696,7 @@ void usb_stor_invoke_transport(struct sc
> > >                  /* device supports and needs bigger sense buffer
> */
> > >                  if (us->fflags & US_FL_SANE_SENSE)
> > >                          sense_size = ~0;
> > > -
> > > +Retry_Sense:
> > >                  US_DEBUGP("Issuing auto-REQUEST_SENSE\n");
> > >  
> > >                  scsi_eh_prep_cmnd(srb, &ses, NULL, 0,
> sense_size);
> > > @@ -723,6 +723,12 @@ void usb_stor_invoke_transport(struct sc
> > >                  if (temp_result != USB_STOR_TRANSPORT_GOOD) {
> > >                          US_DEBUGP("-- auto-sense failure\n");
> > >  
> > > +                        if ((us->fflags & US_FL_SANE_SENSE) &&
> > > +                            sense_size != US_SENSE_SIZE) {
> > > +                                sense_size = US_SENSE_SIZE;
> > > +                                US_DEBUGP("-- retry without
> SANE_SENSE\n");
> > > +                                goto Retry_Sense;
> > > +                        }
> 
> Except that this is wrong.  We can retry if temp_result == 
> USB_STOR_TRANSPORT_FAILURE, but we should not retry if temp_result ==
> USB_STOR_TRANSPORT_ERROR.
> 

Agreed.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux