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.dup...@qlogic.com>
Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 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);
-- 
1.7.12.4

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

Reply via email to