diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2011-05-10 14:30:13 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-17 03:34:56 -0400 |
commit | 82515920b60760bca9f66decdaa7dd98191fa47c (patch) | |
tree | 4c9e55483f046fe9ab3cf091c8bbca004b67bc42 | |
parent | 24014d046485e1947dfb5d79365472d9981cda1e (diff) |
[SCSI] qla2xxx: Allow an override of the registered maximum LUN.
The 'max_lun' value registered for each scsi_host is currently
capped at 0xffff. The new module parameter can allow for
2nd-level flat-space addressing method-infrastructure to be
supported.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 53968ccf88e3..79a12aa978a4 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -103,6 +103,7 @@ extern int ql2xenabledif; | |||
103 | extern int ql2xenablehba_err_chk; | 103 | extern int ql2xenablehba_err_chk; |
104 | extern int ql2xtargetreset; | 104 | extern int ql2xtargetreset; |
105 | extern int ql2xdontresethba; | 105 | extern int ql2xdontresethba; |
106 | extern unsigned int ql2xmaxlun; | ||
106 | 107 | ||
107 | extern int qla2x00_loop_reset(scsi_qla_host_t *); | 108 | extern int qla2x00_loop_reset(scsi_qla_host_t *); |
108 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); | 109 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index e34d7dd73e82..5e343919acad 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -456,7 +456,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
456 | else | 456 | else |
457 | host->max_cmd_len = MAX_CMDSZ; | 457 | host->max_cmd_len = MAX_CMDSZ; |
458 | host->max_channel = MAX_BUSES - 1; | 458 | host->max_channel = MAX_BUSES - 1; |
459 | host->max_lun = MAX_LUNS; | 459 | host->max_lun = ql2xmaxlun; |
460 | host->unique_id = host->host_no; | 460 | host->unique_id = host->host_no; |
461 | host->max_id = MAX_TARGETS_2200; | 461 | host->max_id = MAX_TARGETS_2200; |
462 | host->transportt = qla2xxx_transport_vport_template; | 462 | host->transportt = qla2xxx_transport_vport_template; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 8401a6f9bc71..f461925a9dfc 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -172,6 +172,12 @@ MODULE_PARM_DESC(ql2xdontresethba, | |||
172 | " 0 (Default) -- Reset on failure.\n" | 172 | " 0 (Default) -- Reset on failure.\n" |
173 | " 1 -- Do not reset on failure.\n"); | 173 | " 1 -- Do not reset on failure.\n"); |
174 | 174 | ||
175 | uint ql2xmaxlun = MAX_LUNS; | ||
176 | module_param(ql2xmaxlun, uint, S_IRUGO); | ||
177 | MODULE_PARM_DESC(ql2xmaxlun, | ||
178 | "Defines the maximum LU number to register with the SCSI " | ||
179 | "midlayer. Default is 65535."); | ||
180 | |||
175 | /* | 181 | /* |
176 | * SCSI host template entry points | 182 | * SCSI host template entry points |
177 | */ | 183 | */ |
@@ -2136,7 +2142,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2136 | else | 2142 | else |
2137 | host->max_cmd_len = MAX_CMDSZ; | 2143 | host->max_cmd_len = MAX_CMDSZ; |
2138 | host->max_channel = MAX_BUSES - 1; | 2144 | host->max_channel = MAX_BUSES - 1; |
2139 | host->max_lun = MAX_LUNS; | 2145 | host->max_lun = ql2xmaxlun; |
2140 | host->transportt = qla2xxx_transport_template; | 2146 | host->transportt = qla2xxx_transport_template; |
2141 | sht->vendor_id = (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_QLOGIC); | 2147 | sht->vendor_id = (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_QLOGIC); |
2142 | 2148 | ||