aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/sbp2.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-06 14:03:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-06 14:03:44 -0700
commitf63bafe55654caf3a62f73500eafd1b89ca6f7ff (patch)
treed8c80b71e1197fb805c07282139377e9542421ea /drivers/firewire/sbp2.c
parentfb: Initialize fb_info mutexes in framebuffer_alloc() (diff)
parentieee1394: sbp2: add support for disks >2 TB (and 16 bytes long CDBs) (diff)
downloadlinux-dev-f63bafe55654caf3a62f73500eafd1b89ca6f7ff.tar.xz
linux-dev-f63bafe55654caf3a62f73500eafd1b89ca6f7ff.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: sbp2: add support for disks >2 TB (and 16 bytes long CDBs) firewire: sbp2: add support for disks >2 TB (and 16 bytes long CDBs) firewire: core: do not DMA-map stack addresses
Diffstat (limited to 'drivers/firewire/sbp2.c')
-rw-r--r--drivers/firewire/sbp2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 24c45635376a..8d51568ee143 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -201,6 +201,12 @@ static struct fw_device *target_device(struct sbp2_target *tgt)
#define SBP2_CYCLE_LIMIT (0xc8 << 12) /* 200 125us cycles */
/*
+ * There is no transport protocol limit to the CDB length, but we implement
+ * a fixed length only. 16 bytes is enough for disks larger than 2 TB.
+ */
+#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.
@@ -312,7 +318,7 @@ struct sbp2_command_orb {
struct sbp2_pointer next;
struct sbp2_pointer data_descriptor;
__be32 misc;
- u8 command_block[12];
+ u8 command_block[SBP2_MAX_CDB_SIZE];
} request;
struct scsi_cmnd *cmd;
scsi_done_fn_t done;
@@ -1146,6 +1152,8 @@ static int sbp2_probe(struct device *dev)
if (fw_device_enable_phys_dma(device) < 0)
goto fail_shost_put;
+ shost->max_cmd_len = SBP2_MAX_CDB_SIZE;
+
if (scsi_add_host(shost, &unit->device) < 0)
goto fail_shost_put;