From 583168a216e477bfbf6039ddc331d5827833ec08 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> Date: Sat, 23 Jul 2011 18:18:14 +0200 Subject: [PATCH] * grub-core/disk/pata.c (grub_pata_readwrite): Add missing wait. --- ChangeLog | 4 ++++ grub-core/disk/pata.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 71c33569f..2eb0c0fcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-07-23 Vladimir Serbinenko <phcoder@gmail.com> + + * grub-core/disk/pata.c (grub_pata_readwrite): Add missing wait. + 2011-07-23 Vladimir Serbinenko <phcoder@gmail.com> * include/grub/video.h: add missing EXPORT_FUND on diff --git a/grub-core/disk/pata.c b/grub-core/disk/pata.c index ff6f77366..c54fe91ab 100644 --- a/grub-core/disk/pata.c +++ b/grub-core/disk/pata.c @@ -177,6 +177,10 @@ grub_pata_readwrite (struct grub_ata *disk, /* Start command. */ grub_pata_regset (dev, GRUB_ATA_REG_CMD, parms->taskfile.cmd); + /* Wait for !BSY. */ + if (grub_pata_wait_not_busy (dev, GRUB_ATA_TOUT_DATA)) + return grub_errno; + /* Check status. */ grub_int8_t sts = grub_pata_regget (dev, GRUB_ATA_REG_STATUS); grub_dprintf ("pata", "status=0x%x\n", sts);