diff options
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/fakephp.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_hpc.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 19 |
4 files changed, 7 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index 5317e4d7d96e..17d10e2e8fb6 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c | |||
@@ -135,7 +135,7 @@ static int __init init_legacy(void) | |||
135 | struct pci_dev *pdev = NULL; | 135 | struct pci_dev *pdev = NULL; |
136 | 136 | ||
137 | /* Add existing devices */ | 137 | /* Add existing devices */ |
138 | while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) | 138 | for_each_pci_dev(pdev) |
139 | legacy_add_slot(pdev); | 139 | legacy_add_slot(pdev); |
140 | 140 | ||
141 | /* Be alerted of any new ones */ | 141 | /* Be alerted of any new ones */ |
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 2fce726758d2..a4031dfe938e 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -137,7 +137,7 @@ int pciehp_unconfigure_device(struct slot *p_slot) | |||
137 | "Cannot remove display device %s\n", | 137 | "Cannot remove display device %s\n", |
138 | pci_name(temp)); | 138 | pci_name(temp)); |
139 | pci_dev_put(temp); | 139 | pci_dev_put(temp); |
140 | rc = EINVAL; | 140 | rc = -EINVAL; |
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | } | 143 | } |
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 5f5e8d2e3552..d3985e7deab7 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c | |||
@@ -113,7 +113,7 @@ | |||
113 | #define CON_PFAULT_INTR_MASK (1 << 28) | 113 | #define CON_PFAULT_INTR_MASK (1 << 28) |
114 | #define MRL_CHANGE_SERR_MASK (1 << 29) | 114 | #define MRL_CHANGE_SERR_MASK (1 << 29) |
115 | #define CON_PFAULT_SERR_MASK (1 << 30) | 115 | #define CON_PFAULT_SERR_MASK (1 << 30) |
116 | #define SLOT_REG_RSVDZ_MASK (1 << 15) | (7 << 21) | 116 | #define SLOT_REG_RSVDZ_MASK ((1 << 15) | (7 << 21)) |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * SHPC Command Code definitnions | 119 | * SHPC Command Code definitnions |
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index 8c3d3219f227..a2ccfcd3c298 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -60,12 +60,6 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
60 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, fn)); | 60 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, fn)); |
61 | if (!dev) | 61 | if (!dev) |
62 | continue; | 62 | continue; |
63 | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { | ||
64 | ctrl_err(ctrl, "Cannot hot-add display device %s\n", | ||
65 | pci_name(dev)); | ||
66 | pci_dev_put(dev); | ||
67 | continue; | ||
68 | } | ||
69 | if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || | 63 | if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || |
70 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { | 64 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { |
71 | /* Find an unused bus number for the new bridge */ | 65 | /* Find an unused bus number for the new bridge */ |
@@ -114,17 +108,11 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
114 | ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", | 108 | ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", |
115 | __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); | 109 | __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); |
116 | 110 | ||
117 | for (j=0; j<8 ; j++) { | 111 | for (j = 0; j < 8 ; j++) { |
118 | struct pci_dev* temp = pci_get_slot(parent, | 112 | struct pci_dev *temp = pci_get_slot(parent, |
119 | (p_slot->device << 3) | j); | 113 | (p_slot->device << 3) | j); |
120 | if (!temp) | 114 | if (!temp) |
121 | continue; | 115 | continue; |
122 | if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) { | ||
123 | ctrl_err(ctrl, "Cannot remove display device %s\n", | ||
124 | pci_name(temp)); | ||
125 | pci_dev_put(temp); | ||
126 | continue; | ||
127 | } | ||
128 | if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { | 116 | if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { |
129 | pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); | 117 | pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); |
130 | if (bctl & PCI_BRIDGE_CTL_VGA) { | 118 | if (bctl & PCI_BRIDGE_CTL_VGA) { |
@@ -132,7 +120,8 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
132 | "Cannot remove display device %s\n", | 120 | "Cannot remove display device %s\n", |
133 | pci_name(temp)); | 121 | pci_name(temp)); |
134 | pci_dev_put(temp); | 122 | pci_dev_put(temp); |
135 | continue; | 123 | rc = -EINVAL; |
124 | break; | ||
136 | } | 125 | } |
137 | } | 126 | } |
138 | pci_remove_bus_device(temp); | 127 | pci_remove_bus_device(temp); |