From 8a7f92ad01d06e47d6c23c04c3da48e80041aef9 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Tue, 16 Apr 2013 14:12:17 +0200 Subject: [PATCH] --- yaml --- r: 362797 b: refs/heads/master c: cb65a669f62ecca123cf4f6998903ee628c59caf h: refs/heads/master i: 362795: 6a5350488b2979e0f7918edd96837cf9c6b07dff v: v3 --- [refs] | 2 +- trunk/arch/s390/include/asm/pci.h | 1 + trunk/arch/s390/pci/pci.c | 7 +++++++ trunk/drivers/pci/hotplug/s390_pci_hpc.c | 9 ++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b2ef4d24929d..53d7be74fde5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a2ab833360abbed3321fd694b69a5a32ee15785f +refs/heads/master: cb65a669f62ecca123cf4f6998903ee628c59caf diff --git a/trunk/arch/s390/include/asm/pci.h b/trunk/arch/s390/include/asm/pci.h index 05333b7f0469..6c1801235db9 100644 --- a/trunk/arch/s390/include/asm/pci.h +++ b/trunk/arch/s390/include/asm/pci.h @@ -140,6 +140,7 @@ static inline bool zdev_enabled(struct zpci_dev *zdev) struct zpci_dev *zpci_alloc_device(void); int zpci_create_device(struct zpci_dev *); int zpci_enable_device(struct zpci_dev *); +int zpci_disable_device(struct zpci_dev *); void zpci_stop_device(struct zpci_dev *); void zpci_free_device(struct zpci_dev *); int zpci_scan_device(struct zpci_dev *); diff --git a/trunk/arch/s390/pci/pci.c b/trunk/arch/s390/pci/pci.c index 20823f022925..24dcf059f061 100644 --- a/trunk/arch/s390/pci/pci.c +++ b/trunk/arch/s390/pci/pci.c @@ -955,6 +955,13 @@ int zpci_enable_device(struct zpci_dev *zdev) } EXPORT_SYMBOL_GPL(zpci_enable_device); +int zpci_disable_device(struct zpci_dev *zdev) +{ + zpci_dma_exit_device(zdev); + return clp_disable_fh(zdev); +} +EXPORT_SYMBOL_GPL(zpci_disable_device); + int zpci_create_device(struct zpci_dev *zdev) { int rc; diff --git a/trunk/drivers/pci/hotplug/s390_pci_hpc.c b/trunk/drivers/pci/hotplug/s390_pci_hpc.c index 6053e7221b51..46a7b738f61f 100644 --- a/trunk/drivers/pci/hotplug/s390_pci_hpc.c +++ b/trunk/drivers/pci/hotplug/s390_pci_hpc.c @@ -68,17 +68,16 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) if (!zpci_fn_configured(slot->zdev->state)) return -EIO; + rc = zpci_disable_device(slot->zdev); + if (rc) + return rc; /* TODO: we rely on the user to unbind/remove the device, is that plausible * or do we need to trigger that here? */ rc = sclp_pci_deconfigure(slot->zdev->fid); zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, rc); - if (!rc) { - /* Fixme: better call List-PCI to find the disabled FH - for the FID since the FH should be opaque... */ - slot->zdev->fh &= 0x7fffffff; + if (!rc) slot->zdev->state = ZPCI_FN_STATE_STANDBY; - } return rc; }