Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 4682

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Chad Dupuis <cdupuis@redhat.com>
Date: Tue, 30 Nov 2010 20:00:27 -0500
Subject: [scsi] qla4xxx: ensure proper qla4xxx_conn_start state
Message-id: <20101130200026.10450.36254.sendpatchset@localhost.localdomain>
Patchwork-id: 29708
O-Subject: [RHEL 5.6 PATCH 17/28] qla4xxx: Ensure ddb_entry->conn is not NULL
	before doing a qla4xxx_conn_start
Bugzilla: 656999

Bugzilla
--------

Bug 656999 (https://bugzilla.redhat.com/show_bug.cgi?id=656999)

Upstream Status
---------------

RHEL 5 specific.

Description
-----------

>From 59e188c5925213dac6dfd7f71c655ea6bcc5c7c8 Mon Sep 17 00:00:00 2001
From: Lalit Chandivade <lalit.chandivade@qlogic.com>
Date: Sat, 20 Nov 2010 14:59:24 -0800
Subject: [PATCH 18/29] qla4xxx: Ensure ddb_entry->conn is not NULL before doing a qla4xxx_conn_start

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 7fabbb8..7459b3a 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1515,8 +1515,9 @@ dpc_post_reset_ha:
 			list_for_each_entry_safe(ddb_entry, dtemp, &ha->ddb_list, list) {
 				if ((atomic_read(&ddb_entry->state) == DDB_STATE_MISSING) ||
 				    (atomic_read(&ddb_entry->state) == DDB_STATE_DEAD)) {
-					if (ddb_entry->fw_ddb_device_state
-					    == DDB_DS_SESSION_ACTIVE) {
+					if (ddb_entry->fw_ddb_device_state ==
+						DDB_DS_SESSION_ACTIVE &&
+						ddb_entry->conn) {
 						atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
 						dev_info(&ha->pdev->dev, "scsi%ld: %s: ddb[%d] "
 							 "os[%d] marked ONLINE\n", ha->host_no, __func__,