1
0
Fork 0
Commit Graph

13 Commits (7a53eea1f7b527fd3b6d7ca992914840981afe99)

Author SHA1 Message Date
Frank Haverkamp 5ed22cebba GenWQE: Change default access rights for device node
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-08-31 14:22:49 +02:00
Johannes Thumshirn f03774bdcf GenWQE: Use pci_(request|release)_mem_regions
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>
2016-06-21 17:11:09 -05:00
Frank Haverkamp d9c11d45b3 GenWQE: Fix checkpatch complaints
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-23 23:15:47 -07:00
Frank Haverkamp bc407dd319 GenWQE: Check return code of pci_sriov_enable
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-23 23:15:46 -07:00
Frank Haverkamp 26d8f6f151 GenWQE: Update author information
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-23 23:15:46 -07:00
Frank Haverkamp 64df2ec510 GenWQE: Remove sysfs entry for driver version
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-23 23:15:46 -07:00
Frank Haverkamp 95a8825c9c GenWQE: Check pci_get_totalvfs return code
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-09-23 23:15:46 -07:00
Greg Kroah-Hartman 32182cd39d misc: remove DEFINE_PCI_DEVICE_TABLE usage
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-18 16:54:23 -07:00
Kleber Sacilotto de Souza 5b35b20d4e GenWQE: Remove unnecessary include
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-10 15:22:13 -07:00
Kleber Sacilotto de Souza 93b772b25f GenWQE: Improve hardware error recovery
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-09 14:14:27 -07:00
Kleber Sacilotto de Souza fb145456fa GenWQE: Add support for EEH error recovery
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-09 14:14:27 -07:00
Kleber Sacilotto de Souza c1f732ad76 GenWQE: Add sysfs interface for bitstream reload
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>
2014-07-09 14:14:27 -07:00
Frank Haverkamp 12eb468325 GenWQE PCI support, health monitoring and recovery
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>
2013-12-18 16:51:15 -08:00