aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-iso.c4
-rw-r--r--drivers/firewire/ohci.c14
-rw-r--r--drivers/firewire/sbp2.c8
3 files changed, 20 insertions, 6 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index 110e731f5574..1c0b504a42f3 100644
--- a/drivers/firewire/core-iso.c
+++ b/drivers/firewire/core-iso.c
@@ -196,7 +196,7 @@ static int manage_bandwidth(struct fw_card *card, int irm_id, int generation,
196 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, 196 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
197 irm_id, generation, SCODE_100, 197 irm_id, generation, SCODE_100,
198 CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE, 198 CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE,
199 data, sizeof(data))) { 199 data, 8)) {
200 case RCODE_GENERATION: 200 case RCODE_GENERATION:
201 /* A generation change frees all bandwidth. */ 201 /* A generation change frees all bandwidth. */
202 return allocate ? -EAGAIN : bandwidth; 202 return allocate ? -EAGAIN : bandwidth;
@@ -233,7 +233,7 @@ static int manage_channel(struct fw_card *card, int irm_id, int generation,
233 data[1] = old ^ c; 233 data[1] = old ^ c;
234 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP, 234 switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
235 irm_id, generation, SCODE_100, 235 irm_id, generation, SCODE_100,
236 offset, data, sizeof(data))) { 236 offset, data, 8)) {
237 case RCODE_GENERATION: 237 case RCODE_GENERATION:
238 /* A generation change frees all channels. */ 238 /* A generation change frees all channels. */
239 return allocate ? -EAGAIN : i; 239 return allocate ? -EAGAIN : i;
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index ecddd11b797a..76b321bb73f9 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -34,6 +34,7 @@
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
36#include <linux/pci.h> 36#include <linux/pci.h>
37#include <linux/pci_ids.h>
37#include <linux/spinlock.h> 38#include <linux/spinlock.h>
38#include <linux/string.h> 39#include <linux/string.h>
39 40
@@ -2372,6 +2373,9 @@ static void ohci_pmac_off(struct pci_dev *dev)
2372#define ohci_pmac_off(dev) 2373#define ohci_pmac_off(dev)
2373#endif /* CONFIG_PPC_PMAC */ 2374#endif /* CONFIG_PPC_PMAC */
2374 2375
2376#define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT
2377#define PCI_DEVICE_ID_AGERE_FW643 0x5901
2378
2375static int __devinit pci_probe(struct pci_dev *dev, 2379static int __devinit pci_probe(struct pci_dev *dev,
2376 const struct pci_device_id *ent) 2380 const struct pci_device_id *ent)
2377{ 2381{
@@ -2422,6 +2426,16 @@ static int __devinit pci_probe(struct pci_dev *dev,
2422 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff; 2426 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2423 ohci->use_dualbuffer = version >= OHCI_VERSION_1_1; 2427 ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;
2424 2428
2429 /* dual-buffer mode is broken if more than one IR context is active */
2430 if (dev->vendor == PCI_VENDOR_ID_AGERE &&
2431 dev->device == PCI_DEVICE_ID_AGERE_FW643)
2432 ohci->use_dualbuffer = false;
2433
2434 /* dual-buffer mode is broken */
2435 if (dev->vendor == PCI_VENDOR_ID_RICOH &&
2436 dev->device == PCI_DEVICE_ID_RICOH_R5C832)
2437 ohci->use_dualbuffer = false;
2438
2425/* x86-32 currently doesn't use highmem for dma_alloc_coherent */ 2439/* x86-32 currently doesn't use highmem for dma_alloc_coherent */
2426#if !defined(CONFIG_X86_32) 2440#if !defined(CONFIG_X86_32)
2427 /* dual-buffer mode is broken with descriptor addresses above 2G */ 2441 /* dual-buffer mode is broken with descriptor addresses above 2G */
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 8d51568ee143..e5df822a8130 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -456,12 +456,12 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
456 } 456 }
457 spin_unlock_irqrestore(&card->lock, flags); 457 spin_unlock_irqrestore(&card->lock, flags);
458 458
459 if (&orb->link != &lu->orb_list) 459 if (&orb->link != &lu->orb_list) {
460 orb->callback(orb, &status); 460 orb->callback(orb, &status);
461 else 461 kref_put(&orb->kref, free_orb);
462 } else {
462 fw_error("status write for unknown orb\n"); 463 fw_error("status write for unknown orb\n");
463 464 }
464 kref_put(&orb->kref, free_orb);
465 465
466 fw_send_response(card, request, RCODE_COMPLETE); 466 fw_send_response(card, request, RCODE_COMPLETE);
467} 467}