- pci-move-pci_fixup_device-and-is_enabled.patch removed from -mm tree

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

 



The patch titled
     PCI: move pci_fixup_device and is_enabled
has been removed from the -mm tree.  Its filename was
     pci-move-pci_fixup_device-and-is_enabled.patch

This patch was dropped because Greg merged other stuff which broke these patches

------------------------------------------------------
Subject: PCI: move pci_fixup_device and is_enabled
From: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>

Add the following changes into generic PCI code especially for PCI legacy I/O
port free drivers.

    - Moved the following two things from pci_enable_device() into
      pci_enable_device_bars(). Already some drivers are using
      pci_enable_device_bars() to enable only the specific regions,
      but they had no chance to be fixup and to up is_enabled flag.

          o Call pci_fixup_device() on the device
          o Checking & Setting dev->is_enabled

    - Trivial cleanup

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/pci/pci.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff -puN drivers/pci/pci.c~pci-move-pci_fixup_device-and-is_enabled drivers/pci/pci.c
--- a/drivers/pci/pci.c~pci-move-pci_fixup_device-and-is_enabled
+++ a/drivers/pci/pci.c
@@ -602,12 +602,18 @@ pci_enable_device_bars(struct pci_dev *d
 {
 	int err;
 
+	if (dev->is_enabled)
+		return 0;
+
 	err = pci_set_power_state(dev, PCI_D0);
 	if (err < 0 && err != -EIO)
 		return err;
 	err = pcibios_enable_device(dev, bars);
 	if (err < 0)
 		return err;
+
+	pci_fixup_device(pci_fixup_enable, dev);
+	dev->is_enabled = 1;
 	return 0;
 }
 
@@ -622,17 +628,7 @@ pci_enable_device_bars(struct pci_dev *d
 int
 pci_enable_device(struct pci_dev *dev)
 {
-	int err;
-
-	if (dev->is_enabled)
-		return 0;
-
-	err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
-	if (err)
-		return err;
-	pci_fixup_device(pci_fixup_enable, dev);
-	dev->is_enabled = 1;
-	return 0;
+	return pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
 }
 
 /**
@@ -781,7 +777,7 @@ int pci_request_region(struct pci_dev *p
 {
 	if (pci_resource_len(pdev, bar) == 0)
 		return 0;
-		
+
 	if (pci_resource_flags(pdev, bar) & IORESOURCE_IO) {
 		if (!request_region(pci_resource_start(pdev, bar),
 			    pci_resource_len(pdev, bar), res_name))
_

Patches currently in -mm which might be from seto.hidetoshi@xxxxxxxxxxxxxx are

pci-move-pci_fixup_device-and-is_enabled.patch
pci-add-selected_regions-funcs.patch
e1000-make-intel-e1000-driver-legacy-i-o-port-free.patch
lpfc-make-emulex-lpfc-driver-legacy-i-o-port-free.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux