aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas/mv_sas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mvsas/mv_sas.c')
-rw-r--r--drivers/scsi/mvsas/mv_sas.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index f14665a6293d..6b1b4e91e53f 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1857,11 +1857,16 @@ int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags)
1857 goto out; 1857 goto out;
1858 } 1858 }
1859 1859
1860 /* error info record present */ 1860 /*
1861 if (unlikely((rx_desc & RXQ_ERR) && (*(u64 *) slot->response))) { 1861 * error info record present; slot->response is 32 bit aligned but may
1862 * not be 64 bit aligned, so check for zero in two 32 bit reads
1863 */
1864 if (unlikely((rx_desc & RXQ_ERR)
1865 && (*((u32 *)slot->response)
1866 || *(((u32 *)slot->response) + 1)))) {
1862 mv_dprintk("port %d slot %d rx_desc %X has error info" 1867 mv_dprintk("port %d slot %d rx_desc %X has error info"
1863 "%016llX.\n", slot->port->sas_port.id, slot_idx, 1868 "%016llX.\n", slot->port->sas_port.id, slot_idx,
1864 rx_desc, (u64)(*(u64 *)slot->response)); 1869 rx_desc, get_unaligned_le64(slot->response));
1865 tstat->stat = mvs_slot_err(mvi, task, slot_idx); 1870 tstat->stat = mvs_slot_err(mvi, task, slot_idx);
1866 tstat->resp = SAS_TASK_COMPLETE; 1871 tstat->resp = SAS_TASK_COMPLETE;
1867 goto out; 1872 goto out;