Skip to contentSkip to conversation

ks8842: Support 100Mbps when accessed via timberdale

PATCH Applied Richard Röjfors 2 participants 2 messages Jul 26, 2010 – Jul 27, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ks8842: Support 100Mbps when accessed via timberdale

This patch removes the code which disables 100Mbps advertising when the ks8842 is accessed via timberdale.

At higher speed it's good to be nice to the internal state machine of timberdale by acking interrupts. That is done by a write to the interrupt ack register (IAR).

---

drivers/net/ks8842.c +10 -5
index 634dad1..289b0be 100644
@@ -34,7 +34,12 @@
 #define DRV_NAME "ks8842"
 
 /* Timberdale specific Registers */
-#define REG_TIMB_RST	0x1c
+#define REG_TIMB_RST		0x1c
+#define REG_TIMB_FIFO		0x20
+#define REG_TIMB_ISR		0x24
+#define REG_TIMB_IER		0x28
+#define REG_TIMB_IAR		0x2C
+#define REQ_TIMB_DMA_RESUME	0x30
 
 /* KS8842 registers */
 
@@ -282,10 +287,6 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter)
 	/* restart port auto-negotiation */
 	ks8842_enable_bits(adapter, 49, 1 << 13, REG_P1CR4);
 
-	if (!(adapter->conf_flags & MICREL_KS884X))
-		/* only advertise 10Mbps */
-		ks8842_clear_bits(adapter, 49, 3 << 2, REG_P1CR4);
-
 	/* Enable the transmitter */
 	ks8842_enable_tx(adapter);
 
@@ -543,6 +544,10 @@ void ks8842_tasklet(unsigned long arg)
 	/* Ack */
 	ks8842_write16(adapter, 18, isr, REG_ISR);
 
+	if (!(adapter->conf_flags & MICREL_KS884X))
+		/* Ack in the timberdale IP as well */
+		iowrite32(0x1, adapter->hw_addr + REG_TIMB_IAR);
+
 	if (!netif_running(netdev))
 		return;
 
maintainer Applied
#1 lore raw

From: Richard Röjfors <[email protected]>
Date: Mon, 26 Jul 2010 10:51:05 +0200

Quoted 8 lines

This patch removes the code which disables 100Mbps advertising when the ks8842 is accessed via timberdale.

At higher speed it's good to be nice to the internal state machine of timberdale by acking interrupts. That is done by a write to the interrupt ack register (IAR).

Applied.