diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-08 11:18:47 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-08 11:18:47 -0500 |
commit | c35fa3ea1ae8198bd65c2c6e59d9ebd68c115a59 (patch) | |
tree | 878768b69df25459b448aa890352342c4a3c6e2d /drivers/usb/host | |
parent | dcc7461eef7341e84e2f7274f904ce01a43b2506 (diff) | |
parent | 218d11a8b071b23b76c484fd5f72a4fe3306801e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 9d0ea573aef6..36864f958444 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -169,18 +169,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
169 | } | 169 | } |
170 | break; | 170 | break; |
171 | case PCI_VENDOR_ID_ATI: | 171 | case PCI_VENDOR_ID_ATI: |
172 | /* SB700 old version has a bug in EHCI controller, | 172 | /* SB600 and old version of SB700 have a bug in EHCI controller, |
173 | * which causes usb devices lose response in some cases. | 173 | * which causes usb devices lose response in some cases. |
174 | */ | 174 | */ |
175 | if (pdev->device == 0x4396) { | 175 | if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) { |
176 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, | 176 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, |
177 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 177 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
178 | NULL); | 178 | NULL); |
179 | if (!p_smbus) | 179 | if (!p_smbus) |
180 | break; | 180 | break; |
181 | rev = p_smbus->revision; | 181 | rev = p_smbus->revision; |
182 | if ((rev == 0x3a) || (rev == 0x3b)) { | 182 | if ((pdev->device == 0x4386) || (rev == 0x3a) |
183 | || (rev == 0x3b)) { | ||
183 | u8 tmp; | 184 | u8 tmp; |
185 | ehci_info(ehci, "applying AMD SB600/SB700 USB " | ||
186 | "freeze workaround\n"); | ||
184 | pci_read_config_byte(pdev, 0x53, &tmp); | 187 | pci_read_config_byte(pdev, 0x53, &tmp); |
185 | pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); | 188 | pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); |
186 | } | 189 | } |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index b11798d17ae5..c7d4b5a06bdb 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
183 | * the async ring; just the I/O watchdog. Note that if a | 183 | * the async ring; just the I/O watchdog. Note that if a |
184 | * SHRINK were pending, OFF would never be requested. | 184 | * SHRINK were pending, OFF would never be requested. |
185 | */ | 185 | */ |
186 | enum ehci_timer_action oldactions = ehci->actions; | 186 | if (timer_pending(&ehci->watchdog) |
187 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
188 | & ehci->actions)) | ||
189 | return; | ||
187 | 190 | ||
188 | if (!test_and_set_bit (action, &ehci->actions)) { | 191 | if (!test_and_set_bit (action, &ehci->actions)) { |
189 | unsigned long t; | 192 | unsigned long t; |
190 | 193 | ||
191 | if (timer_pending(&ehci->watchdog) | ||
192 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
193 | & oldactions)) | ||
194 | return; | ||
195 | |||
196 | switch (action) { | 194 | switch (action) { |
197 | case TIMER_IO_WATCHDOG: | 195 | case TIMER_IO_WATCHDOG: |
198 | t = EHCI_IO_JIFFIES; | 196 | t = EHCI_IO_JIFFIES; |
@@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
208 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; | 206 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; |
209 | break; | 207 | break; |
210 | } | 208 | } |
211 | mod_timer(&ehci->watchdog, round_jiffies(t + jiffies)); | 209 | mod_timer(&ehci->watchdog, t + jiffies); |
212 | } | 210 | } |
213 | } | 211 | } |
214 | 212 | ||