aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-01-26 15:39:07 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-01-27 12:24:53 -0500
commit7a481436787cbc932af6c407b317ac603969a242 (patch)
treeb58660247f56926f591b06bd9b1e77280beef51e /drivers
parent281e20323ab72180137824a298ee9e21e6f9acf6 (diff)
firewire: ohci: fix crashes with TSB43AB23 on 64bit systems
Unsurprisingly, Texas Instruments TSB43AB23 exhibits the same behaviour as TSB43AB22/A in dual buffer IR DMA mode: If descriptors are located at physical addresses above the 31 bit address range (2 GB), the controller will overwrite random memory. With luck, this merely prevents video reception. With only a little less luck, the machine crashes. We use the same workaround here as with TSB43AB22/A: Switch off the dual buffer capability flag and use packet-per-buffer IR DMA instead. Another possible workaround would be to limit the coherent DMA mask to 31 bits. In Linux 2.6.33, this change serves effectively only as documentation since dual buffer mode is not used for any controller anymore. But somebody might want to re-enable it in the future to make use of features of dual buffer DMA that are not available in packet-per-buffer mode. In Linux 2.6.32 and older, this update is vital for anyone with this controller, more than 2 GB RAM, a 64 bit kernel, and FireWire video or audio applications. We have at least four reports: http://bugzilla.kernel.org/show_bug.cgi?id=13808 http://marc.info/?l=linux1394-user&m=126154279004083 https://bugzilla.redhat.com/show_bug.cgi?id=552142 http://marc.info/?l=linux1394-user&m=126432246128386 Reported-by: Paul Johnson Reported-by: Ronneil Camara Reported-by: G Zornetzer Reported-by: Mark Thompson Cc: stable@kernel.org Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/ohci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index a61571c63c59..2345d4103fe6 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2420,6 +2420,7 @@ static void ohci_pmac_off(struct pci_dev *dev)
2420 2420
2421#define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT 2421#define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT
2422#define PCI_DEVICE_ID_AGERE_FW643 0x5901 2422#define PCI_DEVICE_ID_AGERE_FW643 0x5901
2423#define PCI_DEVICE_ID_TI_TSB43AB23 0x8024
2423 2424
2424static int __devinit pci_probe(struct pci_dev *dev, 2425static int __devinit pci_probe(struct pci_dev *dev,
2425 const struct pci_device_id *ent) 2426 const struct pci_device_id *ent)
@@ -2488,7 +2489,8 @@ static int __devinit pci_probe(struct pci_dev *dev,
2488#if !defined(CONFIG_X86_32) 2489#if !defined(CONFIG_X86_32)
2489 /* dual-buffer mode is broken with descriptor addresses above 2G */ 2490 /* dual-buffer mode is broken with descriptor addresses above 2G */
2490 if (dev->vendor == PCI_VENDOR_ID_TI && 2491 if (dev->vendor == PCI_VENDOR_ID_TI &&
2491 dev->device == PCI_DEVICE_ID_TI_TSB43AB22) 2492 (dev->device == PCI_DEVICE_ID_TI_TSB43AB22 ||
2493 dev->device == PCI_DEVICE_ID_TI_TSB43AB23))
2492 ohci->use_dualbuffer = false; 2494 ohci->use_dualbuffer = false;
2493#endif 2495#endif
2494 2496