--- zzzz-none-000/linux-2.6.39.4/drivers/net/e1000/e1000.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/net/e1000/e1000.h 2021-11-10 13:23:10.000000000 +0000 @@ -70,6 +70,10 @@ #include #include +#if defined(CONFIG_AVM_CPMAC) +#include +#endif + #define BAR_0 0 #define BAR_1 1 #define BAR_5 5 @@ -150,6 +154,8 @@ unsigned long time_stamp; u16 length; u16 next_to_watch; + unsigned int segs; + unsigned int bytecount; u16 mapped_as_page; }; @@ -199,8 +205,13 @@ }; #define E1000_DESC_UNUSED(R) \ - ((((R)->next_to_clean > (R)->next_to_use) \ - ? 0 : (R)->count) + (R)->next_to_clean - (R)->next_to_use - 1) +({ \ + unsigned int clean, use; \ + clean = (R)->next_to_clean; \ + smp_rmb(); \ + use = (R)->next_to_use; \ + (clean > use ? 0 : (R)->count) + clean - use - 1; \ +}) #define E1000_RX_DESC_EXT(R, i) \ (&(((union e1000_rx_desc_extended *)((R).desc))[i]))