rpms/kernel/F-8 kernel.spec, 1.385, 1.386 linux-2.6-firewire-git-pending.patch, 1.5, 1.6

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Mon Mar 17 20:34:27 UTC 2008


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22355

Modified Files:
	kernel.spec linux-2.6-firewire-git-pending.patch 
Log Message:
* Mon Mar 17 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.3-40
- Actually add the coherent DMA fix that was supposed to be added in -37.



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.385
retrieving revision 1.386
diff -u -r1.385 -r1.386
--- kernel.spec	17 Mar 2008 13:55:43 -0000	1.385
+++ kernel.spec	17 Mar 2008 20:33:48 -0000	1.386
@@ -1917,6 +1917,9 @@
 
 
 %changelog
+* Mon Mar 17 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.3-40
+- Actually add the coherent DMA fix that was supposed to be added in -37.
+
 * Mon Mar 17 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.3-39
 - firewire: fix panic in handle_at_packet (bz.kernel.org #9617)
 - firewire-sbp2: add workaround for busted LSI/Symbios bridges (#436879)

linux-2.6-firewire-git-pending.patch:

Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-firewire-git-pending.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-firewire-git-pending.patch	17 Mar 2008 13:55:43 -0000	1.5
+++ linux-2.6-firewire-git-pending.patch	17 Mar 2008 20:33:48 -0000	1.6
@@ -477,3 +477,124 @@
 http://arcgraph.de/sr/
 
 
+Oops, some of the important bits got dropped when back-porting to 2.6.24...
+Add 'em back right here. We'll sort out changelog entries later...
+
+diff -up linux-2.6.24.noarch/drivers/firewire.orig/fw-ohci.c linux-2.6.24.noarch/drivers/firewire/fw-ohci.c
+--- linux-2.6.24.noarch/drivers/firewire.orig/fw-ohci.c	2008-03-17 16:05:25.000000000 -0400
++++ linux-2.6.24.noarch/drivers/firewire/fw-ohci.c	2008-03-17 16:17:40.000000000 -0400
+@@ -188,7 +188,7 @@ struct fw_ohci {
+ 	struct tasklet_struct bus_reset_tasklet;
+ 	int node_id;
+ 	int generation;
+-	int request_generation;
++	int request_generation; /* for timestamping incoming requests */
+ 	u32 bus_seconds;
+ 	bool old_uninorth;
+ 
+@@ -292,19 +292,13 @@ static int ar_context_add_page(struct ar
+ {
+ 	struct device *dev = ctx->ohci->card.device;
+ 	struct ar_buffer *ab;
+-	dma_addr_t ab_bus;
++	dma_addr_t uninitialized_var(ab_bus);
+ 	size_t offset;
+ 
+ 	ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC);
+ 	if (ab == NULL)
+ 		return -ENOMEM;
+ 
+-	ab_bus = dma_map_single(dev, ab, PAGE_SIZE, DMA_BIDIRECTIONAL);
+-	if (dma_mapping_error(ab_bus)) {
+-		free_page((unsigned long) ab);
+-		return -ENOMEM;
+-	}
+-
+ 	memset(&ab->descriptor, 0, sizeof(ab->descriptor));
+ 	ab->descriptor.control        = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
+ 						    DESCRIPTOR_STATUS |
+@@ -315,8 +309,6 @@ static int ar_context_add_page(struct ar
+ 	ab->descriptor.res_count      = cpu_to_le16(PAGE_SIZE - offset);
+ 	ab->descriptor.branch_address = 0;
+ 
+-	dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
+-
+ 	ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
+ 	ctx->last_buffer->next = ab;
+ 	ctx->last_buffer = ab;
+@@ -505,6 +497,7 @@ static void ar_context_tasklet(unsigned 
+ 
+ 	if (d->res_count == 0) {
+ 		size_t size, rest, offset;
++		dma_addr_t buffer_bus;
+ 
+ 		/*
+ 		 * This descriptor is finished and we may have a
+@@ -513,9 +506,7 @@ static void ar_context_tasklet(unsigned 
+ 		 */
+ 
+ 		offset = offsetof(struct ar_buffer, data);
+-		dma_unmap_single(ohci->card.device,
+-			le32_to_cpu(ab->descriptor.data_address) - offset,
+-			PAGE_SIZE, DMA_BIDIRECTIONAL);
++		buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
+ 
+ 		buffer = ab;
+ 		ab = ab->next;
+@@ -531,7 +522,8 @@ static void ar_context_tasklet(unsigned 
+ 		while (buffer < end)
+ 			buffer = handle_ar_packet(ctx, buffer);
+ 
+-		free_page((unsigned long)buffer);
++		dma_free_coherent(ohci->card.device, PAGE_SIZE,
++				  buffer, buffer_bus);
+ 		ar_context_add_page(ctx);
+ 	} else {
+ 		buffer = ctx->pointer;
+@@ -2376,8 +2368,8 @@ static void pci_remove(struct pci_dev *d
+ 	pci_iounmap(dev, ohci->registers);
+ 	pci_release_region(dev, 0);
+ 	pci_disable_device(dev);
+-	ohci_pmac_off(dev);
+ 	kfree(&ohci->card);
++	ohci_pmac_off(dev);
+ 
+ 	fw_notify("Removed fw-ohci device.\n");
+ }
+diff -up linux-2.6.24.noarch/drivers/firewire.orig/fw-sbp2.c linux-2.6.24.noarch/drivers/firewire/fw-sbp2.c
+--- linux-2.6.24.noarch/drivers/firewire.orig/fw-sbp2.c	2008-03-17 16:05:25.000000000 -0400
++++ linux-2.6.24.noarch/drivers/firewire/fw-sbp2.c	2008-03-17 16:18:47.000000000 -0400
+@@ -847,7 +847,7 @@ static void sbp2_set_busy_timeout(struct
+ 	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	DECLARE_COMPLETION_ONSTACK(done);
+ 	struct fw_transaction t;
+-	static u32 busy_timeout;
++	static __be32 busy_timeout;
+ 
+ 	busy_timeout = cpu_to_be32(SBP2_CYCLE_LIMIT | SBP2_RETRY_LIMIT);
+ 
+@@ -1525,6 +1525,9 @@ static int sbp2_scsi_slave_alloc(struct 
+ 
+ 	sdev->allow_restart = 1;
+ 
++	/* SBP-2 requires quadlet alignment of the data buffers. */
++	blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
++
+ 	if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36)
+ 		sdev->inquiry_len = 36;
+ 
+diff -up linux-2.6.24.noarch/drivers/firewire.orig/fw-transaction.h linux-2.6.24.noarch/drivers/firewire/fw-transaction.h
+--- linux-2.6.24.noarch/drivers/firewire.orig/fw-transaction.h	2008-03-17 16:05:25.000000000 -0400
++++ linux-2.6.24.noarch/drivers/firewire/fw-transaction.h	2008-03-17 16:19:02.000000000 -0400
+@@ -224,8 +224,6 @@ struct fw_card {
+ 
+ 	int node_id;
+ 	int generation;
+-	/* This is the generation used for timestamping incoming requests. */
+-	int request_generation;
+ 	int current_tlabel, tlabel_mask;
+ 	struct list_head transaction_list;
+ 	struct timer_list flush_timer;
+
+
+




More information about the fedora-extras-commits mailing list