on patch "[SCSI] relax scsi dma alignment"
On commit 465ff3185e0cb76d46137335a4d21d0d9d3ac8a2:
Quoted 4 lines
This patch relaxes the default SCSI DMA alignment from 512 bytes to 4 bytes. I remember from previous discussions that usb and firewire have sector size alignment requirements, so I upped their alignments in the respective slave allocs.
[...]
Quoted 6 lines
drivers/ata/libata-scsi.c | 5 ++++- drivers/firewire/fw-sbp2.c | 6 ++++++ drivers/ieee1394/sbp2.c | 6 ++++++ drivers/scsi/scsi_lib.c | 8 ++++++++ drivers/usb/storage/scsiglue.c | 20 ++++++++++---------- 5 files changed, 34 insertions(+), 11 deletions(-)
No, FireWire only requires 4 bytes alignment.
I will channel a reversion of the firewire and ieee1394 hunks through linux1394-2.6.git for 2.6.26.
Signature · 3 lines
Stefan Richter -=====-==--- ---= ==-=- http://arcgraph.de/sr/
James Bottomley
maintainerQuoted 13 lines · Stefan Richter
On commit
465ff3185e0cb76d46137335a4d21d0d9d3ac8a2:Quoted 4 lines
This patch relaxes the default SCSI DMA alignment from 512 bytes to 4 bytes. I remember from previous discussions that usb and firewire have sector size alignment requirements, so I upped their alignments in the respective slave allocs.
[...]
Quoted 6 lines
drivers/ata/libata-scsi.c | 5 ++++- drivers/firewire/fw-sbp2.c | 6 ++++++ drivers/ieee1394/sbp2.c | 6 ++++++ drivers/scsi/scsi_lib.c | 8 ++++++++ drivers/usb/storage/scsiglue.c | 20 ++++++++++---------- 5 files changed, 34 insertions(+), 11 deletions(-)
Quoted 4 lines
No, FireWire only requires 4 bytes alignment.
I will channel a reversion of the firewire and ieee1394 hunks through linux1394-2.6.git for 2.6.26.
Don't revert, just put the numbers down to 4 (just in case someone decides to lower the default SCSI alignment down from four ...).
James
PATCH 1/1 firewire: fw-sbp2: relax SCSI DMA alignment
---
Not run-time tested yet.
drivers/firewire/fw-sbp2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/firewire/fw-sbp2.c +2 -5
@@ -1309,11 +1309,8 @@ static int sbp2_scsi_slave_alloc(struct sdev->allow_restart =1 ; -/* -* Update the dma alignment (minimum alignment requirements for -* start and end of DMA transfers) to be a sector -*/ -blk_queue_update_dma_alignment (sdev->request_queue,511 ); +/* 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 ;
Signature · 9 lines
Stefan Richter -=====-==--- ---= ==-== http://arcgraph.de/sr/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
PATCH 1/1 ieee1394: sbp2: relax SCSI DMA alignment
---
Not run-time tested yet.
drivers/ieee1394/sbp2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/ieee1394/sbp2.c +2 -5
@@ -1966,11 +1966,8 @@ static int sbp2scsi_slave_alloc(struct s lu->sdev = sdev; sdev->allow_restart =1 ; -/* -* Update the dma alignment (minimum alignment requirements for -* start and end of DMA transfers) to be a sector -*/ -blk_queue_update_dma_alignment (sdev->request_queue,511 ); +/* SBP-2 requires quadlet alignment of the data buffers. */ +blk_queue_update_dma_alignment (sdev->request_queue,4 -1 );if (lu->workarounds &SBP2_WORKAROUND_INQUIRY_36 ) sdev->inquiry_len =36 ;
Signature · 9 lines
Stefan Richter -=====-==--- ---= ==-== http://arcgraph.de/sr/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/