aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2015-08-17 09:52:32 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-09-06 14:53:31 -0400
commit50acde8ed35620fdfad88f4e20a39a1eb0d8d4c9 (patch)
tree9d219c39caed73caef5e18df493ac94419f910c1
parent612872cabf5be6f95d43d9a88eef38201ae8005d (diff)
pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY
In case psataPayload->status has a status of IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY ts->stat gets set to SAS_OPEN_REJECT but a missing 'break' statement causes a fallthrough to the default handler of the switch statement overriding ts->stat to SAS_DEV_NO_RESPONSE. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c1
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 39306b1e704c..04e67a190652 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -2642,6 +2642,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
2642 ts->resp = SAS_TASK_COMPLETE; 2642 ts->resp = SAS_TASK_COMPLETE;
2643 ts->stat = SAS_OPEN_REJECT; 2643 ts->stat = SAS_OPEN_REJECT;
2644 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY; 2644 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
2645 break;
2645 default: 2646 default:
2646 PM8001_IO_DBG(pm8001_ha, 2647 PM8001_IO_DBG(pm8001_ha,
2647 pm8001_printk("Unknown status 0x%x\n", status)); 2648 pm8001_printk("Unknown status 0x%x\n", status));
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 0e1628f2018e..9a389f1508de 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -2337,6 +2337,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
2337 ts->resp = SAS_TASK_COMPLETE; 2337 ts->resp = SAS_TASK_COMPLETE;
2338 ts->stat = SAS_OPEN_REJECT; 2338 ts->stat = SAS_OPEN_REJECT;
2339 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY; 2339 ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
2340 break;
2340 default: 2341 default:
2341 PM8001_IO_DBG(pm8001_ha, 2342 PM8001_IO_DBG(pm8001_ha,
2342 pm8001_printk("Unknown status 0x%x\n", status)); 2343 pm8001_printk("Unknown status 0x%x\n", status));