Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290150
b: refs/heads/master
c: afa13b4
h: refs/heads/master
v: v3
  • Loading branch information
Mintz Yuval authored and David S. Miller committed Feb 15, 2012
1 parent e41e08f commit 36319c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 817a8aa8cfa1ebfb7bf27afb53ebb1ec3d49b564
refs/heads/master: afa13b4b94bc4b3247fa46dd8698c8dbfe1a615c
13 changes: 11 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,14 +2016,22 @@ static int bnx2x_test_nvram(struct bnx2x *bp)
{ 0x708, 0x70 }, /* manuf_key_info */
{ 0, 0 }
};
__be32 buf[0x350 / 4];
u8 *data = (u8 *)buf;
__be32 *buf;
u8 *data;
int i, rc;
u32 magic, crc;

if (BP_NOMCP(bp))
return 0;

buf = kmalloc(0x350, GFP_KERNEL);
if (!buf) {
DP(NETIF_MSG_PROBE, "kmalloc failed\n");
rc = -ENOMEM;
goto test_nvram_exit;
}
data = (u8 *)buf;

rc = bnx2x_nvram_read(bp, 0, data, 4);
if (rc) {
DP(NETIF_MSG_PROBE, "magic value read (rc %d)\n", rc);
Expand Down Expand Up @@ -2057,6 +2065,7 @@ static int bnx2x_test_nvram(struct bnx2x *bp)
}

test_nvram_exit:
kfree(buf);
return rc;
}

Expand Down

0 comments on commit 36319c7

Please sign in to comment.