Data structures residing on memory and fetched by the controller should have LE ordering. Fix it. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> --- drivers/scsi/sata_sil24.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) f6545e5248fe3c2c7ded43131c505032bc6ba080 diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 60dd6f1..3d301b2 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_po */ msleep(10); - prb->ctrl = PRB_CTRL_SRST; + prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); prb->fis[1] = 0; /* no PM yet */ writel((u32)paddr, port + PORT_CMD_ACTIVATE); @@ -530,6 +530,7 @@ static void sil24_qc_prep(struct ata_que union sil24_cmd_block *cb = pp->cmd_block + qc->tag; struct sil24_prb *prb; struct sil24_sge *sge; + u16 ctrl = 0; switch (qc->tf.protocol) { case ATA_PROT_PIO: @@ -537,7 +538,6 @@ static void sil24_qc_prep(struct ata_que case ATA_PROT_NODATA: prb = &cb->ata.prb; sge = cb->ata.sge; - prb->ctrl = 0; break; case ATA_PROT_ATAPI: @@ -550,12 +550,10 @@ static void sil24_qc_prep(struct ata_que if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { if (qc->tf.flags & ATA_TFLAG_WRITE) - prb->ctrl = PRB_CTRL_PACKET_WRITE; + ctrl = PRB_CTRL_PACKET_WRITE; else - prb->ctrl = PRB_CTRL_PACKET_READ; - } else - prb->ctrl = 0; - + ctrl = PRB_CTRL_PACKET_READ; + } break; default: @@ -564,6 +562,7 @@ static void sil24_qc_prep(struct ata_que BUG(); } + prb->ctrl = cpu_to_le16(ctrl); ata_tf_to_fis(&qc->tf, prb->fis, 0); if (qc->flags & ATA_QCFLAG_DMAMAP) -- 1.2.4 - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html