]> www.infradead.org Git - users/jedix/linux-maple.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)
committerManjunath Govindashetty <manjunath.govindashetty@oracle.com>
Fri, 16 Oct 2015 00:08:10 +0000 (17:08 -0700)
commit9d1df0d7ecba4d8c0d71d958dd8aa3d123b1ab4a
treee4fa2da04d8d0e4a1392a3facfc5d8e10940fa61
parent6f223f0e0df5c8795b4011b737821312deade392
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>
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
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