diff options
author | Scott Teel <scott.teel@hp.com> | 2012-01-19 15:01:19 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 09:08:56 -0500 |
commit | aca4a5200dc2b0835f5477d6609a05b0401a91f3 (patch) | |
tree | 46a49905dd72544cc7b2aa608ce072addd1f474c /drivers | |
parent | 1f310bde4631185d4462dbd544b3fa82513cdb6f (diff) |
[SCSI] hpsa: eliminate 8 external target limitation
Driver limits SAS external target IDs to range 1-8.
Need to increase limit and clean up overlapping concepts of targets and paths
in the code.
There are several defined constants that control this:
HPSA_MAX_TARGETS_PER_CTLR 16
MAX_MSA2XXX_ENCLOSURES 32
HPSA_MAX_PATHS 8
We can condense this to one constant:
MAX_EXT_TARGETS 32
SAS switches allow for 8 connections, and there is capacity for 4 switches per
enclosure in largest blade enclosure type.
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/hpsa.c | 16 | ||||
-rw-r--r-- | drivers/scsi/hpsa_cmd.h | 5 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5a795e6e9947..c8db43e9a38a 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -1694,9 +1694,9 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h, | |||
1694 | if (is_scsi_rev_5(h)) | 1694 | if (is_scsi_rev_5(h)) |
1695 | return 0; /* p1210m doesn't need to do this. */ | 1695 | return 0; /* p1210m doesn't need to do this. */ |
1696 | 1696 | ||
1697 | if (*nmsa2xxx_enclosures >= MAX_MSA2XXX_ENCLOSURES) { | 1697 | if (*nmsa2xxx_enclosures >= MAX_EXT_TARGETS) { |
1698 | dev_warn(&h->pdev->dev, "Maximum number of MSA2XXX " | 1698 | dev_warn(&h->pdev->dev, "Maximum number of external " |
1699 | "enclosures exceeded. Check your hardware " | 1699 | "target devices exceeded. Check your hardware " |
1700 | "configuration."); | 1700 | "configuration."); |
1701 | return 0; | 1701 | return 0; |
1702 | } | 1702 | } |
@@ -1802,7 +1802,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) | |||
1802 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 8; | 1802 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 8; |
1803 | int i, nmsa2xxx_enclosures, ndevs_to_allocate; | 1803 | int i, nmsa2xxx_enclosures, ndevs_to_allocate; |
1804 | int raid_ctlr_position; | 1804 | int raid_ctlr_position; |
1805 | DECLARE_BITMAP(lunzerobits, HPSA_MAX_TARGETS_PER_CTLR); | 1805 | DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS); |
1806 | 1806 | ||
1807 | currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL); | 1807 | currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL); |
1808 | physdev_list = kzalloc(reportlunsize, GFP_KERNEL); | 1808 | physdev_list = kzalloc(reportlunsize, GFP_KERNEL); |
@@ -1819,11 +1819,11 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) | |||
1819 | logdev_list, &nlogicals)) | 1819 | logdev_list, &nlogicals)) |
1820 | goto out; | 1820 | goto out; |
1821 | 1821 | ||
1822 | /* We might see up to 32 MSA2xxx enclosures, actually 8 of them | 1822 | /* We might see up to the maximum number of logical and physical disks |
1823 | * but each of them 4 times through different paths. The plus 1 | 1823 | * plus external target devices, and a device for the local RAID |
1824 | * is for the RAID controller. | 1824 | * controller. |
1825 | */ | 1825 | */ |
1826 | ndevs_to_allocate = nphysicals + nlogicals + MAX_MSA2XXX_ENCLOSURES + 1; | 1826 | ndevs_to_allocate = nphysicals + nlogicals + MAX_EXT_TARGETS + 1; |
1827 | 1827 | ||
1828 | /* Allocate the per device structures */ | 1828 | /* Allocate the per device structures */ |
1829 | for (i = 0; i < ndevs_to_allocate; i++) { | 1829 | for (i = 0; i < ndevs_to_allocate; i++) { |
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 516d6e53c7e6..8049815d8c1e 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h | |||
@@ -122,12 +122,11 @@ union u64bit { | |||
122 | }; | 122 | }; |
123 | 123 | ||
124 | /* FIXME this is a per controller value (barf!) */ | 124 | /* FIXME this is a per controller value (barf!) */ |
125 | #define HPSA_MAX_TARGETS_PER_CTLR 16 | ||
126 | #define HPSA_MAX_LUN 1024 | 125 | #define HPSA_MAX_LUN 1024 |
127 | #define HPSA_MAX_PHYS_LUN 1024 | 126 | #define HPSA_MAX_PHYS_LUN 1024 |
128 | #define MAX_MSA2XXX_ENCLOSURES 32 | 127 | #define MAX_EXT_TARGETS 32 |
129 | #define HPSA_MAX_DEVICES (HPSA_MAX_PHYS_LUN + HPSA_MAX_LUN + \ | 128 | #define HPSA_MAX_DEVICES (HPSA_MAX_PHYS_LUN + HPSA_MAX_LUN + \ |
130 | MAX_MSA2XXX_ENCLOSURES + 1) /* + 1 is for the controller itself */ | 129 | MAX_EXT_TARGETS + 1) /* + 1 is for the controller itself */ |
131 | 130 | ||
132 | /* SCSI-3 Commands */ | 131 | /* SCSI-3 Commands */ |
133 | #pragma pack(1) | 132 | #pragma pack(1) |