Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread Peter Lebbing
On 06/05/11 15:16, John Crispin wrote:
 On 06/05/11 15:13, Peter Lebbing wrote:
 So, can someone please commit my patch,
 http://patchwork.midlink.org/patch/906/ ?
 patch looks ok, let me apply it 

Problems?

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread John Crispin
On 09/05/11 16:01, Peter Lebbing wrote:
 On 06/05/11 15:16, John Crispin wrote:
 On 06/05/11 15:13, Peter Lebbing wrote:
 So, can someone please commit my patch,
 http://patchwork.midlink.org/patch/906/ ?
 patch looks ok, let me apply it 
 
 Problems?
 
 Peter.
 


apart from not liking this rather impolite single word style of
(mis-)communication i think there are no problems.

i was actually just in the process of testing your patch and getting it
ready for a commit when i received your motivational email ;)


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread John Crispin
Hi,

a very silly question  is therer a 2/2 to go with this 1/2 patch ?

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread John Crispin
On 09/05/11 16:01, Peter Lebbing wrote:
 On 06/05/11 15:16, John Crispin wrote:
 On 06/05/11 15:13, Peter Lebbing wrote:
 So, can someone please commit my patch,
 http://patchwork.midlink.org/patch/906/ ?
 patch looks ok, let me apply it 
 
 Problems?
 
 Peter.
 

applied in r26865, thx !
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread Peter Lebbing
On 09/05/11 16:10, John Crispin wrote:
 On 09/05/11 16:01, Peter Lebbing wrote:
 Problems?
 
 apart from not liking this rather impolite single word style of
 (mis-)communication i think there are no problems.

Oh, I'm very sorry. It was in no way meant to be impolite. It was simply
meant to have the same connotation as Are there any problems with the patch
that should be looked at first, but shorter. Perhaps even occupying less of
your time while reading it.

 i was actually just in the process of testing your patch and getting it
 ready for a commit when i received your motivational email ;)

Seeing how quick patch submission - commit messages sometimes ping-pong on
the list, I got the impression it was a matter of pressing a button, barring
any error messages.

So I was somewhat surprised at only having a message let me apply it, and
not the actual commit message, and was trying to pose an open question
whether it did not work out to satisfaction...

Miscommunication is the correct word here. Sorry about that.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread John Crispin
On 09/05/11 18:21, Peter Lebbing wrote:
 On 09/05/11 16:10, John Crispin wrote:
 On 09/05/11 16:01, Peter Lebbing wrote:
 Problems?

 apart from not liking this rather impolite single word style of
 (mis-)communication i think there are no problems.
 
 Oh, I'm very sorry. It was in no way meant to be impolite. It was simply
 meant to have the same connotation as Are there any problems with the patch
 that should be looked at first, but shorter. Perhaps even occupying less of
 your time while reading it.
 
 i was actually just in the process of testing your patch and getting it
 ready for a commit when i received your motivational email ;)
 
 Seeing how quick patch submission - commit messages sometimes ping-pong on
 the list, I got the impression it was a matter of pressing a button, barring
 any error messages.
 
 So I was somewhat surprised at only having a message let me apply it, and
 not the actual commit message, and was trying to pose an open question
 whether it did not work out to satisfaction...
 
 Miscommunication is the correct word here. Sorry about that.
 
 Peter.
 


no worries, i intended to apply it before the weekend, but then the
weekend arrived, bringing lots of sun, reducing the available time
considerably :)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread Peter Lebbing
On 09/05/11 17:22, John Crispin wrote:
 a very silly question  is therer a 2/2 to go with this 1/2 patch ?

That is a patch that I posted to have it available to people, but not for
inclusion in OpenWRT yet.

From my 0/2 mail:
 I am submitting for inclusion in OpenWRT the driver for the M chip. Since I
 don't have the FC chip, I cannot test if it all works as you would expect and
 hope for that chip. I still include a patch enabling its support, but not for
 inclusion in OpenWRT just now. If other people feel they have sufficiently
 tested that the driver works, they are free to submit it for inclusion
 themselves. I will try to offer support, but it's somewhat limited without
 hardware :).

The whole 0/2 mail can be found at
https://lists.openwrt.org/pipermail/openwrt-devel/2011-April/010525.html

The 2/2 patch is at http://patchwork.midlink.org/patch/899/, but I feel
people should test it more first before it should be included in OpenWRT.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread John Crispin
On 09/05/11 18:36, Peter Lebbing wrote:
 On 09/05/11 17:22, John Crispin wrote:
 a very silly question  is therer a 2/2 to go with this 1/2 patch ?
 
 That is a patch that I posted to have it available to people, but not for
 inclusion in OpenWRT yet.
 
 From my 0/2 mail:
 I am submitting for inclusion in OpenWRT the driver for the M chip. Since I
 don't have the FC chip, I cannot test if it all works as you would expect and
 hope for that chip. I still include a patch enabling its support, but not for
 inclusion in OpenWRT just now. If other people feel they have sufficiently
 tested that the driver works, they are free to submit it for inclusion
 themselves. I will try to offer support, but it's somewhat limited without
 hardware :).
 
 The whole 0/2 mail can be found at
 https://lists.openwrt.org/pipermail/openwrt-devel/2011-April/010525.html
 
 The 2/2 patch is at http://patchwork.midlink.org/patch/899/, but I feel
 people should test it more first before it should be included in OpenWRT.
 
 Peter.
 

ok, patchwork was down earlier, so i failed to find it... let me have a
look at that stuff aswell

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-09 Thread Peter Lebbing
On 09/05/11 17:24, John Crispin wrote:
 applied in r26865, thx !

Thanks, great!

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-06 Thread John Crispin
On 06/05/11 15:13, Peter Lebbing wrote:
 On 02/05/11 14:01, John Crispin wrote:
 after the very long thread on the ML, i figure no one was aware that the
 patch was complete.
 
 So, can someone please commit my patch,
 http://patchwork.midlink.org/patch/906/ ?
 
 (Or tell me why not...)
 
 Thanks,
 
 Peter.
 
patch looks ok, let me apply it 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-02 Thread Peter Lebbing
Luka Perkov wrote:
 Patch tested on D-Link 584T DSL router with ADM6996M chip. Works.
 
 Please commit.

Can I please ask why my patch isn't committed?

Also, what is the Recommended Nag Interval for asking about this? ;P

Peter.

PS: CC'd Felix as the original author of the driver, and possible committer.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-05-02 Thread John Crispin
On 02/05/11 13:57, Peter Lebbing wrote:
 Luka Perkov wrote:
 Patch tested on D-Link 584T DSL router with ADM6996M chip. Works.

 Please commit.
 
 Can I please ask why my patch isn't committed?

yes you can

 
 Also, what is the Recommended Nag Interval for asking about this? ;P

trial and error, reduce it until you get no more replies. that would be
the threshold :P

 
 Peter.
 
 PS: CC'd Felix as the original author of the driver, and possible committer.
 


after the very long thread on the ML, i figure no one was aware that the
patch was complete.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-04-18 Thread Peter Lebbing
This patch adds 802.1Q VLAN support for the ADM6996M chip.

The driver is loaded for both the FC and M model. It will detect which of the
two chips is connected. The FC model is initialised, but no further
functionality is offered.

The PHY driver will always report 100 Mbit/s, link up, for both the M and FC
models. This reflects the fact that the link between switch chip and Ethernet
MAC is always on[1].

Further documentation can be found in the kernel's
Documentation/networking/adm6996.txt

Changes compared to the original driver:

- Don't mask the Version Number (least significant nibble from Chip Identifier
0, register 0xA0) from the matching code. Since I already had trouble telling
the FC and M chips apart, both Version Number 3, I included this field in the
match again.

- Don't handle port 0 as a WAN port because in my opinion it just makes stuff
more complicated to understand and explain. At least on the D-Link DSL-G624T and
the Ubiquiti RouterStation, it's just a LAN port anyway.

- Don't reset port 4. I changed ADM_PHY_PORTS so only ports 0 through 3 are
reset. Port 4 is a special port, the datasheet says its most popular use is as
a WAN port :), connected to a second MAC. It can also be used as a regular port.
But for instance the Ubiquiti RouterStation indeed uses it connected to a second
MAC, and the Generic PHY driver on address 20 decimal fits this purpose well. In
that case, it should be the Generic PHY driver handling and thus resetting that
port, and the ADM6996 driver should just leave it alone.

