From patchwork Tue Nov 17 10:22:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 38621 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 E11EFB7B65 for ; Tue, 17 Nov 2009 22:03:52 +1100 (EST) Received: from localhost ([127.0.0.1]:53263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NALqe-0003mu-GC for incoming@patchwork.ozlabs.org; Tue, 17 Nov 2009 06:03:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NALCy-0001er-Cb for qemu-devel@nongnu.org; Tue, 17 Nov 2009 05:22:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NALCt-0001d5-M3 for qemu-devel@nongnu.org; Tue, 17 Nov 2009 05:22:47 -0500 Received: from [199.232.76.173] (port=41501 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NALCt-0001cy-As for qemu-devel@nongnu.org; Tue, 17 Nov 2009 05:22:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27951) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NALCs-0007cZ-SX for qemu-devel@nongnu.org; Tue, 17 Nov 2009 05:22:43 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAHAMf8C020846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Nov 2009 05:22:41 -0500 Received: from zweiblum.home.kraxel.org (vpn1-7-195.ams2.redhat.com [10.36.7.195]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAHAMdWe026192; Tue, 17 Nov 2009 05:22:40 -0500 Message-ID: <4B02796E.4020504@redhat.com> Date: Tue, 17 Nov 2009 11:22:38 +0100 From: Gerd Hoffmann User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 MIME-Version: 1.0 To: Hannes Reinecke References: <20091112114849.E783838DC3@ochil.suse.de> In-Reply-To: <20091112114849.E783838DC3@ochil.suse.de> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [PATCH] megasas: LSI MegaRAID SAS HBA emulation 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 On 11/12/09 12:48, Hannes Reinecke wrote: > > This patch adds an emulation for the LSI MegaRAID SAS HBA. > It is build on top of kraxel's scsi.v7 tree. > > This is just a rough implementation, many of the more > advanced topics (like Windows booting :-) are missing. > > Signed-off-by: Hannes Reinecke Added, will be in scsi.v8. Needs a patch after rebasing due to pci changes (attached fyi). cheers, Gerd From ae3c2b55f84f9b12551369b21fd7b89d84ddfff6 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 16 Nov 2009 23:12:53 +0100 Subject: [PATCH] megasas: adapt to pci changes. --- hw/megasas.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/megasas.c b/hw/megasas.c index 723c586..3d15cc6 100644 --- a/hw/megasas.c +++ b/hw/megasas.c @@ -1034,7 +1034,7 @@ static void megasas_soft_reset(MPTState *s) } static void megasas_mmio_mapfunc(PCIDevice *pci_dev, int region_num, - uint32_t addr, uint32_t size, int type) + pcibus_t addr, pcibus_t size, int type) { MPTState *s = DO_UPCAST(MPTState, dev, pci_dev); @@ -1043,7 +1043,7 @@ static void megasas_mmio_mapfunc(PCIDevice *pci_dev, int region_num, } static void megasas_io_mapfunc(PCIDevice *pci_dev, int region_num, - uint32_t addr, uint32_t size, int type) + pcibus_t addr, pcibus_t size, int type) { MPTState *s = DO_UPCAST(MPTState, dev, pci_dev); @@ -1058,7 +1058,7 @@ static void megasas_io_mapfunc(PCIDevice *pci_dev, int region_num, } static void megasas_queue_mapfunc(PCIDevice *pci_dev, int region_num, - uint32_t addr, uint32_t size, int type) + pcibus_t addr, pcibus_t size, int type) { MPTState *s = DO_UPCAST(MPTState, dev, pci_dev); @@ -1140,11 +1140,11 @@ static int megasas_scsi_init(PCIDevice *dev) s->queue_addr = cpu_register_io_memory(megasas_queue_readfn, megasas_queue_writefn, s); pci_register_bar((struct PCIDevice *)s, 0, 0x40000, - PCI_ADDRESS_SPACE_MEM, megasas_mmio_mapfunc); + PCI_BASE_ADDRESS_SPACE_MEMORY, megasas_mmio_mapfunc); pci_register_bar((struct PCIDevice *)s, 2, 256, - PCI_ADDRESS_SPACE_IO, megasas_io_mapfunc); + PCI_BASE_ADDRESS_SPACE_IO, megasas_io_mapfunc); pci_register_bar((struct PCIDevice *)s, 3, 0x40000, - PCI_ADDRESS_SPACE_MEM, megasas_queue_mapfunc); + PCI_BASE_ADDRESS_SPACE_MEMORY, megasas_queue_mapfunc); s->fw_sge = MEGASAS_MAX_SGE; s->fw_cmds = MEGASAS_MAX_FRAMES; s->fw_luns = (MEGASAS_MAX_LUNS > MAX_SCSI_DEVS) ?