[SCSI] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.
authorVasu Dev <vasu.dev@intel.com>
Fri, 9 Apr 2010 21:22:59 +0000 (14:22 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 19:02:39 +0000 (14:02 -0500)
No reason to restrict CDB size to 12 bytes in fcoe, so
increased to 16 so that 16 bytes SCSI CDB doesn't fail.

Uses common define to set max_cmd_len for fcoe and fnic,
fnic is already setting max_cmd_len to 16.

sg_readcap -l fails without this fix.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/fcoe.c
drivers/scsi/fnic/fnic.h
drivers/scsi/fnic/fnic_main.c
include/scsi/libfcoe.h

index 4d46b71849abda4c596c8c7f51a07021b9dd44bf..25a7ce5c2d24c19eca9723e5b3e755e90640724f 100644 (file)
@@ -669,6 +669,8 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
        lport->host->max_lun = FCOE_MAX_LUN;
        lport->host->max_id = FCOE_MAX_FCP_TARGET;
        lport->host->max_channel = 0;
+       lport->host->max_cmd_len = FCOE_MAX_CMD_LEN;
+
        if (lport->vport)
                lport->host->transportt = fcoe_vport_transport_template;
        else
index 585cc9cb942ca3d92359258e5f10710ae54c8886..19338e0ba2c5b2b943e3e9e3003f6fc8326d2953 100644 (file)
@@ -45,7 +45,7 @@
 #define        FNIC_IO_LOCKS           64 /* IO locks: power of 2 */
 #define FNIC_DFLT_QUEUE_DEPTH  32
 #define        FNIC_STATS_RATE_LIMIT   4 /* limit rate at which stats are pulled up */
-#define FNIC_MAX_CMD_LEN        16 /* Supported CDB length */
+
 /*
  * Tag bits used for special requests.
  */
index 97b212570bcc67f2431d86b17740e1051812f031..265e73d9cd6fc7d595aed519a9ba0cd9980ea8e1 100644 (file)
@@ -556,7 +556,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
        }
        host->max_lun = fnic->config.luns_per_tgt;
        host->max_id = FNIC_MAX_FCP_TARGET;
-       host->max_cmd_len = FNIC_MAX_CMD_LEN;
+       host->max_cmd_len = FCOE_MAX_CMD_LEN;
 
        fnic_get_res_counts(fnic);
 
index 868ed26a976757b45c1a25c51730459495f87f5a..ec13f51531f86f22ec26c47f145485e2f76f5508 100644 (file)
@@ -29,6 +29,8 @@
 #include <scsi/fc/fc_fcoe.h>
 #include <scsi/libfc.h>
 
+#define FCOE_MAX_CMD_LEN       16      /* Supported CDB length */
+
 /*
  * FIP tunable parameters.
  */