diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/sata_sil24.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index a8328a88e8c9..8ef51d0dcda7 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -481,7 +481,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
481 | } | 481 | } |
482 | 482 | ||
483 | /* do SRST */ | 483 | /* do SRST */ |
484 | prb->ctrl = PRB_CTRL_SRST; | 484 | prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); |
485 | prb->fis[1] = 0; /* no PM yet */ | 485 | prb->fis[1] = 0; /* no PM yet */ |
486 | 486 | ||
487 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); | 487 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); |
@@ -597,6 +597,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
597 | union sil24_cmd_block *cb = pp->cmd_block + qc->tag; | 597 | union sil24_cmd_block *cb = pp->cmd_block + qc->tag; |
598 | struct sil24_prb *prb; | 598 | struct sil24_prb *prb; |
599 | struct sil24_sge *sge; | 599 | struct sil24_sge *sge; |
600 | u16 ctrl = 0; | ||
600 | 601 | ||
601 | switch (qc->tf.protocol) { | 602 | switch (qc->tf.protocol) { |
602 | case ATA_PROT_PIO: | 603 | case ATA_PROT_PIO: |
@@ -604,7 +605,6 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
604 | case ATA_PROT_NODATA: | 605 | case ATA_PROT_NODATA: |
605 | prb = &cb->ata.prb; | 606 | prb = &cb->ata.prb; |
606 | sge = cb->ata.sge; | 607 | sge = cb->ata.sge; |
607 | prb->ctrl = 0; | ||
608 | break; | 608 | break; |
609 | 609 | ||
610 | case ATA_PROT_ATAPI: | 610 | case ATA_PROT_ATAPI: |
@@ -617,12 +617,10 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
617 | 617 | ||
618 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { | 618 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { |
619 | if (qc->tf.flags & ATA_TFLAG_WRITE) | 619 | if (qc->tf.flags & ATA_TFLAG_WRITE) |
620 | prb->ctrl = PRB_CTRL_PACKET_WRITE; | 620 | ctrl = PRB_CTRL_PACKET_WRITE; |
621 | else | 621 | else |
622 | prb->ctrl = PRB_CTRL_PACKET_READ; | 622 | ctrl = PRB_CTRL_PACKET_READ; |
623 | } else | 623 | } |
624 | prb->ctrl = 0; | ||
625 | |||
626 | break; | 624 | break; |
627 | 625 | ||
628 | default: | 626 | default: |
@@ -631,6 +629,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
631 | BUG(); | 629 | BUG(); |
632 | } | 630 | } |
633 | 631 | ||
632 | prb->ctrl = cpu_to_le16(ctrl); | ||
634 | ata_tf_to_fis(&qc->tf, prb->fis, 0); | 633 | ata_tf_to_fis(&qc->tf, prb->fis, 0); |
635 | 634 | ||
636 | if (qc->flags & ATA_QCFLAG_DMAMAP) | 635 | if (qc->flags & ATA_QCFLAG_DMAMAP) |