Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53475
b: refs/heads/master
c: dad3e45
h: refs/heads/master
i:
  53473: 89f026f
  53471: 41e6b32
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed May 3, 2007
1 parent 2be9213 commit 2ce606c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 427c2196b92697a4a8ee87959ebc16bfac024f6b
refs/heads/master: dad3e452dacd3c6c637e2f7c6469556cc8ffcd94
6 changes: 6 additions & 0 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5562,6 +5562,9 @@ bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
case SIOCGMIIREG: {
u32 mii_regval;

if (!netif_running(dev))
return -EAGAIN;

spin_lock_bh(&bp->phy_lock);
err = bnx2_read_phy(bp, data->reg_num & 0x1f, &mii_regval);
spin_unlock_bh(&bp->phy_lock);
Expand All @@ -5575,6 +5578,9 @@ bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (!capable(CAP_NET_ADMIN))
return -EPERM;

if (!netif_running(dev))
return -EAGAIN;

spin_lock_bh(&bp->phy_lock);
err = bnx2_write_phy(bp, data->reg_num & 0x1f, data->val_in);
spin_unlock_bh(&bp->phy_lock);
Expand Down

0 comments on commit 2ce606c

Please sign in to comment.