diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-05 23:47:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-05 23:47:27 -0400 |
commit | 0603006b450004213eeed22d4fbcc103c994c2e6 (patch) | |
tree | c9abb1df1ba533db23b23eeae2a2a4464105515e /drivers/scsi/cxlflash | |
parent | d268675c1f084abcc32070008c5b547d31341005 (diff) | |
parent | c8e18acccb9be6dd1aa4fb8dbc1b98b3b7d6d8e1 (diff) | |
download | linux-0603006b450004213eeed22d4fbcc103c994c2e6.tar.bz2 |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is seven basic fixes (plus one MAINTAINER update) which came in
close to the merge window"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
ipr: Fix error return code in ipr_probe_ioa()
fcoe: add missing destroy_workqueue() on error in fcoe_init()
lpfc: Fix possible NULL pointer dereference
fcoe: Use default VLAN for FIP VLAN discovery
ipr: Wait to do async scan until scsi host is initialized
MAINTAINERS: Update cxlflash maintainers
cxlflash: Verify problem state area is mapped before notifying shutdown
lpfc: fix oops in lpfc_sli4_scmd_to_wqidx_distr() from lpfc_send_taskmgmt()
Diffstat (limited to 'drivers/scsi/cxlflash')
-rw-r--r-- | drivers/scsi/cxlflash/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 860008d42466..661bb94e2548 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -778,7 +778,7 @@ static void notify_shutdown(struct cxlflash_cfg *cfg, bool wait) { struct afu *afu = cfg->afu; struct device *dev = &cfg->dev->dev; - struct sisl_global_map __iomem *global = &afu->afu_map->global; + struct sisl_global_map __iomem *global; struct dev_dependent_vals *ddv; u64 reg, status; int i, retry_cnt = 0; @@ -787,6 +787,14 @@ static void notify_shutdown(struct cxlflash_cfg *cfg, bool wait) if (!(ddv->flags & CXLFLASH_NOTIFY_SHUTDOWN)) return; + if (!afu || !afu->afu_map) { + dev_dbg(dev, "%s: The problem state area is not mapped\n", + __func__); + return; + } + + global = &afu->afu_map->global; + /* Notify AFU */ for (i = 0; i < NUM_FC_PORTS; i++) { reg = readq_be(&global->fc_regs[i][FC_CONFIG2 / 8]); |