]> git.baikalelectronics.ru Git - kernel.git/commit
qed: Don't allocate SBs using main PTT
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Mon, 20 Feb 2017 20:43:38 +0000 (22:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 22:11:54 +0000 (17:11 -0500)
commitd52d9247373e43c93013454d94a42ee9fecc3b2d
treee3194d9387b34055cd809dc412b194f460f8c049
parentb6641125b4345b37f2dc6f74d789a002f74c2af9
qed: Don't allocate SBs using main PTT

Flows accessing registers require the flow to hold a PTT entry.
To protect 'major' load/unload flows a main_ptt is pre-allocated
to guarantee such flows wouldn't be blocked by PTT being
unavailable.

Status block initialization currently uses the main_ptt which
is incorrect, as this flow might run concurrently to others
[E.g., loading qedr while toggling qede]. That would have dire
effects as it means registers' access to device breaks and further
read/writes might access incorrect addresses.

Instead, when initializing status blocks acquire/release a PTT
as part of the flow.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c