Skip to content

dwc_otg: disconnects of devices plugged into Model A ports #257

Closed

Description

@P33M

If I do cat /dev/sda1 > /dev/null & and let it run on a pendrive or USB hdd plugged directly into the Pi, after several seconds the device stops responding. About 10 seconds after this, the device gets reset due to some sort of timeout. During this period, CPU is 99% wa time, 0% idle time.

If the device is plugged into a downstream hub, this never happens. The command runs until the end of the drive is reached.

Pendrive breakage:

[  154.023059] usb 1-1: USB disconnect, device number 3
[  154.043164] sd 1:0:0:0: [sda] Unhandled error code
[  154.043200] sd 1:0:0:0: [sda]
[  154.043211] Result: hostbyte=0x01 driverbyte=0x00
[  154.043224] sd 1:0:0:0: [sda] CDB:
[  154.043233] cdb[0]=0x28: 28 00 00 01 08 70 00 00 f0 00
[  154.043273] end_request: I/O error, dev sda, sector 67696
[  154.043289] quiet_error: 50 callbacks suppressed
[  154.043301] Buffer I/O error on device sda1, logical block 8458
[  154.043337] Buffer I/O error on device sda1, logical block 8459
[  154.043356] Buffer I/O error on device sda1, logical block 8460
[  154.043371] Buffer I/O error on device sda1, logical block 8461
[  154.043384] Buffer I/O error on device sda1, logical block 8462
[  154.043397] Buffer I/O error on device sda1, logical block 8463
[  154.043411] Buffer I/O error on device sda1, logical block 8464
[  154.043424] Buffer I/O error on device sda1, logical block 8465
[  154.043437] Buffer I/O error on device sda1, logical block 8466
[  154.043450] Buffer I/O error on device sda1, logical block 8467
[  154.043733] sd 1:0:0:0: [sda] Unhandled error code
[  154.043753] sd 1:0:0:0: [sda]
[  154.043764] Result: hostbyte=0x01 driverbyte=0x00
[  154.043775] sd 1:0:0:0: [sda] CDB:
[  154.043783] cdb[0]=0x28: 28 00 00 01 09 60 00 00 40 00
[  154.043818] end_request: I/O error, dev sda, sector 67936
[  154.232992] Indeed it is in host mode hprt0 = 00021501
[  154.412988] usb 1-1: new high-speed USB device number 4 using dwc_otg
[  154.413465] Indeed it is in host mode hprt0 = 00001101
[  154.615922] usb 1-1: New USB device found, idVendor=05dc, idProduct=a761
[  154.615950] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  154.615965] usb 1-1: Product: JD FireFly
[  154.615977] usb 1-1: Manufacturer: Lexar
[  154.615990] usb 1-1: SerialNumber: L7IIICTQ421A99161YKW
[  154.626128] scsi2 : usb-storage 1-1:1.0
[  156.428219] scsi 2:0:0:0: Direct-Access     Lexar    JD FireFly       1100 PQ: 0 ANSI: 0 CCS
[  156.430479] sd 2:0:0:0: [sda] 3915776 512-byte logical blocks: (2.00 GB/1.86 GiB)
[  156.431291] sd 2:0:0:0: [sda] Write Protect is off
[  156.431323] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[  156.432208] sd 2:0:0:0: [sda] No Caching mode page present
[  156.432238] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  156.438599] sd 2:0:0:0: [sda] No Caching mode page present
[  156.438632] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  156.440189]  sda: sda1
[  156.444186] sd 2:0:0:0: [sda] No Caching mode page present
[  156.444219] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  156.444237] sd 2:0:0:0: [sda] Attached SCSI removable disk

USB HDD breakage:

