mirror of
https://github.com/AuxXxilium/arc-modules.git
synced 2024-11-23 14:51:01 +07:00
0004-scsi-hpsa-Ignore-HBA-flag-from-NVRAM-if-logical-devi.patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
be06a18de3
commit
f240f5a851
@ -4415,10 +4415,11 @@ out:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hpsa_update_nvram_hba_mode(struct ctlr_info *h)
|
static int hpsa_update_nvram_hba_mode(struct ctlr_info *h, u32 nlogicals)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
bool flag_enabled;
|
bool flag_enabled;
|
||||||
|
bool ignore;
|
||||||
|
|
||||||
if (!hpsa_use_nvram_hba_flag)
|
if (!hpsa_use_nvram_hba_flag)
|
||||||
return 0;
|
return 0;
|
||||||
@ -4429,10 +4430,13 @@ static int hpsa_update_nvram_hba_mode(struct ctlr_info *h)
|
|||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
dev_info(&h->pdev->dev, "NVRAM HBA flag: %s\n",
|
ignore = flag_enabled && nlogicals;
|
||||||
flag_enabled ? "enabled" : "disabled");
|
|
||||||
|
|
||||||
h->nvram_hba_mode_enabled = flag_enabled;
|
dev_info(&h->pdev->dev, "NVRAM HBA flag: %s%s\n",
|
||||||
|
flag_enabled ? "enabled" : "disabled",
|
||||||
|
ignore ? " (ignored because of existing logical devices)" : "");
|
||||||
|
|
||||||
|
h->nvram_hba_mode_enabled = flag_enabled && !ignore;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4493,7 +4497,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
|
|||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hpsa_update_nvram_hba_mode(h)) {
|
if (hpsa_update_nvram_hba_mode(h, nlogicals)) {
|
||||||
h->drv_req_rescan = 1;
|
h->drv_req_rescan = 1;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user