qed: Utilize resource-lock based scheme
authorTomer Tayar <Tomer.Tayar@cavium.com>
Tue, 28 Mar 2017 12:12:55 +0000 (15:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Mar 2017 01:05:24 +0000 (18:05 -0700)
commit9c8517c40f6873d5fcdfa0eafdf28c5a921d600b
tree5b333f17894f0e72a0b17c9ad025e2e2da771fec
parent95691c9cea3b14778bf699dcc1563cdc0c441105
qed: Utilize resource-lock based scheme

Management firmware is used as an arbiter between the various PFs
in matters of resources, but some of the resources that need to
be divided are dependent on the non-management firmware used,
so management firmware first needs to be told how many resources
there are before trying to divide them.

As part of the initialization sequence, driver would first inform
the management firmware of the available resources under
a dedicated resource lock, and afterwards request for various
resources which might be based on the previous set values.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed.h
drivers/net/ethernet/qlogic/qed/qed_dev.c
drivers/net/ethernet/qlogic/qed/qed_dev_api.h
drivers/net/ethernet/qlogic/qed/qed_hsi.h
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_mcp.h