[  193.194254] Indeed it is in host mode hprt0 = 00001101
[  193.374195] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[  193.374390] Indeed it is in host mode hprt0 = 00001101
[  226.185542] Indeed it is in host mode hprt0 = 00001101
[  226.425294] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[  226.425576] Indeed it is in host mode hprt0 = 00001101
[  226.665342] usb 1-1: device descriptor read/64, error -32
[  226.775515] Indeed it is in host mode hprt0 = 00001101
[  227.015252] usb 1-1: device descriptor read/64, error -32
[  227.125290] Indeed it is in host mode hprt0 = 00001101
[  227.305405] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[  227.305677] Indeed it is in host mode hprt0 = 00001101
[  227.485261] usb 1-1: device descriptor read/64, error -32
[  227.595490] Indeed it is in host mode hprt0 = 00001101
[  227.775269] usb 1-1: device descriptor read/64, error -32
[  227.885303] Indeed it is in host mode hprt0 = 00001101
[  228.065273] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[  228.085578] usb 1-1: device descriptor read/8, error -71
[  228.215635] usb 1-1: device descriptor read/8, error -71
[  228.325316] Indeed it is in host mode hprt0 = 00001101
[  228.505291] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[  228.525565] usb 1-1: device descriptor read/8, error -71
[  228.655612] usb 1-1: device descriptor read/8, error -71
[  228.765369] usb 1-1: USB disconnect, device number 2
[  228.778680] sd 0:0:0:0: Device offlined - not ready after error recovery
[  228.786321] sd 0:0:0:0: [sda] Unhandled error code
[  228.786351] sd 0:0:0:0: [sda]
[  228.786363] Result: hostbyte=0x01 driverbyte=0x00
[  228.786376] sd 0:0:0:0: [sda] CDB:
[  228.786386] cdb[0]=0x28: 28 00 00 03 fb 60 00 00 f0 00
[  228.786425] end_request: I/O error, dev sda, sector 260960
[  228.786445] Buffer I/O error on device sda1, logical block 32364
[  228.786484] Buffer I/O error on device sda1, logical block 32365
[  228.786502] Buffer I/O error on device sda1, logical block 32366
[  228.786517] Buffer I/O error on device sda1, logical block 32367
[  228.786530] Buffer I/O error on device sda1, logical block 32368
[  228.786544] Buffer I/O error on device sda1, logical block 32369
[  228.786556] Buffer I/O error on device sda1, logical block 32370
[  228.786569] Buffer I/O error on device sda1, logical block 32371
[  228.786582] Buffer I/O error on device sda1, logical block 32372
[  228.786596] Buffer I/O error on device sda1, logical block 32373
[  228.786759] sd 0:0:0:0: [sda] Unhandled error code
[  228.786779] sd 0:0:0:0: [sda]
[  228.786788] Result: hostbyte=0x01 driverbyte=0x00
[  228.786800] sd 0:0:0:0: [sda] CDB:
[  228.786807] cdb[0]=0x28: 28 00 00 03 fc 50 00 00 f0 00
[  228.786841] end_request: I/O error, dev sda, sector 261200
[  229.045327] Indeed it is in host mode hprt0 = 00001501
[  229.225301] usb 1-1: new high-speed USB device number 3 using dwc_otg
[  229.225567] Indeed it is in host mode hprt0 = 00001101
[  229.405352] usb 1-1: device descriptor read/64, error -32
[  229.515530] Indeed it is in host mode hprt0 = 00001101
[  229.695313] usb 1-1: device descriptor read/64, error -32
[  229.805444] Indeed it is in host mode hprt0 = 00001101
[  229.985337] usb 1-1: new high-speed USB device number 4 using dwc_otg
[  229.985604] Indeed it is in host mode hprt0 = 00001101
[  230.165384] usb 1-1: device descriptor read/64, error -32
[  230.275545] Indeed it is in host mode hprt0 = 00001101
[  230.455398] usb 1-1: device descriptor read/64, error -32
[  230.565483] Indeed it is in host mode hprt0 = 00001101
[  230.745353] usb 1-1: new high-speed USB device number 5 using dwc_otg
[  230.765658] usb 1-1: device descriptor read/8, error -71
[  230.895621] usb 1-1: device descriptor read/8, error -71
[  231.005420] Indeed it is in host mode hprt0 = 00001101
[  231.185382] usb 1-1: new high-speed USB device number 6 using dwc_otg
[  231.205701] usb 1-1: device descriptor read/8, error -71
[  231.335663] usb 1-1: device descriptor read/8, error -71
[  231.445414] hub 1-0:1.0: unable to enumerate USB device on port 1

The USB HDD appears to have more of a tantrum and stops responding altogether, even through a Pi reboot.

This happens with or without dwc_otg.fiq_fix_enable=0 OR dwc_otg.speed=1 on the command line.

