summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_mv.c
diff options
context:
space:
mode:
authorMark Lord <liml@rtr.ca>2006-05-19 22:40:15 +0200
committerJeff Garzik <jeff@garzik.org>2006-05-20 06:31:45 +0200
commit559eedad7f7764dacca33980127b4615011230e4 (patch)
tree0ea842b15f7fe360b5786e866160dedbb95cc38b /drivers/scsi/sata_mv.c
parent[PATCH] sata_mv: remove local copy of queue indexes (diff)
downloadlinux-559eedad7f7764dacca33980127b4615011230e4.tar.xz
linux-559eedad7f7764dacca33980127b4615011230e4.zip
[PATCH] sata_mv: endian fix
This fixes a byte-swap issue on PPC, found by Zang Roy-r61911 on the powerpc platform. His original patch also had some other platform-specific changes in #ifdef's, but I'm not sure yet how to incorporate them. Look for another patch for those (soon). Signed-off-by: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/sata_mv.c')
-rw-r--r--drivers/scsi/sata_mv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index dea9d4e42586..dcda579ee93a 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1030,8 +1030,9 @@ static inline unsigned mv_inc_q_index(unsigned index)
static inline void mv_crqb_pack_cmd(u16 *cmdw, u8 data, u8 addr, unsigned last)
{
- *cmdw = data | (addr << CRQB_CMD_ADDR_SHIFT) | CRQB_CMD_CS |
+ u16 tmp = data | (addr << CRQB_CMD_ADDR_SHIFT) | CRQB_CMD_CS |
(last ? CRQB_CMD_LAST : 0);
+ *cmdw = cpu_to_le16(tmp);
}
/**