Hello,

Thanks for the investigation!

Andrea Monaco, le dim. 12 sept. 2021 19:36:22 +0200, a ecrit:
> -       if (ahci_identify(ahci_host, ahci_port, port, WIN_IDENTIFY) >= 2)
> -               /* Try ATAPI */
> -               ahci_identify(ahci_host, ahci_port, port, WIN_PIDENTIFY);
> +       /* if PxCMD.ATAPI is set, try ATAPI identify first */
> +       if (readl(&ahci_port->cmd) & PORT_CMD_ATAPI)
> +               ahci_identify(ahci_host, ahci_port, port, WIN_PIDENTIFY);
> +       else if (ahci_identify(ahci_host, ahci_port, port, WIN_IDENTIFY) >= 2)
> +               /* Try ATAPI anyway as last resort */
> +               ahci_identify(ahci_host, ahci_port, port, WIN_PIDENTIFY);

Perhaps ather something like

> +       if (readl(&ahci_port->cmd) & PORT_CMD_ATAPI ||
> +               ahci_identify(ahci_host, ahci_port, port, WIN_IDENTIFY) >= 2)
> +               ahci_identify(ahci_host, ahci_port, port, WIN_PIDENTIFY);

?

Samuel

Reply via email to