RKK | 1 Aug 2011 11:11
Picon

understanding the SCSI Specification.

HI all,
Im working on a storage protocol   which uses SCSI commands  set as
the command set and also the SCSI Task Management functions for
processing the Task Management.
The Architectural Model is based on SAM-5. The Command set is based on
SPC-4 and SBC-3. I have some doubts in trying to understanding some
SCSI terms and definitions.

For  using the send command transport protocol service request to
request a initiator  the following API is defined

[1]Send SCSI Command (IN (I_T_L_Q Nexus, CDB, Task Attribute, [Data-in
Buffer Size], [Data-
out Buffer], [Data-out Buffer Size], [CRN], [Command Priority], [First
Burst Enabled]))

Here  I want to know what relation does the I_T_L_Q tries to convey.
from what it says in SAM-5 Specification  section 4.8 tries to define
the Nexus as " nexus represents a relationship between a SCSI
initiator port, a SCSI target port, optionally a logical unit,
and optionally a command."
 how do we convey this information in the above [1].
Also can someone help me in how to map the initiator-target relation
to host-device  structure? thanks.

Warm Regards,
Ravi Kulkarni.

Warm Regards,
Ravi Kulkarni.
(Continue reading)

Anton Blanchard | 1 Aug 2011 11:43
Picon
Favicon

[PATCH] [SCSI] ipr: Always initiate hard reset in kdump kernel


During kdump testing I noticed timeouts when initialising each IPR
adapter. While the driver has logic to detect an adapter in an
indeterminate state, it wasn't triggering and each adapter went
through a 5 minute timeout before finally going operational.

Some analysis showed the needs_hard_reset flag wasn't getting set.
We can check the reset_devices kernel parameter which is set by
kdump and force a full reset. This fixes the problem.

Signed-off-by: Anton Blanchard <anton <at> samba.org>
Cc: <stable <at> kernel.org>
---

Index: linux-2.6/drivers/scsi/ipr.c
===================================================================
--- linux-2.6.orig/drivers/scsi/ipr.c	2011-07-28 13:47:17.000000000 +1000
+++ linux-2.6/drivers/scsi/ipr.c	2011-07-29 18:46:57.000000000 +1000
 <at>  <at>  -8812,7 +8812,7  <at>  <at>  static int __devinit ipr_probe_ioa(struc
 	uproc = readl(ioa_cfg->regs.sense_uproc_interrupt_reg32);
 	if ((mask & IPR_PCII_HRRQ_UPDATED) == 0 || (uproc & IPR_UPROCI_RESET_ALERT))
 		ioa_cfg->needs_hard_reset = 1;
-	if (interrupts & IPR_PCII_ERROR_INTERRUPTS)
+	if ((interrupts & IPR_PCII_ERROR_INTERRUPTS) || reset_devices)
 		ioa_cfg->needs_hard_reset = 1;
 	if (interrupts & IPR_PCII_IOA_UNIT_CHECKED)
 		ioa_cfg->ioa_unit_checked = 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 1/8] scsi_transport_iscsi: Added support to update mtu

From: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/scsi_transport_iscsi.c |    4 ++++
 include/scsi/iscsi_if.h             |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index b85f8a4..b3a2515 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
 <at>  <at>  -323,6 +323,7  <at>  <at>  iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE);
 iscsi_iface_net_attr(iface, vlan, ISCSI_NET_PARAM_VLAN_ID);
 iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY);
 iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED);
+iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU);

 static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 					  struct attribute *attr, int i)
 <at>  <at>  -340,6 +341,8  <at>  <at>  static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 		param = ISCSI_NET_PARAM_VLAN_PRIORITY;
 	else if (attr == &dev_attr_iface_vlan_enabled.attr)
 		param = ISCSI_NET_PARAM_VLAN_ENABLED;
+	else if (attr == &dev_attr_iface_mtu.attr)
+		param = ISCSI_NET_PARAM_MTU;
 	else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) {
 		if (attr == &dev_attr_ipv4_iface_ipaddress.attr)
 			param = ISCSI_NET_PARAM_IPV4_ADDR;
 <at>  <at>  -386,6 +389,7  <at>  <at>  static struct attribute *iscsi_iface_attrs[] = {
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 0/8] qla4xxx feature update

From: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>

James,

Following patches are made over scsi-misc and Mike Christie's patchset
posted here: http://marc.info/?l=linux-scsi&m=131161955801957&w=2

Harish Zunjarrao (3):
	qla4xxx: Code cleanup for read/update flash using BSG
	qla4xxx: Add get ACB state support using BSG
	qla4xxx: Add read/update NVRAM support for 40xx adapters using BSG

Vikas Chaudhary (5):
	scsi_transport_iscsi: Added support to update mtu
	qla4xxx: Added support to update mtu
	qla4xxx: Added vendor specific sysfs attributes
	scsi_transport_iscsi: Added support to update initiator iscsi port
	qla4xxx: added support to update initiator iscsi port

drivers/scsi/qla4xxx/ql4_attr.c     |   76 ++++++++
drivers/scsi/qla4xxx/ql4_bsg.c      |  331 +++++++++++++++++++++++++++--------
drivers/scsi/qla4xxx/ql4_bsg.h      |    3 +
drivers/scsi/qla4xxx/ql4_def.h      |   17 ++
drivers/scsi/qla4xxx/ql4_fw.h       |    5 +
drivers/scsi/qla4xxx/ql4_glbl.h     |    6 +
drivers/scsi/qla4xxx/ql4_init.c     |   21 +++
drivers/scsi/qla4xxx/ql4_mbx.c      |   79 +++++++++
drivers/scsi/qla4xxx/ql4_nx.c       |    5 +
drivers/scsi/qla4xxx/ql4_os.c       |   31 ++++
drivers/scsi/scsi_transport_iscsi.c |    8 +
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 2/8] qla4xxx: Added support to update mtu

From: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_def.h |    1 +
 drivers/scsi/qla4xxx/ql4_mbx.c |    2 ++
 drivers/scsi/qla4xxx/ql4_os.c  |   12 ++++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 30efb6c..90dc621 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
 <at>  <at>  -343,6 +343,7  <at>  <at>  struct ipaddress_config {
 	struct in6_addr ipv6_addr0;
 	struct in6_addr ipv6_addr1;
 	struct in6_addr ipv6_default_router_addr;
+	uint16_t eth_mtu_size;
 };

 #define QL4_CHAP_MAX_NAME_LEN 256
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 72ec7e0..8741cfa 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
 <at>  <at>  -333,6 +333,8  <at>  <at>  qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 	ha->ip_config.ipv4_options = le16_to_cpu(init_fw_cb->ipv4_ip_opts);
 	ha->ip_config.ipv4_addr_state =
 				le16_to_cpu(init_fw_cb->ipv4_addr_state);
+	ha->ip_config.eth_mtu_size =
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 3/8] qla4xxx: Code cleanup for read/update flash using BSG

From: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>

- Corrected return status
- Added reset active check
- Removed unused dma_map_sg calls
- Added debug prints on failure

Signed-off-by: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_bsg.c |  128 +++++++++++++++++-----------------------
 drivers/scsi/qla4xxx/ql4_def.h |   10 +++
 2 files changed, 65 insertions(+), 73 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_bsg.c b/drivers/scsi/qla4xxx/ql4_bsg.c
index daa2b0f..15032f1 100644
--- a/drivers/scsi/qla4xxx/ql4_bsg.c
+++ b/drivers/scsi/qla4xxx/ql4_bsg.c
 <at>  <at>  -16,36 +16,31  <at>  <at>  qla4xxx_read_flash(struct bsg_job *bsg_job)
 	struct scsi_qla_host *ha = to_qla_host(host);
 	struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
 	struct iscsi_bsg_request *bsg_req = bsg_job->request;
-	uint32_t sg_cnt;
 	uint32_t offset = 0;
 	uint32_t length = 0;
 	dma_addr_t flash_dma;
 	uint8_t *flash = NULL;
-	int rval = 0;
+	int rval = -EINVAL;

(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 6/8] qla4xxx: Added vendor specific sysfs attributes

From: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>

Added board_id, fw_state, phy_port_cnt, phy_port_num,
iscsi_func_cnt, hba_model

Signed-off-by: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_attr.c |   76 +++++++++++++++++++++++++++++++++++++++
 drivers/scsi/qla4xxx/ql4_def.h  |    4 ++
 drivers/scsi/qla4xxx/ql4_init.c |   21 +++++++++++
 drivers/scsi/qla4xxx/ql4_nx.c   |    5 +++
 4 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_attr.c b/drivers/scsi/qla4xxx/ql4_attr.c
