* [PATCH 0/2] Blackfin EMAC driver updates
@ 2009-01-07 16:14 Bryan Wu
2009-01-07 16:14 ` [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x Bryan Wu
2009-01-07 16:14 ` [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver Bryan Wu
0 siblings, 2 replies; 10+ messages in thread
From: Bryan Wu @ 2009-01-07 16:14 UTC (permalink / raw)
To: jeff; +Cc: netdev, linux-kernel
Hi Jeff,
Please take a look at these 2 patches for Blackfin EMAC driver
Thanks
-Bryan
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
2009-01-07 16:14 [PATCH 0/2] Blackfin EMAC driver updates Bryan Wu
@ 2009-01-07 16:14 ` Bryan Wu
2009-01-08 18:52 ` David Miller
2009-01-07 16:14 ` [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver Bryan Wu
1 sibling, 1 reply; 10+ messages in thread
From: Bryan Wu @ 2009-01-07 16:14 UTC (permalink / raw)
To: jeff; +Cc: netdev, linux-kernel, Sonic Zhang, Bryan Wu
From: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/net/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9a18270..6b1eb43 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -830,7 +830,7 @@ config ULTRA32
config BFIN_MAC
tristate "Blackfin on-chip MAC support"
- depends on NET_ETHERNET && (BF526 || BF527 || BF536 || BF537)
+ depends on NET_ETHERNET && (BF516 || BF518 || BF526 || BF527 || BF536 || BF537)
select CRC32
select MII
select PHYLIB
--
1.5.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-07 16:14 [PATCH 0/2] Blackfin EMAC driver updates Bryan Wu
2009-01-07 16:14 ` [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x Bryan Wu
@ 2009-01-07 16:14 ` Bryan Wu
2009-01-08 18:55 ` David Miller
1 sibling, 1 reply; 10+ messages in thread
From: Bryan Wu @ 2009-01-07 16:14 UTC (permalink / raw)
To: jeff; +Cc: netdev, linux-kernel, Graf Yang, Bryan Wu
From: Graf Yang <graf.yang@analog.com>
Fill EMAC_VLAN1 with 0x8100 to admit 1522 long bytes frames. EMAC_VLAN2
seems need not use for now.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/net/bfin_mac.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 78e31aa..15d7e62 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -517,6 +517,14 @@ void setup_system_regs(struct net_device *dev)
bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define VLAN_ETHER_TYPE 0x8100
+ /* The legal length of the frame is increased to 1522 bytes */
+ bfin_write_EMAC_VLAN1(VLAN_ETHER_TYPE);
+ /* The legal length of the frame is increased to 1538 bytes */
+ /*bfin_write_EMAC_VLAN2(VLAN_ETHER_TYPE);*/
+#endif
+
/* Initialize the TX DMA channel registers */
bfin_write_DMA2_X_COUNT(0);
bfin_write_DMA2_X_MODIFY(4);
--
1.5.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
2009-01-07 16:14 ` [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x Bryan Wu
@ 2009-01-08 18:52 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2009-01-08 18:52 UTC (permalink / raw)
To: cooloney; +Cc: jeff, netdev, linux-kernel, sonic.zhang
From: Bryan Wu <cooloney@kernel.org>
Date: Thu, 8 Jan 2009 00:14:38 +0800
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-07 16:14 ` [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver Bryan Wu
@ 2009-01-08 18:55 ` David Miller
2009-01-08 19:01 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-01-08 18:55 UTC (permalink / raw)
To: cooloney; +Cc: jeff, netdev, linux-kernel, graf.yang
From: Bryan Wu <cooloney@kernel.org>
Date: Thu, 8 Jan 2009 00:14:39 +0800
> +#define VLAN_ETHER_TYPE 0x8100
Please use ETH_P_8021Q from linux/if_ether.h instead of inventing
your own definition.
> + /* The legal length of the frame is increased to 1538 bytes */
> + /*bfin_write_EMAC_VLAN2(VLAN_ETHER_TYPE);*/
Please do not add code that is just going to be commented
out and not used.
Also, I disagree with the:
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
conditional. Probably this part of the chip should be programmed
unconditionally.
We can get VLAN packets received and sent, using AF_PACKET
sockets, for example. The chip should still respect those
even if VLAN proper is not being utilized.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-08 18:55 ` David Miller
@ 2009-01-08 19:01 ` Mike Frysinger
2009-01-08 19:05 ` Mike Frysinger
2009-01-08 19:29 ` David Miller
0 siblings, 2 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-01-08 19:01 UTC (permalink / raw)
To: David Miller; +Cc: cooloney, jeff, netdev, linux-kernel, graf.yang
On Thu, Jan 8, 2009 at 13:55, David Miller <davem@davemloft.net> wrote:
> From: Bryan Wu <cooloney@kernel.org>
>> +#define VLAN_ETHER_TYPE 0x8100
>
> Please use ETH_P_8021Q from linux/if_ether.h instead of inventing
> your own definition.
was a copy & paste due to not finding a better definition (3c59x.c)
>> + /* The legal length of the frame is increased to 1538 bytes */
>> + /*bfin_write_EMAC_VLAN2(VLAN_ETHER_TYPE);*/
>
> Please do not add code that is just going to be commented
> out and not used.
>
> Also, I disagree with the:
>
> +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
>
> conditional. Probably this part of the chip should be programmed
> unconditionally.
again, more of a copy & paste ... this is how a bunch of drivers are
doing it now ...
> We can get VLAN packets received and sent, using AF_PACKET
> sockets, for example. The chip should still respect those
> even if VLAN proper is not being utilized.
any tips on doing that ?
thanks for reviewing!
-mike
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-08 19:01 ` Mike Frysinger
@ 2009-01-08 19:05 ` Mike Frysinger
2009-01-08 19:30 ` David Miller
2009-01-08 19:29 ` David Miller
1 sibling, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-01-08 19:05 UTC (permalink / raw)
To: David Miller; +Cc: cooloney, jeff, netdev, linux-kernel, graf.yang
On Thu, Jan 8, 2009 at 14:01, Mike Frysinger wrote:
> On Thu, Jan 8, 2009 at 13:55, David Miller wrote:
>> We can get VLAN packets received and sent, using AF_PACKET
>> sockets, for example. The chip should still respect those
>> even if VLAN proper is not being utilized.
>
> any tips on doing that ?
or rather, is there a driver or you two you can point out that is
doing this correctly ? the ones i looked at seemed to be doing it
like the patch we posted ...
-mike
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-08 19:01 ` Mike Frysinger
2009-01-08 19:05 ` Mike Frysinger
@ 2009-01-08 19:29 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2009-01-08 19:29 UTC (permalink / raw)
To: vapier.adi; +Cc: cooloney, jeff, netdev, linux-kernel, graf.yang
From: "Mike Frysinger" <vapier.adi@gmail.com>
Date: Thu, 8 Jan 2009 14:01:49 -0500
> > We can get VLAN packets received and sent, using AF_PACKET
> > sockets, for example. The chip should still respect those
> > even if VLAN proper is not being utilized.
>
> any tips on doing that ?
No, sorry.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-08 19:05 ` Mike Frysinger
@ 2009-01-08 19:30 ` David Miller
2009-01-08 19:34 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-01-08 19:30 UTC (permalink / raw)
To: vapier.adi; +Cc: cooloney, jeff, netdev, linux-kernel, graf.yang
From: "Mike Frysinger" <vapier.adi@gmail.com>
Date: Thu, 8 Jan 2009 14:05:33 -0500
> On Thu, Jan 8, 2009 at 14:01, Mike Frysinger wrote:
> > On Thu, Jan 8, 2009 at 13:55, David Miller wrote:
> >> We can get VLAN packets received and sent, using AF_PACKET
> >> sockets, for example. The chip should still respect those
> >> even if VLAN proper is not being utilized.
> >
> > any tips on doing that ?
>
> or rather, is there a driver or you two you can point out that is
> doing this correctly ? the ones i looked at seemed to be doing it
> like the patch we posted ...
And I disagree with how those drivers are doing it :-)
At least the programming of the chip to accept all packet
types properly, VLAN or not, regardless of kernel config,
is definitely IMHO the way to go.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
2009-01-08 19:30 ` David Miller
@ 2009-01-08 19:34 ` Mike Frysinger
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-01-08 19:34 UTC (permalink / raw)
To: David Miller; +Cc: cooloney, jeff, netdev, linux-kernel, graf.yang
On Thu, Jan 8, 2009 at 14:30, David Miller wrote:
> From: "Mike Frysinger" <vapier
>> On Thu, Jan 8, 2009 at 14:01, Mike Frysinger wrote:
>> > On Thu, Jan 8, 2009 at 13:55, David Miller wrote:
>> >> We can get VLAN packets received and sent, using AF_PACKET
>> >> sockets, for example. The chip should still respect those
>> >> even if VLAN proper is not being utilized.
>> >
>> > any tips on doing that ?
>>
>> or rather, is there a driver or you two you can point out that is
>> doing this correctly ? the ones i looked at seemed to be doing it
>> like the patch we posted ...
>
> And I disagree with how those drivers are doing it :-)
>
> At least the programming of the chip to accept all packet
> types properly, VLAN or not, regardless of kernel config,
> is definitely IMHO the way to go.
i know on our side we all agree with you, we just didnt (dont) know
any better ;)
-mike
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-01-08 19:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 16:14 [PATCH 0/2] Blackfin EMAC driver updates Bryan Wu
2009-01-07 16:14 ` [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x Bryan Wu
2009-01-08 18:52 ` David Miller
2009-01-07 16:14 ` [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver Bryan Wu
2009-01-08 18:55 ` David Miller
2009-01-08 19:01 ` Mike Frysinger
2009-01-08 19:05 ` Mike Frysinger
2009-01-08 19:30 ` David Miller
2009-01-08 19:34 ` Mike Frysinger
2009-01-08 19:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).