diff options
| author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2014-05-29 11:53:54 -0400 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2014-06-02 03:55:00 -0400 |
| commit | ee6b18890fb680cf4f9036d238ee7eea582421fd (patch) | |
| tree | 2ae1fb72ecf745119581be3a1efb7f79c2c3e0f0 | |
| parent | 8645291b8d1bac28efb803e768e91f24c814679c (diff) | |
hpsa: report check condition even if no sense data present for ioaccel2 mode
It shouldn't happen that we get a check condition with no sense data, but if it
does, we shouldn't just drop the check condition on the floor.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Justin Lindley <justin.lindley@hp.com>
Reviewed-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
| -rw-r--r-- | drivers/scsi/hpsa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 836c6c013ee8..a1cec91240ab 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
| @@ -1556,9 +1556,13 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h, | |||
| 1556 | dev_warn(&h->pdev->dev, | 1556 | dev_warn(&h->pdev->dev, |
| 1557 | "%s: task complete with check condition.\n", | 1557 | "%s: task complete with check condition.\n", |
| 1558 | "HP SSD Smart Path"); | 1558 | "HP SSD Smart Path"); |
| 1559 | cmd->result |= SAM_STAT_CHECK_CONDITION; | ||
| 1559 | if (c2->error_data.data_present != | 1560 | if (c2->error_data.data_present != |
| 1560 | IOACCEL2_SENSE_DATA_PRESENT) | 1561 | IOACCEL2_SENSE_DATA_PRESENT) { |
| 1562 | memset(cmd->sense_buffer, 0, | ||
| 1563 | SCSI_SENSE_BUFFERSIZE); | ||
| 1561 | break; | 1564 | break; |
| 1565 | } | ||
| 1562 | /* copy the sense data */ | 1566 | /* copy the sense data */ |
| 1563 | data_len = c2->error_data.sense_data_len; | 1567 | data_len = c2->error_data.sense_data_len; |
| 1564 | if (data_len > SCSI_SENSE_BUFFERSIZE) | 1568 | if (data_len > SCSI_SENSE_BUFFERSIZE) |
| @@ -1568,7 +1572,6 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h, | |||
| 1568 | sizeof(c2->error_data.sense_data_buff); | 1572 | sizeof(c2->error_data.sense_data_buff); |
| 1569 | memcpy(cmd->sense_buffer, | 1573 | memcpy(cmd->sense_buffer, |
| 1570 | c2->error_data.sense_data_buff, data_len); | 1574 | c2->error_data.sense_data_buff, data_len); |
| 1571 | cmd->result |= SAM_STAT_CHECK_CONDITION; | ||
| 1572 | retry = 1; | 1575 | retry = 1; |
| 1573 | break; | 1576 | break; |
| 1574 | case IOACCEL2_STATUS_SR_TASK_COMP_BUSY: | 1577 | case IOACCEL2_STATUS_SR_TASK_COMP_BUSY: |
