scsi: hpsa: correct enclosure sas address
The original complaint was the lsscsi -t showed the same SAS address of the two enclosures (SEP devices). In fact the SAS address was being set to the Enclosure Logical Identifier (ELI). Reviewed-by: Scott Teel <scott.teel@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Родитель
f13cff6c25
Коммит
01d0e789a1
|
@ -3440,11 +3440,11 @@ static void hpsa_get_enclosure_info(struct ctlr_info *h,
|
|||
struct ext_report_lun_entry *rle = &rlep->LUN[rle_index];
|
||||
u16 bmic_device_index = 0;
|
||||
|
||||
bmic_device_index = GET_BMIC_DRIVE_NUMBER(&rle->lunid[0]);
|
||||
|
||||
encl_dev->sas_address =
|
||||
encl_dev->eli =
|
||||
hpsa_get_enclosure_logical_identifier(h, scsi3addr);
|
||||
|
||||
bmic_device_index = GET_BMIC_DRIVE_NUMBER(&rle->lunid[0]);
|
||||
|
||||
if (encl_dev->target == -1 || encl_dev->lun == -1) {
|
||||
rc = IO_OK;
|
||||
goto out;
|
||||
|
@ -9697,7 +9697,24 @@ hpsa_sas_get_linkerrors(struct sas_phy *phy)
|
|||
static int
|
||||
hpsa_sas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
|
||||
{
|
||||
*identifier = rphy->identify.sas_address;
|
||||
struct Scsi_Host *shost = phy_to_shost(rphy);
|
||||
struct ctlr_info *h;
|
||||
struct hpsa_scsi_dev_t *sd;
|
||||
|
||||
if (!shost)
|
||||
return -ENXIO;
|
||||
|
||||
h = shost_to_hba(shost);
|
||||
|
||||
if (!h)
|
||||
return -ENXIO;
|
||||
|
||||
sd = hpsa_find_device_by_sas_rphy(h, rphy);
|
||||
if (!sd)
|
||||
return -ENXIO;
|
||||
|
||||
*identifier = sd->eli;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ struct hpsa_scsi_dev_t {
|
|||
#define RAID_CTLR_LUNID "\0\0\0\0\0\0\0\0"
|
||||
unsigned char device_id[16]; /* from inquiry pg. 0x83 */
|
||||
u64 sas_address;
|
||||
u64 eli; /* from report diags. */
|
||||
unsigned char vendor[8]; /* bytes 8-15 of inquiry data */
|
||||
unsigned char model[16]; /* bytes 16-31 of inquiry data */
|
||||
unsigned char rev; /* byte 2 of inquiry data */
|
||||
|
|
Загрузка…
Ссылка в новой задаче