提交 4e4d035a 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

s390/pci: remove disable_device implementation

pci_disable_device is called by a driver after it stops using the pci
function - e.g. during the removal of the driver. The current
implementation removes the architecture specific information of this
function such that even after a call to pci_enable_device the pci
function is no longer usable. Just remove pcibios_disable_device.
Reviewed-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 89b0dc95
......@@ -600,19 +600,6 @@ static void zpci_map_resources(struct zpci_dev *zdev)
}
};
static void zpci_unmap_resources(struct pci_dev *pdev)
{
resource_size_t len;
int i;
for (i = 0; i < PCI_BAR_COUNT; i++) {
len = pci_resource_len(pdev, i);
if (!len)
continue;
pci_iounmap(pdev, (void *) pdev->resource[i].start);
}
};
struct zpci_dev *zpci_alloc_device(void)
{
struct zpci_dev *zdev;
......@@ -640,21 +627,6 @@ void zpci_free_device(struct zpci_dev *zdev)
kfree(zdev);
}
/* Called on removal of pci_dev, leaves zpci and bus device */
static void zpci_remove_device(struct pci_dev *pdev)
{
struct zpci_dev *zdev = get_zdev(pdev);
dev_info(&pdev->dev, "Removing device %u\n", zdev->domain);
zdev->state = ZPCI_FN_STATE_CONFIGURED;
zpci_dma_exit_device(zdev);
zpci_fmb_disable_device(zdev);
zpci_sysfs_remove_device(&pdev->dev);
zpci_unmap_resources(pdev);
list_del(&zdev->entry); /* can be called from init */
zdev->pdev = NULL;
}
static void zpci_scan_devices(void)
{
struct zpci_dev *zdev;
......@@ -692,12 +664,6 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask)
return 0;
}
void pcibios_disable_device(struct pci_dev *pdev)
{
zpci_remove_device(pdev);
pdev->sysdata = NULL;
}
int pcibios_add_platform_entries(struct pci_dev *pdev)
{
return zpci_sysfs_add_device(&pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册