Discussion:
[PATCH 0/6] USB: OHCI: work with controllers that lose TDs
(too old to reply)
Alan Stern
2014-07-18 20:25:23 UTC
Permalink
Raw Message
Some OHCI controllers (most notably those made by NVIDIA, but others
too) sometimes lose track of completed Transfer Descriptors. When a TD
completes, the controller is supposed to add it to the start of the
Done Queue, to let the driver know the transfer is finished. The buggy
controllers occasionally fail to do this.

ohci-hcd already contains a couple of ad-hoc mechanisms for dealing
with these failures. One of the quirk handlers (for Compaq ZF Micro)
looks for lost TDs on an interrupt endpoint. In addition, the driver
recognizes that whenever a TD is on the Done Queue, all the earlier TDs
for the same endpoint must have completed as well, even if they aren't
on the Done Queue.

Still, these mechanisms don't handle all the possible scenarios. Lost
TDs have been observed for non-interrupt endpoints, and if the lost TD
is the last one in a transfer then there might not be anything
following it in the Done Queue.

This patch series replaces the ad-hoc mechanisms with a general
approach. A new I/O watchdog routine runs every 200 ms as long as
there are any active URBs. The routine scans the lists of TDs, looking
for any which have completed but haven't shown up in the Done Queue,
and takes care of them. (This will add a small amount of overhead, but
OHCI has never been high-throughput.) The routine also checks for
controllers malfunctioning so badly that they are unusable, and
declares them dead.

Making these changes requires a certain amount of care, because the
controller might add a TD to the Done Queue any time up to a
millisecond after the TD completes. The watchdog routine has to make
sure it doesn't race with the hardware, and the done list (the driver's
equivalent of the hardware's Done Queue) has to be treated differently
from the way it is now. Also, there will be two pathways by which URBs
may complete: the hardware IRQ handler and the watchdog routine. This
requires the driver to make sure that URB completions are always
single-threaded.

The first four patches in this series remove the ad-hoc zfmicro quirk
and make other preliminary adjustments. The last two patches add the
I/O watchdog and add to it a check for a non-updating frame counter
(another type of hardware problem observed in the field).

In the past, users have reported controller failures like these that
ended up hanging the kernel's USB stack. With these changes in place,
the hardware problems will show up as graceful failures, leaving the
rest of the USB subsystem intact.

Alan Stern


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
2014-07-18 23:35:06 UTC
Permalink
Raw Message
Post by Alan Stern
Some OHCI controllers (most notably those made by NVIDIA, but others
too) sometimes lose track of completed Transfer Descriptors. When a TD
completes, the controller is supposed to add it to the start of the
Done Queue, to let the driver know the transfer is finished. The buggy
controllers occasionally fail to do this.
ohci-hcd already contains a couple of ad-hoc mechanisms for dealing
with these failures. One of the quirk handlers (for Compaq ZF Micro)
looks for lost TDs on an interrupt endpoint. In addition, the driver
recognizes that whenever a TD is on the Done Queue, all the earlier TDs
for the same endpoint must have completed as well, even if they aren't
on the Done Queue.
Still, these mechanisms don't handle all the possible scenarios. Lost
TDs have been observed for non-interrupt endpoints, and if the lost TD
is the last one in a transfer then there might not be anything
following it in the Done Queue.
This patch series replaces the ad-hoc mechanisms with a general
approach. A new I/O watchdog routine runs every 200 ms as long as
there are any active URBs. The routine scans the lists of TDs, looking
for any which have completed but haven't shown up in the Done Queue,
and takes care of them. (This will add a small amount of overhead, but
OHCI has never been high-throughput.) The routine also checks for
controllers malfunctioning so badly that they are unusable, and
declares them dead.
Making these changes requires a certain amount of care, because the
controller might add a TD to the Done Queue any time up to a
millisecond after the TD completes. The watchdog routine has to make
sure it doesn't race with the hardware, and the done list (the driver's
equivalent of the hardware's Done Queue) has to be treated differently
from the way it is now. Also, there will be two pathways by which URBs
may complete: the hardware IRQ handler and the watchdog routine. This
requires the driver to make sure that URB completions are always
single-threaded.
The first four patches in this series remove the ad-hoc zfmicro quirk
and make other preliminary adjustments. The last two patches add the
I/O watchdog and add to it a check for a non-updating frame counter
(another type of hardware problem observed in the field).
In the past, users have reported controller failures like these that
ended up hanging the kernel's USB stack. With these changes in place,
the hardware problems will show up as graceful failures, leaving the
rest of the USB subsystem intact.
Very nice work, the things drivers have to do to work around broken
hardware...

All now applied, thanks.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Matteo Fortini
2014-10-22 16:09:00 UTC
Permalink
Raw Message
I (partly) reopen this issue because it fixed the problem we had (lost
TDs lead to random process lockups on FTDI serial), but we're now seeing
another kind of lockup which is also USB-related on the same board, just
at the time we close() the serial port.

We enabled USB debug to gather all available information.

Thank you for any comment

Here's some code that triggers the problem:
==================================================
#include <stdio.h>
#include <stdlib.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

const unsigned char buf[] = "1234567890";

int main(int argc, char **argv)
{
if( argc < 2 ) {
fprintf(stderr, "Usage: %s <serial>\n", argv[0]);
return 1;
}

const char *s = argv[1];

fprintf(stderr, "Opening serial '%s'\n", s);

int fd = open(s, O_RDWR);
if( fd > 0 ) {
fprintf(stderr, "Writing buf\n");
write(fd, buf, sizeof(buf));

fprintf(stderr, "Closing serial\n");
close(fd);

fprintf(stderr, "Serial closed\n");
} else {
fprintf(stderr, "Unable to open '%s'\n", s);
return 1;
}

return 0;
}
==================================================

