Commit ebbb16bffa646f853899ef3fdc0ac7abab888703

Authored by Stefan Richter
1 parent af2719415a

ieee1394: sbp2: add support for disks >2 TB (and 16 bytes long CDBs)

Increase the command ORB data structure to transport up to 16 bytes long
CDBs (instead of 12 bytes), and tell the SCSI mid layer about it.  This
is notably necessary for READ CAPACITY(16) and friends, i.e. support of
large disks.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

Showing 2 changed files with 8 additions and 1 deletions Side-by-side Diff

drivers/ieee1394/sbp2.c
... ... @@ -880,6 +880,7 @@
880 880 }
881 881  
882 882 shost->hostdata[0] = (unsigned long)lu;
  883 + shost->max_cmd_len = SBP2_MAX_CDB_SIZE;
883 884  
884 885 if (!scsi_add_host(shost, &ud->device)) {
885 886 lu->shost = shost;
drivers/ieee1394/sbp2.h
... ... @@ -25,6 +25,12 @@
25 25 #define SBP2_DEVICE_NAME "sbp2"
26 26  
27 27 /*
  28 + * There is no transport protocol limit to the CDB length, but we implement
  29 + * a fixed length only. 16 bytes is enough for disks larger than 2 TB.
  30 + */
  31 +#define SBP2_MAX_CDB_SIZE 16
  32 +
  33 +/*
28 34 * SBP-2 specific definitions
29 35 */
30 36  
... ... @@ -51,7 +57,7 @@
51 57 u32 data_descriptor_hi;
52 58 u32 data_descriptor_lo;
53 59 u32 misc;
54   - u8 cdb[12];
  60 + u8 cdb[SBP2_MAX_CDB_SIZE];
55 61 } __attribute__((packed));
56 62  
57 63 #define SBP2_LOGIN_REQUEST 0x0