Re: [PATCH 3/5] qla2xxx: Restrict max_luns to 16-bit for older HBAs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, 10 Dec 2013, Hannes Reinecke wrote:

Older HBAs are only capable of supporting 16-bit LUNs,
so we need to make sure to adjust the 'ql2xmaxlun'
parameter accordingly.

Cc: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
drivers/scsi/qla2xxx/qla_os.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 89a5300..a088e5b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2600,6 +2600,11 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
	else
		host->max_cmd_len = MAX_CMDSZ;
	host->max_channel = MAX_BUSES - 1;
+	if (!IS_QLAFX00(ha) && !IS_FWI2_CAPABLE(ha)) {
+		/* HW supports only 16-bit LUNs */
+		if (ql2xmaxlun > 0xffff)
+			ql2xmaxlun = 0xffff;
+	}
	host->max_lun = ql2xmaxlun;
	host->transportt = qla2xxx_transport_template;
	sht->vendor_id = (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_QLOGIC);


Hannes, this looks good.  Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux