1
0
Fork 0
alistair23-linux/drivers/misc/ocxl
Christophe Lombard 6f8e45f7eb ocxl: Fix access to the AFU Descriptor Data
The AFU Information DVSEC capability is a means to extract common,
general information about all of the AFUs associated with a Function
independent of the specific functionality that each AFU provides.
Write in the AFU Index field allows to access to the descriptor data
for each AFU.

With the current code, we are not able to access to these specific data
when the index >= 1 because we are writing to the wrong location.
All requests to the data of each AFU are pointing to those of the AFU 0,
which could have impacts when using a card with more than one AFU per
function.

This patch fixes the access to the AFU Descriptor Data indexed by the
AFU Info Index field.

Fixes: 5ef3166e8a ("ocxl: Driver code for 'generic' opencapi devices")
Cc: stable <stable@vger.kernel.org>     # 4.16
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>

Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-09-19 21:58:09 +10:00
..
Kconfig ocxl: Add Makefile and Kconfig 2018-01-24 11:42:59 +11:00
Makefile ocxl: Add Makefile and Kconfig 2018-01-24 11:42:59 +11:00
afu_irq.c ocxl: Add trace points 2018-01-24 11:42:59 +11:00
config.c ocxl: Fix access to the AFU Descriptor Data 2018-09-19 21:58:09 +10:00
context.c ocxl: Change return type for fault handler 2018-07-02 23:54:26 +10:00
file.c ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait() 2018-06-05 21:33:57 +10:00
link.c Merge branch 'akpm' (patches from Andrew) 2018-08-17 16:49:31 -07:00
main.c ocxl: Driver code for 'generic' opencapi devices 2018-01-24 11:42:58 +11:00
ocxl_internal.h ocxl: Expose the thread_id needed for wait on POWER9 2018-06-03 20:40:32 +10:00
pasid.c ocxl: Driver code for 'generic' opencapi devices 2018-01-24 11:42:58 +11:00
pci.c misc: ocxl: use put_device() instead of device_unregister() 2018-03-15 18:12:01 +01:00
sysfs.c ocxl: Change return type for fault handler 2018-07-02 23:54:26 +10:00
trace.c ocxl: Add trace points 2018-01-24 11:42:59 +11:00
trace.h ocxl: Add trace points 2018-01-24 11:42:59 +11:00