Page MenuHomeFreeBSD

Adjust t4_port_init() to work with VF devices.
ClosedPublic

Authored by jhb on Aug 15 2016, 8:05 PM.

Details

Summary

Adjust t4_port_init() to work with VF devices.

Specifically, the FW_PORT_CMD may or may not work for a VF (the PF
driver can choose whether or not to permit access to this command),
so don't attempt to fetch port information on a VF if permission is
denied by the PF.

Test Plan
  • tested with both VF and PF devices in the VF branch

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb retitled this revision from to Adjust t4_port_init() to work with VF devices..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: np.
sys/dev/cxgbe/common/t4_hw.c
7945 ↗(On Diff #19306)

p->tx_chan is being used before it has been initialized.

sys/dev/cxgbe/common/t4_hw.c
7945 ↗(On Diff #19306)

Oops, I'll revert that back to 'j'. I had originally moved this below t4_alloc_vi() but had to move it back and this is leftover from that.

np edited edge metadata.

pi->tx_chan/j was the only comment I had, rest looks good.

This revision is now accepted and ready to land.Aug 17 2016, 12:06 AM
This revision was automatically updated to reflect the committed changes.