All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
	ink@jurassic.park.msu.ru, Alan Cox <alan@redhat.com>,
	james.smart@emulex.com, linux-driver@qlogic.com,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: [PATCH 3/3] pci: Remove pci_enable_device_bars()
Date: Fri, 21 Dec 2007 15:47:28 +1100	[thread overview]
Message-ID: <1198212448.6779.45.camel@pasglop> (raw)
In-Reply-To: <20071221042855.GF25341@kroah.com>

pci: Remove pci_enable_device_bars() fix for qla

The previous patch missed one occurence of pci_enable_device_bars()
in the qla2xxx driver. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Index: linux-merge/drivers/scsi/qla2xxx/qla_def.h
===================================================================
--- linux-merge.orig/drivers/scsi/qla2xxx/qla_def.h	2007-12-21 15:45:41.000000000 +1100
+++ linux-merge/drivers/scsi/qla2xxx/qla_def.h	2007-12-21 15:46:12.000000000 +1100
@@ -2272,6 +2272,7 @@ typedef struct scsi_qla_host {
 	spinlock_t		hardware_lock ____cacheline_aligned;
 
 	int		bars;
+	int		mem_only;
 	device_reg_t __iomem *iobase;		/* Base I/O address */
 	unsigned long	pio_address;
 	unsigned long	pio_length;
Index: linux-merge/drivers/scsi/qla2xxx/qla_os.c
===================================================================
--- linux-merge.orig/drivers/scsi/qla2xxx/qla_os.c	2007-12-21 15:46:10.000000000 +1100
+++ linux-merge/drivers/scsi/qla2xxx/qla_os.c	2007-12-21 15:46:12.000000000 +1100
@@ -1626,6 +1626,7 @@ qla2x00_probe_one(struct pci_dev *pdev, 
 	sprintf(ha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, ha->host_no);
 	ha->parent = NULL;
 	ha->bars = bars;
+	ha->mem_only = mem_only;
 
 	/* Set ISP-type information. */
 	qla2x00_set_isp_flags(ha);
@@ -2905,8 +2906,14 @@ qla2xxx_pci_slot_reset(struct pci_dev *p
 {
 	pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT;
 	scsi_qla_host_t *ha = pci_get_drvdata(pdev);
+	int rc;
 
-	if (pci_enable_device_bars(pdev, ha->bars)) {
+	if (ha->mem_only)
+		rc = pci_enable_device_mem(pdev);
+	else
+		rc = pci_enable_device(pdev);
+
+	if (rc) {
 		qla_printk(KERN_WARNING, ha,
 		    "Can't re-enable PCI device after reset.\n");
 



  parent reply	other threads:[~2007-12-21  4:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20  4:28 [PATCH 3/3] pci: Remove pci_enable_device_bars() Benjamin Herrenschmidt
2007-12-21  2:59 ` patch pci-remove-pci_enable_device_bars.patch added to gregkh-2.6 tree gregkh
2007-12-21  4:28 ` [PATCH 3/3] pci: Remove pci_enable_device_bars() Greg KH
2007-12-21  4:44   ` Benjamin Herrenschmidt
2007-12-21  4:47   ` Benjamin Herrenschmidt [this message]
2007-12-21  5:11     ` Greg KH
2007-12-21  5:32       ` Benjamin Herrenschmidt
2007-12-21 17:40         ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1198212448.6779.45.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=alan@redhat.com \
    --cc=bzolnier@gmail.com \
    --cc=greg@kroah.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=james.smart@emulex.com \
    --cc=linux-driver@qlogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.