Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 755f516b authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig
Browse files

qla2xxx: Restrict max_lun to 16-bit for older HBAs



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

Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Reviewed-by: default avatarEwan Milne <emilne@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 22ffeb48
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2661,6 +2661,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;
	/* Older HBAs support only 16-bit LUNs */
	if (!IS_QLAFX00(ha) && !IS_FWI2_CAPABLE(ha) &&
	    ql2xmaxlun > 0xffff)
		host->max_lun = 0xffff;
	else
		host->max_lun = ql2xmaxlun;
	host->transportt = qla2xxx_transport_template;
	sht->vendor_id = (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_QLOGIC);