Activity

  1. ghollingworth commented on Mar 23, 2013

    @ghollingworth

    The second looks like a power issue, the first one is possible as well, how are you powering them?

    Gordon

    Gordon Hollingworth, Director of Engineering
    RaspberryPi (M) 07450946289

    On 23 Mar 2013, at 12:57, P33M notifications@github.com wrote:

    If I do cat /dev/sda1 > /dev/null & and let it run on a pendrive or USB hdd plugged directly into the Pi, after several seconds the device stops responding. About 10 seconds after this, the device gets reset due to some sort of timeout. During this period, CPU is 99% wa time, 0% idle time.

    If the device is plugged into a downstream hub, this never happens. The command runs until the end of the drive is reached.

    Pendrive breakage:

    [ 154.023059] usb 1-1: USB disconnect, device number 3
    [ 154.043164] sd 1:0:0:0: [sda] Unhandled error code
    [ 154.043200] sd 1:0:0:0: [sda]
    [ 154.043211] Result: hostbyte=0x01 driverbyte=0x00
    [ 154.043224] sd 1:0:0:0: [sda] CDB:
    [ 154.043233] cdb[0]=0x28: 28 00 00 01 08 70 00 00 f0 00
    [ 154.043273] end_request: I/O error, dev sda, sector 67696
    [ 154.043289] quiet_error: 50 callbacks suppressed
    [ 154.043301] Buffer I/O error on device sda1, logical block 8458
    [ 154.043337] Buffer I/O error on device sda1, logical block 8459
    [ 154.043356] Buffer I/O error on device sda1, logical block 8460
    [ 154.043371] Buffer I/O error on device sda1, logical block 8461
    [ 154.043384] Buffer I/O error on device sda1, logical block 8462
    [ 154.043397] Buffer I/O error on device sda1, logical block 8463
    [ 154.043411] Buffer I/O error on device sda1, logical block 8464
    [ 154.043424] Buffer I/O error on device sda1, logical block 8465
    [ 154.043437] Buffer I/O error on device sda1, logical block 8466
    [ 154.043450] Buffer I/O error on device sda1, logical block 8467
    [ 154.043733] sd 1:0:0:0: [sda] Unhandled error code
    [ 154.043753] sd 1:0:0:0: [sda]
    [ 154.043764] Result: hostbyte=0x01 driverbyte=0x00
    [ 154.043775] sd 1:0:0:0: [sda] CDB:
    [ 154.043783] cdb[0]=0x28: 28 00 00 01 09 60 00 00 40 00
    [ 154.043818] end_request: I/O error, dev sda, sector 67936
    [ 154.232992] Indeed it is in host mode hprt0 = 00021501
    [ 154.412988] usb 1-1: new high-speed USB device number 4 using dwc_otg
    [ 154.413465] Indeed it is in host mode hprt0 = 00001101
    [ 154.615922] usb 1-1: New USB device found, idVendor=05dc, idProduct=a761
    [ 154.615950] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 154.615965] usb 1-1: Product: JD FireFly
    [ 154.615977] usb 1-1: Manufacturer: Lexar
    [ 154.615990] usb 1-1: SerialNumber: L7IIICTQ421A99161YKW
    [ 154.626128] scsi2 : usb-storage 1-1:1.0
    [ 156.428219] scsi 2:0:0:0: Direct-Access Lexar JD FireFly 1100 PQ: 0 ANSI: 0 CCS
    [ 156.430479] sd 2:0:0:0: [sda] 3915776 512-byte logical blocks: (2.00 GB/1.86 GiB)
    [ 156.431291] sd 2:0:0:0: [sda] Write Protect is off
    [ 156.431323] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
    [ 156.432208] sd 2:0:0:0: [sda] No Caching mode page present
    [ 156.432238] sd 2:0:0:0: [sda] Assuming drive cache: write through
    [ 156.438599] sd 2:0:0:0: [sda] No Caching mode page present
    [ 156.438632] sd 2:0:0:0: [sda] Assuming drive cache: write through
    [ 156.440189] sda: sda1
    [ 156.444186] sd 2:0:0:0: [sda] No Caching mode page present
    [ 156.444219] sd 2:0:0:0: [sda] Assuming drive cache: write through
    [ 156.444237] sd 2:0:0:0: [sda] Attached SCSI removable disk
    USB HDD breakage:

    [ 193.194254] Indeed it is in host mode hprt0 = 00001101
    [ 193.374195] usb 1-1: reset high-speed USB device number 2 using dwc_otg
    [ 193.374390] Indeed it is in host mode hprt0 = 00001101
    [ 226.185542] Indeed it is in host mode hprt0 = 00001101
    [ 226.425294] usb 1-1: reset high-speed USB device number 2 using dwc_otg
    [ 226.425576] Indeed it is in host mode hprt0 = 00001101
    [ 226.665342] usb 1-1: device descriptor read/64, error -32
    [ 226.775515] Indeed it is in host mode hprt0 = 00001101
    [ 227.015252] usb 1-1: device descriptor read/64, error -32
    [ 227.125290] Indeed it is in host mode hprt0 = 00001101
    [ 227.305405] usb 1-1: reset high-speed USB device number 2 using dwc_otg
    [ 227.305677] Indeed it is in host mode hprt0 = 00001101
    [ 227.485261] usb 1-1: device descriptor read/64, error -32
    [ 227.595490] Indeed it is in host mode hprt0 = 00001101
    [ 227.775269] usb 1-1: device descriptor read/64, error -32
    [ 227.885303] Indeed it is in host mode hprt0 = 00001101
    [ 228.065273] usb 1-1: reset high-speed USB device number 2 using dwc_otg
    [ 228.085578] usb 1-1: device descriptor read/8, error -71
    [ 228.215635] usb 1-1: device descriptor read/8, error -71
    [ 228.325316] Indeed it is in host mode hprt0 = 00001101
    [ 228.505291] usb 1-1: reset high-speed USB device number 2 using dwc_otg
    [ 228.525565] usb 1-1: device descriptor read/8, error -71
    [ 228.655612] usb 1-1: device descriptor read/8, error -71
    [ 228.765369] usb 1-1: USB disconnect, device number 2
    [ 228.778680] sd 0:0:0:0: Device offlined - not ready after error recovery
    [ 228.786321] sd 0:0:0:0: [sda] Unhandled error code
    [ 228.786351] sd 0:0:0:0: [sda]
    [ 228.786363] Result: hostbyte=0x01 driverbyte=0x00
    [ 228.786376] sd 0:0:0:0: [sda] CDB:
    [ 228.786386] cdb[0]=0x28: 28 00 00 03 fb 60 00 00 f0 00
    [ 228.786425] end_request: I/O error, dev sda, sector 260960
    [ 228.786445] Buffer I/O error on device sda1, logical block 32364
    [ 228.786484] Buffer I/O error on device sda1, logical block 32365
    [ 228.786502] Buffer I/O error on device sda1, logical block 32366
    [ 228.786517] Buffer I/O error on device sda1, logical block 32367
    [ 228.786530] Buffer I/O error on device sda1, logical block 32368
    [ 228.786544] Buffer I/O error on device sda1, logical block 32369
    [ 228.786556] Buffer I/O error on device sda1, logical block 32370
    [ 228.786569] Buffer I/O error on device sda1, logical block 32371
    [ 228.786582] Buffer I/O error on device sda1, logical block 32372
    [ 228.786596] Buffer I/O error on device sda1, logical block 32373
    [ 228.786759] sd 0:0:0:0: [sda] Unhandled error code
    [ 228.786779] sd 0:0:0:0: [sda]
    [ 228.786788] Result: hostbyte=0x01 driverbyte=0x00
    [ 228.786800] sd 0:0:0:0: [sda] CDB:
    [ 228.786807] cdb[0]=0x28: 28 00 00 03 fc 50 00 00 f0 00
    [ 228.786841] end_request: I/O error, dev sda, sector 261200
    [ 229.045327] Indeed it is in host mode hprt0 = 00001501
    [ 229.225301] usb 1-1: new high-speed USB device number 3 using dwc_otg
    [ 229.225567] Indeed it is in host mode hprt0 = 00001101
    [ 229.405352] usb 1-1: device descriptor read/64, error -32
    [ 229.515530] Indeed it is in host mode hprt0 = 00001101
    [ 229.695313] usb 1-1: device descriptor read/64, error -32
    [ 229.805444] Indeed it is in host mode hprt0 = 00001101
    [ 229.985337] usb 1-1: new high-speed USB device number 4 using dwc_otg
    [ 229.985604] Indeed it is in host mode hprt0 = 00001101
    [ 230.165384] usb 1-1: device descriptor read/64, error -32
    [ 230.275545] Indeed it is in host mode hprt0 = 00001101
    [ 230.455398] usb 1-1: device descriptor read/64, error -32
    [ 230.565483] Indeed it is in host mode hprt0 = 00001101
    [ 230.745353] usb 1-1: new high-speed USB device number 5 using dwc_otg
    [ 230.765658] usb 1-1: device descriptor read/8, error -71
    [ 230.895621] usb 1-1: device descriptor read/8, error -71
    [ 231.005420] Indeed it is in host mode hprt0 = 00001101
    [ 231.185382] usb 1-1: new high-speed USB device number 6 using dwc_otg
    [ 231.205701] usb 1-1: device descriptor read/8, error -71
    [ 231.335663] usb 1-1: device descriptor read/8, error -71
    [ 231.445414] hub 1-0:1.0: unable to enumerate USB device on port 1
    The USB HDD appears to have more of a tantrum and stops responding altogether, even through a Pi reboot.

    This happens with or without dwc_otg.fiq_fix_enable=0 OR dwc_otg.speed=1 on the command line.

    —
    Reply to this email directly or view it on GitHub.

  2. foreverguest commented on Apr 3, 2013

    @foreverguest

    These same errors happen to me on a model B with an external powered USB HDD

  3. P33M commented on Apr 7, 2013

    @P33M
    ContributorAuthor

    The USB HDD is definitely a power hungry beast so I took pains to make sure the Pi had plenty of power available (direct wire to GPIO +5V).

    This also affects certain wifi devices whereby they just stop responding after a while - my RTL5370 dies:

    Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
    
    <3>[  150.747780] phy0 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x1208 with error -110.
    <3>[  250.749927] phy0 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x7010 with error -110.
    

    Those messages repeated ad infinitum. If I use the network link (scp or ssh with activity) then the wlan dongle does not hang.

    No messages out of the driver - my hunch is that it's a bus error that's never handled/reset.

  4. P33M commented on Apr 7, 2013

    @P33M
    ContributorAuthor

    It's a URB pileup in dwc_otg_hcd_enqueue().

    With USB storage debug enabled, I can see the URBs being submitted. I added some debug output to enqueue:

    diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
    index 91eefec..1df91d5 100644
    --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
    +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
    @@ -518,6 +518,8 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd,
                    tr_type = dwc_otg_hcd_select_transactions(hcd);
                    if (tr_type != DWC_OTG_TRANSACTION_NONE) {
                            dwc_otg_hcd_queue_transactions(hcd, tr_type);
    +               } else {
    +                       DWC_ERROR("Scheduler returned no transactions but needed sched!");
                    }
                    DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags);
            }
    
    <7>[  156.489418] usb-storage: usb_stor_bulk_transfer_sglist: xfer 122880 bytes, 2 entries
    <4>[  156.489506] ERROR::dwc_otg_hcd_urb_enqueue:522: Scheduler returned no transactions but needed sched!
    <7>[  156.496736] usb-storage: Status code 0; transferred 122880/122880
    <7>[  156.496759] usb-storage: -- transfer complete
    <7>[  156.496770] usb-storage: Bulk data transfer result 0x0
    <7>[  156.496777] usb-storage: Attempting to get CSW...
    <7>[  156.496788] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    <7>[  156.496880] usb-storage: Status code 0; transferred 13/13
    <7>[  156.496892] usb-storage: -- transfer complete
    <7>[  156.496900] usb-storage: Bulk status result = 0
    <7>[  156.496911] usb-storage: Bulk Status S 0x53425355 T 0x53b R 0 Stat 0x0
    <7>[  156.496923] usb-storage: scsi cmd done, result=0x0
    <7>[  156.496943] usb-storage: *** thread sleeping.
    <7>[  156.497105] usb-storage: queuecommand_lck called
    <7>[  156.497195] usb-storage: *** thread awakened.
    <7>[  156.497214] usb-storage: Command READ_10 (10 bytes)
    <7>[  156.497221] usb-storage:  28 00 00 02 e8 98 00 00 f0 00
    <7>[  156.497261] usb-storage: Bulk Command S 0x43425355 T 0x53c L 122880 F 128 Trg 0 LUN 0 CL 10
    <7>[  156.497271] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
    <7>[  156.497360] usb-storage: Status code 0; transferred 31/31
    <7>[  156.497373] usb-storage: -- transfer complete
    <7>[  156.497380] usb-storage: Bulk command transfer result=0
    <7>[  156.497392] usb-storage: usb_stor_bulk_transfer_sglist: xfer 122880 bytes, 2 entries
    <4>[  156.497480] ERROR::dwc_otg_hcd_urb_enqueue:522: Scheduler returned no transactions but needed sched!
    

    This causes submitted URBs to just sit there until some high-level error handling takes over - SCSI eh thread times out and calls the abort function, which dequeues the URBs in the case of usb_storage, which clears the blockage. In the case of the wlan dongle, it never does anything to requeue URBs therefore the device becomes unresponsive.

    The pileup occurs because if we have only one URB being submitted, and it didn't get scheduled, there is no SOF interrupt unmasked to kick the scheduler again. I have yet to establish exactly why a freshly queued transaction was just ignored for being scheduled. I suspect another concurrency issue, given that for the wlan dongle these enqueue failures happen sporadically.

  5. P33M commented on Apr 10, 2013

    @P33M
    ContributorAuthor

    The problem is evident when more than one URB is queued at one time for a single endpoint with no other endpoint transfers in the queue. usb-storage is a particularly prone case because of its habit of queueing a large number of URBs (14-30 typical) using usbcore's scatter-gather helpers.

    If multiple endpoints are active, the call to dwc_otg_hcd_select_transactions is repeated on each xfercomp interrupt completion - making the stalls disappear as other transfers will schedule a stalled URB.

    The bug can be squashed by permanently enabling the SOF interrupt on the first URB queued - but for a model A this is not particularly useful as it leads to the FIQ/SOF handler now being active (and consuming CPU time and energy) when it doesn't need to be.

    There doesn't seem to be a reason why multiple transfers queued for a single endpoint shouldn't be possible - each completed transfer should then cause the next to be assigned to a hc.

  6. P33M commented on Apr 17, 2013

    @P33M
    ContributorAuthor

    I've made some progress.

    It appears that on occasion a transaction is assigned to a HC, started but the transfer never completes. It is simply "lost". This produces visible breakage with only a single device attached to the BCM2835 USB port because the transfer stream to the device (with no SOF interrupt to keep kicking it) is dependent on the xfercomp interrupt handler queueing the next transfer for the same endpoint. I think the data toggles come into play at this point to ensure that the "lost" packet is catered for.

    My first idea was that the transaction was being performed too close to the end of a microframe - overrunning and causing general mayhem, however looking at frrem when the transaction was started didn't seem to show any correlation. Transfers would fail when scheduled anywhere in the microframe.

  7. P33M commented on Apr 20, 2013

    @P33M
    ContributorAuthor

    It took @ghollingworth's USB analyzer but we found out why -

    The NAK holdoff is erroneously enabled for all non-periodic endpoints. In addition to this, there is a bug where at hfnum == HFNUM_MAX_FRAME_NUM the qh->nak_frame check returns true (when set to an otherwise intentionally bogus value), which then skips the active QH for queueing and also delays the FIQ triggering for up to 1 full-speed frame.

    If this is the only QH in either of the non-periodic queues, this results in all further transactions for the same endpoint getting blocked until external action intervenes . In the case of usb_storage devices, the error handling thread would wakeup and then dequeue all URBs and clear the problem.

    Thinking about it further, this could be why we are seeing very occasional drops of packets in #238 (webcams) after the tasklet patch - the FIQ is being commanded to do work on a future frame rather than at the very small interval required for a usually quite frequent periodic transaction.

  8. P33M commented on Apr 27, 2013

    @P33M
    ContributorAuthor

    Wlan dongle now working for 24h+ on a model A - closing this issue

  9. 6 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions