Skip to content

Commit

Permalink
sfc: Use correct macro to set event bitfield
Browse files Browse the repository at this point in the history
falcon_sim_phy_event() used EFX_OWORD_FIELD, which operates on
bitfields in 128-bit values, on an event, which is a 64-bit value.
This should be harmless - these macros always use little-endian
ordering, so it would read and write back the following 8 bytes
unchanged - but it is obviously wrong.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Apr 15, 2009
1 parent 718cff1 commit 239795a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sfc/falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,9 @@ void falcon_sim_phy_event(struct efx_nic *efx)

EFX_POPULATE_QWORD_1(phy_event, EV_CODE, GLOBAL_EV_DECODE);
if (EFX_IS10G(efx))
EFX_SET_OWORD_FIELD(phy_event, XG_PHY_INTR, 1);
EFX_SET_QWORD_FIELD(phy_event, XG_PHY_INTR, 1);
else
EFX_SET_OWORD_FIELD(phy_event, G_PHY0_INTR, 1);
EFX_SET_QWORD_FIELD(phy_event, G_PHY0_INTR, 1);

falcon_generate_event(&efx->channel[0], &phy_event);
}
Expand Down

0 comments on commit 239795a

Please sign in to comment.