Skip to content

Commit da87bfa

Browse files
Vasu DevJames Bottomley
authored andcommitted
[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>
1 parent 8ba00a4 commit da87bfa

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎drivers/scsi/fcoe/fcoe.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
669669
lport->host->max_lun = FCOE_MAX_LUN;
670670
lport->host->max_id = FCOE_MAX_FCP_TARGET;
671671
lport->host->max_channel = 0;
672+
lport->host->max_cmd_len = FCOE_MAX_CMD_LEN;
673+
672674
if (lport->vport)
673675
lport->host->transportt = fcoe_vport_transport_template;
674676
else

‎drivers/scsi/fnic/fnic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define FNIC_IO_LOCKS 64 /* IO locks: power of 2 */
4646
#define FNIC_DFLT_QUEUE_DEPTH 32
4747
#define FNIC_STATS_RATE_LIMIT 4 /* limit rate at which stats are pulled up */
48-
#define FNIC_MAX_CMD_LEN 16 /* Supported CDB length */
48+
4949
/*
5050
* Tag bits used for special requests.
5151
*/

‎drivers/scsi/fnic/fnic_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
556556
}
557557
host->max_lun = fnic->config.luns_per_tgt;
558558
host->max_id = FNIC_MAX_FCP_TARGET;
559-
host->max_cmd_len = FNIC_MAX_CMD_LEN;
559+
host->max_cmd_len = FCOE_MAX_CMD_LEN;
560560

561561
fnic_get_res_counts(fnic);
562562

‎include/scsi/libfcoe.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include <scsi/fc/fc_fcoe.h>
3030
#include <scsi/libfc.h>
3131

32+
#define FCOE_MAX_CMD_LEN 16 /* Supported CDB length */
33+
3234
/*
3335
* FIP tunable parameters.
3436
*/

0 commit comments

Comments
 (0)