Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266735 > unrolled thread
| Started by | Mason <slash.tmp@free.fr> |
|---|---|
| First post | 2015-11-10 20:20 +0100 |
| Last post | 2015-11-12 18:30 +0100 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Mason <slash.tmp@free.fr> - 2015-11-10 20:20 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-10 20:30 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Mason <slash.tmp@free.fr> - 2015-11-12 14:40 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-12 15:10 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Mason <slash.tmp@free.fr> - 2015-11-12 17:20 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-12 18:00 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-12 18:30 +0100
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Date | 2015-11-10 20:20 +0100 |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Message-ID | <qtmCu-IR-23@gated-at.bofh.it> |
On 10/11/2015 17:14, Mans Rullgard wrote: > This adds a driver for the Aurora VLSI NB8800 Ethernet controller. > It is an almost complete rewrite of a driver originally found in > a Sigma Designs 2.6.22 tree. > > Signed-off-by: Mans Rullgard <mans@mansr.com> > --- > Changes: > - Refactored mdio access functions > - Refactored register access helpers > - Improved error handling in rx buffer allocation > - Optimised some fifo parameters > - Overhauled tx dma. Multiple packets are now chained in a single dma > operation if xmit_more is set, improving performance. > - Improved rx irq handling. It's not possible to disable interrupts > entirely for napi poll, but they can be slowed down a little. > - Use readx_poll_timeout in various places > - Improved error detection > - Improved statistics > - Report hardware statistics counters through ethtool > - Improved tangox-specific setup > - Support for flow control using pause frames > - Explanatory comments added > - Various minor stylistic changes > --- > drivers/net/ethernet/Kconfig | 1 + > drivers/net/ethernet/Makefile | 1 + > drivers/net/ethernet/aurora/Kconfig | 20 + > drivers/net/ethernet/aurora/Makefile | 1 + > drivers/net/ethernet/aurora/nb8800.c | 1530 ++++++++++++++++++++++++++++++++++ > drivers/net/ethernet/aurora/nb8800.h | 314 +++++++ > 6 files changed, 1867 insertions(+) The code has grown much since the previous patch, despite some refactoring. Is this mostly due to ethtool_ops support? drivers/net/ethernet/aurora/nb8800.c | 1146 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/aurora/nb8800.h | 230 +++++++ Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-11-10 20:30 +0100 |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Message-ID | <qtmMa-MK-23@gated-at.bofh.it> |
| In reply to | #1266735 |
Mason <slash.tmp@free.fr> writes: > On 10/11/2015 17:14, Mans Rullgard wrote: > >> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >> It is an almost complete rewrite of a driver originally found in >> a Sigma Designs 2.6.22 tree. >> >> Signed-off-by: Mans Rullgard <mans@mansr.com> >> --- >> Changes: >> - Refactored mdio access functions >> - Refactored register access helpers >> - Improved error handling in rx buffer allocation >> - Optimised some fifo parameters >> - Overhauled tx dma. Multiple packets are now chained in a single dma >> operation if xmit_more is set, improving performance. >> - Improved rx irq handling. It's not possible to disable interrupts >> entirely for napi poll, but they can be slowed down a little. >> - Use readx_poll_timeout in various places >> - Improved error detection >> - Improved statistics >> - Report hardware statistics counters through ethtool >> - Improved tangox-specific setup >> - Support for flow control using pause frames >> - Explanatory comments added >> - Various minor stylistic changes >> --- >> drivers/net/ethernet/Kconfig | 1 + >> drivers/net/ethernet/Makefile | 1 + >> drivers/net/ethernet/aurora/Kconfig | 20 + >> drivers/net/ethernet/aurora/Makefile | 1 + >> drivers/net/ethernet/aurora/nb8800.c | 1530 ++++++++++++++++++++++++++++++++++ >> drivers/net/ethernet/aurora/nb8800.h | 314 +++++++ >> 6 files changed, 1867 insertions(+) > > The code has grown much since the previous patch, despite some > refactoring. Is this mostly due to ethtool_ops support? > > drivers/net/ethernet/aurora/nb8800.c | 1146 ++++++++++++++++++++++++++++++++++ > drivers/net/ethernet/aurora/nb8800.h | 230 +++++++ Some of the increase is from new features, some from improvements, and then there are a bunch of new comments. -- Måns Rullgård mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Date | 2015-11-12 14:40 +0100 |
| Message-ID | <qu0gy-136-9@gated-at.bofh.it> |
| In reply to | #1266741 |
On 10/11/2015 20:25, Måns Rullgård wrote: > Mason writes: > >> On 10/11/2015 17:14, Mans Rullgard wrote: >> >>> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >>> It is an almost complete rewrite of a driver originally found in >>> a Sigma Designs 2.6.22 tree. >>> >>> Signed-off-by: Mans Rullgard <mans@mansr.com> >>> --- >>> Changes: >>> - Refactored mdio access functions >>> - Refactored register access helpers >>> - Improved error handling in rx buffer allocation >>> - Optimised some fifo parameters >>> - Overhauled tx dma. Multiple packets are now chained in a single dma >>> operation if xmit_more is set, improving performance. >>> - Improved rx irq handling. It's not possible to disable interrupts >>> entirely for napi poll, but they can be slowed down a little. >>> - Use readx_poll_timeout in various places >>> - Improved error detection >>> - Improved statistics >>> - Report hardware statistics counters through ethtool >>> - Improved tangox-specific setup >>> - Support for flow control using pause frames >>> - Explanatory comments added >>> - Various minor stylistic changes >>> --- >>> drivers/net/ethernet/Kconfig | 1 + >>> drivers/net/ethernet/Makefile | 1 + >>> drivers/net/ethernet/aurora/Kconfig | 20 + >>> drivers/net/ethernet/aurora/Makefile | 1 + >>> drivers/net/ethernet/aurora/nb8800.c | 1530 ++++++++++++++++++++++++++++++++++ >>> drivers/net/ethernet/aurora/nb8800.h | 314 +++++++ >>> 6 files changed, 1867 insertions(+) >> >> The code has grown much since the previous patch, despite some >> refactoring. Is this mostly due to ethtool_ops support? >> >> drivers/net/ethernet/aurora/nb8800.c | 1146 ++++++++++++++++++++++++++++++++++ >> drivers/net/ethernet/aurora/nb8800.h | 230 +++++++ > > Some of the increase is from new features, some from improvements, and > then there are a bunch of new comments. Sweet. With this version, my kernel boots faster than before (I had been using a 5 month-old version.) Before: [ 0.613623] tangox-enet 26000.ethernet: SMP86xx internal Ethernet at 0x26000 [ 0.623638] libphy: tangox-mii: probed [ 0.686527] tangox-enet 26000.ethernet: PHY: found Atheros 8035 ethernet at 0x4 [ 0.697169] tangox-enet 26000.ethernet eth0: MAC address 00:16:e8:02:08:42 ... [ 1.306360] Sending DHCP requests .. [ 4.699969] tangox-enet 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 8.899671] ., OK [ 8.926343] IP-Config: Got DHCP answer from 172.27.200.1, my address is 172.27.64.49 ... [ 8.987327] Freeing unused kernel memory: 168K (c039e000 - c03c8000) After: [ 0.623526] libphy: nb8800-mii: probed [ 0.628092] nb8800 26000.ethernet eth0: MAC address 00:16:e8:02:08:42 ... [ 4.732948] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 4.752655] Sending DHCP requests ., OK [ 4.782644] IP-Config: Got DHCP answer from 172.27.200.1, my address is 172.27.64.49 ... [ 4.849298] Freeing unused kernel memory: 164K (c039f000 - c03c8000) The DHCP request is sent later, but the kernel doesn't twiddle its thumbs for 4 seconds after the link comes up. Does this come from not probing the PHY anymore? BTW, you're not using the PHY IRQ, right? I think I remember you saying it didn't work reliably? Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-11-12 15:10 +0100 |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Message-ID | <qu0JA-1tl-27@gated-at.bofh.it> |
| In reply to | #1267922 |
Mason <slash.tmp@free.fr> writes: > On 10/11/2015 20:25, Måns Rullgård wrote: > >> Mason writes: >> >>> On 10/11/2015 17:14, Mans Rullgard wrote: >>> >>>> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >>>> It is an almost complete rewrite of a driver originally found in >>>> a Sigma Designs 2.6.22 tree. >>>> >>>> Signed-off-by: Mans Rullgard <mans@mansr.com> >>>> --- >>>> Changes: >>>> - Refactored mdio access functions >>>> - Refactored register access helpers >>>> - Improved error handling in rx buffer allocation >>>> - Optimised some fifo parameters >>>> - Overhauled tx dma. Multiple packets are now chained in a single dma >>>> operation if xmit_more is set, improving performance. >>>> - Improved rx irq handling. It's not possible to disable interrupts >>>> entirely for napi poll, but they can be slowed down a little. >>>> - Use readx_poll_timeout in various places >>>> - Improved error detection >>>> - Improved statistics >>>> - Report hardware statistics counters through ethtool >>>> - Improved tangox-specific setup >>>> - Support for flow control using pause frames >>>> - Explanatory comments added >>>> - Various minor stylistic changes >>>> --- >>>> drivers/net/ethernet/Kconfig | 1 + >>>> drivers/net/ethernet/Makefile | 1 + >>>> drivers/net/ethernet/aurora/Kconfig | 20 + >>>> drivers/net/ethernet/aurora/Makefile | 1 + >>>> drivers/net/ethernet/aurora/nb8800.c | 1530 ++++++++++++++++++++++++++++++++++ >>>> drivers/net/ethernet/aurora/nb8800.h | 314 +++++++ >>>> 6 files changed, 1867 insertions(+) >>> >>> The code has grown much since the previous patch, despite some >>> refactoring. Is this mostly due to ethtool_ops support? >>> >>> drivers/net/ethernet/aurora/nb8800.c | 1146 ++++++++++++++++++++++++++++++++++ >>> drivers/net/ethernet/aurora/nb8800.h | 230 +++++++ >> >> Some of the increase is from new features, some from improvements, and >> then there are a bunch of new comments. > > Sweet. > > With this version, my kernel boots faster than before > (I had been using a 5 month-old version.) > > Before: > > [ 0.613623] tangox-enet 26000.ethernet: SMP86xx internal Ethernet at 0x26000 > [ 0.623638] libphy: tangox-mii: probed > [ 0.686527] tangox-enet 26000.ethernet: PHY: found Atheros 8035 ethernet at 0x4 > [ 0.697169] tangox-enet 26000.ethernet eth0: MAC address 00:16:e8:02:08:42 > ... > [ 1.306360] Sending DHCP requests .. > [ 4.699969] tangox-enet 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx > [ 8.899671] ., OK > [ 8.926343] IP-Config: Got DHCP answer from 172.27.200.1, my address is 172.27.64.49 > ... > [ 8.987327] Freeing unused kernel memory: 168K (c039e000 - c03c8000) > > After: > > [ 0.623526] libphy: nb8800-mii: probed > [ 0.628092] nb8800 26000.ethernet eth0: MAC address 00:16:e8:02:08:42 > ... > [ 4.732948] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx > [ 4.752655] Sending DHCP requests ., OK > [ 4.782644] IP-Config: Got DHCP answer from 172.27.200.1, my address is 172.27.64.49 > ... > [ 4.849298] Freeing unused kernel memory: 164K (c039f000 - c03c8000) > > The DHCP request is sent later, but the kernel doesn't twiddle its thumbs > for 4 seconds after the link comes up. Does this come from not probing the > PHY anymore? No, that's from properly setting the link state initially down. > BTW, you're not using the PHY IRQ, right? I think I remember you saying > it didn't work reliably? It doesn't seem to be wired up on any of my boards, or there's some magic required to activate it that I'm unaware of. -- Måns Rullgård mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Date | 2015-11-12 17:20 +0100 |
| Message-ID | <qu2Lo-2J4-19@gated-at.bofh.it> |
| In reply to | #1267958 |
[ CCing a few knowledgeable people ]
Despite the subject, this is about an Atheros 8035 PHY :-)
On 12/11/2015 15:04, Måns Rullgård wrote:
> Mason wrote:
>
>> BTW, you're not using the PHY IRQ, right? I think I remember you saying
>> it didn't work reliably?
>
> It doesn't seem to be wired up on any of my boards, or there's some
> magic required to activate it that I'm unaware of.
Weird. The board schematics for the 1172 show Tango ETH0_MDINT# pin
properly connected to AR8035 INT pin (pin 20).
<Thinking out loud>
http://www.redeszone.net/app/uploads/2014/04/AR8035.pdf
INT pin 20
I/O, D, PD
Interrupt Signal to System; default OD-gate, needs an external
10Kohm pull-up, active low; can be configured to I/O by register,
active high.
4.1.17 Interrupt Enable
Offset: 0x12
Mode: Read/Write
Hardware Reset: 0
Strange... it looks like AT803X_INER and AT803X_INTR_ENABLE refer to
the same "Interrupt Enable" register?
In fact, AT803X_INER_INIT == 0xec00 makes sense for register 0x12:
link success/fail, speed/duplex changed, autoneg error
Looks like at803x_config_intr() is used for 8031, but not for 8035...
Relevant commit:
77a9939426f7a "phy/at8031: enable at8031 to work on interrupt mode"
If I add .config_intr and .ack_interrupt to the 8035 struct, then I get
(also added some traces)
[ 0.883517] *** at803x_config_intr: ENABLE
[ 1.576108] *** at803x_config_intr: DISABLE
[ 1.580467] *** at803x_config_intr: ENABLE
[ 1.584959] *** at803x_config_intr: DISABLE
[ 1.589297] *** at803x_config_intr: ENABLE
[ 4.321722] *** at803x_config_intr: DISABLE
[ 4.326054] *** at803x_config_intr: ENABLE
[ 4.330489] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 4.338335] *** at803x_config_intr: ENABLE
(Are all the ENABLE/DISABLE events expected?)
And if I unplug/replug the Ethernet cable,
[ 71.903051] *** at803x_config_intr: DISABLE
[ 71.907410] *** at803x_config_intr: ENABLE
[ 71.912232] nb8800 26000.ethernet eth0: Link is Down
[ 71.917309] *** at803x_config_intr: ENABLE
[ 78.008972] *** at803x_config_intr: DISABLE
[ 78.013375] *** at803x_config_intr: ENABLE
[ 78.017797] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 78.025702] *** at803x_config_intr: ENABLE
(Are all the ENABLE/DISABLE events expected there too?)
# cat /proc/interrupts
CPU0 CPU1
18: 107 0 irq0 1 Level serial
54: 5 0 irq0 37 Edge phy_interrupt
55: 4953 0 irq0 38 Level eth0
211: 1147 254 GIC 29 Edge twd
Questions:
Can't at803x_ack_interrupt() just return phy_read(phydev, AT803X_INSR);
Can at803x_config_intr() be used with the 8035
What about AT803X_INER/AT803X_INTR_ENABLE and AT803X_INSR/AT803X_INTR_STATUS
Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-11-12 18:00 +0100 |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Message-ID | <qu3o5-2Yr-11@gated-at.bofh.it> |
| In reply to | #1268071 |
Mason <slash.tmp@free.fr> writes: > [ CCing a few knowledgeable people ] > > Despite the subject, this is about an Atheros 8035 PHY :-) > > On 12/11/2015 15:04, Måns Rullgård wrote: > >> Mason wrote: >> >>> BTW, you're not using the PHY IRQ, right? I think I remember you saying >>> it didn't work reliably? >> >> It doesn't seem to be wired up on any of my boards, or there's some >> magic required to activate it that I'm unaware of. > > Weird. The board schematics for the 1172 show Tango ETH0_MDINT# pin > properly connected to AR8035 INT pin (pin 20). I have a different board. > <Thinking out loud> > > http://www.redeszone.net/app/uploads/2014/04/AR8035.pdf > > INT pin 20 > I/O, D, PD > Interrupt Signal to System; default OD-gate, needs an external > 10Kohm pull-up, active low; can be configured to I/O by register, > active high. > > 4.1.17 Interrupt Enable > Offset: 0x12 > Mode: Read/Write > Hardware Reset: 0 > > Strange... it looks like AT803X_INER and AT803X_INTR_ENABLE refer to > the same "Interrupt Enable" register? Seems like someone missed that it was already defined. > In fact, AT803X_INER_INIT == 0xec00 makes sense for register 0x12: > link success/fail, speed/duplex changed, autoneg error > > Looks like at803x_config_intr() is used for 8031, but not for 8035... > > Relevant commit: > 77a9939426f7a "phy/at8031: enable at8031 to work on interrupt mode" > > If I add .config_intr and .ack_interrupt to the 8035 struct, then I get > (also added some traces) I tried that just now, and I get nothing. What interrupt did you specify in your device tree? > Questions: > > Can't at803x_ack_interrupt() just return phy_read(phydev, AT803X_INSR); No, that would return the actual value of the register. The caller doesn't care about the value, but should be notified if there was an error. > Can at803x_config_intr() be used with the 8035 Probably. The person who sent the patch for 8031 probably happened to have that model. > What about AT803X_INER/AT803X_INTR_ENABLE and AT803X_INSR/AT803X_INTR_STATUS Accidental duplicates. -- Måns Rullgård mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-11-12 18:30 +0100 |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Message-ID | <qu3R7-3nW-13@gated-at.bofh.it> |
| In reply to | #1268107 |
Måns Rullgård <mans@mansr.com> writes: > Mason <slash.tmp@free.fr> writes: > >> [ CCing a few knowledgeable people ] >> >> Despite the subject, this is about an Atheros 8035 PHY :-) >> >> On 12/11/2015 15:04, Måns Rullgård wrote: >> >>> Mason wrote: >>> >>>> BTW, you're not using the PHY IRQ, right? I think I remember you saying >>>> it didn't work reliably? >>> >>> It doesn't seem to be wired up on any of my boards, or there's some >>> magic required to activate it that I'm unaware of. >> >> Weird. The board schematics for the 1172 show Tango ETH0_MDINT# pin >> properly connected to AR8035 INT pin (pin 20). > > I have a different board. > >> <Thinking out loud> >> >> http://www.redeszone.net/app/uploads/2014/04/AR8035.pdf >> >> INT pin 20 >> I/O, D, PD >> Interrupt Signal to System; default OD-gate, needs an external >> 10Kohm pull-up, active low; can be configured to I/O by register, >> active high. >> >> 4.1.17 Interrupt Enable >> Offset: 0x12 >> Mode: Read/Write >> Hardware Reset: 0 >> >> Strange... it looks like AT803X_INER and AT803X_INTR_ENABLE refer to >> the same "Interrupt Enable" register? > > Seems like someone missed that it was already defined. > >> In fact, AT803X_INER_INIT == 0xec00 makes sense for register 0x12: >> link success/fail, speed/duplex changed, autoneg error >> >> Looks like at803x_config_intr() is used for 8031, but not for 8035... >> >> Relevant commit: >> 77a9939426f7a "phy/at8031: enable at8031 to work on interrupt mode" >> >> If I add .config_intr and .ack_interrupt to the 8035 struct, then I get >> (also added some traces) > > I tried that just now, and I get nothing. What interrupt did you > specify in your device tree? It works with the interrupt set to trigger on rising edge. -- Måns Rullgård mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web