mirror of
https://github.com/AuxXxilium/arc-modules.git
synced 2024-11-23 14:51:01 +07:00
0003-scsi-hpsa-Add-mask-existing-devices-on-rescan-if-vis.patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
405f7c7706
commit
be06a18de3
@ -1564,6 +1564,14 @@ static inline int device_updated(struct hpsa_scsi_dev_t *dev1,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool device_expose_changed(struct hpsa_scsi_dev_t *dev1,
|
||||||
|
struct hpsa_scsi_dev_t *dev2)
|
||||||
|
{
|
||||||
|
if (dev1->expose_device != dev2->expose_device)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Find needle in haystack. If exact match found, return DEVICE_SAME,
|
/* Find needle in haystack. If exact match found, return DEVICE_SAME,
|
||||||
* and return needle location in *index. If scsi3addr matches, but not
|
* and return needle location in *index. If scsi3addr matches, but not
|
||||||
* vendor, model, serial num, etc. return DEVICE_CHANGED, and return needle
|
* vendor, model, serial num, etc. return DEVICE_CHANGED, and return needle
|
||||||
@ -1590,6 +1598,8 @@ static int hpsa_scsi_find_entry(struct hpsa_scsi_dev_t *needle,
|
|||||||
if (SCSI3ADDR_EQ(needle->scsi3addr, haystack[i]->scsi3addr)) {
|
if (SCSI3ADDR_EQ(needle->scsi3addr, haystack[i]->scsi3addr)) {
|
||||||
*index = i;
|
*index = i;
|
||||||
if (device_is_the_same(needle, haystack[i])) {
|
if (device_is_the_same(needle, haystack[i])) {
|
||||||
|
if (device_expose_changed(needle, haystack[i]))
|
||||||
|
return DEVICE_CHANGED;
|
||||||
if (device_updated(needle, haystack[i]))
|
if (device_updated(needle, haystack[i]))
|
||||||
return DEVICE_UPDATED;
|
return DEVICE_UPDATED;
|
||||||
return DEVICE_SAME;
|
return DEVICE_SAME;
|
||||||
|
Loading…
Reference in New Issue
Block a user