[EMAIL PROTECTED] wrote:
Eliminate special case for EC-A1. The overhead isn't so
great that having config option is worth it.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
--- sky2-netdev.orig/drivers/net/Kconfig
+++ sky2-netdev/drivers/net/Kconfig
@@ -2022,13 +2022,6 @@ config SKY2
To compile this driver as a module, choose M here: the module
will be called sky2. This is recommended.
-config SKY2_EC_A1
- bool "Support old Yukon-EC A1 chipset"
- depends on SKY2
- ---help---
- Include support for early revisions of the Yukon EC chipset
- that required extra workarounds. If in doubt, say N.
-
config SK98LIN
tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
depends on PCI
--- sky2-netdev.orig/drivers/net/sky2.c
+++ sky2-netdev/drivers/net/sky2.c
@@ -67,13 +67,9 @@
* a receive requires one (or two if using 64 bit dma).
*/
-#ifdef CONFIG_SKY2_EC_A1
#define is_ec_a1(hw) \
- ((hw)->chip_id == CHIP_ID_YUKON_EC && \
- (hw)->chip_rev == CHIP_REV_YU_EC_A1)
-#else
-#define is_ec_a1(hw) 0
-#endif
+ unlikely((hw)->chip_id == CHIP_ID_YUKON_EC && \
+ (hw)->chip_rev == CHIP_REV_YU_EC_A1)
I'll apply it, but with a note for future updates:
unlikely() is inappropriate here. unlikely() isn't for hardware that is
rarely found, but for code paths rarely taken. And there's a
difference. For EC-A1 owners, these paths are frequently taken, so the
branch hints will be massively wrong, all the time.
Compared to MMIO transactions, DMA, interrupts, memory allocation, and
everything else going on in the system, a couple in-cache tests are
probably lost in the noise.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html