Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314577
b: refs/heads/master
c: ed3b856
h: refs/heads/master
i:
  314575: d4f6418
v: v3
  • Loading branch information
Santosh Nayak authored and David S. Miller committed Jun 25, 2012
1 parent cd4bfd7 commit 293ee87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8140b2fa09cceb947ac1ac49e0958eb137d0648
refs/heads/master: ed3b856b69a7f3748d6917e42d462c962aaa39b8
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ netxen_nic_get_pauseparam(struct net_device *dev,
break;
}
} else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) {
if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS))
return;
pause->rx_pause = 1;
val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL);
Expand Down Expand Up @@ -577,7 +577,7 @@ netxen_nic_set_pauseparam(struct net_device *dev,
}
NXWR32(adapter, NETXEN_NIU_GB_PAUSE_CTL, val);
} else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) {
if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
if ((port < 0) || (port >= NETXEN_NIU_MAX_XG_PORTS))
return -EIO;
val = NXRD32(adapter, NETXEN_NIU_XG_PAUSE_CTL);
if (port == 0) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static int netxen_niu_disable_xg_port(struct netxen_adapter *adapter)
if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
return 0;

if (port > NETXEN_NIU_MAX_XG_PORTS)
if (port >= NETXEN_NIU_MAX_XG_PORTS)
return -EINVAL;

mac_cfg = 0;
Expand All @@ -392,7 +392,7 @@ static int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode)
u32 port = adapter->physical_port;
u16 board_type = adapter->ahw.board_type;

if (port > NETXEN_NIU_MAX_XG_PORTS)
if (port >= NETXEN_NIU_MAX_XG_PORTS)
return -EINVAL;

mac_cfg = NXRD32(adapter, NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port));
Expand Down

0 comments on commit 293ee87

Please sign in to comment.