Though there currently isn't a way to insert new media into an ATAPI
drive, at least pretend to support Asynchronous Notification (AN) to avoid a guest needlessly polling for it. Approved by: grehan (co-mentor)
This commit is contained in:
parent
ff1ffd7499
commit
7292923b49
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263238
@ -94,6 +94,13 @@ enum sata_fis_type {
|
||||
#define MODEPAGE_RW_ERROR_RECOVERY 0x01
|
||||
#define MODEPAGE_CD_CAPABILITIES 0x2A
|
||||
|
||||
/*
|
||||
* ATA commands
|
||||
*/
|
||||
#define ATA_SF_ENAB_SATA_SF 0x10
|
||||
#define ATA_SATA_SF_AN 0x05
|
||||
#define ATA_SF_DIS_SATA_SF 0x90
|
||||
|
||||
/*
|
||||
* Debug printf
|
||||
*/
|
||||
@ -1169,6 +1176,17 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis)
|
||||
case ATA_SETFEATURES:
|
||||
{
|
||||
switch (cfis[3]) {
|
||||
case ATA_SF_ENAB_SATA_SF:
|
||||
switch (cfis[12]) {
|
||||
case ATA_SATA_SF_AN:
|
||||
p->tfd = ATA_S_DSC | ATA_S_READY;
|
||||
break;
|
||||
default:
|
||||
p->tfd = ATA_S_ERROR | ATA_S_READY;
|
||||
p->tfd |= (ATA_ERROR_ABORT << 8);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ATA_SF_ENAB_WCACHE:
|
||||
case ATA_SF_DIS_WCACHE:
|
||||
case ATA_SF_ENAB_RCACHE:
|
||||
|
Loading…
Reference in New Issue
Block a user