From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org
Cc: Vasu Dev <vasu.dev@intel.com>, Robert Love <robert.w.love@intel.com>
Subject: [PATCH 09/12] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.
Date: Fri, 09 Apr 2010 14:22:59 -0700 [thread overview]
Message-ID: <20100409212259.1968.43502.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100409212212.1968.59251.stgit@localhost.localdomain>
From: Vasu Dev <vasu.dev@intel.com>
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>
---
drivers/scsi/fcoe/fcoe.c | 2 ++
drivers/scsi/fnic/fnic.h | 2 +-
drivers/scsi/fnic/fnic_main.c | 2 +-
include/scsi/libfcoe.h | 2 ++
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 4d46b71..25a7ce5 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/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_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
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index 585cc9c..19338e0 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -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.
*/
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 97b2125..265e73d 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/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_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);
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 868ed26..ec13f51 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -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.
*/
next prev parent reply other threads:[~2010-04-09 21:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 21:22 [PATCH 00/12] Updates to libfc, libfcoe, fcoe and fnic Robert Love
2010-04-09 21:22 ` [PATCH 01/12] libfcoe: Don't fill MAC desc in FLOGI if FIP negotiated FPMA Robert Love
2010-04-09 21:22 ` [PATCH 02/12] fcoe: reset FIP ctlr link state on disable/enable Robert Love
2010-04-09 21:22 ` [PATCH 03/12] fcoe: check netif operstate instead of IFF_UP & link state Robert Love
2010-04-09 21:22 ` [PATCH 04/12] libfc: remove unneeded variables in fc_exch_recv_req() Robert Love
2010-04-09 21:22 ` [PATCH 05/12] libfc: fix hton24 macro to take expressions as args Robert Love
2010-04-09 21:22 ` [PATCH 06/12] fnic: Update version to 1.4.0.145 Robert Love
2010-04-09 21:22 ` [PATCH 07/12] fnic: Change fnic_flush_tx() to flush tx instead of rx queue Robert Love
2010-04-09 21:22 ` [PATCH 08/12] fcoe: removes unused shost in fcoe_shost_config Robert Love
2010-04-09 21:22 ` Robert Love [this message]
2010-04-09 21:23 ` [PATCH 10/12] libfc: bug in erroring out upon FCP_RSP_LEN_VAL in fc_fcp_resp Robert Love
2010-04-09 21:23 ` [PATCH 11/12] libfc: set both precision and field with when printing FC IDs Robert Love
2010-04-09 21:23 ` [PATCH 12/12] libfc, fcoe: normalize format specifies for world wide names Robert Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100409212259.1968.43502.stgit@localhost.localdomain \
--to=robert.w.love@intel.com \
--cc=James.Bottomley@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=vasu.dev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox