浏览代码

[SCSI] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.

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>
Vasu Dev 15 年之前
父节点
当前提交
da87bfab8a
共有 4 个文件被更改,包括 6 次插入2 次删除
  1. 2 0
      drivers/scsi/fcoe/fcoe.c
  2. 1 1
      drivers/scsi/fnic/fnic.h
  3. 1 1
      drivers/scsi/fnic/fnic_main.c
  4. 2 0
      include/scsi/libfcoe.h

+ 2 - 0
drivers/scsi/fcoe/fcoe.c

@@ -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_lun = FCOE_MAX_LUN;
 	lport->host->max_id = FCOE_MAX_FCP_TARGET;
 	lport->host->max_id = FCOE_MAX_FCP_TARGET;
 	lport->host->max_channel = 0;
 	lport->host->max_channel = 0;
+	lport->host->max_cmd_len = FCOE_MAX_CMD_LEN;
+
 	if (lport->vport)
 	if (lport->vport)
 		lport->host->transportt = fcoe_vport_transport_template;
 		lport->host->transportt = fcoe_vport_transport_template;
 	else
 	else

+ 1 - 1
drivers/scsi/fnic/fnic.h

@@ -45,7 +45,7 @@
 #define	FNIC_IO_LOCKS		64 /* IO locks: power of 2 */
 #define	FNIC_IO_LOCKS		64 /* IO locks: power of 2 */
 #define FNIC_DFLT_QUEUE_DEPTH	32
 #define FNIC_DFLT_QUEUE_DEPTH	32
 #define	FNIC_STATS_RATE_LIMIT	4 /* limit rate at which stats are pulled up */
 #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.
  * Tag bits used for special requests.
  */
  */

+ 1 - 1
drivers/scsi/fnic/fnic_main.c

@@ -556,7 +556,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
 	}
 	}
 	host->max_lun = fnic->config.luns_per_tgt;
 	host->max_lun = fnic->config.luns_per_tgt;
 	host->max_id = FNIC_MAX_FCP_TARGET;
 	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);
 	fnic_get_res_counts(fnic);
 
 

+ 2 - 0
include/scsi/libfcoe.h

@@ -29,6 +29,8 @@
 #include <scsi/fc/fc_fcoe.h>
 #include <scsi/fc/fc_fcoe.h>
 #include <scsi/libfc.h>
 #include <scsi/libfc.h>
 
 
+#define FCOE_MAX_CMD_LEN	16	/* Supported CDB length */
+
 /*
 /*
  * FIP tunable parameters.
  * FIP tunable parameters.
  */
  */