Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760236AbXJYGzB (ORCPT ); Thu, 25 Oct 2007 02:55:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755582AbXJYGyw (ORCPT ); Thu, 25 Oct 2007 02:54:52 -0400 Received: from mail.sf-mail.de ([62.27.20.61]:58388 "EHLO mail.sf-mail.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755405AbXJYGyv (ORCPT ); Thu, 25 Oct 2007 02:54:51 -0400 From: Rolf Eike Beer To: Jeff Garzik Subject: Re: [PATCH 3/4] [SCSI] ips: PCI API cleanups Date: Thu, 25 Oct 2007 08:54:41 +0200 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: LKML , linux-scsi@vger.kernel.org, akpm@linux-foundation.org References: <09821349085390234lkjasdflkjasflkdj24746@havoc.gtf.org> <20071024234830.8F7891F81A9@havoc.gtf.org> In-Reply-To: <20071024234830.8F7891F81A9@havoc.gtf.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2036536.65UjCFJZ43"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200710250854.47197.eike-kernel@sf-tec.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2119 Lines: 72 --nextPart2036536.65UjCFJZ43 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Jeff Garzik wrote: > * pass Scsi_Host to ips_remove_device() via pci_set_drvdata(), > allowing us to eliminate the ips_ha[] search loop and call > ips_release() directly. > > * call pci_{request,release}_regions() and eliminate individual > request/release_[mem_]region() calls > > * call pci_disable_device(), paired with pci_enable_device() > > * s/0/NULL/ in a few places > > * check ioremap() return value > @@ -7036,32 +7042,17 @@ ips_init_phase1(struct pci_dev *pci_dev, int > *indexPtr) uint32_t base; > uint32_t offs; > > - if (!request_mem_region(mem_addr, mem_len, "ips")) { > - IPS_PRINTK(KERN_WARNING, pci_dev, > - "Couldn't allocate IO Memory space %x len %d.\n", > - mem_addr, mem_len); > - return -1; > - } > - > base =3D mem_addr & PAGE_MASK; > offs =3D mem_addr - base; > ioremap_ptr =3D ioremap(base, PAGE_SIZE); This looks odd. What are we actually doing here? It seems that we want to map that PCI BAR. Since we're playing with PAGE_MA= SK=20 I assume the BAR always has a length