[PATCH V2] ocxl: Fix access to the AFU Descriptor Data
Frederic Barrat
fbarrat at linux.ibm.com
Tue Aug 14 00:50:05 AEST 2018
Le 13/08/2018 à 16:09, Christophe Lombard a écrit :
> 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.
>
> This patch fixes the access to the AFU Descriptor Data indexed by the
> AFU Info Index field.
>
> Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices")
> Cc: stable <stable at vger.kernel.org> # 4.16
> Signed-off-by: Christophe Lombard <clombard at linux.vnet.ibm.com>
> ---
Thanks!
Acked-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Changelog[v2]
> - Rebase to latest upstream.
> - Use pci_write_config_byte instead of pci_write_config_word
> ---
> drivers/misc/ocxl/config.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c
> index 2e30de9..57a6bb1 100644
> --- a/drivers/misc/ocxl/config.c
> +++ b/drivers/misc/ocxl/config.c
> @@ -280,7 +280,9 @@ int ocxl_config_check_afu_index(struct pci_dev *dev,
> u32 val;
> int rc, templ_major, templ_minor, len;
>
> - pci_write_config_word(dev, fn->dvsec_afu_info_pos, afu_idx);
> + pci_write_config_byte(dev,
> + fn->dvsec_afu_info_pos + OCXL_DVSEC_AFU_INFO_AFU_IDX,
> + afu_idx);
> rc = read_afu_info(dev, fn, OCXL_DVSEC_TEMPL_VERSION, &val);
> if (rc)
> return rc;
>
More information about the Linuxppc-dev
mailing list