]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Fix fastpath structures when memory allocation fails
authorYuval Mintz <yuvalmin@broadcom.com>
Thu, 10 Jan 2013 04:53:39 +0000 (04:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jan 2013 22:28:26 +0000 (14:28 -0800)
commit500c4e6a1070de9e3849bf70b01232b0ee18c49b
tree7ab6929cdf81cb85c5df04285b096b1aed6cb460
parentda7f48c65b46277f1151945a0c39a1f341c9cdc2
bnx2x: Fix fastpath structures when memory allocation fails

When allocating Tx queues, if for some reason
(e.g., lack of memory) allocation fails, driver will incorrectly
calculate the pointers of the various queues.

This patch repositions all pointers in such a case to point at
sequential structures in memory, allowing the bnx2x macros to
be used correctly when accessing them.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c