Here's the (longish) debug output:
==============================================
root-***@public.gmane.org:~# /tmp/usbserial_err /dev/ttyUSB0
Opening serial '/dev/ttyUSB0'
Writing buf
Closing serial
Serial closed
root-***@public.gmane.org:~# /tmp/usbserial_err /dev/ttyUSB0
Opening serial '/dev/ttyUSB0'
[..] DEADLOCK





root-***@public.gmane.org:~# mount -t debugfs none /sys/kernel/debug/
root-***@public.gmane.org:~# ls -l /sys/kernel/debug/usb/
-r--r--r-- 1 root root 0 Jan 1 06:14 devices
drwxr-xr-x 3 root root 0 Jan 1 06:14 ohci
root@(none).M3:~#
root@(none).M3:~# cat /sys/kernel/debug/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 4
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.14
S: Manufacturer=Linux 3.14.0 ohci_hcd
S: Product=OHCI PCI host controller
S: SerialNumber=0000:00:0f.4
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0403 ProdID=6015 Rev=10.00
S: Manufacturer=Sadel S.p.A.
S: Product=sdlaudioctrl
S: SerialNumber=HSXO62L4
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 4
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.14
S: Manufacturer=Linux 3.14.0 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:0f.5
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
root@(none).M3:~# for file in
/sys/kernel/debug/usb/ohci/0000\:00\:0f.4/*; do echo "== ${file} ==";
cat "${file}"; echo; done
== /sys/kernel/debug/usb/ohci/0000:00:0f.4/async ==

== /sys/kernel/debug/usb/ohci/0000:00:0f.4/periodic ==
size = 32

== /sys/kernel/debug/usb/ohci/0000:00:0f.4/registers ==
bus pci, device 0000:00:0f.4
OHCI PCI host controllerkillall ***********************
ohci_hcd
OHCI 1.0, NO legacy support registers, rh state running
control 0x283 RWC HCFS=operational CBSR=3
cmdstatus 0x00002 SOC=0 CLF
intrstatus 0x00000024 FNO SF
intrenable 0x8000005a MIE RHSC UE RD WDH
ed_controlhead 002c0000
ed_bulkhead 002c0050
hcca frame 0x543d
fmintvl 0xa7782edf FIT FSMPS=0xa778 FI=0x2edf
fmremaining 0x80002a17 FRT FR=0x2a17
periodicstart 0x2a2f
lsthresh 0x0628
hub poll timer off
roothub.a 03000204 POTPGT=3 NPS NDP=4(4)
roothub.b 00000000 PPCM=0000 DR=0000
roothub.status 00008000 DRWE
roothub.portstatus [0] 0x00000103 PPS PES CCS
roothub.portstatus [1] 0x00000100 PPS
roothub.portstatus [2] 0x00000100 PPS
roothub.portstatus [3] 0x00000100 PPS






root-***@public.gmane.org:~# dmesg
[ 0.000000] Linux version 3.14.0-xxxxxxxxx+ () (gcc version 4.9.1
(Debian 4.9.1-16) ) #10 PREEMPT Wed Oct 22 11:49:42 CEST 2014
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009e7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009e800-0x000000000009ffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f7affff] usable
[ 0.000000] BIOS-e820: [mem 0x000000001f7b0000-0x000000001f7b2fff]
ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x000000001f7b3000-0x000000001f7bffff]
ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000ffff0000-0x00000000ffffffff]
reserved
[ 0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[ 0.000000] SMBIOS 2.2 present.
[ 0.000000] DMI: /AMD-GX3, BIOS 6.00 PG 12/14/2011
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x1f7b0 max_arch_pfn = 0x100000
[ 0.000000] initial memory mapped: [mem 0x00000000-0x01bfffff]
[ 0.000000] Base memory trampoline at [c009a000] 9a000 size 16384
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[ 0.000000] [mem 0x00000000-0x000fffff] page 4k
[ 0.000000] init_memory_mapping: [mem 0x1f000000-0x1f3fffff]
[ 0.000000] [mem 0x1f000000-0x1f3fffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x18000000-0x1effffff]
[ 0.000000] [mem 0x18000000-0x1effffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x00100000-0x17ffffff]
[ 0.000000] [mem 0x00100000-0x003fffff] page 4k
[ 0.000000] [mem 0x00400000-0x17ffffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x1f400000-0x1f7affff]
[ 0.000000] [mem 0x1f400000-0x1f7affff] page 4k
[ 0.000000] BRK [0x01831000, 0x01831fff] PGTABLE
[ 0.000000] 0MB HIGHMEM available.
[ 0.000000] 503MB LOWMEM available.
[ 0.000000] mapped low ram: 0 - 1f7b0000
[ 0.000000] low ram: 0 - 1f7b0000
[ 0.000000] BRK [0x01832000, 0x01832fff] PGTABLE
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00001000-0x00ffffff]
[ 0.000000] Normal [mem 0x01000000-0x1f7affff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00001000-0x0009dfff]
[ 0.000000] node 0: [mem 0x00100000-0x1f7affff]
[ 0.000000] On node 0 totalpages: 128845
[ 0.000000] free_area_init_node: node 0, pgdat c172e920, node_mem_map
df3c0020
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 3997 pages, LIFO batch:0
[ 0.000000] Normal zone: 976 pages used for memmap
[ 0.000000] Normal zone: 124848 pages, LIFO batch:31
[ 0.000000] e820: [mem 0x1f7c0000-0xfffeffff] available for PCI devices
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 127837
[ 0.000000] Kernel command line: parport=0x3bc,7 acpi_irq_isa=10,12
root=/dev/sda1 root=/dev/sda2 rw pnpacpi=off acpi=off
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144
bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072
bytes)
[ 0.000000] Initializing CPU#0
[ 0.000000] Initializing HighMem for node 0 (00000000:00000000)
[ 0.000000] Memory: 502424K/515380K available (5324K kernel code,
422K rwdata, 1660K rodata, 400K init, 540K bss, 12956K reserved, 0K highmem)
[ 0.000000] virtual kernel memory layout:
[ 0.000000] fixmap : 0xfffe3000 - 0xfffff000 ( 112 kB)
[ 0.000000] pkmap : 0xff800000 - 0xffc00000 (4096 kB)
[ 0.000000] vmalloc : 0xdffb0000 - 0xff7fe000 ( 504 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xdf7b0000 ( 503 MB)
[ 0.000000] .init : 0xc173e000 - 0xc17a2000 ( 400 kB)
[ 0.000000] .data : 0xc1533384 - 0xc173d8a0 (2089 kB)
[ 0.000000] .text : 0xc1000000 - 0xc1533384 (5324 kB)
[ 0.000000] Checking if this processor honours the WP bit even in
supervisor mode...Ok.
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] CPU 0 irqstacks, hard=dec06000 soft=dec08000
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 499.873 MHz processor
[ 0.002007] Calibrating delay loop (skipped), value calculated using
timer frequency.. 999.74 BogoMIPS (lpj=499873)
[ 0.002168] pid_max: default: 32768 minimum: 301
[ 0.003234] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.003329] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
bytes)
[ 0.004541] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.004541] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.004541] tlb_flushall_shift: -1
[ 0.004694] CPU: Geode(TM) Integrated Processor by AMD PCS (fam: 05,
model: 0a, stepping: 02)
[ 0.005317] Performance Events: no PMU driver, software events only.
[ 0.007156] NMI watchdog: disabled (cpu0): hardware events not enabled
[ 0.009565] PM: Registering ACPI NVS region [mem
0x1f7b0000-0x1f7b2fff] (12288 bytes)
[ 0.011569] NET: Registered protocol family 16
[ 0.015130] cpuidle: using governor ladder
[ 0.015222] cpuidle: using governor menu
[ 0.020383] PCI: PCI BIOS revision 2.10 entry at 0xfa560, last bus=0
[ 0.020478] PCI: Using configuration type 1 for base access
[ 0.081781] bio: create slab <bio-0> at 0
[ 0.083090] ACPI: Interpreter disabled.
[ 0.083924] vgaarb: loaded
[ 0.085869] SCSI subsystem initialized
[ 0.086723] libata version 3.00 loaded.
[ 0.088383] usbcore: registered new interface driver usbfs
[ 0.088750] usbcore: registered new interface driver hub
[ 0.089239] usbcore: registered new device driver usb
[ 0.091662] Advanced Linux Sound Architecture Driver Initialized.
[ 0.092108] PCI: Probing PCI hardware
[ 0.092189] PCI: root bus 00: using default resources
[ 0.092204] PCI: Probing PCI hardware (bus 00)
[ 0.092589] PCI host bridge to bus 0000:00
[ 0.092685] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.092783] pci_bus 0000:00: root bus resource [mem
0x00000000-0xffffffff]
[ 0.092885] pci_bus 0000:00: No busn resource found for root bus,
will use [bus 00-ff]
[ 0.093223] pci 0000:00:01.0: [1022:2080] type 00 class 0x060000
[ 0.093379] pci 0000:00:01.0: reg 0x10: [io 0xac1c-0xac1f]
[ 0.094728] pci 0000:00:01.1: [1022:2081] type 00 class 0x030000
[ 0.095149] pci 0000:00:01.1: reg 0x10: [mem 0xee000000-0xeeffffff]
[ 0.095374] pci 0000:00:01.1: reg 0x14: [mem 0xefff4000-0xefff7fff]
[ 0.095597] pci 0000:00:01.1: reg 0x18: [mem 0xefff0000-0xefff3fff]
[ 0.095818] pci 0000:00:01.1: reg 0x1c: [mem 0xeffec000-0xeffeffff]
[ 0.096129] pci 0000:00:01.1: reg 0x20: [mem 0xeffe8000-0xeffebfff]
[ 0.096983] vgaarb: device added:
PCI:0000:00:01.1,decodes=io+mem,owns=io+mem,locks=none
[ 0.097396] pci 0000:00:01.2: [1022:2082] type 00 class 0x101000
[ 0.097667] pci 0000:00:01.2: reg 0x10: [mem 0xefff8000-0xefffbfff]
[ 0.099633] pci 0000:00:06.0: [10ec:8139] type 00 class 0x020000
[ 0.099684] pci 0000:00:06.0: reg 0x10: [io 0xfc00-0xfcff]
[ 0.099720] pci 0000:00:06.0: reg 0x14: [mem 0xeffff000-0xeffff0ff]
[ 0.099833] pci 0000:00:06.0: supports D1 D2
[ 0.099855] pci 0000:00:06.0: PME# supported from D1 D2 D3hot D3cold
[ 0.100493] pci 0000:00:09.0: [10ec:8139] type 00 class 0x020000
[ 0.100544] pci 0000:00:09.0: reg 0x10: [io 0xfa00-0xfaff]
[ 0.100580] pci 0000:00:09.0: reg 0x14: [mem 0xefffe000-0xefffe0ff]
[ 0.100692] pci 0000:00:09.0: supports D1 D2
[ 0.100714] pci 0000:00:09.0: PME# supported from D1 D2 D3hot D3cold
[ 0.101443] pci 0000:00:0f.0: [1022:2090] type 00 class 0x060100
[ 0.101772] pci 0000:00:0f.0: reg 0x10: [io 0x6000-0x6007]
[ 0.102079] pci 0000:00:0f.0: reg 0x14: [io 0x6100-0x61ff]
[ 0.102351] pci 0000:00:0f.0: reg 0x18: [io 0x6200-0x623f]
[ 0.102622] pci 0000:00:0f.0: reg 0x1c: [io 0x0000-0x001f]
[ 0.102900] pci 0000:00:0f.0: reg 0x20: [io 0x9d00-0x9d7f]
[ 0.103197] pci 0000:00:0f.0: reg 0x24: [io 0x9c00-0x9c3f]
[ 0.104312] pci 0000:00:0f.2: [1022:209a] type 00 class 0x010180
[ 0.105366] pci 0000:00:0f.2: reg 0x20: [io 0xff00-0xff0f]
[ 0.106551] pci 0000:00:0f.3: [1022:2093] type 00 class 0x040100
[ 0.106838] pci 0000:00:0f.3: reg 0x10: [io 0xfe00-0xfe7f]
[ 0.108760] pci 0000:00:0f.4: [1022:2094] type 00 class 0x0c0310
[ 0.109215] pci 0000:00:0f.4: reg 0x10: [mem 0xefffd000-0xefffdfff]
[ 0.110768] pci 0000:00:0f.4: PME# supported from D0 D3hot D3cold
[ 0.111744] pci 0000:00:0f.5: [1022:2095] type 00 class 0x0c0320
[ 0.112177] pci 0000:00:0f.5: reg 0x10: [mem 0xefffc000-0xefffcfff]
[ 0.113666] pci 0000:00:0f.5: PME# supported from D0 D3hot D3cold
[ 0.114525] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 0.115179] PCI: pci_cache_line_size set to 32 bytes
[ 0.115643] e820: reserve RAM buffer [mem 0x0009e800-0x0009ffff]
[ 0.115663] e820: reserve RAM buffer [mem 0x1f7b0000-0x1fffffff]
[ 0.117858] Switched to clocksource pit
[ 0.161731] pnp: PnP ACPI: disabled
[ 0.161824] PnPBIOS: Scanning system for PnP BIOS support...
[ 0.162218] PnPBIOS: Found PnP BIOS installation structure at 0xc00faec0
[ 0.162316] PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xaef0, dseg
0xf0000
[ 0.162578] pnp 00:00: [irq 2]
[ 0.162602] pnp 00:00: [io 0x0020-0x0021]
[ 0.162624] pnp 00:00: [io 0x00a0-0x00a1]
[ 0.162979] pnp 00:00: Plug and Play BIOS device, IDs PNP0000 (active)
[ 0.163062] pnp 00:01: [dma 4]
[ 0.163084] pnp 00:01: [io 0x0000-0x000f]
[ 0.163106] pnp 00:01: [io 0x0081-0x0083]
[ 0.163127] pnp 00:01: [io 0x0087]
[ 0.163208] pnp 00:01: [io 0x0089-0x008b]
[ 0.163230] pnp 00:01: [io 0x008f-0x0091]
[ 0.163252] pnp 00:01: [io 0x00c0-0x00df]
[ 0.163590] pnp 00:01: Plug and Play BIOS device, IDs PNP0200 (active)
[ 0.163671] pnp 00:02: [irq 0]
[ 0.163693] pnp 00:02: [io 0x0040-0x0043]
[ 0.164010] pnp 00:02: Plug and Play BIOS device, IDs PNP0100 (active)
[ 0.164081] pnp 00:03: [irq 8]
[ 0.164103] pnp 00:03: [io 0x0070-0x0071]
[ 0.164495] pnp 00:03: Plug and Play BIOS device, IDs PNP0b00 (active)
[ 0.164570] pnp 00:04: [irq 1]
[ 0.164591] pnp 00:04: [io 0x0060]
[ 0.164612] pnp 00:04: [io 0x0064]
[ 0.164928] pnp 00:04: Plug and Play BIOS device, IDs PNP0303 (active)
[ 0.165005] pnp 00:05: [io 0x0061]
[ 0.165415] pnp 00:05: Plug and Play BIOS device, IDs PNP0800 (active)
[ 0.165492] pnp 00:06: [irq 13]
[ 0.165514] pnp 00:06: [io 0x00f0-0x00ff]
[ 0.165841] pnp 00:06: Plug and Play BIOS device, IDs PNP0c04 (active)
[ 0.165929] pnp 00:07: [mem 0x00000000-0x0009ffff]
[ 0.165952] pnp 00:07: [mem 0xfffc0000-0xffffffff]
[ 0.165974] pnp 00:07: [mem 0xfee00000-0xfee0ffff]
[ 0.165996] pnp 00:07: [mem 0x00100000-0x00ffffff]
[ 0.166502] system 00:07: [mem 0x00000000-0x0009ffff] could not be
reserved
[ 0.166616] system 00:07: [mem 0xfffc0000-0xffffffff] could not be
reserved
[ 0.166721] system 00:07: [mem 0xfee00000-0xfee0ffff] has been reserved
[ 0.166824] system 00:07: [mem 0x00100000-0x00ffffff] could not be
reserved
[ 0.166930] system 00:07: Plug and Play BIOS device, IDs PNP0c01 (active)
[ 0.167021] pnp 00:08: [mem 0x000e0000-0x000effff]
[ 0.167044] pnp 00:08: [mem 0x000f0000-0x000f3fff]
[ 0.167067] pnp 00:08: [mem 0x000f4000-0x000f7fff]
[ 0.167089] pnp 00:08: [mem 0x000f8000-0x000fbfff]
[ 0.167111] pnp 00:08: [mem 0x000fc000-0x000fffff]
[ 0.167597] system 00:08: [mem 0x000e0000-0x000effff] has been reserved
[ 0.167706] system 00:08: [mem 0x000f0000-0x000f3fff] could not be
reserved
[ 0.167819] system 00:08: [mem 0x000f4000-0x000f7fff] could not be
reserved
[ 0.167924] system 00:08: [mem 0x000f8000-0x000fbfff] could not be
reserved
[ 0.168029] system 00:08: [mem 0x000fc000-0x000fffff] could not be
reserved
[ 0.168217] system 00:08: Plug and Play BIOS device, IDs PNP0c02 (active)
[ 0.168301] pnp 00:09: [io 0x04d0-0x04d1]
[ 0.168323] pnp 00:09: [io 0x0cf8-0x0cff]
[ 0.168345] pnp 00:09: [io 0x0480-0x048f]
[ 0.168677] pnp 00:09: Plug and Play BIOS device, IDs PNP0a03 (active)
[ 0.168847] pnp 00:0b: [irq 4]
[ 0.168870] pnp 00:0b: [io 0x03f8-0x03ff]
[ 0.169338] pnp 00:0b: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.169524] pnp 00:0d: [irq 7]
[ 0.169546] pnp 00:0d: [io 0x03bc-0x03bf]
[ 0.169568] pnp 00:0d: [io 0x07bc-0x07bf]
[ 0.169972] pnp 00:0d: Plug and Play BIOS device, IDs PNP0400 (active)
[ 0.170219] pnp 00:0f: [irq 3]
[ 0.170242] pnp 00:0f: [io 0x02f8-0x02ff]
[ 0.170641] pnp 00:0f: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.170790] pnp 00:12: [irq 4294967295 disabled]
[ 0.170814] pnp 00:12: [io 0x03e8-0x03ef]
[ 0.171321] pnp 00:12: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.171458] pnp 00:13: [irq 4294967295 disabled]
[ 0.171481] pnp 00:13: [io 0x02e8-0x02ef]
[ 0.171857] pnp 00:13: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.172000] pnp 00:14: [irq 4294967295 disabled]
[ 0.172022] pnp 00:14: [io 0x04e0-0x04e7]
[ 0.172518] pnp 00:14: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.172674] pnp 00:15: [irq 4294967295 disabled]
[ 0.172697] pnp 00:15: [io 0x04e8-0x04ef]
[ 0.173091] pnp 00:15: Plug and Play BIOS device, IDs PNP0501 (active)
[ 0.173207] PnPBIOS: 17 nodes reported by PnP BIOS; 17 recorded by driver
[ 0.200248] pci 0000:00:0f.0: BAR 3: assigned [io 0x1000-0x101f]
[ 0.200436] pci_bus 0000:00: resource 4 [io 0x0000-0xffff]
[ 0.200460] pci_bus 0000:00: resource 5 [mem 0x00000000-0xffffffff]
[ 0.200683] NET: Registered protocol family 2
[ 0.201779] TCP established hash table entries: 4096 (order: 2, 16384
bytes)
[ 0.201971] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.202256] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.202414] TCP: reno registered
[ 0.202500] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.202604] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.203022] NET: Registered protocol family 1
[ 0.203623] RPC: Registered named UNIX socket transport module.
[ 0.203714] RPC: Registered udp transport module.
[ 0.203793] RPC: Registered tcp transport module.
[ 0.203873] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.204058] pci 0000:00:01.1: Boot video device
[ 0.266607] PCI: CLS 32 bytes, default 32
[ 0.270436] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.323035] NFS: Registering the id_resolver key type
[ 0.323328] Key type id_resolver registered
[ 0.323408] Key type id_legacy registered
[ 0.323500] Installing knfsd (copyright (C) 1996 okir-***@public.gmane.org).
[ 0.324606] ROMFS MTD (C) 2007 Red Hat, Inc.
[ 0.325355] msgmni has been set to 981
[ 0.328298] Block layer SCSI generic (bsg) driver version 0.4 loaded
(major 253)
[ 0.328411] io scheduler noop registered
[ 0.328489] io scheduler deadline registered
[ 0.329292] io scheduler cfq registered (default)
[ 0.330414] isapnp: Scanning for PnP cards...
[ 0.690088] isapnp: No Plug & Play device found
[ 0.854748] Serial: 8250/16550 driver, 64 ports, IRQ sharing enabled
[ 0.856536] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200)
is a 16550A
[ 0.858299] 00:0f: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200)
is a 16550A
[ 0.860969] 00:12: ttyS2 at I/O 0x3e8 (irq = -1, base_baud = 115200)
is a 16550A
[ 0.862575] 00:13: ttyS3 at I/O 0x2e8 (irq = -1, base_baud = 115200)
is a 16550A
[ 0.864168] 00:14: ttyS4 at I/O 0x4e0 (irq = -1, base_baud = 115200)
is a 16550A
[ 0.865705] 00:15: ttyS5 at I/O 0x4e8 (irq = -1, base_baud = 115200)
is a 16550A
[ 0.914128] AMD Geode RNG detected
[ 0.915279] parport0: PC-style at 0x3bc, irq 7 [PCSPP(,...)]
[ 0.935949] brd: module loaded
[ 0.946422] loop: module loaded
[ 0.947165] nbd: registered device at major 43
[ 0.969602] Uniform Multi-Platform E-IDE driver
[ 0.975606] scsi0 : pata_cs5536
[ 0.977446] scsi1 : pata_cs5536
[ 0.978347] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00
irq 14
[ 0.978446] ata2: DUMMY
[ 0.979562] tun: Universal TUN/TAP device driver, 1.6
[ 0.979650] tun: (C) 1999-2004 Max Krasnyansky <maxk-zC7DfRvBq/JWk0Htik3J/***@public.gmane.org>
[ 0.980210] 8139too: 8139too Fast Ethernet driver 0.9.28
[ 0.981986] 8139too 0000:00:06.0 eth0: RealTek RTL8139 at 0xdffc2000,
00:07:32:26:05:78, IRQ 11
[ 0.983858] 8139too 0000:00:09.0 eth1: RealTek RTL8139 at 0xdffc4000,
00:07:32:26:05:77, IRQ 11
[ 0.984389] PPP generic driver version 2.4.2
[ 0.985094] PPP BSD Compression module registered
[ 0.985179] PPP Deflate Compression module registered
[ 0.985568] usbcore: registered new interface driver ax88179_178a
[ 0.985997] usbcore: registered new interface driver cdc_ncm
[ 0.986649] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.986743] ehci-pci: EHCI PCI platform driver
[ 0.987335] ehci-pci 0000:00:0f.5: EHCI Host Controller
[ 0.987462] ehci-pci 0000:00:0f.5: new USB bus registered, assigned
bus number 1
[ 0.987872] ehci-pci 0000:00:0f.5: irq 11, io mem 0xefffc000
[ 0.993109] ehci-pci 0000:00:0f.5: USB 2.0 started, EHCI 1.00
[ 0.994781] hub 1-0:1.0: USB hub found
[ 0.994915] hub 1-0:1.0: 4 ports detected
[ 0.996159] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.996277] ohci-pci: OHCI PCI platform driver
[ 0.996728] ohci-pci 0000:00:0f.4: OHCI PCI host controller
[ 0.996849] ohci-pci 0000:00:0f.4: new USB bus registered, assigned
bus number 2
[ 0.997127] ohci-pci 0000:00:0f.4: irq 11, io mem 0xefffd000
[ 1.055607] hub 2-0:1.0: USB hub found
[ 1.055744] hub 2-0:1.0: 4 ports detected
[ 1.057324] usbcore: registered new interface driver cdc_acm
[ 1.057416] cdc_acm: USB Abstract Control Model driver for USB modems
and ISDN adapters
[ 1.057972] usbcore: registered new interface driver usb-storage
[ 1.058398] usbcore: registered new interface driver ums-alauda
[ 1.059334] usbcore: registered new interface driver ums-cypress
[ 1.059693] usbcore: registered new interface driver ums-datafab
[ 1.060143] usbcore: registered new interface driver ums-freecom
[ 1.060495] usbcore: registered new interface driver ums-isd200
[ 1.060849] usbcore: registered new interface driver ums-jumpshot
[ 1.061285] usbcore: registered new interface driver ums-karma
[ 1.061631] usbcore: registered new interface driver ums-onetouch
[ 1.061979] usbcore: registered new interface driver ums-sddr09
[ 1.062439] usbcore: registered new interface driver ums-sddr55
[ 1.062784] usbcore: registered new interface driver ums-usbat
[ 1.063580] usbcore: registered new interface driver usbserial
[ 1.063948] usbcore: registered new interface driver usbserial_generic
[ 1.064425] usbserial: USB Serial support registered for generic
[ 1.064780] usbcore: registered new interface driver ftdi_sio
[ 1.065229] usbserial: USB Serial support registered for FTDI USB
Serial Device
[ 1.065913] usbcore: registered new interface driver adutux
[ 1.066401] usbcore: registered new interface driver emi26 - firmware
loader
[ 1.066774] usbcore: registered new interface driver emi62 - firmware
loader
[ 1.067258] usbcore: registered new interface driver uss720
[ 1.067346] uss720: v0.6:USB Parport Cable driver for Cables using
the Lucent Technologies USS720 Chip
[ 1.067456] uss720: NOTE: this is a special purpose driver to allow
nonstandard
[ 1.067555] uss720: protocols (eg. bitbang) over USS720 usb to
parallel cables
[ 1.067653] uss720: If you just want to connect to a printer, use
usblp instead
[ 1.068130] usbcore: registered new interface driver usbsevseg
[ 1.069123] i8042: PNP: PS/2 Controller [PNP0303] at 0x60,0x64 irq 1
[ 1.069215] i8042: PNP: PS/2 appears to have AUX port disabled, if
this is incorrect please boot with i8042.nopnp
[ 1.069876] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.071398] mousedev: PS/2 mouse device common for all mice
[ 1.072649] input: gpio-keys-polled as
/devices/platform/gpio-keys-polled/input/input0
[ 1.074783] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[ 1.074938] rtc_cmos 00:03: alarms up to one day, 114 bytes nvram
[ 1.075397] i2c /dev entries driver
[ 1.075731] it87: Found IT8712F chip at 0x290, revision 8
[ 1.075823] it87: VID is disabled (pins used for GPIO)
[ 1.076297] ACPI Exception: AE_BAD_PARAMETER, Thread 3737403392 could
not acquire Mutex [0x1] (20131218/utmutex-285)
[ 1.076879] it87 it87.656: Detected broken BIOS defaults, disabling
PWM interface
[ 1.078470] sdhci: Secure Digital Host Controller Interface driver
[ 1.078561] sdhci: Copyright(c) Pierre Ossman
[ 1.078956] wbsd: Winbond W83L51xD SD/MMC card interface driver
[ 1.079134] wbsd: Copyright(c) Pierre Ossman
[ 1.081584] No iBFT detected.
[ 1.082247] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.088254] usbcore: registered new interface driver usbhid
[ 1.088347] usbhid: USB HID core driver
[ 1.104907] usbcore: registered new interface driver snd-usb-audio
[ 1.106639] netem: version 1.3
[ 1.106723] Netfilter messages via NETLINK v0.30.
[ 1.106893] nf_conntrack version 0.5.0 (7850 buckets, 31400 max)
[ 1.108754] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.109068] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
[ 1.109244] arp_tables: (C) 2002 David S. Miller
[ 1.109401] TCP: bic registered
[ 1.109474] TCP: cubic registered
[ 1.109551] TCP: westwood registered
[ 1.109625] TCP: hybla registered
[ 1.109698] TCP: htcp registered
[ 1.112866] NET: Registered protocol family 10
[ 1.115319] sit: IPv6 over IPv4 tunneling driver
[ 1.117189] NET: Registered protocol family 17
[ 1.117428] Bridge firewalling registered
[ 1.117605] 8021q: 802.1Q VLAN Support v1.8
[ 1.117748] Key type dns_resolver registered
[ 1.119695] registered taskstats version 1
[ 1.121450] rtc_cmos 00:03: setting system clock to 2007-01-01
06:14:13 UTC (1167632053)
[ 1.121901] ALSA device list:
[ 1.121974] #0: Dummy 1
[ 1.122119] #1: CS5535 Audio cs5535audio at 0xfe00, irq 11
[ 1.133431] ata1.00: CFA: CactusFlashCard, 100511a, max UDMA/66
[ 1.133529] ata1.00: 2046240 sectors, multi 1: LBA
[ 1.133629] ata1.00: limited to UDMA/33 due to 40-wire cable
[ 1.137299] ata1.00: configured for UDMA/33
[ 1.148511] scsi 0:0:0:0: Direct-Access ATA CactusFlashCard 1005
PQ: 0 ANSI: 5
[ 1.150580] sd 0:0:0:0: [sda] 2046240 512-byte logical blocks: (1.04
GB/999 MiB)
[ 1.151271] sd 0:0:0:0: [sda] Write Protect is off
[ 1.151366] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1.151589] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[ 1.154414] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.154912] sda: sda1 sda2 sda3 sda4
[ 1.159583] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.160617] EXT3-fs (sda2): error: couldn't mount because of
unsupported optional features (240)
[ 1.161192] EXT2-fs (sda2): error: couldn't mount because of
unsupported optional features (240)
[ 1.166416] EXT4-fs (sda2): warning: mounting unchecked fs, running
e2fsck is recommended
[ 1.200434] EXT4-fs (sda2): mounted filesystem without journal. Opts:
(null)
[ 1.200571] VFS: Mounted root (ext4 filesystem) on device 8:2.
[ 1.201936] Freeing unused kernel memory: 400K (c173e000 - c17a2000)
[ 1.269070] Switched to clocksource tsc
[ 1.783668] random: nonblocking pool is initialized
[ 1.813313] usb 2-1: new full-speed USB device number 2 using ohci-pci
[ 2.016424] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[ 2.016713] usb 2-1: Detected FT-X
[ 2.016796] usb 2-1: Number of endpoints 2
[ 2.016881] usb 2-1: Endpoint 1 MaxPacketSize 64
[ 2.016991] usb 2-1: Endpoint 2 MaxPacketSize 64
[ 2.017145] usb 2-1: Setting MaxPacketSize 64
[ 2.020359] usb 2-1: FTDI USB Serial Device converter now attached to
ttyUSB0
[ 4.806252] EXT4-fs (sda2): re-mounted. Opts: (null)
[ 4.921841] EXT4-fs (sda3): mounted filesystem without journal. Opts:
(null)
[ 4.925078] EXT4-fs (sda4): mounted filesystem without journal. Opts:
(null)
[ 6.061225] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April
27, 2011)
[ 6.061347] bonding: MII link monitoring set to 5 ms
[ 11.461771] 8139too 0000:00:06.0 eth0: link up, 100Mbps, full-duplex,
lpa 0x45E1
[ 11.534363] 8139too 0000:00:09.0 eth1: link up, 100Mbps, full-duplex,
lpa 0xC1E1
[ 11.557624] 8139too 0000:00:09.0 eth1: link up, 100Mbps, full-duplex,
lpa 0xC1E1
[ 30.137633] snd-malloc: invalid device type 0
[ 30.164464] snd-malloc: invalid device type 0
[ 30.394282] snd-malloc: invalid device type 0
[ 30.398888] snd-malloc: invalid device type 0
[ 30.413312] snd-malloc: invalid device type 0
[ 30.420523] snd-malloc: invalid device type 0
[ 120.272143] INFO: task testseriale:2574 blocked for more than 60 seconds.
[ 120.272256] Not tainted 3.14.0-*******+ #10
[ 120.272336] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 120.272443] testseriale D 00000000 0 2574 2074 0x00000000
[ 120.272619] defbfce8 00000082 c152ef4d 00000000 00000001 c104ee26
defbe000 c16df4e0
[ 120.273093] dc54b540 c015dc00 defbfcb8 c135d348 fffffffe 00000246
dc49e880 c015dc00
[ 120.273525] c1738980 defbfcd8 c13447a3 c0275c00 c104ee26 defbfcd0
c12d4e42 defbfcd8
[ 120.273956] Call Trace:
[ 120.274089] [<c152ef4d>] ? schedule_timeout+0xfd/0x1bb
[ 120.274192] [<c104ee26>] ? preempt_count_sub+0xb/0xb1
[ 120.274291] [<c135d348>] ? ohci_urb_dequeue+0x72/0xac
[ 120.274394] [<c13447a3>] ? unlink1+0x29/0xf7
[ 120.274486] [<c104ee26>] ? preempt_count_sub+0xb/0xb1
[ 120.274586] [<c12d4e42>] ? put_device+0x14/0x16
[ 120.274678] [<c133cf06>] ? usb_put_dev+0x14/0x16
[ 120.274774] [<c152fa14>] schedule+0x22/0x54
[ 120.274867] [<c1346658>] usb_kill_urb+0x4b/0x7a
[ 120.274963] [<c105594e>] ? finish_wait+0x68/0x68
[ 120.276580] [<c13469bb>] usb_start_wait_urb+0xa3/0xb3
[ 120.276694] [<c1346a6e>] usb_control_msg+0xa3/0xcd
[ 120.276794] [<c12aed0b>] ? n_tty_set_termios+0x156/0x34e
[ 120.276896] [<c1372ac7>] ftdi_open+0x64/0x84
[ 120.276991] [<c136e29c>] serial_port_activate+0x4c/0x71
[ 120.277493] [<c12b3c16>] tty_port_open+0x76/0xb7
[ 120.277591] [<c136e733>] serial_open+0x1d/0x20
[ 120.277682] [<c12acdd2>] tty_open+0x13f/0x54b
[ 120.277779] [<c10d5155>] chrdev_open+0xa2/0x17f
[ 120.277878] [<c10cfeea>] do_dentry_open.isra.14+0x16e/0x242
[ 120.277974] [<c10d50b3>] ? cdev_put+0x1f/0x1f
[ 120.278476] [<c10d0061>] finish_open+0x1b/0x27
[ 120.278577] [<c10dcdba>] do_last.isra.58+0x4db/0xb9c
[ 120.278675] [<c12b2dd4>] ? __tty_buffer_request_room+0xe/0xfd
[ 120.278782] [<c10dd7c6>] path_openat+0x34b/0x562
[ 120.278885] [<c10de781>] do_filp_open+0x31/0x7b
[ 120.279452] [<c10d0fb6>] do_sys_open+0x11c/0x1ea
[ 120.279557] [<c10d10a4>] SyS_open+0x20/0x22
[ 120.279648] [<c1531b40>] syscall_call+0x7/0xb

======================================================
Post by Alan Stern
Some OHCI controllers (most notably those made by NVIDIA, but others
too) sometimes lose track of completed Transfer Descriptors. When a TD
completes, the controller is supposed to add it to the start of the
Done Queue, to let the driver know the transfer is finished. The buggy
controllers occasionally fail to do this.
ohci-hcd already contains a couple of ad-hoc mechanisms for dealing
with these failures. One of the quirk handlers (for Compaq ZF Micro)
looks for lost TDs on an interrupt endpoint. In addition, the driver
recognizes that whenever a TD is on the Done Queue, all the earlier TDs
for the same endpoint must have completed as well, even if they aren't
on the Done Queue.
Still, these mechanisms don't handle all the possible scenarios. Lost
TDs have been observed for non-interrupt endpoints, and if the lost TD
is the last one in a transfer then there might not be anything
following it in the Done Queue.
This patch series replaces the ad-hoc mechanisms with a general
approach. A new I/O watchdog routine runs every 200 ms as long as
there are any active URBs. The routine scans the lists of TDs, looking
for any which have completed but haven't shown up in the Done Queue,
and takes care of them. (This will add a small amount of overhead, but
OHCI has never been high-throughput.) The routine also checks for
controllers malfunctioning so badly that they are unusable, and
declares them dead.
Making these changes requires a certain amount of care, because the
controller might add a TD to the Done Queue any time up to a
millisecond after the TD completes. The watchdog routine has to make
sure it doesn't race with the hardware, and the done list (the driver's
equivalent of the hardware's Done Queue) has to be treated differently
from the way it is now. Also, there will be two pathways by which URBs
may complete: the hardware IRQ handler and the watchdog routine. This
requires the driver to make sure that URB completions are always
single-threaded.
The first four patches in this series remove the ad-hoc zfmicro quirk
and make other preliminary adjustments. The last two patches add the
I/O watchdog and add to it a check for a non-updating frame counter
(another type of hardware problem observed in the field).
In the past, users have reported controller failures like these that
ended up hanging the kernel's USB stack. With these changes in place,
the hardware problems will show up as graceful failures, leaving the
rest of the USB subsystem intact.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Alan Stern
2014-10-22 17:43:10 UTC
Permalink
Raw Message
Post by Matteo Fortini
I (partly) reopen this issue because it fixed the problem we had (lost
TDs lead to random process lockups on FTDI serial), but we're now seeing
another kind of lockup which is also USB-related on the same board, just
at the time we close() the serial port.
We enabled USB debug to gather all available information.
Thank you for any comment
[ 0.000000] Linux version 3.14.0-xxxxxxxxx+ () (gcc version 4.9.1
(Debian 4.9.1-16) ) #10 PREEMPT Wed Oct 22 11:49:42 CEST 2014
Does it work any better if you use a 3.17 kernel?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Matteo Fortini
2014-10-22 21:32:01 UTC
Permalink
Raw Message
Good question,
I'll get back to you as soon as I get to build a 3.17 tree rebasing
the changes we need for our board to behave properly.

Thanks,
Matteo
Post by Alan Stern
Post by Matteo Fortini
I (partly) reopen this issue because it fixed the problem we had (lost
TDs lead to random process lockups on FTDI serial), but we're now seeing
another kind of lockup which is also USB-related on the same board, just
at the time we close() the serial port.
We enabled USB debug to gather all available information.
Thank you for any comment
[ 0.000000] Linux version 3.14.0-xxxxxxxxx+ () (gcc version 4.9.1
(Debian 4.9.1-16) ) #10 PREEMPT Wed Oct 22 11:49:42 CEST 2014
Does it work any better if you use a 3.17 kernel?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...