Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 2214

kernel-2.6.18-128.1.10.el5.src.rpm

From: Marcus Barrow <mbarrow@redhat.com>
Date: Thu, 16 Oct 2008 15:23:18 -0400
Subject: [scsi] qla2xxx: prevent NPIV conf for older hbas
Message-id: 20081016192318.20099.46886.sendpatchset@file.bos.redhat.com
O-Subject: [rhel 5.3 patch] qla2xxx - prevent NPIV conf for older hbas
Bugzilla: 467153
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

BZ 467153

qla2xxx - prevent NPIV conf for older hbas

This problem is a regression because it prevents machines from booting.

A missing line from an upstream merge allowed an attempt to configure NPIV
on older cards which do not support the feature. This caused a timeout on
older cards during initialization, preventing booting from SAN.

This corrects a merge from upstream.

This builds and loads cleanly on kernel -118.

diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index 5f93f73..1dba1b5 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -837,6 +837,9 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *ha)
 	struct qla_npiv_header hdr;
 	struct qla_npiv_entry *entry;
 
+	if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha))
+		return;
+
 	ha->isp_ops->read_optrom(ha, (uint8_t *)&hdr,
 	    ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header));
 	if (hdr.version == __constant_cpu_to_le16(0xffff))