* [Qemu-devel] [PATCH] ahci: drop ATA_CMD constants
@ 2010-06-01 20:26 Sebastian Herbszt
0 siblings, 0 replies; only message in thread
From: Sebastian Herbszt @ 2010-06-01 20:26 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-ahci-devel, Sebastian Herbszt
Drop ATA_CMD constants and use constants from ide/internal.h.
Signed-off-by: Sebastian Herbszt <herbszt@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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-01 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 20:26 [Qemu-devel] [PATCH] ahci: drop ATA_CMD constants Sebastian Herbszt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).