[PATCH 03/11] ata: ide-sff: Add missing wait for ready in write function
Sascha Hauer
s.hauer at pengutronix.de
Fri Sep 27 02:47:34 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/ata/ide-sff.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 0e8b744..a7f2647 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -298,6 +298,9 @@ static int __maybe_unused ide_write(struct ata_port *port,
rc = ata_wr_cmd(ide, ATA_CMD_WRITE);
if (rc != 0)
return rc;
+ rc = ata_wait_ready(ide, MAX_TIMEOUT);
+ if (rc != 0)
+ return rc;
ata_wr_sector(ide, buffer);
num_blocks--;
sector++;
--
1.8.4.rc3
More information about the barebox
mailing list