]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd
authorSomnath Kotur <somnath.kotur@emulex.com>
Mon, 12 Oct 2015 07:47:20 +0000 (03:47 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2015 11:32:44 +0000 (04:32 -0700)
commit72ef3a88fa8e225301aaea296ffc95407de21986
tree910c1b04e5576344be97dee2d27a8aa10a118cd2
parent8227e9901ded28d071f20313238e91e71d6bfdce
be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd

The FW requires the pf_num field in the cmd hdr to be set for it to return
the specific function's descriptors in the GET_PROFILE_CONFIG cmd. If not
set, the FW returns the descriptors of all the functions on the device.
If the first descriptor is not what is being queried for, the driver will
read wrong data. This patch fixes this issue by using the GET_CNTL_ATTRIB
cmd to query the real pci_func_num of a function and then uses it in the
GET_PROFILE_CONFIG cmd.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_main.c