* [PATCH -next] sfc: Use correct macro to set event bitfield
@ 2009-04-15 1:29 Ben Hutchings
2009-04-15 2:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2009-04-15 1:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
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>
---
drivers/net/sfc/falcon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index d4629ab..466a8ab 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -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);
}
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] sfc: Use correct macro to set event bitfield
2009-04-15 1:29 [PATCH -next] sfc: Use correct macro to set event bitfield Ben Hutchings
@ 2009-04-15 2:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-04-15 2:48 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 15 Apr 2009 02:29:52 +0100
> 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>
Applied. And, I think this qualifies for net-2.6 so that's
where I put it.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-15 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 1:29 [PATCH -next] sfc: Use correct macro to set event bitfield Ben Hutchings
2009-04-15 2:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).