[PATCH] ieee1394: sbp2: add support for disks >2 TB (and CBSs >12 bytes)

Stefan Richter
2009-06-29T20:02:12Z

We forgot to set Scsi_Host.max_cmd_len. Therefore SCSI core sent at
most 12 bytes long commands to FireWire targets. Among else, this
prevented support of disks larger than 2 TB.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/sbp2.c | 6 ++++++
1 file changed, 6 insertions(+)

Index: b/drivers/ieee1394/sbp2.c
===================================================================
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -881,6 +881,12 @@ static struct sbp2_lu *sbp2_alloc_device

shost->hostdata[0] = (unsigned long)lu;

+ /*
+ * SBP-2 does not impose limits on the CDB length. Targets may have
+ * limits, but this is going to be reported at the command set level.
+ */
+ shost->max_cmd_len = SCSI_MAX_VARLEN_CDB_SIZE;
+
if (!scsi_add_host(shost, &ud->device)) {
lu->shost = shost;
return lu;

--
Stefan Richter
-=====-==--= -==- ===-=