diff options
author | Richard Röjfors <richard.rojfors@pelagicore.com> | 2010-07-25 18:51:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-27 00:05:03 -0400 |
commit | db5824dd3d632acd79094b81e07288ba05ae2cc1 (patch) | |
tree | 9ce16910c03a601d36ce6b4b4e66a1ca8b57b01c | |
parent | 7b7b0b90592a023ac8946b29cca871bf17741fab (diff) |
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).
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ks8842.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c index 634dad1c8b48..289b0bee3462 100644 --- a/drivers/net/ks8842.c +++ b/drivers/net/ks8842.c | |||
@@ -34,7 +34,12 @@ | |||
34 | #define DRV_NAME "ks8842" | 34 | #define DRV_NAME "ks8842" |
35 | 35 | ||
36 | /* Timberdale specific Registers */ | 36 | /* Timberdale specific Registers */ |
37 | #define REG_TIMB_RST 0x1c | 37 | #define REG_TIMB_RST 0x1c |
38 | #define REG_TIMB_FIFO 0x20 | ||
39 | #define REG_TIMB_ISR 0x24 | ||
40 | #define REG_TIMB_IER 0x28 | ||
41 | #define REG_TIMB_IAR 0x2C | ||
42 | #define REQ_TIMB_DMA_RESUME 0x30 | ||
38 | 43 | ||
39 | /* KS8842 registers */ | 44 | /* KS8842 registers */ |
40 | 45 | ||
@@ -282,10 +287,6 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter) | |||
282 | /* restart port auto-negotiation */ | 287 | /* restart port auto-negotiation */ |
283 | ks8842_enable_bits(adapter, 49, 1 << 13, REG_P1CR4); | 288 | ks8842_enable_bits(adapter, 49, 1 << 13, REG_P1CR4); |
284 | 289 | ||
285 | if (!(adapter->conf_flags & MICREL_KS884X)) | ||
286 | /* only advertise 10Mbps */ | ||
287 | ks8842_clear_bits(adapter, 49, 3 << 2, REG_P1CR4); | ||
288 | |||
289 | /* Enable the transmitter */ | 290 | /* Enable the transmitter */ |
290 | ks8842_enable_tx(adapter); | 291 | ks8842_enable_tx(adapter); |
291 | 292 | ||
@@ -543,6 +544,10 @@ void ks8842_tasklet(unsigned long arg) | |||
543 | /* Ack */ | 544 | /* Ack */ |
544 | ks8842_write16(adapter, 18, isr, REG_ISR); | 545 | ks8842_write16(adapter, 18, isr, REG_ISR); |
545 | 546 | ||
547 | if (!(adapter->conf_flags & MICREL_KS884X)) | ||
548 | /* Ack in the timberdale IP as well */ | ||
549 | iowrite32(0x1, adapter->hw_addr + REG_TIMB_IAR); | ||
550 | |||
546 | if (!netif_running(netdev)) | 551 | if (!netif_running(netdev)) |
547 | return; | 552 | return; |
548 | 553 | ||