Skip to contentSkip to conversation

qla2xxx: small fixes for 2.6.18 [8.01.05-k4].

PATCH New Andrew Vasquez 1 participant 5 messages Aug 1, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover qla2xxx: small fixes for 2.6.18 [8.01.05-k4].

This patchset updates the qla2xxx driver to 8.01.05-k4.

 drivers/scsi/qla2xxx/qla_def.h     |    1 +
 drivers/scsi/qla2xxx/qla_iocb.c    |    1 +
 drivers/scsi/qla2xxx/qla_isr.c     |    5 +++++
 drivers/scsi/qla2xxx/qla_os.c      |   12 +++---------
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 5 files changed, 11 insertions(+), 10 deletions(-)

here's the commits:

- Correct endianess problem while issuing a Marker IOCB on ISP24xx.
- Log Trace/Diagonostic asynchronous events.
- Fix to allow to reset devices using sg interface (sg_reset).
- Update version number to 8.01.05-k4.

Regards,
Andrew Vasquez
QLogic Corporation

#1 lore raw

PATCH 1/4 qla2xxx: Correct endianess problem while issuing a Marker IOCB on ISP24xx.

From: Shyam Sundar <[email protected]>

---
 drivers/scsi/qla2xxx/qla_iocb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_iocb.c +1 -0
index 2b60a27..c5b3c61 100644
@@ -471,6 +471,7 @@ __qla2x00_marker(scsi_qla_host_t *ha, ui
 			mrk24->nport_handle = cpu_to_le16(loop_id);
 			mrk24->lun[1] = LSB(lun);
 			mrk24->lun[2] = MSB(lun);
+			host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun));
 		} else {
 			SET_TARGET_ID(ha, mrk->target, loop_id);
 			mrk->lun = cpu_to_le16(lun);
Signature · 1 line
1.4.2.rc2.gbc9e
#2 lore raw

PATCH 2/4 qla2xxx: Log Trace/Diagonostic asynchronous events.

In reply to Andrew Vasquez
---
 drivers/scsi/qla2xxx/qla_def.h |    1 +
 drivers/scsi/qla2xxx/qla_isr.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +1 -0
index 139ea0e..0930260 100644
@@ -487,6 +487,7 @@ #define MBA_IP_LOW_WATER_MARK	0x8025	/* 
 #define MBA_IP_RCV_BUFFER_EMPTY 0x8026	/* IP receive buffer queue empty. */
 #define MBA_IP_HDR_DATA_SPLIT	0x8027	/* IP header/data splitting feature */
 					/* used. */
+#define MBA_TRACE_NOTIFICATION	0x8028	/* Trace/Diagnostic notification. */
 #define MBA_POINT_TO_POINT	0x8030	/* Point to point mode. */
 #define MBA_CMPLT_1_16BIT	0x8031	/* Completion 1 16bit IOSB. */
 #define MBA_CMPLT_2_16BIT	0x8032	/* Completion 2 16bit IOSB. */
drivers/scsi/qla2xxx/qla_isr.c +5 -0
index 795bf15..de06131 100644
@@ -587,6 +587,11 @@ #define LS_UNKNOWN	2
 		DEBUG2(printk("scsi(%ld): Discard RND Frame -- %04x %04x "
 		    "%04x.\n", ha->host_no, mb[1], mb[2], mb[3]));
 		break;
+
+	case MBA_TRACE_NOTIFICATION:
+		DEBUG2(printk("scsi(%ld): Trace Notification -- %04x %04x.\n",
+		ha->host_no, mb[1], mb[2]));
+		break;
 	}
 }
 
Signature · 1 line
1.4.2.rc2.gbc9e
#3 lore raw

PATCH 3/4 qla2xxx: Fix to allow to reset devices using sg interface (sg_reset).

In reply to Andrew Vasquez

From: Vladislav Bolkhovitin <[email protected]>

Currently it is impossible to reset provided by Qlogic QLA2xxx driver SCSI devices externally using corresponding sg devices, particularly via sg_reset utility, because qla2xxx driver in qla2xxx_eh_device_reset() function checks if the input scsi_cmnd has its private data (CMD_SP()) attached. Then the found pointer isn't used anywhere inside of qla2xxx_eh_device_reset(). If the RESET request comes from sg device, it doesn't have such private data.

The attached patch removes check for non-NULL CMD_SP() from qla2xxx_eh_device_reset(), hence allows to reset QLA2xxx's devices using corresponding sg devices.

AV: change applies to bus/host reset handlers as well.

---
 drivers/scsi/qla2xxx/qla_os.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +3 -9
index ec7ebb6..1e2b95b 100644
@@ -744,7 +744,6 @@ qla2xxx_eh_device_reset(struct scsi_cmnd
 {
 	scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
 	fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
-	srb_t *sp;
 	int ret;
 	unsigned int id, lun;
 	unsigned long serial;
@@ -755,8 +754,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd
 	lun = cmd->device->lun;
 	serial = cmd->serial_number;
 
-	sp = (srb_t *) CMD_SP(cmd);
-	if (!sp || !fcport)
+	if (!fcport)
 		return ret;
 
 	qla_printk(KERN_INFO, ha,
@@ -875,7 +873,6 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *c
 {
 	scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
 	fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
-	srb_t *sp;
 	int ret;
 	unsigned int id, lun;
 	unsigned long serial;
@@ -886,8 +883,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *c
 	lun = cmd->device->lun;
 	serial = cmd->serial_number;
 
-	sp = (srb_t *) CMD_SP(cmd);
-	if (!sp || !fcport)
+	if (!fcport)
 		return ret;
 
 	qla_printk(KERN_INFO, ha,
@@ -936,7 +932,6 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *
 {
 	scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
 	fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
-	srb_t *sp;
 	int ret;
 	unsigned int id, lun;
 	unsigned long serial;
@@ -947,8 +942,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *
 	lun = cmd->device->lun;
 	serial = cmd->serial_number;
 
-	sp = (srb_t *) CMD_SP(cmd);
-	if (!sp || !fcport)
+	if (!fcport)
 		return ret;
 
 	qla_printk(KERN_INFO, ha,
Signature · 1 line
1.4.2.rc2.gbc9e
#4 lore raw

PATCH 4/4 qla2xxx: Update version number to 8.01.05-k4.

In reply to Andrew Vasquez
---
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_version.h +1 -1
index d2d6834..f5826bf 100644
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.01.05-k3"
+#define QLA2XXX_VERSION      "8.01.05-k4"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	1
Signature · 1 line
1.4.2.rc2.gbc9e