[BUG] 2.6.24-git usb reset problems - Kernel

This is a discussion on [BUG] 2.6.24-git usb reset problems - Kernel ; Hi, Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and connecting my cf usb storage device yields and endless stream of: Initializing USB Mass Storage driver... scsi6 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 45

Thread: [BUG] 2.6.24-git usb reset problems

  1. [BUG] 2.6.24-git usb reset problems

    Hi,

    Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    connecting my cf usb storage device yields and endless stream of:

    Initializing USB Mass Storage driver...
    scsi6 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 2
    usb-storage: waiting for device to settle before scanning
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    ANSI: 0
    sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1
    sd 6:0:0:0: [sdb] Attached SCSI removable disk
    sd 6:0:0:0: Attached scsi generic sg1 type 0
    scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    ANSI: 0
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    [...]

    until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    I'm attaching boot messages and my .config.

    --
    Jens Axboe



  2. Re: [BUG] 2.6.24-git usb reset problems

    On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    > Hi,
    >
    > Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    > connecting my cf usb storage device yields and endless stream of:
    >
    > Initializing USB Mass Storage driver...
    > scsi6 : SCSI emulation for USB Mass Storage devices
    > usb-storage: device found at 2
    > usb-storage: waiting for device to settle before scanning
    > usbcore: registered new interface driver usb-storage
    > USB Mass Storage support registered.
    > scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > ANSI: 0
    > sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > sd 6:0:0:0: [sdb] Write Protect is off
    > sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > sd 6:0:0:0: [sdb] Write Protect is off
    > sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > sdb: sdb1
    > sd 6:0:0:0: [sdb] Attached SCSI removable disk
    > sd 6:0:0:0: Attached scsi generic sg1 type 0
    > scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > ANSI: 0
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > [...]
    >
    > until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    > I'm attaching boot messages and my .config.


    That's a bit wierd, as we haven't added any USB patches to the -git tree
    yet after 2.6.24

    Could this be caused by some scsi changes perhaps?

    thanks,

    greg k-h
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [BUG] 2.6.24-git usb reset problems

    On Mon, Jan 28 2008, Greg KH wrote:
    > On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    > > Hi,
    > >
    > > Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    > > connecting my cf usb storage device yields and endless stream of:
    > >
    > > Initializing USB Mass Storage driver...
    > > scsi6 : SCSI emulation for USB Mass Storage devices
    > > usb-storage: device found at 2
    > > usb-storage: waiting for device to settle before scanning
    > > usbcore: registered new interface driver usb-storage
    > > USB Mass Storage support registered.
    > > scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > > ANSI: 0
    > > sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > > sd 6:0:0:0: [sdb] Write Protect is off
    > > sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > > sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > > sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > > sd 6:0:0:0: [sdb] Write Protect is off
    > > sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > > sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > > sdb: sdb1
    > > sd 6:0:0:0: [sdb] Attached SCSI removable disk
    > > sd 6:0:0:0: Attached scsi generic sg1 type 0
    > > scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > > ANSI: 0
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > > [...]
    > >
    > > until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    > > I'm attaching boot messages and my .config.

    >
    > That's a bit wierd, as we haven't added any USB patches to the -git tree
    > yet after 2.6.24
    >
    > Could this be caused by some scsi changes perhaps?


    Heh, I guess it could! I'll double check, I reproduced it with two
    distinct boots before posting.

    --
    Jens Axboe

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [BUG] 2.6.24-git usb reset problems

    Greg KH wrote:
    > On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    >> Hi,
    >>
    >> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    >> connecting my cf usb storage device yields and endless stream of:
    >>
    >> Initializing USB Mass Storage driver...
    >> scsi6 : SCSI emulation for USB Mass Storage devices
    >> usb-storage: device found at 2
    >> usb-storage: waiting for device to settle before scanning
    >> usbcore: registered new interface driver usb-storage
    >> USB Mass Storage support registered.
    >> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >> ANSI: 0
    >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >> sd 6:0:0:0: [sdb] Write Protect is off
    >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >> sd 6:0:0:0: [sdb] Write Protect is off
    >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >> sdb: sdb1
    >> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    >> sd 6:0:0:0: Attached scsi generic sg1 type 0
    >> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >> ANSI: 0
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >> [...]
    >>
    >> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    >> I'm attaching boot messages and my .config.

    >
    > That's a bit wierd, as we haven't added any USB patches to the -git tree
    > yet after 2.6.24
    >
    > Could this be caused by some scsi changes perhaps?
    >
    > thanks,
    >
    > greg k-h
    > -

    Yes it is

    Jens could you test the patch below? if it works I'll submit a proper
    patch. Please forgive me for the bug.

    Matthew, Greg, Is there a way to extract from messages the usb storage transport
    used? I'm guessing it is freecom do to the fact that I find a bug there.

    Thanks
    Boaz

    ---
    drivers/usb/storage/freecom.c | 4 ++--
    drivers/usb/storage/transport.c | 12 +++++++++---
    drivers/usb/storage/transport.h | 3 ++-
    3 files changed, 13 insertions(+), 6 deletions(-)

    diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
    index f5a4e8d..8d77603 100644
    --- a/drivers/usb/storage/freecom.c
    +++ b/drivers/usb/storage/freecom.c
    @@ -132,7 +132,7 @@ freecom_readdata (struct scsi_cmnd *srb, struct us_data *us,

    /* Now transfer all of our blocks. */
    US_DEBUGP("Start of read\n");
    - result = usb_stor_bulk_srb(us, ipipe, srb);
    + result = usb_stor_bulk_srb_length(us, ipipe, srb, count);
    US_DEBUGP("freecom_readdata done!\n");

    if (result > USB_STOR_XFER_SHORT)
    @@ -165,7 +165,7 @@ freecom_writedata (struct scsi_cmnd *srb, struct us_data *us,

    /* Now transfer all of our blocks. */
    US_DEBUGP("Start of write\n");
    - result = usb_stor_bulk_srb(us, opipe, srb);
    + result = usb_stor_bulk_srb_length(us, opipe, srb, count);

    US_DEBUGP("freecom_writedata done!\n");
    if (result > USB_STOR_XFER_SHORT)
    diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
    index d9f4912..5072235 100644
    --- a/drivers/usb/storage/transport.c
    +++ b/drivers/usb/storage/transport.c
    @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    * Common used function. Transfer a complete command
    * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    */
    -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    - struct scsi_cmnd* srb)
    +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    + struct scsi_cmnd* srb, unsigned length)
    {
    unsigned int partial;
    int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    - scsi_sg_count(srb), scsi_bufflen(srb),
    + scsi_sg_count(srb), length,
    &partial);

    scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    return result;
    }

    +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    + struct scsi_cmnd* srb)
    +{
    + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    +}
    +
    /*
    * Transfer an entire SCSI command's worth of data payload over the bulk
    * pipe.
    diff --git a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
    index ada7c2f..03e395d 100644
    --- a/drivers/usb/storage/transport.h
    +++ b/drivers/usb/storage/transport.h
    @@ -139,8 +139,9 @@ extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
    void *buf, unsigned int length, unsigned int *act_len);
    extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
    void *buf, unsigned int length, int use_sg, int *residual);
    +extern int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    + struct scsi_cmnd* srb, unsigned length);
    extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    struct scsi_cmnd* srb);
    -
    extern int usb_stor_port_reset(struct us_data *us);
    #endif

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > Greg KH wrote:
    > > On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    > >> Hi,
    > >>
    > >> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    > >> connecting my cf usb storage device yields and endless stream of:
    > >>
    > >> Initializing USB Mass Storage driver...
    > >> scsi6 : SCSI emulation for USB Mass Storage devices
    > >> usb-storage: device found at 2
    > >> usb-storage: waiting for device to settle before scanning
    > >> usbcore: registered new interface driver usb-storage
    > >> USB Mass Storage support registered.
    > >> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >> ANSI: 0
    > >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >> sd 6:0:0:0: [sdb] Write Protect is off
    > >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >> sd 6:0:0:0: [sdb] Write Protect is off
    > >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >> sdb: sdb1
    > >> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    > >> sd 6:0:0:0: Attached scsi generic sg1 type 0
    > >> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >> ANSI: 0
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> [...]
    > >>
    > >> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    > >> I'm attaching boot messages and my .config.

    > >
    > > That's a bit wierd, as we haven't added any USB patches to the -git tree
    > > yet after 2.6.24
    > >
    > > Could this be caused by some scsi changes perhaps?
    > >
    > > thanks,
    > >
    > > greg k-h
    > > -

    > Yes it is
    >
    > Jens could you test the patch below? if it works I'll submit a proper
    > patch. Please forgive me for the bug.


    No difference, still just a lot of resets.

    --
    Jens Axboe

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >> Greg KH wrote:
    >>> On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    >>>> Hi,
    >>>>
    >>>> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    >>>> connecting my cf usb storage device yields and endless stream of:
    >>>>
    >>>> Initializing USB Mass Storage driver...
    >>>> scsi6 : SCSI emulation for USB Mass Storage devices
    >>>> usb-storage: device found at 2
    >>>> usb-storage: waiting for device to settle before scanning
    >>>> usbcore: registered new interface driver usb-storage
    >>>> USB Mass Storage support registered.
    >>>> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>> ANSI: 0
    >>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>> sdb: sdb1
    >>>> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    >>>> sd 6:0:0:0: Attached scsi generic sg1 type 0
    >>>> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>> ANSI: 0
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>> [...]
    >>>>
    >>>> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    >>>> I'm attaching boot messages and my .config.
    >>> That's a bit wierd, as we haven't added any USB patches to the -git tree
    >>> yet after 2.6.24
    >>>
    >>> Could this be caused by some scsi changes perhaps?
    >>>
    >>> thanks,
    >>>
    >>> greg k-h
    >>> -

    >> Yes it is
    >>
    >> Jens could you test the patch below? if it works I'll submit a proper
    >> patch. Please forgive me for the bug.

    >
    > No difference, still just a lot of resets.
    >

    Where you able to figure out which usb storage transport is used?

    in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    functions. I'm not sure if these get stored in sysfs perhaps. This will
    pinpoint better where to look. Let me research a bit.

    Thanks for testing
    Boaz

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 16:11 +0200, Jens Axboe wrote:
    > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >> On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    >>> On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >>>> Greg KH wrote:
    >>>>> On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    >>>>>> Hi,
    >>>>>>
    >>>>>> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    >>>>>> connecting my cf usb storage device yields and endless stream of:
    >>>>>>
    >>>>>> Initializing USB Mass Storage driver...
    >>>>>> scsi6 : SCSI emulation for USB Mass Storage devices
    >>>>>> usb-storage: device found at 2
    >>>>>> usb-storage: waiting for device to settle before scanning
    >>>>>> usbcore: registered new interface driver usb-storage
    >>>>>> USB Mass Storage support registered.
    >>>>>> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>>>> ANSI: 0
    >>>>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>>>> sdb: sdb1
    >>>>>> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    >>>>>> sd 6:0:0:0: Attached scsi generic sg1 type 0
    >>>>>> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>>>> ANSI: 0
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>>> [...]
    >>>>>>
    >>>>>> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    >>>>>> I'm attaching boot messages and my .config.
    >>>>> That's a bit wierd, as we haven't added any USB patches to the -git tree
    >>>>> yet after 2.6.24
    >>>>>
    >>>>> Could this be caused by some scsi changes perhaps?
    >>>>>
    >>>>> thanks,
    >>>>>
    >>>>> greg k-h
    >>>>> -
    >>>> Yes it is
    >>>>
    >>>> Jens could you test the patch below? if it works I'll submit a proper
    >>>> patch. Please forgive me for the bug.
    >>> No difference, still just a lot of resets.
    >>>

    >> Where you able to figure out which usb storage transport is used?
    >>
    >> in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    >> functions. I'm not sure if these get stored in sysfs perhaps. This will
    >> pinpoint better where to look. Let me research a bit.

    >
    > Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    > transport is 'Bulk'
    >

    Sorry for the other noise. Thanks I'll have a look.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 16:06 +0200, Boaz Harrosh wrote:
    > On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    >> On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >>> Greg KH wrote:
    >>>> On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    >>>>> Hi,
    >>>>>
    >>>>> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    >>>>> connecting my cf usb storage device yields and endless stream of:
    >>>>>
    >>>>> Initializing USB Mass Storage driver...
    >>>>> scsi6 : SCSI emulation for USB Mass Storage devices
    >>>>> usb-storage: device found at 2
    >>>>> usb-storage: waiting for device to settle before scanning
    >>>>> usbcore: registered new interface driver usb-storage
    >>>>> USB Mass Storage support registered.
    >>>>> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>>> ANSI: 0
    >>>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    >>>>> sd 6:0:0:0: [sdb] Write Protect is off
    >>>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    >>>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    >>>>> sdb: sdb1
    >>>>> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    >>>>> sd 6:0:0:0: Attached scsi generic sg1 type 0
    >>>>> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    >>>>> ANSI: 0
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    >>>>> [...]
    >>>>>
    >>>>> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    >>>>> I'm attaching boot messages and my .config.
    >>>> That's a bit wierd, as we haven't added any USB patches to the -git tree
    >>>> yet after 2.6.24
    >>>>
    >>>> Could this be caused by some scsi changes perhaps?
    >>>>
    >>>> thanks,
    >>>>
    >>>> greg k-h
    >>>> -
    >>> Yes it is
    >>>
    >>> Jens could you test the patch below? if it works I'll submit a proper
    >>> patch. Please forgive me for the bug.

    >> No difference, still just a lot of resets.
    >>

    > Where you able to figure out which usb storage transport is used?
    >
    > in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    > functions. I'm not sure if these get stored in sysfs perhaps. This will
    > pinpoint better where to look. Let me research a bit.
    >

    From inspection of code it should be in /proc/scsi somewhere look for:
    SPRINTF(" Protocol: %s\n", us->protocol_name);
    SPRINTF(" Transport: %s\n", us->transport_name);

    (it's proc_info() in drivers/usb/storage/scsiglue.c)

    Thanks
    Boaz
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > >> Greg KH wrote:
    > >>> On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    > >>>> Hi,
    > >>>>
    > >>>> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    > >>>> connecting my cf usb storage device yields and endless stream of:
    > >>>>
    > >>>> Initializing USB Mass Storage driver...
    > >>>> scsi6 : SCSI emulation for USB Mass Storage devices
    > >>>> usb-storage: device found at 2
    > >>>> usb-storage: waiting for device to settle before scanning
    > >>>> usbcore: registered new interface driver usb-storage
    > >>>> USB Mass Storage support registered.
    > >>>> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >>>> ANSI: 0
    > >>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >>>> sd 6:0:0:0: [sdb] Write Protect is off
    > >>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >>>> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >>>> sd 6:0:0:0: [sdb] Write Protect is off
    > >>>> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >>>> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >>>> sdb: sdb1
    > >>>> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    > >>>> sd 6:0:0:0: Attached scsi generic sg1 type 0
    > >>>> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >>>> ANSI: 0
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >>>> [...]
    > >>>>
    > >>>> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    > >>>> I'm attaching boot messages and my .config.
    > >>> That's a bit wierd, as we haven't added any USB patches to the -git tree
    > >>> yet after 2.6.24
    > >>>
    > >>> Could this be caused by some scsi changes perhaps?
    > >>>
    > >>> thanks,
    > >>>
    > >>> greg k-h
    > >>> -
    > >> Yes it is
    > >>
    > >> Jens could you test the patch below? if it works I'll submit a proper
    > >> patch. Please forgive me for the bug.

    > >
    > > No difference, still just a lot of resets.
    > >

    > Where you able to figure out which usb storage transport is used?
    >
    > in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    > functions. I'm not sure if these get stored in sysfs perhaps. This will
    > pinpoint better where to look. Let me research a bit.


    Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    transport is 'Bulk'

    --
    Jens Axboe

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: [BUG] 2.6.24-git usb reset problems

    Am Dienstag, 29. Januar 2008 15:11:08 schrieb Jens Axboe:
    > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    > > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > >> Greg KH wrote:


    > > > No difference, still just a lot of resets.
    > > >

    > > Where you able to figure out which usb storage transport is used?
    > >
    > > in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    > > functions. I'm not sure if these get stored in sysfs perhaps. This will
    > > pinpoint better where to look. Let me research a bit.

    >
    > Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    > transport is 'Bulk'


    You can recompile your kernel with CONFIG_USB_DEBUG and CONFIG_STORAGE_DEBUG
    That should tell the reason for the resets.

    Regards
    Oliver
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  11. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008, Oliver Neukum wrote:
    > Am Dienstag, 29. Januar 2008 15:11:08 schrieb Jens Axboe:
    > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > > On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    > > > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > > >> Greg KH wrote:

    >
    > > > > No difference, still just a lot of resets.
    > > > >
    > > > Where you able to figure out which usb storage transport is used?
    > > >
    > > > in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    > > > functions. I'm not sure if these get stored in sysfs perhaps. This will
    > > > pinpoint better where to look. Let me research a bit.

    > >
    > > Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    > > transport is 'Bulk'

    >
    > You can recompile your kernel with CONFIG_USB_DEBUG and CONFIG_STORAGE_DEBUG
    > That should tell the reason for the resets.


    Sure, I'll do that. Will post the results tonight.

    --
    Jens Axboe

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  12. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, 29 Jan 2008, Boaz Harrosh wrote:

    > --- a/drivers/usb/storage/transport.c
    > +++ b/drivers/usb/storage/transport.c
    > @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    > * Common used function. Transfer a complete command
    > * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    > */
    > -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > - struct scsi_cmnd* srb)
    > +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    > + struct scsi_cmnd* srb, unsigned length)
    > {
    > unsigned int partial;
    > int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    > - scsi_sg_count(srb), scsi_bufflen(srb),
    > + scsi_sg_count(srb), length,
    > &partial);
    >
    > scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    > return result;
    > }
    >
    > +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > + struct scsi_cmnd* srb)
    > +{
    > + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    > +}
    > +


    I don't like this patch very much. Why add another layer of
    indirection when the two subroutines do hardly any work? Leave
    usb_stor_bulk_srb() the way it was, and add usb_stor_bulk_srb_length()
    as a separate routine that simply calls usb_stor_bulk_transfer_sglist()
    and scsi_set_resid().

    BTW, the standard coding style calls for a blank line after the list of
    local variables at the start of a function or block.

    Alan Stern

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  13. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29, 2008 at 02:15:15PM +0200, Boaz Harrosh wrote:
    > Greg KH wrote:
    > > On Mon, Jan 28, 2008 at 09:49:35PM +0100, Jens Axboe wrote:
    > >> Hi,
    > >>
    > >> Running latest -git (head 91525300baf162e83e923b09ca286f9205e21522) and
    > >> connecting my cf usb storage device yields and endless stream of:
    > >>
    > >> Initializing USB Mass Storage driver...
    > >> scsi6 : SCSI emulation for USB Mass Storage devices
    > >> usb-storage: device found at 2
    > >> usb-storage: waiting for device to settle before scanning
    > >> usbcore: registered new interface driver usb-storage
    > >> USB Mass Storage support registered.
    > >> scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >> ANSI: 0
    > >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >> sd 6:0:0:0: [sdb] Write Protect is off
    > >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >> sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    > >> sd 6:0:0:0: [sdb] Write Protect is off
    > >> sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    > >> sd 6:0:0:0: [sdb] Assuming drive cache: write through
    > >> sdb: sdb1
    > >> sd 6:0:0:0: [sdb] Attached SCSI removable disk
    > >> sd 6:0:0:0: Attached scsi generic sg1 type 0
    > >> scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0
    > >> ANSI: 0
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> usb 5-1: reset high speed USB device using ehci_hcd and address 2
    > >> [...]
    > >>
    > >> until I disconnect it. The device doesn't work. Worked fine in 2.6.24.
    > >> I'm attaching boot messages and my .config.

    > >
    > > That's a bit wierd, as we haven't added any USB patches to the -git tree
    > > yet after 2.6.24
    > >
    > > Could this be caused by some scsi changes perhaps?
    > >
    > > thanks,
    > >
    > > greg k-h
    > > -

    > Yes it is
    >
    > Jens could you test the patch below? if it works I'll submit a proper
    > patch. Please forgive me for the bug.
    >
    > Matthew, Greg, Is there a way to extract from messages the usb storage transport
    > used? I'm guessing it is freecom do to the fact that I find a bug there.


    The freecom transport is exceptionally rare these days. It's primary user
    was a device made by a company that went out of business.

    Matt

    --
    Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
    Maintainer, Linux USB Mass Storage Driver

    Way to go, lava boy.
    -- Stef to Greg
    User Friendly, 3/26/1998

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (GNU/Linux)

    iD8DBQFHnz+YHL9iwnUZqnkRArAlAJ9nLOVT9sWA9J4GiQUhsv UVICBNEACgjFfJ
    5I6dzkgLDseOyDiPtf5Pf/g=
    =GRnr
    -----END PGP SIGNATURE-----


  14. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 17:36 +0200, Alan Stern wrote:
    > On Tue, 29 Jan 2008, Boaz Harrosh wrote:
    >
    >> --- a/drivers/usb/storage/transport.c
    >> +++ b/drivers/usb/storage/transport.c
    >> @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    >> * Common used function. Transfer a complete command
    >> * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    >> */
    >> -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    >> - struct scsi_cmnd* srb)
    >> +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    >> + struct scsi_cmnd* srb, unsigned length)
    >> {
    >> unsigned int partial;
    >> int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    >> - scsi_sg_count(srb), scsi_bufflen(srb),
    >> + scsi_sg_count(srb), length,
    >> &partial);
    >>
    >> scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    >> return result;
    >> }
    >>
    >> +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    >> + struct scsi_cmnd* srb)
    >> +{
    >> + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    >> +}
    >> +

    >
    > I don't like this patch very much. Why add another layer of
    > indirection when the two subroutines do hardly any work? Leave
    > usb_stor_bulk_srb() the way it was, and add usb_stor_bulk_srb_length()
    > as a separate routine that simply calls usb_stor_bulk_transfer_sglist()
    > and scsi_set_resid().
    >
    > BTW, the standard coding style calls for a blank line after the list of
    > local variables at the start of a function or block.
    >
    > Alan Stern
    >
    > -

    Me neither, it's not a proper patch just a shut to try and find the reported
    bug. I will submit a proper bug later.

    Thanks for the review, you are right on all accounts
    Boaz

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  15. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 16:31 +0200, Oliver Neukum wrote:
    > Am Dienstag, 29. Januar 2008 15:11:08 schrieb Jens Axboe:
    >> On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >>> On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    >>>> On Tue, Jan 29 2008, Boaz Harrosh wrote:
    >>>>> Greg KH wrote:

    >
    >>>> No difference, still just a lot of resets.
    >>>>
    >>> Where you able to figure out which usb storage transport is used?
    >>>
    >>> in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    >>> functions. I'm not sure if these get stored in sysfs perhaps. This will
    >>> pinpoint better where to look. Let me research a bit.

    >> Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    >> transport is 'Bulk'

    >
    > You can recompile your kernel with CONFIG_USB_DEBUG and CONFIG_STORAGE_DEBUG
    > That should tell the reason for the resets.
    >
    > Regards
    > Oliver
    > -


    I can not see what it is. Yes CONFIG_USB_STORAGE_DEBUG will help.
    I have a device here that uses the same trasport/protocol I'll
    try to reproduce the failure here.

    Boaz
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  16. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, 2008-01-29 at 10:36 -0500, Alan Stern wrote:
    > On Tue, 29 Jan 2008, Boaz Harrosh wrote:
    >
    > > --- a/drivers/usb/storage/transport.c
    > > +++ b/drivers/usb/storage/transport.c
    > > @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    > > * Common used function. Transfer a complete command
    > > * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    > > */
    > > -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > > - struct scsi_cmnd* srb)
    > > +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    > > + struct scsi_cmnd* srb, unsigned length)
    > > {
    > > unsigned int partial;
    > > int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    > > - scsi_sg_count(srb), scsi_bufflen(srb),
    > > + scsi_sg_count(srb), length,
    > > &partial);
    > >
    > > scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    > > return result;
    > > }
    > >
    > > +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > > + struct scsi_cmnd* srb)
    > > +{
    > > + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    > > +}
    > > +

    >
    > I don't like this patch very much. Why add another layer of
    > indirection when the two subroutines do hardly any work? Leave
    > usb_stor_bulk_srb() the way it was, and add usb_stor_bulk_srb_length()
    > as a separate routine that simply calls usb_stor_bulk_transfer_sglist()
    > and scsi_set_resid().
    >
    > BTW, the standard coding style calls for a blank line after the list of
    > local variables at the start of a function or block.


    There's another bug in the transport.c conversion in that the residuals
    are updated with bogus data in several error cases, since
    usb_stor_bulk_transfer_sglist() only sets the actual length if the urb
    is actually sent.

    I'm not sure if this is is the solution to the problem at hand, but it
    definitely fixes another bug in the code.

    James

    diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
    index d9f4912..bab0858 100644
    --- a/drivers/usb/storage/transport.c
    +++ b/drivers/usb/storage/transport.c
    @@ -465,7 +465,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    struct scsi_cmnd* srb)
    {
    - unsigned int partial;
    + unsigned int partial = scsi_get_resid(srb);
    int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    scsi_sg_count(srb), scsi_bufflen(srb),
    &partial);


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  17. Re: [BUG] 2.6.24-git usb reset problems

    Am Dienstag, 29. Januar 2008 16:50:35 schrieb Boaz Harrosh:
    > On Tue, Jan 29 2008 at 16:31 +0200, Oliver Neukum wrote:


    > I can not see what it is. Yes CONFIG_USB_STORAGE_DEBUG will help.
    > I have a device here that uses the same trasport/protocol I'll
    > try to reproduce the failure here.


    This is the most common combination of transport and protocol. If it were
    broken in a larger number of cases, we'd hear more reports. You'll probably
    need the debug output to figure out what's wrong.

    Regards
    Oliver
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  18. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008 at 18:34 +0200, James Bottomley wrote:
    > On Tue, 2008-01-29 at 10:36 -0500, Alan Stern wrote:
    >> On Tue, 29 Jan 2008, Boaz Harrosh wrote:
    >>
    >>> --- a/drivers/usb/storage/transport.c
    >>> +++ b/drivers/usb/storage/transport.c
    >>> @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    >>> * Common used function. Transfer a complete command
    >>> * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    >>> */
    >>> -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    >>> - struct scsi_cmnd* srb)
    >>> +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    >>> + struct scsi_cmnd* srb, unsigned length)
    >>> {
    >>> unsigned int partial;
    >>> int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    >>> - scsi_sg_count(srb), scsi_bufflen(srb),
    >>> + scsi_sg_count(srb), length,
    >>> &partial);
    >>>
    >>> scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    >>> return result;
    >>> }
    >>>
    >>> +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    >>> + struct scsi_cmnd* srb)
    >>> +{
    >>> + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    >>> +}
    >>> +

    >> I don't like this patch very much. Why add another layer of
    >> indirection when the two subroutines do hardly any work? Leave
    >> usb_stor_bulk_srb() the way it was, and add usb_stor_bulk_srb_length()
    >> as a separate routine that simply calls usb_stor_bulk_transfer_sglist()
    >> and scsi_set_resid().
    >>
    >> BTW, the standard coding style calls for a blank line after the list of
    >> local variables at the start of a function or block.

    >
    > There's another bug in the transport.c conversion in that the residuals
    > are updated with bogus data in several error cases, since
    > usb_stor_bulk_transfer_sglist() only sets the actual length if the urb
    > is actually sent.
    >
    > I'm not sure if this is is the solution to the problem at hand, but it
    > definitely fixes another bug in the code.
    >
    > James
    >
    > diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
    > index d9f4912..bab0858 100644
    > --- a/drivers/usb/storage/transport.c
    > +++ b/drivers/usb/storage/transport.c
    > @@ -465,7 +465,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    > int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > struct scsi_cmnd* srb)
    > {
    > - unsigned int partial;
    > + unsigned int partial = scsi_get_resid(srb);
    > int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    > scsi_sg_count(srb), scsi_bufflen(srb),
    > &partial);
    >
    >
    > -

    But then this is weird because it is not what usb_stor_bulk_transfer_sg() is doing
    which was the one called before.

    I have such a device and I get one reset but then every thing works nice.
    This is with debug on. I'll try to make it fail.

    Boaz
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  19. Re: [BUG] 2.6.24-git usb reset problems

    On Tue, Jan 29 2008, Jens Axboe wrote:
    > On Tue, Jan 29 2008, Oliver Neukum wrote:
    > > Am Dienstag, 29. Januar 2008 15:11:08 schrieb Jens Axboe:
    > > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > > > On Tue, Jan 29 2008 at 15:54 +0200, Jens Axboe wrote:
    > > > > > On Tue, Jan 29 2008, Boaz Harrosh wrote:
    > > > > >> Greg KH wrote:

    > >
    > > > > > No difference, still just a lot of resets.
    > > > > >
    > > > > Where you able to figure out which usb storage transport is used?
    > > > >
    > > > > in drivers/usb/storage/usb.c you have get_protocol() and get_transport()
    > > > > functions. I'm not sure if these get stored in sysfs perhaps. This will
    > > > > pinpoint better where to look. Let me research a bit.
    > > >
    > > > Did the quick'n easy and dumped it. Protocol is 'Transparent SCSI' and
    > > > transport is 'Bulk'

    > >
    > > You can recompile your kernel with CONFIG_USB_DEBUG and CONFIG_STORAGE_DEBUG
    > > That should tell the reason for the resets.

    >
    > Sure, I'll do that. Will post the results tonight.


    OK, fresh boot with CONFIG_USB_DEBUG and CONFIG_STORAGE_DEBUG. Plugged
    in the device, waited 10 seconds or so and pulled it out. These are the
    messages.

    It all looks good until the MODE_SENSE command, where it only transfers
    4 of 192 bytes.

    usb usb5: usb resume
    ehci_hcd 0000:00:1d.7: resume root hub
    hub 5-0:1.0: hub_resume
    hub 5-0:1.0: state 7 ports 8 chg 0000 evt 0000
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001803 POWER sig=j CSC CONNECT
    hub 5-0:1.0: port 1, status 0501, change 0001, 480 Mb/s
    hub 5-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x501
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: new high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: default language 0x0409
    usb 5-1: uevent
    usb 5-1: usb_probe_device
    usb 5-1: configuration #1 chosen from 1 choice
    usb 5-1: adding 5-1:1.0 (config #1, interface 0)
    usb 5-1:1.0: uevent
    drivers/usb/core/inode.c: creating file '002'
    usb 5-1: new device strings: Mfr=0, Product=3, SerialNumber=4
    usb 5-1: Product: Flash Reader
    usb 5-1: SerialNumber: 02206
    Initializing USB Mass Storage driver...
    usb-storage 5-1:1.0: usb_probe_interface
    usb-storage 5-1:1.0: usb_probe_interface - got id
    usb-storage: USB Mass Storage device detected
    usb-storage: -- associate_dev
    usb-storage: Vendor: 0x05e3, Product: 0x0760, Revision: 0x0125
    usb-storage: Interface Subclass: 0x06, Protocol: 0x50
    usb trans Bulk
    usb-storage: Transport: Bulk
    usb proto Transparent SCSI
    usb-storage: Protocol: Transparent SCSI
    scsi6 : SCSI emulation for USB Mass Storage devices
    usb-storage: *** thread sleeping.
    usb-storage: device found at 2
    usb-storage: waiting for device to settle before scanning
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1
    usb-storage: GetMaxLUN command result is 1, data is 3
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command INQUIRY (6 bytes)
    usb-storage: 12 00 00 00 24 00
    usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
    usb-storage: Status code 0; transferred 36/36
    usb-storage: -- transfer complete
    usb-storage: Bulk data transfer result 0x0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0 ANSI: 0
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x2 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x3 L 8 F 128 Trg 0 LUN 0 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code 0; transferred 8/8
    usb-storage: -- transfer complete
    usb-storage: Bulk data transfer result 0x0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x3 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command MODE_SENSE (6 bytes)
    usb-storage: 1a 00 3f 00 c0 00
    usb-storage: Bulk Command S 0x43425355 T 0x4 L 192 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 192 bytes, 1 entries
    usb-storage: Status code -121; transferred 4/192
    usb-storage: -- short read transfer
    usb-storage: Bulk data transfer result 0x1
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -32; transferred 0/13
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Attempting to get CSW (2nd try)...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x4 R 188 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x5 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x5 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
    usb-storage: 1e 00 00 00 01 00
    usb-storage: Bulk Command S 0x43425355 T 0x6 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x6 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x7 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x7 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x8 L 8 F 128 Trg 0 LUN 0 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code 0; transferred 8/8
    usb-storage: -- transfer complete
    usb-storage: Bulk data transfer result 0x0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x8 R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sd 6:0:0:0: [sdb] 4001760 512-byte hardware sectors (2049 MB)
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command MODE_SENSE (6 bytes)
    usb-storage: 1a 00 3f 00 c0 00
    usb-storage: Bulk Command S 0x43425355 T 0x9 L 192 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 192 bytes, 1 entries
    usb-storage: Status code -121; transferred 4/192
    usb-storage: -- short read transfer
    usb-storage: Bulk data transfer result 0x1
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -32; transferred 0/13
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Attempting to get CSW (2nd try)...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x9 R 188 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 02 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    sdb:<7>usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_10 (10 bytes)
    usb-storage: 28 00 00 00 00 00 00 00 08 00
    usb-storage: Bulk Command S 0x43425355 T 0xa L 4096 F 128 Trg 0 LUN 0 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 4096 bytes, 1 entries
    usb-storage: Status code 0; transferred 4096/4096
    usb-storage: -- transfer complete
    usb-storage: Bulk data transfer result 0x0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0xa R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sdb1
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
    usb-storage: 1e 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0xb L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0xb R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    sd 6:0:0:0: [sdb] Attached SCSI removable disk
    sd 6:0:0:0: Attached scsi generic sg1 type 0
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command INQUIRY (6 bytes)
    usb-storage: 12 00 00 00 24 00
    usb-storage: Bulk Command S 0x43425355 T 0xc L 36 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
    usb-storage: Status code 0; transferred 36/36
    usb-storage: -- transfer complete
    usb-storage: Bulk data transfer result 0x0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0xc R 0 Stat 0x0
    usb-storage: scsi cmd done, result=0x0
    usb-storage: *** thread sleeping.
    scsi 6:0:0:1: Direct-Access Generic STORAGE DEVICE 0125 PQ: 0 ANSI: 0
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0xd L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0xd R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0xe L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0xf L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0xf R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x10 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x11 L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x11 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x12 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x13 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x13 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x14 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x15 L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x15 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x16 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x17 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x17 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x18 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x19 L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x19 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x1a L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x1b L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x1b R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x1c L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x1d L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x1d R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x1e L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x1f L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x1f R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x20 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x21 L 0 F 0 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x21 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x22 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x23 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x23 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x24 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x25 L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x25 R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x26 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x27 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x27 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x28 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x29 L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x29 R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x2a L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x2b L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x2b R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x2c L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x2d L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x2d R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x2e L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x2f L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x2f R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x30 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x31 L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x31 R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x32 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x33 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x33 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x34 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x35 L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x35 R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x36 L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x37 L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x37 R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x38 L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command READ_CAPACITY (10 bytes)
    usb-storage: 25 00 00 00 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x39 L 8 F 128 Trg 0 LUN 1 CL 10
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
    usb-storage: Status code -32; transferred 0/8
    usb-storage: clearing endpoint halt for pipe 0xc0008280
    usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
    usb-storage: usb_stor_clear_halt: result = 0
    usb-storage: Bulk data transfer result 0x2
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x39 R 8 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: -- unexpectedly short transfer
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x3a L 18 F 128 Trg 0 LUN 1 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: Status code -75; transferred 0/18
    usb-storage: -- babble
    usb-storage: Bulk data transfer result 0x3
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13
    usb-storage: -- babble
    usb-storage: Bulk status result = 3
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns 0
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    usb-storage: *** thread awakened.
    usb-storage: Command TEST_UNIT_READY (6 bytes)
    usb-storage: 00 00 00 00 00 00
    usb-storage: Bulk Command S 0x43425355 T 0x3b L 0 F 0 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code 0; transferred 13/13
    usb-storage: -- transfer complete
    usb-storage: Bulk status result = 0
    usb-storage: Bulk Status S 0x53425355 T 0x3b R 0 Stat 0x1
    usb-storage: -- transport indicates command failure
    usb-storage: Issuing auto-REQUEST_SENSE
    usb-storage: Bulk Command S 0x43425355 T 0x3c L 18 F 128 Trg 0 LUN 0 CL 6
    usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    usb-storage: Status code 0; transferred 31/31
    usb-storage: -- transfer complete
    usb-storage: Bulk command transfer result=0
    usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
    usb-storage: usb_sg_init returned -22
    usb-storage: Bulk data transfer result 0x4
    usb-storage: -- auto-sense failure
    usb-storage: storage_pre_reset
    ehci_hcd 0000:00:1d.7: port 1 high speed
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
    hub 5-0:1.0: state 7 ports 8 chg 0000 evt 0002
    usb 5-1: reset high speed USB device using ehci_hcd and address 2
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: devpath 1 ep0in 3strikes
    ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001002 POWER sig=se0 CSC
    hub 5-0:1.0: logical disconnect on port 1
    usb-storage: storage_post_reset
    usb-storage: usb_reset_composite_device returns -19
    usb-storage: usb_stor_Bulk_reset called
    usb-storage: usb_stor_control_msg: rq=ff rqtype=21 value=0000 index=00 len=0
    usb-storage: Soft reset failed: -19
    usb-storage: scsi cmd done, result=0x70000
    usb-storage: *** thread sleeping.
    usb-storage: queuecommand called
    hub 5-0:1.0: state 7 ports 8 chg 0002 evt 0002
    hub 5-0:1.0: port 1, status 0100, change 0000, 12 Mb/s
    usb 5-1: USB disconnect, address 2
    usb 5-1: unregistering device
    usb 5-1: usb_disable_device nuking all URBs
    usb 5-1: unregistering interface 5-1:1.0
    usb-storage: storage_disconnect() called
    usb-storage: usb_stor_stop_transport called
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    sd 6:0:0:1: [sdc] READ CAPACITY failed
    sd 6:0:0:1: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK
    sd 6:0:0:1: [sdc] Sense not available.
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    sd 6:0:0:1: [sdc] Write Protect is off
    sd 6:0:0:1: [sdc] Mode Sense: 00 00 00 00
    sd 6:0:0:1: [sdc] Assuming drive cache: write through
    sd 6:0:0:1: [sdc] Attached SCSI removable disk
    sd 6:0:0:1: Attached scsi generic sg2 type 0
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    sd 6:0:0:0: [sdb] READ CAPACITY failed
    sd 6:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK
    sd 6:0:0:0: [sdb] Sense not available.
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: *** thread awakened.
    usb-storage: -- exiting
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 00 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: queuecommand called
    usb-storage: Fail command during disconnect
    usb-storage: device scan complete
    usb-storage: -- usb_stor_release_resources
    usb-storage: -- sending exit command to thread
    scsi 6:0:0:0: [sdb] READ CAPACITY failed
    scsi 6:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK
    scsi 6:0:0:0: [sdb] Sense not available.
    scsi 6:0:0:0: rejecting I/O to dead device
    scsi 6:0:0:0: [sdb] Write Protect is off
    scsi 6:0:0:0: [sdb] Mode Sense: 00 00 00 00
    scsi 6:0:0:0: [sdb] Assuming drive cache: write through
    scsi 6:0:0:0: rejecting I/O to dead device
    usb-storage: -- dissociate_dev
    usb 5-1:1.0: uevent
    usb 5-1: uevent
    hub 5-0:1.0: hub_suspend
    usb usb5: bus auto-suspend
    ehci_hcd 0000:00:1d.7: suspend root hub

    --
    Jens Axboe

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  20. Re: [BUG] 2.6.24-git usb reset problems


    On Tue, 2008-01-29 at 20:27 +0200, Boaz Harrosh wrote:
    > On Tue, Jan 29 2008 at 18:34 +0200, James Bottomley wrote:
    > > On Tue, 2008-01-29 at 10:36 -0500, Alan Stern wrote:
    > >> On Tue, 29 Jan 2008, Boaz Harrosh wrote:
    > >>
    > >>> --- a/drivers/usb/storage/transport.c
    > >>> +++ b/drivers/usb/storage/transport.c
    > >>> @@ -462,18 +462,24 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    > >>> * Common used function. Transfer a complete command
    > >>> * via usb_stor_bulk_transfer_sglist() above. Set cmnd resid
    > >>> */
    > >>> -int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > >>> - struct scsi_cmnd* srb)
    > >>> +int usb_stor_bulk_srb_length(struct us_data* us, unsigned int pipe,
    > >>> + struct scsi_cmnd* srb, unsigned length)
    > >>> {
    > >>> unsigned int partial;
    > >>> int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    > >>> - scsi_sg_count(srb), scsi_bufflen(srb),
    > >>> + scsi_sg_count(srb), length,
    > >>> &partial);
    > >>>
    > >>> scsi_set_resid(srb, scsi_bufflen(srb) - partial);
    > >>> return result;
    > >>> }
    > >>>
    > >>> +int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > >>> + struct scsi_cmnd* srb)
    > >>> +{
    > >>> + return usb_stor_bulk_srb_length(us, pipe, srb, scsi_bufflen(srb));
    > >>> +}
    > >>> +
    > >> I don't like this patch very much. Why add another layer of
    > >> indirection when the two subroutines do hardly any work? Leave
    > >> usb_stor_bulk_srb() the way it was, and add usb_stor_bulk_srb_length()
    > >> as a separate routine that simply calls usb_stor_bulk_transfer_sglist()
    > >> and scsi_set_resid().
    > >>
    > >> BTW, the standard coding style calls for a blank line after the list of
    > >> local variables at the start of a function or block.

    > >
    > > There's another bug in the transport.c conversion in that the residuals
    > > are updated with bogus data in several error cases, since
    > > usb_stor_bulk_transfer_sglist() only sets the actual length if the urb
    > > is actually sent.
    > >
    > > I'm not sure if this is is the solution to the problem at hand, but it
    > > definitely fixes another bug in the code.
    > >
    > > James
    > >
    > > diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
    > > index d9f4912..bab0858 100644
    > > --- a/drivers/usb/storage/transport.c
    > > +++ b/drivers/usb/storage/transport.c
    > > @@ -465,7 +465,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
    > > int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
    > > struct scsi_cmnd* srb)
    > > {
    > > - unsigned int partial;
    > > + unsigned int partial = scsi_get_resid(srb);
    > > int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
    > > scsi_sg_count(srb), scsi_bufflen(srb),
    > > &partial);
    > >
    > >
    > > -

    > But then this is weird because it is not what usb_stor_bulk_transfer_sg() is doing
    > which was the one called before.


    Um, yes it was. The original code did this

    sb_stor_bulk_transfer_sg(..., &srp->resid, ...)

    Which was at liberty not to touch resid, which it chose not to do in the
    error legs.

    Your new code does

    int partial; <- stack uninitialised
    sb_stor_bulk_transfer_sglist(..., &partial, ...);
    scsi_set_resid(srb, scsi_bufflen(srb) - partial);

    If the function doesn't touch partial, as it doesn't in the error legs,
    resid now gets set with rubbish.

    Actually, my code is still wrong .. we have to set it to
    scsi_bufflen(srb) - scsi_resid(srb) so that it comes back the same if
    left untouched.

    > I have such a device and I get one reset but then every thing works nice.
    > This is with debug on. I'll try to make it fail.


    James


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast