From patchwork Mon May 10 23:19:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QiaoChong X-Patchwork-Id: 52251 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 01028B6EEB for ; Tue, 11 May 2010 09:34:13 +1000 (EST) Received: from localhost ([127.0.0.1]:50245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBcUD-0006rr-VL for incoming@patchwork.ozlabs.org; Mon, 10 May 2010 19:34:10 -0400 Received: from [140.186.70.92] (port=42312 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBcGJ-000330-Hd for qemu-devel@nongnu.org; Mon, 10 May 2010 19:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBcGI-0007ax-6f for qemu-devel@nongnu.org; Mon, 10 May 2010 19:19:47 -0400 Received: from [159.226.40.154] (port=42999 helo=mail.loongson.cn) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBcGH-0007Zn-Qv for qemu-devel@nongnu.org; Mon, 10 May 2010 19:19:46 -0400 Received: from localhost.localdomain (unknown [10.2.1.99]) by mail.loongson.cn (Postfix) with ESMTPA id B2FAAC6235; Tue, 11 May 2010 07:19:23 +0800 (CST) From: QiaoChong To: qemu-devel@nongnu.org Date: Tue, 11 May 2010 07:19:06 +0800 Message-Id: <1273533547-21789-6-git-send-email-qiaochong@loongson.cn> X-Mailer: git-send-email 1.7.0.3.254.g4503b.dirty In-Reply-To: <1273533547-21789-1-git-send-email-qiaochong@loongson.cn> References: <1273533547-21789-1-git-send-email-qiaochong@loongson.cn> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) Cc: QiaoChong , joro@8bytes.org, herbszt@gmx.de, agraf@suse.de, elek.roland@gmail.com Subject: [Qemu-devel] [PATCH 5/6] ahci pci ids into pci_ids.h, add warning messages. 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 move ahci pci device id define into pci_ids.h,add warning messages for unsupported features. Signed-off-by: QiaoChong --- hw/ahci.c | 10 +++++----- hw/pci_ids.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/ahci.c b/hw/ahci.c index cb4a851..e1aed4a 100644 --- a/hw/ahci.c +++ b/hw/ahci.c @@ -662,7 +662,9 @@ static void handle_cmd(AHCIState *s,int port,int slot) if(fis[1]==0) { - +#ifdef DEBUG_AHCI + printf("now,just ignore command fis[0]=%02x fis[1]=%02x fis[2]=%02x\n",fis[0],fis[1],fis[2]); +#endif } if(fis[1]==(1<<7)) @@ -755,15 +757,13 @@ static void ahci_pci_map(PCIDevice *pci_dev, int region_num, cpu_register_physical_memory(addr, size, s->mem); } -#define PCI_VENDOR_MYDEVICE 0x8086 -#define PCI_PRODUCT_MYDEVICE 0x2652 static int pci_ahci_init(PCIDevice *dev) { struct ahci_pci_state *d; d = DO_UPCAST(struct ahci_pci_state, card, dev); - pci_config_set_vendor_id(d->card.config,PCI_VENDOR_MYDEVICE); - pci_config_set_device_id(d->card.config,PCI_PRODUCT_MYDEVICE); + pci_config_set_vendor_id(d->card.config,PCI_VENDOR_ID_INTEL); + pci_config_set_device_id(d->card.config,PCI_DEVICE_ID_INTEL_ICH6R_AHCI); d->card.config[PCI_COMMAND] = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; d->card.config[PCI_CLASS_DEVICE] = 0; d->card.config[0x0b] = 1;//storage diff --git a/hw/pci_ids.h b/hw/pci_ids.h index fe7a121..4d4de93 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -97,3 +97,4 @@ #define PCI_DEVICE_ID_INTEL_82371AB 0x7111 #define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 #define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 +#define PCI_DEVICE_ID_INTEL_ICH6R_AHCI 0x2652