|
@@ -2009,7 +2009,7 @@ static struct hpsa_scsi_dev_t *lookup_hpsa_scsi_dev(struct ctlr_info *h,
|
|
|
|
|
|
static int hpsa_slave_alloc(struct scsi_device *sdev)
|
|
static int hpsa_slave_alloc(struct scsi_device *sdev)
|
|
{
|
|
{
|
|
- struct hpsa_scsi_dev_t *sd;
|
|
|
|
|
|
+ struct hpsa_scsi_dev_t *sd = NULL;
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
struct ctlr_info *h;
|
|
struct ctlr_info *h;
|
|
|
|
|
|
@@ -2026,7 +2026,8 @@ static int hpsa_slave_alloc(struct scsi_device *sdev)
|
|
sd->target = sdev_id(sdev);
|
|
sd->target = sdev_id(sdev);
|
|
sd->lun = sdev->lun;
|
|
sd->lun = sdev->lun;
|
|
}
|
|
}
|
|
- } else
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!sd)
|
|
sd = lookup_hpsa_scsi_dev(h, sdev_channel(sdev),
|
|
sd = lookup_hpsa_scsi_dev(h, sdev_channel(sdev),
|
|
sdev_id(sdev), sdev->lun);
|
|
sdev_id(sdev), sdev->lun);
|
|
|
|
|
|
@@ -3840,6 +3841,7 @@ static int hpsa_update_device_info(struct ctlr_info *h,
|
|
sizeof(this_device->vendor));
|
|
sizeof(this_device->vendor));
|
|
memcpy(this_device->model, &inq_buff[16],
|
|
memcpy(this_device->model, &inq_buff[16],
|
|
sizeof(this_device->model));
|
|
sizeof(this_device->model));
|
|
|
|
+ this_device->rev = inq_buff[2];
|
|
memset(this_device->device_id, 0,
|
|
memset(this_device->device_id, 0,
|
|
sizeof(this_device->device_id));
|
|
sizeof(this_device->device_id));
|
|
if (hpsa_get_device_id(h, scsi3addr, this_device->device_id, 8,
|
|
if (hpsa_get_device_id(h, scsi3addr, this_device->device_id, 8,
|
|
@@ -3929,10 +3931,14 @@ static void figure_bus_target_lun(struct ctlr_info *h,
|
|
|
|
|
|
if (!is_logical_dev_addr_mode(lunaddrbytes)) {
|
|
if (!is_logical_dev_addr_mode(lunaddrbytes)) {
|
|
/* physical device, target and lun filled in later */
|
|
/* physical device, target and lun filled in later */
|
|
- if (is_hba_lunid(lunaddrbytes))
|
|
|
|
|
|
+ if (is_hba_lunid(lunaddrbytes)) {
|
|
|
|
+ int bus = HPSA_HBA_BUS;
|
|
|
|
+
|
|
|
|
+ if (!device->rev)
|
|
|
|
+ bus = HPSA_LEGACY_HBA_BUS;
|
|
hpsa_set_bus_target_lun(device,
|
|
hpsa_set_bus_target_lun(device,
|
|
- HPSA_HBA_BUS, 0, lunid & 0x3fff);
|
|
|
|
- else
|
|
|
|
|
|
+ bus, 0, lunid & 0x3fff);
|
|
|
|
+ } else
|
|
/* defer target, lun assignment for physical devices */
|
|
/* defer target, lun assignment for physical devices */
|
|
hpsa_set_bus_target_lun(device,
|
|
hpsa_set_bus_target_lun(device,
|
|
HPSA_PHYSICAL_DEVICE_BUS, -1, -1);
|
|
HPSA_PHYSICAL_DEVICE_BUS, -1, -1);
|