* [PATCH] USB: ftdi_sio: Remove tty->low_latency.
@ 2009-09-24 15:40 Johan Hovold
2009-09-24 19:03 ` Oliver Neukum
0 siblings, 1 reply; 40+ messages in thread
From: Johan Hovold @ 2009-09-24 15:40 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb; +Cc: Alan Cox, Andrew Morton, linux-kernel
Fixes tty_flip_buffer_push being called from hard interrupt context with
low_latency set.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
Hi,
I keep running into:
BUG: sleeping function called from invalid context at kernel/mutex.c:280
in both the throttle and echo paths (see traces below).
Is there a reason why this was not fixed in ftdi_sio (and whiteheat?)
along with the other drivers?
Regards,
Johan Hovold
Call Trace:
[<c1035b6d>] ? do_softirq+0x5d/0x70
[<c1028091>] __might_sleep+0x101/0x130
[<c133db0e>] mutex_lock_nested+0x1e/0x330
[<c1183527>] ? n_tty_receive_buf+0x437/0x1210
[<c118495b>] tty_throttle+0x1b/0x50
[<c11834d7>] n_tty_receive_buf+0x3e7/0x1210
[<c11865f4>] ? flush_to_ldisc+0x34/0x1c0
[<c1053eeb>] ? trace_hardirqs_off+0xb/0x10
[<c11866a5>] flush_to_ldisc+0xe5/0x1c0
[<c11867eb>] tty_flip_buffer_push+0x6b/0x80
[<f922cea7>] ftdi_process_read+0x447/0x740 [ftdi_sio]
[<f922d2bb>] ftdi_read_bulk_callback+0x11b/0x270 [ftdi_sio]
[<c1237880>] ? usb_hcd_unlink_urb_from_ep+0x10/0x40
[<c1237b46>] usb_hcd_giveback_urb+0x36/0x90
[<c124bf96>] uhci_giveback_urb+0x86/0x230
[<c124bda7>] ? uhci_free_td+0x87/0x90
[<c124c60d>] uhci_scan_schedule+0x3ad/0x9f0
[<c124e873>] uhci_irq+0x63/0x160
[<c12376cd>] usb_hcd_irq+0x2d/0x90
[<c106411e>] handle_IRQ_event+0x2e/0xc0
[<c1065ed2>] handle_fasteoi_irq+0x62/0xd0
[<c1005a18>] handle_irq+0x18/0x30
[<c1004f2a>] do_IRQ+0x4a/0xc0
[<c104d2d1>] ? getnstimeofday+0x51/0x110
[<c100356e>] common_interrupt+0x2e/0x34
[<c105007b>] ? __timecompare_update+0x11b/0x140
[<c1173e4a>] ? acpi_idle_enter_simple+0x12b/0x156
[<c1268c9e>] cpuidle_idle_call+0x7e/0xe0
[<c1001e6c>] cpu_idle+0x4c/0xa0
[<c1339587>] start_secondary+0x1c3/0x1ca
=================================
[ INFO: inconsistent lock state ]
2.6.31-gkh-1 #35
---------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&tty->termios_mutex){?.+...}, at: [<c118495b>] tty_throttle+0x1b/0x50
and
[<c1035b6d>] ? do_softirq+0x5d/0x70
[<c1028091>] __might_sleep+0x101/0x130
[<c133db0e>] mutex_lock_nested+0x1e/0x330
[<c100d2fb>] ? save_stack_trace+0x2b/0x50
[<c1053d3b>] ? save_trace+0x3b/0xb0
[<c118185e>] echo_set_canon_col+0x1e/0x50
[<c1183bf6>] n_tty_receive_buf+0xb06/0x1210
[<c108d59b>] ? cache_alloc_refill+0x8b/0x4f0
[<c11865f4>] ? flush_to_ldisc+0x34/0x1c0
[<c1053eeb>] ? trace_hardirqs_off+0xb/0x10
[<c11866a5>] flush_to_ldisc+0xe5/0x1c0
[<c11867eb>] tty_flip_buffer_push+0x6b/0x80
[<f82a9ea7>] ftdi_process_read+0x447/0x740 [ftdi_sio]
[<f82aa2bb>] ftdi_read_bulk_callback+0x11b/0x270 [ftdi_sio]
[<c1237880>] ? usb_hcd_unlink_urb_from_ep+0x10/0x40
[<c1237b46>] usb_hcd_giveback_urb+0x36/0x90
[<c124bf96>] uhci_giveback_urb+0x86/0x230
[<c124bda7>] ? uhci_free_td+0x87/0x90
[<c124c60d>] uhci_scan_schedule+0x3ad/0x9f0
[<c124e873>] uhci_irq+0x63/0x160
[<c12376cd>] usb_hcd_irq+0x2d/0x90
[<c106411e>] handle_IRQ_event+0x2e/0xc0
[<c1065ed2>] handle_fasteoi_irq+0x62/0xd0
[<c1005a18>] handle_irq+0x18/0x30
[<c1004f2a>] do_IRQ+0x4a/0xc0
[<c104d2d1>] ? getnstimeofday+0x51/0x110
[<c100356e>] common_interrupt+0x2e/0x34
[<c105007b>] ? __timecompare_update+0x11b/0x140
[<c1173e4a>] ? acpi_idle_enter_simple+0x12b/0x156
[<c1268c9e>] cpuidle_idle_call+0x7e/0xe0
[<c1001e6c>] cpu_idle+0x4c/0xa0
[<c1339587>] start_secondary+0x1c3/0x1ca
Sep 22 12:10:04 vostro kernel:
=================================
[ INFO: inconsistent lock state ]
2.6.31-gkh-1 #35
---------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&tty->echo_lock){?.+...}, at: [<c118185e>] echo_set_canon_col+0x1e/0x50
drivers/usb/serial/ftdi_sio.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 4f883b1..0ac2c2f 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1234,7 +1234,6 @@ static int set_serial_info(struct tty_struct *tty,
(new_serial.flags & ASYNC_FLAGS));
priv->custom_divisor = new_serial.custom_divisor;
- tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
write_latency_timer(port);
check_and_exit:
@@ -1704,9 +1703,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
priv->rx_bytes = 0;
spin_unlock_irqrestore(&priv->rx_lock, flags);
- if (tty)
- tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-
write_latency_timer(port);
/* No error checking for this (will get errors later anyway) */
--
1.6.4.2
^ permalink raw reply related [flat|nested] 40+ messages in thread* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-24 15:40 [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold @ 2009-09-24 19:03 ` Oliver Neukum 2009-09-24 19:21 ` Alan Cox 0 siblings, 1 reply; 40+ messages in thread From: Oliver Neukum @ 2009-09-24 19:03 UTC (permalink / raw) To: Johan Hovold Cc: Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel Am Donnerstag, 24. September 2009 17:40:23 schrieb Johan Hovold: > Is there a reason why this was not fixed in ftdi_sio (and whiteheat?) > along with the other drivers? No good reason. They escaped my grep pattern. Mea culpa. Regards Oliver ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-24 19:03 ` Oliver Neukum @ 2009-09-24 19:21 ` Alan Cox 2009-09-24 21:15 ` Johan Hovold 0 siblings, 1 reply; 40+ messages in thread From: Alan Cox @ 2009-09-24 19:21 UTC (permalink / raw) To: Oliver Neukum Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Thu, 24 Sep 2009 21:03:47 +0200 Oliver Neukum <oliver@neukum.org> wrote: > Am Donnerstag, 24. September 2009 17:40:23 schrieb Johan Hovold: > > Is there a reason why this was not fixed in ftdi_sio (and whiteheat?) > > along with the other drivers? > > No good reason. They escaped my grep pattern. Mea culpa. ftdi_sio is correct with low_latency set as it uses a work queue to process the packets received. Alan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-24 19:21 ` Alan Cox @ 2009-09-24 21:15 ` Johan Hovold 2009-09-25 17:46 ` Michael Trimarchi 0 siblings, 1 reply; 40+ messages in thread From: Johan Hovold @ 2009-09-24 21:15 UTC (permalink / raw) To: Alan Cox Cc: Oliver Neukum, Johan Hovold, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Thu, Sep 24, 2009 at 08:21:07PM +0100, Alan Cox wrote: > On Thu, 24 Sep 2009 21:03:47 +0200 > Oliver Neukum <oliver@neukum.org> wrote: > > Am Donnerstag, 24. September 2009 17:40:23 schrieb Johan Hovold: > > > Is there a reason why this was not fixed in ftdi_sio (and whiteheat?) > > > along with the other drivers? > > No good reason. They escaped my grep pattern. Mea culpa. > ftdi_sio is correct with low_latency set as it uses a work queue to > process the packets received. AFAICT it only uses the work queue if tty_buffer_request_room fails to allocate enough space. This being the exception, the completion handler normally processes the packets in interrupt context and this is where I get my lockdep traces (and it happens every time I hit the echo or throttle paths). /Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-24 21:15 ` Johan Hovold @ 2009-09-25 17:46 ` Michael Trimarchi 2009-09-29 14:55 ` Johan Hovold 0 siblings, 1 reply; 40+ messages in thread From: Michael Trimarchi @ 2009-09-25 17:46 UTC (permalink / raw) To: Johan Hovold Cc: Alan Cox, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel Johan Hovold wrote: > On Thu, Sep 24, 2009 at 08:21:07PM +0100, Alan Cox wrote: > >> On Thu, 24 Sep 2009 21:03:47 +0200 >> Oliver Neukum <oliver@neukum.org> wrote: >> > > >>> Am Donnerstag, 24. September 2009 17:40:23 schrieb Johan Hovold: >>> >>>> Is there a reason why this was not fixed in ftdi_sio (and whiteheat?) >>>> along with the other drivers? >>>> > > >>> No good reason. They escaped my grep pattern. Mea culpa. >>> > > >> ftdi_sio is correct with low_latency set as it uses a work queue to >> process the packets received. >> > > AFAICT it only uses the work queue if tty_buffer_request_room fails to > allocate enough space. This being the exception, the completion > handler normally processes the packets in interrupt context and this is > where I get my lockdep traces (and it happens every time I hit the echo > or throttle paths). > Hi, Using two urb, double buffering and schedule a tasklet to complete the the reading phase. The usb will use the other free urb during receiving process. I think remove tty_latency is not a good fix. Michael > /Johan > > -- > 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/ > > ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-25 17:46 ` Michael Trimarchi @ 2009-09-29 14:55 ` Johan Hovold 2009-09-29 22:52 ` Alan Cox 0 siblings, 1 reply; 40+ messages in thread From: Johan Hovold @ 2009-09-29 14:55 UTC (permalink / raw) To: Michael Trimarchi, Alan Cox Cc: Johan Hovold, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Fri, Sep 25, 2009 at 07:46:51PM +0200, Michael Trimarchi wrote: > Johan Hovold wrote: > > On Thu, Sep 24, 2009 at 08:21:07PM +0100, Alan Cox wrote: > >> ftdi_sio is correct with low_latency set as it uses a work queue to > >> process the packets received. > >> > > AFAICT it only uses the work queue if tty_buffer_request_room fails to > > allocate enough space. This being the exception, the completion > > handler normally processes the packets in interrupt context and this is > > where I get my lockdep traces (and it happens every time I hit the echo > > or throttle paths). > > > Using two urb, double buffering and schedule a tasklet to complete the > the reading phase. The usb will use the other free urb during receiving > process. > I think remove tty_latency is not a good fix. What do you say, Alan? Should ftdi_sio be rewritten so that it actually defers all processing, or should low_latency go? As it stands today ftdi_sio does indeed call tty_flip_buffer_push from interrupt context with low_latency set and that is obviously incorrect, right? Regards, Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-29 14:55 ` Johan Hovold @ 2009-09-29 22:52 ` Alan Cox 2009-09-30 6:33 ` Michael Trimarchi ` (2 more replies) 0 siblings, 3 replies; 40+ messages in thread From: Alan Cox @ 2009-09-29 22:52 UTC (permalink / raw) To: Johan Hovold Cc: Michael Trimarchi, Johan Hovold, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel > As it stands today ftdi_sio does indeed call tty_flip_buffer_push from > interrupt context with low_latency set and that is obviously incorrect, > right? It seems to do it from a work queue - or did I miss a case ? ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-29 22:52 ` Alan Cox @ 2009-09-30 6:33 ` Michael Trimarchi 2009-09-30 9:05 ` Johan Hovold 2009-10-02 2:52 ` Eric W. Biederman 2 siblings, 0 replies; 40+ messages in thread From: Michael Trimarchi @ 2009-09-30 6:33 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Andrew Morton, linux-kernel Alan Cox wrote: >> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from >> interrupt context with low_latency set and that is obviously incorrect, >> right? >> > > It seems to do it from a work queue - or did I miss a case ? > -- > 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/ > > usb_fill_bulk_urb(port->read_urb, dev, usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, ftdi_read_bulk_callback, port); (can be call in the interrupt context) ftdi_read_bulk_callback---> ftdi_process_read--> tty_flip_buffer_push(tty); Michael ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-29 22:52 ` Alan Cox 2009-09-30 6:33 ` Michael Trimarchi @ 2009-09-30 9:05 ` Johan Hovold 2009-10-02 2:52 ` Eric W. Biederman 2 siblings, 0 replies; 40+ messages in thread From: Johan Hovold @ 2009-09-30 9:05 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Michael Trimarchi, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Tue, Sep 29, 2009 at 11:52:32PM +0100, Alan Cox wrote: > > As it stands today ftdi_sio does indeed call tty_flip_buffer_push from > > interrupt context with low_latency set and that is obviously incorrect, > > right? > > It seems to do it from a work queue - or did I miss a case ? The function used for deferred work is actually called directly from ftdi_read_bulk_callback: ftdi_process_read(&priv->rx_work.work); It only gets scheduled on the work queue when unthrottled (or if tty_buffer_request_room(tty, length) < length before serial_throttle is called). So basically, unless throttled, it is always called from interrupt context. /Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-09-29 22:52 ` Alan Cox 2009-09-30 6:33 ` Michael Trimarchi 2009-09-30 9:05 ` Johan Hovold @ 2009-10-02 2:52 ` Eric W. Biederman 2009-10-02 8:47 ` Johan Hovold 2009-10-02 9:04 ` Alan Cox 2 siblings, 2 replies; 40+ messages in thread From: Eric W. Biederman @ 2009-10-02 2:52 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Michael Trimarchi, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel Alan Cox <alan@lxorguk.ukuu.org.uk> writes: >> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from >> interrupt context with low_latency set and that is obviously incorrect, >> right? > > It seems to do it from a work queue - or did I miss a case ? ftdi_sio crash quite regularly for me with 2.6.31. With a bunch of nasties like: BUG: scheduling while atomic: swapper/0/0x00010000 bad: scheduling from the idle thread! I don't know if I have a good backtrace as things scrolled away faster than they were captured but the code below looks like it may be. Eric BUG: scheduling while atomic: swapper/0/0x00010000 Modules linked in: nfsd lockd nfs_acl auth_rpcgss exportfs sco bridge stp bnep l2cap bluetooth sunrpc ipv6 cpufreq_ondemand powernow_k8 freq_table dm_mirror dm_region_hash dm_log dm_multipath dm_mod uinput kvm_amd kvm fuse xt_multiport iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 tun 8021q snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd amd64_edac_mod firewire_ohci firewire_core soundcore i2c_nforce2 k8temp sg edac_core hwmon pcspkr sata_sil24 pata_amd snd_page_alloc e1000e forcedeth crc_itu_t i2c_core ftdi_sio usbserial ata_generic pata_acpi sata_nv libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan] CPU 0: Modules linked in: nfsd lockd nfs_acl auth_rpcgss exportfs sco bridge stp bnep l2cap bluetooth sunrpc ipv6 cpufreq_ondemand powernow_k8 freq_table dm_mirror dm_region_hash dm_log dm_multipath dm_mod uinput kvm_amd kvm fuse xt_multiport iptable_nat ip_tables nf_nat x_tables nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 tun 8021q snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd amd64_edac_mod firewire_ohci firewire_core soundcore i2c_nforce2 k8temp sg edac_core hwmon pcspkr sata_sil24 pata_amd snd_page_alloc e1000e forcedeth crc_itu_t i2c_core ftdi_sio usbserial ata_generic pata_acpi sata_nv libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan] Pid: 0, comm: swapper Not tainted 2.6.31-185494.2008.AroraEbiederm.fc11.x86_64 #1 RIP: 0010:[<ffffffff8102c86c>] [<ffffffff8102c86c>] native_safe_halt+0x6/0x8 RSP: 0018:ffffffff81541e48 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffffff81541e48 RCX: 0000000003000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff81541e58 RBP: ffffffff8100c7ce R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: ffff880038d0fef8 R12: ffffffff81073a1f R13: ffffffff81541dd8 R14: ffffffff8105c8d7 R15: ffffffff81541e38 FS: 00007fe289d71910(0000) GS:ffff8800017ba000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000404070 CR3: 000000003b87d000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: [<ffffffff81014126>] ? default_idle+0x51/0x8b [<ffffffff81014265>] ? c1e_idle+0x105/0x120 [<ffffffff8100ae15>] ? cpu_idle+0xb0/0xf3 [<ffffffff81392135>] ? rest_init+0x79/0x8f [<ffffffff815c8fae>] ? start_kernel+0x3dc/0x3fd [<ffffffff815c82d4>] ? x86_64_start_reservations+0xbb/0xd6 [<ffffffff815c83f4>] ? x86_64_start_kernel+0x105/0x128 bad: scheduling from the idle thread! Pid: 0, comm: swapper Not tainted 2.6.31-185494.2008.AroraEbiederm.fc11.x86_64 #1 Call Trace: <IRQ> [<ffffffff81041261>] dequeue_task_idle+0x37/0x5a [<ffffffff81040a23>] dequeue_task+0xce/0xf0 [<ffffffff81040a7c>] deactivate_task+0x37/0x56 [<ffffffff813a4fb7>] schedule+0x13d/0x6f3 [<ffffffff81042b82>] ? enqueue_task_fair+0xdf/0x13c [<ffffffff810404df>] ? enqueue_task+0x6f/0x91 [<ffffffff813a5e87>] __mutex_lock_common+0x12f/0x1aa [<ffffffff813a5f29>] __mutex_lock_slowpath+0x27/0x3d [<ffffffff813a5c3d>] mutex_lock+0x25/0x53 [<ffffffff81253ff9>] tty_unthrottle+0x29/0x6d [<ffffffff8125298a>] reset_buffer_flags+0xe8/0x105 [<ffffffff812529cb>] n_tty_flush_buffer+0x24/0x97 [<ffffffff8125367b>] n_tty_receive_buf+0xc3d/0xe72 [<ffffffff8129b0fd>] ? usb_hcd_submit_urb+0x888/0x943 [<ffffffff81254e83>] ? tty_ldisc_try+0x53/0x71 [<ffffffff81255f85>] flush_to_ldisc+0x116/0x1bd [<ffffffff8125608a>] tty_flip_buffer_push+0x5e/0x85 [<ffffffffa010a0ab>] ftdi_process_read+0x481/0x627 [ftdi_sio] [<ffffffffa0001aea>] ? timer_action+0x63/0x79 [ehci_hcd] [<ffffffffa010a480>] ftdi_read_bulk_callback+0x22f/0x25a [ftdi_sio] [<ffffffff81040e89>] ? complete+0x54/0x73 [<ffffffffa000597f>] ? ehci_irq+0x351/0x391 [ehci_hcd] [<ffffffff81299a32>] usb_hcd_giveback_urb+0x9b/0xe5 [<ffffffffa00010f9>] ehci_urb_done+0x91/0xbc [ehci_hcd] [<ffffffffa00027f3>] qh_completions+0x42a/0x4ca [ehci_hcd] [<ffffffffa0002938>] ehci_work+0xa5/0x7ab [ehci_hcd] [<ffffffffa00db90f>] ? nv_swncq_interrupt+0x6a3/0x6d1 [sata_nv] [<ffffffffa000597f>] ehci_irq+0x351/0x391 [ehci_hcd] [<ffffffff81073641>] ? clocksource_read+0x1d/0x33 [<ffffffff81073a1f>] ? getnstimeofday+0x69/0xd3 [<ffffffff8129933c>] usb_hcd_irq+0x4d/0xa1 [<ffffffff810a2553>] handle_IRQ_event+0x6a/0x13f [<ffffffff810a4613>] handle_fasteoi_irq+0x90/0xe1 [<ffffffff8100eb5a>] handle_irq+0x95/0xb7 [<ffffffff8100df49>] do_IRQ+0x6a/0xe0 [<ffffffff8100c7d3>] ret_from_intr+0x0/0x11 <EOI> [<ffffffff8102c86c>] ? native_safe_halt+0x6/0x8 [<ffffffff81014126>] ? default_idle+0x51/0x8b [<ffffffff81014265>] ? c1e_idle+0x105/0x120 [<ffffffff8100ae15>] ? cpu_idle+0xb0/0xf3 [<ffffffff81392135>] ? rest_init+0x79/0x8f [<ffffffff815c8fae>] ? start_kernel+0x3dc/0x3fd [<ffffffff815c82d4>] ? x86_64_start_reservations+0xbb/0xd6 [<ffffffff815c83f4>] ? x86_64_start_kernel+0x105/0x128 BUG: scheduling while atomic: swapper/0/0x00010000 ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 2:52 ` Eric W. Biederman @ 2009-10-02 8:47 ` Johan Hovold 2009-10-02 16:33 ` Alan Cox 2009-10-02 16:59 ` Greg KH 2009-10-02 9:04 ` Alan Cox 1 sibling, 2 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-02 8:47 UTC (permalink / raw) To: Eric W. Biederman, Greg Kroah-Hartman, Alan Cox Cc: Johan Hovold, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Thu, Oct 01, 2009 at 07:52:21PM -0700, Eric W. Biederman wrote: > Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > > >> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from > >> interrupt context with low_latency set and that is obviously incorrect, > >> right? > > > > It seems to do it from a work queue - or did I miss a case ? > > ftdi_sio crash quite regularly for me with 2.6.31. > > With a bunch of nasties like: > BUG: scheduling while atomic: swapper/0/0x00010000 > bad: scheduling from the idle thread! It's the same problem. Greg, can't we apply the patch for stable at least? Then we can massage ftdi_sio into actually using the work queue for doing _all_ processing in the meantime if deemed necessary. Alan, did you have time to look at it? Are there any reasons for wanting to keep low_latency in ftdi_sio when it was removed from all other drivers processing in interrupt context (without doing work queue re-implementations)? Thanks, Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 8:47 ` Johan Hovold @ 2009-10-02 16:33 ` Alan Cox 2009-10-02 22:29 ` Eric W. Biederman ` (2 more replies) 2009-10-02 16:59 ` Greg KH 1 sibling, 3 replies; 40+ messages in thread From: Alan Cox @ 2009-10-02 16:33 UTC (permalink / raw) To: Johan Hovold Cc: Eric W. Biederman, Greg Kroah-Hartman, Johan Hovold, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel > Alan, did you have time to look at it? Are there any reasons for wanting > to keep low_latency in ftdi_sio when it was removed from all other > drivers processing in interrupt context (without doing work queue > re-implementations)? Yes for latency handling (two layers of work queue is bad) but its the right fix for stable. For upstream how does this look as a tidy up ftdi_sio: simplify driver From: Alan Cox <alan@linux.intel.com> This does a lot of stuff that the modern buffering logic will cover itself so remove the cruft. - Remove the code handling throttle half way through a packet. We have 64K of slack and flow control is async anyway so stopping is the wrong thing to do - Remove various commented out bits - Without the partial packet stuff we can remove the async queue stuff and split it into sensible functions for URB processing and for queueing urbs for receipt - Remove the unused rx_bytes count. We take locks for it, we jump through hoops for it and we never expose it. Signed-off-by: Alan Cox <alan@linux.intel.com> --- drivers/usb/serial/ftdi_sio.c | 199 +++++++++++------------------------------ 1 files changed, 51 insertions(+), 148 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 4f883b1..f796b07 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -78,10 +78,7 @@ struct ftdi_private { char prev_status, diff_status; /* Used for TIOCMIWAIT */ __u8 rx_flags; /* receive state flags (throttling) */ spinlock_t rx_lock; /* spinlock for receive state */ - struct delayed_work rx_work; struct usb_serial_port *port; - int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -763,7 +760,8 @@ static int ftdi_write_room(struct tty_struct *tty); static int ftdi_chars_in_buffer(struct tty_struct *tty); static void ftdi_write_bulk_callback(struct urb *urb); static void ftdi_read_bulk_callback(struct urb *urb); -static void ftdi_process_read(struct work_struct *work); +static void ftdi_process_read(struct ftdi_private *priv, + struct tty_struct *tty); static void ftdi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old); static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); @@ -1549,7 +1547,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); priv->port = port; /* Free port's existing write urb and transfer buffer. */ @@ -1700,9 +1697,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); if (tty) tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0; @@ -1730,7 +1724,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_unlock_irqrestore(&priv->rx_lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; usb_fill_bulk_urb(port->read_urb, dev, usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, @@ -1787,10 +1780,6 @@ static void ftdi_close(struct usb_serial_port *port) dbg("%s", __func__); - - /* cancel any scheduled reading */ - cancel_delayed_work_sync(&priv->rx_work); - /* shutdown our bulk read */ usb_kill_urb(port->read_urb); kref_put(&priv->kref, ftdi_sio_priv_release); @@ -2019,7 +2008,6 @@ static void ftdi_read_bulk_callback(struct urb *urb) struct tty_struct *tty; struct ftdi_private *priv; unsigned long countread; - unsigned long flags; int status = urb->status; if (urb->number_of_packets > 0) { @@ -2036,94 +2024,88 @@ static void ftdi_read_bulk_callback(struct urb *urb) if (port->port.count <= 0) return; - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); + if (status) { + /* This will happen at close every time so it is a dbg not an + err */ + dbg("(this is ok on close) nonzero read bulk status received: %d", status); return; } priv = usb_get_serial_port_data(port); if (!priv) { dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + return; } - if (urb != port->read_urb) - dev_err(&port->dev, "%s - Not my urb!\n", __func__); + tty = tty_port_tty_get(&port->port); + if (!tty) { + dbg("%s - bad tty pointer - exiting", __func__); + return; + } - if (status) { - /* This will happen at close every time so it is a dbg not an - err */ - dbg("(this is ok on close) nonzero read bulk status received: %d", status); - goto out; + + if (urb != port->read_urb) { + dev_err(&port->dev, "%s - Not my urb!\n", __func__); + return; } /* count data bytes, but not status bytes */ countread = urb->actual_length; countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - ftdi_process_read(&priv->rx_work.work); -out: + ftdi_process_read(priv, tty); tty_kref_put(tty); } /* ftdi_read_bulk_callback */ -static void ftdi_process_read(struct work_struct *work) -{ /* ftdi_process_read */ - struct ftdi_private *priv = - container_of(work, struct ftdi_private, rx_work.work); +static void ftdi_repost_urb(struct ftdi_private *priv) +{ + struct usb_serial_port *port = priv->port; + int result; + + /* if the port is closed or throttled stop trying to read */ + if (port->port.count <= 0 || (priv->rx_flags & THROTTLED)) + return; + /* Continue trying to always read */ + usb_fill_bulk_urb(port->read_urb, port->serial->dev, + usb_rcvbulkpipe(port->serial->dev, + port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, + port->read_urb->transfer_buffer_length, + ftdi_read_bulk_callback, port); + + result = usb_submit_urb(port->read_urb, GFP_ATOMIC); + if (result) + dev_err(&port->dev, + "%s - failed resubmitting read urb, error %d\n", + __func__, result); +} + +static void ftdi_process_read(struct ftdi_private *priv, struct tty_struct *tty) +{ struct usb_serial_port *port = priv->port; struct urb *urb; - struct tty_struct *tty; char error_flag; unsigned char *data; int i; - int result; int need_flip; int packet_offset; - unsigned long flags; dbg("%s - port %d", __func__, port->number); if (port->port.count <= 0) return; - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; - } - - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; - } - urb = port->read_urb; - if (!urb) { - dbg("%s - bad read_urb pointer - exiting", __func__); - goto out; - } - data = urb->transfer_buffer; - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __func__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); - } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) - usb_serial_debug_data(debug, &port->dev, __func__, - urb->actual_length, data); - else - dbg("Status only: %03oo %03oo", data[0], data[1]); - } + /* The first two bytes of every read packet are status */ + if (urb->actual_length > 2) + usb_serial_debug_data(debug, &port->dev, __func__, + urb->actual_length, data); + else + dbg("Status only: %03oo %03oo", data[0], data[1]); /* TO DO -- check for hung up line and handle appropriately: */ @@ -2132,7 +2114,7 @@ static void ftdi_process_read(struct work_struct *work) /* if CD is dropped and the line is not CLOCAL then we should hangup */ need_flip = 0; - for (packet_offset = priv->rx_processed; + for (packet_offset = 0; packet_offset < urb->actual_length; packet_offset += priv->max_packet_size) { int length; @@ -2155,17 +2137,6 @@ static void ftdi_process_read(struct work_struct *work) length = 0; } - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __func__); - break; - } - if (tty_buffer_request_room(tty, length) < length) { - /* break out & wait for throttling/unthrottling to - happen */ - dbg("%s - receive room low", __func__); - break; - } - /* Handle errors and break */ error_flag = TTY_NORMAL; /* Although the device uses a bitmask and hence can have @@ -2203,79 +2174,11 @@ static void ftdi_process_read(struct work_struct *work) need_flip = 1; } -#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW - /* if a parity error is detected you get status packets forever - until a character is sent without a parity error. - This doesn't work well since the application receives a - never ending stream of bad data - even though new data - hasn't been sent. Therefore I (bill) have taken this out. - However - this might make sense for framing errors and so on - so I am leaving the code in for now. - */ - else { - if (error_flag != TTY_NORMAL) { - dbg("error_flag is not normal"); - /* In this case it is just status - if that is - an error send a bad character */ - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, 0xff, error_flag); - need_flip = 1; - } - } -#endif } /* "for(packet_offset=0..." */ - /* Low latency */ if (need_flip) tty_flip_buffer_push(tty); - - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __func__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __func__); - goto out; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - else - dbg("%s - port is closed", __func__); - goto out; - } - - /* urb is completely processed */ - priv->rx_processed = 0; - - /* if the port is closed stop trying to read */ - if (port->port.count > 0) { - /* Continue trying to always read */ - usb_fill_bulk_urb(port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); - - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, - "%s - failed resubmitting read urb, error %d\n", - __func__, result); - } -out: - tty_kref_put(tty); + ftdi_repost_urb(priv); } /* ftdi_process_read */ @@ -2635,7 +2538,7 @@ static void ftdi_unthrottle(struct tty_struct *tty) spin_unlock_irqrestore(&priv->rx_lock, flags); if (actually_throttled) - schedule_delayed_work(&priv->rx_work, 0); + ftdi_repost_urb(priv); } static int __init ftdi_init(void) ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 16:33 ` Alan Cox @ 2009-10-02 22:29 ` Eric W. Biederman 2009-10-03 10:21 ` Johan Hovold 2009-10-02 23:00 ` Eric W. Biederman 2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold 2 siblings, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-10-02 22:29 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel Alan Cox <alan@lxorguk.ukuu.org.uk> writes: >> Alan, did you have time to look at it? Are there any reasons for wanting >> to keep low_latency in ftdi_sio when it was removed from all other >> drivers processing in interrupt context (without doing work queue >> re-implementations)? > > Yes for latency handling (two layers of work queue is bad) but its the > right fix for stable. > > For upstream how does this look as a tidy up > ftdi_sio: simplify driver > > From: Alan Cox <alan@linux.intel.com> > > This does a lot of stuff that the modern buffering logic will cover itself > so remove the cruft. > > - Remove the code handling throttle half way through a packet. We have 64K > of slack and flow control is async anyway so stopping is the wrong thing > to do > - Remove various commented out bits > - Without the partial packet stuff we can remove the async queue stuff and > split it into sensible functions for URB processing and for queueing urbs > for receipt > - Remove the unused rx_bytes count. We take locks for it, we jump through > hoops for it and we never expose it. > > Signed-off-by: Alan Cox <alan@linux.intel.com> The code doesn't fall over immediately in my testing. So at first glance this appears to be as good as removing low_latency. Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 22:29 ` Eric W. Biederman @ 2009-10-03 10:21 ` Johan Hovold 0 siblings, 0 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-03 10:21 UTC (permalink / raw) To: Eric W. Biederman Cc: Alan Cox, Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Fri, Oct 02, 2009 at 03:29:56PM -0700, Eric W. Biederman wrote: > The code doesn't fall over immediately in my testing. So at first glance > this appears to be as good as removing low_latency. The patch wasn't intended as a replacement for removing low_latency. It still calls tty_flip_buffer_push from interrupt context. /Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 16:33 ` Alan Cox 2009-10-02 22:29 ` Eric W. Biederman @ 2009-10-02 23:00 ` Eric W. Biederman 2009-10-03 13:09 ` Alan Cox 2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold 2 siblings, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-10-02 23:00 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel I have seen a hang in: /bin/stty (changing the baud rate) set_termios tty_wait_until_sent tty_chars_in_buffer ftdi_chars_in_buffer Where the driver wedged for a serial port and no progress was made. This happened to me several times with 2.6.31. My initial hypothesis was this was a hardware error (as it only happened on single piece of hardware). With all of the driver problems I suspect it could be a driver bug. Any ideas from the people who understand this code? Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 23:00 ` Eric W. Biederman @ 2009-10-03 13:09 ` Alan Cox 2009-10-03 23:51 ` Eric W. Biederman 2009-11-17 18:35 ` Eric W. Biederman 0 siblings, 2 replies; 40+ messages in thread From: Alan Cox @ 2009-10-03 13:09 UTC (permalink / raw) To: Eric W. Biederman Cc: Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Fri, 02 Oct 2009 16:00:41 -0700 ebiederm@xmission.com (Eric W. Biederman) wrote: > > > I have seen a hang in: > /bin/stty (changing the baud rate) > set_termios > tty_wait_until_sent > tty_chars_in_buffer > ftdi_chars_in_buffer > > Where the driver wedged for a serial port and no progress > was made. > > This happened to me several times with 2.6.31. My initial > hypothesis was this was a hardware error (as it only happened > on single piece of hardware). With all of the driver problems > I suspect it could be a driver bug. Driver bug I would think - or setup. If you've genuinely got the port flow controlled then a request to set the termios after the I/O will wait until a signal or carrier change (or indeed forever) quite correctly. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 13:09 ` Alan Cox @ 2009-10-03 23:51 ` Eric W. Biederman 2009-11-17 18:35 ` Eric W. Biederman 1 sibling, 0 replies; 40+ messages in thread From: Eric W. Biederman @ 2009-10-03 23:51 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > On Fri, 02 Oct 2009 16:00:41 -0700 > ebiederm@xmission.com (Eric W. Biederman) wrote: > >> >> >> I have seen a hang in: >> /bin/stty (changing the baud rate) >> set_termios >> tty_wait_until_sent >> tty_chars_in_buffer >> ftdi_chars_in_buffer >> >> Where the driver wedged for a serial port and no progress >> was made. >> >> This happened to me several times with 2.6.31. My initial >> hypothesis was this was a hardware error (as it only happened >> on single piece of hardware). With all of the driver problems >> I suspect it could be a driver bug. > > Driver bug I would think - or setup. If you've genuinely got the port > flow controlled then a request to set the termios after the I/O will wait > until a signal or carrier change (or indeed forever) quite correctly. Not setup. Neither hardware flow control or software flow control are used on that port. What was truly puzzling is that it was the only one out of about 50 in essentially the same configuration where I saw the problem. Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 13:09 ` Alan Cox 2009-10-03 23:51 ` Eric W. Biederman @ 2009-11-17 18:35 ` Eric W. Biederman 2009-11-17 18:41 ` Oliver Neukum 1 sibling, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-11-17 18:35 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel, Alan Stern Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > On Fri, 02 Oct 2009 16:00:41 -0700 > ebiederm@xmission.com (Eric W. Biederman) wrote: > >> >> >> I have seen a hang in: >> /bin/stty (changing the baud rate) >> set_termios >> tty_wait_until_sent >> tty_chars_in_buffer >> ftdi_chars_in_buffer >> >> Where the driver wedged for a serial port and no progress >> was made. >> >> This happened to me several times with 2.6.31. My initial >> hypothesis was this was a hardware error (as it only happened >> on single piece of hardware). With all of the driver problems >> I suspect it could be a driver bug. > > Driver bug I would think - or setup. If you've genuinely got the port > flow controlled then a request to set the termios after the I/O will wait > until a signal or carrier change (or indeed forever) quite correctly. I have finally tracked this one down. But I'm not certain if there is anything we can do in software to make things better. Boiled down. ftdi_chars_in_buffer is essentially priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an urb request is sent and tx_outstanding_bytes is decremented when an urb request completes. It turns out I have a moderately noisy usb line, and so I occasionally get messages like: ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31 Which as best as I can tell result in the urb getting abandoned and neither completed nor canceled (because we have hit the maximum retry count and they still don't succeed). Which appears to result in tx_outstanding_bytes getting stuck at some positive number. Is it possible to handle this more gracefully in software? Is it possible to handle this in a way that makes it clear there was a hardware error that we could not recover from. A little debug level error doesn't usually even make it to the log. Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-11-17 18:35 ` Eric W. Biederman @ 2009-11-17 18:41 ` Oliver Neukum 2009-11-17 18:56 ` Eric W. Biederman ` (2 more replies) 0 siblings, 3 replies; 40+ messages in thread From: Oliver Neukum @ 2009-11-17 18:41 UTC (permalink / raw) To: Eric W. Biederman Cc: Alan Cox, Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Alan Cox, Andrew Morton, linux-kernel, Alan Stern Am Dienstag, 17. November 2009 19:35:07 schrieb Eric W. Biederman: > Boiled down. ftdi_chars_in_buffer is essentially > priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an > urb request is sent and tx_outstanding_bytes is decremented when an urb > request completes. > > It turns out I have a moderately noisy usb line, and so I occasionally > get messages like: > > ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31 > > Which as best as I can tell result in the urb getting abandoned and > neither completed nor canceled (because we have hit the maximum > retry count and they still don't succeed). The URB should be finished with an error code in urb->status. ftdi_write_bulk_callback() does decrement the counter even in the error case. > Which appears to result in tx_outstanding_bytes getting stuck at > some positive number. Do you see this message if (status) { dbg("nonzero write bulk status received: %d", status); return; } if you enable debugging output? Regards Oliver ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-11-17 18:41 ` Oliver Neukum @ 2009-11-17 18:56 ` Eric W. Biederman 2009-11-17 20:05 ` Eric W. Biederman 2009-11-18 1:08 ` Eric W. Biederman 2 siblings, 0 replies; 40+ messages in thread From: Eric W. Biederman @ 2009-11-17 18:56 UTC (permalink / raw) To: Oliver Neukum Cc: Alan Cox, Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Alan Cox, Andrew Morton, linux-kernel, Alan Stern Oliver Neukum <oliver@neukum.org> writes: > Am Dienstag, 17. November 2009 19:35:07 schrieb Eric W. Biederman: >> Boiled down. ftdi_chars_in_buffer is essentially >> priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an >> urb request is sent and tx_outstanding_bytes is decremented when an urb >> request completes. >> >> It turns out I have a moderately noisy usb line, and so I occasionally >> get messages like: >> >> ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31 >> >> Which as best as I can tell result in the urb getting abandoned and >> neither completed nor canceled (because we have hit the maximum >> retry count and they still don't succeed). > > The URB should be finished with an error code in urb->status. > ftdi_write_bulk_callback() does decrement the counter even in > the error case. > >> Which appears to result in tx_outstanding_bytes getting stuck at >> some positive number. > > Do you see this message > > if (status) { > dbg("nonzero write bulk status received: %d", status); > return; > } > > if you enable debugging output? I will have to give that a try. The problem isn't that easy to reproduce. But I do have a 100% correlation between urb retry counts and hangs in tty_wait_until_sent. Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-11-17 18:41 ` Oliver Neukum 2009-11-17 18:56 ` Eric W. Biederman @ 2009-11-17 20:05 ` Eric W. Biederman 2009-11-18 1:08 ` Eric W. Biederman 2 siblings, 0 replies; 40+ messages in thread From: Eric W. Biederman @ 2009-11-17 20:05 UTC (permalink / raw) To: Oliver Neukum Cc: Alan Cox, Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel, Alan Stern [-- Attachment #1: Type: text/plain, Size: 2742 bytes --] Oliver Neukum <oliver@neukum.org> writes: > Am Dienstag, 17. November 2009 19:35:07 schrieb Eric W. Biederman: >> Boiled down. ftdi_chars_in_buffer is essentially >> priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an >> urb request is sent and tx_outstanding_bytes is decremented when an urb >> request completes. >> >> It turns out I have a moderately noisy usb line, and so I occasionally >> get messages like: >> >> ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31 >> >> Which as best as I can tell result in the urb getting abandoned and >> neither completed nor canceled (because we have hit the maximum >> retry count and they still don't succeed). > > The URB should be finished with an error code in urb->status. > ftdi_write_bulk_callback() does decrement the counter even in > the error case. > >> Which appears to result in tx_outstanding_bytes getting stuck at >> some positive number. > > Do you see this message > > if (status) { > dbg("nonzero write bulk status received: %d", status); > return; > } > > if you enable debugging output? > > Regards > Oliver I think I have enabled debug output but I don't see anything extra coming out. Below is the patch I am running against 2.6.32-rc5. The full dmesg is attached. The highlights seem to be: ehci_hcd 0000:00:0a.1: 9.2 detected XactErr len 0/7 retry 1 ehci_hcd 0000:00:0a.1: devpath 9.2 ep4out 3strikes The fact that "stty -F /dev/ttyUSB15 9600" hangs forever in tty_wait_until sent. Eric diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 00ad9ce..0766f1b 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -389,9 +389,10 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) ++qh->xacterrs < QH_XACTERR_MAX && !urb->unlinked) { ehci_dbg(ehci, - "detected XactErr len %zu/%zu retry %d\n", + "%s detected XactErr len %zu/%zu retry %d\n", + qtd->urb->dev->devpath, qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); - +#if 0 /* reset the token in the qtd and the * qh overlay (which still contains * the qtd) so that we pick up from @@ -406,6 +407,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) hw->hw_token = cpu_to_hc32(ehci, token); goto retry_xacterr; +#endif } stopped = 1; diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d..1e1933e 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -29,6 +29,7 @@ /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */ +#define DEBUG 1 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/init.h> [-- Attachment #2: dmesg-hang1.txt --] [-- Type: text/plain, Size: 108279 bytes --] Initializing cgroup subsys cpuset Linux version 2.6.32-rc5 (ebiederm@maxwell.aristanetworks.com.) (gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) ) #8 SMP Tue Nov 17 07:29:09 PST 2009 Command line: ro root=LABEL=/ rhgb quiet 8250.nr_uarts=16 crashkernel=128M KERNEL supported cpus: Intel GenuineIntel AMD AuthenticAMD Centaur CentaurHauls BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009f400 (usable) BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000003fee0000 (usable) BIOS-e820: 000000003fee0000 - 000000003fee3000 (ACPI NVS) BIOS-e820: 000000003fee3000 - 000000003fef0000 (ACPI data) BIOS-e820: 000000003fef0000 - 000000003ff00000 (reserved) BIOS-e820: 00000000f0000000 - 00000000f4000000 (reserved) BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved) DMI 2.3 present. Phoenix BIOS detected: BIOS may corrupt low RAM, working around it. e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved) last_pfn = 0x3fee0 max_arch_pfn = 0x400000000 MTRR default type: uncachable MTRR fixed ranges enabled: 00000-9FFFF write-back A0000-BFFFF uncachable C0000-C7FFF write-protect C8000-FFFFF uncachable MTRR variable ranges enabled: 0 base 0000000000 mask FFC0000000 write-back 1 base 003FF00000 mask FFFFF00000 uncachable 2 disabled 3 disabled 4 disabled 5 disabled 6 disabled 7 disabled x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106 initial memory mapped : 0 - 20000000 init_memory_mapping: 0000000000000000-000000003fee0000 0000000000 - 003fe00000 page 2M 003fe00000 - 003fee0000 page 4k kernel direct mapping tables up to 3fee0000 @ 10000-13000 RAMDISK: 37cfc000 - 37feff45 ACPI: RSDP 00000000000f7d30 00014 (v00 Nvidia) ACPI: RSDT 000000003fee3040 00034 (v01 Nvidia AWRDACPI 42302E31 AWRD 00000000) ACPI: FACP 000000003fee30c0 00074 (v01 Nvidia AWRDACPI 42302E31 AWRD 00000000) ACPI: DSDT 000000003fee3180 06848 (v01 NVIDIA AWRDACPI 00001000 MSFT 0100000E) ACPI: FACS 000000003fee0000 00040 ACPI: SSDT 000000003fee9b00 00182 (v01 PTLTD POWERNOW 00000001 LTP 00000001) ACPI: MCFG 000000003fee9d00 0003C (v01 Nvidia AWRDACPI 42302E31 AWRD 00000000) ACPI: APIC 000000003fee9a40 0007C (v01 Nvidia AWRDACPI 42302E31 AWRD 00000000) ACPI: Local APIC address 0xfee00000 Scanning NUMA topology in Northbridge 24 No NUMA configuration found Faking a node at 0000000000000000-000000003fee0000 Bootmem setup node 0 0000000000000000-000000003fee0000 NODE_DATA [0000000000011000 - 0000000000025fff] bootmap [0000000000026000 - 000000000002dfdf] pages 8 (7 early reservations) ==> bootmem [0000000000 - 003fee0000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000] #2 [0001000000 - 00017f48d4] TEXT DATA BSS ==> [0001000000 - 00017f48d4] #3 [0037cfc000 - 0037feff45] RAMDISK ==> [0037cfc000 - 0037feff45] #4 [000009f000 - 0000100000] BIOS reserved ==> [000009f000 - 0000100000] #5 [00017f5000 - 00017f5082] BRK ==> [00017f5000 - 00017f5082] #6 [0000010000 - 0000011000] PGTABLE ==> [0000010000 - 0000011000] found SMP MP-table at [ffff8800000f3d10] f3d10 Reserving 128MB of memory at 32MB for crashkernel (System RAM: 1022MB) [ffffea0000000000-ffffea00003fffff] PMD -> [ffff880001c00000-ffff880001ffffff] on node 0 [ffffea0000400000-ffffea0000dfffff] PMD -> [ffff88000a000000-ffff88000a9fffff] on node 0 Zone PFN ranges: DMA 0x00000010 -> 0x00001000 DMA32 0x00001000 -> 0x00100000 Normal 0x00100000 -> 0x00100000 Movable zone start PFN for each node early_node_map[2] active PFN ranges 0: 0x00000010 -> 0x0000009f 0: 0x00000100 -> 0x0003fee0 On node 0 totalpages: 261743 DMA zone: 56 pages used for memmap DMA zone: 101 pages reserved DMA zone: 3826 pages, LIFO batch:0 DMA32 zone: 3525 pages used for memmap DMA32 zone: 254235 pages, LIFO batch:31 Nvidia board detected. Ignoring ACPI timer override. If you got timer trouble try acpi_use_timer_override Detected use of extended apic ids on hypertransport bus ACPI: PM-Timer IO Port: 0x1008 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled) ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) ACPI: BIOS IRQ0 pin2 override ignored. ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 14 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 15 high edge) ACPI: IRQ9 used by override. ACPI: IRQ14 used by override. ACPI: IRQ15 used by override. Using ACPI (MADT) for SMP configuration information SMP: Allowing 2 CPUs, 0 hotplug CPUs nr_irqs_gsi: 24 PM: Registered nosave memory: 000000000009f000 - 00000000000a0000 PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000 PM: Registered nosave memory: 00000000000f0000 - 0000000000100000 Allocating PCI resources starting at 3ff00000 (gap: 3ff00000:b0100000) Booting paravirtualized kernel on bare hardware NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:2 nr_node_ids:1 PERCPU: Embedded 28 pages/cpu @ffff88000aa00000 s82520 r8192 d23976 u1048576 pcpu-alloc: s82520 r8192 d23976 u1048576 alloc=1*2097152 pcpu-alloc: [0] 0 1 Built 1 zonelists in Node order, mobility grouping on. Total pages: 258061 Policy zone: DMA32 Kernel command line: ro root=LABEL=/ rhgb quiet 8250.nr_uarts=16 crashkernel=128M PID hash table entries: 4096 (order: 3, 32768 bytes) Initializing CPU#0 Checking aperture... No AGP bridge found Node 0: aperture @ 1e80000000 size 32 MB Aperture beyond 4GB. Ignoring. Memory: 889964k/1047424k available (3916k kernel code, 452k absent, 157008k reserved, 2171k data, 1328k init) SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 Hierarchical RCU implementation. NR_IRQS:4352 nr_irqs:424 spurious 8259A interrupt: IRQ7. Console: colour VGA+ 80x25 console [tty0] enabled Fast TSC calibration using PIT Detected 1808.171 MHz processor. Calibrating delay loop (skipped), value calculated using timer frequency.. 3616.34 BogoMIPS (lpj=7232684) Security Framework initialized SELinux: Initializing. SELinux: Starting in permissive mode Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) Mount-cache hash table entries: 256 Initializing cgroup subsys cpuacct Initializing cgroup subsys devices Initializing cgroup subsys freezer CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) CPU: L2 Cache: 512K (64 bytes/line) CPU 0/0x0 -> Node 0 tseg: 003ff00000 CPU: Physical Processor ID: 0 CPU: Processor Core ID: 0 mce: CPU supports 5 MCE banks using C1E aware idle routine Performance Events: AMD PMU driver. ... version: 0 ... bit width: 48 ... generic registers: 4 ... value mask: 0000ffffffffffff ... max period: 00007fffffffffff ... fixed-purpose events: 0 ... event mask: 000000000000000f ACPI: Core revision 20090903 Setting APIC routing to flat ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1 ..MP-BIOS bug: 8254 timer not connected to IO-APIC ...trying to set up timer (IRQ0) through the 8259A ... ..... (found apic 0 pin 0) ... ....... works. CPU0: AMD Athlon(tm) 64 X2 Dual Core Processor 3400+ stepping 02 Booting processor 1 APIC 0x1 ip 0x6000 Initializing CPU#1 Calibrating delay using timer specific routine.. 3616.92 BogoMIPS (lpj=7233857) CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) CPU: L2 Cache: 512K (64 bytes/line) CPU 1/0x1 -> Node 0 CPU: Physical Processor ID: 0 CPU: Processor Core ID: 1 mce: CPU supports 5 MCE banks CPU1: AMD Athlon(tm) 64 X2 Dual Core Processor 3400+ stepping 02 Brought up 2 CPUs Total of 2 processors activated (7233.27 BogoMIPS). devtmpfs: initialized NET: Registered protocol family 16 node 0 link 0: io port [ff8000, ffff] TOM: 0000000040000000 aka 1024M node 0 link 0: mmio [a0000, bffff] node 0 link 0: mmio [40000000, efffffff] node 0 link 0: mmio [f4000000, fe02ffff] node 0 link 0: mmio [f0000000, f1afffff] bus: [00,1a] on node 0 link 0 bus: 00 index 0 io port: [ff8000, ffff] bus: 00 index 1 io port: [0, ffff] bus: 00 index 2 mmio: [a0000, bffff] bus: 00 index 3 mmio: [40000000, f3ffffff] bus: 00 index 4 mmio: [f4000000, fcffffffff] ACPI: bus type pci registered PCI: MCFG configuration 0: base f0000000 segment 0 buses 0 - 63 PCI: MCFG area at f0000000 reserved in E820 PCI: Using MMCONFIG at f0000000 - f3ffffff PCI: Using configuration type 1 for base access bio: create slab <bio-0> at 0 ACPI: EC: Look up EC in DSDT ACPI: Interpreter enabled ACPI: (supports S0 S1 S3 S4 S5) ACPI: Using IOAPIC for interrupt routing ACPI: No dock devices found. ACPI: PCI Root Bridge [PCI0] (0000:00) pci 0000:00:04.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:04.0: PME# disabled HPET not enabled in BIOS. You might try hpet=force boot option pci 0000:00:09.1: reg 20 io port: [0x1c00-0x1c3f] pci 0000:00:09.1: reg 24 io port: [0x1c40-0x1c7f] pci 0000:00:09.1: PME# supported from D3hot D3cold pci 0000:00:09.1: PME# disabled pci 0000:00:0a.0: reg 10 32bit mmio: [0xfe02f000-0xfe02ffff] pci 0000:00:0a.0: supports D1 D2 pci 0000:00:0a.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0a.0: PME# disabled pci 0000:00:0a.1: reg 10 32bit mmio: [0xfe02e000-0xfe02e0ff] pci 0000:00:0a.1: supports D1 D2 pci 0000:00:0a.1: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0a.1: PME# disabled pci 0000:00:0c.0: reg 20 io port: [0xf400-0xf40f] pci 0000:00:0d.0: reg 10 io port: [0x9f0-0x9f7] pci 0000:00:0d.0: reg 14 io port: [0xbf0-0xbf3] pci 0000:00:0d.0: reg 18 io port: [0x970-0x977] pci 0000:00:0d.0: reg 1c io port: [0xb70-0xb73] pci 0000:00:0d.0: reg 20 io port: [0xe000-0xe00f] pci 0000:00:0d.0: reg 24 32bit mmio: [0xfe02d000-0xfe02dfff] pci 0000:00:0d.1: reg 10 io port: [0x9e0-0x9e7] pci 0000:00:0d.1: reg 14 io port: [0xbe0-0xbe3] pci 0000:00:0d.1: reg 18 io port: [0x960-0x967] pci 0000:00:0d.1: reg 1c io port: [0xb60-0xb63] pci 0000:00:0d.1: reg 20 io port: [0xcc00-0xcc0f] pci 0000:00:0d.1: reg 24 32bit mmio: [0xfe02c000-0xfe02cfff] pci 0000:00:0d.2: reg 10 io port: [0xc800-0xc807] pci 0000:00:0d.2: reg 14 io port: [0xc400-0xc403] pci 0000:00:0d.2: reg 18 io port: [0xc000-0xc007] pci 0000:00:0d.2: reg 1c io port: [0xbc00-0xbc03] pci 0000:00:0d.2: reg 20 io port: [0xb800-0xb80f] pci 0000:00:0d.2: reg 24 32bit mmio: [0xfe02b000-0xfe02bfff] pci 0000:00:0e.1: reg 10 32bit mmio: [0xfe020000-0xfe023fff] pci 0000:00:0e.1: PME# supported from D3hot D3cold pci 0000:00:0e.1: PME# disabled pci 0000:00:10.0: reg 10 32bit mmio: [0xfe02a000-0xfe02afff] pci 0000:00:10.0: reg 14 io port: [0xb400-0xb407] pci 0000:00:10.0: reg 18 32bit mmio: [0xfe029000-0xfe0290ff] pci 0000:00:10.0: reg 1c 32bit mmio: [0xfe028000-0xfe02800f] pci 0000:00:10.0: supports D1 D2 pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:10.0: PME# disabled pci 0000:00:11.0: reg 10 32bit mmio: [0xfe027000-0xfe027fff] pci 0000:00:11.0: reg 14 io port: [0xb000-0xb007] pci 0000:00:11.0: reg 18 32bit mmio: [0xfe026000-0xfe0260ff] pci 0000:00:11.0: reg 1c 32bit mmio: [0xfe025000-0xfe02500f] pci 0000:00:11.0: supports D1 D2 pci 0000:00:11.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:11.0: PME# disabled pci 0000:00:12.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:12.0: PME# disabled pci 0000:00:13.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:13.0: PME# disabled pci 0000:00:15.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:15.0: PME# disabled pci 0000:00:16.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:16.0: PME# disabled pci 0000:00:17.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:17.0: PME# disabled pci 0000:01:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff] pci 0000:01:00.0: reg 14 64bit mmio pref: [0xe0000000-0xefffffff] pci 0000:01:00.0: reg 1c 64bit mmio: [0xf9000000-0xf9ffffff] pci 0000:01:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' pci 0000:00:04.0: bridge io port: [0xa000-0xafff] pci 0000:00:04.0: bridge 32bit mmio: [0xf8000000-0xfaffffff] pci 0000:00:04.0: bridge 64bit mmio pref: [0xe0000000-0xefffffff] pci 0000:02:09.0: reg 10 32bit mmio: [0xfdeff000-0xfdeff7ff] pci 0000:02:09.0: reg 14 io port: [0x9c00-0x9c7f] pci 0000:02:09.0: supports D2 pci 0000:02:09.0: PME# supported from D2 D3hot D3cold pci 0000:02:09.0: PME# disabled pci 0000:00:0e.0: transparent bridge pci 0000:00:0e.0: bridge io port: [0x9000-0x9fff] pci 0000:00:0e.0: bridge 32bit mmio: [0xfde00000-0xfdefffff] pci 0000:00:0e.0: bridge 32bit mmio pref: [0xfdf00000-0xfdffffff] pci 0000:00:12.0: bridge io port: [0x8000-0x8fff] pci 0000:00:12.0: bridge 32bit mmio: [0xfdd00000-0xfddfffff] pci 0000:00:12.0: bridge 64bit mmio pref: [0xfdc00000-0xfdcfffff] pci 0000:04:00.0: reg 10 64bit mmio: [0xfdbff000-0xfdbff07f] pci 0000:04:00.0: reg 18 64bit mmio: [0xfdbf8000-0xfdbfbfff] pci 0000:04:00.0: reg 20 io port: [0x7c00-0x7c7f] pci 0000:04:00.0: reg 30 32bit mmio pref: [0x000000-0x07ffff] pci 0000:04:00.0: supports D1 D2 pci 0000:04:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' pci 0000:00:13.0: bridge io port: [0x7000-0x7fff] pci 0000:00:13.0: bridge 32bit mmio: [0xfdb00000-0xfdbfffff] pci 0000:00:13.0: bridge 64bit mmio pref: [0xfda00000-0xfdafffff] pci 0000:00:15.0: bridge io port: [0x6000-0x6fff] pci 0000:00:15.0: bridge 32bit mmio: [0xfd900000-0xfd9fffff] pci 0000:00:15.0: bridge 64bit mmio pref: [0xfd800000-0xfd8fffff] pci 0000:00:16.0: bridge io port: [0x5000-0x5fff] pci 0000:00:16.0: bridge 32bit mmio: [0xfd700000-0xfd7fffff] pci 0000:00:16.0: bridge 64bit mmio pref: [0xfd600000-0xfd6fffff] pci 0000:07:00.0: reg 10 32bit mmio: [0xfd5e0000-0xfd5fffff] pci 0000:07:00.0: PME# supported from D0 D3hot D3cold pci 0000:07:00.0: PME# disabled pci 0000:00:17.0: bridge 32bit mmio: [0xfc400000-0xfd5fffff] pci 0000:00:17.0: bridge 64bit mmio pref: [0xfb400000-0xfc3fffff] pci 0000:08:01.0: PME# supported from D0 D3hot D3cold pci 0000:08:01.0: PME# disabled pci 0000:08:02.0: PME# supported from D0 D3hot D3cold pci 0000:08:02.0: PME# disabled pci 0000:08:03.0: PME# supported from D0 D3hot D3cold pci 0000:08:03.0: PME# disabled pci 0000:08:05.0: PME# supported from D0 D3hot D3cold pci 0000:08:05.0: PME# disabled pci 0000:08:07.0: PME# supported from D0 D3hot D3cold pci 0000:08:07.0: PME# disabled pci 0000:08:09.0: PME# supported from D0 D3hot D3cold pci 0000:08:09.0: PME# disabled pci 0000:08:0a.0: PME# supported from D0 D3hot D3cold pci 0000:08:0a.0: PME# disabled pci 0000:08:0b.0: PME# supported from D0 D3hot D3cold pci 0000:08:0b.0: PME# disabled pci 0000:08:0c.0: PME# supported from D0 D3hot D3cold pci 0000:08:0c.0: PME# disabled pci 0000:08:0d.0: PME# supported from D0 D3hot D3cold pci 0000:08:0d.0: PME# disabled pci 0000:08:0e.0: PME# supported from D0 D3hot D3cold pci 0000:08:0e.0: PME# disabled pci 0000:08:0f.0: PME# supported from D0 D3hot D3cold pci 0000:08:0f.0: PME# disabled pci 0000:07:00.0: bridge 32bit mmio: [0xfc400000-0xfd4fffff] pci 0000:07:00.0: bridge 64bit mmio pref: [0xfb400000-0xfc3fffff] pci 0000:09:00.0: reg 10 32bit mmio: [0xfd4e0000-0xfd4fffff] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold pci 0000:09:00.0: PME# disabled pci 0000:08:01.0: bridge io port: [0x00-0x4fff] pci 0000:08:01.0: bridge 32bit mmio: [0xfcf00000-0xfd4fffff] pci 0000:08:01.0: bridge 64bit mmio pref: [0xfbf00000-0xfc3fffff] pci 0000:0a:01.0: PME# supported from D0 D3hot D3cold pci 0000:0a:01.0: PME# disabled pci 0000:0a:04.0: PME# supported from D0 D3hot D3cold pci 0000:0a:04.0: PME# disabled pci 0000:0a:05.0: PME# supported from D0 D3hot D3cold pci 0000:0a:05.0: PME# disabled pci 0000:0a:07.0: PME# supported from D0 D3hot D3cold pci 0000:0a:07.0: PME# disabled pci 0000:0a:09.0: PME# supported from D0 D3hot D3cold pci 0000:0a:09.0: PME# disabled pci 0000:09:00.0: bridge io port: [0x00-0x4fff] pci 0000:09:00.0: bridge 32bit mmio: [0xfcf00000-0xfd3fffff] pci 0000:09:00.0: bridge 64bit mmio pref: [0xfbf00000-0xfc3fffff] pci 0000:0b:00.0: reg 10 32bit mmio: [0xfd3e0000-0xfd3fffff] pci 0000:0b:00.0: reg 14 32bit mmio: [0xfd3c0000-0xfd3dffff] pci 0000:0b:00.0: reg 18 io port: [0x4c00-0x4c1f] pci 0000:0b:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff] pci 0000:0b:00.0: PME# supported from D0 D3hot D3cold pci 0000:0b:00.0: PME# disabled pci 0000:0b:00.1: reg 10 32bit mmio: [0xfd3a0000-0xfd3bffff] pci 0000:0b:00.1: reg 14 32bit mmio: [0xfd380000-0xfd39ffff] pci 0000:0b:00.1: reg 18 io port: [0x4800-0x481f] pci 0000:0b:00.1: reg 30 32bit mmio pref: [0x000000-0x01ffff] pci 0000:0b:00.1: PME# supported from D0 D3hot D3cold pci 0000:0b:00.1: PME# disabled pci 0000:0b:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' pci 0000:0a:01.0: bridge io port: [0x4000-0x4fff] pci 0000:0a:01.0: bridge 32bit mmio: [0xfd300000-0xfd3fffff] pci 0000:0a:01.0: bridge 64bit mmio pref: [0xfc300000-0xfc3fffff] pci 0000:0c:00.0: reg 10 32bit mmio: [0xfd2e0000-0xfd2fffff] pci 0000:0c:00.0: reg 14 32bit mmio: [0xfd2c0000-0xfd2dffff] pci 0000:0c:00.0: reg 18 io port: [0x3c00-0x3c1f] pci 0000:0c:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff] pci 0000:0c:00.0: PME# supported from D0 D3hot D3cold pci 0000:0c:00.0: PME# disabled pci 0000:0c:00.1: reg 10 32bit mmio: [0xfd2a0000-0xfd2bffff] pci 0000:0c:00.1: reg 14 32bit mmio: [0xfd280000-0xfd29ffff] pci 0000:0c:00.1: reg 18 io port: [0x3800-0x381f] pci 0000:0c:00.1: reg 30 32bit mmio pref: [0x000000-0x01ffff] pci 0000:0c:00.1: PME# supported from D0 D3hot D3cold pci 0000:0c:00.1: PME# disabled pci 0000:0c:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' pci 0000:0a:04.0: bridge io port: [0x3000-0x3fff] pci 0000:0a:04.0: bridge 32bit mmio: [0xfd200000-0xfd2fffff] pci 0000:0a:04.0: bridge 64bit mmio pref: [0xfc200000-0xfc2fffff] pci 0000:0a:05.0: bridge io port: [0x2000-0x2fff] pci 0000:0a:05.0: bridge 32bit mmio: [0xfd100000-0xfd1fffff] pci 0000:0a:05.0: bridge 64bit mmio pref: [0xfc100000-0xfc1fffff] pci 0000:0a:09.0: bridge io port: [0x00-0xfff] pci 0000:0a:09.0: bridge 32bit mmio: [0xfcf00000-0xfcffffff] pci 0000:0a:09.0: bridge 64bit mmio pref: [0xfbf00000-0xfbffffff] pci 0000:0a:07.0: bridge io port: [0x1000-0x1fff] pci 0000:0a:07.0: bridge 32bit mmio: [0xfd000000-0xfd0fffff] pci 0000:0a:07.0: bridge 64bit mmio pref: [0xfc000000-0xfc0fffff] pci 0000:0a:07.0: bridge io port: [0x1000-0x1fff] pci 0000:0a:07.0: bridge 32bit mmio: [0xfd000000-0xfd0fffff] pci 0000:0a:07.0: bridge 64bit mmio pref: [0xfc000000-0xfc0fffff] pci 0000:08:03.0: bridge io port: [0xffffffffffffe000-0xffffffffffffefff] pci 0000:08:03.0: bridge 32bit mmio: [0xfcd00000-0xfcdfffff] pci 0000:08:03.0: bridge 64bit mmio pref: [0xfbd00000-0xfbdfffff] pci 0000:08:05.0: bridge io port: [0xffffffffffffd000-0xffffffffffffdfff] pci 0000:08:05.0: bridge 32bit mmio: [0xfcc00000-0xfccfffff] pci 0000:08:05.0: bridge 64bit mmio pref: [0xfbc00000-0xfbcfffff] pci 0000:08:09.0: bridge io port: [0xffffffffffffb000-0xffffffffffffbfff] pci 0000:08:09.0: bridge 32bit mmio: [0xfca00000-0xfcafffff] pci 0000:08:09.0: bridge 64bit mmio pref: [0xfba00000-0xfbafffff] pci 0000:08:0a.0: bridge io port: [0xffffffffffffa000-0xffffffffffffafff] pci 0000:08:0a.0: bridge 32bit mmio: [0xfc900000-0xfc9fffff] pci 0000:08:0a.0: bridge 64bit mmio pref: [0xfb900000-0xfb9fffff] pci 0000:08:0b.0: bridge io port: [0xffffffffffff9000-0xffffffffffff9fff] pci 0000:08:0b.0: bridge 32bit mmio: [0xfc800000-0xfc8fffff] pci 0000:08:0b.0: bridge 64bit mmio pref: [0xfb800000-0xfb8fffff] pci 0000:08:0c.0: bridge io port: [0xffffffffffff8000-0xffffffffffff8fff] pci 0000:08:0c.0: bridge 32bit mmio: [0xfc700000-0xfc7fffff] pci 0000:08:0c.0: bridge 64bit mmio pref: [0xfb700000-0xfb7fffff] pci 0000:08:0d.0: bridge io port: [0xffffffffffff7000-0xffffffffffff7fff] pci 0000:08:0d.0: bridge 32bit mmio: [0xfc600000-0xfc6fffff] pci 0000:08:0d.0: bridge 64bit mmio pref: [0xfb600000-0xfb6fffff] pci 0000:08:0e.0: bridge io port: [0xffffffffffff6000-0xffffffffffff6fff] pci 0000:08:0e.0: bridge 32bit mmio: [0xfc500000-0xfc5fffff] pci 0000:08:0e.0: bridge 64bit mmio pref: [0xfb500000-0xfb5fffff] pci 0000:08:0f.0: bridge io port: [0xffffffffffff5000-0xffffffffffff5fff] pci 0000:08:0f.0: bridge 32bit mmio: [0xfc400000-0xfc4fffff] pci 0000:08:0f.0: bridge 64bit mmio pref: [0xfb400000-0xfb4fffff] pci 0000:08:07.0: bridge io port: [0xffffffffffffc000-0xffffffffffffcfff] pci 0000:08:07.0: bridge 32bit mmio: [0xfcb00000-0xfcbfffff] pci 0000:08:07.0: bridge 64bit mmio pref: [0xfbb00000-0xfbbfffff] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT] ACPI: PCI Interrupt Link [LNK1] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNK2] (IRQs *5 7 9 10 11 14 15) ACPI: PCI Interrupt Link [LNK3] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNK4] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNK5] (IRQs 5 7 9 *10 11 14 15) ACPI: PCI Interrupt Link [LNK6] (IRQs 5 *7 9 10 11 14 15) ACPI: PCI Interrupt Link [LNK7] (IRQs *5 7 9 10 11 14 15) ACPI: PCI Interrupt Link [LNK8] (IRQs 5 7 9 10 *11 14 15) ACPI: PCI Interrupt Link [LP2P] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LUBA] (IRQs 5 7 9 10 *11 14 15) ACPI: PCI Interrupt Link [LMAC] (IRQs 5 7 9 *10 11 14 15) ACPI: PCI Interrupt Link [LMC1] (IRQs 5 7 9 10 *11 14 15) ACPI: PCI Interrupt Link [LAZA] (IRQs 5 *7 9 10 11 14 15) ACPI: PCI Interrupt Link [LPMU] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LSMB] (IRQs 5 7 9 *10 11 14 15) ACPI: PCI Interrupt Link [LUB2] (IRQs 5 *7 9 10 11 14 15) ACPI: PCI Interrupt Link [LIDE] (IRQs 5 7 9 10 11 14 15) *0, disabled. ACPI: PCI Interrupt Link [LSID] (IRQs 5 7 9 10 *11 14 15) ACPI: PCI Interrupt Link [LFID] (IRQs *5 7 9 10 11 14 15) ACPI: PCI Interrupt Link [LSA2] (IRQs 5 7 9 *10 11 14 15) ACPI: PCI Interrupt Link [APC1] (IRQs 16) *0, disabled. ACPI: PCI Interrupt Link [APC2] (IRQs 17) *0 ACPI: PCI Interrupt Link [APC3] (IRQs 18) *0, disabled. ACPI: PCI Interrupt Link [APC4] (IRQs 19) *0, disabled. ACPI: PCI Interrupt Link [APC5] (IRQs 16) *0 ACPI: PCI Interrupt Link [APC6] (IRQs 16) *0 ACPI: PCI Interrupt Link [APC7] (IRQs 16) *0 ACPI: PCI Interrupt Link [APC8] (IRQs 16) *0 ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [AMC1] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APMU] (IRQs 20 21 22 23) *0, disabled. ACPI: PCI Interrupt Link [AAZA] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APCS] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22 23) *0, disabled. ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22 23) *0, disabled. ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [APSJ] (IRQs 20 21 22 23) *0 ACPI: PCI Interrupt Link [ASA2] (IRQs 20 21 22 23) *0 vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none vgaarb: loaded usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb PCI: Using ACPI for IRQ routing pci 0000:08:01.0: BAR 13: can't allocate resource pci 0000:09:00.0: BAR 13: can't allocate resource pci 0000:0a:01.0: BAR 13: no parent found for of bridge [0x4000-0x4fff] pci 0000:0a:01.0: BAR 13: can't allocate resource pci 0000:0a:04.0: BAR 13: no parent found for of bridge [0x3000-0x3fff] pci 0000:0a:04.0: BAR 13: can't allocate resource pci 0000:0a:05.0: BAR 13: no parent found for of bridge [0x2000-0x2fff] pci 0000:0a:05.0: BAR 13: can't allocate resource pci 0000:0a:09.0: BAR 13: can't allocate resource pci 0000:0a:07.0: BAR 13: no parent found for of bridge [0x1000-0x1fff] pci 0000:0a:07.0: BAR 13: can't allocate resource pci 0000:08:03.0: BAR 13: no parent found for of bridge [0xffffffffffffe000-0xffffffffffffefff] pci 0000:08:03.0: BAR 13: can't allocate resource pci 0000:08:05.0: BAR 13: no parent found for of bridge [0xffffffffffffd000-0xffffffffffffdfff] pci 0000:08:05.0: BAR 13: can't allocate resource pci 0000:08:09.0: BAR 13: no parent found for of bridge [0xffffffffffffb000-0xffffffffffffbfff] pci 0000:08:09.0: BAR 13: can't allocate resource pci 0000:08:0a.0: BAR 13: no parent found for of bridge [0xffffffffffffa000-0xffffffffffffafff] pci 0000:08:0a.0: BAR 13: can't allocate resource pci 0000:08:0b.0: BAR 13: no parent found for of bridge [0xffffffffffff9000-0xffffffffffff9fff] pci 0000:08:0b.0: BAR 13: can't allocate resource pci 0000:08:0c.0: BAR 13: no parent found for of bridge [0xffffffffffff8000-0xffffffffffff8fff] pci 0000:08:0c.0: BAR 13: can't allocate resource pci 0000:08:0d.0: BAR 13: no parent found for of bridge [0xffffffffffff7000-0xffffffffffff7fff] pci 0000:08:0d.0: BAR 13: can't allocate resource pci 0000:08:0e.0: BAR 13: no parent found for of bridge [0xffffffffffff6000-0xffffffffffff6fff] pci 0000:08:0e.0: BAR 13: can't allocate resource pci 0000:08:0f.0: BAR 13: no parent found for of bridge [0xffffffffffff5000-0xffffffffffff5fff] pci 0000:08:0f.0: BAR 13: can't allocate resource pci 0000:08:07.0: BAR 13: no parent found for of bridge [0xffffffffffffc000-0xffffffffffffcfff] pci 0000:08:07.0: BAR 13: can't allocate resource pci 0000:0b:00.0: BAR 2: no parent found for of device [0x4c00-0x4c1f] pci 0000:0b:00.0: BAR 2: can't allocate resource pci 0000:0b:00.1: BAR 2: no parent found for of device [0x4800-0x481f] pci 0000:0b:00.1: BAR 2: can't allocate resource pci 0000:0c:00.0: BAR 2: no parent found for of device [0x3c00-0x3c1f] pci 0000:0c:00.0: BAR 2: can't allocate resource pci 0000:0c:00.1: BAR 2: no parent found for of device [0x3800-0x381f] pci 0000:0c:00.1: BAR 2: can't allocate resource NetLabel: Initializing NetLabel: domain hash size = 128 NetLabel: protocols = UNLABELED CIPSOv4 NetLabel: unlabeled traffic allowed by default Switching to clocksource jiffies pnp: PnP ACPI init ACPI: bus type pnp registered pnp 00:02: io resource (0x10-0x1f) overlaps 0000:0b:00.0 BAR 2 (0x0-0x1f), disabling pnp 00:02: io resource (0x10-0x1f) overlaps 0000:0b:00.1 BAR 2 (0x0-0x1f), disabling pnp 00:02: io resource (0x10-0x1f) overlaps 0000:0c:00.0 BAR 2 (0x0-0x1f), disabling pnp 00:02: io resource (0x10-0x1f) overlaps 0000:0c:00.1 BAR 2 (0x0-0x1f), disabling pnp: PnP ACPI: found 11 devices ACPI: ACPI bus type pnp unregistered system 00:01: ioport range 0x1000-0x107f has been reserved system 00:01: ioport range 0x1080-0x10ff has been reserved system 00:01: ioport range 0x1400-0x147f has been reserved system 00:01: ioport range 0x1480-0x14ff has been reserved system 00:01: ioport range 0x1800-0x187f has been reserved system 00:01: ioport range 0x1880-0x18ff has been reserved system 00:02: ioport range 0x4d0-0x4d1 has been reserved system 00:02: ioport range 0x295-0x296 has been reserved system 00:02: ioport range 0x800-0x87f has been reserved system 00:09: iomem range 0xf0000000-0xf3ffffff has been reserved system 00:0a: iomem range 0xd1800-0xd3fff has been reserved system 00:0a: iomem range 0xf0000-0xf7fff could not be reserved system 00:0a: iomem range 0xf8000-0xfbfff could not be reserved system 00:0a: iomem range 0xfc000-0xfffff could not be reserved system 00:0a: iomem range 0x3fee0000-0x3fefffff could not be reserved system 00:0a: iomem range 0xffff0000-0xffffffff has been reserved system 00:0a: iomem range 0x0-0x9ffff could not be reserved system 00:0a: iomem range 0x100000-0x3fedffff could not be reserved system 00:0a: iomem range 0xfec00000-0xfec00fff could not be reserved system 00:0a: iomem range 0xfee00000-0xfeefffff has been reserved system 00:0a: iomem range 0xfefff000-0xfeffffff has been reserved system 00:0a: iomem range 0xfff80000-0xfff80fff has been reserved system 00:0a: iomem range 0xfff90000-0xfffbffff has been reserved system 00:0a: iomem range 0xfffed000-0xfffeffff has been reserved Switching to clocksource acpi_pm kstop/0 used greatest stack depth: 6992 bytes left kstop/1 used greatest stack depth: 6944 bytes left pci 0000:00:04.0: PCI bridge, secondary bus 0000:01 pci 0000:00:04.0: IO window: disabled pci 0000:00:04.0: MEM window: 0xf8000000-0xfaffffff pci 0000:00:04.0: PREFETCH window: 0x000000e0000000-0x000000efffffff pci 0000:00:0e.0: PCI bridge, secondary bus 0000:02 pci 0000:00:0e.0: IO window: 0x9000-0x9fff pci 0000:00:0e.0: MEM window: 0xfde00000-0xfdefffff pci 0000:00:0e.0: PREFETCH window: disabled pci 0000:00:12.0: PCI bridge, secondary bus 0000:03 pci 0000:00:12.0: IO window: disabled pci 0000:00:12.0: MEM window: disabled pci 0000:00:12.0: PREFETCH window: disabled pci 0000:00:13.0: PCI bridge, secondary bus 0000:04 pci 0000:00:13.0: IO window: 0x7000-0x7fff pci 0000:00:13.0: MEM window: 0xfdb00000-0xfdbfffff pci 0000:00:13.0: PREFETCH window: 0x40000000-0x400fffff pci 0000:00:15.0: PCI bridge, secondary bus 0000:05 pci 0000:00:15.0: IO window: disabled pci 0000:00:15.0: MEM window: disabled pci 0000:00:15.0: PREFETCH window: disabled pci 0000:00:16.0: PCI bridge, secondary bus 0000:06 pci 0000:00:16.0: IO window: disabled pci 0000:00:16.0: MEM window: disabled pci 0000:00:16.0: PREFETCH window: disabled pci 0000:0a:01.0: PCI bridge, secondary bus 0000:0b pci 0000:0a:01.0: IO window: 0x2000-0x2fff pci 0000:0a:01.0: MEM window: 0xfd300000-0xfd3fffff pci 0000:0a:01.0: PREFETCH window: 0x40100000-0x402fffff pci 0000:0a:04.0: PCI bridge, secondary bus 0000:0c pci 0000:0a:04.0: IO window: 0x3000-0x3fff pci 0000:0a:04.0: MEM window: 0xfd200000-0xfd2fffff pci 0000:0a:04.0: PREFETCH window: 0x40300000-0x403fffff pci 0000:0a:05.0: PCI bridge, secondary bus 0000:0d pci 0000:0a:05.0: IO window: disabled pci 0000:0a:05.0: MEM window: disabled pci 0000:0a:05.0: PREFETCH window: disabled pci 0000:0a:07.0: PCI bridge, secondary bus 0000:10 pci 0000:0a:07.0: IO window: disabled pci 0000:0a:07.0: MEM window: disabled pci 0000:0a:07.0: PREFETCH window: disabled pci 0000:0a:09.0: PCI bridge, secondary bus 0000:0f pci 0000:0a:09.0: IO window: disabled pci 0000:0a:09.0: MEM window: disabled pci 0000:0a:09.0: PREFETCH window: disabled pci 0000:09:00.0: PCI bridge, secondary bus 0000:0a pci 0000:09:00.0: IO window: 0x2000-0x3fff pci 0000:09:00.0: MEM window: 0xfcf00000-0xfd3fffff pci 0000:09:00.0: PREFETCH window: 0x40100000-0x403fffff pci 0000:08:01.0: PCI bridge, secondary bus 0000:09 pci 0000:08:01.0: IO window: 0x2000-0x4fff pci 0000:08:01.0: MEM window: 0xfcf00000-0xfd4fffff pci 0000:08:01.0: PREFETCH window: 0x40100000-0x403fffff pci 0000:08:03.0: PCI bridge, secondary bus 0000:11 pci 0000:08:03.0: IO window: disabled pci 0000:08:03.0: MEM window: disabled pci 0000:08:03.0: PREFETCH window: disabled pci 0000:08:05.0: PCI bridge, secondary bus 0000:12 pci 0000:08:05.0: IO window: disabled pci 0000:08:05.0: MEM window: disabled pci 0000:08:05.0: PREFETCH window: disabled pci 0000:08:07.0: PCI bridge, secondary bus 0000:1b pci 0000:08:07.0: IO window: disabled pci 0000:08:07.0: MEM window: disabled pci 0000:08:07.0: PREFETCH window: disabled pci 0000:08:09.0: PCI bridge, secondary bus 0000:14 pci 0000:08:09.0: IO window: disabled pci 0000:08:09.0: MEM window: disabled pci 0000:08:09.0: PREFETCH window: disabled pci 0000:08:0a.0: PCI bridge, secondary bus 0000:15 pci 0000:08:0a.0: IO window: disabled pci 0000:08:0a.0: MEM window: disabled pci 0000:08:0a.0: PREFETCH window: disabled pci 0000:08:0b.0: PCI bridge, secondary bus 0000:16 pci 0000:08:0b.0: IO window: disabled pci 0000:08:0b.0: MEM window: disabled pci 0000:08:0b.0: PREFETCH window: disabled pci 0000:08:0c.0: PCI bridge, secondary bus 0000:17 pci 0000:08:0c.0: IO window: disabled pci 0000:08:0c.0: MEM window: disabled pci 0000:08:0c.0: PREFETCH window: disabled pci 0000:08:0d.0: PCI bridge, secondary bus 0000:18 pci 0000:08:0d.0: IO window: disabled pci 0000:08:0d.0: MEM window: disabled pci 0000:08:0d.0: PREFETCH window: disabled pci 0000:08:0e.0: PCI bridge, secondary bus 0000:19 pci 0000:08:0e.0: IO window: disabled pci 0000:08:0e.0: MEM window: disabled pci 0000:08:0e.0: PREFETCH window: disabled pci 0000:08:0f.0: PCI bridge, secondary bus 0000:1a pci 0000:08:0f.0: IO window: disabled pci 0000:08:0f.0: MEM window: disabled pci 0000:08:0f.0: PREFETCH window: disabled pci 0000:07:00.0: PCI bridge, secondary bus 0000:08 pci 0000:07:00.0: IO window: 0x2000-0x4fff pci 0000:07:00.0: MEM window: 0xfc400000-0xfd4fffff pci 0000:07:00.0: PREFETCH window: 0x40100000-0x403fffff pci 0000:00:17.0: PCI bridge, secondary bus 0000:07 pci 0000:00:17.0: IO window: 0x2000-0x4fff pci 0000:00:17.0: MEM window: 0xfc400000-0xfd5fffff pci 0000:00:17.0: PREFETCH window: 0x40100000-0x403fffff pci 0000:00:04.0: setting latency timer to 64 pci 0000:00:0e.0: setting latency timer to 64 pci 0000:00:12.0: setting latency timer to 64 pci 0000:00:13.0: setting latency timer to 64 pci 0000:00:15.0: setting latency timer to 64 pci 0000:00:16.0: setting latency timer to 64 pci 0000:00:17.0: setting latency timer to 64 ACPI: PCI Interrupt Link [APC6] enabled at IRQ 16 alloc irq_desc for 16 on node 0 alloc kstat_irqs on node 0 pci 0000:07:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16 pci 0000:07:00.0: setting latency timer to 64 ACPI: PCI Interrupt Link [APC7] enabled at IRQ 16 pci 0000:08:01.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:01.0: setting latency timer to 64 pci 0000:09:00.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:09:00.0: setting latency timer to 64 ACPI: PCI Interrupt Link [APC8] enabled at IRQ 16 pci 0000:0a:01.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 pci 0000:0a:01.0: setting latency timer to 64 pci 0000:0a:04.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:0a:04.0: setting latency timer to 64 pci 0000:0a:05.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 pci 0000:0a:05.0: setting latency timer to 64 pci 0000:0a:07.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16 pci 0000:0a:07.0: setting latency timer to 64 pci 0000:0a:09.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 pci 0000:0a:09.0: setting latency timer to 64 ACPI: PCI Interrupt Link [APC5] enabled at IRQ 16 pci 0000:08:03.0: PCI INT A -> Link[APC5] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:03.0: setting latency timer to 64 pci 0000:08:05.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:05.0: setting latency timer to 64 pci 0000:08:07.0: PCI INT A -> Link[APC5] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:07.0: setting latency timer to 64 pci 0000:08:09.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:09.0: setting latency timer to 64 pci 0000:08:0a.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0a.0: setting latency timer to 64 pci 0000:08:0b.0: PCI INT A -> Link[APC5] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0b.0: setting latency timer to 64 pci 0000:08:0c.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0c.0: setting latency timer to 64 pci 0000:08:0d.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0d.0: setting latency timer to 64 pci 0000:08:0e.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0e.0: setting latency timer to 64 pci 0000:08:0f.0: PCI INT A -> Link[APC5] -> GSI 16 (level, low) -> IRQ 16 pci 0000:08:0f.0: setting latency timer to 64 pci_bus 0000:00: resource 0 io: [0x00-0xffff] pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffffffffffff] pci_bus 0000:01: resource 0 mem: [0xa000-0xafff] pci_bus 0000:01: resource 1 mem: [0xf8000000-0xfaffffff] pci_bus 0000:01: resource 2 pref mem [0xe0000000-0xefffffff] pci_bus 0000:02: resource 0 io: [0x9000-0x9fff] pci_bus 0000:02: resource 1 mem: [0xfde00000-0xfdefffff] pci_bus 0000:02: resource 2 mem: [0xfdf00000-0xfdffffff] pci_bus 0000:02: resource 3 io: [0x00-0xffff] pci_bus 0000:02: resource 4 mem: [0x000000-0xffffffffffffffff] pci_bus 0000:03: resource 0 mem: [0x8000-0x8fff] pci_bus 0000:03: resource 1 mem: [0xfdd00000-0xfddfffff] pci_bus 0000:03: resource 2 mem: [0xfdc00000-0xfdcfffff] pci_bus 0000:04: resource 0 io: [0x7000-0x7fff] pci_bus 0000:04: resource 1 mem: [0xfdb00000-0xfdbfffff] pci_bus 0000:04: resource 2 pref mem [0x40000000-0x400fffff] pci_bus 0000:05: resource 0 mem: [0x6000-0x6fff] pci_bus 0000:05: resource 1 mem: [0xfd900000-0xfd9fffff] pci_bus 0000:05: resource 2 mem: [0xfd800000-0xfd8fffff] pci_bus 0000:06: resource 0 mem: [0x5000-0x5fff] pci_bus 0000:06: resource 1 mem: [0xfd700000-0xfd7fffff] pci_bus 0000:06: resource 2 mem: [0xfd600000-0xfd6fffff] pci_bus 0000:07: resource 0 io: [0x2000-0x4fff] pci_bus 0000:07: resource 1 mem: [0xfc400000-0xfd5fffff] pci_bus 0000:07: resource 2 pref mem [0x40100000-0x403fffff] pci_bus 0000:08: resource 0 io: [0x2000-0x4fff] pci_bus 0000:08: resource 1 mem: [0xfc400000-0xfd4fffff] pci_bus 0000:08: resource 2 pref mem [0x40100000-0x403fffff] pci_bus 0000:09: resource 0 io: [0x2000-0x4fff] pci_bus 0000:09: resource 1 mem: [0xfcf00000-0xfd4fffff] pci_bus 0000:09: resource 2 pref mem [0x40100000-0x403fffff] pci_bus 0000:0a: resource 0 io: [0x2000-0x3fff] pci_bus 0000:0a: resource 1 mem: [0xfcf00000-0xfd3fffff] pci_bus 0000:0a: resource 2 pref mem [0x40100000-0x403fffff] pci_bus 0000:0b: resource 0 io: [0x2000-0x2fff] pci_bus 0000:0b: resource 1 mem: [0xfd300000-0xfd3fffff] pci_bus 0000:0b: resource 2 pref mem [0x40100000-0x402fffff] pci_bus 0000:0c: resource 0 io: [0x3000-0x3fff] pci_bus 0000:0c: resource 1 mem: [0xfd200000-0xfd2fffff] pci_bus 0000:0c: resource 2 pref mem [0x40300000-0x403fffff] pci_bus 0000:0d: resource 0 mem: [0x2000-0x2fff] pci_bus 0000:0d: resource 1 mem: [0xfd100000-0xfd1fffff] pci_bus 0000:0d: resource 2 mem: [0xfc100000-0xfc1fffff] pci_bus 0000:10: resource 0 mem: [0x1000-0x1fff] pci_bus 0000:10: resource 1 mem: [0xfd000000-0xfd0fffff] pci_bus 0000:10: resource 2 mem: [0xfc000000-0xfc0fffff] pci_bus 0000:0f: resource 0 mem: [0x0-0xfff] pci_bus 0000:0f: resource 1 mem: [0xfcf00000-0xfcffffff] pci_bus 0000:0f: resource 2 mem: [0xfbf00000-0xfbffffff] pci_bus 0000:11: resource 0 mem: [0xffffffffffffe000-0xffffffffffffefff] pci_bus 0000:11: resource 1 mem: [0xfcd00000-0xfcdfffff] pci_bus 0000:11: resource 2 mem: [0xfbd00000-0xfbdfffff] pci_bus 0000:12: resource 0 mem: [0xffffffffffffd000-0xffffffffffffdfff] pci_bus 0000:12: resource 1 mem: [0xfcc00000-0xfccfffff] pci_bus 0000:12: resource 2 mem: [0xfbc00000-0xfbcfffff] pci_bus 0000:1b: resource 0 mem: [0xffffffffffffc000-0xffffffffffffcfff] pci_bus 0000:1b: resource 1 mem: [0xfcb00000-0xfcbfffff] pci_bus 0000:1b: resource 2 mem: [0xfbb00000-0xfbbfffff] pci_bus 0000:14: resource 0 mem: [0xffffffffffffb000-0xffffffffffffbfff] pci_bus 0000:14: resource 1 mem: [0xfca00000-0xfcafffff] pci_bus 0000:14: resource 2 mem: [0xfba00000-0xfbafffff] pci_bus 0000:15: resource 0 mem: [0xffffffffffffa000-0xffffffffffffafff] pci_bus 0000:15: resource 1 mem: [0xfc900000-0xfc9fffff] pci_bus 0000:15: resource 2 mem: [0xfb900000-0xfb9fffff] pci_bus 0000:16: resource 0 mem: [0xffffffffffff9000-0xffffffffffff9fff] pci_bus 0000:16: resource 1 mem: [0xfc800000-0xfc8fffff] pci_bus 0000:16: resource 2 mem: [0xfb800000-0xfb8fffff] pci_bus 0000:17: resource 0 mem: [0xffffffffffff8000-0xffffffffffff8fff] pci_bus 0000:17: resource 1 mem: [0xfc700000-0xfc7fffff] pci_bus 0000:17: resource 2 mem: [0xfb700000-0xfb7fffff] pci_bus 0000:18: resource 0 mem: [0xffffffffffff7000-0xffffffffffff7fff] pci_bus 0000:18: resource 1 mem: [0xfc600000-0xfc6fffff] pci_bus 0000:18: resource 2 mem: [0xfb600000-0xfb6fffff] pci_bus 0000:19: resource 0 mem: [0xffffffffffff6000-0xffffffffffff6fff] pci_bus 0000:19: resource 1 mem: [0xfc500000-0xfc5fffff] pci_bus 0000:19: resource 2 mem: [0xfb500000-0xfb5fffff] pci_bus 0000:1a: resource 0 mem: [0xffffffffffff5000-0xffffffffffff5fff] pci_bus 0000:1a: resource 1 mem: [0xfc400000-0xfc4fffff] pci_bus 0000:1a: resource 2 mem: [0xfb400000-0xfb4fffff] NET: Registered protocol family 2 IP route cache hash table entries: 32768 (order: 6, 262144 bytes) TCP established hash table entries: 131072 (order: 9, 2097152 bytes) TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) TCP: Hash tables configured (established 131072 bind 65536) TCP reno registered NET: Registered protocol family 1 pci 0000:00:00.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:00:08.0: Found enabled HT MSI Mapping pci 0000:01:00.0: Boot video device Trying to unpack rootfs image as initramfs... Freeing initrd memory: 3023k freed audit: initializing netlink socket (disabled) type=2000 audit(1258486762.540:1): initialized HugeTLB registered 2 MB page size, pre-allocated 0 pages VFS: Disk quotas dquot_6.5.2 Dquot-cache hash table entries: 512 (order 0, 4096 bytes) msgmni has been set to 1744 SELinux: Registering netfilter hooks cryptomgr_test used greatest stack depth: 6128 bytes left cryptomgr_test used greatest stack depth: 5944 bytes left alg: No test for stdrng (krng) Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) alloc irq_desc for 24 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:04.0: irq 24 for MSI/MSI-X pcieport 0000:00:04.0: setting latency timer to 64 alloc irq_desc for 25 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:12.0: irq 25 for MSI/MSI-X pcieport 0000:00:12.0: setting latency timer to 64 alloc irq_desc for 26 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:13.0: irq 26 for MSI/MSI-X pcieport 0000:00:13.0: setting latency timer to 64 alloc irq_desc for 27 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:15.0: irq 27 for MSI/MSI-X pcieport 0000:00:15.0: setting latency timer to 64 alloc irq_desc for 28 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:16.0: irq 28 for MSI/MSI-X pcieport 0000:00:16.0: setting latency timer to 64 alloc irq_desc for 29 on node 0 alloc kstat_irqs on node 0 pcieport 0000:00:17.0: irq 29 for MSI/MSI-X pcieport 0000:00:17.0: setting latency timer to 64 alloc irq_desc for 30 on node 0 alloc kstat_irqs on node 0 pcieport 0000:07:00.0: irq 30 for MSI/MSI-X pcieport 0000:07:00.0: setting latency timer to 64 alloc irq_desc for 31 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:01.0: irq 31 for MSI/MSI-X pcieport 0000:08:01.0: setting latency timer to 64 alloc irq_desc for 32 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:02.0: irq 32 for MSI/MSI-X pcieport 0000:08:02.0: setting latency timer to 64 alloc irq_desc for 33 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:03.0: irq 33 for MSI/MSI-X pcieport 0000:08:03.0: setting latency timer to 64 alloc irq_desc for 34 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:05.0: irq 34 for MSI/MSI-X pcieport 0000:08:05.0: setting latency timer to 64 work_for_cpu used greatest stack depth: 5936 bytes left alloc irq_desc for 35 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:07.0: irq 35 for MSI/MSI-X pcieport 0000:08:07.0: setting latency timer to 64 alloc irq_desc for 36 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:09.0: irq 36 for MSI/MSI-X pcieport 0000:08:09.0: setting latency timer to 64 alloc irq_desc for 37 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0a.0: irq 37 for MSI/MSI-X pcieport 0000:08:0a.0: setting latency timer to 64 alloc irq_desc for 38 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0b.0: irq 38 for MSI/MSI-X pcieport 0000:08:0b.0: setting latency timer to 64 alloc irq_desc for 39 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0c.0: irq 39 for MSI/MSI-X pcieport 0000:08:0c.0: setting latency timer to 64 alloc irq_desc for 40 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0d.0: irq 40 for MSI/MSI-X pcieport 0000:08:0d.0: setting latency timer to 64 alloc irq_desc for 41 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0e.0: irq 41 for MSI/MSI-X pcieport 0000:08:0e.0: setting latency timer to 64 alloc irq_desc for 42 on node 0 alloc kstat_irqs on node 0 pcieport 0000:08:0f.0: irq 42 for MSI/MSI-X pcieport 0000:08:0f.0: setting latency timer to 64 alloc irq_desc for 43 on node 0 alloc kstat_irqs on node 0 pcieport 0000:09:00.0: irq 43 for MSI/MSI-X pcieport 0000:09:00.0: setting latency timer to 64 alloc irq_desc for 44 on node 0 alloc kstat_irqs on node 0 pcieport 0000:0a:01.0: irq 44 for MSI/MSI-X pcieport 0000:0a:01.0: setting latency timer to 64 alloc irq_desc for 45 on node 0 alloc kstat_irqs on node 0 pcieport 0000:0a:04.0: irq 45 for MSI/MSI-X pcieport 0000:0a:04.0: setting latency timer to 64 alloc irq_desc for 46 on node 0 alloc kstat_irqs on node 0 pcieport 0000:0a:05.0: irq 46 for MSI/MSI-X pcieport 0000:0a:05.0: setting latency timer to 64 alloc irq_desc for 47 on node 0 alloc kstat_irqs on node 0 pcieport 0000:0a:07.0: irq 47 for MSI/MSI-X pcieport 0000:0a:07.0: setting latency timer to 64 alloc irq_desc for 48 on node 0 alloc kstat_irqs on node 0 pcieport 0000:0a:09.0: irq 48 for MSI/MSI-X pcieport 0000:0a:09.0: setting latency timer to 64 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 ACPI: Power Button [PWRB] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1 ACPI: Power Button [PWRF] fan PNP0C0B:00: registered as cooling_device0 ACPI: Fan [FAN] (on) processor LNXCPU:00: registered as cooling_device1 processor LNXCPU:01: registered as cooling_device2 thermal LNXTHERM:01: registered as thermal_zone0 ACPI: Thermal Zone [THRM] (38 C) Non-volatile memory driver v1.3 Linux agpgart interface v0.103 Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A brd: module loaded input: Macintosh mouse button emulation as /devices/virtual/input/input2 PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1 PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp serio: i8042 KBD port at 0x60,0x64 irq 1 mice: PS/2 mouse device common for all mice Driver 'rtc_cmos' needs updating - please use bus_type methods rtc_cmos 00:04: RTC can wake from S4 rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0 rtc0: alarms up to one year, y3k, 242 bytes nvram sbc_fitpc2_wdt WATCHDOG: board name is: LP UT NF590 SLI. Should be SBC-FITPC2 cpuidle: using governor ladder cpuidle: using governor menu usbcore: registered new interface driver hiddev usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver TCP cubic registered Initializing XFRM netlink socket NET: Registered protocol family 17 PM: Resume from disk failed. registered taskstats version 1 Freeing unused kernel memory: 1328k freed Write protecting the kernel read-only data: 5576k input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3 plymouthd used greatest stack depth: 5832 bytes left modprobe used greatest stack depth: 5592 bytes left ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci_hcd: block sizes: qh 104 qtd 96 itd 192 sitd 96 ACPI: PCI Interrupt Link [APCL] enabled at IRQ 23 alloc irq_desc for 23 on node 0 alloc kstat_irqs on node 0 ehci_hcd 0000:00:0a.1: PCI INT B -> Link[APCL] -> GSI 23 (level, low) -> IRQ 23 ehci_hcd 0000:00:0a.1: setting latency timer to 64 ehci_hcd 0000:00:0a.1: EHCI Host Controller /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file 'devices' /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '001' ehci_hcd 0000:00:0a.1: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:0a.1: reset hcs_params 0x101a8a dbg=1 cc=1 pcc=10 !ppc ports=10 ehci_hcd 0000:00:0a.1: reset portroute 0 0 0 0 0 0 0 0 0 0 ehci_hcd 0000:00:0a.1: reset hcc_params a086 caching frame 256/512/1024 park ehci_hcd 0000:00:0a.1: park 0 ehci_hcd 0000:00:0a.1: debug port 1 ehci_hcd 0000:00:0a.1: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:00:0a.1: cache line size of 64 is not supported ehci_hcd 0000:00:0a.1: supports USB remote wakeup ehci_hcd 0000:00:0a.1: irq 23, io mem 0xfe02e000 ehci_hcd 0000:00:0a.1: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:00:0a.1: init command 010009 (park)=0 ithresh=1 period=256 RUN ehci_hcd 0000:00:0a.1: USB 2.0 started, EHCI 1.00 usb usb1: default language 0x0409 usb usb1: udev 1, busnum 1, minor = 0 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.32-rc5 ehci_hcd usb usb1: SerialNumber: 0000:00:0a.1 usb usb1: uevent usb usb1: usb_probe_device usb usb1: configuration #1 chosen from 1 choice usb usb1: adding 1-0:1.0 (config #1, interface 0) usb 1-0:1.0: uevent hub 1-0:1.0: usb_probe_interface hub 1-0:1.0: usb_probe_interface - got id hub 1-0:1.0: USB hub found hub 1-0:1.0: 10 ports detected hub 1-0:1.0: standalone hub hub 1-0:1.0: no power switching (usb 1.0) hub 1-0:1.0: individual port over-current protection hub 1-0:1.0: power on to power good time: 20ms hub 1-0:1.0: local power source is good hub 1-0:1.0: trying to enable port power on non-switchable hub /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '001' work_for_cpu used greatest stack depth: 4800 bytes left ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci_hcd: block sizes: ed 80 td 96 ACPI: PCI Interrupt Link [APCF] enabled at IRQ 22 alloc irq_desc for 22 on node 0 alloc kstat_irqs on node 0 ohci_hcd 0000:00:0a.0: PCI INT A -> Link[APCF] -> GSI 22 (level, low) -> IRQ 22 ohci_hcd 0000:00:0a.0: setting latency timer to 64 ohci_hcd 0000:00:0a.0: OHCI Host Controller /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '002' ohci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 2 ohci_hcd 0000:00:0a.0: created debug files ohci_hcd 0000:00:0a.0: supports USB remote wakeup ohci_hcd 0000:00:0a.0: irq 22, io mem 0xfe02f000 ohci_hcd 0000:00:0a.0: OHCI controller state ohci_hcd 0000:00:0a.0: OHCI 1.0, NO legacy support registers ohci_hcd 0000:00:0a.0: control 0x683 RWE RWC HCFS=operational CBSR=3 ohci_hcd 0000:00:0a.0: cmdstatus 0x00000 SOC=0 ohci_hcd 0000:00:0a.0: intrstatus 0x00000004 SF ohci_hcd 0000:00:0a.0: intrenable 0x8000004a MIE RHSC RD WDH ohci_hcd 0000:00:0a.0: hcca frame #0003 ohci_hcd 0000:00:0a.0: roothub.a 0100020a POTPGT=1 NPS NDP=10(10) ohci_hcd 0000:00:0a.0: roothub.b 00000000 PPCM=0000 DR=0000 ohci_hcd 0000:00:0a.0: roothub.status 00008000 DRWE ohci_hcd 0000:00:0a.0: roothub.portstatus [0] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [1] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [2] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [3] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [4] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [5] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [6] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [7] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [8] 0x00000100 PPS ohci_hcd 0000:00:0a.0: roothub.portstatus [9] 0x00000100 PPS usb usb2: default language 0x0409 usb usb2: udev 1, busnum 2, minor = 128 usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: OHCI Host Controller usb usb2: Manufacturer: Linux 2.6.32-rc5 ohci_hcd usb usb2: SerialNumber: 0000:00:0a.0 usb usb2: uevent usb usb2: usb_probe_device usb usb2: configuration #1 chosen from 1 choice usb usb2: adding 2-0:1.0 (config #1, interface 0) usb 2-0:1.0: uevent hub 2-0:1.0: usb_probe_interface hub 2-0:1.0: usb_probe_interface - got id hub 2-0:1.0: USB hub found hub 2-0:1.0: 10 ports detected hub 2-0:1.0: standalone hub hub 2-0:1.0: no power switching (usb 1.0) hub 2-0:1.0: global over-current protection hub 2-0:1.0: power on to power good time: 2ms hub 2-0:1.0: local power source is good hub 2-0:1.0: no over-current condition exists hub 2-0:1.0: trying to enable port power on non-switchable hub /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '001' uhci_hcd: USB Universal Host Controller Interface driver ehci_hcd 0000:00:0a.1: GetStatus port 5 status 001803 POWER sig=j CSC CONNECT hub 1-0:1.0: port 5: status 0501 change 0001 ehci_hcd 0000:00:0a.1: GetStatus port 9 status 001803 POWER sig=j CSC CONNECT hub 1-0:1.0: port 9: status 0501 change 0001 SCSI subsystem initialized libata version 3.00 loaded. sata_nv 0000:00:0d.0: version 3.5 ACPI: PCI Interrupt Link [APSI] enabled at IRQ 21 alloc irq_desc for 21 on node 0 alloc kstat_irqs on node 0 sata_nv 0000:00:0d.0: PCI INT A -> Link[APSI] -> GSI 21 (level, low) -> IRQ 21 sata_nv 0000:00:0d.0: Using SWNCQ mode sata_nv 0000:00:0d.0: setting latency timer to 64 scsi0 : sata_nv scsi1 : sata_nv ata1: SATA max UDMA/133 cmd 0x9f0 ctl 0xbf0 bmdma 0xe000 irq 21 ata2: SATA max UDMA/133 cmd 0x970 ctl 0xb70 bmdma 0xe008 irq 21 work_for_cpu used greatest stack depth: 4704 bytes left ACPI: PCI Interrupt Link [APSJ] enabled at IRQ 20 alloc irq_desc for 20 on node 0 alloc kstat_irqs on node 0 sata_nv 0000:00:0d.1: PCI INT B -> Link[APSJ] -> GSI 20 (level, low) -> IRQ 20 sata_nv 0000:00:0d.1: Using SWNCQ mode sata_nv 0000:00:0d.1: setting latency timer to 64 scsi2 : sata_nv scsi3 : sata_nv ata3: SATA max UDMA/133 cmd 0x9e0 ctl 0xbe0 bmdma 0xcc00 irq 20 ata4: SATA max UDMA/133 cmd 0x960 ctl 0xb60 bmdma 0xcc08 irq 20 ACPI: PCI Interrupt Link [ASA2] enabled at IRQ 23 sata_nv 0000:00:0d.2: PCI INT C -> Link[ASA2] -> GSI 23 (level, low) -> IRQ 23 sata_nv 0000:00:0d.2: Using SWNCQ mode sata_nv 0000:00:0d.2: setting latency timer to 64 scsi4 : sata_nv scsi5 : sata_nv ata5: SATA max UDMA/133 cmd 0xc800 ctl 0xc400 bmdma 0xb800 irq 23 ata6: SATA max UDMA/133 cmd 0xc000 ctl 0xbc00 bmdma 0xb808 irq 23 ata3: SATA link down (SStatus 0 SControl 300) ata5: SATA link down (SStatus 0 SControl 300) hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0000 hub 1-0:1.0: state 7 ports 10 chg 0220 evt 0000 hub 1-0:1.0: port 5, status 0501, change 0000, 480 Mb/s ehci_hcd 0000:00:0a.1: port 5 high speed ehci_hcd 0000:00:0a.1: GetStatus port 5 status 001005 POWER sig=se0 PE CONNECT ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata1.00: ATA-7: Maxtor 6L080M0, BANC1GA0, max UDMA/133 ata1.00: 160836480 sectors, multi 16: LBA48 NCQ (not used) usb 1-5: new high speed USB device using ehci_hcd and address 2 ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA Maxtor 6L080M0 BANC PQ: 0 ANSI: 5 ata1.00: Disabling SWNCQ mode (depth 1) sd 0:0:0:0: [sda] 160836480 512-byte logical blocks: (82.3 GB/76.6 GiB) ata2: SATA link down (SStatus 0 SControl 300) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: ata4: SATA link down (SStatus 0 SControl 300) sda1 sda2 sda3 ata6: SATA link down (SStatus 0 SControl 300) sd 0:0:0:0: [sda] Attached SCSI disk pata_acpi 0000:00:0c.0: setting latency timer to 64 ehci_hcd 0000:00:0a.1: port 5 high speed ehci_hcd 0000:00:0a.1: GetStatus port 5 status 001005 POWER sig=se0 PE CONNECT usb 1-5: udev 2, busnum 1, minor = 1 usb 1-5: New USB device found, idVendor=0424, idProduct=2507 usb 1-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0 usb 1-5: uevent usb 1-5: usb_probe_device usb 1-5: configuration #1 chosen from 1 choice usb 1-5: adding 1-5:1.0 (config #1, interface 0) usb 1-5:1.0: uevent hub 1-5:1.0: usb_probe_interface hub 1-5:1.0: usb_probe_interface - got id hub 1-5:1.0: USB hub found hub 1-5:1.0: 7 ports detected hub 1-5:1.0: standalone hub hub 1-5:1.0: individual port power switching hub 1-5:1.0: individual port over-current protection hub 1-5:1.0: TT per port hub 1-5:1.0: TT requires at most 8 FS bit times (666 ns) hub 1-5:1.0: power on to power good time: 100ms hub 1-5:1.0: local power source is good hub 1-5:1.0: enabling power on all ports /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '002' hub 1-0:1.0: port 9, status 0501, change 0000, 480 Mb/s ehci_hcd 0000:00:0a.1: port 9 high speed ehci_hcd 0000:00:0a.1: GetStatus port 9 status 001005 POWER sig=se0 PE CONNECT kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. hub 1-5:1.0: port 1: status 0101 change 0001 hub 1-5:1.0: port 2: status 0101 change 0001 hub 1-5:1.0: port 3: status 0101 change 0001 hub 1-5:1.0: port 4: status 0101 change 0001 hub 1-5:1.0: port 5: status 0101 change 0001 hub 1-5:1.0: port 6: status 0101 change 0001 hub 1-5:1.0: port 7: status 0101 change 0001 usb 1-9: new high speed USB device using ehci_hcd and address 3 ehci_hcd 0000:00:0a.1: port 9 high speed ehci_hcd 0000:00:0a.1: GetStatus port 9 status 001005 POWER sig=se0 PE CONNECT SELinux: Disabled at runtime. SELinux: Unregistering netfilter hooks usb 1-5: link qh256-0001/ffff880037d12480 start 1 [1/0 us] type=1404 audit(1258486763.841:2): selinux=0 auid=4294967295 ses=4294967295 usb 1-9: udev 3, busnum 1, minor = 2 usb 1-9: New USB device found, idVendor=0424, idProduct=2507 usb 1-9: New USB device strings: Mfr=0, Product=0, SerialNumber=0 usb 1-9: uevent usb 1-9: usb_probe_device usb 1-9: configuration #1 chosen from 1 choice usb 1-9: adding 1-9:1.0 (config #1, interface 0) usb 1-9:1.0: uevent hub 1-9:1.0: usb_probe_interface hub 1-9:1.0: usb_probe_interface - got id hub 1-9:1.0: USB hub found hub 1-9:1.0: 7 ports detected hub 1-9:1.0: standalone hub hub 1-9:1.0: individual port power switching hub 1-9:1.0: individual port over-current protection hub 1-9:1.0: TT per port hub 1-9:1.0: TT requires at most 8 FS bit times (666 ns) hub 1-9:1.0: power on to power good time: 100ms hub 1-9:1.0: local power source is good hub 1-9:1.0: enabling power on all ports /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '003' hub 1-5:1.0: state 7 ports 7 chg 00fe evt 0000 hub 1-5:1.0: port 1, status 0101, change 0000, 12 Mb/s hub 1-5:1.0: port 1 not reset yet, waiting 10ms usb 1-5.1: new full speed USB device using ehci_hcd and address 4 hub 1-9:1.0: port 1: status 0101 change 0001 hub 1-9:1.0: port 2: status 0101 change 0001 hub 1-9:1.0: port 3: status 0101 change 0001 hub 1-9:1.0: port 4: status 0101 change 0001 hub 1-9:1.0: port 5: status 0101 change 0001 hub 1-9:1.0: port 6: status 0101 change 0001 hub 1-9:1.0: port 7: status 0101 change 0001 hub 1-5:1.0: port 1 not reset yet, waiting 10ms usb 1-5.1: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 1, a4 ep0 t800a0d42 usb 1-5: clear tt buffer port 1, a4 ep0 t800a0d42 usb 1-5: clear tt buffer port 1, a4 ep0 t800a0d42 usb 1-9: link qh256-0001/ffff880037d12600 start 2 [1/0 us] usb 1-5.1: default language 0x0409 usb 1-5.1: udev 4, busnum 1, minor = 3 usb 1-5.1: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.1: Product: USB FAST SERIAL ADAPTER usb 1-5.1: Manufacturer: FTDI usb 1-5.1: SerialNumber: FT5SQ75V usb 1-5.1: uevent usb 1-5.1: usb_probe_device usb 1-5.1: configuration #1 chosen from 1 choice usb 1-5.1: adding 1-5.1:1.0 (config #1, interface 0) usb 1-5.1:1.0: uevent usb 1-5.1: adding 1-5.1:1.1 (config #1, interface 1) usb 1-5.1:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '004' hub 1-5:1.0: port 2, status 0101, change 0000, 12 Mb/s hub 1-5:1.0: port 2 not reset yet, waiting 10ms usb 1-5.2: new full speed USB device using ehci_hcd and address 5 usb 1-5.2: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 2, a5 ep0 t800a0d42 usb 1-5: clear tt buffer port 2, a5 ep0 t800a0d42 usb 1-5: clear tt buffer port 2, a5 ep0 t800a0d42 usb 1-5.2: default language 0x0409 usb 1-5.2: udev 5, busnum 1, minor = 4 usb 1-5.2: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.2: Product: USB FAST SERIAL ADAPTER usb 1-5.2: Manufacturer: FTDI usb 1-5.2: SerialNumber: FT5SQ764 usb 1-5.2: uevent usb 1-5.2: usb_probe_device usb 1-5.2: configuration #1 chosen from 1 choice usb 1-5.2: adding 1-5.2:1.0 (config #1, interface 0) usb 1-5.2:1.0: uevent usb 1-5.2: adding 1-5.2:1.1 (config #1, interface 1) usb 1-5.2:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '005' hub 1-5:1.0: port 3, status 0101, change 0000, 12 Mb/s hub 1-5:1.0: port 3 not reset yet, waiting 10ms usb 1-5.3: new full speed USB device using ehci_hcd and address 6 runlevel used greatest stack depth: 4424 bytes left ohci_hcd 0000:00:0a.0: auto-stop root hub usb 1-5.3: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 3, a6 ep0 t800a0d42 usb 1-5: clear tt buffer port 3, a6 ep0 t800a0d42 usb 1-5: clear tt buffer port 3, a6 ep0 t800a0d42 usb 1-5.3: default language 0x0409 usb 1-5.3: udev 6, busnum 1, minor = 5 usb 1-5.3: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.3: Product: USB FAST SERIAL ADAPTER usb 1-5.3: Manufacturer: FTDI usb 1-5.3: SerialNumber: FT5SQ76C usb 1-5.3: uevent usb 1-5.3: usb_probe_device usb 1-5.3: configuration #1 chosen from 1 choice usb 1-5.3: adding 1-5.3:1.0 (config #1, interface 0) usb 1-5.3:1.0: uevent usb 1-5.3: adding 1-5.3:1.1 (config #1, interface 1) usb 1-5.3:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '006' hub 1-5:1.0: port 4, status 0101, change 0000, 12 Mb/s hub 1-5:1.0: port 4 not reset yet, waiting 10ms sh used greatest stack depth: 3576 bytes left usb 1-5.4: new full speed USB device using ehci_hcd and address 7 hub 1-5:1.0: port 4 not reset yet, waiting 10ms mount used greatest stack depth: 3544 bytes left usb 1-5.4: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 4, a7 ep0 t800a0d42 usb 1-5: clear tt buffer port 4, a7 ep0 t800a0d42 usb 1-5: clear tt buffer port 4, a7 ep0 t800a0d42 usb 1-5.4: default language 0x0409 usb 1-5.4: udev 7, busnum 1, minor = 6 usb 1-5.4: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.4: Product: USB FAST SERIAL ADAPTER usb 1-5.4: Manufacturer: FTDI usb 1-5.4: SerialNumber: FT5SQ76K usb 1-5.4: uevent usb 1-5.4: usb_probe_device usb 1-5.4: configuration #1 chosen from 1 choice usb 1-5.4: adding 1-5.4:1.0 (config #1, interface 0) usb 1-5.4:1.0: uevent usb 1-5.4: adding 1-5.4:1.1 (config #1, interface 1) usb 1-5.4:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '007' hub 1-5:1.0: port 5, status 0101, change 0000, 12 Mb/s usb 1-5.5: new full speed USB device using ehci_hcd and address 8 hub 1-5:1.0: port 5 not reset yet, waiting 10ms usb 1-5.5: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 5, a8 ep0 t800a0d42 usb 1-5: clear tt buffer port 5, a8 ep0 t800a0d42 usb 1-5: clear tt buffer port 5, a8 ep0 t800a0d42 usb 1-5.5: default language 0x0409 usb 1-5.5: udev 8, busnum 1, minor = 7 usb 1-5.5: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.5: Product: USB FAST SERIAL ADAPTER usb 1-5.5: Manufacturer: FTDI usb 1-5.5: SerialNumber: FT5SQ76U usb 1-5.5: uevent usb 1-5.5: usb_probe_device usb 1-5.5: configuration #1 chosen from 1 choice usb 1-5.5: adding 1-5.5:1.0 (config #1, interface 0) usb 1-5.5:1.0: uevent usb 1-5.5: adding 1-5.5:1.1 (config #1, interface 1) usb 1-5.5:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '008' hub 1-5:1.0: port 6, status 0101, change 0000, 12 Mb/s usb 1-5.6: new full speed USB device using ehci_hcd and address 9 hub 1-5:1.0: port 6 not reset yet, waiting 10ms usb 1-5.6: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 6, a9 ep0 t800a0d42 usb 1-5: clear tt buffer port 6, a9 ep0 t800a0d42 usb 1-5: clear tt buffer port 6, a9 ep0 t800a0d42 usb 1-5.6: default language 0x0409 usb 1-5.6: udev 9, busnum 1, minor = 8 usb 1-5.6: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.6: Product: USB FAST SERIAL ADAPTER usb 1-5.6: Manufacturer: FTDI usb 1-5.6: SerialNumber: FT5SQ772 usb 1-5.6: uevent usb 1-5.6: usb_probe_device usb 1-5.6: configuration #1 chosen from 1 choice usb 1-5.6: adding 1-5.6:1.0 (config #1, interface 0) usb 1-5.6:1.0: uevent usb 1-5.6: adding 1-5.6:1.1 (config #1, interface 1) usb 1-5.6:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '009' hub 1-5:1.0: port 7, status 0101, change 0000, 12 Mb/s hub 1-5:1.0: port 7 not reset yet, waiting 10ms usb 1-5.7: new full speed USB device using ehci_hcd and address 10 usb 1-5.7: ep0 maxpacket = 8 usb 1-5.7: default language 0x0409 usb 1-5.7: udev 10, busnum 1, minor = 9 usb 1-5.7: New USB device found, idVendor=05e3, idProduct=0604 usb 1-5.7: New USB device strings: Mfr=0, Product=1, SerialNumber=0 usb 1-5.7: Product: USB Hub usb 1-5.7: uevent usb 1-5.7: usb_probe_device usb 1-5.7: configuration #1 chosen from 1 choice usb 1-5.7: adding 1-5.7:1.0 (config #1, interface 0) usb 1-5.7:1.0: uevent hub 1-5.7:1.0: usb_probe_interface hub 1-5.7:1.0: usb_probe_interface - got id hub 1-5.7:1.0: USB hub found hub 1-5.7:1.0: 4 ports detected hub 1-5.7:1.0: standalone hub hub 1-5.7:1.0: ganged power switching hub 1-5.7:1.0: global over-current protection hub 1-5.7:1.0: power on to power good time: 100ms hub 1-5.7:1.0: local power source is good hub 1-5.7:1.0: no over-current condition exists hub 1-5.7:1.0: enabling power on all ports /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '010' hub 1-5:1.0: state 7 ports 7 chg 0000 evt ff80 hub 1-9:1.0: state 7 ports 7 chg 00fe evt 0000 hub 1-9:1.0: port 1, status 0101, change 0000, 12 Mb/s udev: starting version 141 usb 1-5.7: uevent usb 1-9.1: new full speed USB device using ehci_hcd and address 11 hub 1-9:1.0: port 1 not reset yet, waiting 10ms hub 1-5.7:1.0: port 1: status 0101 change 0001 hub 1-5.7:1.0: port 2: status 0101 change 0001 usb 1-9.1: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 1, a11 ep0 t800a0d42 usb 1-9: clear tt buffer port 1, a11 ep0 t800a0d42 usb 1-9: clear tt buffer port 1, a11 ep0 t800a0d42 usb usb2: uevent usb 2-0:1.0: uevent usb usb1: uevent usb 1-0:1.0: uevent usb 1-5: uevent usb 1-5.1: uevent usb 1-5.1:1.0: uevent usb 1-5.1:1.1: uevent usb 1-5.2: uevent usb 1-5.2:1.0: uevent usb 1-5.2:1.1: uevent usb 1-5.3: uevent usb 1-5.3:1.0: uevent usb 1-5.3:1.1: uevent usb 1-5.4: uevent usb 1-5.4:1.0: uevent usb 1-5.4:1.1: uevent usb 1-5.5: uevent usb 1-5.5:1.0: uevent usb 1-5.5:1.1: uevent usb 1-5.6: uevent usb 1-5.6:1.0: uevent usb 1-5.6:1.1: uevent usb 1-5.7: uevent usb 1-5.7:1.0: uevent usb 1-5:1.0: uevent usb 1-9: uevent usb 1-9:1.0: uevent usb 1-9.1: default language 0x0409 usb 1-9.1: udev 11, busnum 1, minor = 10 usb 1-9.1: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.1: Product: USB FAST SERIAL ADAPTER usb 1-9.1: Manufacturer: FTDI usb 1-9.1: SerialNumber: FT5PAFU7 usb 1-9.1: uevent usb 1-9.1: usb_probe_device usb 1-9.1: configuration #1 chosen from 1 choice usb 1-9.1: adding 1-9.1:1.0 (config #1, interface 0) usb 1-9.1:1.0: uevent usb 1-9.1: adding 1-9.1:1.1 (config #1, interface 1) usb 1-9.1:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '011' hub 1-9:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 1-5.7: link qh128-0e01/ffff88003e9ce680 start 3 [1/2 us] usb usb2: uevent hub 1-9:1.0: port 2 not reset yet, waiting 10ms usb usb1: uevent usb 1-9: uevent usb 1-5: uevent usb 1-5.3: uevent usb 1-5.1: uevent usb 1-5.4: uevent usb 1-5.2: uevent usb 1-5.6: uevent usb 1-5.5: uevent usb 1-5.7: uevent usb 1-9.2: new full speed USB device using ehci_hcd and address 12 hub 1-9:1.0: port 2 not reset yet, waiting 10ms usb 1-9.1: uevent sd 0:0:0:0: Attached scsi generic sg0 type 0 usb 1-9.2: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 2, a12 ep0 t800a0d42 usb 1-9: clear tt buffer port 2, a12 ep0 t800a0d42 usb 1-9: clear tt buffer port 2, a12 ep0 t800a0d42 usb 1-9.2: default language 0x0409 usb 1-9.2: udev 12, busnum 1, minor = 11 usb 1-9.2: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.2: Product: USB FAST SERIAL ADAPTER usb 1-9.2: Manufacturer: FTDI usb 1-9.2: SerialNumber: FT5PAFUG usb 1-9.2: uevent usb 1-9.2: usb_probe_device usb 1-9.2: configuration #1 chosen from 1 choice usb 1-9.2: adding 1-9.2:1.0 (config #1, interface 0) usb 1-9.2:1.0: uevent usb 1-9.2: adding 1-9.2:1.1 (config #1, interface 1) usb 1-9.2:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '012' hub 1-9:1.0: port 3, status 0101, change 0000, 12 Mb/s usb 1-9.3: new full speed USB device using ehci_hcd and address 13 sata_sil24 0000:04:00.0: version 1.1 sata_sil24 0000:04:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16 sata_sil24 0000:04:00.0: setting latency timer to 64 scsi6 : sata_sil24 pata_amd 0000:00:0c.0: version 0.4.1 pata_amd 0000:00:0c.0: setting latency timer to 64 scsi7 : sata_sil24 ata7: SATA max UDMA/100 host m128@0xfdbff000 port 0xfdbf8000 irq 16 ata8: SATA max UDMA/100 host m128@0xfdbff000 port 0xfdbfa000 irq 16 scsi8 : pata_amd scsi9 : pata_amd usb 1-9.3: ep0 maxpacket = 8 ata9: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xf400 irq 14 ata10: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xf408 irq 15 usb 1-9: clear tt buffer port 3, a13 ep0 t800a0d42 usb 1-9: clear tt buffer port 3, a13 ep0 t800a0d42 hub 2-0:1.0: hub_suspend usb usb2: bus auto-suspend ohci_hcd 0000:00:0a.0: suspend root hub usb 1-9: clear tt buffer port 3, a13 ep0 t800a0d42 usb 1-9.3: default language 0x0409 usb 1-9.3: udev 13, busnum 1, minor = 12 usb 1-9.3: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.3: Product: USB FAST SERIAL ADAPTER usb 1-9.3: Manufacturer: FTDI usb 1-9.3: SerialNumber: FT5PAFUT usb 1-9.3: uevent usb 1-9.3: usb_probe_device usb 1-9.3: configuration #1 chosen from 1 choice usb 1-9.3: adding 1-9.3:1.0 (config #1, interface 0) usb 1-9.3:1.0: uevent usb 1-9.3: adding 1-9.3:1.1 (config #1, interface 1) usb 1-9.3:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '013' hub 1-9:1.0: port 4, status 0101, change 0000, 12 Mb/s hub 1-9:1.0: port 4 not reset yet, waiting 10ms forcedeth: Reverse Engineered nForce ethernet driver. Version 0.64. ACPI: PCI Interrupt Link [APCH] enabled at IRQ 22 forcedeth 0000:00:10.0: PCI INT A -> Link[APCH] -> GSI 22 (level, low) -> IRQ 22 forcedeth 0000:00:10.0: setting latency timer to 64 nv_probe: set workaround bit for reversed mac addr ata9: port disabled. ignoring. usbcore: registered new interface driver usbserial USB Serial support registered for generic usb 1-9.4: new full speed USB device using ehci_hcd and address 14 hub 1-9:1.0: port 4 not reset yet, waiting 10ms usb 1-9.4: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 4, a14 ep0 t800a0d42 usb 1-9: clear tt buffer port 4, a14 ep0 t800a0d42 usb 1-9: clear tt buffer port 4, a14 ep0 t800a0d42 usb 1-9.4: default language 0x0409 usb 1-9.4: udev 14, busnum 1, minor = 13 usb 1-9.4: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.4: Product: USB FAST SERIAL ADAPTER usb 1-9.4: Manufacturer: FTDI usb 1-9.4: SerialNumber: FT5PAFV2 usb 1-9.4: uevent usb 1-9.4: usb_probe_device usb 1-9.4: configuration #1 chosen from 1 choice usb 1-9.4: adding 1-9.4:1.0 (config #1, interface 0) usb 1-9.4:1.0: uevent usb 1-9.4: adding 1-9.4:1.1 (config #1, interface 1) usb 1-9.4:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '014' hub 1-9:1.0: port 5, status 0101, change 0000, 12 Mb/s usb 1-9.2: uevent usb 1-9.3: uevent usb 1-9.4: uevent usb 1-9.5: new full speed USB device using ehci_hcd and address 15 input: PC Speaker as /devices/platform/pcspkr/input/input4 hub 1-9:1.0: port 5 not reset yet, waiting 10ms e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2 e1000e: Copyright (c) 1999-2008 Intel Corporation. e1000e 0000:0b:00.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 e1000e 0000:0b:00.0: setting latency timer to 64 alloc irq_desc for 49 on node 0 alloc kstat_irqs on node 0 e1000e 0000:0b:00.0: irq 49 for MSI/MSI-X usb 1-9.5: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 5, a15 ep0 t800a0d42 usb 1-9: clear tt buffer port 5, a15 ep0 t800a0d42 usb 1-9: clear tt buffer port 5, a15 ep0 t800a0d42 usb 1-9.5: default language 0x0409 usb 1-9.5: udev 15, busnum 1, minor = 14 usb 1-9.5: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.5: Product: USB FAST SERIAL ADAPTER usb 1-9.5: Manufacturer: FTDI usb 1-9.5: SerialNumber: FT5PAFVC usb 1-9.5: uevent usb 1-9.5: usb_probe_device usb 1-9.5: configuration #1 chosen from 1 choice usb 1-9.5: adding 1-9.5:1.0 (config #1, interface 0) usb 1-9.5:1.0: uevent usb 1-9.5: adding 1-9.5:1.1 (config #1, interface 1) usb 1-9.5: uevent usb 1-9.5:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '015' hub 1-9:1.0: port 6, status 0101, change 0000, 12 Mb/s usb 1-9.6: new full speed USB device using ehci_hcd and address 16 hub 1-9:1.0: port 6 not reset yet, waiting 10ms forcedeth 0000:00:10.0: ifname eth0, PHY OUI 0x1c1 @ 1, addr 00:01:29:d6:df:ee forcedeth 0000:00:10.0: highdma csum vlan pwrctl mgmt gbit lnktim msi desc-v3 ACPI: PCI Interrupt Link [AMC1] enabled at IRQ 21 forcedeth 0000:00:11.0: PCI INT A -> Link[AMC1] -> GSI 21 (level, low) -> IRQ 21 forcedeth 0000:00:11.0: setting latency timer to 64 nv_probe: set workaround bit for reversed mac addr 0000:0b:00.0: eth1: (PCI Express:2.5GB/s:Width x1) 00:15:17:67:73:a0 0000:0b:00.0: eth1: Intel(R) PRO/1000 Network Connection 0000:0b:00.0: eth1: MAC: 0, PHY: 4, PBA No: d50868-003 e1000e 0000:0b:00.1: PCI INT B -> Link[APC5] -> GSI 16 (level, low) -> IRQ 16 e1000e 0000:0b:00.1: setting latency timer to 64 alloc irq_desc for 50 on node 0 alloc kstat_irqs on node 0 e1000e 0000:0b:00.1: irq 50 for MSI/MSI-X usb 1-9.6: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 6, a16 ep0 t800a0d42 usb 1-9: clear tt buffer port 6, a16 ep0 t800a0d42 usb 1-9: clear tt buffer port 6, a16 ep0 t800a0d42 usb 1-9.6: default language 0x0409 usb 1-9.6: udev 16, busnum 1, minor = 15 usb 1-9.6: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.6: Product: USB FAST SERIAL ADAPTER usb 1-9.6: Manufacturer: FTDI usb 1-9.6: SerialNumber: FT5PAFVO usb 1-9.6: uevent usb 1-9.6: usb_probe_device usb 1-9.6: configuration #1 chosen from 1 choice usb 1-9.6: adding 1-9.6:1.0 (config #1, interface 0) usb 1-9.6:1.0: uevent usb 1-9.6: adding 1-9.6:1.1 (config #1, interface 1) usb 1-9.6: uevent usb 1-9.6:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '016' hub 1-9:1.0: port 7, status 0101, change 0000, 12 Mb/s usb 1-9.7: new full speed USB device using ehci_hcd and address 17 hub 1-9:1.0: port 7 not reset yet, waiting 10ms 0000:0b:00.1: eth2: (PCI Express:2.5GB/s:Width x1) 00:15:17:67:73:a1 0000:0b:00.1: eth2: Intel(R) PRO/1000 Network Connection 0000:0b:00.1: eth2: MAC: 0, PHY: 4, PBA No: d50868-003 e1000e 0000:0c:00.0: PCI INT A -> Link[APC7] -> GSI 16 (level, low) -> IRQ 16 e1000e 0000:0c:00.0: setting latency timer to 64 alloc irq_desc for 51 on node 0 alloc kstat_irqs on node 0 e1000e 0000:0c:00.0: irq 51 for MSI/MSI-X usb 1-9.7: ep0 maxpacket = 8 usb 1-9.7: default language 0x0409 usb 1-9.7: udev 17, busnum 1, minor = 16 usb 1-9.7: New USB device found, idVendor=05e3, idProduct=0604 usb 1-9.7: New USB device strings: Mfr=0, Product=1, SerialNumber=0 usb 1-9.7: Product: USB Hub usb 1-9.7: uevent usb 1-9.7: usb_probe_device usb 1-9.7: configuration #1 chosen from 1 choice usb 1-9.7: adding 1-9.7:1.0 (config #1, interface 0) usb 1-9.7:1.0: uevent hub 1-9.7:1.0: usb_probe_interface hub 1-9.7:1.0: usb_probe_interface - got id hub 1-9.7:1.0: USB hub found hub 1-9.7:1.0: 4 ports detected hub 1-9.7:1.0: standalone hub hub 1-9.7:1.0: ganged power switching hub 1-9.7:1.0: global over-current protection hub 1-9.7:1.0: power on to power good time: 100ms hub 1-9.7:1.0: local power source is good hub 1-9.7:1.0: no over-current condition exists hub 1-9.7:1.0: enabling power on all ports usb 1-9.7: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '017' hub 1-5.7:1.0: state 7 ports 4 chg 0006 evt 0000 usbserial_generic 1-5.1:1.0: usb_probe_interface usbserial_generic 1-5.1:1.0: usb_probe_interface - got id usbserial_generic 1-5.1:1.1: usb_probe_interface usbserial_generic 1-5.1:1.1: usb_probe_interface - got id usbserial_generic 1-5.2:1.0: usb_probe_interface usbserial_generic 1-5.2:1.0: usb_probe_interface - got id usbserial_generic 1-5.2:1.1: usb_probe_interface usbserial_generic 1-5.2:1.1: usb_probe_interface - got id usbserial_generic 1-5.3:1.0: usb_probe_interface usbserial_generic 1-5.3:1.0: usb_probe_interface - got id usbserial_generic 1-5.3:1.1: usb_probe_interface usbserial_generic 1-5.3:1.1: usb_probe_interface - got id usbserial_generic 1-5.4:1.0: usb_probe_interface usbserial_generic 1-5.4:1.0: usb_probe_interface - got id usbserial_generic 1-5.4:1.1: usb_probe_interface usbserial_generic 1-5.4:1.1: usb_probe_interface - got id usbserial_generic 1-5.5:1.0: usb_probe_interface usbserial_generic 1-5.5:1.0: usb_probe_interface - got id usbserial_generic 1-5.5:1.1: usb_probe_interface usbserial_generic 1-5.5:1.1: usb_probe_interface - got id usbserial_generic 1-5.6:1.0: usb_probe_interface usbserial_generic 1-5.6:1.0: usb_probe_interface - got id usbserial_generic 1-5.6:1.1: usb_probe_interface usbserial_generic 1-5.6:1.1: usb_probe_interface - got id hub 1-5.7:1.0: port 1, status 0101, change 0000, 12 Mb/s udev: renamed network interface eth2 to eth4 usb 1-5.7.1: new full speed USB device using ehci_hcd and address 18 hub 1-9.7:1.0: port 1: status 0101 change 0001 hub 1-9.7:1.0: port 2: status 0101 change 0001 udev: renamed network interface eth1 to eth2 0000:0c:00.0: eth1: (PCI Express:2.5GB/s:Width x1) 00:15:17:00:4f:b0 0000:0c:00.0: eth1: Intel(R) PRO/1000 Network Connection 0000:0c:00.0: eth1: MAC: 0, PHY: 4, PBA No: d33923-003 e1000e 0000:0c:00.1: PCI INT B -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 e1000e 0000:0c:00.1: setting latency timer to 64 alloc irq_desc for 52 on node 0 alloc kstat_irqs on node 0 e1000e 0000:0c:00.1: irq 52 for MSI/MSI-X usb 1-5.7.1: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 7, a18 ep0 t800a0d42 usb 1-5: clear tt buffer port 7, a18 ep0 t800a0d42 usb 1-5: clear tt buffer port 7, a18 ep0 t800a0d42 usb 1-5.7.1: default language 0x0409 usb 1-5.7.1: udev 18, busnum 1, minor = 17 usb 1-5.7.1: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.7.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.7.1: Product: USB FAST SERIAL ADAPTER usb 1-5.7.1: Manufacturer: FTDI usb 1-5.7.1: SerialNumber: FT5SQ779 usb 1-5.7.1: uevent usb 1-5.7.1: usb_probe_device usb 1-5.7.1: configuration #1 chosen from 1 choice usb 1-5.7.1: adding 1-5.7.1:1.0 (config #1, interface 0) usb 1-5.7.1: uevent usb 1-5.7.1:1.0: uevent usb 1-5.7.1: adding 1-5.7.1:1.1 (config #1, interface 1) usb 1-5.7.1:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '018' hub 1-5.7:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 1-9.7: link qh128-0e01/ffff88003fa89a00 start 4 [1/2 us] usb 1-5.7.2: new full speed USB device using ehci_hcd and address 19 forcedeth 0000:00:11.0: ifname eth3, PHY OUI 0x1c1 @ 0, addr 00:01:29:d6:df:ed forcedeth 0000:00:11.0: highdma csum vlan pwrctl mgmt gbit lnktim msi desc-v3 0000:0c:00.1: eth5: (PCI Express:2.5GB/s:Width x1) 00:15:17:00:4f:b1 0000:0c:00.1: eth5: Intel(R) PRO/1000 Network Connection 0000:0c:00.1: eth5: MAC: 0, PHY: 4, PBA No: d33923-003 usb 1-5.7.2: ep0 maxpacket = 8 usb 1-5: clear tt buffer port 7, a19 ep0 t800a0d42 ehci_hcd 0000:00:0a.1: 5.7 detected XactErr len 0/1 retry 1 ehci_hcd 0000:00:0a.1: devpath 5.7 ep1in 3strikes hub 1-5.7:1.0: transfer --> -71 usb 1-5.7: unlink qh128-0e01/ffff88003e9ce680 start 3 [1/2 us] ehci_hcd 0000:00:0a.1: reused qh ffff88003e9ce680 schedule usb 1-5.7: link qh128-0e01/ffff88003e9ce680 start 3 [1/2 us] usb 1-5: clear tt buffer port 7, a19 ep0 t800a0d42 usb 1-5: clear tt buffer port 7, a19 ep0 t800a0d42 usb 1-5.7.2: default language 0x0409 usb 1-5.7.2: udev 19, busnum 1, minor = 18 usb 1-5.7.2: New USB device found, idVendor=0403, idProduct=6010 usb 1-5.7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5.7.2: Product: USB FAST SERIAL ADAPTER usb 1-5.7.2: Manufacturer: FTDI usb 1-5.7.2: SerialNumber: FT5SQ77L usb 1-5.7.2: uevent usb 1-5.7.2: usb_probe_device usb 1-5.7.2: configuration #1 chosen from 1 choice usb 1-5.7.2: adding 1-5.7.2:1.0 (config #1, interface 0) usb 1-5.7.2: uevent usb 1-5.7.2:1.0: uevent usb 1-5.7.2: adding 1-5.7.2:1.1 (config #1, interface 1) usb 1-5.7.2:1.1: uevent /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '019' hub 1-9:1.0: state 7 ports 7 chg 0000 evt ff80 usbserial_generic 1-9.1:1.0: usb_probe_interface usbserial_generic 1-9.1:1.0: usb_probe_interface - got id usbserial_generic 1-9.1:1.1: usb_probe_interface usbserial_generic 1-9.1:1.1: usb_probe_interface - got id usbserial_generic 1-9.2:1.0: usb_probe_interface usbserial_generic 1-9.2:1.0: usb_probe_interface - got id usbserial_generic 1-9.2:1.1: usb_probe_interface usbserial_generic 1-9.2:1.1: usb_probe_interface - got id usbserial_generic 1-9.3:1.0: usb_probe_interface usbserial_generic 1-9.3:1.0: usb_probe_interface - got id usbserial_generic 1-9.3:1.1: usb_probe_interface usbserial_generic 1-9.3:1.1: usb_probe_interface - got id usbserial_generic 1-9.4:1.0: usb_probe_interface usbserial_generic 1-9.4:1.0: usb_probe_interface - got id usbserial_generic 1-9.4:1.1: usb_probe_interface usbserial_generic 1-9.4:1.1: usb_probe_interface - got id usbserial_generic 1-9.5:1.0: usb_probe_interface usbserial_generic 1-9.5:1.0: usb_probe_interface - got id usbserial_generic 1-9.5:1.1: usb_probe_interface usbserial_generic 1-9.5:1.1: usb_probe_interface - got id usbserial_generic 1-9.6:1.0: usb_probe_interface usbserial_generic 1-9.6:1.0: usb_probe_interface - got id usbserial_generic 1-9.6:1.1: usb_probe_interface usbserial_generic 1-9.6:1.1: usb_probe_interface - got id usbserial_generic 1-5.7.1:1.0: usb_probe_interface usbserial_generic 1-5.7.1:1.0: usb_probe_interface - got id usbserial_generic 1-5.7.1:1.1: usb_probe_interface usbserial_generic 1-5.7.1:1.1: usb_probe_interface - got id usbserial_generic 1-5.7.2:1.0: usb_probe_interface usbserial_generic 1-5.7.2:1.0: usb_probe_interface - got id usbserial_generic 1-5.7.2:1.1: usb_probe_interface usbserial_generic 1-5.7.2:1.1: usb_probe_interface - got id usbcore: registered new interface driver usbserial_generic usbserial: USB Serial Driver core USB Serial support registered for FTDI USB Serial Device ftdi_sio 1-5.1:1.0: usb_probe_interface ftdi_sio 1-5.1:1.0: usb_probe_interface - got id ftdi_sio 1-5.1:1.0: FTDI USB Serial Device converter detected usb 1-5.1: Detected FT2232C usb 1-5.1: Number of endpoints 2 usb 1-5.1: Endpoint 1 MaxPacketSize 64 usb 1-5.1: Endpoint 2 MaxPacketSize 64 usb 1-5.1: Setting MaxPacketSize 64 hub 1-5.7:1.0: state 7 ports 4 chg 0000 evt 0004 hub 1-9.7:1.0: state 7 ports 4 chg 0006 evt 0000 hub 1-9.7:1.0: port 1, status 0101, change 0000, 12 Mb/s usb 1-5.1: FTDI USB Serial Device converter now attached to ttyUSB0 ftdi_sio 1-5.1:1.1: usb_probe_interface ftdi_sio 1-5.1:1.1: usb_probe_interface - got id ftdi_sio 1-5.1:1.1: FTDI USB Serial Device converter detected usb 1-5.1: Detected FT2232C usb 1-5.1: Number of endpoints 2 usb 1-5.1: Endpoint 1 MaxPacketSize 64 usb 1-5.1: Endpoint 2 MaxPacketSize 64 usb 1-5.1: Setting MaxPacketSize 64 usb 1-5.1: FTDI USB Serial Device converter now attached to ttyUSB1 ftdi_sio 1-5.2:1.0: usb_probe_interface ftdi_sio 1-5.2:1.0: usb_probe_interface - got id ftdi_sio 1-5.2:1.0: FTDI USB Serial Device converter detected usb 1-5.2: Detected FT2232C usb 1-5.2: Number of endpoints 2 usb 1-5.2: Endpoint 1 MaxPacketSize 64 usb 1-5.2: Endpoint 2 MaxPacketSize 64 usb 1-5.2: Setting MaxPacketSize 64 usb 1-5.2: FTDI USB Serial Device converter now attached to ttyUSB2 ftdi_sio 1-5.2:1.1: usb_probe_interface ftdi_sio 1-5.2:1.1: usb_probe_interface - got id ftdi_sio 1-5.2:1.1: FTDI USB Serial Device converter detected usb 1-5.2: Detected FT2232C usb 1-5.2: Number of endpoints 2 usb 1-5.2: Endpoint 1 MaxPacketSize 64 usb 1-5.2: Endpoint 2 MaxPacketSize 64 usb 1-5.2: Setting MaxPacketSize 64 usb 1-5.2: FTDI USB Serial Device converter now attached to ttyUSB3 ftdi_sio 1-5.3:1.0: usb_probe_interface ftdi_sio 1-5.3:1.0: usb_probe_interface - got id ftdi_sio 1-5.3:1.0: FTDI USB Serial Device converter detected usb 1-5.3: Detected FT2232C usb 1-5.3: Number of endpoints 2 usb 1-5.3: Endpoint 1 MaxPacketSize 64 usb 1-5.3: Endpoint 2 MaxPacketSize 64 usb 1-5.3: Setting MaxPacketSize 64 usb 1-5.3: FTDI USB Serial Device converter now attached to ttyUSB4 ftdi_sio 1-5.3:1.1: usb_probe_interface ftdi_sio 1-5.3:1.1: usb_probe_interface - got id ftdi_sio 1-5.3:1.1: FTDI USB Serial Device converter detected usb 1-5.3: Detected FT2232C usb 1-5.3: Number of endpoints 2 usb 1-5.3: Endpoint 1 MaxPacketSize 64 usb 1-5.3: Endpoint 2 MaxPacketSize 64 usb 1-5.3: Setting MaxPacketSize 64 usb 1-5.3: FTDI USB Serial Device converter now attached to ttyUSB5 ftdi_sio 1-5.4:1.0: usb_probe_interface ftdi_sio 1-5.4:1.0: usb_probe_interface - got id ftdi_sio 1-5.4:1.0: FTDI USB Serial Device converter detected usb 1-5.4: Detected FT2232C usb 1-5.4: Number of endpoints 2 usb 1-5.4: Endpoint 1 MaxPacketSize 64 usb 1-5.4: Endpoint 2 MaxPacketSize 64 usb 1-5.4: Setting MaxPacketSize 64 usb 1-5.4: FTDI USB Serial Device converter now attached to ttyUSB6 ftdi_sio 1-5.4:1.1: usb_probe_interface ftdi_sio 1-5.4:1.1: usb_probe_interface - got id ftdi_sio 1-5.4:1.1: FTDI USB Serial Device converter detected usb 1-5.4: Detected FT2232C usb 1-5.4: Number of endpoints 2 usb 1-5.4: Endpoint 1 MaxPacketSize 64 usb 1-5.4: Endpoint 2 MaxPacketSize 64 usb 1-5.4: Setting MaxPacketSize 64 usb 1-5.4: FTDI USB Serial Device converter now attached to ttyUSB7 ftdi_sio 1-5.5:1.0: usb_probe_interface ftdi_sio 1-5.5:1.0: usb_probe_interface - got id ftdi_sio 1-5.5:1.0: FTDI USB Serial Device converter detected usb 1-5.5: Detected FT2232C usb 1-5.5: Number of endpoints 2 usb 1-5.5: Endpoint 1 MaxPacketSize 64 usb 1-5.5: Endpoint 2 MaxPacketSize 64 usb 1-5.5: Setting MaxPacketSize 64 usb 1-5.5: FTDI USB Serial Device converter now attached to ttyUSB8 ftdi_sio 1-5.5:1.1: usb_probe_interface ftdi_sio 1-5.5:1.1: usb_probe_interface - got id ftdi_sio 1-5.5:1.1: FTDI USB Serial Device converter detected usb 1-5.5: Detected FT2232C usb 1-5.5: Number of endpoints 2 usb 1-5.5: Endpoint 1 MaxPacketSize 64 usb 1-5.5: Endpoint 2 MaxPacketSize 64 usb 1-5.5: Setting MaxPacketSize 64 usb 1-5.5: FTDI USB Serial Device converter now attached to ttyUSB9 ftdi_sio 1-5.6:1.0: usb_probe_interface ftdi_sio 1-5.6:1.0: usb_probe_interface - got id ftdi_sio 1-5.6:1.0: FTDI USB Serial Device converter detected usb 1-5.6: Detected FT2232C usb 1-5.6: Number of endpoints 2 usb 1-5.6: Endpoint 1 MaxPacketSize 64 usb 1-5.6: Endpoint 2 MaxPacketSize 64 usb 1-5.6: Setting MaxPacketSize 64 usb 1-5.6: FTDI USB Serial Device converter now attached to ttyUSB10 ftdi_sio 1-5.6:1.1: usb_probe_interface ftdi_sio 1-5.6:1.1: usb_probe_interface - got id ftdi_sio 1-5.6:1.1: FTDI USB Serial Device converter detected usb 1-5.6: Detected FT2232C usb 1-5.6: Number of endpoints 2 usb 1-5.6: Endpoint 1 MaxPacketSize 64 usb 1-5.6: Endpoint 2 MaxPacketSize 64 usb 1-5.6: Setting MaxPacketSize 64 usb 1-5.6: FTDI USB Serial Device converter now attached to ttyUSB11 ftdi_sio 1-9.1:1.0: usb_probe_interface ftdi_sio 1-9.1:1.0: usb_probe_interface - got id ftdi_sio 1-9.1:1.0: FTDI USB Serial Device converter detected usb 1-9.1: Detected FT2232C usb 1-9.1: Number of endpoints 2 usb 1-9.1: Endpoint 1 MaxPacketSize 64 usb 1-9.1: Endpoint 2 MaxPacketSize 64 usb 1-9.1: Setting MaxPacketSize 64 usb 1-9.1: FTDI USB Serial Device converter now attached to ttyUSB12 ftdi_sio 1-9.1:1.1: usb_probe_interface ftdi_sio 1-9.1:1.1: usb_probe_interface - got id ftdi_sio 1-9.1:1.1: FTDI USB Serial Device converter detected usb 1-9.1: Detected FT2232C usb 1-9.1: Number of endpoints 2 usb 1-9.1: Endpoint 1 MaxPacketSize 64 usb 1-9.1: Endpoint 2 MaxPacketSize 64 usb 1-9.1: Setting MaxPacketSize 64 usb 1-9.1: FTDI USB Serial Device converter now attached to ttyUSB13 ftdi_sio 1-9.2:1.0: usb_probe_interface ftdi_sio 1-9.2:1.0: usb_probe_interface - got id ftdi_sio 1-9.2:1.0: FTDI USB Serial Device converter detected usb 1-9.2: Detected FT2232C usb 1-9.2: Number of endpoints 2 usb 1-9.2: Endpoint 1 MaxPacketSize 64 usb 1-9.2: Endpoint 2 MaxPacketSize 64 usb 1-9.2: Setting MaxPacketSize 64 usb 1-9.2: FTDI USB Serial Device converter now attached to ttyUSB14 ftdi_sio 1-9.2:1.1: usb_probe_interface ftdi_sio 1-9.2:1.1: usb_probe_interface - got id ftdi_sio 1-9.2:1.1: FTDI USB Serial Device converter detected usb 1-9.2: Detected FT2232C usb 1-9.2: Number of endpoints 2 usb 1-9.2: Endpoint 1 MaxPacketSize 64 usb 1-9.2: Endpoint 2 MaxPacketSize 64 usb 1-9.2: Setting MaxPacketSize 64 usb 1-9.2: FTDI USB Serial Device converter now attached to ttyUSB15 ftdi_sio 1-9.3:1.0: usb_probe_interface ftdi_sio 1-9.3:1.0: usb_probe_interface - got id ftdi_sio 1-9.3:1.0: FTDI USB Serial Device converter detected usb 1-9.3: Detected FT2232C usb 1-9.3: Number of endpoints 2 usb 1-9.3: Endpoint 1 MaxPacketSize 64 usb 1-9.3: Endpoint 2 MaxPacketSize 64 usb 1-9.3: Setting MaxPacketSize 64 usb 1-9.3: FTDI USB Serial Device converter now attached to ttyUSB16 ftdi_sio 1-9.3:1.1: usb_probe_interface ftdi_sio 1-9.3:1.1: usb_probe_interface - got id ftdi_sio 1-9.3:1.1: FTDI USB Serial Device converter detected usb 1-9.3: Detected FT2232C usb 1-9.3: Number of endpoints 2 usb 1-9.3: Endpoint 1 MaxPacketSize 64 usb 1-9.3: Endpoint 2 MaxPacketSize 64 usb 1-9.3: Setting MaxPacketSize 64 usb 1-9.3: FTDI USB Serial Device converter now attached to ttyUSB17 ftdi_sio 1-9.4:1.0: usb_probe_interface ftdi_sio 1-9.4:1.0: usb_probe_interface - got id ftdi_sio 1-9.4:1.0: FTDI USB Serial Device converter detected usb 1-9.4: Detected FT2232C usb 1-9.4: Number of endpoints 2 usb 1-9.4: Endpoint 1 MaxPacketSize 64 usb 1-9.4: Endpoint 2 MaxPacketSize 64 usb 1-9.4: Setting MaxPacketSize 64 usb 1-9.4: FTDI USB Serial Device converter now attached to ttyUSB18 ftdi_sio 1-9.4:1.1: usb_probe_interface ftdi_sio 1-9.4:1.1: usb_probe_interface - got id ftdi_sio 1-9.4:1.1: FTDI USB Serial Device converter detected usb 1-9.4: Detected FT2232C usb 1-9.4: Number of endpoints 2 usb 1-9.4: Endpoint 1 MaxPacketSize 64 usb 1-9.4: Endpoint 2 MaxPacketSize 64 usb 1-9.4: Setting MaxPacketSize 64 usb 1-9.4: FTDI USB Serial Device converter now attached to ttyUSB19 ftdi_sio 1-9.5:1.0: usb_probe_interface ftdi_sio 1-9.5:1.0: usb_probe_interface - got id ftdi_sio 1-9.5:1.0: FTDI USB Serial Device converter detected usb 1-9.5: Detected FT2232C usb 1-9.5: Number of endpoints 2 usb 1-9.5: Endpoint 1 MaxPacketSize 64 usb 1-9.5: Endpoint 2 MaxPacketSize 64 usb 1-9.5: Setting MaxPacketSize 64 usb 1-9.5: FTDI USB Serial Device converter now attached to ttyUSB20 ftdi_sio 1-9.5:1.1: usb_probe_interface ftdi_sio 1-9.5:1.1: usb_probe_interface - got id ftdi_sio 1-9.5:1.1: FTDI USB Serial Device converter detected usb 1-9.5: Detected FT2232C usb 1-9.5: Number of endpoints 2 usb 1-9.5: Endpoint 1 MaxPacketSize 64 usb 1-9.5: Endpoint 2 MaxPacketSize 64 usb 1-9.5: Setting MaxPacketSize 64 usb 1-9.5: FTDI USB Serial Device converter now attached to ttyUSB21 ftdi_sio 1-9.6:1.0: usb_probe_interface ftdi_sio 1-9.6:1.0: usb_probe_interface - got id ftdi_sio 1-9.6:1.0: FTDI USB Serial Device converter detected usb 1-9.6: Detected FT2232C usb 1-9.6: Number of endpoints 2 usb 1-9.6: Endpoint 1 MaxPacketSize 64 usb 1-9.6: Endpoint 2 MaxPacketSize 64 usb 1-9.6: Setting MaxPacketSize 64 usb 1-9.6: FTDI USB Serial Device converter now attached to ttyUSB22 ftdi_sio 1-9.6:1.1: usb_probe_interface ftdi_sio 1-9.6:1.1: usb_probe_interface - got id ftdi_sio 1-9.6:1.1: FTDI USB Serial Device converter detected usb 1-9.6: Detected FT2232C usb 1-9.6: Number of endpoints 2 usb 1-9.6: Endpoint 1 MaxPacketSize 64 usb 1-9.6: Endpoint 2 MaxPacketSize 64 usb 1-9.6: Setting MaxPacketSize 64 usb 1-9.6: FTDI USB Serial Device converter now attached to ttyUSB23 ftdi_sio 1-5.7.1:1.0: usb_probe_interface ftdi_sio 1-5.7.1:1.0: usb_probe_interface - got id ftdi_sio 1-5.7.1:1.0: FTDI USB Serial Device converter detected usb 1-5.7.1: Detected FT2232C usb 1-5.7.1: Number of endpoints 2 usb 1-5.7.1: Endpoint 1 MaxPacketSize 64 usb 1-5.7.1: Endpoint 2 MaxPacketSize 64 usb 1-5.7.1: Setting MaxPacketSize 64 usb 1-5.7.1: FTDI USB Serial Device converter now attached to ttyUSB24 ftdi_sio 1-5.7.1:1.1: usb_probe_interface ftdi_sio 1-5.7.1:1.1: usb_probe_interface - got id ftdi_sio 1-5.7.1:1.1: FTDI USB Serial Device converter detected usb 1-5.7.1: Detected FT2232C usb 1-5.7.1: Number of endpoints 2 usb 1-5.7.1: Endpoint 1 MaxPacketSize 64 usb 1-5.7.1: Endpoint 2 MaxPacketSize 64 usb 1-5.7.1: Setting MaxPacketSize 64 usb 1-5.7.1: FTDI USB Serial Device converter now attached to ttyUSB25 ftdi_sio 1-5.7.2:1.0: usb_probe_interface ftdi_sio 1-5.7.2:1.0: usb_probe_interface - got id ftdi_sio 1-5.7.2:1.0: FTDI USB Serial Device converter detected usb 1-5.7.2: Detected FT2232C usb 1-5.7.2: Number of endpoints 2 usb 1-5.7.2: Endpoint 1 MaxPacketSize 64 usb 1-5.7.2: Endpoint 2 MaxPacketSize 64 usb 1-5.7.2: Setting MaxPacketSize 64 usb 1-5.7.2: FTDI USB Serial Device converter now attached to ttyUSB26 ftdi_sio 1-5.7.2:1.1: usb_probe_interface ftdi_sio 1-5.7.2:1.1: usb_probe_interface - got id ftdi_sio 1-5.7.2:1.1: FTDI USB Serial Device converter detected usb 1-5.7.2: Detected FT2232C usb 1-5.7.2: Number of endpoints 2 usb 1-5.7.2: Endpoint 1 MaxPacketSize 64 usb 1-5.7.2: Endpoint 2 MaxPacketSize 64 usb 1-5.7.2: Setting MaxPacketSize 64 usb 1-5.7.2: FTDI USB Serial Device converter now attached to ttyUSB27 usbcore: registered new interface driver ftdi_sio ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver usb 1-9.7.1: new full speed USB device using ehci_hcd and address 20 usb 1-9.7.1: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 7, a20 ep0 t800a0d42 usb 1-9: clear tt buffer port 7, a20 ep0 t800a0d42 usb 1-9: clear tt buffer port 7, a20 ep0 t800a0d42 usb 1-9.7.1: default language 0x0409 usb 1-9.7.1: udev 20, busnum 1, minor = 19 usb 1-9.7.1: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.7.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.7.1: Product: USB FAST SERIAL ADAPTER usb 1-9.7.1: Manufacturer: FTDI usb 1-9.7.1: SerialNumber: FT5PAFVZ usb 1-9.7.1: uevent usb 1-9.7.1: usb_probe_device usb 1-9.7.1: configuration #1 chosen from 1 choice usb 1-9.7.1: adding 1-9.7.1:1.0 (config #1, interface 0) usb 1-9.7.1:1.0: uevent usbserial_generic 1-9.7.1:1.0: usb_probe_interface usbserial_generic 1-9.7.1:1.0: usb_probe_interface - got id ftdi_sio 1-9.7.1:1.0: usb_probe_interface ftdi_sio 1-9.7.1:1.0: usb_probe_interface - got id ftdi_sio 1-9.7.1:1.0: FTDI USB Serial Device converter detected usb 1-9.7.1: Detected FT2232C usb 1-9.7.1: Number of endpoints 2 usb 1-9.7.1: Endpoint 1 MaxPacketSize 64 usb 1-9.7.1: Endpoint 2 MaxPacketSize 64 usb 1-9.7.1: Setting MaxPacketSize 64 usb 1-9.7.1: FTDI USB Serial Device converter now attached to ttyUSB28 usb 1-9.7.1: adding 1-9.7.1:1.1 (config #1, interface 1) usb 1-9.7.1:1.1: uevent usbserial_generic 1-9.7.1:1.1: usb_probe_interface usbserial_generic 1-9.7.1:1.1: usb_probe_interface - got id ftdi_sio 1-9.7.1:1.1: usb_probe_interface ftdi_sio 1-9.7.1:1.1: usb_probe_interface - got id ftdi_sio 1-9.7.1:1.1: FTDI USB Serial Device converter detected usb 1-9.7.1: Detected FT2232C usb 1-9.7.1: Number of endpoints 2 usb 1-9.7.1: Endpoint 1 MaxPacketSize 64 usb 1-9.7.1: Endpoint 2 MaxPacketSize 64 usb 1-9.7.1: Setting MaxPacketSize 64 usb 1-9.7.1: FTDI USB Serial Device converter now attached to ttyUSB29 /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '020' hub 1-9.7:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 1-5.6:1.0: uevent usb 1-5.6: uevent usb 1-5.5:1.1: uevent usb 1-5.5: uevent usb 1-5.4:1.1: uevent usb 1-5.4: uevent usb 1-5.1:1.1: uevent usb 1-5.1: uevent usb 1-5.2:1.1: uevent usb 1-5.2: uevent usb 1-5.1:1.0: uevent usb 1-5.1: uevent usb 1-5.6:1.1: uevent usb 1-5.6: uevent usb 1-5.5:1.0: uevent usb 1-5.5: uevent usb 1-5.3:1.1: uevent usb 1-5.3: uevent usb 1-9.7.1: uevent usb 1-9.1:1.0: uevent usb 1-9.1: uevent usb 1-9.1:1.1: uevent usb 1-9.1: uevent usb 1-5.4:1.0: uevent usb 1-5.4: uevent usb 1-5.7.2:1.1: uevent usb 1-5.7.2: uevent usb 1-9.7.2: new full speed USB device using ehci_hcd and address 21 usb 1-5.7.2:1.0: uevent usb 1-5.7.2: uevent usb 1-9.6:1.1: uevent usb 1-9.6: uevent usb 1-9.5:1.1: uevent usb 1-9.5: uevent usb 1-9.6:1.0: uevent usb 1-9.6: uevent usb 1-9.2:1.1: uevent usb 1-9.2: uevent usb 1-9.5:1.0: uevent usb 1-9.5: uevent usb 1-9.2:1.0: uevent usb 1-9.2: uevent usb 1-9.3:1.1: uevent usb 1-9.3: uevent usb 1-9.4:1.0: uevent usb 1-9.4: uevent usb 1-9.4:1.1: uevent usb 1-9.4: uevent usb 1-5.7.1:1.1: uevent usb 1-5.7.1: uevent usb 1-5.7.1:1.0: uevent usb 1-5.7.1: uevent usb 1-9.3:1.0: uevent usb 1-9.3: uevent usb 1-9.7.2: ep0 maxpacket = 8 usb 1-9: clear tt buffer port 7, a21 ep0 t800a0d42 usb 1-9: clear tt buffer port 7, a21 ep0 t800a0d42 usb 1-9: clear tt buffer port 7, a21 ep0 t800a0d42 usb 1-9.7.1:1.1: uevent usb 1-9.7.1: uevent usb 1-9.7.2: default language 0x0409 usb 1-9.7.1:1.0: uevent usb 1-9.7.1: uevent usb 1-9.7.2: udev 21, busnum 1, minor = 20 usb 1-9.7.2: New USB device found, idVendor=0403, idProduct=6010 usb 1-9.7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-9.7.2: Product: USB FAST SERIAL ADAPTER usb 1-9.7.2: Manufacturer: FTDI usb 1-9.7.2: SerialNumber: FT5PAFW7 usb 1-9.7.2: uevent usb 1-9.7.2: usb_probe_device usb 1-9.7.2: configuration #1 chosen from 1 choice usb 1-9.7.2: adding 1-9.7.2:1.0 (config #1, interface 0) usb 1-9.7.2: uevent usb 1-9.7.2:1.0: uevent usbserial_generic 1-9.7.2:1.0: usb_probe_interface usbserial_generic 1-9.7.2:1.0: usb_probe_interface - got id ftdi_sio 1-9.7.2:1.0: usb_probe_interface ftdi_sio 1-9.7.2:1.0: usb_probe_interface - got id ftdi_sio 1-9.7.2:1.0: FTDI USB Serial Device converter detected usb 1-9.7.2: Detected FT2232C usb 1-9.7.2: Number of endpoints 2 usb 1-9.7.2: Endpoint 1 MaxPacketSize 64 usb 1-9.7.2: Endpoint 2 MaxPacketSize 64 usb 1-9.7.2: Setting MaxPacketSize 64 usb 1-9.7.2: FTDI USB Serial Device converter now attached to ttyUSB30 usb 1-9.7.2: adding 1-9.7.2:1.1 (config #1, interface 1) usb 1-9.7.2:1.1: uevent usbserial_generic 1-9.7.2:1.1: usb_probe_interface usbserial_generic 1-9.7.2:1.1: usb_probe_interface - got id ftdi_sio 1-9.7.2:1.1: usb_probe_interface ftdi_sio 1-9.7.2:1.1: usb_probe_interface - got id ftdi_sio 1-9.7.2:1.1: FTDI USB Serial Device converter detected usb 1-9.7.2: Detected FT2232C usb 1-9.7.2: Number of endpoints 2 usb 1-9.7.2: Endpoint 1 MaxPacketSize 64 usb 1-9.7.2: Endpoint 2 MaxPacketSize 64 usb 1-9.7.2: Setting MaxPacketSize 64 usb 1-9.7.2: FTDI USB Serial Device converter now attached to ttyUSB31 /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/core/inode.c: creating file '021' hub 1-9.7:1.0: state 7 ports 4 chg 0000 evt 0004 usb 1-9.7.2:1.0: uevent usb 1-9.7.2: uevent usb 1-9.7.2:1.1: uevent usb 1-9.7.2: uevent ata7: SATA link down (SStatus 0 SControl 0) ata8: SATA link down (SStatus 0 SControl 0) ata10: port disabled. ignoring. udev: renamed network interface eth3 to eth1 udev: renamed network interface eth1_rename to eth3 usb 1-5.2:1.0: uevent usb 1-5.2: uevent usb 1-5.3:1.0: uevent usb 1-5.3: uevent EDAC MC: Ver: 2.1.0 Nov 4 2009 i2c i2c-0: nForce2 SMBus adapter at 0x1c00 i2c i2c-1: nForce2 SMBus adapter at 0x1c40 k8temp 0000:00:18.3: Temperature readouts might be wrong - check erratum #141 ACPI: PCI Interrupt Link [APC2] enabled at IRQ 17 alloc irq_desc for 17 on node 0 alloc kstat_irqs on node 0 firewire_ohci 0000:02:09.0: PCI INT A -> Link[APC2] -> GSI 17 (level, low) -> IRQ 17 firewire_ohci 0000:02:09.0: setting latency timer to 64 EDAC amd64_edac: Ver: 3.2.0 Nov 4 2009 EDAC amd64: This node reports that Memory ECC is currently disabled, set F3x44[22] (0000:00:18.3). EDAC amd64: WARNING: ECC is disabled by BIOS. Module will NOT be loaded. Either Enable ECC in the BIOS, or set 'ecc_enable_override'. Also, use of the override can cause unknown side effects. amd64_edac: probe of 0000:00:18.2 failed with error -22 firewire_ohci: Added fw-ohci device 0000:02:09.0, OHCI version 1.10 ACPI: PCI Interrupt Link [AAZA] enabled at IRQ 20 HDA Intel 0000:00:0e.1: PCI INT B -> Link[AAZA] -> GSI 20 (level, low) -> IRQ 20 HDA Intel 0000:00:0e.1: setting latency timer to 64 firewire_core: created device fw0: GUID 000129200005c048, S400 hda_codec: ALC889A: BIOS auto-probing. ALSA hda_codec.c:3881: autoconfig: line_outs=4 (0x14/0x16/0x15/0x17/0x0) ALSA hda_codec.c:3885: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) ALSA hda_codec.c:3889: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0) ALSA hda_codec.c:3890: mono: mono_out=0x0 ALSA hda_codec.c:3893: dig-out=0x1e/0x0 ALSA hda_codec.c:3901: inputs: mic=0x18, fmic=0x19, line=0x1a, fline=0x0, cd=0x1c, aux=0x0 ALSA hda_codec.c:3903: dig-in=0x1f ALSA patch_realtek.c:1298: realtek: Enabling init ASM_ID=0x0885 CODEC_ID=10ec0885 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> nf_conntrack version 0.5.0 (6986 buckets, 27944 max) CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or sysctl net.netfilter.nf_conntrack_acct=1 to enable it. ip_tables: (C) 2000-2006 Netfilter Core Team fuse init (API version 7.13) kvm: Nested Virtualization enabled kvm: already loaded the other module NET: Registered protocol family 10 lo: Disabled Privacy Extensions Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008) bonding: MII link monitoring set to 100 ms device-mapper: uevent: version 1.0.3 device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com device-mapper: multipath: version 1.1.0 loaded lvm used greatest stack depth: 3304 bytes left EXT3 FS on sda1, internal journal kjournald starting. Commit interval 5 seconds EXT3 FS on sda3, internal journal EXT3-fs: mounted filesystem with ordered data mode. Adding 1951888k swap on /dev/sda2. Priority:-1 extents:1 across:1951888k powernow-k8: Found 1 AMD Athlon(tm) 64 X2 Dual Core Processor 3400+ processors (2 cpu cores) (version 2.20.00) powernow-k8: 0 : fid 0xa (1800 MHz), vid 0x12 powernow-k8: 1 : fid 0x2 (1000 MHz), vid 0x16 bonding: bond1 is being created... Clocksource tsc unstable (delta = -222563807 ns) alloc irq_desc for 53 on node 0 alloc kstat_irqs on node 0 forcedeth 0000:00:10.0: irq 53 for MSI/MSI-X RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. usb usb2: uevent usb 2-0:1.0: uevent usb usb1: uevent usb 1-0:1.0: uevent usb 1-5: uevent usb 1-5.1: uevent usb 1-5.1:1.0: uevent usb 1-5.1:1.1: uevent usb 1-5.2: uevent usb 1-5.2:1.0: uevent usb 1-5.2:1.1: uevent usb 1-5.3: uevent usb 1-5.3:1.0: uevent usb 1-5.3:1.1: uevent usb 1-5.4: uevent usb 1-5.4:1.0: uevent usb 1-5.4:1.1: uevent usb 1-5.5: uevent usb 1-5.5:1.0: uevent usb 1-5.5:1.1: uevent usb 1-5.6: uevent usb 1-5.6:1.0: uevent usb 1-5.6:1.1: uevent usb 1-5.7: uevent usb 1-5.7.1: uevent usb 1-5.7.1:1.0: uevent usb 1-5.7.1:1.1: uevent usb 1-5.7.2: uevent usb 1-5.7.2:1.0: uevent usb 1-5.7.2:1.1: uevent usb 1-5.7:1.0: uevent usb 1-5:1.0: uevent usb 1-9: uevent usb 1-9.1: uevent usb 1-9.1:1.0: uevent usb 1-9.1:1.1: uevent usb 1-9.2: uevent usb 1-9.2:1.0: uevent usb 1-9.2:1.1: uevent usb 1-9.3: uevent usb 1-9.3:1.0: uevent usb 1-9.3:1.1: uevent usb 1-9.4: uevent usb 1-9.4:1.0: uevent usb 1-9.4:1.1: uevent usb 1-9.5: uevent usb 1-9.5:1.0: uevent usb 1-9.5:1.1: uevent usb 1-9.6: uevent usb 1-9.6:1.0: uevent usb 1-9.6:1.1: uevent usb 1-9.7: uevent usb 1-9.7.1: uevent usb 1-9.7.1:1.0: uevent usb 1-9.7.1:1.1: uevent usb 1-9.7.2: uevent usb 1-9.7.2:1.0: uevent usb 1-9.7.2:1.1: uevent usb 1-9.7:1.0: uevent usb 1-9:1.0: uevent Bluetooth: Core ver 2.15 NET: Registered protocol family 31 Bluetooth: HCI device and connection manager initialized Bluetooth: HCI socket layer initialized Bluetooth: L2CAP ver 2.14 Bluetooth: L2CAP socket layer initialized Bluetooth: BNEP (Ethernet Emulation) ver 1.3 Bluetooth: BNEP filters: protocol multicast Bridge firewalling registered Bluetooth: SCO (Voice Link) ver 0.6 Bluetooth: SCO socket layer initialized Installing knfsd (copyright (C) 1996 okir@monad.swb.de). NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory NFSD: starting 90-second grace period rpc.nfsd used greatest stack depth: 2808 bytes left ehci_hcd 0000:00:0a.1: 9.2 detected XactErr len 0/7 retry 1 ehci_hcd 0000:00:0a.1: devpath 9.2 ep4out 3strikes usb 1-9: clear tt buffer port 2, a12 ep4 t00078048 usb usb2: usb auto-resume ohci_hcd 0000:00:0a.0: resume root hub hub 2-0:1.0: hub_resume hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0000 ohci_hcd 0000:00:0a.0: auto-stop root hub hub 2-0:1.0: hub_suspend usb usb2: bus auto-suspend ohci_hcd 0000:00:0a.0: suspend root hub ehci_hcd 0000:00:0a.1: 9.6 detected XactErr len 0/7 retry 1 ehci_hcd 0000:00:0a.1: devpath 9.6 ep4out 3strikes usb 1-9: clear tt buffer port 6, a16 ep4 t00078048 ehci_hcd 0000:00:0a.1: 9.6 detected XactErr len 0/7 retry 1 ehci_hcd 0000:00:0a.1: devpath 9.6 ep4out 3strikes usb 1-9: clear tt buffer port 6, a16 ep4 t00078048 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-11-17 18:41 ` Oliver Neukum 2009-11-17 18:56 ` Eric W. Biederman 2009-11-17 20:05 ` Eric W. Biederman @ 2009-11-18 1:08 ` Eric W. Biederman 2009-11-18 3:10 ` [PATCH] ftdi_sio: Keep going when write errors are encountered Eric W. Biederman 2 siblings, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-11-18 1:08 UTC (permalink / raw) To: Oliver Neukum Cc: Alan Cox, Johan Hovold, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Alan Cox, Andrew Morton, linux-kernel, Alan Stern [-- Attachment #1: Type: text/plain, Size: 9853 bytes --] Oliver Neukum <oliver@neukum.org> writes: > Am Dienstag, 17. November 2009 19:35:07 schrieb Eric W. Biederman: >> Boiled down. ftdi_chars_in_buffer is essentially >> priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an >> urb request is sent and tx_outstanding_bytes is decremented when an urb >> request completes. >> >> It turns out I have a moderately noisy usb line, and so I occasionally >> get messages like: >> >> ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31 >> >> Which as best as I can tell result in the urb getting abandoned and >> neither completed nor canceled (because we have hit the maximum >> retry count and they still don't succeed). > > The URB should be finished with an error code in urb->status. > ftdi_write_bulk_callback() does decrement the counter even in > the error case. > >> Which appears to result in tx_outstanding_bytes getting stuck at >> some positive number. > > Do you see this message > > if (status) { > dbg("nonzero write bulk status received: %d", status); > return; > } > > if you enable debugging output? Ok. After a bunch of minor tweaks to the debug messages I finally have a smoking gun trace. The highlights: * ftdi_write port 15, 7 bytes * detected XactErr len 0/7 retry 1 * ftdi_write_bulk_callback - port 15 * nonzero write bulk status received: -71 countback: 0 * ftdi_chars_in_buffer - port 15 buffered: 7 We write 7 bytes, we get an error and a completion with status -EPROTO, but no bytes have actually been transferred so actual_length less the headers is 0. Since we don't subtract off any bytes when we get the completion we figure 7 bytes are actually in flight when they are not. Eric Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 15 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 15 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 14 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 14 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 13 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 13 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 12 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 12 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write port 15, 7 bytes Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: data_offset set to 0 Nov 17 16:44:35 localhost kernel: ftdi_sio ttyUSB15: ftdi_write - length = 7, data = 31 34 33 30 34 0d 0a Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write write returning: 7 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 31 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 31 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 30 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 30 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 29 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 29 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 28 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 28 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 23 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 23 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 22 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 22 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 21 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 21 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 20 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 20 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 19 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 19 Nov 17 16:44:35 localhost kernel: ehci_hcd 0000:00:0a.1: 9.2 detected XactErr len 0/7 retry 1 Nov 17 16:44:35 localhost kernel: ehci_hcd 0000:00:0a.1: devpath 9.2 ep4out 3strikes Nov 17 16:44:35 localhost kernel: usb 1-9: clear tt buffer port 2, a12 ep4 t80078048 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 18 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 18 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 17 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 17 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_bulk_callback - port 15 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: nonzero write bulk status received: -71 countback: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 16 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 16 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 15 buffered: 7 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 15 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 14 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 14 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 13 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 13 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 12 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 12 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 31 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 31 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 30 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 30 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 29 buffered: 0 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 29 Nov 17 16:44:35 localhost kernel: /home/ebiederm/projects/linux/linux-2.6.32-Arora/drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 28 buffered: 0 Debugging diff attached for anyone who cares. [-- Attachment #2: usb-debug.diff2 --] [-- Type: text/plain, Size: 3210 bytes --] diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index 8e67d5c..616ec99 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c @@ -26,7 +26,7 @@ #include <asm/uaccess.h> #include <asm/system.h> -#undef TTY_DEBUG_WAIT_UNTIL_SENT +#define TTY_DEBUG_WAIT_UNTIL_SENT #undef DEBUG diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 2494599..0766f1b 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -392,7 +392,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) "%s detected XactErr len %zu/%zu retry %d\n", qtd->urb->dev->devpath, qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); - +#if 0 /* reset the token in the qtd and the * qh overlay (which still contains * the qtd) so that we pick up from @@ -407,6 +407,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) hw->hw_token = cpu_to_hc32(ehci, token); goto retry_xacterr; +#endif } stopped = 1; diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index 66619be..194a1b7 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile @@ -55,4 +55,3 @@ obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o obj-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda.o - diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d..f9065a4 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1949,7 +1949,8 @@ static void ftdi_write_bulk_callback(struct urb *urb) spin_unlock_irqrestore(&priv->tx_lock, flags); if (status) { - dbg("nonzero write bulk status received: %d", status); + dbg("nonzero write bulk status received: %d countback: %lu", + status, countback); return; } @@ -1988,11 +1989,10 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) int buffered; unsigned long flags; - dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->tx_lock, flags); buffered = (int)priv->tx_outstanding_bytes; spin_unlock_irqrestore(&priv->tx_lock, flags); + dbg("%s - port %d buffered: %d", __func__, port->number, buffered); if (buffered < 0) { dev_err(&port->dev, "%s outstanding tx bytes is negative!\n", __func__); @@ -2010,7 +2010,9 @@ static int ftdi_process_packet(struct tty_struct *tty, char flag; char *ch; +#if 0 dbg("%s - port %d", __func__, port->number); +#endif if (len < 2) { dbg("malformed packet"); @@ -2096,7 +2098,9 @@ static void ftdi_read_bulk_callback(struct urb *urb) struct usb_serial_port *port = urb->context; unsigned long flags; +#if 0 dbg("%s - port %d", __func__, port->number); +#endif if (urb->status) { dbg("%s - nonzero read bulk status received: %d", @@ -2104,8 +2108,10 @@ static void ftdi_read_bulk_callback(struct urb *urb) return; } +#if 0 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, urb->transfer_buffer); +#endif ftdi_process_read(port); spin_lock_irqsave(&port->lock, flags); diff --git a/include/linux/usb.h b/include/linux/usb.h ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH] ftdi_sio: Keep going when write errors are encountered. 2009-11-18 1:08 ` Eric W. Biederman @ 2009-11-18 3:10 ` Eric W. Biederman 2009-11-18 3:44 ` Greg KH 0 siblings, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-11-18 3:10 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Alan Cox, Johan Hovold, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel, Alan Stern, Oliver Neukum The use of urb->actual_length to update tx_outstanding_bytes implicitly assumes that the number of bytes actually written is the same as the number of bytes we tried to write. On error that assumption is violated so just use transfer_buffer_length the number of bytes we intended to write to the device. If an error occurs we need to fall through and call usb_serial_port_softint to wake up processes waiting in tty_wait_until_sent. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> --- drivers/usb/serial/ftdi_sio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d..ebcc6d0 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1937,7 +1937,7 @@ static void ftdi_write_bulk_callback(struct urb *urb) return; } /* account for transferred data */ - countback = urb->actual_length; + countback = urb->transfer_buffer_length; data_offset = priv->write_offset; if (data_offset > 0) { /* Subtract the control bytes */ @@ -1950,7 +1950,6 @@ static void ftdi_write_bulk_callback(struct urb *urb) if (status) { dbg("nonzero write bulk status received: %d", status); - return; } usb_serial_port_softint(port); -- 1.6.2.5 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] ftdi_sio: Keep going when write errors are encountered. 2009-11-18 3:10 ` [PATCH] ftdi_sio: Keep going when write errors are encountered Eric W. Biederman @ 2009-11-18 3:44 ` Greg KH 0 siblings, 0 replies; 40+ messages in thread From: Greg KH @ 2009-11-18 3:44 UTC (permalink / raw) To: Eric W. Biederman Cc: Alan Cox, Johan Hovold, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel, Alan Stern, Oliver Neukum On Tue, Nov 17, 2009 at 07:10:48PM -0800, Eric W. Biederman wrote: > > The use of urb->actual_length to update tx_outstanding_bytes > implicitly assumes that the number of bytes actually written is the > same as the number of bytes we tried to write. On error that > assumption is violated so just use transfer_buffer_length the number > of bytes we intended to write to the device. > > If an error occurs we need to fall through and call > usb_serial_port_softint to wake up processes waiting in > tty_wait_until_sent. > > Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Nice job, thanks for debugging this. I'll go queue it up. greg k-h ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 16:33 ` Alan Cox 2009-10-02 22:29 ` Eric W. Biederman 2009-10-02 23:00 ` Eric W. Biederman @ 2009-10-03 11:42 ` Johan Hovold 2009-10-03 12:11 ` Oliver Neukum 2009-10-03 13:18 ` Alan Cox 2 siblings, 2 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-03 11:42 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel On Fri, Oct 02, 2009 at 05:33:08PM +0100, Alan Cox wrote: > For upstream how does this look as a tidy up I found a couple of issues: - The patch breaks unthrottling, as it checks THROTTLE before resubmitting urb whereas unthrottle checks ACTUALLY_UNTROTTLED which is never set. - The countread stuff should also be removed from ftdi_read_bulk_callback as they where only used for updating rx_bytes, And, obviously, this doesn't solve the problem of tty_flip_buffer_push being called from interrupt context (but I assume that was never the intention). I've actually been working on cleaning up ftdi_sio inspired by the generic driver. I also threw out the work queue, but had not noticed the unused rx_byte yet. I also used the generic drivers scheme of not pushing to tty until unthrottled, but as you point out this is not really needed anymore. My patch is quite large, and could be split up once finished. With the removal of low_latency patch it solves the remaining issues at hand with ftdi_sio: - It does not stall when a read callback is made during serial_open. - It handles the late call to unthrottle during serial_open. What do you think? Thanks, Johan From: Johan Hovold <jhovold@gmail.com> Date: Sat, 3 Oct 2009 12:30:13 +0200 Subject: [PATCH] USB: ftdi_sio: Rewrite. - Remove work queue. - Use urb status to determine when port is closed rather than port count. (Fixes stalled reads due to open race on 2.6.31). - Re-structure read processing. - Use tty_insert_flip_string instead of per character push unless console. - Always process before throttling. - Handle late call to unthrottle during serial_close by checking ASYNCB_CLOSING. - Remove rx_flags and lock and use flags in usb_serial_port instead. - Remove unused rx_bytes counter. --- drivers/usb/serial/ftdi_sio.c | 425 ++++++++++++++--------------------------- 1 files changed, 142 insertions(+), 283 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0ac2c2f..a7c76df 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -76,12 +76,7 @@ struct ftdi_private { unsigned long last_dtr_rts; /* saved modem control outputs */ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */ char prev_status, diff_status; /* Used for TIOCMIWAIT */ - __u8 rx_flags; /* receive state flags (throttling) */ - spinlock_t rx_lock; /* spinlock for receive state */ - struct delayed_work rx_work; struct usb_serial_port *port; - int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -737,10 +732,6 @@ static const char *ftdi_chip_name[] = { /* Constants for read urb and write urb */ #define BUFSZ 512 -/* rx_flags */ -#define THROTTLED 0x01 -#define ACTUALLY_THROTTLED 0x02 - /* Used for TIOCMIWAIT */ #define FTDI_STATUS_B0_MASK (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD) #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) @@ -763,7 +754,7 @@ static int ftdi_write_room(struct tty_struct *tty); static int ftdi_chars_in_buffer(struct tty_struct *tty); static void ftdi_write_bulk_callback(struct urb *urb); static void ftdi_read_bulk_callback(struct urb *urb); -static void ftdi_process_read(struct work_struct *work); +static void ftdi_process_read(struct usb_serial_port *port); static void ftdi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old); static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); @@ -1526,7 +1517,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) } kref_init(&priv->kref); - spin_lock_init(&priv->rx_lock); spin_lock_init(&priv->tx_lock); init_waitqueue_head(&priv->delta_msr_wait); /* This will push the characters through immediately rather @@ -1548,7 +1538,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); priv->port = port; /* Free port's existing write urb and transfer buffer. */ @@ -1685,6 +1674,26 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) return 0; } +int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) +{ + struct urb *urb = port->read_urb; + struct usb_serial *serial = port->serial; + int result; + + usb_fill_bulk_urb(urb, serial->dev, + usb_rcvbulkpipe(serial->dev, + port->bulk_in_endpointAddress), + urb->transfer_buffer, + urb->transfer_buffer_length, + ftdi_read_bulk_callback, port); + result = usb_submit_urb(urb, mem_flags); + if (result) + dev_err(&port->dev, + "%s - failed submitting read urb, error %d\n", + __func__, result); + return result; +} + static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) { /* ftdi_open */ struct usb_device *dev = port->serial->dev; @@ -1699,9 +1708,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); write_latency_timer(port); @@ -1721,23 +1727,13 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) ftdi_set_termios(tty, port, tty->termios); /* Not throttled */ - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttled = 0; + spin_unlock_irqrestore(&port->lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; - usb_fill_bulk_urb(port->read_urb, dev, - usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); - result = usb_submit_urb(port->read_urb, GFP_KERNEL); - if (result) - dev_err(&port->dev, - "%s - failed submitting read urb, error %d\n", - __func__, result); - else + result = ftdi_submit_read_urb(port, GFP_KERNEL); + if (!result) kref_get(&priv->kref); return result; @@ -1783,10 +1779,6 @@ static void ftdi_close(struct usb_serial_port *port) dbg("%s", __func__); - - /* cancel any scheduled reading */ - cancel_delayed_work_sync(&priv->rx_work); - /* shutdown our bulk read */ usb_kill_urb(port->read_urb); kref_put(&priv->kref, ftdi_sio_priv_release); @@ -2009,271 +2001,141 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) return buffered; } -static void ftdi_read_bulk_callback(struct urb *urb) +static void ftdi_process_packet(struct tty_struct *tty, + struct usb_serial_port *port, struct ftdi_private *priv, + char *packet, int len) { - struct usb_serial_port *port = urb->context; - struct tty_struct *tty; - struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; - int status = urb->status; - - if (urb->number_of_packets > 0) { - dev_err(&port->dev, "%s transfer_buffer_length %d " - "actual_length %d number of packets %d\n", __func__, - urb->transfer_buffer_length, - urb->actual_length, urb->number_of_packets); - dev_err(&port->dev, "%s transfer_flags %x\n", __func__, - urb->transfer_flags); - } + int i; + char status; + char flag; + char *ch; dbg("%s - port %d", __func__, port->number); - if (port->port.count <= 0) - return; - - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; + /* Compare new line status to the old one, signal if different/ + N.B. packet may be processed more than once, but differences + are only processed once. */ + status = packet[0] & FTDI_STATUS_B0_MASK; + if (status != priv->prev_status) { + priv->diff_status |= status ^ priv->prev_status; + wake_up_interruptible(&priv->delta_msr_wait); + priv->prev_status = status; } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + /* + * Although the device uses a bitmask and hence can have multiple + * errors on a packet - the order here sets the priority the error is + * returned to the tty layer. + */ + flag = TTY_NORMAL; + if (packet[1] & FTDI_RS_OE) { + flag = TTY_OVERRUN; + dbg("OVERRRUN error"); } - - if (urb != port->read_urb) - dev_err(&port->dev, "%s - Not my urb!\n", __func__); - - if (status) { - /* This will happen at close every time so it is a dbg not an - err */ - dbg("(this is ok on close) nonzero read bulk status received: %d", status); - goto out; + if (packet[1] & FTDI_RS_BI) { + flag = TTY_BREAK; + dbg("BREAK received"); + usb_serial_handle_break(port); + } + if (packet[1] & FTDI_RS_PE) { + flag = TTY_PARITY; + dbg("PARITY error"); + } + if (packet[1] & FTDI_RS_FE) { + flag = TTY_FRAME; + dbg("FRAMING error"); } - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - - ftdi_process_read(&priv->rx_work.work); -out: - tty_kref_put(tty); -} /* ftdi_read_bulk_callback */ + /* + * The per character mucking around with sysrq path it too slow, so + * shortcircuit it in the 99.9999999% of cases where the USB serial is + * not a console anyway. + */ + ch = packet + 2; + len -= 2; + if (!port->console || !port->sysrq) + tty_insert_flip_string(tty, ch, len); + else { + /* Push data to tty */ + for (i = 0; i < len; i++, ch++) { + if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + tty_insert_flip_char(tty, *ch, flag); + } + } +} -static void ftdi_process_read(struct work_struct *work) -{ /* ftdi_process_read */ - struct ftdi_private *priv = - container_of(work, struct ftdi_private, rx_work.work); - struct usb_serial_port *port = priv->port; - struct urb *urb; +static void ftdi_process_read(struct usb_serial_port *port) +{ + struct urb *urb = port->read_urb; struct tty_struct *tty; - char error_flag; - unsigned char *data; - + struct ftdi_private *priv = usb_get_serial_port_data(port); + char *data = (char *)urb->transfer_buffer; int i; - int result; + int len; int need_flip; - int packet_offset; - unsigned long flags; - dbg("%s - port %d", __func__, port->number); - - if (port->port.count <= 0) - return; + if (urb->actual_length <= 2) + return; /* status only */ - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); + tty = tty_port_tty_get(&port->port); + if (!tty) return; - } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; - } - - urb = port->read_urb; - if (!urb) { - dbg("%s - bad read_urb pointer - exiting", __func__); - goto out; - } - - data = urb->transfer_buffer; - - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __func__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); - } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) - usb_serial_debug_data(debug, &port->dev, __func__, - urb->actual_length, data); - else - dbg("Status only: %03oo %03oo", data[0], data[1]); - } - - - /* TO DO -- check for hung up line and handle appropriately: */ - /* send hangup */ - /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */ - /* if CD is dropped and the line is not CLOCAL then we should hangup */ - - need_flip = 0; - for (packet_offset = priv->rx_processed; - packet_offset < urb->actual_length; packet_offset += priv->max_packet_size) { - int length; - - /* Compare new line status to the old one, signal if different/ - N.B. packet may be processed more than once, but differences - are only processed once. */ - char new_status = data[packet_offset + 0] & - FTDI_STATUS_B0_MASK; - if (new_status != priv->prev_status) { - priv->diff_status |= - new_status ^ priv->prev_status; - wake_up_interruptible(&priv->delta_msr_wait); - priv->prev_status = new_status; - } + /* FIXME: check priv? */ - length = min_t(u32, priv->max_packet_size, urb->actual_length-packet_offset)-2; - if (length < 0) { - dev_err(&port->dev, "%s - bad packet length: %d\n", - __func__, length+2); - length = 0; - } - - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __func__); - break; - } - if (tty_buffer_request_room(tty, length) < length) { - /* break out & wait for throttling/unthrottling to - happen */ - dbg("%s - receive room low", __func__); - break; - } - - /* Handle errors and break */ - error_flag = TTY_NORMAL; - /* Although the device uses a bitmask and hence can have - multiple errors on a packet - the order here sets the - priority the error is returned to the tty layer */ - - if (data[packet_offset+1] & FTDI_RS_OE) { - error_flag = TTY_OVERRUN; - dbg("OVERRRUN error"); - } - if (data[packet_offset+1] & FTDI_RS_BI) { - error_flag = TTY_BREAK; - dbg("BREAK received"); - usb_serial_handle_break(port); - } - if (data[packet_offset+1] & FTDI_RS_PE) { - error_flag = TTY_PARITY; - dbg("PARITY error"); - } - if (data[packet_offset+1] & FTDI_RS_FE) { - error_flag = TTY_FRAME; - dbg("FRAMING error"); - } - if (length > 0) { - for (i = 2; i < length+2; i++) { - /* Note that the error flag is duplicated for - every character received since we don't know - which character it applied to */ - if (!usb_serial_handle_sysrq_char(tty, port, - data[packet_offset + i])) - tty_insert_flip_char(tty, - data[packet_offset + i], - error_flag); - } + for (i = 0; i < urb->actual_length; i += priv->max_packet_size) { + len = min_t(int, urb->actual_length - i, priv->max_packet_size); + if (len > 2) { + ftdi_process_packet(tty, port, priv, &data[i], len); need_flip = 1; } + } -#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW - /* if a parity error is detected you get status packets forever - until a character is sent without a parity error. - This doesn't work well since the application receives a - never ending stream of bad data - even though new data - hasn't been sent. Therefore I (bill) have taken this out. - However - this might make sense for framing errors and so on - so I am leaving the code in for now. - */ - else { - if (error_flag != TTY_NORMAL) { - dbg("error_flag is not normal"); - /* In this case it is just status - if that is - an error send a bad character */ - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, 0xff, error_flag); - need_flip = 1; - } - } -#endif - } /* "for(packet_offset=0..." */ - - /* Low latency */ if (need_flip) tty_flip_buffer_push(tty); + tty_kref_put(tty); +} - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __func__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __func__); - goto out; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - else - dbg("%s - port is closed", __func__); - goto out; - } +static void ftdi_read_bulk_callback(struct urb *urb) +{ + struct usb_serial_port *port = urb->context; + unsigned char *data = urb->transfer_buffer; + int status = urb->status; + unsigned long flags; - /* urb is completely processed */ - priv->rx_processed = 0; + dbg("%s - port %d", __func__, port->number); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) { - /* Continue trying to always read */ - usb_fill_bulk_urb(port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); + /* FIXME: remove? */ + if (urb->number_of_packets > 0) { + dev_err(&port->dev, "%s transfer_buffer_length %d " + "actual_length %d number of packets %d\n", __func__, + urb->transfer_buffer_length, + urb->actual_length, urb->number_of_packets); + dev_err(&port->dev, "%s transfer_flags %x\n", __func__, + urb->transfer_flags); + } - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, - "%s - failed resubmitting read urb, error %d\n", - __func__, result); + if (unlikely(status != 0)) { + dbg("%s - nonzero read bulk status received: %d", + __func__, status); + return; } -out: - tty_kref_put(tty); -} /* ftdi_process_read */ + /* FIXME: check urb != port->read_urb? */ + + usb_serial_debug_data(debug, &port->dev, __func__, + urb->actual_length, data); + + ftdi_process_read(port); + + spin_lock_irqsave(&port->lock, flags); + if (!port->throttled) { + spin_unlock_irqrestore(&port->lock, flags); + ftdi_submit_read_urb(port, GFP_ATOMIC); + } else + spin_unlock_irqrestore(&port->lock, flags); +} static void ftdi_break_ctl(struct tty_struct *tty, int break_state) { @@ -2605,33 +2467,30 @@ static int ftdi_ioctl(struct tty_struct *tty, struct file *file, static void ftdi_throttle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags |= THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttled = 1; + spin_unlock_irqrestore(&port->lock, flags); } - -static void ftdi_unthrottle(struct tty_struct *tty) +void ftdi_unthrottle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); - int actually_throttled; + int was_throttled; unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + was_throttled = port->throttled; + port->throttled = 0; + spin_unlock_irqrestore(&port->lock, flags); - if (actually_throttled) - schedule_delayed_work(&priv->rx_work, 0); + if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags)) + ftdi_submit_read_urb(port, GFP_KERNEL); } static int __init ftdi_init(void) -- 1.6.4.2 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold @ 2009-10-03 12:11 ` Oliver Neukum 2009-10-03 12:28 ` Johan Hovold 2009-10-03 13:18 ` Alan Cox 1 sibling, 1 reply; 40+ messages in thread From: Oliver Neukum @ 2009-10-03 12:11 UTC (permalink / raw) To: Johan Hovold Cc: Alan Cox, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel Am Samstag, 3. Oktober 2009 13:42:29 schrieb Johan Hovold: > + spin_lock_irqsave(&port->lock, flags); > + if (!port->throttled) { > + spin_unlock_irqrestore(&port->lock, flags); > + ftdi_submit_read_urb(port, GFP_ATOMIC); > + } else > + spin_unlock_irqrestore(&port->lock, flags); > +} > > static void ftdi_break_ctl(struct tty_struct *tty, int break_state) > { > @@ -2605,33 +2467,30 @@ static int ftdi_ioctl(struct tty_struct *tty, > struct file *file, static void ftdi_throttle(struct tty_struct *tty) [..] > + spin_lock_irqsave(&port->lock, flags); > + port->throttled = 1; > + spin_unlock_irqrestore(&port->lock, flags); > } > > - > -static void ftdi_unthrottle(struct tty_struct *tty) > +void ftdi_unthrottle(struct tty_struct *tty) [..] > + spin_lock_irqsave(&port->lock, flags); > + was_throttled = port->throttled; > + port->throttled = 0; > + spin_unlock_irqrestore(&port->lock, flags); > > - if (actually_throttled) > - schedule_delayed_work(&priv->rx_work, 0); > + if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags)) > + ftdi_submit_read_urb(port, GFP_KERNEL); > } This unfortunately is incorrect. If an unthrottling happens before the read callback runs you submit a running URB. Regards Oliver ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 12:11 ` Oliver Neukum @ 2009-10-03 12:28 ` Johan Hovold 2009-10-03 13:31 ` Oliver Neukum 2009-10-03 14:41 ` Johan Hovold 0 siblings, 2 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-03 12:28 UTC (permalink / raw) To: Oliver Neukum Cc: Johan Hovold, Alan Cox, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel On Sat, Oct 03, 2009 at 02:11:40PM +0200, Oliver Neukum wrote: > This unfortunately is incorrect. If an unthrottling happens before the read > callback runs you submit a running URB. Duh. :) Here's an update that uses both throttle flags which is of course required. Thanks, Johan >From 41c00680e69b72bd8bd3650609b29ed5ec3f1dde Mon Sep 17 00:00:00 2001 From: Johan Hovold <jhovold@gmail.com> Date: Sat, 3 Oct 2009 12:30:13 +0200 Subject: [PATCH] USB: ftdi_sio: Rewrite. - Remove work queue. - Use urb status to determine when port is closed rather than port count. (Fixes stalled reads due to open race on 2.6.31). - Re-structure read processing. - Use tty_insert_flip_string instead of per character push unless console. - Always process before throttling. - Handle late call to unthrottle during serial_close by checking ASYNCB_CLOSING. - Remove rx_flags and lock and use flags in usb_serial_port instead. - Remove unused rx_bytes counter. --- drivers/usb/serial/ftdi_sio.c | 427 ++++++++++++++--------------------------- 1 files changed, 144 insertions(+), 283 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0ac2c2f..84c2b83 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -76,12 +76,7 @@ struct ftdi_private { unsigned long last_dtr_rts; /* saved modem control outputs */ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */ char prev_status, diff_status; /* Used for TIOCMIWAIT */ - __u8 rx_flags; /* receive state flags (throttling) */ - spinlock_t rx_lock; /* spinlock for receive state */ - struct delayed_work rx_work; struct usb_serial_port *port; - int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -737,10 +732,6 @@ static const char *ftdi_chip_name[] = { /* Constants for read urb and write urb */ #define BUFSZ 512 -/* rx_flags */ -#define THROTTLED 0x01 -#define ACTUALLY_THROTTLED 0x02 - /* Used for TIOCMIWAIT */ #define FTDI_STATUS_B0_MASK (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD) #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) @@ -763,7 +754,7 @@ static int ftdi_write_room(struct tty_struct *tty); static int ftdi_chars_in_buffer(struct tty_struct *tty); static void ftdi_write_bulk_callback(struct urb *urb); static void ftdi_read_bulk_callback(struct urb *urb); -static void ftdi_process_read(struct work_struct *work); +static void ftdi_process_read(struct usb_serial_port *port); static void ftdi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old); static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); @@ -1526,7 +1517,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) } kref_init(&priv->kref); - spin_lock_init(&priv->rx_lock); spin_lock_init(&priv->tx_lock); init_waitqueue_head(&priv->delta_msr_wait); /* This will push the characters through immediately rather @@ -1548,7 +1538,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); priv->port = port; /* Free port's existing write urb and transfer buffer. */ @@ -1685,6 +1674,26 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) return 0; } +int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) +{ + struct urb *urb = port->read_urb; + struct usb_serial *serial = port->serial; + int result; + + usb_fill_bulk_urb(urb, serial->dev, + usb_rcvbulkpipe(serial->dev, + port->bulk_in_endpointAddress), + urb->transfer_buffer, + urb->transfer_buffer_length, + ftdi_read_bulk_callback, port); + result = usb_submit_urb(urb, mem_flags); + if (result) + dev_err(&port->dev, + "%s - failed submitting read urb, error %d\n", + __func__, result); + return result; +} + static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) { /* ftdi_open */ struct usb_device *dev = port->serial->dev; @@ -1699,9 +1708,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); write_latency_timer(port); @@ -1721,23 +1727,14 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) ftdi_set_termios(tty, port, tty->termios); /* Not throttled */ - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttled = 0; + port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; - usb_fill_bulk_urb(port->read_urb, dev, - usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); - result = usb_submit_urb(port->read_urb, GFP_KERNEL); - if (result) - dev_err(&port->dev, - "%s - failed submitting read urb, error %d\n", - __func__, result); - else + result = ftdi_submit_read_urb(port, GFP_KERNEL); + if (!result) kref_get(&priv->kref); return result; @@ -1783,10 +1780,6 @@ static void ftdi_close(struct usb_serial_port *port) dbg("%s", __func__); - - /* cancel any scheduled reading */ - cancel_delayed_work_sync(&priv->rx_work); - /* shutdown our bulk read */ usb_kill_urb(port->read_urb); kref_put(&priv->kref, ftdi_sio_priv_release); @@ -2009,271 +2002,142 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) return buffered; } -static void ftdi_read_bulk_callback(struct urb *urb) +static void ftdi_process_packet(struct tty_struct *tty, + struct usb_serial_port *port, struct ftdi_private *priv, + char *packet, int len) { - struct usb_serial_port *port = urb->context; - struct tty_struct *tty; - struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; - int status = urb->status; - - if (urb->number_of_packets > 0) { - dev_err(&port->dev, "%s transfer_buffer_length %d " - "actual_length %d number of packets %d\n", __func__, - urb->transfer_buffer_length, - urb->actual_length, urb->number_of_packets); - dev_err(&port->dev, "%s transfer_flags %x\n", __func__, - urb->transfer_flags); - } + int i; + char status; + char flag; + char *ch; dbg("%s - port %d", __func__, port->number); - if (port->port.count <= 0) - return; - - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; + /* Compare new line status to the old one, signal if different/ + N.B. packet may be processed more than once, but differences + are only processed once. */ + status = packet[0] & FTDI_STATUS_B0_MASK; + if (status != priv->prev_status) { + priv->diff_status |= status ^ priv->prev_status; + wake_up_interruptible(&priv->delta_msr_wait); + priv->prev_status = status; } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + /* + * Although the device uses a bitmask and hence can have multiple + * errors on a packet - the order here sets the priority the error is + * returned to the tty layer. + */ + flag = TTY_NORMAL; + if (packet[1] & FTDI_RS_OE) { + flag = TTY_OVERRUN; + dbg("OVERRRUN error"); } - - if (urb != port->read_urb) - dev_err(&port->dev, "%s - Not my urb!\n", __func__); - - if (status) { - /* This will happen at close every time so it is a dbg not an - err */ - dbg("(this is ok on close) nonzero read bulk status received: %d", status); - goto out; + if (packet[1] & FTDI_RS_BI) { + flag = TTY_BREAK; + dbg("BREAK received"); + usb_serial_handle_break(port); + } + if (packet[1] & FTDI_RS_PE) { + flag = TTY_PARITY; + dbg("PARITY error"); + } + if (packet[1] & FTDI_RS_FE) { + flag = TTY_FRAME; + dbg("FRAMING error"); } - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - - ftdi_process_read(&priv->rx_work.work); -out: - tty_kref_put(tty); -} /* ftdi_read_bulk_callback */ + /* + * The per character mucking around with sysrq path it too slow, so + * shortcircuit it in the 99.9999999% of cases where the USB serial is + * not a console anyway. + */ + ch = packet + 2; + len -= 2; + if (!port->console || !port->sysrq) + tty_insert_flip_string(tty, ch, len); + else { + /* Push data to tty */ + for (i = 0; i < len; i++, ch++) { + if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + tty_insert_flip_char(tty, *ch, flag); + } + } +} -static void ftdi_process_read(struct work_struct *work) -{ /* ftdi_process_read */ - struct ftdi_private *priv = - container_of(work, struct ftdi_private, rx_work.work); - struct usb_serial_port *port = priv->port; - struct urb *urb; +static void ftdi_process_read(struct usb_serial_port *port) +{ + struct urb *urb = port->read_urb; struct tty_struct *tty; - char error_flag; - unsigned char *data; - + struct ftdi_private *priv = usb_get_serial_port_data(port); + char *data = (char *)urb->transfer_buffer; int i; - int result; + int len; int need_flip; - int packet_offset; - unsigned long flags; - dbg("%s - port %d", __func__, port->number); - - if (port->port.count <= 0) - return; + if (urb->actual_length <= 2) + return; /* status only */ - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); + tty = tty_port_tty_get(&port->port); + if (!tty) return; - } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; - } - - urb = port->read_urb; - if (!urb) { - dbg("%s - bad read_urb pointer - exiting", __func__); - goto out; - } - - data = urb->transfer_buffer; - - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __func__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); - } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) - usb_serial_debug_data(debug, &port->dev, __func__, - urb->actual_length, data); - else - dbg("Status only: %03oo %03oo", data[0], data[1]); - } - - - /* TO DO -- check for hung up line and handle appropriately: */ - /* send hangup */ - /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */ - /* if CD is dropped and the line is not CLOCAL then we should hangup */ - - need_flip = 0; - for (packet_offset = priv->rx_processed; - packet_offset < urb->actual_length; packet_offset += priv->max_packet_size) { - int length; - - /* Compare new line status to the old one, signal if different/ - N.B. packet may be processed more than once, but differences - are only processed once. */ - char new_status = data[packet_offset + 0] & - FTDI_STATUS_B0_MASK; - if (new_status != priv->prev_status) { - priv->diff_status |= - new_status ^ priv->prev_status; - wake_up_interruptible(&priv->delta_msr_wait); - priv->prev_status = new_status; - } + /* FIXME: check priv? */ - length = min_t(u32, priv->max_packet_size, urb->actual_length-packet_offset)-2; - if (length < 0) { - dev_err(&port->dev, "%s - bad packet length: %d\n", - __func__, length+2); - length = 0; - } - - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __func__); - break; - } - if (tty_buffer_request_room(tty, length) < length) { - /* break out & wait for throttling/unthrottling to - happen */ - dbg("%s - receive room low", __func__); - break; - } - - /* Handle errors and break */ - error_flag = TTY_NORMAL; - /* Although the device uses a bitmask and hence can have - multiple errors on a packet - the order here sets the - priority the error is returned to the tty layer */ - - if (data[packet_offset+1] & FTDI_RS_OE) { - error_flag = TTY_OVERRUN; - dbg("OVERRRUN error"); - } - if (data[packet_offset+1] & FTDI_RS_BI) { - error_flag = TTY_BREAK; - dbg("BREAK received"); - usb_serial_handle_break(port); - } - if (data[packet_offset+1] & FTDI_RS_PE) { - error_flag = TTY_PARITY; - dbg("PARITY error"); - } - if (data[packet_offset+1] & FTDI_RS_FE) { - error_flag = TTY_FRAME; - dbg("FRAMING error"); - } - if (length > 0) { - for (i = 2; i < length+2; i++) { - /* Note that the error flag is duplicated for - every character received since we don't know - which character it applied to */ - if (!usb_serial_handle_sysrq_char(tty, port, - data[packet_offset + i])) - tty_insert_flip_char(tty, - data[packet_offset + i], - error_flag); - } + for (i = 0; i < urb->actual_length; i += priv->max_packet_size) { + len = min_t(int, urb->actual_length - i, priv->max_packet_size); + if (len > 2) { + ftdi_process_packet(tty, port, priv, &data[i], len); need_flip = 1; } + } -#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW - /* if a parity error is detected you get status packets forever - until a character is sent without a parity error. - This doesn't work well since the application receives a - never ending stream of bad data - even though new data - hasn't been sent. Therefore I (bill) have taken this out. - However - this might make sense for framing errors and so on - so I am leaving the code in for now. - */ - else { - if (error_flag != TTY_NORMAL) { - dbg("error_flag is not normal"); - /* In this case it is just status - if that is - an error send a bad character */ - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, 0xff, error_flag); - need_flip = 1; - } - } -#endif - } /* "for(packet_offset=0..." */ - - /* Low latency */ if (need_flip) tty_flip_buffer_push(tty); + tty_kref_put(tty); +} - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __func__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __func__); - goto out; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - else - dbg("%s - port is closed", __func__); - goto out; - } +static void ftdi_read_bulk_callback(struct urb *urb) +{ + struct usb_serial_port *port = urb->context; + unsigned char *data = urb->transfer_buffer; + int status = urb->status; + unsigned long flags; - /* urb is completely processed */ - priv->rx_processed = 0; + dbg("%s - port %d", __func__, port->number); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) { - /* Continue trying to always read */ - usb_fill_bulk_urb(port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); + /* FIXME: remove? */ + if (urb->number_of_packets > 0) { + dev_err(&port->dev, "%s transfer_buffer_length %d " + "actual_length %d number of packets %d\n", __func__, + urb->transfer_buffer_length, + urb->actual_length, urb->number_of_packets); + dev_err(&port->dev, "%s transfer_flags %x\n", __func__, + urb->transfer_flags); + } - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, - "%s - failed resubmitting read urb, error %d\n", - __func__, result); + if (unlikely(status != 0)) { + dbg("%s - nonzero read bulk status received: %d", + __func__, status); + return; } -out: - tty_kref_put(tty); -} /* ftdi_process_read */ + /* FIXME: check urb != port->read_urb? */ + + usb_serial_debug_data(debug, &port->dev, __func__, + urb->actual_length, data); + + ftdi_process_read(port); + + spin_lock_irqsave(&port->lock, flags); + port->throttled = port->throttle_req; + if (!port->throttled) { + spin_unlock_irqrestore(&port->lock, flags); + ftdi_submit_read_urb(port, GFP_ATOMIC); + } else + spin_unlock_irqrestore(&port->lock, flags); +} static void ftdi_break_ctl(struct tty_struct *tty, int break_state) { @@ -2605,33 +2469,30 @@ static int ftdi_ioctl(struct tty_struct *tty, struct file *file, static void ftdi_throttle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags |= THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttle_req = 1; + spin_unlock_irqrestore(&port->lock, flags); } - -static void ftdi_unthrottle(struct tty_struct *tty) +void ftdi_unthrottle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); - int actually_throttled; + int was_throttled; unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + was_throttled = port->throttled; + port->throttled = port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); - if (actually_throttled) - schedule_delayed_work(&priv->rx_work, 0); + if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags)) + ftdi_submit_read_urb(port, GFP_KERNEL); } static int __init ftdi_init(void) -- 1.6.4.2 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 12:28 ` Johan Hovold @ 2009-10-03 13:31 ` Oliver Neukum 2009-10-03 14:41 ` Johan Hovold 1 sibling, 0 replies; 40+ messages in thread From: Oliver Neukum @ 2009-10-03 13:31 UTC (permalink / raw) To: Johan Hovold Cc: Alan Cox, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel Am Samstag, 3. Oktober 2009 14:28:48 schrieb Johan Hovold: > +void ftdi_unthrottle(struct tty_struct *tty) [..] > + spin_lock_irqsave(&port->lock, flags); > + was_throttled = port->throttled; > + port->throttled = port->throttle_req = 0; > + spin_unlock_irqrestore(&port->lock, flags); > > - if (actually_throttled) > - schedule_delayed_work(&priv->rx_work, 0); > + if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags)) > + ftdi_submit_read_urb(port, GFP_KERNEL); > } Did you check whether this races with resume()? If so, you'll need to submit with the spinlock held. Regards Oliver ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 12:28 ` Johan Hovold 2009-10-03 13:31 ` Oliver Neukum @ 2009-10-03 14:41 ` Johan Hovold 1 sibling, 0 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-03 14:41 UTC (permalink / raw) To: Johan Hovold Cc: Oliver Neukum, Alan Cox, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel On Sat, Oct 03, 2009 at 02:28:48PM +0200, Johan Hovold wrote: > Duh. :) Here's an update that uses both throttle flags which is of > course required. A minor update which processes every packet including status only ones. /Johan From: Johan Hovold <jhovold@gmail.com> Date: Sat, 3 Oct 2009 12:30:13 +0200 Subject: [PATCH] USB: ftdi_sio: Rewrite. - Remove work queue. - Use urb status to determine when port is closed rather than port count. (Fixes stalled reads due to open race on 2.6.31). - Re-structure read processing. - Use tty_insert_flip_string instead of per character push unless console. - Always process before throttling. - Handle late call to unthrottle during serial_close by checking ASYNCB_CLOSING. - Remove rx_flags and lock and use flags in usb_serial_port instead. - Remove unused rx_bytes counter. --- drivers/usb/serial/ftdi_sio.c | 431 ++++++++++++++--------------------------- 1 files changed, 146 insertions(+), 285 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0ac2c2f..287f2df 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -76,12 +76,7 @@ struct ftdi_private { unsigned long last_dtr_rts; /* saved modem control outputs */ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */ char prev_status, diff_status; /* Used for TIOCMIWAIT */ - __u8 rx_flags; /* receive state flags (throttling) */ - spinlock_t rx_lock; /* spinlock for receive state */ - struct delayed_work rx_work; struct usb_serial_port *port; - int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -737,10 +732,6 @@ static const char *ftdi_chip_name[] = { /* Constants for read urb and write urb */ #define BUFSZ 512 -/* rx_flags */ -#define THROTTLED 0x01 -#define ACTUALLY_THROTTLED 0x02 - /* Used for TIOCMIWAIT */ #define FTDI_STATUS_B0_MASK (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD) #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) @@ -763,7 +754,7 @@ static int ftdi_write_room(struct tty_struct *tty); static int ftdi_chars_in_buffer(struct tty_struct *tty); static void ftdi_write_bulk_callback(struct urb *urb); static void ftdi_read_bulk_callback(struct urb *urb); -static void ftdi_process_read(struct work_struct *work); +static void ftdi_process_read(struct usb_serial_port *port); static void ftdi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old); static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); @@ -1526,7 +1517,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) } kref_init(&priv->kref); - spin_lock_init(&priv->rx_lock); spin_lock_init(&priv->tx_lock); init_waitqueue_head(&priv->delta_msr_wait); /* This will push the characters through immediately rather @@ -1548,7 +1538,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); priv->port = port; /* Free port's existing write urb and transfer buffer. */ @@ -1685,6 +1674,26 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) return 0; } +int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) +{ + struct urb *urb = port->read_urb; + struct usb_serial *serial = port->serial; + int result; + + usb_fill_bulk_urb(urb, serial->dev, + usb_rcvbulkpipe(serial->dev, + port->bulk_in_endpointAddress), + urb->transfer_buffer, + urb->transfer_buffer_length, + ftdi_read_bulk_callback, port); + result = usb_submit_urb(urb, mem_flags); + if (result) + dev_err(&port->dev, + "%s - failed submitting read urb, error %d\n", + __func__, result); + return result; +} + static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) { /* ftdi_open */ struct usb_device *dev = port->serial->dev; @@ -1699,9 +1708,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); write_latency_timer(port); @@ -1721,23 +1727,14 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) ftdi_set_termios(tty, port, tty->termios); /* Not throttled */ - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttled = 0; + port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; - usb_fill_bulk_urb(port->read_urb, dev, - usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); - result = usb_submit_urb(port->read_urb, GFP_KERNEL); - if (result) - dev_err(&port->dev, - "%s - failed submitting read urb, error %d\n", - __func__, result); - else + result = ftdi_submit_read_urb(port, GFP_KERNEL); + if (!result) kref_get(&priv->kref); return result; @@ -1783,10 +1780,6 @@ static void ftdi_close(struct usb_serial_port *port) dbg("%s", __func__); - - /* cancel any scheduled reading */ - cancel_delayed_work_sync(&priv->rx_work); - /* shutdown our bulk read */ usb_kill_urb(port->read_urb); kref_put(&priv->kref, ftdi_sio_priv_release); @@ -2009,271 +2002,142 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) return buffered; } -static void ftdi_read_bulk_callback(struct urb *urb) +static int ftdi_process_packet(struct tty_struct *tty, + struct usb_serial_port *port, struct ftdi_private *priv, + char *packet, int len) { - struct usb_serial_port *port = urb->context; - struct tty_struct *tty; - struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; - int status = urb->status; - - if (urb->number_of_packets > 0) { - dev_err(&port->dev, "%s transfer_buffer_length %d " - "actual_length %d number of packets %d\n", __func__, - urb->transfer_buffer_length, - urb->actual_length, urb->number_of_packets); - dev_err(&port->dev, "%s transfer_flags %x\n", __func__, - urb->transfer_flags); - } + int i; + char status; + char flag; + char *ch; dbg("%s - port %d", __func__, port->number); - if (port->port.count <= 0) - return; - - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; + if (len < 2) { + dbg("malformed packet"); + return 0; } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + /* Compare new line status to the old one, signal if different/ + N.B. packet may be processed more than once, but differences + are only processed once. */ + status = packet[0] & FTDI_STATUS_B0_MASK; + if (status != priv->prev_status) { + priv->diff_status |= status ^ priv->prev_status; + wake_up_interruptible(&priv->delta_msr_wait); + priv->prev_status = status; } - if (urb != port->read_urb) - dev_err(&port->dev, "%s - Not my urb!\n", __func__); - - if (status) { - /* This will happen at close every time so it is a dbg not an - err */ - dbg("(this is ok on close) nonzero read bulk status received: %d", status); - goto out; + /* + * Although the device uses a bitmask and hence can have multiple + * errors on a packet - the order here sets the priority the error is + * returned to the tty layer. + */ + flag = TTY_NORMAL; + if (packet[1] & FTDI_RS_OE) { + flag = TTY_OVERRUN; + dbg("OVERRRUN error"); } - - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - - ftdi_process_read(&priv->rx_work.work); -out: - tty_kref_put(tty); -} /* ftdi_read_bulk_callback */ - - -static void ftdi_process_read(struct work_struct *work) -{ /* ftdi_process_read */ - struct ftdi_private *priv = - container_of(work, struct ftdi_private, rx_work.work); - struct usb_serial_port *port = priv->port; - struct urb *urb; - struct tty_struct *tty; - char error_flag; - unsigned char *data; - - int i; - int result; - int need_flip; - int packet_offset; - unsigned long flags; - - dbg("%s - port %d", __func__, port->number); - - if (port->port.count <= 0) - return; - - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; + if (packet[1] & FTDI_RS_BI) { + flag = TTY_BREAK; + dbg("BREAK received"); + usb_serial_handle_break(port); } - - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + if (packet[1] & FTDI_RS_PE) { + flag = TTY_PARITY; + dbg("PARITY error"); } - - urb = port->read_urb; - if (!urb) { - dbg("%s - bad read_urb pointer - exiting", __func__); - goto out; + if (packet[1] & FTDI_RS_FE) { + flag = TTY_FRAME; + dbg("FRAMING error"); } - data = urb->transfer_buffer; - - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __func__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); - } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) - usb_serial_debug_data(debug, &port->dev, __func__, - urb->actual_length, data); - else - dbg("Status only: %03oo %03oo", data[0], data[1]); + len -= 2; + if (!len) + return 0; /* status only */ + ch = packet + 2; + /* + * The per character mucking around with sysrq path it too slow, so + * shortcircuit it in the 99.9999999% of cases where the USB serial is + * not a console anyway. + */ + if (!port->console || !port->sysrq) + tty_insert_flip_string(tty, ch, len); + else { + for (i = 0; i < len; i++, ch++) { + if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + tty_insert_flip_char(tty, *ch, flag); + } } + return len; +} +static void ftdi_process_read(struct usb_serial_port *port) +{ + struct urb *urb = port->read_urb; + struct tty_struct *tty; + struct ftdi_private *priv = usb_get_serial_port_data(port); + char *data = (char *)urb->transfer_buffer; + int i; + int len; + int count = 0; - /* TO DO -- check for hung up line and handle appropriately: */ - /* send hangup */ - /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */ - /* if CD is dropped and the line is not CLOCAL then we should hangup */ - - need_flip = 0; - for (packet_offset = priv->rx_processed; - packet_offset < urb->actual_length; packet_offset += priv->max_packet_size) { - int length; - - /* Compare new line status to the old one, signal if different/ - N.B. packet may be processed more than once, but differences - are only processed once. */ - char new_status = data[packet_offset + 0] & - FTDI_STATUS_B0_MASK; - if (new_status != priv->prev_status) { - priv->diff_status |= - new_status ^ priv->prev_status; - wake_up_interruptible(&priv->delta_msr_wait); - priv->prev_status = new_status; - } + tty = tty_port_tty_get(&port->port); + if (!tty) + return; - length = min_t(u32, priv->max_packet_size, urb->actual_length-packet_offset)-2; - if (length < 0) { - dev_err(&port->dev, "%s - bad packet length: %d\n", - __func__, length+2); - length = 0; - } + /* FIXME: check priv? */ - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __func__); - break; - } - if (tty_buffer_request_room(tty, length) < length) { - /* break out & wait for throttling/unthrottling to - happen */ - dbg("%s - receive room low", __func__); - break; - } + for (i = 0; i < urb->actual_length; i += priv->max_packet_size) { + len = min_t(int, urb->actual_length - i, priv->max_packet_size); + count += ftdi_process_packet(tty, port, priv, &data[i], len); + } - /* Handle errors and break */ - error_flag = TTY_NORMAL; - /* Although the device uses a bitmask and hence can have - multiple errors on a packet - the order here sets the - priority the error is returned to the tty layer */ + if (count) + tty_flip_buffer_push(tty); + tty_kref_put(tty); +} - if (data[packet_offset+1] & FTDI_RS_OE) { - error_flag = TTY_OVERRUN; - dbg("OVERRRUN error"); - } - if (data[packet_offset+1] & FTDI_RS_BI) { - error_flag = TTY_BREAK; - dbg("BREAK received"); - usb_serial_handle_break(port); - } - if (data[packet_offset+1] & FTDI_RS_PE) { - error_flag = TTY_PARITY; - dbg("PARITY error"); - } - if (data[packet_offset+1] & FTDI_RS_FE) { - error_flag = TTY_FRAME; - dbg("FRAMING error"); - } - if (length > 0) { - for (i = 2; i < length+2; i++) { - /* Note that the error flag is duplicated for - every character received since we don't know - which character it applied to */ - if (!usb_serial_handle_sysrq_char(tty, port, - data[packet_offset + i])) - tty_insert_flip_char(tty, - data[packet_offset + i], - error_flag); - } - need_flip = 1; - } +static void ftdi_read_bulk_callback(struct urb *urb) +{ + struct usb_serial_port *port = urb->context; + unsigned char *data = urb->transfer_buffer; + int status = urb->status; + unsigned long flags; -#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW - /* if a parity error is detected you get status packets forever - until a character is sent without a parity error. - This doesn't work well since the application receives a - never ending stream of bad data - even though new data - hasn't been sent. Therefore I (bill) have taken this out. - However - this might make sense for framing errors and so on - so I am leaving the code in for now. - */ - else { - if (error_flag != TTY_NORMAL) { - dbg("error_flag is not normal"); - /* In this case it is just status - if that is - an error send a bad character */ - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, 0xff, error_flag); - need_flip = 1; - } - } -#endif - } /* "for(packet_offset=0..." */ + dbg("%s - port %d", __func__, port->number); - /* Low latency */ - if (need_flip) - tty_flip_buffer_push(tty); + /* FIXME: remove? */ + if (urb->number_of_packets > 0) { + dev_err(&port->dev, "%s transfer_buffer_length %d " + "actual_length %d number of packets %d\n", __func__, + urb->transfer_buffer_length, + urb->actual_length, urb->number_of_packets); + dev_err(&port->dev, "%s transfer_flags %x\n", __func__, + urb->transfer_flags); + } - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __func__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __func__); - goto out; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - else - dbg("%s - port is closed", __func__); - goto out; + if (unlikely(status != 0)) { + dbg("%s - nonzero read bulk status received: %d", + __func__, status); + return; } - /* urb is completely processed */ - priv->rx_processed = 0; + /* FIXME: check urb != port->read_urb? */ - /* if the port is closed stop trying to read */ - if (port->port.count > 0) { - /* Continue trying to always read */ - usb_fill_bulk_urb(port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); + usb_serial_debug_data(debug, &port->dev, __func__, + urb->actual_length, data); - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, - "%s - failed resubmitting read urb, error %d\n", - __func__, result); - } -out: - tty_kref_put(tty); -} /* ftdi_process_read */ + ftdi_process_read(port); + spin_lock_irqsave(&port->lock, flags); + port->throttled = port->throttle_req; + if (!port->throttled) { + spin_unlock_irqrestore(&port->lock, flags); + ftdi_submit_read_urb(port, GFP_ATOMIC); + } else + spin_unlock_irqrestore(&port->lock, flags); +} static void ftdi_break_ctl(struct tty_struct *tty, int break_state) { @@ -2605,33 +2469,30 @@ static int ftdi_ioctl(struct tty_struct *tty, struct file *file, static void ftdi_throttle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags |= THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttle_req = 1; + spin_unlock_irqrestore(&port->lock, flags); } - -static void ftdi_unthrottle(struct tty_struct *tty) +void ftdi_unthrottle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); - int actually_throttled; + int was_throttled; unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + was_throttled = port->throttled; + port->throttled = port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); - if (actually_throttled) - schedule_delayed_work(&priv->rx_work, 0); + if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags)) + ftdi_submit_read_urb(port, GFP_KERNEL); } static int __init ftdi_init(void) -- 1.6.4.2 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold 2009-10-03 12:11 ` Oliver Neukum @ 2009-10-03 13:18 ` Alan Cox 2009-10-03 13:27 ` Oliver Neukum 2009-10-03 14:05 ` Johan Hovold 1 sibling, 2 replies; 40+ messages in thread From: Alan Cox @ 2009-10-03 13:18 UTC (permalink / raw) To: Johan Hovold Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel On Sat, 3 Oct 2009 13:42:29 +0200 Johan Hovold <jhovold@gmail.com> wrote: > On Fri, Oct 02, 2009 at 05:33:08PM +0100, Alan Cox wrote: > > For upstream how does this look as a tidy up > > I found a couple of issues: > > - The patch breaks unthrottling, as it checks THROTTLE before resubmitting > urb whereas unthrottle checks ACTUALLY_UNTROTTLED which is never set. > > - The countread stuff should also be removed from > ftdi_read_bulk_callback as they where only used for updating > rx_bytes, > > And, obviously, this doesn't solve the problem of tty_flip_buffer_push > being called from interrupt context (but I assume that was never the > intention). Calling tty_flip_buffer_push from an interrupt is perfectly acceptable providing tty->low_latency isn't set: which it isn't. > I've actually been working on cleaning up ftdi_sio inspired by the > generic driver. I also threw out the work queue, but had not noticed the > unused rx_byte yet. I also used the generic drivers scheme of not > pushing to tty until unthrottled, but as you point out this is not really > needed anymore. The generic driver is a very bad example to follow in some areas but this looks a big improvement. There are some patches reworking the generic code to use kfifo on the output side which make it vastly better. Not sure where the relevant google submissions went ? > - spin_lock_irqsave(&priv->rx_lock, flags); > - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); > - spin_unlock_irqrestore(&priv->rx_lock, flags); > + spin_lock_irqsave(&port->lock, flags); > + port->throttled = 0; > + spin_unlock_irqrestore(&port->lock, flags); If you only have a single bit use the set_bit/clear_bit/test_and_xxx_bit stuff as it's faster on most boxes > + * The per character mucking around with sysrq path it too slow, so > + * shortcircuit it in the 99.9999999% of cases where the USB serial is > + * not a console anyway. > + */ > + ch = packet + 2; > + len -= 2; > + if (!port->console || !port->sysrq) You need && flag == TTY_NORMAL ? Definitely a move in the right direction ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 13:18 ` Alan Cox @ 2009-10-03 13:27 ` Oliver Neukum 2009-10-03 14:05 ` Johan Hovold 1 sibling, 0 replies; 40+ messages in thread From: Oliver Neukum @ 2009-10-03 13:27 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, linux-usb, Andrew Morton, linux-kernel Am Samstag, 3. Oktober 2009 15:18:07 schrieb Alan Cox: > The generic driver is a very bad example to follow in some areas but > this looks a big improvement. There are some patches reworking the > generic code to use kfifo on the output side which make it vastly better. > Not sure where the relevant google submissions went ? They have been included into rc1. > > - spin_lock_irqsave(&priv->rx_lock, flags); > > - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); > > - spin_unlock_irqrestore(&priv->rx_lock, flags); > > + spin_lock_irqsave(&port->lock, flags); > > + port->throttled = 0; > > + spin_unlock_irqrestore(&port->lock, flags); > > If you only have a single bit use the set_bit/clear_bit/test_and_xxx_bit > stuff as it's faster on most boxes I think we cannot do with less than two flags, whose transition has to be atomic here. Regards Oliver ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 13:18 ` Alan Cox 2009-10-03 13:27 ` Oliver Neukum @ 2009-10-03 14:05 ` Johan Hovold 2009-10-03 16:33 ` Alan Cox 1 sibling, 1 reply; 40+ messages in thread From: Johan Hovold @ 2009-10-03 14:05 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel On Sat, Oct 03, 2009 at 02:18:07PM +0100, Alan Cox wrote: > On Sat, 3 Oct 2009 13:42:29 +0200 > Johan Hovold <jhovold@gmail.com> wrote: > > On Fri, Oct 02, 2009 at 05:33:08PM +0100, Alan Cox wrote: > > And, obviously, this doesn't solve the problem of tty_flip_buffer_push > > being called from interrupt context (but I assume that was never the > > intention). > > Calling tty_flip_buffer_push from an interrupt is perfectly acceptable > providing tty->low_latency isn't set: which it isn't. Of course -- the "with low latency set" part fell out (or, was implicit ;-) ). Your patch, however, still has low_latency set when it calls tty_flip_buffer_push and that's the problem. > > - spin_lock_irqsave(&priv->rx_lock, flags); > > - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); > > - spin_unlock_irqrestore(&priv->rx_lock, flags); > > + spin_lock_irqsave(&port->lock, flags); > > + port->throttled = 0; > > + spin_unlock_irqrestore(&port->lock, flags); > > If you only have a single bit use the set_bit/clear_bit/test_and_xxx_bit > stuff as it's faster on most boxes The generic driver uses two fields in usb_serial_port for throttled/trottle_req, whereas ftdi_sio, whiteheat, aircable, cypress and perhaps a couple more have private a flag field for THROTTLED and ACTUALLY_THROTTLED. How about unifying them to all use a single flag field (with two flags) in usb_serial_port? > > + * The per character mucking around with sysrq path it too slow, so > > + * shortcircuit it in the 99.9999999% of cases where the USB serial is > > + * not a console anyway. > > + */ > > + ch = packet + 2; > > + len -= 2; > > + if (!port->console || !port->sysrq) > > You need && flag == TTY_NORMAL ? You tell me. :-) Are we interested in them unless port->console is set? > Definitely a move in the right direction Thanks, Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 14:05 ` Johan Hovold @ 2009-10-03 16:33 ` Alan Cox 2009-10-03 16:46 ` Johan Hovold 2009-10-04 19:48 ` Johan Hovold 0 siblings, 2 replies; 40+ messages in thread From: Alan Cox @ 2009-10-03 16:33 UTC (permalink / raw) To: Johan Hovold Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel > Of course -- the "with low latency set" part fell out (or, was implicit > ;-) ). Your patch, however, still has low_latency set when it calls > tty_flip_buffer_push and that's the problem. I don't think it does - I removed all the low latency setting. > How about unifying them to all use a single flag field (with two flags) > in usb_serial_port? May make sense. > > > > + * The per character mucking around with sysrq path it too slow, so > > > + * shortcircuit it in the 99.9999999% of cases where the USB serial is > > > + * not a console anyway. > > > + */ > > > + ch = packet + 2; > > > + len -= 2; > > > + if (!port->console || !port->sysrq) > > > > You need && flag == TTY_NORMAL ? > > You tell me. :-) Are we interested in them unless port->console is set? Yes - we don;t care about the sysrq but we care about error characters being reported ot the line discipline properly. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 16:33 ` Alan Cox @ 2009-10-03 16:46 ` Johan Hovold 2009-10-04 19:48 ` Johan Hovold 1 sibling, 0 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-03 16:46 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel On Sat, Oct 03, 2009 at 05:33:24PM +0100, Alan Cox wrote: > > Of course -- the "with low latency set" part fell out (or, was implicit > > ;-) ). Your patch, however, still has low_latency set when it calls > > tty_flip_buffer_push and that's the problem. > > I don't think it does - I removed all the low latency setting. It's still in the patch you posted (and ASYNC_LOW_LATENCY is left unmodifed, that is set, by your patch): @@ -1700,9 +1697,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); if (tty) tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0; @@ -1730,7 +1724,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_unlock_irqrestore(&priv->rx_lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; usb_fill_bulk_urb(port->read_urb, dev, usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, But nevermind, we agree it should go. :-) ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-03 16:33 ` Alan Cox 2009-10-03 16:46 ` Johan Hovold @ 2009-10-04 19:48 ` Johan Hovold 2009-10-04 23:39 ` Eric W. Biederman 1 sibling, 1 reply; 40+ messages in thread From: Johan Hovold @ 2009-10-04 19:48 UTC (permalink / raw) To: Alan Cox Cc: Johan Hovold, Eric W. Biederman, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel > > > > + * The per character mucking around with sysrq path it too slow, so > > > > + * shortcircuit it in the 99.9999999% of cases where the USB serial is > > > > + * not a console anyway. > > > > + */ > > > > + ch = packet + 2; > > > > + len -= 2; > > > > + if (!port->console || !port->sysrq) > > > > > > You need && flag == TTY_NORMAL ? > > > > You tell me. :-) Are we interested in them unless port->console is set? > > Yes - we don;t care about the sysrq but we care about error characters > being reported ot the line discipline properly. Wasn't thinking.. Here's an update which always passes error characters. It also uses ASYNCB_INITIALIZED (instead of ASYNCB_CLOSING) in unthrottle. Thanks, Johan From: Johan Hovold <jhovold@gmail.com> Date: Sun, 4 Oct 2009 21:41:07 +0200 Subject: [PATCH] USB: ftdi_sio: Rewrite. - Remove work queue. - Use urb status to determine when port is closed rather than port count. (Fixes stalled reads due to open race on 2.6.31). - Re-structure read processing. - Use tty_insert_flip_string instead of per character push when possible. - Always process before throttling. - Handle late call to unthrottle during serial_close by checking ASYNCB_INITIALIZED. - Remove rx_flags and lock and use flags in usb_serial_port instead. - Remove unused rx_bytes counter. - Remove obsolete error checks. --- drivers/usb/serial/ftdi_sio.c | 418 +++++++++++++---------------------------- 1 files changed, 130 insertions(+), 288 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0ac2c2f..eb6d978 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -76,12 +76,7 @@ struct ftdi_private { unsigned long last_dtr_rts; /* saved modem control outputs */ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */ char prev_status, diff_status; /* Used for TIOCMIWAIT */ - __u8 rx_flags; /* receive state flags (throttling) */ - spinlock_t rx_lock; /* spinlock for receive state */ - struct delayed_work rx_work; struct usb_serial_port *port; - int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -737,10 +732,6 @@ static const char *ftdi_chip_name[] = { /* Constants for read urb and write urb */ #define BUFSZ 512 -/* rx_flags */ -#define THROTTLED 0x01 -#define ACTUALLY_THROTTLED 0x02 - /* Used for TIOCMIWAIT */ #define FTDI_STATUS_B0_MASK (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD) #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) @@ -763,7 +754,7 @@ static int ftdi_write_room(struct tty_struct *tty); static int ftdi_chars_in_buffer(struct tty_struct *tty); static void ftdi_write_bulk_callback(struct urb *urb); static void ftdi_read_bulk_callback(struct urb *urb); -static void ftdi_process_read(struct work_struct *work); +static void ftdi_process_read(struct usb_serial_port *port); static void ftdi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old); static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); @@ -1526,7 +1517,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) } kref_init(&priv->kref); - spin_lock_init(&priv->rx_lock); spin_lock_init(&priv->tx_lock); init_waitqueue_head(&priv->delta_msr_wait); /* This will push the characters through immediately rather @@ -1548,7 +1538,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); priv->port = port; /* Free port's existing write urb and transfer buffer. */ @@ -1685,6 +1674,26 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) return 0; } +int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) +{ + struct urb *urb = port->read_urb; + struct usb_serial *serial = port->serial; + int result; + + usb_fill_bulk_urb(urb, serial->dev, + usb_rcvbulkpipe(serial->dev, + port->bulk_in_endpointAddress), + urb->transfer_buffer, + urb->transfer_buffer_length, + ftdi_read_bulk_callback, port); + result = usb_submit_urb(urb, mem_flags); + if (result) + dev_err(&port->dev, + "%s - failed submitting read urb, error %d\n", + __func__, result); + return result; +} + static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) { /* ftdi_open */ struct usb_device *dev = port->serial->dev; @@ -1699,9 +1708,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); write_latency_timer(port); @@ -1721,23 +1727,14 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) ftdi_set_termios(tty, port, tty->termios); /* Not throttled */ - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttled = 0; + port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; - usb_fill_bulk_urb(port->read_urb, dev, - usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); - result = usb_submit_urb(port->read_urb, GFP_KERNEL); - if (result) - dev_err(&port->dev, - "%s - failed submitting read urb, error %d\n", - __func__, result); - else + result = ftdi_submit_read_urb(port, GFP_KERNEL); + if (!result) kref_get(&priv->kref); return result; @@ -1783,10 +1780,6 @@ static void ftdi_close(struct usb_serial_port *port) dbg("%s", __func__); - - /* cancel any scheduled reading */ - cancel_delayed_work_sync(&priv->rx_work); - /* shutdown our bulk read */ usb_kill_urb(port->read_urb); kref_put(&priv->kref, ftdi_sio_priv_release); @@ -2009,271 +2002,122 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) return buffered; } -static void ftdi_read_bulk_callback(struct urb *urb) +static int ftdi_process_packet(struct tty_struct *tty, + struct usb_serial_port *port, struct ftdi_private *priv, + char *packet, int len) { - struct usb_serial_port *port = urb->context; - struct tty_struct *tty; - struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; - int status = urb->status; - - if (urb->number_of_packets > 0) { - dev_err(&port->dev, "%s transfer_buffer_length %d " - "actual_length %d number of packets %d\n", __func__, - urb->transfer_buffer_length, - urb->actual_length, urb->number_of_packets); - dev_err(&port->dev, "%s transfer_flags %x\n", __func__, - urb->transfer_flags); - } + int i; + char status; + char flag; + char *ch; dbg("%s - port %d", __func__, port->number); - if (port->port.count <= 0) - return; - - tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); - return; + if (len < 2) { + dbg("malformed packet"); + return 0; } - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; + /* Compare new line status to the old one, signal if different/ + N.B. packet may be processed more than once, but differences + are only processed once. */ + status = packet[0] & FTDI_STATUS_B0_MASK; + if (status != priv->prev_status) { + priv->diff_status |= status ^ priv->prev_status; + wake_up_interruptible(&priv->delta_msr_wait); + priv->prev_status = status; } - if (urb != port->read_urb) - dev_err(&port->dev, "%s - Not my urb!\n", __func__); - - if (status) { - /* This will happen at close every time so it is a dbg not an - err */ - dbg("(this is ok on close) nonzero read bulk status received: %d", status); - goto out; + /* + * Although the device uses a bitmask and hence can have multiple + * errors on a packet - the order here sets the priority the error is + * returned to the tty layer. + */ + flag = TTY_NORMAL; + if (packet[1] & FTDI_RS_OE) { + flag = TTY_OVERRUN; + dbg("OVERRRUN error"); + } + if (packet[1] & FTDI_RS_BI) { + flag = TTY_BREAK; + dbg("BREAK received"); + usb_serial_handle_break(port); + } + if (packet[1] & FTDI_RS_PE) { + flag = TTY_PARITY; + dbg("PARITY error"); + } + if (packet[1] & FTDI_RS_FE) { + flag = TTY_FRAME; + dbg("FRAMING error"); } - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - - ftdi_process_read(&priv->rx_work.work); -out: - tty_kref_put(tty); -} /* ftdi_read_bulk_callback */ - + len -= 2; + if (!len) + return 0; /* status only */ + ch = packet + 2; + + if (!(port->console && port->sysrq) && flag == TTY_NORMAL) + tty_insert_flip_string(tty, ch, len); + else { + for (i = 0; i < len; i++, ch++) { + if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + tty_insert_flip_char(tty, *ch, flag); + } + } + return len; +} -static void ftdi_process_read(struct work_struct *work) -{ /* ftdi_process_read */ - struct ftdi_private *priv = - container_of(work, struct ftdi_private, rx_work.work); - struct usb_serial_port *port = priv->port; - struct urb *urb; +static void ftdi_process_read(struct usb_serial_port *port) +{ + struct urb *urb = port->read_urb; struct tty_struct *tty; - char error_flag; - unsigned char *data; - + struct ftdi_private *priv = usb_get_serial_port_data(port); + char *data = (char *)urb->transfer_buffer; int i; - int result; - int need_flip; - int packet_offset; - unsigned long flags; - - dbg("%s - port %d", __func__, port->number); - - if (port->port.count <= 0) - return; + int len; + int count = 0; tty = tty_port_tty_get(&port->port); - if (!tty) { - dbg("%s - bad tty pointer - exiting", __func__); + if (!tty) return; - } - - priv = usb_get_serial_port_data(port); - if (!priv) { - dbg("%s - bad port private data pointer - exiting", __func__); - goto out; - } - - urb = port->read_urb; - if (!urb) { - dbg("%s - bad read_urb pointer - exiting", __func__); - goto out; - } - data = urb->transfer_buffer; - - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __func__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); - } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) - usb_serial_debug_data(debug, &port->dev, __func__, - urb->actual_length, data); - else - dbg("Status only: %03oo %03oo", data[0], data[1]); + for (i = 0; i < urb->actual_length; i += priv->max_packet_size) { + len = min_t(int, urb->actual_length - i, priv->max_packet_size); + count += ftdi_process_packet(tty, port, priv, &data[i], len); } - - /* TO DO -- check for hung up line and handle appropriately: */ - /* send hangup */ - /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */ - /* if CD is dropped and the line is not CLOCAL then we should hangup */ - - need_flip = 0; - for (packet_offset = priv->rx_processed; - packet_offset < urb->actual_length; packet_offset += priv->max_packet_size) { - int length; - - /* Compare new line status to the old one, signal if different/ - N.B. packet may be processed more than once, but differences - are only processed once. */ - char new_status = data[packet_offset + 0] & - FTDI_STATUS_B0_MASK; - if (new_status != priv->prev_status) { - priv->diff_status |= - new_status ^ priv->prev_status; - wake_up_interruptible(&priv->delta_msr_wait); - priv->prev_status = new_status; - } - - length = min_t(u32, priv->max_packet_size, urb->actual_length-packet_offset)-2; - if (length < 0) { - dev_err(&port->dev, "%s - bad packet length: %d\n", - __func__, length+2); - length = 0; - } - - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __func__); - break; - } - if (tty_buffer_request_room(tty, length) < length) { - /* break out & wait for throttling/unthrottling to - happen */ - dbg("%s - receive room low", __func__); - break; - } - - /* Handle errors and break */ - error_flag = TTY_NORMAL; - /* Although the device uses a bitmask and hence can have - multiple errors on a packet - the order here sets the - priority the error is returned to the tty layer */ - - if (data[packet_offset+1] & FTDI_RS_OE) { - error_flag = TTY_OVERRUN; - dbg("OVERRRUN error"); - } - if (data[packet_offset+1] & FTDI_RS_BI) { - error_flag = TTY_BREAK; - dbg("BREAK received"); - usb_serial_handle_break(port); - } - if (data[packet_offset+1] & FTDI_RS_PE) { - error_flag = TTY_PARITY; - dbg("PARITY error"); - } - if (data[packet_offset+1] & FTDI_RS_FE) { - error_flag = TTY_FRAME; - dbg("FRAMING error"); - } - if (length > 0) { - for (i = 2; i < length+2; i++) { - /* Note that the error flag is duplicated for - every character received since we don't know - which character it applied to */ - if (!usb_serial_handle_sysrq_char(tty, port, - data[packet_offset + i])) - tty_insert_flip_char(tty, - data[packet_offset + i], - error_flag); - } - need_flip = 1; - } - -#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW - /* if a parity error is detected you get status packets forever - until a character is sent without a parity error. - This doesn't work well since the application receives a - never ending stream of bad data - even though new data - hasn't been sent. Therefore I (bill) have taken this out. - However - this might make sense for framing errors and so on - so I am leaving the code in for now. - */ - else { - if (error_flag != TTY_NORMAL) { - dbg("error_flag is not normal"); - /* In this case it is just status - if that is - an error send a bad character */ - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, 0xff, error_flag); - need_flip = 1; - } - } -#endif - } /* "for(packet_offset=0..." */ - - /* Low latency */ - if (need_flip) + if (count) tty_flip_buffer_push(tty); + tty_kref_put(tty); +} - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __func__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __func__); - goto out; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->port.count > 0) - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - else - dbg("%s - port is closed", __func__); - goto out; - } - - /* urb is completely processed */ - priv->rx_processed = 0; +static void ftdi_read_bulk_callback(struct urb *urb) +{ + struct usb_serial_port *port = urb->context; + int status = urb->status; + unsigned long flags; - /* if the port is closed stop trying to read */ - if (port->port.count > 0) { - /* Continue trying to always read */ - usb_fill_bulk_urb(port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - ftdi_read_bulk_callback, port); + dbg("%s - port %d", __func__, port->number); - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, - "%s - failed resubmitting read urb, error %d\n", - __func__, result); + if (status) { + dbg("%s - nonzero read bulk status received: %d", + __func__, status); + return; } -out: - tty_kref_put(tty); -} /* ftdi_process_read */ + usb_serial_debug_data(debug, &port->dev, __func__, + urb->actual_length, urb->transfer_buffer); + ftdi_process_read(port); + + spin_lock_irqsave(&port->lock, flags); + port->throttled = port->throttle_req; + if (!port->throttled) { + spin_unlock_irqrestore(&port->lock, flags); + ftdi_submit_read_urb(port, GFP_ATOMIC); + } else + spin_unlock_irqrestore(&port->lock, flags); +} static void ftdi_break_ctl(struct tty_struct *tty, int break_state) { @@ -2605,33 +2449,31 @@ static int ftdi_ioctl(struct tty_struct *tty, struct file *file, static void ftdi_throttle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_flags |= THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + port->throttle_req = 1; + spin_unlock_irqrestore(&port->lock, flags); } - -static void ftdi_unthrottle(struct tty_struct *tty) +void ftdi_unthrottle(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - struct ftdi_private *priv = usb_get_serial_port_data(port); - int actually_throttled; + int was_throttled; unsigned long flags; dbg("%s - port %d", __func__, port->number); - spin_lock_irqsave(&priv->rx_lock, flags); - actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); - spin_unlock_irqrestore(&priv->rx_lock, flags); + spin_lock_irqsave(&port->lock, flags); + was_throttled = port->throttled; + port->throttled = port->throttle_req = 0; + spin_unlock_irqrestore(&port->lock, flags); - if (actually_throttled) - schedule_delayed_work(&priv->rx_work, 0); + /* Resubmit urb if throttled and open. */ + if (was_throttled && test_bit(ASYNCB_INITIALIZED, &port->port.flags)) + ftdi_submit_read_urb(port, GFP_KERNEL); } static int __init ftdi_init(void) -- 1.6.4.2 ^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-04 19:48 ` Johan Hovold @ 2009-10-04 23:39 ` Eric W. Biederman 2009-10-05 7:01 ` Johan Hovold 0 siblings, 1 reply; 40+ messages in thread From: Eric W. Biederman @ 2009-10-04 23:39 UTC (permalink / raw) To: Johan Hovold Cc: Alan Cox, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel Johan Hovold <jhovold@gmail.com> writes: >> > > > + * The per character mucking around with sysrq path it too slow, so >> > > > + * shortcircuit it in the 99.9999999% of cases where the USB serial is >> > > > + * not a console anyway. >> > > > + */ >> > > > + ch = packet + 2; >> > > > + len -= 2; >> > > > + if (!port->console || !port->sysrq) >> > > >> > > You need && flag == TTY_NORMAL ? >> > >> > You tell me. :-) Are we interested in them unless port->console is set? >> >> Yes - we don;t care about the sysrq but we care about error characters >> being reported ot the line discipline properly. > > Wasn't thinking.. Here's an update which always passes error characters. > It also uses ASYNCB_INITIALIZED (instead of ASYNCB_CLOSING) in unthrottle. To test this what should I be applying this on top of? There have been a lot of patches flying around. Eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-04 23:39 ` Eric W. Biederman @ 2009-10-05 7:01 ` Johan Hovold 0 siblings, 0 replies; 40+ messages in thread From: Johan Hovold @ 2009-10-05 7:01 UTC (permalink / raw) To: Eric W. Biederman Cc: Johan Hovold, Alan Cox, Greg Kroah-Hartman, Michael Trimarchi, Oliver Neukum, linux-usb, Andrew Morton, linux-kernel On Sun, Oct 04, 2009 at 04:39:22PM -0700, Eric W. Biederman wrote: > To test this what should I be applying this on top of? > There have been a lot of patches flying around. Only my initial removal of low_latency patch. Thanks, Johan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 8:47 ` Johan Hovold 2009-10-02 16:33 ` Alan Cox @ 2009-10-02 16:59 ` Greg KH 1 sibling, 0 replies; 40+ messages in thread From: Greg KH @ 2009-10-02 16:59 UTC (permalink / raw) To: Johan Hovold Cc: Eric W. Biederman, Greg Kroah-Hartman, Alan Cox, Michael Trimarchi, Oliver Neukum, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Fri, Oct 02, 2009 at 10:47:55AM +0200, Johan Hovold wrote: > On Thu, Oct 01, 2009 at 07:52:21PM -0700, Eric W. Biederman wrote: > > Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > > > > >> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from > > >> interrupt context with low_latency set and that is obviously incorrect, > > >> right? > > > > > > It seems to do it from a work queue - or did I miss a case ? > > > > ftdi_sio crash quite regularly for me with 2.6.31. > > > > With a bunch of nasties like: > > BUG: scheduling while atomic: swapper/0/0x00010000 > > bad: scheduling from the idle thread! > > It's the same problem. > > Greg, can't we apply the patch for stable at least? Then we can massage > ftdi_sio into actually using the work queue for doing _all_ processing > in the meantime if deemed necessary. Patches need to be in Linus's tree first, before they can get into the -stable releases. I'm still digging through my patch queue, sorry, been swamped with the -stable stuff, due to the merge window and 4 conferences over the past 2 weeks... thanks, greg k-h ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 2:52 ` Eric W. Biederman 2009-10-02 8:47 ` Johan Hovold @ 2009-10-02 9:04 ` Alan Cox 2009-10-02 9:53 ` Alan Cox 1 sibling, 1 reply; 40+ messages in thread From: Alan Cox @ 2009-10-02 9:04 UTC (permalink / raw) To: Eric W. Biederman Cc: Johan Hovold, Michael Trimarchi, Oliver Neukum, Greg Kroah-Hartman, linux-usb, Alan Cox, Andrew Morton, linux-kernel On Thu, 01 Oct 2009 19:52:21 -0700 ebiederm@xmission.com (Eric W. Biederman) wrote: > Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > > >> As it stands today ftdi_sio does indeed call tty_flip_buffer_push from > >> interrupt context with low_latency set and that is obviously incorrect, > >> right? > > > > It seems to do it from a work queue - or did I miss a case ? > > ftdi_sio crash quite regularly for me with 2.6.31. > > With a bunch of nasties like: > BUG: scheduling while atomic: swapper/0/0x00010000 > bad: scheduling from the idle thread! > > I don't know if I have a good backtrace as things > scrolled away faster than they were captured > but the code below looks like it may be. So it is indeed wrong. Removing the tty->low_latency = 1 will fix the crash and probably should go for stable. I'll have a deeper look at what is doing with the rest of the stuff as the driver may just be trying to be far cleverer than it needs with the newer buffer code. Alan ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency. 2009-10-02 9:04 ` Alan Cox @ 2009-10-02 9:53 ` Alan Cox 0 siblings, 0 replies; 40+ messages in thread From: Alan Cox @ 2009-10-02 9:53 UTC (permalink / raw) To: linux-usb; +Cc: linux-kernel Having had a look through the driver someone with docs or similar needs to explain how the ftdi_sio does hardware and software flow control. It has throttle/unthrottle methods but these just stall the URB queuing and don't do any flow processing of their own at all. Does the ftdi_sio do this in hardware when the urbs run low ? Otherwise it can certainly be simplified a lot. In particular at the point you get throttle event you've got about 64K of cushion to react (flow control being async anyway) and you actually *want* to pull data after you whack the modem lines because the other end also has a latency to respond. So all the clever partial processing of urb stuff is overkill. Whether it needs not to repost urbs to the device or to implement flow control in software I don't know without docs. With that done the driver ought to be a good deal easier to debug. Alan ^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2009-11-18 3:56 UTC | newest] Thread overview: 40+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-09-24 15:40 [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold 2009-09-24 19:03 ` Oliver Neukum 2009-09-24 19:21 ` Alan Cox 2009-09-24 21:15 ` Johan Hovold 2009-09-25 17:46 ` Michael Trimarchi 2009-09-29 14:55 ` Johan Hovold 2009-09-29 22:52 ` Alan Cox 2009-09-30 6:33 ` Michael Trimarchi 2009-09-30 9:05 ` Johan Hovold 2009-10-02 2:52 ` Eric W. Biederman 2009-10-02 8:47 ` Johan Hovold 2009-10-02 16:33 ` Alan Cox 2009-10-02 22:29 ` Eric W. Biederman 2009-10-03 10:21 ` Johan Hovold 2009-10-02 23:00 ` Eric W. Biederman 2009-10-03 13:09 ` Alan Cox 2009-10-03 23:51 ` Eric W. Biederman 2009-11-17 18:35 ` Eric W. Biederman 2009-11-17 18:41 ` Oliver Neukum 2009-11-17 18:56 ` Eric W. Biederman 2009-11-17 20:05 ` Eric W. Biederman 2009-11-18 1:08 ` Eric W. Biederman 2009-11-18 3:10 ` [PATCH] ftdi_sio: Keep going when write errors are encountered Eric W. Biederman 2009-11-18 3:44 ` Greg KH 2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold 2009-10-03 12:11 ` Oliver Neukum 2009-10-03 12:28 ` Johan Hovold 2009-10-03 13:31 ` Oliver Neukum 2009-10-03 14:41 ` Johan Hovold 2009-10-03 13:18 ` Alan Cox 2009-10-03 13:27 ` Oliver Neukum 2009-10-03 14:05 ` Johan Hovold 2009-10-03 16:33 ` Alan Cox 2009-10-03 16:46 ` Johan Hovold 2009-10-04 19:48 ` Johan Hovold 2009-10-04 23:39 ` Eric W. Biederman 2009-10-05 7:01 ` Johan Hovold 2009-10-02 16:59 ` Greg KH 2009-10-02 9:04 ` Alan Cox 2009-10-02 9:53 ` Alan Cox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).