aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/s390_pci_hpc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/s390_pci_hpc.c b/drivers/pci/hotplug/s390_pci_hpc.c
index 7db249a25016..46a7b738f61f 100644
--- a/drivers/pci/hotplug/s390_pci_hpc.c
+++ b/drivers/pci/hotplug/s390_pci_hpc.c
@@ -16,6 +16,7 @@
16#include <linux/pci.h> 16#include <linux/pci.h>
17#include <linux/pci_hotplug.h> 17#include <linux/pci_hotplug.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <asm/pci_debug.h>
19#include <asm/sclp.h> 20#include <asm/sclp.h>
20 21
21#define SLOT_NAME_SIZE 10 22#define SLOT_NAME_SIZE 10
@@ -49,6 +50,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
49 return -EIO; 50 return -EIO;
50 51
51 rc = sclp_pci_configure(slot->zdev->fid); 52 rc = sclp_pci_configure(slot->zdev->fid);
53 zpci_dbg(3, "conf fid:%x, rc:%d\n", slot->zdev->fid, rc);
52 if (!rc) { 54 if (!rc) {
53 slot->zdev->state = ZPCI_FN_STATE_CONFIGURED; 55 slot->zdev->state = ZPCI_FN_STATE_CONFIGURED;
54 /* automatically scan the device after is was configured */ 56 /* automatically scan the device after is was configured */
@@ -66,16 +68,16 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
66 if (!zpci_fn_configured(slot->zdev->state)) 68 if (!zpci_fn_configured(slot->zdev->state))
67 return -EIO; 69 return -EIO;
68 70
71 rc = zpci_disable_device(slot->zdev);
72 if (rc)
73 return rc;
69 /* TODO: we rely on the user to unbind/remove the device, is that plausible 74 /* TODO: we rely on the user to unbind/remove the device, is that plausible
70 * or do we need to trigger that here? 75 * or do we need to trigger that here?
71 */ 76 */
72 rc = sclp_pci_deconfigure(slot->zdev->fid); 77 rc = sclp_pci_deconfigure(slot->zdev->fid);
73 if (!rc) { 78 zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, rc);
74 /* Fixme: better call List-PCI to find the disabled FH 79 if (!rc)
75 for the FID since the FH should be opaque... */
76 slot->zdev->fh &= 0x7fffffff;
77 slot->zdev->state = ZPCI_FN_STATE_STANDBY; 80 slot->zdev->state = ZPCI_FN_STATE_STANDBY;
78 }
79 return rc; 81 return rc;
80} 82}
81 83