From patchwork Sat Jan 29 17:40:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduard - Gabriel Munteanu X-Patchwork-Id: 516581 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0THfGUW005878 for ; Sat, 29 Jan 2011 17:41:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754743Ab1A2RlL (ORCPT ); Sat, 29 Jan 2011 12:41:11 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:59681 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697Ab1A2RlK (ORCPT ); Sat, 29 Jan 2011 12:41:10 -0500 Received: by mail-fx0-f46.google.com with SMTP id 20so4372099fxm.19 for ; Sat, 29 Jan 2011 09:41:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references:in-reply-to:references; bh=dxwTyBO4spE6wNunFZFvMS1WKTlVZUpjyDrXraxXWms=; b=gAVnDM+27PmKyQqNqDeirLiCosSV3QE/2qGr7N1VUYfl+whbR8sUQyO+MjBUlogHQj zND+VX4GS04/AN8/XNdeS+RWN2RVUxLKG2CssXfBfB6raKil3NAhRP4UpLFgi2DZhx9G TXWqCipEvij6SJKs2tlloa5saNzismGmf8gho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=DgbH1h6OHdCwTCVMhRg2YRS9qBkKHpw80f5yLZVRTuJf7EawfBzg6Z3BVMK+3lYRoV 9SkxJM4YqqtETahO+xqqK9gtfBAEsU2PZZ1TefNTEMf3bge8mw5E1UhNEDUjHeOp3jcV wGAXb1yYcRughCIr1mng6q/ZNaRa43GAiL9DA= Received: by 10.223.100.15 with SMTP id w15mr3834565fan.121.1296322869691; Sat, 29 Jan 2011 09:41:09 -0800 (PST) Received: from localhost.localdomain ([188.25.244.101]) by mx.google.com with ESMTPS id 21sm6822801fav.17.2011.01.29.09.41.08 (version=SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 09:41:08 -0800 (PST) From: Eduard - Gabriel Munteanu To: joro@8bytes.org Cc: blauwirbel@gmail.com, paul@codesourcery.com, avi@redhat.com, anthony@codemonkey.ws, av1474@comtv.ru, yamahata@valinux.co.jp, kvm@vger.kernel.org, qemu-devel@nongnu.org, Eduard - Gabriel Munteanu Subject: [PATCH 11/13] pcnet: use the DMA memory access interface Date: Sat, 29 Jan 2011 19:40:32 +0200 Message-Id: <800fc3514ae6d70eb429a10259b241f8eb790a3c.1296321798.git.eduard.munteanu@linux360.ro> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 29 Jan 2011 17:41:17 +0000 (UTC) diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 339a401..3f55c42 100644 --- a/hw/pcnet-pci.c +++ b/hw/pcnet-pci.c @@ -230,13 +230,13 @@ static void pcnet_mmio_map(PCIDevice *pci_dev, int region_num, static void pci_physical_memory_write(void *dma_opaque, target_phys_addr_t addr, uint8_t *buf, int len, int do_bswap) { - cpu_physical_memory_write(addr, buf, len); + dma_memory_write(dma_opaque, addr, buf, len); } static void pci_physical_memory_read(void *dma_opaque, target_phys_addr_t addr, uint8_t *buf, int len, int do_bswap) { - cpu_physical_memory_read(addr, buf, len); + dma_memory_read(dma_opaque, addr, buf, len); } static void pci_pcnet_cleanup(VLANClientState *nc) @@ -306,6 +306,7 @@ static int pci_pcnet_init(PCIDevice *pci_dev) s->irq = pci_dev->irq[0]; s->phys_mem_read = pci_physical_memory_read; s->phys_mem_write = pci_physical_memory_write; + s->dma_opaque = &pci_dev->dma; if (!pci_dev->qdev.hotplugged) { static int loaded = 0;