diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-29 22:50:17 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-29 22:50:17 +0400 |
commit | 9c5891bd4342349a200676d33f742dd1b864822c (patch) | |
tree | b14c1698f2d8ce5276e1befd562f6398a46b48b9 /drivers/scsi/mvsas/mv_sas.c | |
parent | ecda040ff3724f021a96491ecee88d48e968c153 (diff) | |
parent | 5ae90d8e467e625e447000cb4335c4db973b1095 (diff) | |
download | linux-9c5891bd4342349a200676d33f742dd1b864822c.tar.xz |
Merge 3.11-rc3 into char-misc-next.
This resolves a merge issue with:
drivers/misc/mei/init.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/mvsas/mv_sas.c')
-rw-r--r-- | drivers/scsi/mvsas/mv_sas.c | 11 |
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) goto out; } - /* error info record present */ - if (unlikely((rx_desc & RXQ_ERR) && (*(u64 *) slot->response))) { + /* + * error info record present; slot->response is 32 bit aligned but may + * not be 64 bit aligned, so check for zero in two 32 bit reads + */ + if (unlikely((rx_desc & RXQ_ERR) + && (*((u32 *)slot->response) + || *(((u32 *)slot->response) + 1)))) { mv_dprintk("port %d slot %d rx_desc %X has error info" "%016llX.\n", slot->port->sas_port.id, slot_idx, - rx_desc, (u64)(*(u64 *)slot->response)); + rx_desc, get_unaligned_le64(slot->response)); tstat->stat = mvs_slot_err(mvi, task, slot_idx); tstat->resp = SAS_TASK_COMPLETE; goto out; |