Re: [PATCH 3/3] pci: Remove pci_enable_device_bars()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

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");
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux