summaryrefslogtreecommitdiffstats
path: root/drivers/misc/genwqe/card_base.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-31GenWQE: Change default access rights for device nodeFrank Haverkamp1-0/+15
Since it should always be ok for normal users to operate the accelerator, it makes sense to change it in our driver, rather than adding udev rules for all Linux distributions. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-21GenWQE: Use pci_(request|release)_mem_regionsJohannes Thumshirn1-11/+7
Now that we do have pci_request_mem_regions() and pci_release_mem_regions() at hand, use it in the genwqe driver. [bhelgaas: fix build issues] Suggested-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de> CC: Frank Haverkamp <haver@linux.vnet.ibm.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23GenWQE: Fix checkpatch complaintsFrank Haverkamp1-9/+9
The checkpatch.pl script got improved. I ran it on the latest GenWQE sources and fixed what it complained about. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23GenWQE: Check return code of pci_sriov_enableFrank Haverkamp1-1/+4
Forgetting to check this, can lead to problems on systems which do not support SRIOV. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23GenWQE: Update author informationFrank Haverkamp1-2/+2
Updated email address of co-author. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Michael Jung <mijung@gmx.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23GenWQE: Remove sysfs entry for driver versionFrank Haverkamp1-1/+1
A special sysfs entry to display the driver version is not needed. We left the driver version and adjusted it to the naming a lot of other drivers use. The information can be retrieved by using modinfo genwqe_card. modinfo genwqe_card will provide the same information. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23GenWQE: Check pci_get_totalvfs return codeFrank Haverkamp1-1/+8
Currently the driver is using the pci_get_totalvfs() return code directly in a loop. To avoid problems with potentially negative returns in case of errors, we are adding some more sanity checking code. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18misc: remove DEFINE_PCI_DEVICE_TABLE usageGreg Kroah-Hartman1-1/+1
Removes DEFINE_PCI_DEVICE_TABLE from drivers/misc/genwqe/card_base.c, drivers/misc/genwqe/card_base.c, and drivers/misc/vmw_vmci/vmci_guest.c in preferance of a "real" structure definition. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10GenWQE: Remove unnecessary includeKleber Sacilotto de Souza1-1/+0
The include for the UAPI header file from card_base.c can be removed since it's already included on card_base.h. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09GenWQE: Improve hardware error recoveryKleber Sacilotto de Souza1-0/+45
Currently, in the event of a fatal hardware error, the driver tries a recovery procedure that calls pci_reset_function() to reset the card. This is not sufficient in some cases, needing a fundamental reset to bring the card back. This patch implements a call to the platform fundamental reset procedure on the error recovery path if GENWQE_PLATFORM_ERROR_RECOVERY is enabled. This is implemented by default only on PPC64, since this can cause problems on other archs, e.g. zSeries, where the platform has its own recovery procedures, leading to a potencial race conditition. For these cases, the recovery is kept as it was before. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09GenWQE: Add support for EEH error recoveryKleber Sacilotto de Souza1-13/+66
This patch implements the callbacks and functions necessary to have EEH recovery support. It adds a config option to enable or disable explicit calls to trigger platform specific mechanisms on error recovery paths. This option is enabled by default only on PPC64 systems and can be overritten via debugfs. If this option is enabled, on the error recovery path the driver will call pci_channel_offline() to check for error condition and issue non-raw MMIO reads to trigger early EEH detection in case of hardware failures. This is necessary since the driver MMIO helper funtions use raw accessors. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09GenWQE: Add sysfs interface for bitstream reloadKleber Sacilotto de Souza1-0/+90
This patch adds an interface on sysfs for userspace to request a card bitstream reload. It sets the appropriate register and try to perform a fundamental reset on the PCIe slot for the card to reload the bitstream from the chosen partition. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-18GenWQE PCI support, health monitoring and recoveryFrank Haverkamp1-0/+1205
Module initialization and PCIe setup. Card health monitoring and recovery functionality. Character device creation and deletion are controlled from here. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>