From: Oliver Neukum <oliver@neukum.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kernel Testers List <kernel-testers@vger.kernel.org>,
"okias" <d.okias@gmail.com>
Subject: Re: [Bug #14406] uvcvideo stopped work on Toshiba
Date: Mon, 11 Jan 2010 16:30:14 +0100 [thread overview]
Message-ID: <201001111630.14289.oliver@neukum.org> (raw)
In-Reply-To: <CXIfLt-ygXM.A.ubE.NjlSLB@chimera>
[-- Attachment #1: Type: Text/Plain, Size: 711 bytes --]
Am Sonntag, 10. Januar 2010 23:56:10 schrieb Rafael J. Wysocki:
> This message has been generated automatically as a part of a report
> of regressions introduced between 2.6.31 and 2.6.32.
>
> The following bug entry is on the current list of known regressions
> introduced between 2.6.31 and 2.6.32. Please verify if it still should
> be listed and let me know (either way).
>
>
> Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14406
> Subject : uvcvideo stopped work on Toshiba
> Submitter : okias <d.okias@gmail.com>
> Date : 2009-10-14 19:08 (89 days old)
Have you tested with a kernel that has the attached patch?
If it doesn't help, the problem will have to be bisected.
Regards
Oliver
[-- Attachment #2: ehci_periodic_breakage.diff --]
[-- Type: text/x-patch, Size: 3237 bytes --]
commit c222ad7196f0baa2b7341bfaf8c2821aaa089c3a
Author: Oliver Neukum <oliver@neukum.org>
Date: Fri Nov 27 15:08:08 2009 +0100
usb: add a work around for a quirk with the periodic schedule
a quirky chipset needs periodic schedules to run for a minimum
time before they can be disabled again. This enforces the requirement
with a time stamp and a calculated delay
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9835e07..f5f5601 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -28,6 +28,7 @@
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/timer.h>
+#include <linux/ktime.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/usb.h>
@@ -676,6 +677,7 @@ static int ehci_run (struct usb_hcd *hcd)
ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
msleep(5);
up_write(&ehci_cf_port_reset_rwsem);
+ ehci->last_periodic_enable = ktime_get_real();
temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
ehci_info (ehci,
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 378861b..ead5f4f 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -111,6 +111,10 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
switch (pdev->vendor) {
case PCI_VENDOR_ID_INTEL:
ehci->need_io_watchdog = 0;
+ if (pdev->device == 0x27cc) {
+ ehci->broken_periodic = 1;
+ ehci_info(ehci, "using broken periodic workaround\n");
+ }
break;
case PCI_VENDOR_ID_TDI:
if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index b25cdea..5b68a34 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_hcd *ehci)
/* make sure ehci_work scans these */
ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index)
% (ehci->periodic_size << 3);
+ if (unlikely(ehci->broken_periodic))
+ ehci->last_periodic_enable = ktime_get_real();
return 0;
}
@@ -486,6 +488,16 @@ static int disable_periodic (struct ehci_hcd *ehci)
if (--ehci->periodic_sched)
return 0;
+ if (unlikely(ehci->broken_periodic)) {
+ /* delay experimentally determined */
+ ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000);
+ ktime_t now = ktime_get_real();
+ s64 delay = ktime_us_delta(safe, now);
+
+ if (unlikely(delay > 0))
+ udelay(delay);
+ }
+
/* did setting PSE not take effect yet?
* takes effect only at frame boundaries...
*/
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 064e768..2d85e21 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -118,6 +118,7 @@ struct ehci_hcd { /* one per controller */
unsigned stamp;
unsigned random_frame;
unsigned long next_statechange;
+ ktime_t last_periodic_enable;
u32 command;
/* SILICON QUIRKS */
@@ -127,6 +128,7 @@ struct ehci_hcd { /* one per controller */
unsigned big_endian_desc:1;
unsigned has_amcc_usb23:1;
unsigned need_io_watchdog:1;
+ unsigned broken_periodic:1;
/* required for usb32 quirk */
#define OHCI_CTRL_HCFS (3 << 6)
next prev parent reply other threads:[~2010-01-11 15:40 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 22:45 2.6.33-rc3-git3: Reported regressions 2.6.31 -> 2.6.32 Rafael J. Wysocki
2010-01-10 22:46 ` [Bug #14297] console resume broken since ba15ab0e8d Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14298] warning at manage.c:361 (set_irq_wake), matrix-keypad related? Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14406] uvcvideo stopped work on Toshiba Rafael J. Wysocki
2010-01-11 15:30 ` Oliver Neukum [this message]
2010-01-10 22:56 ` [Bug #14426] CE: hpet increasing min_delta_ns flood Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14376] Kernel NULL pointer dereference/ kvm subsystem Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14417] [Regression] Wireless driver iwlagn+iwlcore doesn't work after resume (needs reloading) Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14482] kernel BUG at fs/dcache.c:670 +lvm +md +ext3 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14483] Interrupts enabled after irqrouter_resume - iMac9,1 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14442] resume after hibernate: /dev/sdb drops and returns as /dev/sde Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14621] specjbb2005 and aim7 regression with 2.6.32-rc kernels Rafael J. Wysocki
2010-01-11 7:05 ` Mike Galbraith
2010-01-10 22:56 ` [Bug #14487] PANIC: early exception 08 rip 246:10 error ffffffff810251b5 cr2 0 Rafael J. Wysocki
2010-01-11 13:56 ` Justin P. Mattock
2010-01-11 19:42 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14625] Commit d451564 breaks ARM Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14624] ath9k: BUG kmalloc-8192: Poison overwritten Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14504] intermittent hibernation problem again Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14657] perf subsystem breakage in 2.6.32-rc7 Rafael J. Wysocki
2010-01-10 23:20 ` Arjan van de Ven
2010-01-11 19:46 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14656] Oops at __rmqueue+0x98 with 2.6.32-rc6 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14667] bisected 2.6.32 EC regression - Temperatures not correctly detected after suspend - Dell Studio XPS 16 laptop Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14742] 2.6.32 new menu idle governor causes very high CPU temp Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14670] i915: playing video via XVideo extension makes the screen flicker Rafael J. Wysocki
2010-01-11 16:53 ` Thomas Meyer
2010-01-11 16:55 ` Jesse Barnes
2010-01-11 18:05 ` Thomas Meyer
[not found] ` <8B599161-2977-4A43-B88F-36E87AFCF4EA@m3y3r.de>
2010-01-11 19:19 ` Jesse Barnes
2010-01-11 20:28 ` Rafael J. Wysocki
2010-01-12 17:43 ` Thomas Meyer
2010-01-12 17:57 ` Jesse Barnes
2010-01-13 21:06 ` Thomas Meyer
2010-01-13 21:48 ` Thomas Meyer
2010-01-10 22:56 ` [Bug #14695] regression in karmic thermal control Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14782] Suspend hangs Lenovo SL300 after gdm login Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14747] bisected 2.6.32 regression: synaptics touchpad doesn't work Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14748] e1000e NIC not working after reboot Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14868] flood of "don't try to register things with the same name in the same directory." on upgrade to 2.6.32 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14783] Unhandled IRQ on Thinkpad R61i: "irq 16: nobody cared" Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14817] When is system under load, then freeze/HD fail Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14841] unable to enumerate USB device on port X after suspend/resume Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14892] intel, KMS, suspend2ram resume, screen black Rafael J. Wysocki
2010-01-13 6:03 ` Norbert Preining
2010-01-13 21:53 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14886] Asus P2B-DS not detected as SMP moterboard Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14894] pohmelfs: NULL pointer dereference Rafael J. Wysocki
2010-01-10 23:23 ` Evgeniy Polyakov
2010-01-11 19:50 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14889] System wakeup by time not working anymore Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14891] Deadlock regression related to NFS root Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14897] i915: Commit 0e442c60 causes flickering Rafael J. Wysocki
2010-01-11 5:22 ` David John
2010-01-11 19:52 ` Rafael J. Wysocki
2010-01-12 18:14 ` Jesse Barnes
2010-01-13 8:06 ` David John
2010-01-10 22:56 ` [Bug #14895] BUG in kernel 2.6.32 when using luks encrypted root and RAID0 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14896] REGRESSION for RT2561/RT61 in 2.6.32, related to power saving Rafael J. Wysocki
2010-01-11 14:58 ` Alan Stern
2010-01-11 19:51 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14898] ksoftirqd problem Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14933] OOM killer unexpectedly called Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14922] 2.6.32 seemed to have broken nVidia MCP7A sata controller Rafael J. Wysocki
2010-01-10 23:17 ` Robert Hancock
2010-01-11 19:54 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14903] Kernel panic - not syncing: Attempted to kill init! Rafael J. Wysocki
2010-01-13 2:55 ` Américo Wang
2010-01-13 21:54 ` Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14970] IBM Trackpoint Device changed - Scrolling doesn't work Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #15040] High cpu temperature with 2.6.32 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14939] drm: random hang with i915 Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #15042] socket(PF_INET6 hangs when ipv6 not yet initialized Rafael J. Wysocki
2010-01-10 22:56 ` [Bug #14943] nfs regression? Rafael J. Wysocki
2010-01-11 12:49 ` 2.6.33-rc3-git3: Reported regressions 2.6.31 -> 2.6.32 Rafał Miłecki
2010-01-11 19:56 ` Rafael J. Wysocki
2010-01-11 15:15 ` [linux-pm] " Alan Stern
2010-01-11 16:47 ` Clemens Fruhwirth
2010-01-11 19:58 ` Rafael J. Wysocki
2010-01-12 17:39 ` Johannes Engel
2010-01-12 22:02 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2009-12-29 15:26 2.6.33-rc2: " Rafael J. Wysocki
2009-12-29 15:28 ` [Bug #14406] uvcvideo stopped work on Toshiba Rafael J. Wysocki
2009-11-21 14:46 2.6.32-rc8-git1: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-11-21 14:51 ` [Bug #14406] uvcvideo stopped work on Toshiba Rafael J. Wysocki
2009-11-16 22:33 2.6.32-rc7-git1: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-11-16 22:37 ` [Bug #14406] uvcvideo stopped work on Toshiba Rafael J. Wysocki
2009-10-26 18:45 2.6.32-rc5-git3: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-10-26 18:55 ` [Bug #14406] uvcvideo stopped work on Toshiba Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001111630.14289.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=d.okias@gmail.com \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®