rpms/kernel/devel kernel.spec, 1.273, 1.274 linux-2.6-firewire-ohci-1.0-iso-receive.patch, 1.1, 1.2

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Mon Dec 3 18:35:09 UTC 2007


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28140

Modified Files:
	kernel.spec linux-2.6-firewire-ohci-1.0-iso-receive.patch 
Log Message:
* Mon Dec 03 2007 Jarod Wilson <jwilson at redhat.com>
- Fix regression on FireWire OHCI 1.1 controllers introduced
  by 1.0 support (#344851)



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -r1.273 -r1.274
--- kernel.spec	3 Dec 2007 03:01:18 -0000	1.273
+++ kernel.spec	3 Dec 2007 18:34:36 -0000	1.274
@@ -1721,6 +1721,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Mon Dec 03 2007 Jarod Wilson <jwilson at redhat.com>
+- Fix regression on FireWire OHCI 1.1 controllers introduced
+  by 1.0 support (#344851)
+
 * Mon Dec 03 2007 David Woodhouse <dwmw2 at redhat.com>
 - Enable PASemi support
 

linux-2.6-firewire-ohci-1.0-iso-receive.patch:

Index: linux-2.6-firewire-ohci-1.0-iso-receive.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-ohci-1.0-iso-receive.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-firewire-ohci-1.0-iso-receive.patch	30 Nov 2007 20:56:05 -0000	1.1
+++ linux-2.6-firewire-ohci-1.0-iso-receive.patch	3 Dec 2007 18:34:36 -0000	1.2
@@ -1,21 +1,31 @@
-Second version of FireWire OHCI 1.0 Isochronous Receive support, this time
-using a zero-copy method similar to 1.1 which puts the IR data payload directly
-into the userspace buffer. This zero-copy implementation eliminates the
-video artifacts, audio popping, and buffer underrun problems seen with the
-prior version.
+Third rendition of FireWire OHCI 1.0 Isochronous Receive support, using a
+zer-copy method similar to OHCI 1.1 which puts the IR data payload directly
+into the userspace buffer. The zero-copy implementation eliminates the
+video artifacts, audio popping, and buffer underrun problems seen with
+version 1 of this patch, as well as fixing a regression in OHCI 1.1 support
+introduced by version 2 of this patch.
 
-Successfully tested on the following chipsets:
+Successfully tested in OHCI 1.1 mode on the following chipsets:
 
-- Agere FW323 (rev 06), OHCI 1.0 (PCI)
-- Agere FW323 (rev 61), OHCI 1.0 (PCI)
 - NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
 - Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)
+- Ti TSB41AB2 (rev 01), OHCI 1.1 (PCI on SB Audigy)
+- Apple UniNorth 2 (rev 81), OHCI 1.1 (PowerBook G4 onboard)
+
+Successfully tested in OHCI 1.0 mode on the following chipsets:
+
+- Agere FW323 (rev 06), OHCI 1.0 (Mac Mini onboard)
+- Agere FW323 (rev 06), OHCI 1.0 (PCI)
 - Via VT6306 (rev 46), OHCI 1.0 (PCI)
+- NEC OrangeLink (rev 01), OHCI 1.0 (PCI)
+- NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
+- Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)
 
-The 1.1 controllers were forced into the OHCI 1.0 packet-per-buffer mode for
-testing purposes. The bulk of testing was done in a core 2 duo system, but I
-also gave the code a quick spin in an EPIA M10k. The cpu utilization during
-capture sat around 13% on a 1GHz Via C3, down from 30% with the earlier code.
+The bulk of testing was done in an x86_64 system, but was also successfully
+sanity-tested on other systems, including a PPC(32) PowerBook G4 and an i686
+EPIA M10k. Crude benchmarking (watching top during capture) puts the cpu
+utilization during capture on the EPIA's 1GHz Via C3 processor around 13%,
+which is down from 30% with the v1 code.
 
 
 Some implementation details:
@@ -34,24 +44,30 @@
 VT6307-based FireWire controllers work particularly well with this code
 for reasons I have yet to figure out.
 
+
 Signed-off-by: Jarod Wilson <jwilson at redhat.com>
 
- drivers/firewire/fw-ohci.c |  170 ++++++++++++++++++++++++++++++++++++++-----
- 1 files changed, 150 insertions(+), 20 deletions(-)
+ drivers/firewire/fw-ohci.c |  175 +++++++++++++++++++++++++++++++++++++++-----
+ 1 files changed, 155 insertions(+), 20 deletions(-)
 
 diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
-index c9b9081..dc8c2ae 100644
+index c9b9081..436a855 100644
 --- a/drivers/firewire/fw-ohci.c
 +++ b/drivers/firewire/fw-ohci.c
