Commit 34e0f2c2 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'bnx2x-fixes'



Yuval Mintz says:

====================
bnx2x: fixes series

Two unrelated fixes for bnx2x - the first one is nice-to-have,
while the other fixes fatal behaviour in older adapters.

Please consider applying them to `net'.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9a53682b 360d9df2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1872,8 +1872,16 @@ static void bnx2x_get_ringparam(struct net_device *dev,

	ering->rx_max_pending = MAX_RX_AVAIL;

	/* If size isn't already set, we give an estimation of the number
	 * of buffers we'll have. We're neglecting some possible conditions
	 * [we couldn't know for certain at this point if number of queues
	 * might shrink] but the number would be correct for the likely
	 * scenario.
	 */
	if (bp->rx_ring_size)
		ering->rx_pending = bp->rx_ring_size;
	else if (BNX2X_NUM_RX_QUEUES(bp))
		ering->rx_pending = MAX_RX_AVAIL / BNX2X_NUM_RX_QUEUES(bp);
	else
		ering->rx_pending = MAX_RX_AVAIL;

+2 −2
Original line number Diff line number Diff line
@@ -10138,7 +10138,7 @@ static void __bnx2x_add_udp_port(struct bnx2x *bp, u16 port,
{
	struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type];

	if (!netif_running(bp->dev) || !IS_PF(bp))
	if (!netif_running(bp->dev) || !IS_PF(bp) || CHIP_IS_E1x(bp))
		return;

	if (udp_port->count && udp_port->dst_port == port) {
@@ -10163,7 +10163,7 @@ static void __bnx2x_del_udp_port(struct bnx2x *bp, u16 port,
{
	struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type];

	if (!IS_PF(bp))
	if (!IS_PF(bp) || CHIP_IS_E1x(bp))
		return;

	if (!udp_port->count || udp_port->dst_port != port) {