index 864d018..0b0a7d4 100644
--- a/drivers/scsi/qla4xxx/ql4_attr.c
+++ b/drivers/scsi/qla4xxx/ql4_attr.c
 <at>  <at>  -55,15 +55,91  <at>  <at>  qla4xxx_optrom_version_show(struct device *dev, struct device_attribute *attr,
 			ha->bootload_patch, ha->bootload_build);
 }

+static ssize_t
+qla4xxx_board_id_show(struct device *dev, struct device_attribute *attr,
+		      char *buf)
+{
+	struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
+	return snprintf(buf, PAGE_SIZE, "0x%08X\n", ha->board_id);
+}
+
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 5/8] qla4xxx: Add read/update NVRAM support for 40xx adapters using BSG

From: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>

Signed-off-by: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_bsg.c  |  147 +++++++++++++++++++++++++++++++++++++++
 drivers/scsi/qla4xxx/ql4_bsg.h  |    2 +
 drivers/scsi/qla4xxx/ql4_fw.h   |    5 ++
 drivers/scsi/qla4xxx/ql4_glbl.h |    4 +
 drivers/scsi/qla4xxx/ql4_mbx.c  |   52 ++++++++++++++
 5 files changed, 210 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_bsg.c b/drivers/scsi/qla4xxx/ql4_bsg.c
index de4db29..c475453 100644
--- a/drivers/scsi/qla4xxx/ql4_bsg.c
+++ b/drivers/scsi/qla4xxx/ql4_bsg.c
 <at>  <at>  -196,6 +196,147  <at>  <at>  leave:
 	return rval;
 }

+static int
+qla4xxx_read_nvram(struct bsg_job *bsg_job)
+{
+	struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
+	struct scsi_qla_host *ha = to_qla_host(host);
+	struct iscsi_bsg_request *bsg_req = bsg_job->request;
+	struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
+	uint32_t offset = 0;
+	uint32_t len = 0;
+	uint32_t total_len = 0;
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 8/8] qla4xxx: added support to update initiator iscsi port

From: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_def.h |    2 ++
 drivers/scsi/qla4xxx/ql4_mbx.c |    2 ++
 drivers/scsi/qla4xxx/ql4_os.c  |   19 +++++++++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 17a29ce..c3190eb 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
 <at>  <at>  -344,6 +344,8  <at>  <at>  struct ipaddress_config {
 	struct in6_addr ipv6_addr1;
 	struct in6_addr ipv6_default_router_addr;
 	uint16_t eth_mtu_size;
+	uint16_t ipv4_port;
+	uint16_t ipv6_port;
 };

 #define QL4_CHAP_MAX_NAME_LEN 256
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 011c822..e843758 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
 <at>  <at>  -335,6 +335,7  <at>  <at>  qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 				le16_to_cpu(init_fw_cb->ipv4_addr_state);
 	ha->ip_config.eth_mtu_size =
 				le16_to_cpu(init_fw_cb->eth_mtu_size);
(Continue reading)

vikas.chaudhary | 1 Aug 2011 12:26

[PATCH 4/8] qla4xxx: Add get ACB state support using BSG

From: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>

Signed-off-by: Harish Zunjarrao <harish.zunjarrao <at> qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary <at> qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_bsg.c  |   60 +++++++++++++++++++++++++++++++++++++++
 drivers/scsi/qla4xxx/ql4_bsg.h  |    1 +
 drivers/scsi/qla4xxx/ql4_glbl.h |    2 +
 drivers/scsi/qla4xxx/ql4_mbx.c  |   23 +++++++++++++++
 4 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_bsg.c b/drivers/scsi/qla4xxx/ql4_bsg.c
index 15032f1..de4db29 100644
--- a/drivers/scsi/qla4xxx/ql4_bsg.c
+++ b/drivers/scsi/qla4xxx/ql4_bsg.c
 <at>  <at>  -139,6 +139,63  <at>  <at>  leave:
 	return rval;
 }

+static int
+qla4xxx_get_acb_state(struct bsg_job *bsg_job)
+{
+	struct Scsi_Host *host = iscsi_job_to_shost(bsg_job);
+	struct scsi_qla_host *ha = to_qla_host(host);
+	struct iscsi_bsg_request *bsg_req = bsg_job->request;
+	struct iscsi_bsg_reply *bsg_reply = bsg_job->reply;
+	uint32_t status[MBOX_REG_COUNT];
+	uint32_t acb_idx;
+	uint32_t ip_idx;
+	int rval = -EINVAL;
(Continue reading)


Gmane