* [PATCH 0/6] Misc driver fixes for 2.6.32
From: Ralf Baechle @ 2009-11-05 15:25 UTC (permalink / raw)
To: Linus Torvalds
Cc: David Daney, Atsushi Nemoto, Julia Lawall, Greg Kroah-Hartman,
devel, David Brownell, spi-devel-general, linux-kernel,
linux-mips, netdev
This is a series of patches which
o 1/6, 2/6, 3/6: Fixes for the Octeon ethernet driver in drivers/staging.
The Octeon is a MIPS-based SOC so with permisson from Greg I'm merging
these via the MIPS tree.
o 4/6: A fix to a MIPS-specific SPI driver. Posted before, no comments
were received.
o 5/6: A fix to the resource allocation to the framebuffer of the MIPS-
based SGI O2 and i686-based Visual Workstation. Also posted before, no
comments were received.
o 6/6: A fix to the serial driver for the BCM63xx which is a MIPS-based
SOC.
Ralf
^ permalink raw reply
* RE: [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Kumar Gopalpet-B05799 @ 2009-11-05 17:53 UTC (permalink / raw)
To: Jon Loeliger
Cc: avorontsov, linuxppc-dev, Jason Wessel, Fleming Andy-AFLEMING,
David Miller, netdev, Lennert Buytenhek, Stephen Hemminger
In-Reply-To: <E1N66Jp-0004Y0-8Q@jdl.com>
>
>Similar but different question: What version is this patch based upon?
>I can't find:
>
> > >index 197b358..a0ae604 100644
>
>My search of 2.6.31 up through current linux head
>(v2.6.32-rc6-26-g91d3f9b) and benh's current head
>(94a8d5caba74211ec76dac80fc6e2d5c391530df) do not have a
>version of this code with separate txqueues.
>
>I confess I'm not too familiar with the history here, so I
>don't know if that feature is in flux, or came, or went, or what.
>
>That boils down to: I can't directly apply your patch, but I
>could hand-fudge its intent, but only on a single tx queue variant.
>
You might want to get the code base from the top of davem/net-next-2.6
tree
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git
The multi queue is a feature available in etsec2.0 version. On older
versions you might want to
work in a single queue mode itself.
--
Thanks
Sandeep
^ permalink raw reply
* Re: [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Anton Vorontsov @ 2009-11-05 17:53 UTC (permalink / raw)
To: Jon Loeliger
Cc: Kumar Gopalpet-B05799, netdev, linuxppc-dev,
Fleming Andy-AFLEMING, Jason Wessel, Stephen Hemminger,
David Miller, Lennert Buytenhek
In-Reply-To: <E1N66Jp-0004Y0-8Q@jdl.com>
On Thu, Nov 05, 2009 at 11:40:21AM -0600, Jon Loeliger wrote:
[...]
> > >+ netif_tx_lock_bh(priv->ndev);
> >
> > Will this not lead to locking all the tx queues even though at this
> > point we are working on a "particular queue" ?
>
> Similar but different question: What version is this patch based upon?
> I can't find:
>
> > >index 197b358..a0ae604 100644
>
> My search of 2.6.31 up through current linux head (v2.6.32-rc6-26-g91d3f9b)
> and benh's current head (94a8d5caba74211ec76dac80fc6e2d5c391530df) do not
> have a version of this code with separate txqueues.
>
> I confess I'm not too familiar with the history here, so I don't know
> if that feature is in flux, or came, or went, or what.
Sorry for not mentioning, it's based on
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git
+ compiler/sparse warnings fixes that I sent yesterday.
> That boils down to: I can't directly apply your patch, but I could
> hand-fudge its intent, but only on a single tx queue variant.
Here is the patch on top of the Linus' git tree, if you haven't
already 'back-ported' the previous patch.
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 5bf31f1..5dca99c 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1274,7 +1274,6 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
u32 lstatus;
int i;
u32 bufaddr;
- unsigned long flags;
unsigned int nr_frags, length;
base = priv->tx_bd_base;
@@ -1298,14 +1297,11 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* total number of fragments in the SKB */
nr_frags = skb_shinfo(skb)->nr_frags;
- spin_lock_irqsave(&priv->txlock, flags);
-
/* check if there is space to queue this packet */
if ((nr_frags+1) > priv->num_txbdfree) {
/* no space, stop the queue */
netif_stop_queue(dev);
dev->stats.tx_fifo_errors++;
- spin_unlock_irqrestore(&priv->txlock, flags);
return NETDEV_TX_BUSY;
}
@@ -1403,9 +1399,6 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Tell the DMA to go go go */
gfar_write(&priv->regs->tstat, TSTAT_CLEAR_THALT);
- /* Unlock priv */
- spin_unlock_irqrestore(&priv->txlock, flags);
-
return NETDEV_TX_OK;
}
@@ -1915,17 +1908,14 @@ static int gfar_poll(struct napi_struct *napi, int budget)
struct net_device *dev = priv->ndev;
int tx_cleaned = 0;
int rx_cleaned = 0;
- unsigned long flags;
/* Clear IEVENT, so interrupts aren't called again
* because of the packets that have already arrived */
gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK);
- /* If we fail to get the lock, don't bother with the TX BDs */
- if (spin_trylock_irqsave(&priv->txlock, flags)) {
- tx_cleaned = gfar_clean_tx_ring(dev);
- spin_unlock_irqrestore(&priv->txlock, flags);
- }
+ netif_tx_lock_bh(priv->ndev);
+ tx_cleaned = gfar_clean_tx_ring(dev);
+ netif_tx_unlock_bh(priv->ndev);
rx_cleaned = gfar_clean_rx_ring(dev, budget);
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply related
* Re: [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Jon Loeliger @ 2009-11-05 17:40 UTC (permalink / raw)
To: Kumar Gopalpet-B05799
Cc: netdev, linuxppc-dev, Fleming Andy-AFLEMING, Jason Wessel,
Stephen Hemminger, David Miller, Lennert Buytenhek
In-Reply-To: <9F4C7D19E8361D4C94921B95BE08B81B950713@zin33exm22.fsl.freescale.net>
>
> [.....]
> > drivers/net/gianfar.c | 19 +++----------------
> > 1 files changed, 3 insertions(+), 16 deletions(-)
> >
> >diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c=20
> >index 197b358..a0ae604 100644
> >--- a/drivers/net/gianfar.c
> >+++ b/drivers/net/gianfar.c
> >@@ -1899,10 +1899,8 @@ static int gfar_start_xmit(struct=20
> >sk_buff *skb, struct net_device *dev)
> > u32 lstatus;
> > int i, rq = 0;
> > u32 bufaddr;
> >- unsigned long flags;
> > unsigned int nr_frags, length;
> >
> >-
> > rq = skb->queue_mapping;
> > tx_queue = priv->tx_queue[rq];
> > txq = netdev_get_tx_queue(dev, rq);
> >@@ -1928,14 +1926,11 @@ static int gfar_start_xmit(struct
> >sk_buff *skb, struct net_device *dev)
> > /* total number of fragments in the SKB */
> > nr_frags = skb_shinfo(skb)->nr_frags;
> >
> >- spin_lock_irqsave(&tx_queue->txlock, flags);
> >-
> > /* check if there is space to queue this packet */
> > if ((nr_frags+1) > tx_queue->num_txbdfree) {
> > /* no space, stop the queue */
> > netif_tx_stop_queue(txq);
> > dev->stats.tx_fifo_errors++;
> >- spin_unlock_irqrestore(&tx_queue->txlock, flags);
> > return NETDEV_TX_BUSY;
> > }
> >
> >@@ -2033,9 +2028,6 @@ static int gfar_start_xmit(struct
> >sk_buff *skb, struct net_device *dev)
> > /* Tell the DMA to go go go */
> > gfar_write(®s->tstat, TSTAT_CLEAR_THALT >> tx_queue->qindex);
> >
> >- /* Unlock priv */
> >- spin_unlock_irqrestore(&tx_queue->txlock, flags);
> >-
> > return NETDEV_TX_OK;
> > }
> >
> >@@ -2550,7 +2542,6 @@ static int gfar_poll(struct napi_struct
> >*napi, int budget)
> > int tx_cleaned = 0, i, left_over_budget = budget;
> > unsigned long serviced_queues = 0;
> > int num_queues = 0;
> >- unsigned long flags;
> >
> > num_queues = gfargrp->num_rx_queues;
> > budget_per_queue = budget/num_queues;
> >@@ -2570,13 +2561,9 @@ static int gfar_poll(struct napi_struct
> >*napi, int budget)
> > rx_queue = priv->rx_queue[i];
> > tx_queue = priv->tx_queue[rx_queue->qindex];
> >
> >- /* If we fail to get the lock,
> >- * don't bother with the TX BDs */
> >- if
> >(spin_trylock_irqsave(&tx_queue->txlock, flags)) {
> >- tx_cleaned +=
> >gfar_clean_tx_ring(tx_queue);
> >- =09
> >spin_unlock_irqrestore(&tx_queue->txlock,
> >- flags);
> >- }
> >+ netif_tx_lock_bh(priv->ndev);
>
> Will this not lead to locking all the tx queues even though at this
> point we are working on a "particular queue" ?
Similar but different question: What version is this patch based upon?
I can't find:
> >index 197b358..a0ae604 100644
My search of 2.6.31 up through current linux head (v2.6.32-rc6-26-g91d3f9b)
and benh's current head (94a8d5caba74211ec76dac80fc6e2d5c391530df) do not
have a version of this code with separate txqueues.
I confess I'm not too familiar with the history here, so I don't know
if that feature is in flux, or came, or went, or what.
That boils down to: I can't directly apply your patch, but I could
hand-fudge its intent, but only on a single tx queue variant.
jdl
^ permalink raw reply
* Re: [RFC] [PATCH] udp: optimize lookup of UDP sockets to by including destination address in the hash key
From: Eric Dumazet @ 2009-11-05 17:39 UTC (permalink / raw)
To: Octavian Purdila; +Cc: Lucian Adrian Grijincu, netdev
In-Reply-To: <200911051903.02859.opurdila@ixiacom.com>
Octavian Purdila a écrit :
> On Thursday 05 November 2009 18:36:50 you wrote:
>> Octavian Purdila a écrit :
>>> IIRC, we first saw this issue in VoIP tests with up to 16000 sockets
>>> bound on a certain port and IP addresses (each IP address is assigned to
>>> a particular interface). We need this setup in order to emulate lots of
>>> VoIP users each with a different IP address and possible a different L2
>>> encapsulation.
>> Interesting case indeed, is it SIP 5060 port or RTP ports ?
>> (I want to know how many messages per second you want to receive)
>>
>> An rbtree with 16000 elements has 15 levels, its a lot, but OK
>> for small trafic.
>>
>
> Yep the signaling port not the RTP port, and yes I think there is a fairly
> small amount of traffic and rbtree might work.
>
> BTW, there is another side of this problem, the time to bind() those 16K
> sockets before starting the test - at least on 2.6.7 we didn't yet get to look
> at this issue on a recent kernel.
>
Yes, this is O(N^2) algo :
0.3 seconds to bind 8000 UDP sockets on same port (different IPs)
1.5 secs / 12000 sockets
5.3 secs / 16000 sockets
18 secs / 24000 sockets
36 secs / 32000 sockets
^ permalink raw reply
* Re: [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Anton Vorontsov @ 2009-11-05 17:34 UTC (permalink / raw)
To: Kumar Gopalpet-B05799
Cc: Jon Loeliger, linuxppc-dev, Jason Wessel, Fleming Andy-AFLEMING,
David Miller, netdev, Lennert Buytenhek, Stephen Hemminger
In-Reply-To: <9F4C7D19E8361D4C94921B95BE08B81B950713@zin33exm22.fsl.freescale.net>
On Thu, Nov 05, 2009 at 10:53:08PM +0530, Kumar Gopalpet-B05799 wrote:
[...]
> >(spin_trylock_irqsave(&tx_queue->txlock, flags)) {
> >- tx_cleaned +=
> >gfar_clean_tx_ring(tx_queue);
> >-
> >spin_unlock_irqrestore(&tx_queue->txlock,
> >- flags);
> >- }
> >+ netif_tx_lock_bh(priv->ndev);
>
> Will this not lead to locking all the tx queues even though at this
> point we are working on a "particular queue" ?
Yeah, per-txq locking would be better (or not.. I need to netperf
it).
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply
* RE: [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Kumar Gopalpet-B05799 @ 2009-11-05 17:23 UTC (permalink / raw)
To: avorontsov, Jon Loeliger
Cc: linuxppc-dev, Jason Wessel, Fleming Andy-AFLEMING, David Miller,
netdev, Lennert Buytenhek, Stephen Hemminger
In-Reply-To: <20091105165738.GA31923@oksana.dev.rtsoft.ru>
[.....]
> drivers/net/gianfar.c | 19 +++----------------
> 1 files changed, 3 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
>index 197b358..a0ae604 100644
>--- a/drivers/net/gianfar.c
>+++ b/drivers/net/gianfar.c
>@@ -1899,10 +1899,8 @@ static int gfar_start_xmit(struct
>sk_buff *skb, struct net_device *dev)
> u32 lstatus;
> int i, rq = 0;
> u32 bufaddr;
>- unsigned long flags;
> unsigned int nr_frags, length;
>
>-
> rq = skb->queue_mapping;
> tx_queue = priv->tx_queue[rq];
> txq = netdev_get_tx_queue(dev, rq);
>@@ -1928,14 +1926,11 @@ static int gfar_start_xmit(struct
>sk_buff *skb, struct net_device *dev)
> /* total number of fragments in the SKB */
> nr_frags = skb_shinfo(skb)->nr_frags;
>
>- spin_lock_irqsave(&tx_queue->txlock, flags);
>-
> /* check if there is space to queue this packet */
> if ((nr_frags+1) > tx_queue->num_txbdfree) {
> /* no space, stop the queue */
> netif_tx_stop_queue(txq);
> dev->stats.tx_fifo_errors++;
>- spin_unlock_irqrestore(&tx_queue->txlock, flags);
> return NETDEV_TX_BUSY;
> }
>
>@@ -2033,9 +2028,6 @@ static int gfar_start_xmit(struct
>sk_buff *skb, struct net_device *dev)
> /* Tell the DMA to go go go */
> gfar_write(®s->tstat, TSTAT_CLEAR_THALT >> tx_queue->qindex);
>
>- /* Unlock priv */
>- spin_unlock_irqrestore(&tx_queue->txlock, flags);
>-
> return NETDEV_TX_OK;
> }
>
>@@ -2550,7 +2542,6 @@ static int gfar_poll(struct napi_struct
>*napi, int budget)
> int tx_cleaned = 0, i, left_over_budget = budget;
> unsigned long serviced_queues = 0;
> int num_queues = 0;
>- unsigned long flags;
>
> num_queues = gfargrp->num_rx_queues;
> budget_per_queue = budget/num_queues;
>@@ -2570,13 +2561,9 @@ static int gfar_poll(struct napi_struct
>*napi, int budget)
> rx_queue = priv->rx_queue[i];
> tx_queue = priv->tx_queue[rx_queue->qindex];
>
>- /* If we fail to get the lock,
>- * don't bother with the TX BDs */
>- if
>(spin_trylock_irqsave(&tx_queue->txlock, flags)) {
>- tx_cleaned +=
>gfar_clean_tx_ring(tx_queue);
>-
>spin_unlock_irqrestore(&tx_queue->txlock,
>- flags);
>- }
>+ netif_tx_lock_bh(priv->ndev);
Will this not lead to locking all the tx queues even though at this
point we are working on a "particular queue" ?
>+ tx_cleaned += gfar_clean_tx_ring(tx_queue);
>+ netif_tx_unlock_bh(priv->ndev);
>
> rx_cleaned_per_queue =
>gfar_clean_rx_ring(rx_queue,
>
>budget_per_queue);
>--
--
Thanks
Sandeep
^ permalink raw reply
* Re: [RFC] [PATCH] udp: optimize lookup of UDP sockets to by including destination address in the hash key
From: Octavian Purdila @ 2009-11-05 17:03 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Lucian Adrian Grijincu, netdev
In-Reply-To: <4AF2FF22.2000805@gmail.com>
On Thursday 05 November 2009 18:36:50 you wrote:
> Octavian Purdila a écrit :
> > IIRC, we first saw this issue in VoIP tests with up to 16000 sockets
> > bound on a certain port and IP addresses (each IP address is assigned to
> > a particular interface). We need this setup in order to emulate lots of
> > VoIP users each with a different IP address and possible a different L2
> > encapsulation.
>
> Interesting case indeed, is it SIP 5060 port or RTP ports ?
> (I want to know how many messages per second you want to receive)
>
> An rbtree with 16000 elements has 15 levels, its a lot, but OK
> for small trafic.
>
Yep the signaling port not the RTP port, and yes I think there is a fairly
small amount of traffic and rbtree might work.
BTW, there is another side of this problem, the time to bind() those 16K
sockets before starting the test - at least on 2.6.7 we didn't yet get to look
at this issue on a recent kernel.
Thanks,
tavi
^ permalink raw reply
* [PATCH RFC] gianfar: Do not call skb recycling with disabled IRQs
From: Anton Vorontsov @ 2009-11-05 16:57 UTC (permalink / raw)
To: Jon Loeliger
Cc: linuxppc-dev, Jason Wessel, Andy Fleming, David Miller, netdev,
Lennert Buytenhek, Stephen Hemminger
In-Reply-To: <E1N64UY-00049g-Hb@jdl.com>
Before calling gfar_clean_tx_ring() we grab an irqsave spinlock, and
then try to recycle an skb, which requires IRQs to be enabled. This
leads to the following badness:
nf_conntrack version 0.5.0 (1008 buckets, 4032 max)
------------[ cut here ]------------
Badness at kernel/softirq.c:143
NIP: c003e3c4 LR: c423a528 CTR: c003e344
...
NIP [c003e3c4] local_bh_enable+0x80/0xc4
LR [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
Call Trace:
[c15d1b60] [c003e32c] local_bh_disable+0x1c/0x34 (unreliable)
[c15d1b70] [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
[c15d1b80] [c02c6370] nf_conntrack_destroy+0x3c/0x70
--- Exception: c428168c at 0xc15d1c50
LR = 0xc15d1c40
[c15d1ba0] [c0286f3c] skb_release_head_state+0x100/0x104 (unreliable)
[c15d1bb0] [c0288340] skb_recycle_check+0x8c/0x10c
[c15d1bc0] [c01e1688] gfar_poll+0x190/0x384
[c15d1c10] [c02935ac] net_rx_action+0xec/0x22c
[c15d1c50] [c003dd8c] __do_softirq+0xe8/0x224
[c15d1ca0] [c000624c] do_softirq+0x78/0x80
[c15d1cb0] [c003d868] irq_exit+0x60/0x78
...
We can't easily get rid of the irqsave spinlock, because we must
guard ourselves from start_xmit.
So, fix this by dropping the irqsave spinlock from both xmit_start
and clean_tx_ring routines. Instead, lock the whole tx queue via
netif_tx_lock_bh() in clean_tx_ring().
Reported-by: Jon Loeliger <jdl@jdl.com>
Not-yet-Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
On Thu, Nov 05, 2009 at 09:43:18AM -0600, Jon Loeliger wrote:
[...]
> This is with essentially a stock 2.6.31 kernel for an 8315.
> I've seen the problem for both task 'insmod' and 'iptables'.
> Um, conn_track is a module being loaded here. Our brief analysis
> runs like this:
>
> This is an issue with the gianfar driver. In gfar_poll(), irqs are
> disabled for the handling of gfar_clean_tx_ring(dev) (line 1928).
> In this call, skbs can call skb_recycle_check, which can release
> head state (net/core/skbuff.c@506), which can cause conntrack
> cleanup (net/core/skbuff.c@402->include/linux/skbuff.h@1923), which
> cannot be done with IRQs disabled...that is the badness.
Ugh.
We may try to call netif_tx_lock_bh() in gfar_clean_tx_ring() and
drop the irqsave spinlock start_xmit (sky2-like scheme).
But that basically means that with skb recycling we can't safely
use KGDBoE, though we can add something like this:
| diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
| index a00ec63..4d82bd7 100644
| --- a/drivers/net/gianfar.c
| +++ b/drivers/net/gianfar.c
| @@ -1619,7 +1619,8 @@ static int gfar_clean_tx_ring(struct net_device *dev)
| * If there's room in the queue (limit it to rx_buffer_size)
| * we add this skb back into the pool, if it's the right size
| */
| - if (skb_queue_len(&priv->rx_recycle) < priv->rx_ring_size &&
| + if (!irqs_disabled() &&
| + skb_queue_len(&priv->rx_recycle) < priv->rx_ring_size &&
| skb_recycle_check(skb, priv->rx_buffer_size +
| RXBUF_ALIGNMENT))
| __skb_queue_head(&priv->rx_recycle, skb);
So we won't recycle skbs with irqs disabled.
Anyway, apart from KGDBoE, the following patch might fix the conntrack
issue, can you try it?
With this patch the kernel boots via NFS, and survives netperf, though
I'd like to audit changes a little more and run some netperf tests, I
might also put the netif_tx_lock_bh() stuff out of the loop.
So this patch isn't for the merge.
drivers/net/gianfar.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 197b358..a0ae604 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1899,10 +1899,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
u32 lstatus;
int i, rq = 0;
u32 bufaddr;
- unsigned long flags;
unsigned int nr_frags, length;
-
rq = skb->queue_mapping;
tx_queue = priv->tx_queue[rq];
txq = netdev_get_tx_queue(dev, rq);
@@ -1928,14 +1926,11 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* total number of fragments in the SKB */
nr_frags = skb_shinfo(skb)->nr_frags;
- spin_lock_irqsave(&tx_queue->txlock, flags);
-
/* check if there is space to queue this packet */
if ((nr_frags+1) > tx_queue->num_txbdfree) {
/* no space, stop the queue */
netif_tx_stop_queue(txq);
dev->stats.tx_fifo_errors++;
- spin_unlock_irqrestore(&tx_queue->txlock, flags);
return NETDEV_TX_BUSY;
}
@@ -2033,9 +2028,6 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Tell the DMA to go go go */
gfar_write(®s->tstat, TSTAT_CLEAR_THALT >> tx_queue->qindex);
- /* Unlock priv */
- spin_unlock_irqrestore(&tx_queue->txlock, flags);
-
return NETDEV_TX_OK;
}
@@ -2550,7 +2542,6 @@ static int gfar_poll(struct napi_struct *napi, int budget)
int tx_cleaned = 0, i, left_over_budget = budget;
unsigned long serviced_queues = 0;
int num_queues = 0;
- unsigned long flags;
num_queues = gfargrp->num_rx_queues;
budget_per_queue = budget/num_queues;
@@ -2570,13 +2561,9 @@ static int gfar_poll(struct napi_struct *napi, int budget)
rx_queue = priv->rx_queue[i];
tx_queue = priv->tx_queue[rx_queue->qindex];
- /* If we fail to get the lock,
- * don't bother with the TX BDs */
- if (spin_trylock_irqsave(&tx_queue->txlock, flags)) {
- tx_cleaned += gfar_clean_tx_ring(tx_queue);
- spin_unlock_irqrestore(&tx_queue->txlock,
- flags);
- }
+ netif_tx_lock_bh(priv->ndev);
+ tx_cleaned += gfar_clean_tx_ring(tx_queue);
+ netif_tx_unlock_bh(priv->ndev);
rx_cleaned_per_queue = gfar_clean_rx_ring(rx_queue,
budget_per_queue);
--
1.6.3.3
^ permalink raw reply related
* Re: [RFC] [PATCH] udp: optimize lookup of UDP sockets to by including destination address in the hash key
From: Eric Dumazet @ 2009-11-05 16:36 UTC (permalink / raw)
To: Octavian Purdila; +Cc: Lucian Adrian Grijincu, netdev
In-Reply-To: <200911051825.45749.opurdila@ixiacom.com>
Octavian Purdila a écrit :
> IIRC, we first saw this issue in VoIP tests with up to 16000 sockets bound on a
> certain port and IP addresses (each IP address is assigned to a particular
> interface). We need this setup in order to emulate lots of VoIP users each
> with a different IP address and possible a different L2 encapsulation.
Interesting case indeed, is it SIP 5060 port or RTP ports ?
(I want to know how many messages per second you want to receive)
An rbtree with 16000 elements has 15 levels, its a lot, but OK
for small trafic.
>
> Now, as a general note I should say that our usecases can seem absurd if you
> take them out of the network testing field :) but my _personal_ opinion is that
> a better integration between our code base and upstream code may benefit both
> upstream and us:
>
> - for us it gives the ability to stay close to upstream and get all of the new
> shiny features without painful upgrades
>
> - for upstream, even if most systems don't run into these scalability issues
> now, I see that some people are moving in that direction (see the recent PPP
> problems); also, stressing Linux in that regard can only make the code better
> - as long as the approach taken is clean and sound
>
> - we (or our customers) use a plethora of networking devices for testing so
> exposing Linux early to those devices can only help catching issues earlier
>
> In short: expect more absurd patches from us :)
I might cook something too :)
^ permalink raw reply
* Re: [RFC] [PATCH] udp: optimize lookup of UDP sockets to by including destination address in the hash key
From: Octavian Purdila @ 2009-11-05 16:25 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Lucian Adrian Grijincu, netdev
In-Reply-To: <4AF20F02.7000601@gmail.com>
On Thursday 05 November 2009 01:32:18 you wrote:
> >
> > Very true, the benchmark itself shows a significant overhead increase on
> > the TX side and indeed this case is not very common. But for us its an
> > important usecase.
> >
> > Maybe there is a more clever way of fixing this specific use-case without
> > hurting the common case?
>
> Clever way ? Well, we will see :)
>
> I now understand previous Lucian patch (best match) :)
>
> Could you please describe your usecase ? I guess something is possible,
> not necessarly hurting performance of regular usecases :)
>
IIRC, we first saw this issue in VoIP tests with up to 16000 sockets bound on a
certain port and IP addresses (each IP address is assigned to a particular
interface). We need this setup in order to emulate lots of VoIP users each
with a different IP address and possible a different L2 encapsulation.
Now, as a general note I should say that our usecases can seem absurd if you
take them out of the network testing field :) but my _personal_ opinion is that
a better integration between our code base and upstream code may benefit both
upstream and us:
- for us it gives the ability to stay close to upstream and get all of the new
shiny features without painful upgrades
- for upstream, even if most systems don't run into these scalability issues
now, I see that some people are moving in that direction (see the recent PPP
problems); also, stressing Linux in that regard can only make the code better
- as long as the approach taken is clean and sound
- we (or our customers) use a plethora of networking devices for testing so
exposing Linux early to those devices can only help catching issues earlier
In short: expect more absurd patches from us :)
> I have struct reorderings in progress to reduce number of cache lines read
> per socket from two to one. So this would reduce by 50% time to find
> a particular socket in the chain.
>
> But if you *really* want/need 512 sockets bound to _same_ port, we probably
> can use secondary hash tables (or rbtree), as soon as we stack more than
> XX sockets on a particular slot.
>
> At lookup, we check if extended hash table exists before doing
> normal rcu lookup.
>
> Probably can be done under 300 lines of code.
> On normal machines, these extra tables/trees would not be used/allocated
>
Yep, that should work. Will respin the patch based on this idea and see what
we get, but it will take a while.
Thanks,
tavi
^ permalink raw reply
* RE: [PATCH 16/25] mlx4_core: boot sriov
From: Liran Liss @ 2009-11-05 16:21 UTC (permalink / raw)
To: Roland Dreier; +Cc: Yevgeny Petrilin, linux-rdma, netdev, Tziporet Koren
In-Reply-To: <adafx8tc6cu.fsf@roland-alpha.cisco.com>
I was also thinking about backports to older kernels without sriov at
all, which will probably be in our VMs in the near future.
For these kernels, we still want to the code to operate in slave mode...
Anyway, we can push the pci_enable_sriov() stub to the OFED backport
system as well, so I am fine.
10x,
--Liran
-----Original Message-----
From: Roland Dreier [mailto:rdreier@cisco.com]
Sent: Thursday, November 05, 2009 5:57 PM
To: Liran Liss
Cc: Yevgeny Petrilin; linux-rdma@vger.kernel.org;
netdev@vger.kernel.org; Tziporet Koren
Subject: Re: [PATCH 16/25] mlx4_core: boot sriov
> LL: I think that this won't pass -Wall when compiling against a
kernel > with sriov compiled out.
Why not? The sriov code provides stubs like:
static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) {
return -ENODEV;
}
if CONFIG_PCI_IOV is not enabled.
- R.
^ permalink raw reply
* Re: [PATCH 19/25] mlx4: Randomizing mac addresses for slaves
From: Roland Dreier @ 2009-11-05 15:58 UTC (permalink / raw)
To: Liran Liss
Cc: Or Gerlitz, Yevgeny Petrilin, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Tziporet Koren
In-Reply-To: <2ED289D4E09FBD4D92D911E869B97FDD0166CA59-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
> This approach seems to be common practice now (e.g., drivers/net/igb/igb_main.c:1332).
> In any case, the user can change the randomized mac.
igb uses the full output of random_ether_addr(). I'd be fine with
that. However setting the OUI means you only get 24 bits of randomness
which makes a collision a lot more likely.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 16/25] mlx4_core: boot sriov
From: Roland Dreier @ 2009-11-05 15:57 UTC (permalink / raw)
To: Liran Liss
Cc: Yevgeny Petrilin, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Tziporet Koren
In-Reply-To: <2ED289D4E09FBD4D92D911E869B97FDD0166CA13-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
> LL: I think that this won't pass -Wall when compiling against a kernel
> with sriov compiled out.
Why not? The sriov code provides stubs like:
static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
{
return -ENODEV;
}
if CONFIG_PCI_IOV is not enabled.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH RFC] gianfar: Make polling safe with IRQs disabled
From: Jon Loeliger @ 2009-11-05 15:43 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev, Jason Wessel, Andy Fleming, David Miller, netdev
In-Reply-To: <E1N63WM-0003xK-PN@jdl.com>
> >
> > If it's easily reproducible, could you replace the printk() with
> > WARN_ON(1) and post the backtrace? Or I can try to reproduce the
> > issue if you tell me how.
> >
> > Thanks!
>
> Yeah, I can reproduce it. I'll try and get that for you.
>
> jdl
This is with essentially a stock 2.6.31 kernel for an 8315.
I've seen the problem for both task 'insmod' and 'iptables'.
Um, conn_track is a module being loaded here. Our brief analysis
runs like this:
This is an issue with the gianfar driver. In gfar_poll(), irqs are
disabled for the handling of gfar_clean_tx_ring(dev) (line 1928).
In this call, skbs can call skb_recycle_check, which can release
head state (net/core/skbuff.c@506), which can cause conntrack
cleanup (net/core/skbuff.c@402->include/linux/skbuff.h@1923), which
cannot be done with IRQs disabled...that is the badness.
HTH,
jdl
[ 34.775619] nf_conntrack version 0.5.0 (1008 buckets, 4032 max)
[ 34.963135] ------------[ cut here ]------------
[ 34.967804] Badness at kernel/softirq.c:143
[ 34.972016] NIP: c003e3c4 LR: c423a528 CTR: c003e344
[ 34.977018] REGS: c15d1ab0 TRAP: 0700 Not tainted (2.6.31-xeno)
[ 34.983236] MSR: 00021032 <ME,CE,IR,DR> CR: 24000284 XER: 20000000
[ 34.989689] TASK = c343a060[977] 'insmod' THREAD: c15d0000
[ 34.995032] GPR00: 00000001 c15d1b60 c343a060 00000001 000000a4 00000052 00000001 00000000
[ 35.003501] GPR08: 00000101 c0450000 c3572d20 c003e344 24000282 100c5288 00000001 00000040
[ 35.011971] GPR16: c2e5c2f0 00009032 c2e5c2c0 c2e5c000 00000100 00000000 c2e5c340 00000098
[ 35.020440] GPR24: 00000260 c2428760 00000800 c153b800 00000000 c1018c98 c15d0000 c15d1b60
[ 35.029120] NIP [c003e3c4] local_bh_enable+0x80/0xc4
[ 35.034174] LR [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
[ 35.040652] Call Trace:
[ 35.043128] [c15d1b60] [c003e32c] local_bh_disable+0x1c/0x34 (unreliable)
[ 35.050001] [c15d1b70] [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
[ 35.057205] [c15d1b80] [c02c6370] nf_conntrack_destroy+0x3c/0x70
[ 35.063263] --- Exception: c428168c at 0xc15d1c50
[ 35.063272] LR = 0xc15d1c40
[ 35.071165] [c15d1ba0] [c0286f3c] skb_release_head_state+0x100/0x104 (unreliable)
[ 35.078718] [c15d1bb0] [c0288340] skb_recycle_check+0x8c/0x10c
[ 35.084611] [c15d1bc0] [c01e1688] gfar_poll+0x190/0x384
[ 35.089887] [c15d1c10] [c02935ac] net_rx_action+0xec/0x22c
[ 35.095432] [c15d1c50] [c003dd8c] __do_softirq+0xe8/0x224
[ 35.100885] [c15d1ca0] [c000624c] do_softirq+0x78/0x80
[ 35.106071] [c15d1cb0] [c003d868] irq_exit+0x60/0x78
[ 35.111082] [c15d1cc0] [c0006714] do_IRQ+0x98/0xb0
[ 35.115921] [c15d1ce0] [c0014af8] ret_from_except+0x0/0x14
[ 35.121474] --- Exception: 501 at strcmp+0xc/0x24
[ 35.121483] LR = find_symbol_in_section+0x38/0xc0
[ 35.131285] [c15d1da0] [00000000] (null) (unreliable)
[ 35.136390] [c15d1dc0] [c0064e08] each_symbol_in_section+0x7c/0xb4
[ 35.142623] [c15d1df0] [c0065340] each_symbol+0x34/0x148
[ 35.147983] [c15d1e70] [c0065488] find_symbol+0x34/0x78
[ 35.153257] [c15d1ea0] [c00681d8] load_module+0x8e4/0x12ec
[ 35.158792] [c15d1f20] [c0068c60] sys_init_module+0x80/0x208
[ 35.164501] [c15d1f40] [c0014460] ret_from_syscall+0x0/0x38
[ 35.170124] --- Exception: c01 at 0xfea6a8c
[ 35.170132] LR = 0x10016dcc
[ 35.177485] Instruction dump:
[ 35.180477] 70090004 40820068 81610000 800b0004 bbcbfff8 7d615b78 7c0803a6 4e800020
[ 35.188332] 3d20c045 8009b3c0 7c000034 5400d97e <0f000000> 2f800000 419effa8 38000001
^ permalink raw reply
* [PATCH 3/6] Staging: octeon-ethernet: Assign proper MAC addresses.
From: Ralf Baechle @ 2009-11-05 15:25 UTC (permalink / raw)
To: Linus Torvalds
Cc: David Daney, Greg Kroah-Hartman, devel, linux-kernel, linux-mips,
netdev
In-Reply-To: <20091105152555.227009519@linux-mips.org>
[-- Attachment #1: 0004.patch --]
[-- Type: text/plain, Size: 4018 bytes --]
From: David Daney <ddaney@caviumnetworks.com>
Allocate MAC addresses using the same method as the bootloader. This
avoids changing the MAC between bootloader and kernel operation as
well as avoiding duplicates and use of addresses outside of the
assigned range.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/staging/octeon/ethernet.c | 53 +++++++++++++++++++++++++++++---------
1 file changed, 41 insertions(+), 12 deletions(-)
Index: upstream-linus/drivers/staging/octeon/ethernet.c
===================================================================
--- upstream-linus.orig/drivers/staging/octeon/ethernet.c
+++ upstream-linus/drivers/staging/octeon/ethernet.c
@@ -111,6 +111,16 @@ MODULE_PARM_DESC(disable_core_queueing,
"\tallows packets to be sent without lock contention in the packet\n"
"\tscheduler resulting in some cases in improved throughput.\n");
+
+/*
+ * The offset from mac_addr_base that should be used for the next port
+ * that is configured. By convention, if any mgmt ports exist on the
+ * chip, they get the first mac addresses, The ports controlled by
+ * this driver are numbered sequencially following any mgmt addresses
+ * that may exist.
+ */
+static unsigned int cvm_oct_mac_addr_offset;
+
/**
* Periodic timer to check auto negotiation
*/
@@ -474,16 +484,30 @@ static int cvm_oct_common_set_mac_addres
*/
int cvm_oct_common_init(struct net_device *dev)
{
- static int count;
- char mac[8] = { 0x00, 0x00,
- octeon_bootinfo->mac_addr_base[0],
- octeon_bootinfo->mac_addr_base[1],
- octeon_bootinfo->mac_addr_base[2],
- octeon_bootinfo->mac_addr_base[3],
- octeon_bootinfo->mac_addr_base[4],
- octeon_bootinfo->mac_addr_base[5] + count
- };
struct octeon_ethernet *priv = netdev_priv(dev);
+ struct sockaddr sa;
+ u64 mac = ((u64)(octeon_bootinfo->mac_addr_base[0] & 0xff) << 40) |
+ ((u64)(octeon_bootinfo->mac_addr_base[1] & 0xff) << 32) |
+ ((u64)(octeon_bootinfo->mac_addr_base[2] & 0xff) << 24) |
+ ((u64)(octeon_bootinfo->mac_addr_base[3] & 0xff) << 16) |
+ ((u64)(octeon_bootinfo->mac_addr_base[4] & 0xff) << 8) |
+ (u64)(octeon_bootinfo->mac_addr_base[5] & 0xff);
+
+ mac += cvm_oct_mac_addr_offset;
+ sa.sa_data[0] = (mac >> 40) & 0xff;
+ sa.sa_data[1] = (mac >> 32) & 0xff;
+ sa.sa_data[2] = (mac >> 24) & 0xff;
+ sa.sa_data[3] = (mac >> 16) & 0xff;
+ sa.sa_data[4] = (mac >> 8) & 0xff;
+ sa.sa_data[5] = mac & 0xff;
+
+ if (cvm_oct_mac_addr_offset >= octeon_bootinfo->mac_addr_count)
+ printk(KERN_DEBUG "%s: Using MAC outside of the assigned range:"
+ " %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
+ sa.sa_data[0] & 0xff, sa.sa_data[1] & 0xff,
+ sa.sa_data[2] & 0xff, sa.sa_data[3] & 0xff,
+ sa.sa_data[4] & 0xff, sa.sa_data[5] & 0xff);
+ cvm_oct_mac_addr_offset++;
/*
* Force the interface to use the POW send if always_use_pow
@@ -496,14 +520,12 @@ int cvm_oct_common_init(struct net_devic
if (priv->queue != -1 && USE_HW_TCPUDP_CHECKSUM)
dev->features |= NETIF_F_IP_CSUM;
- count++;
-
/* We do our own locking, Linux doesn't need to */
dev->features |= NETIF_F_LLTX;
SET_ETHTOOL_OPS(dev, &cvm_oct_ethtool_ops);
cvm_oct_mdio_setup_device(dev);
- dev->netdev_ops->ndo_set_mac_address(dev, mac);
+ dev->netdev_ops->ndo_set_mac_address(dev, &sa);
dev->netdev_ops->ndo_change_mtu(dev, dev->mtu);
/*
@@ -620,6 +642,13 @@ static int __init cvm_oct_init_module(vo
pr_notice("cavium-ethernet %s\n", OCTEON_ETHERNET_VERSION);
+ if (OCTEON_IS_MODEL(OCTEON_CN52XX))
+ cvm_oct_mac_addr_offset = 2; /* First two are the mgmt ports. */
+ else if (OCTEON_IS_MODEL(OCTEON_CN56XX))
+ cvm_oct_mac_addr_offset = 1; /* First one is the mgmt port. */
+ else
+ cvm_oct_mac_addr_offset = 0;
+
cvm_oct_proc_initialize();
cvm_oct_rx_initialize();
cvm_oct_configure_common_hw();
^ permalink raw reply
* [PATCH 2/6] Staging: Octeon: Use symbolic values for irq numbers.
From: Ralf Baechle @ 2009-11-05 15:25 UTC (permalink / raw)
To: Linus Torvalds
Cc: David Daney, Greg Kroah-Hartman, devel, linux-kernel, linux-mips,
netdev
In-Reply-To: <20091105152555.227009519@linux-mips.org>
[-- Attachment #1: 0003.patch --]
[-- Type: text/plain, Size: 1062 bytes --]
From: David Daney <ddaney@caviumnetworks.com>
In addition to being magic numbers, the irq number passed to free_irq
is incorrect. We need to use the correct symbolic value instead.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/staging/octeon/ethernet-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: upstream-linus/drivers/staging/octeon/ethernet-spi.c
===================================================================
--- upstream-linus.orig/drivers/staging/octeon/ethernet-spi.c
+++ upstream-linus/drivers/staging/octeon/ethernet-spi.c
@@ -317,6 +317,6 @@ void cvm_oct_spi_uninit(struct net_devic
cvmx_write_csr(CVMX_SPXX_INT_MSK(interface), 0);
cvmx_write_csr(CVMX_STXX_INT_MSK(interface), 0);
}
- free_irq(8 + 46, &number_spi_ports);
+ free_irq(OCTEON_IRQ_RML, &number_spi_ports);
}
}
^ permalink raw reply
* [PATCH 1/6] Staging: Octeon: Fix compile error in drivers/staging/octeon/ethernet-mdio.c
From: Ralf Baechle @ 2009-11-05 15:25 UTC (permalink / raw)
To: Linus Torvalds
Cc: David Daney, Greg Kroah-Hartman, devel, linux-kernel, linux-mips,
netdev
In-Reply-To: <20091105152555.227009519@linux-mips.org>
[-- Attachment #1: 0002.patch --]
[-- Type: text/plain, Size: 960 bytes --]
From: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/staging/octeon/ethernet-mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: upstream-linus/drivers/staging/octeon/ethernet-mdio.c
===================================================================
--- upstream-linus.orig/drivers/staging/octeon/ethernet-mdio.c
+++ upstream-linus/drivers/staging/octeon/ethernet-mdio.c
@@ -170,7 +170,7 @@ static u32 cvm_oct_get_link(struct net_d
return ret;
}
-struct const ethtool_ops cvm_oct_ethtool_ops = {
+const struct ethtool_ops cvm_oct_ethtool_ops = {
.get_drvinfo = cvm_oct_get_drvinfo,
.get_settings = cvm_oct_get_settings,
.set_settings = cvm_oct_set_settings,
^ permalink raw reply
* [net-next 10/10] bnx2x: version 1.52.1-3
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 6f16547..61974b7 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -56,8 +56,8 @@
#include "bnx2x_init_ops.h"
#include "bnx2x_dump.h"
-#define DRV_MODULE_VERSION "1.52.1-1"
-#define DRV_MODULE_RELDATE "2009/10/13"
+#define DRV_MODULE_VERSION "1.52.1-3"
+#define DRV_MODULE_RELDATE "2009/11/05"
#define BNX2X_BC_VER 0x040200
#include <linux/firmware.h>
--
1.6.5.2
^ permalink raw reply related
* [net-next 08/10] bnx2x: Fix 10G mode in BCM8481/BCM84823
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_link.c | 38 ++++++++------------------------------
drivers/net/bnx2x_reg.h | 1 +
2 files changed, 9 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index 1b73c1d..d2c9e19 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -3533,8 +3533,8 @@ static void bnx2x_8481_set_10G_led_mode(struct link_params *params,
MDIO_PMA_REG_8481_LINK_SIGNAL,
&val1);
/* Set bit 2 to 0, and bits [1:0] to 10 */
- val1 &= ~((1<<0) | (1<<2)); /* Clear bits 0,2*/
- val1 |= (1<<1); /* Set bit 1 */
+ val1 &= ~((1<<0) | (1<<2) | (1<<7)); /* Clear bits 0,2,7*/
+ val1 |= ((1<<1) | (1<<6)); /* Set bit 1, 6 */
bnx2x_cl45_write(bp, params->port,
ext_phy_type,
@@ -3568,36 +3568,19 @@ static void bnx2x_8481_set_10G_led_mode(struct link_params *params,
MDIO_PMA_REG_8481_LED2_MASK,
0);
- /* LED3 (10G/1G/100/10G Activity) */
- bnx2x_cl45_read(bp, params->port,
- ext_phy_type,
- ext_phy_addr,
- MDIO_PMA_DEVAD,
- MDIO_PMA_REG_8481_LINK_SIGNAL,
- &val1);
- /* Enable blink based on source 4(Activity) */
- val1 &= ~((1<<7) | (1<<8)); /* Clear bits 7,8 */
- val1 |= (1<<6); /* Set only bit 6 */
+ /* Unmask LED3 for 10G link */
bnx2x_cl45_write(bp, params->port,
ext_phy_type,
ext_phy_addr,
MDIO_PMA_DEVAD,
- MDIO_PMA_REG_8481_LINK_SIGNAL,
- val1);
-
- bnx2x_cl45_read(bp, params->port,
- ext_phy_type,
- ext_phy_addr,
- MDIO_PMA_DEVAD,
MDIO_PMA_REG_8481_LED3_MASK,
- &val1);
- val1 |= (1<<4); /* Unmask LED3 for 10G link */
+ 0x6);
bnx2x_cl45_write(bp, params->port,
ext_phy_type,
ext_phy_addr,
MDIO_PMA_DEVAD,
- MDIO_PMA_REG_8481_LED3_MASK,
- val1);
+ MDIO_PMA_REG_8481_LED3_BLINK,
+ 0);
}
@@ -4476,17 +4459,12 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) {
DP(NETIF_MSG_LINK, "Advertising 10G\n");
/* Restart autoneg for 10G*/
- bnx2x_cl45_read(bp, params->port,
- ext_phy_type,
- ext_phy_addr,
- MDIO_AN_DEVAD,
- MDIO_AN_REG_CTRL, &val);
- val |= 0x200;
+
bnx2x_cl45_write(bp, params->port,
ext_phy_type,
ext_phy_addr,
MDIO_AN_DEVAD,
- MDIO_AN_REG_CTRL, val);
+ MDIO_AN_REG_CTRL, 0x3200);
}
} else {
/* Force speed */
diff --git a/drivers/net/bnx2x_reg.h b/drivers/net/bnx2x_reg.h
index 4be9bab..b668173 100644
--- a/drivers/net/bnx2x_reg.h
+++ b/drivers/net/bnx2x_reg.h
@@ -5129,6 +5129,7 @@ Theotherbitsarereservedandshouldbezero*/
#define MDIO_PMA_REG_8481_LED1_MASK 0xa82c
#define MDIO_PMA_REG_8481_LED2_MASK 0xa82f
#define MDIO_PMA_REG_8481_LED3_MASK 0xa832
+#define MDIO_PMA_REG_8481_LED3_BLINK 0xa834
#define MDIO_PMA_REG_8481_SIGNAL_MASK 0xa835
#define MDIO_PMA_REG_8481_LINK_SIGNAL 0xa83b
--
1.6.5.2
^ permalink raw reply related
* [net-next 09/10] bnx2x: Fix register access timeout in 10M
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
In BCM8481 when link speed goes from 1G to 10M, driver received timeout
since the MAC clock hasn't synced yet with the new speed, so it is required
first to program the MAC with the new speed, and only then configure other
parameters
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_link.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index d2c9e19..41b9b7b 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -6322,10 +6322,11 @@ static u8 bnx2x_update_link_up(struct link_params *params,
bnx2x_bmac_enable(params, vars, 0);
bnx2x_set_led(params, LED_MODE_OPER, SPEED_10000);
} else {
- bnx2x_emac_enable(params, vars, 0);
rc = bnx2x_emac_program(params, vars->line_speed,
vars->duplex);
+ bnx2x_emac_enable(params, vars, 0);
+
/* AN complete? */
if (gp_status & MDIO_AN_CL73_OR_37_COMPLETE) {
if (!(vars->phy_flags &
--
1.6.5.2
^ permalink raw reply related
* [net-next 05/10] bnx2x: Modify BCM8706 link init seq
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
Modify BCM8706 link initialization sequence so that first it link up between
Serdes and BCM8706, and only then between BCM8706 to network
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_link.c | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index 4c16a46..b08ff77 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -1930,6 +1930,8 @@ static u8 bnx2x_link_settings_status(struct link_params *params,
(XGXS_EXT_PHY_TYPE(params->ext_phy_config) ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) ||
(XGXS_EXT_PHY_TYPE(params->ext_phy_config) ==
+ PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) ||
+ (XGXS_EXT_PHY_TYPE(params->ext_phy_config) ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726))) {
vars->autoneg = AUTO_NEG_ENABLED;
@@ -3772,19 +3774,6 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
}
}
/* Force speed */
- /* First enable LASI */
- bnx2x_cl45_write(bp, params->port,
- ext_phy_type,
- ext_phy_addr,
- MDIO_PMA_DEVAD,
- MDIO_PMA_REG_RX_ALARM_CTRL,
- 0x0400);
- bnx2x_cl45_write(bp, params->port,
- ext_phy_type,
- ext_phy_addr,
- MDIO_PMA_DEVAD,
- MDIO_PMA_REG_LASI_CTRL, 0x0004);
-
if (params->req_line_speed == SPEED_10000) {
DP(NETIF_MSG_LINK, "XGXS 8706 force 10Gbps\n");
@@ -3794,6 +3783,9 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
MDIO_PMA_DEVAD,
MDIO_PMA_REG_DIGITAL_CTRL,
0x400);
+ bnx2x_cl45_write(bp, params->port, ext_phy_type,
+ ext_phy_addr, MDIO_PMA_DEVAD,
+ MDIO_PMA_REG_LASI_CTRL, 1);
} else {
/* Force 1Gbps using autoneg with 1G
advertisment */
@@ -3835,6 +3827,17 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
MDIO_AN_DEVAD,
MDIO_AN_REG_CTRL,
0x1200);
+ bnx2x_cl45_write(bp, params->port,
+ ext_phy_type,
+ ext_phy_addr,
+ MDIO_PMA_DEVAD,
+ MDIO_PMA_REG_RX_ALARM_CTRL,
+ 0x0400);
+ bnx2x_cl45_write(bp, params->port,
+ ext_phy_type,
+ ext_phy_addr,
+ MDIO_PMA_DEVAD,
+ MDIO_PMA_REG_LASI_CTRL, 0x0004);
}
bnx2x_save_bcm_spirom_ver(bp, params->port,
@@ -5952,6 +5955,7 @@ static u8 bnx2x_link_initialize(struct link_params *params,
if (non_ext_phy ||
(ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) ||
+ (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) ||
(ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) ||
(params->loopback_mode == LOOPBACK_EXT_PHY)) {
if (params->req_line_speed == SPEED_AUTO_NEG)
@@ -6421,6 +6425,7 @@ u8 bnx2x_link_update(struct link_params *params, struct link_vars *vars)
if ((ext_phy_type != PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT) &&
(ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) &&
+ (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) &&
(ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) &&
(ext_phy_link_up && !vars->phy_link_up))
bnx2x_init_internal_phy(params, vars, 0);
--
1.6.5.2
^ permalink raw reply related
* [net-next 07/10] bnx2x: Fix BCM8726 ROM load seq
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_link.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index 7897fe1..1b73c1d 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -2592,16 +2592,11 @@ static void bnx2x_bcm8726_external_rom_boot(struct link_params *params)
/* Need to wait 100ms after reset */
msleep(100);
- /* Set serial boot control for external load */
- bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr,
- MDIO_PMA_DEVAD,
- MDIO_PMA_REG_MISC_CTRL1, 0x0001);
-
/* Micro controller re-boot */
bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr,
MDIO_PMA_DEVAD,
MDIO_PMA_REG_GEN_CTRL,
- MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP);
+ 0x018B);
/* Set soft reset */
bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr,
@@ -2609,14 +2604,10 @@ static void bnx2x_bcm8726_external_rom_boot(struct link_params *params)
MDIO_PMA_REG_GEN_CTRL,
MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET);
- /* Set PLL register value to be same like in P13 ver */
bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr,
MDIO_PMA_DEVAD,
- MDIO_PMA_REG_PLL_CTRL,
- 0x73A0);
+ MDIO_PMA_REG_MISC_CTRL1, 0x0001);
- /* Clear soft reset.
- Will automatically reset micro-controller re-boot */
bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr,
MDIO_PMA_DEVAD,
MDIO_PMA_REG_GEN_CTRL,
--
1.6.5.2
^ permalink raw reply related
* [net-next 06/10] bnx2x: Add support for BCM84823
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
Add support for new phy type BCM84823 (Dual copper-port phy)
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_hsi.h | 1 +
drivers/net/bnx2x_link.c | 44 +++++++++++++++++++++++++++++++++++++++++---
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnx2x_hsi.h b/drivers/net/bnx2x_hsi.h
index dc2f8ed..5258533 100644
--- a/drivers/net/bnx2x_hsi.h
+++ b/drivers/net/bnx2x_hsi.h
@@ -264,6 +264,7 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */
#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101 0x00000800
#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727 0x00000900
#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727_NOC 0x00000a00
+#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823 0x00000b00
#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE 0x0000fd00
#define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN 0x0000ff00
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index b08ff77..7897fe1 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -2200,6 +2200,8 @@ static void bnx2x_ext_phy_reset(struct link_params *params,
MDIO_PMA_REG_CTRL,
1<<15);
break;
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
+ break;
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE:
DP(NETIF_MSG_LINK, "XGXS PHY Failure detected\n");
break;
@@ -4373,6 +4375,7 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
break;
}
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481:
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
/* This phy uses the NIG latch mechanism since link
indication arrives through its LED4 and not via
its LASI signal, so we get steady signal
@@ -4380,6 +4383,12 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars)
bnx2x_bits_en(bp, NIG_REG_LATCH_BC_0 + params->port*4,
1 << NIG_LATCH_BC_ENABLE_MI_INT);
+ bnx2x_cl45_write(bp, params->port,
+ PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481,
+ ext_phy_addr,
+ MDIO_PMA_DEVAD,
+ MDIO_PMA_REG_CTRL, 0x0000);
+
bnx2x_8481_set_led4(params, ext_phy_type, ext_phy_addr);
if (params->req_line_speed == SPEED_AUTO_NEG) {
@@ -5230,6 +5239,7 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params,
}
break;
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481:
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
/* Check 10G-BaseT link status */
/* Check PMD signal ok */
bnx2x_cl45_read(bp, params->port, ext_phy_type,
@@ -5445,8 +5455,10 @@ static void bnx2x_link_int_ack(struct link_params *params,
(NIG_STATUS_XGXS0_LINK10G |
NIG_STATUS_XGXS0_LINK_STATUS |
NIG_STATUS_SERDES0_LINK_STATUS));
- if (XGXS_EXT_PHY_TYPE(params->ext_phy_config)
- == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481) {
+ if ((XGXS_EXT_PHY_TYPE(params->ext_phy_config)
+ == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481) ||
+ (XGXS_EXT_PHY_TYPE(params->ext_phy_config)
+ == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823)) {
bnx2x_8481_rearm_latch_signal(bp, port, is_mi_int);
}
if (vars->phy_link_up) {
@@ -5559,6 +5571,7 @@ u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
status = bnx2x_format_ver(spirom_ver, version, len);
break;
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481:
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
spirom_ver = ((spirom_ver & 0xF80) >> 7) << 16 |
(spirom_ver & 0x7F);
status = bnx2x_format_ver(spirom_ver, version, len);
@@ -6250,6 +6263,22 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
bnx2x_8726_reset_phy(bp, params->port, ext_phy_addr);
break;
}
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
+ {
+ u8 ext_phy_addr =
+ XGXS_EXT_PHY_ADDR(params->ext_phy_config);
+ bnx2x_cl45_write(bp, port,
+ PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481,
+ ext_phy_addr,
+ MDIO_AN_DEVAD,
+ MDIO_AN_REG_CTRL, 0x0000);
+ bnx2x_cl45_write(bp, port,
+ PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481,
+ ext_phy_addr,
+ MDIO_PMA_DEVAD,
+ MDIO_PMA_REG_CTRL, 1);
+ break;
+ }
default:
/* HW reset */
bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1,
@@ -6661,6 +6690,13 @@ static u8 bnx2x_8726_common_init_phy(struct bnx2x *bp, u32 shmem_base)
return 0;
}
+
+static u8 bnx2x_84823_common_init_phy(struct bnx2x *bp, u32 shmem_base)
+{
+ /* HW reset */
+ bnx2x_ext_phy_hw_reset(bp, 1);
+ return 0;
+}
u8 bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base)
{
u8 rc = 0;
@@ -6690,7 +6726,9 @@ u8 bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base)
/* GPIO1 affects both ports, so there's need to pull
it for single port alone */
rc = bnx2x_8726_common_init_phy(bp, shmem_base);
-
+ break;
+ case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823:
+ rc = bnx2x_84823_common_init_phy(bp, shmem_base);
break;
default:
DP(NETIF_MSG_LINK,
--
1.6.5.2
^ permalink raw reply related
* [net-next 04/10] bnx2x: Enable FC when parallel-detect is used
From: Yaniv Rosner @ 2009-11-05 17:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eilong
When parallel detect is used, flow-control is set to the req_fc_auto_adv
instead of none.
Motive: when 577xx is FC configuration is set to AUTO, while LP speed is set to
FORCE mode and FC to force RX/TX, link would come up using parallel detect, and
the FC will be set to NONE since FC capabilities were not negotiated, although
the LP is setting FC to force RX/TX.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_link.c | 37 +++++++++++++++++++++++++++++++++++++
drivers/net/bnx2x_reg.h | 4 ++++
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index bf1021e..4c16a46 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -1621,6 +1621,39 @@ static u8 bnx2x_ext_phy_resolve_fc(struct link_params *params,
return ret;
}
+static u8 bnx2x_direct_parallel_detect_used(struct link_params *params)
+{
+ struct bnx2x *bp = params->bp;
+ u16 pd_10g, status2_1000x;
+ CL45_RD_OVER_CL22(bp, params->port,
+ params->phy_addr,
+ MDIO_REG_BANK_SERDES_DIGITAL,
+ MDIO_SERDES_DIGITAL_A_1000X_STATUS2,
+ &status2_1000x);
+ CL45_RD_OVER_CL22(bp, params->port,
+ params->phy_addr,
+ MDIO_REG_BANK_SERDES_DIGITAL,
+ MDIO_SERDES_DIGITAL_A_1000X_STATUS2,
+ &status2_1000x);
+ if (status2_1000x & MDIO_SERDES_DIGITAL_A_1000X_STATUS2_AN_DISABLED) {
+ DP(NETIF_MSG_LINK, "1G parallel detect link on port %d\n",
+ params->port);
+ return 1;
+ }
+
+ CL45_RD_OVER_CL22(bp, params->port,
+ params->phy_addr,
+ MDIO_REG_BANK_10G_PARALLEL_DETECT,
+ MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_STATUS,
+ &pd_10g);
+
+ if (pd_10g & MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_STATUS_PD_LINK) {
+ DP(NETIF_MSG_LINK, "10G parallel detect link on port %d\n",
+ params->port);
+ return 1;
+ }
+ return 0;
+}
static void bnx2x_flow_ctrl_resolve(struct link_params *params,
struct link_vars *vars,
@@ -1639,6 +1672,10 @@ static void bnx2x_flow_ctrl_resolve(struct link_params *params,
(!(vars->phy_flags & PHY_SGMII_FLAG)) &&
(XGXS_EXT_PHY_TYPE(params->ext_phy_config) ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT)) {
+ if (bnx2x_direct_parallel_detect_used(params)) {
+ vars->flow_ctrl = params->req_fc_auto_adv;
+ return;
+ }
if ((gp_status &
(MDIO_GP_STATUS_TOP_AN_STATUS1_CL73_AUTONEG_COMPLETE |
MDIO_GP_STATUS_TOP_AN_STATUS1_CL73_MR_LP_NP_AN_ABLE)) ==
diff --git a/drivers/net/bnx2x_reg.h b/drivers/net/bnx2x_reg.h
index b80fde4..4be9bab 100644
--- a/drivers/net/bnx2x_reg.h
+++ b/drivers/net/bnx2x_reg.h
@@ -4920,6 +4920,8 @@
#define MDIO_REG_BANK_10G_PARALLEL_DETECT 0x8130
+#define MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_STATUS 0x10
+#define MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_STATUS_PD_LINK 0x8000
#define MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_CONTROL 0x11
#define MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_CONTROL_PARDET10G_EN 0x1
#define MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_LINK 0x13
@@ -4944,6 +4946,8 @@
#define MDIO_SERDES_DIGITAL_A_1000X_STATUS1_SPEED_1G 0x0010
#define MDIO_SERDES_DIGITAL_A_1000X_STATUS1_SPEED_100M 0x0008
#define MDIO_SERDES_DIGITAL_A_1000X_STATUS1_SPEED_10M 0x0000
+#define MDIO_SERDES_DIGITAL_A_1000X_STATUS2 0x15
+#define MDIO_SERDES_DIGITAL_A_1000X_STATUS2_AN_DISABLED 0x0002
#define MDIO_SERDES_DIGITAL_MISC1 0x18
#define MDIO_SERDES_DIGITAL_MISC1_REFCLK_SEL_MASK 0xE000
#define MDIO_SERDES_DIGITAL_MISC1_REFCLK_SEL_25M 0x0000
--
1.6.5.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox