rpms/kernel/devel kernel.spec, 1.1244, 1.1245 linux-2.6-firewire-git-pending.patch, 1.33, 1.34
Jarod Wilson
jwilson at fedoraproject.org
Wed Jan 28 22:53:18 UTC 2009
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7052
Modified Files:
kernel.spec linux-2.6-firewire-git-pending.patch
Log Message:
* Wed Jan 28 2009 Jarod Wilson <jarod at redhat.com>
- make 2nd-gen ipod work via firewire again, but w/o neutering throughput
- add fix for firewire-sbp2 dma mapping leak in failure paths
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1244
retrieving revision 1.1245
diff -u -r1.1244 -r1.1245
--- kernel.spec 28 Jan 2009 21:33:11 -0000 1.1244
+++ kernel.spec 28 Jan 2009 22:52:48 -0000 1.1245
@@ -1778,6 +1778,10 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Wed Jan 28 2009 Jarod Wilson <jarod at redhat.com>
+- make 2nd-gen ipod work via firewire again, but w/o neutering throughput
+- add fix for firewire-sbp2 dma mapping leak in failure paths
+
* Wed Jan 28 2009 Kyle McMartin <kyle at redhat.com>
- drm-nouveau.patch: /me sighs in the general direction of ppc.
linux-2.6-firewire-git-pending.patch:
Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-git-pending.patch,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- linux-2.6-firewire-git-pending.patch 27 Jan 2009 04:47:27 -0000 1.33
+++ linux-2.6-firewire-git-pending.patch 28 Jan 2009 22:52:48 -0000 1.34
@@ -278,7 +278,7 @@
- * these iPods do not feature the read_capacity bug according
- * to one report. Read_capacity behaviour as well as model_id
- * could change due to Apple-supplied firmware updates though.
-+ * iPod 2nd generation: needs no-page-tables workaround
++ * iPod 2nd generation: needs 128k max transfer workaround
+ * iPod 3rd generation: needs fix-capacity workaround
*/
-
@@ -286,7 +286,7 @@
+ {
+ .firmware_revision = 0x0a2700,
+ .model = 0x000000,
-+ .workarounds = SBP2_WORKAROUND_NO_PAGE_TABLES |
++ .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS |
+ SBP2_WORKAROUND_FIX_CAPACITY,
+ },
+ /* iPod 4th generation */ {
@@ -303,3 +303,92 @@
blk_queue_max_segment_size(sdev->request_queue, SBP2_MAX_SEG_SIZE);
return 0;
+Date: Wed, 28 Jan 2009 01:03:34 +0100 (CET)
+From: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Subject: Re: swiotlb default size (64 MB) too small?
+To: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+Cc: linux1394-devel at lists.sourceforge.net,
+ linux-kernel at vger.kernel.org,
+ linux-scsi at vger.kernel.org
+
+> FUJITA Tomonori wrote:
+>> On Tue, 27 Jan 2009 18:03:40 +0100 (CET)
+>> Stefan Richter <stefanr at s5r6.in-berlin.de> wrote:
+>>> + if (orb->page_table_bus)
+>>> + dma_unmap_single(card_device, orb->page_table_bus,
+>>> + sizeof(orb->page_table), DMA_TO_DEVICE);
+>>
+>> Well, this does not look correct since zero can be a valid dma
+>> address.
+
+
+From: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Subject: firewire: sbp2: fix DMA mapping leak on the failure path
+
+Reported-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+who also provided a first version of the fix.
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+---
+ drivers/firewire/fw-sbp2.c | 27 +++++++++++++++++----------
+ 1 file changed, 17 insertions(+), 10 deletions(-)
+
+Index: linux/drivers/firewire/fw-sbp2.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-sbp2.c
++++ linux/drivers/firewire/fw-sbp2.c
+@@ -1323,6 +1323,19 @@ static unsigned int sbp2_status_to_sense
+ }
+ }
+
++static void sbp2_unmap_scatterlist(struct device *card_device,
++ struct sbp2_command_orb *orb)
++{
++ if (scsi_sg_count(orb->cmd))
++ dma_unmap_sg(card_device, scsi_sglist(orb->cmd),
++ scsi_sg_count(orb->cmd),
++ orb->cmd->sc_data_direction);
++
++ if (orb->request.misc & cpu_to_be32(COMMAND_ORB_PAGE_TABLE_PRESENT))
++ dma_unmap_single(card_device, orb->page_table_bus,
++ sizeof(orb->page_table), DMA_TO_DEVICE);
++}
++
+ static void complete_command_orb(struct sbp2_orb *base_orb,
+ struct sbp2_status *status)
+ {
+@@ -1364,15 +1377,7 @@ static void complete_command_orb(struct
+
+ dma_unmap_single(device->card->device, orb->base.request_bus,
+ sizeof(orb->request), DMA_TO_DEVICE);
+-
+- if (scsi_sg_count(orb->cmd) > 0)
+- dma_unmap_sg(device->card->device, scsi_sglist(orb->cmd),
+- scsi_sg_count(orb->cmd),
+- orb->cmd->sc_data_direction);
+-
+- if (orb->page_table_bus != 0)
+- dma_unmap_single(device->card->device, orb->page_table_bus,
+- sizeof(orb->page_table), DMA_TO_DEVICE);
++ sbp2_unmap_scatterlist(device->card->device, orb);
+
+ orb->cmd->result = result;
+ orb->done(orb->cmd);
+@@ -1493,8 +1498,10 @@ static int sbp2_scsi_queuecommand(struct
+ orb->base.request_bus =
+ dma_map_single(device->card->device, &orb->request,
+ sizeof(orb->request), DMA_TO_DEVICE);
+- if (dma_mapping_error(device->card->device, orb->base.request_bus))
++ if (dma_mapping_error(device->card->device, orb->base.request_bus)) {
++ sbp2_unmap_scatterlist(device->card->device, orb);
+ goto out;
++ }
+
+ sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, generation,
+ lu->command_block_agent_address + SBP2_ORB_POINTER);
+
+--
+Stefan Richter
+-=====-==--= ---= ===--
+http://arcgraph.de/sr/
+
More information about the fedora-extras-commits
mailing list