- Match ONLY on PHY addresses 0-10 inclusive instead of all addresses. The
ADM6996 has custom registers in that range, so matching there somewhat prevents
register corruption by other drivers (specifically the Generic PHY driver). The
driver will only offer VLAN functionality when bound as address 0. Note that the
ADM6996 exports standard PHY registers (Generic PHY compatible) on addresses 16
through 20 for ports 0 through 4. Especially address 20 is useful. Ports 0
through 3 are always switch ports and never directly connected to the MII bus of
a MAC.

- The allocation and initialisation of the adm6996_priv structure is now in
config_init() instead of probe(). It is only done for PHY address 0, where it is
useful. Also, register_switch() is an additional failure point where the
structure should be freed.

- Added myself to MODULE_AUTHOR

[1] The switch chip can set the link state to down using a custom register bit.
I suppose this is for power-saving, but it is not implemented in the driver.

Signed-off-by: Peter Lebbing pe...@digitalbrains.com

---

This is a respin of my April 14 submission. Trunk has moved on since
then, and it no longer applied.

 files/Documentation/networking/adm6996.txt |  110 +
 files/drivers/net/phy/adm6996.c|  616 +++--
 files/drivers/net/phy/adm6996.h|   67 ++-
 patches-2.6.30/620-phy_adm6996.patch   |6 
 patches-2.6.31/620-phy_adm6996.patch   |6 
 patches-2.6.32/620-phy_adm6996.patch   |6 
 patches-2.6.36/620-phy_adm6996.patch   |6 
 patches-2.6.37/720-phy_adm6996.patch   |6 
 patches-2.6.38/720-phy_adm6996.patch   |6 
 patches-2.6.39/720-phy_adm6996.patch   |6 
 10 files changed, 791 insertions(+), 44 deletions(-)

Index: target/linux/generic/patches-2.6.36/620-phy_adm6996.patch
===
--- target/linux/generic/patches-2.6.36/620-phy_adm6996.patch   (revision 26717)
+++ target/linux/generic/patches-2.6.36/620-phy_adm6996.patch   (working copy)
@@ -1,13 +1,15 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -93,6 +93,11 @@ config MICREL_PHY
+@@ -93,6 +93,13 @@ config MICREL_PHY
---help---
  Supports the KSZ9021, VSC8201, KS8001 PHYs.
  
 +config ADM6996_PHY
 +  tristate Driver for ADM6996 switches
++  select SWCONFIG
 +  ---help---
-+Currently supports the ADM6996F switch
++Currently supports the ADM6996FC and ADM6996M switches.
++Support for FC is very limited.
 +
  config FIXED_PHY
bool Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs
Index: target/linux/generic/patches-2.6.37/720-phy_adm6996.patch
===
--- target/linux/generic/patches-2.6.37/720-phy_adm6996.patch   (revision 26717)
+++ target/linux/generic/patches-2.6.37/720-phy_adm6996.patch   (working copy)
@@ -1,13 +1,15 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -98,6 +98,11 @@ config MICREL_PHY
+@@ -98,6 +98,13 @@ config MICREL_PHY
---help---
  Supports the KSZ9021, VSC8201, KS8001 PHYs.
  
 +config ADM6996_PHY
 +  tristate Driver for ADM6996 switches
++  select SWCONFIG
 +  ---help---
-+Currently supports the ADM6996F switch
++Currently supports the ADM6996FC and ADM6996M switches.
++Support for FC is very 

Re: [OpenWrt-Devel] [PATCH v3 1/2] (respin) 802.1Q VLAN support for ADM6996M/ADM6996FC

2011-04-18 Thread Luka Perkov
Patch tested on D-Link 584T DSL router with ADM6996M chip. Works.

Please commit.

Luka

