summaryrefslogtreecommitdiff
path: root/drivers/firewire/sbp2.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2012-05-19 00:26:21 +0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-05-21 23:49:44 +0400
commit26c72e22c94fbc28604c94e3a96fdae9c6fd0a42 (patch)
tree9897f59fef9034951ce4b236da8820ea7e38a07a /drivers/firewire/sbp2.c
parent935f672e02c8172a23bd3e54feafffcfcce39f0d (diff)
downloadlinux-26c72e22c94fbc28604c94e3a96fdae9c6fd0a42.tar.xz
firewire: sbp2: document the absence of alignment requirements
The SBP-2/3 specifications do not require any alignment of data buffers; only their own data structures need to be quadlet-aligned [SR: or octlet-aligned]. Fix the comments to reflect this, but leave the actual alignment at 32 bits to avoid theoretical problems with target implementations that might handle this incorrectly. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/sbp2.c')
-rw-r--r--drivers/firewire/sbp2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 1f888f3ef7ae..1162d6b3bf85 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -207,9 +207,8 @@ static const struct device *lu_dev(const struct sbp2_logical_unit *lu)
#define SBP2_MAX_CDB_SIZE 16
/*
- * The default maximum s/g segment size of a FireWire controller is
- * usually 0x10000, but SBP-2 only allows 0xffff. Since buffers have to
- * be quadlet-aligned, we set the length limit to 0xffff & ~3.
+ * The maximum SBP-2 data buffer size is 0xffff. We quadlet-align this
+ * for compatibility with earlier versions of this driver.
*/
#define SBP2_MAX_SEG_SIZE 0xfffc
@@ -1530,7 +1529,10 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
sdev->allow_restart = 1;
- /* SBP-2 requires quadlet alignment of the data buffers. */
+ /*
+ * SBP-2 does not require any alignment, but we set it anyway
+ * for compatibility with earlier versions of this driver.
+ */
blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36)