aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-12-16 14:00:58 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:37:26 -0500
commita0b89872b305bd0f6f5af1dd26274a3f057a2303 (patch)
treea6cffb0cd1cab4bb8fed96356ad8537d6f8b8c80
parent774342844f368a0c3ba907f192d844ae337d01aa (diff)
[SCSI] hpsa: do not consider firmware revision when looking for device changes.
The firmware may have been updated, in which case, it's the same device, and in that case, we do not want to remove and add the device, we want to let it continue as is. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/hpsa.c9
-rw-r--r--drivers/scsi/hpsa.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a6dea08664fc..a2408e591770 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -641,11 +641,6 @@ static void fixup_botched_add(struct ctlr_info *h,
641static inline int device_is_the_same(struct hpsa_scsi_dev_t *dev1, 641static inline int device_is_the_same(struct hpsa_scsi_dev_t *dev1,
642 struct hpsa_scsi_dev_t *dev2) 642 struct hpsa_scsi_dev_t *dev2)
643{ 643{
644 if ((is_logical_dev_addr_mode(dev1->scsi3addr) ||
645 (dev1->lun != -1 && dev2->lun != -1)) &&
646 dev1->devtype != 0x0C)
647 return (memcmp(dev1, dev2, sizeof(*dev1)) == 0);
648
649 /* we compare everything except lun and target as these 644 /* we compare everything except lun and target as these
650 * are not yet assigned. Compare parts likely 645 * are not yet assigned. Compare parts likely
651 * to differ first 646 * to differ first
@@ -660,8 +655,6 @@ static inline int device_is_the_same(struct hpsa_scsi_dev_t *dev1,
660 return 0; 655 return 0;
661 if (memcmp(dev1->vendor, dev2->vendor, sizeof(dev1->vendor)) != 0) 656 if (memcmp(dev1->vendor, dev2->vendor, sizeof(dev1->vendor)) != 0)
662 return 0; 657 return 0;
663 if (memcmp(dev1->revision, dev2->revision, sizeof(dev1->revision)) != 0)
664 return 0;
665 if (dev1->devtype != dev2->devtype) 658 if (dev1->devtype != dev2->devtype)
666 return 0; 659 return 0;
667 if (dev1->raid_level != dev2->raid_level) 660 if (dev1->raid_level != dev2->raid_level)
@@ -1477,8 +1470,6 @@ static int hpsa_update_device_info(struct ctlr_info *h,
1477 sizeof(this_device->vendor)); 1470 sizeof(this_device->vendor));
1478 memcpy(this_device->model, &inq_buff[16], 1471 memcpy(this_device->model, &inq_buff[16],
1479 sizeof(this_device->model)); 1472 sizeof(this_device->model));
1480 memcpy(this_device->revision, &inq_buff[32],
1481 sizeof(this_device->revision));
1482 memset(this_device->device_id, 0, 1473 memset(this_device->device_id, 0,
1483 sizeof(this_device->device_id)); 1474 sizeof(this_device->device_id));
1484 hpsa_get_device_id(h, scsi3addr, this_device->device_id, 1475 hpsa_get_device_id(h, scsi3addr, this_device->device_id,
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index a203ef65cb50..19586e189f0f 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -45,7 +45,6 @@ struct hpsa_scsi_dev_t {
45 unsigned char device_id[16]; /* from inquiry pg. 0x83 */ 45 unsigned char device_id[16]; /* from inquiry pg. 0x83 */
46 unsigned char vendor[8]; /* bytes 8-15 of inquiry data */ 46 unsigned char vendor[8]; /* bytes 8-15 of inquiry data */
47 unsigned char model[16]; /* bytes 16-31 of inquiry data */ 47 unsigned char model[16]; /* bytes 16-31 of inquiry data */
48 unsigned char revision[4]; /* bytes 32-35 of inquiry data */
49 unsigned char raid_level; /* from inquiry page 0xC1 */ 48 unsigned char raid_level; /* from inquiry page 0xC1 */
50}; 49};
51 50