* grub-core/disk/ahci.c (grub_ahci_pciinit): Detect ATAPI devices.
* grub-core/disk/ata.c (grub_ata_identify): Use atapi_identify if device is known to be ATAPI.
This commit is contained in:
parent
ee7fb780c8
commit
a1dcc2cb98
3 changed files with 17 additions and 2 deletions
|
@ -133,6 +133,7 @@ struct grub_ahci_device
|
|||
volatile struct grub_ahci_cmd_table *command_table;
|
||||
struct grub_pci_dma_chunk *rfis;
|
||||
int present;
|
||||
int atapi;
|
||||
};
|
||||
|
||||
static grub_err_t
|
||||
|
@ -616,6 +617,10 @@ grub_ahci_pciinit (grub_pci_device_t dev,
|
|||
grub_dma_free (failed_adevs[i]->rfis);
|
||||
}
|
||||
|
||||
for (i = 0; i < nports; i++)
|
||||
if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].sig >> 16) == 0xeb14)
|
||||
adevs[i]->atapi = 1;
|
||||
|
||||
for (i = 0; i < nports; i++)
|
||||
if (adevs[i])
|
||||
{
|
||||
|
@ -1075,6 +1080,7 @@ grub_ahci_open (int id, int devnum, struct grub_ata *ata)
|
|||
|
||||
ata->data = dev;
|
||||
ata->dma = 1;
|
||||
ata->atapi = dev->atapi;
|
||||
ata->maxbuffer = GRUB_AHCI_PRDT_MAX_CHUNK_LENGTH;
|
||||
ata->present = &dev->present;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue