linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Chad Dupuis <chad.dupuis@qlogic.com>
Subject: [PATCH 3/5] qla2xxx: Restrict max_luns to 16-bit for older HBAs
Date: Tue, 10 Dec 2013 12:05:13 +0100	[thread overview]
Message-ID: <1386673515-87133-4-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1386673515-87133-1-git-send-email-hare@suse.de>

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@qlogic.com>
Signed-off-by: Hannes Reinecke <hare@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


  parent reply	other threads:[~2013-12-10 11:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 11:05 [PATCH 0/5][RFC] Support 64-bit LUNs Hannes Reinecke
2013-12-10 11:05 ` [PATCH 1/5] scsi: Remove CONFIG_SCSI_MULTI_LUN Hannes Reinecke
2014-03-27 14:47   ` Christoph Hellwig
2013-12-10 11:05 ` [PATCH 2/5] scsi_scan: Restrict sequential scan to 256 LUNs Hannes Reinecke
2014-03-27 14:49   ` Christoph Hellwig
2014-03-28  8:22     ` Hannes Reinecke
2014-03-28 12:47       ` Christoph Hellwig
2014-03-28 13:19         ` Hannes Reinecke
2013-12-10 11:05 ` Hannes Reinecke [this message]
2013-12-10 18:26   ` [PATCH 3/5] qla2xxx: Restrict max_luns to 16-bit for older HBAs Chad Dupuis
2014-05-15  6:38     ` Christoph Hellwig
2014-05-15  8:47       ` Hannes Reinecke
2013-12-10 11:05 ` [PATCH 4/5] scsi: use 64-bit LUNs Hannes Reinecke
2014-03-27 14:52   ` Christoph Hellwig
2013-12-10 11:05 ` [PATCH 5/5] scsi: use 64-bit value for 'max_luns' Hannes Reinecke
2014-03-27 14:52   ` Christoph Hellwig
2014-05-15  6:38 ` [PATCH 0/5][RFC] Support 64-bit LUNs Christoph Hellwig
2014-05-15  6:57   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386673515-87133-4-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=chad.dupuis@qlogic.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).