diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2015-11-27 13:15:36 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-04-15 19:16:38 +0300 |
commit | 68dd13d6d58c145bbf6d295b8c430b4d38c943d9 (patch) | |
tree | 6bff4290da9b97b11f1cd6bc50fa660d5a28482c /drivers/s390/char/sclp_cmd.c | |
parent | 52c48c51e60c473ccedb4c8f428050041ca7076a (diff) | |
download | linux-68dd13d6d58c145bbf6d295b8c430b4d38c943d9.tar.xz |
s390/sclp: move pci related commands to separate file
sclp commands only used by the PCI code shouldn't be build for
!CONFIG_PCI. Instead of adding more ifdefs to sclp_cmd.c just
move them to a new file.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_cmd.c')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index d3947ea3e351..e3fc7539116b 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c @@ -576,67 +576,6 @@ __initcall(sclp_detect_standby_memory); #endif /* CONFIG_MEMORY_HOTPLUG */ /* - * PCI I/O adapter configuration related functions. - */ -#define SCLP_CMDW_CONFIGURE_PCI 0x001a0001 -#define SCLP_CMDW_DECONFIGURE_PCI 0x001b0001 - -#define SCLP_RECONFIG_PCI_ATPYE 2 - -struct pci_cfg_sccb { - struct sccb_header header; - u8 atype; /* adapter type */ - u8 reserved1; - u16 reserved2; - u32 aid; /* adapter identifier */ -} __packed; - -static int do_pci_configure(sclp_cmdw_t cmd, u32 fid) -{ - struct pci_cfg_sccb *sccb; - int rc; - - if (!SCLP_HAS_PCI_RECONFIG) - return -EOPNOTSUPP; - - sccb = (struct pci_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (!sccb) - return -ENOMEM; - - sccb->header.length = PAGE_SIZE; - sccb->atype = SCLP_RECONFIG_PCI_ATPYE; - sccb->aid = fid; - rc = sclp_sync_request(cmd, sccb); - if (rc) - goto out; - switch (sccb->header.response_code) { - case 0x0020: - case 0x0120: - break; - default: - pr_warn("configure PCI I/O adapter failed: cmd=0x%08x response=0x%04x\n", - cmd, sccb->header.response_code); - rc = -EIO; - break; - } -out: - free_page((unsigned long) sccb); - return rc; -} - -int sclp_pci_configure(u32 fid) -{ - return do_pci_configure(SCLP_CMDW_CONFIGURE_PCI, fid); -} -EXPORT_SYMBOL(sclp_pci_configure); - -int sclp_pci_deconfigure(u32 fid) -{ - return do_pci_configure(SCLP_CMDW_DECONFIGURE_PCI, fid); -} -EXPORT_SYMBOL(sclp_pci_deconfigure); - -/* * Channel path configuration related functions. */ |