From: Sebastian Herbszt <herbszt@gmx.de>
To: qemu-devel@nongnu.org
Cc: qemu-ahci-devel@lists.sourceforge.net,
Sebastian Herbszt <herbszt@gmx.de>
Subject: [Qemu-devel] [PATCH] ahci: drop ATA_CMD constants
Date: Tue, 1 Jun 2010 22:26:29 +0200 [thread overview]
Message-ID: <1275423989$333@local> (raw)
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;
reply other threads:[~2010-06-01 20:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='1275423989$333@local' \
--to=herbszt@gmx.de \
--cc=qemu-ahci-devel@lists.sourceforge.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.