-@@ -437,6 +437,16 @@ static void ar_context_run(struct ar_context *ctx)
+@@ -437,6 +437,21 @@ static void ar_context_run(struct ar_context *ctx)
  	flush_writes(ctx->ohci);
  }
  
 +static struct descriptor *
 +find_branch_descriptor(struct descriptor *d, int z)
 +{
++	int b, key;
++
++	b   = (le16_to_cpu(d->control) & DESCRIPTOR_BRANCH_ALWAYS) >> 2;
++	key = (le16_to_cpu(d->control) & DESCRIPTOR_KEY_IMMEDIATE) >> 8;
++
 +	/* figure out which descriptor the branch address goes in */
-+	if (z == 2 && (le16_to_cpu(d->control) & DESCRIPTOR_KEY_IMMEDIATE))
++	if (z == 2 && (b == 3 || key == 2))
 +		return d;
 +	else
 +		return d + z - 1;
@@ -60,7 +76,7 @@
  static void context_tasklet(unsigned long data)
  {
  	struct context *ctx = (struct context *) data;
-@@ -455,7 +465,7 @@ static void context_tasklet(unsigned long data)
+@@ -455,7 +470,7 @@ static void context_tasklet(unsigned long data)
  		address = le32_to_cpu(last->branch_address);
  		z = address & 0xf;
  		d = ctx->buffer + (address - ctx->buffer_bus) / sizeof(*d);
@@ -69,7 +85,7 @@
  
  		if (!ctx->callback(ctx, d, last))
  			break;
-@@ -566,7 +576,7 @@ static void context_append(struct context *ctx,
+@@ -566,7 +581,7 @@ static void context_append(struct context *ctx,
  
  	ctx->head_descriptor = d + z + extra;
  	ctx->prev_descriptor->branch_address = cpu_to_le32(d_bus | z);
@@ -78,7 +94,7 @@
  
  	dma_sync_single_for_device(ctx->ohci->card.device, ctx->buffer_bus,
  				   ctx->buffer_size, DMA_TO_DEVICE);
-@@ -655,7 +665,7 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
+@@ -655,7 +670,7 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
  	driver_data = (struct driver_data *) &d[3];
  	driver_data->packet = packet;
  	packet->driver_data = driver_data;
@@ -87,7 +103,7 @@
  	if (packet->payload_length > 0) {
  		payload_bus =
  			dma_map_single(ohci->card.device, packet->payload,
-@@ -903,7 +913,7 @@ at_context_transmit(struct context *ctx, struct fw_packet *packet)
+@@ -903,7 +918,7 @@ at_context_transmit(struct context *ctx, struct fw_packet *packet)
  
  	if (retval < 0)
  		packet->callback(packet, &ctx->ohci->card, packet->ack);
@@ -96,7 +112,7 @@
  }
  
  static void bus_reset_tasklet(unsigned long data)
-@@ -1431,6 +1441,57 @@ static int handle_ir_dualbuffer_packet(struct context *context,
+@@ -1431,6 +1446,57 @@ static int handle_ir_dualbuffer_packet(struct context *context,
  	return 1;
  }
  
@@ -154,7 +170,7 @@
  static int handle_it_packet(struct context *context,
  			    struct descriptor *d,
  			    struct descriptor *last)
-@@ -1466,14 +1527,12 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
+@@ -1466,14 +1532,12 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
  	} else {
  		mask = &ohci->ir_context_mask;
  		list = ohci->ir_context_list;
@@ -173,7 +189,7 @@
  	spin_lock_irqsave(&ohci->lock, flags);
  	index = ffs(*mask) - 1;
  	if (index >= 0)
-@@ -1532,7 +1591,9 @@ static int ohci_start_iso(struct fw_iso_context *base,
+@@ -1532,7 +1596,9 @@ static int ohci_start_iso(struct fw_iso_context *base,
  		context_run(&ctx->context, match);
  	} else {
  		index = ctx - ohci->ir_context_list;
@@ -184,7 +200,7 @@
  		match = (tags << 28) | (sync << 8) | ctx->base.channel;
  		if (cycle >= 0) {
  			match |= (cycle & 0x07fff) << 12;
-@@ -1738,7 +1799,6 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
+@@ -1738,7 +1804,6 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
  	offset   = payload & ~PAGE_MASK;
  	rest     = p->payload_length;
  
@@ -192,7 +208,7 @@
  	/* FIXME: make packet-per-buffer/dual-buffer a context option */
  	while (rest > 0) {
  		d = context_get_descriptors(&ctx->context,
-@@ -1777,6 +1837,81 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
+@@ -1777,6 +1842,81 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
  }
  
  static int
@@ -274,7 +290,7 @@
  ohci_queue_iso(struct fw_iso_context *base,
  	       struct fw_iso_packet *packet,
  	       struct fw_iso_buffer *buffer,
-@@ -1790,8 +1925,9 @@ ohci_queue_iso(struct fw_iso_context *base,
+@@ -1790,8 +1930,9 @@ ohci_queue_iso(struct fw_iso_context *base,
  		return ohci_queue_iso_receive_dualbuffer(base, packet,
  							 buffer, payload);
  	else
@@ -286,7 +302,7 @@
  }
  
  static const struct fw_card_driver ohci_driver = {
-@@ -1911,12 +2047,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+@@ -1911,12 +2052,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
  	ohci->version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
  	fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n",
  		  dev->dev.bus_id, ohci->version >> 16, ohci->version & 0xff);




More information about the fedora-extras-commits mailing list