Source
x
* genwqe_pci_fundamental_reset() - trigger a PCIe fundamental reset on the slot
/**
* IBM Accelerator Family 'GenWQE'
*
* (C) Copyright IBM Corp. 2013
*
* Author: Frank Haverkamp <haver@linux.vnet.ibm.com>
* Author: Joerg-Stephan Vogt <jsvogt@de.ibm.com>
* Author: Michael Jung <mijung@gmx.net>
* Author: Michael Ruettger <michael@ibmra.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2 only)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Module initialization and PCIe setup. Card health monitoring and
* recovery functionality. Character device creation and deletion are
* controlled from here.
*/
MODULE_AUTHOR("Frank Haverkamp <haver@linux.vnet.ibm.com>");
MODULE_AUTHOR("Michael Ruettger <michael@ibmra.de>");
MODULE_AUTHOR("Joerg-Stephan Vogt <jsvogt@de.ibm.com>");
MODULE_AUTHOR("Michael Jung <mijung@gmx.net>");
MODULE_DESCRIPTION("GenWQE Card");
MODULE_VERSION(DRV_VERSION);
MODULE_LICENSE("GPL");
static char genwqe_driver_name[] = GENWQE_DEVNAME;
static struct class *class_genwqe;
static struct dentry *debugfs_genwqe;
static struct genwqe_dev *genwqe_devices[GENWQE_CARD_NO_MAX];
/* PCI structure for identifying device by PCI vendor and device ID */
static const struct pci_device_id genwqe_device_table[] = {
{ .vendor = PCI_VENDOR_ID_IBM,
.device = PCI_DEVICE_GENWQE,
.subvendor = PCI_SUBVENDOR_ID_IBM,
.subdevice = PCI_SUBSYSTEM_ID_GENWQE5,
.class = (PCI_CLASSCODE_GENWQE5 << 8),
.class_mask = ~0,
.driver_data = 0 },
/* Initial SR-IOV bring-up image */
{ .vendor = PCI_VENDOR_ID_IBM,
.device = PCI_DEVICE_GENWQE,
.subvendor = PCI_SUBVENDOR_ID_IBM_SRIOV,
.subdevice = PCI_SUBSYSTEM_ID_GENWQE5_SRIOV,
.class = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
.class_mask = ~0,
.driver_data = 0 },
{ .vendor = PCI_VENDOR_ID_IBM, /* VF Vendor ID */
.device = 0x0000, /* VF Device ID */
.subvendor = PCI_SUBVENDOR_ID_IBM_SRIOV,
.subdevice = PCI_SUBSYSTEM_ID_GENWQE5_SRIOV,
.class = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
.class_mask = ~0,
.driver_data = 0 },
/* Fixed up image */
{ .vendor = PCI_VENDOR_ID_IBM,
.device = PCI_DEVICE_GENWQE,
.subvendor = PCI_SUBVENDOR_ID_IBM_SRIOV,
.subdevice = PCI_SUBSYSTEM_ID_GENWQE5,
.class = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
.class_mask = ~0,
.driver_data = 0 },