From 65a76b0d036b38afdbc4dc48b3d6bcc4e52bac4c Mon Sep 17 00:00:00 2001 From: Ariel Elior Date: Sun, 13 Nov 2011 04:34:31 +0000 Subject: [PATCH] --- yaml --- r: 277519 b: refs/heads/master c: 72754080d14feef1ca0b3ae383ddfdc5d9a71b1a h: refs/heads/master i: 277517: 0bf6f5911912245227b8866ed4ad320a191a3786 277515: 0aebc48229d4b445f6d42046df12a26aeaa9c62b 277511: d7217a87722492c056548fc3e6388757e0cedbe8 277503: 3d6add57f2c8a23818d70a1d170e3506250746f9 v: v3 --- [refs] | 2 +- .../drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index be8444351322..24bead5643f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a025f49d3f2f2f39b474af360c81a5587b41657 +refs/heads/master: 72754080d14feef1ca0b3ae383ddfdc5d9a71b1a diff --git a/trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index e9a91a347c75..13dad9230dbc 100644 --- a/trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -79,19 +79,21 @@ static inline void bnx2x_bz_fp(struct bnx2x *bp, int index) * @to: destination FP index * * Makes sure the contents of the bp->fp[to].napi is kept - * intact. + * intact. This is done by first copying the napi struct from + * the target to the source, and then mem copying the entire + * source onto the target */ static inline void bnx2x_move_fp(struct bnx2x *bp, int from, int to) { struct bnx2x_fastpath *from_fp = &bp->fp[from]; struct bnx2x_fastpath *to_fp = &bp->fp[to]; - struct napi_struct orig_napi = to_fp->napi; + + /* Copy the NAPI object as it has been already initialized */ + from_fp->napi = to_fp->napi; + /* Move bnx2x_fastpath contents */ memcpy(to_fp, from_fp, sizeof(*to_fp)); to_fp->index = to; - - /* Restore the NAPI object as it has been already initialized */ - to_fp->napi = orig_napi; } int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */