[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 4/4] atapi: Fix CDI_SCSI_WRITE



This was implemented the same as CDI_SCSI_READ, but should be using the
out function.

Cc: cdi-devel@xxxxxxxxxx
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/cdi/ata/atapi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/modules/cdi/ata/atapi.c b/src/modules/cdi/ata/atapi.c
index b866551..31c7263 100644
--- a/src/modules/cdi/ata/atapi.c
+++ b/src/modules/cdi/ata/atapi.c
@@ -141,8 +141,11 @@ int atapi_request(struct cdi_scsi_device* scsi,struct cdi_scsi_packet* packet)
 
         // Lesen bzw. Schreiben der Daten
         // TODO: DMA
-        if (packet->direction==CDI_SCSI_READ) ata_protocol_pio_in(&rw_request);
-        else if (packet->direction==CDI_SCSI_WRITE) ata_protocol_pio_in(&rw_request);
+        if (packet->direction == CDI_SCSI_READ) {
+            ata_protocol_pio_in(&rw_request);
+        } else if (packet->direction == CDI_SCSI_WRITE) {
+            ata_protocol_pio_out(&rw_request);
+        }
 
         // Bei Fehler den Sense Key zurueckgeben
         status = ata_reg_inb(dev->controller, REG_STATUS);
-- 
2.1.2