Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f815c335 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: sbp2: fix freeing of unallocated memory
  firewire: ohci: fix Ricoh R5C832, video reception
  firewire: ohci: fix Agere FW643 and multiple cameras
  firewire: core: fix crash in iso resource management
parents 74a01180 baed6b82
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static int manage_bandwidth(struct fw_card *card, int irm_id, int generation,
		switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
				irm_id, generation, SCODE_100,
				CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE,
				data, sizeof(data))) {
				data, 8)) {
		case RCODE_GENERATION:
			/* A generation change frees all bandwidth. */
			return allocate ? -EAGAIN : bandwidth;
@@ -233,7 +233,7 @@ static int manage_channel(struct fw_card *card, int irm_id, int generation,
		data[1] = old ^ c;
		switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
					   irm_id, generation, SCODE_100,
					   offset, data, sizeof(data))) {
					   offset, data, 8)) {
		case RCODE_GENERATION:
			/* A generation change frees all channels. */
			return allocate ? -EAGAIN : i;
+14 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/spinlock.h>
#include <linux/string.h>

@@ -2372,6 +2373,9 @@ static void ohci_pmac_off(struct pci_dev *dev)
#define ohci_pmac_off(dev)
#endif /* CONFIG_PPC_PMAC */

#define PCI_VENDOR_ID_AGERE		PCI_VENDOR_ID_ATT
#define PCI_DEVICE_ID_AGERE_FW643	0x5901

static int __devinit pci_probe(struct pci_dev *dev,
			       const struct pci_device_id *ent)
{
@@ -2422,6 +2426,16 @@ static int __devinit pci_probe(struct pci_dev *dev,
	version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
	ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;

	/* dual-buffer mode is broken if more than one IR context is active */
	if (dev->vendor == PCI_VENDOR_ID_AGERE &&
	    dev->device == PCI_DEVICE_ID_AGERE_FW643)
		ohci->use_dualbuffer = false;

	/* dual-buffer mode is broken */
	if (dev->vendor == PCI_VENDOR_ID_RICOH &&
	    dev->device == PCI_DEVICE_ID_RICOH_R5C832)
		ohci->use_dualbuffer = false;

/* x86-32 currently doesn't use highmem for dma_alloc_coherent */
#if !defined(CONFIG_X86_32)
	/* dual-buffer mode is broken with descriptor addresses above 2G */
+4 −4
Original line number Diff line number Diff line
@@ -456,12 +456,12 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
	}
	spin_unlock_irqrestore(&card->lock, flags);

	if (&orb->link != &lu->orb_list)
	if (&orb->link != &lu->orb_list) {
		orb->callback(orb, &status);
	else
		fw_error("status write for unknown orb\n");

		kref_put(&orb->kref, free_orb);
	} else {
		fw_error("status write for unknown orb\n");
	}

	fw_send_response(card, request, RCODE_COMPLETE);
}