disk/ahci: Use defines GRUB_ATA_STATUS_BUSY
and GRUB_ATA_STATUS_DRQ
Instead of hard coding `0x88` use the macros defined in `disk/ata.h`.
This commit is contained in:
parent
f4e62af000
commit
5e74a3e6df
1 changed files with 2 additions and 2 deletions
|
@ -565,14 +565,14 @@ grub_ahci_pciinit (grub_pci_device_t dev,
|
||||||
while (grub_get_time_ms () < endtime)
|
while (grub_get_time_ms () < endtime)
|
||||||
{
|
{
|
||||||
for (i = 0; i < nports; i++)
|
for (i = 0; i < nports; i++)
|
||||||
if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & 0x88))
|
if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & (GRUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ)))
|
||||||
break;
|
break;
|
||||||
if (i == nports)
|
if (i == nports)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < nports; i++)
|
for (i = 0; i < nports; i++)
|
||||||
if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & 0x88))
|
if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & (GRUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ)))
|
||||||
{
|
{
|
||||||
grub_dprintf ("ahci", "port %d is busy\n", i);
|
grub_dprintf ("ahci", "port %d is busy\n", i);
|
||||||
failed_adevs[i] = adevs[i];
|
failed_adevs[i] = adevs[i];
|
||||||
|
|
Loading…
Reference in a new issue