netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ks8842: Support 100Mbps when accessed via timberdale
@ 2010-07-26  8:51 Richard Röjfors
  2010-07-27  4:05 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Röjfors @ 2010-07-26  8:51 UTC (permalink / raw)
  To: netdev; +Cc: davem

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).

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
---
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c
index 634dad1..289b0be 100644
--- a/drivers/net/ks8842.c
+++ b/drivers/net/ks8842.c
@@ -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;
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ks8842: Support 100Mbps when accessed via timberdale
  2010-07-26  8:51 [PATCH v2] ks8842: Support 100Mbps when accessed via timberdale Richard Röjfors
@ 2010-07-27  4:05 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-27  4:05 UTC (permalink / raw)
  To: richard.rojfors; +Cc: netdev

From: Richard Röjfors <richard.rojfors@pelagicore.com>
Date: Mon, 26 Jul 2010 10:51:05 +0200

> 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).
> 
> Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-27  4:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26  8:51 [PATCH v2] ks8842: Support 100Mbps when accessed via timberdale Richard Röjfors
2010-07-27  4:05 ` 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).