From patchwork Tue Jun 1 20:26:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Herbszt X-Patchwork-Id: 54303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E1BECB7D1F for ; Wed, 2 Jun 2010 06:32:44 +1000 (EST) Received: from localhost ([127.0.0.1]:47603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJY8d-00075K-Rx for incoming@patchwork.ozlabs.org; Tue, 01 Jun 2010 16:32:39 -0400 Received: from [140.186.70.92] (port=58406 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJY3N-0003iu-Mf for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJY3L-0000Cg-La for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:27:12 -0400 Received: from mail.gmx.net ([213.165.64.20]:58008) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OJY3K-0000CO-Ta for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:27:11 -0400 Received: (qmail invoked by alias); 01 Jun 2010 20:27:05 -0000 Received: from g226053168.adsl.alicedsl.de (HELO opensuse112) [92.226.53.168] by mail.gmx.net (mp046) with SMTP; 01 Jun 2010 22:27:05 +0200 X-Authenticated: #310364 X-Provags-ID: V01U2FsdGVkX18tIDZ+jKYtKHwsiCdpElm1X95YTEzjnP4VunbQrK o7rdy+QqMrm1MA X-Mailer: gregkh_patchbomb modified Date: Tue, 1 Jun 2010 22:26:29 +0200 Message-Id: <1275423989$333@local> Mime-Version: 1.0 To: qemu-devel@nongnu.org From: Sebastian Herbszt X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: qemu-ahci-devel@lists.sourceforge.net, Sebastian Herbszt Subject: [Qemu-devel] [PATCH] ahci: drop ATA_CMD constants X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Drop ATA_CMD constants and use constants from ide/internal.h. Signed-off-by: Sebastian Herbszt 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;