On Mon, Apr 18, 2011 at 07:16:56PM +0200, Peter Lebbing wrote:
 This patch adds 802.1Q VLAN support for the ADM6996M chip.
 
 The driver is loaded for both the FC and M model. It will detect which of the
 two chips is connected. The FC model is initialised, but no further
 functionality is offered.
 
 The PHY driver will always report 100 Mbit/s, link up, for both the M and FC
 models. This reflects the fact that the link between switch chip and Ethernet
 MAC is always on[1].
 
 Further documentation can be found in the kernel's
 Documentation/networking/adm6996.txt
 
 Changes compared to the original driver:
 
 - Don't mask the Version Number (least significant nibble from Chip 
 Identifier
 0, register 0xA0) from the matching code. Since I already had trouble telling
 the FC and M chips apart, both Version Number 3, I included this field in the
 match again.
 
 - Don't handle port 0 as a WAN port because in my opinion it just makes stuff
 more complicated to understand and explain. At least on the D-Link DSL-G624T 
 and
 the Ubiquiti RouterStation, it's just a LAN port anyway.
 
 - Don't reset port 4. I changed ADM_PHY_PORTS so only ports 0 through 3 are
 reset. Port 4 is a special port, the datasheet says its most popular use is 
 as
 a WAN port :), connected to a second MAC. It can also be used as a regular 
 port.
 But for instance the Ubiquiti RouterStation indeed uses it connected to a 
 second
 MAC, and the Generic PHY driver on address 20 decimal fits this purpose well. 
 In
 that case, it should be the Generic PHY driver handling and thus resetting 
 that
 port, and the ADM6996 driver should just leave it alone.
 
 - Match ONLY on PHY addresses 0-10 inclusive instead of all addresses. The
 ADM6996 has custom registers in that range, so matching there somewhat 
 prevents
 register corruption by other drivers (specifically the Generic PHY driver). 
 The
 driver will only offer VLAN functionality when bound as address 0. Note that 
 the
 ADM6996 exports standard PHY registers (Generic PHY compatible) on addresses 
 16
 through 20 for ports 0 through 4. Especially address 20 is useful. Ports 0
 through 3 are always switch ports and never directly connected to the MII bus 
 of
 a MAC.
 
 - The allocation and initialisation of the adm6996_priv structure is now in
 config_init() instead of probe(). It is only done for PHY address 0, where it 
 is
 useful. Also, register_switch() is an additional failure point where the
 structure should be freed.
 
 - Added myself to MODULE_AUTHOR
 
 [1] The switch chip can set the link state to down using a custom register 
 bit.
 I suppose this is for power-saving, but it is not implemented in the driver.
 
 Signed-off-by: Peter Lebbing pe...@digitalbrains.com
 
 ---
 
 This is a respin of my April 14 submission. Trunk has moved on since
 then, and it no longer applied.
 
  files/Documentation/networking/adm6996.txt |  110 +
  files/drivers/net/phy/adm6996.c|  616 
 +++--
  files/drivers/net/phy/adm6996.h|   67 ++-
  patches-2.6.30/620-phy_adm6996.patch   |6 
  patches-2.6.31/620-phy_adm6996.patch   |6 
  patches-2.6.32/620-phy_adm6996.patch   |6 
  patches-2.6.36/620-phy_adm6996.patch   |6 
  patches-2.6.37/720-phy_adm6996.patch   |6 
  patches-2.6.38/720-phy_adm6996.patch   |6 
  patches-2.6.39/720-phy_adm6996.patch   |6 
  10 files changed, 791 insertions(+), 44 deletions(-)
 
 Index: target/linux/generic/patches-2.6.36/620-phy_adm6996.patch
 ===
 --- target/linux/generic/patches-2.6.36/620-phy_adm6996.patch (revision 26717)
 +++ target/linux/generic/patches-2.6.36/620-phy_adm6996.patch (working copy)
 @@ -1,13 +1,15 @@
  --- a/drivers/net/phy/Kconfig
  +++ b/drivers/net/phy/Kconfig
 -@@ -93,6 +93,11 @@ config MICREL_PHY
 +@@ -93,6 +93,13 @@ config MICREL_PHY
   ---help---
 Supports the KSZ9021, VSC8201, KS8001 PHYs.
   
  +config ADM6996_PHY
  +tristate Driver for ADM6996 switches
 ++select SWCONFIG
  +---help---
 -+  Currently supports the ADM6996F switch
 ++  Currently supports the ADM6996FC and ADM6996M switches.
 ++  Support for FC is very limited.
  +
   config FIXED_PHY
   bool Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs
 Index: target/linux/generic/patches-2.6.37/720-phy_adm6996.patch
 ===
 --- target/linux/generic/patches-2.6.37/720-phy_adm6996.patch (revision 26717)
 +++ target/linux/generic/patches-2.6.37/720-phy_adm6996.patch (working copy)
 @@ -1,13 +1,15 @@
  --- a/drivers/net/phy/Kconfig
  +++ b/drivers/net/phy/Kconfig
 -@@ -98,6 +98,11 @@ config MICREL_PHY
 +@@ -98,6 +98,13 @@ config MICREL_PHY
   ---help---
 Supports the KSZ9021, VSC8201, KS8001 PHYs.