Francois Romieu wrote:
Introduce velocity_give_rx_desc() to uniformize the use of OWNED_BY_NIC
through the driver.
diff -puN drivers/net/via-velocity.c~via-velocity-30 drivers/net/via-velocity.c
--- linux-2.6.7-rc3/drivers/net/via-velocity.c~via-velocity-30 2004-06-18 21:34:14.000000000 +0200
+++ linux-2.6.7-rc3-fr/drivers/net/via-velocity.c 2004-06-18 21:34:14.000000000 +0200
@@ -465,6 +465,12 @@ static void velocity_init_cam_filter(str
}
}
+static inline void velocity_give_rx_desc(struct rx_desc *rd)
+{
+ *(u32 *)&rd->rdesc0 = 0;
+ rd->rdesc0.owner = cpu_to_le32(OWNED_BY_NIC);
+}
The patch itself is OK, and I will merge, but I wonder:
isn't a wmb() needed perhaps?
Jeff
|