Drop ATA_CMD constants and use constants from ide/internal.h. Signed-off-by: Sebastian Herbszt <herb...@gmx.de>
diff --git a/hw/ahci.c b/hw/ahci.c index 9987459..b4eafdf 100644 --- a/hw/ahci.c +++ b/hw/ahci.c @@ -153,33 +153,6 @@ do { fprintf(stderr,"ahci: " fmt , ## __VA_ARGS__); } while (0) #define STATE_RESET 1 /* - * ATA Commands (only mandatory commands listed here) - */ -#define ATA_CMD_READ 0x20 /* Read Sectors (with retries) */ -#define ATA_CMD_READN 0x21 /* Read Sectors ( no retries) */ -#define ATA_CMD_WRITE 0x30 /* Write Sectores (with retries)*/ -#define ATA_CMD_WRITEN 0x31 /* Write Sectors ( no retries)*/ -#define ATA_CMD_VRFY 0x40 /* Read Verify (with retries) */ -#define ATA_CMD_VRFYN 0x41 /* Read verify ( no retries) */ -#define ATA_CMD_SEEK 0x70 /* Seek */ -#define ATA_CMD_DIAG 0x90 /* Execute Device Diagnostic */ -#define ATA_CMD_INIT 0x91 /* Initialize Device Parameters */ -#define ATA_CMD_RD_MULT 0xC4 /* Read Multiple */ -#define ATA_CMD_WR_MULT 0xC5 /* Write Multiple */ -#define ATA_CMD_SETMULT 0xC6 /* Set Multiple Mode */ -#define ATA_CMD_RD_DMA 0xC8 /* Read DMA (with retries) */ -#define ATA_CMD_RD_DMAN 0xC9 /* Read DMS ( no retries) */ -#define ATA_CMD_WR_DMA 0xCA /* Write DMA (with retries) */ -#define ATA_CMD_WR_DMAN 0xCB /* Write DMA ( no retires) */ -#define ATA_CMD_IDENT 0xEC /* Identify Device */ -#define ATA_CMD_SETF 0xEF /* Set Features */ -#define ATA_CMD_CHK_PWR 0xE5 /* Check Power Mode */ - -#define ATA_CMD_READ_EXT 0x24 /* Read Sectors (with retries) with 48bit addressing */ -#define ATA_CMD_WRITE_EXT 0x34 /* Write Sectores (with retries) with 48bit addressing */ -#define ATA_CMD_VRFY_EXT 0x42 /* Read Verify (with retries) with 48bit addressing */ - -/* * ATAPI Commands */ #define ATAPI_CMD_IDENT 0xA1 /* Identify AT Atachment Packed Interface Device */ @@ -1067,7 +1040,7 @@ static void handle_cmd(AHCIState *s,int port,int slot) pr->irq_stat |= (1<<2); break; - case ATA_CMD_IDENT: + case WIN_IDENTIFY: ide_identify(ide_state); write_to_sglist(ide_state->identify_data, sizeof(ide_state->identify_data),s->prdt_buf,prdt_num); pr->irq_stat |= (1<<2); @@ -1091,7 +1064,7 @@ static void handle_cmd(AHCIState *s,int port,int slot) case WIN_SETFEATURES: pr->irq_stat |= (1<<2); break; - case ATA_CMD_RD_DMA: + case WIN_READDMA: sector_num=(((int64_t)fis[10])<<40)|(((int64_t)fis[9])<<32)|(fis[8]<<24)|(fis[6]<<16)|(fis[5]<<8)|fis[4]; nb_sectors=(fis[13]<<8)|fis[12]; if(!nb_sectors)nb_sectors=256; @@ -1103,7 +1076,7 @@ static void handle_cmd(AHCIState *s,int port,int slot) } pr->irq_stat |= (1<<2); break; - case ATA_CMD_WR_DMA: + case WIN_WRITEDMA: sector_num=(((int64_t)fis[10])<<40)|(((int64_t)fis[9])<<32)|(fis[8]<<24)|(fis[6]<<16)|(fis[5]<<8)|fis[4]; nb_sectors=(fis[13]<<8)|fis[12]; if(!nb_sectors)nb_sectors=256;