Re: [PATCH] net: add Faraday FTGMAC100 Gigabit Ethernet driver

Po-Yu Chuang
2011-03-14T08:38:30Z

Hi Eric,

On Mon, Mar 14, 2011 at 4:16 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 10 mars 2011 à 16:08 +0800, Po-Yu Chuang a écrit :
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
>> and MII/GMII.  This driver has been working on some ARM/NDS32 SoC's
>> including Faraday A369 and Andes AG102.
>
> Hi
>
> It seems very close from drivers/net/ftmac100.c one. Are you sure a
> factorization is not possible ?

First, the registers and descriptors of FTGMAC100 are not backward
compatible to FTMAC100.

Second, FTGMAC100 HW has some features new to FTMAC100
(jumbo packet, checksum offload... etc.) and not all of them are supported
in the current version. For example, NETIF_F_SG support might be the next
step to improve.

IMHO, it will be easier for me to maintain them and to add new features to
FTGMAC100 driver if we separate these two drivers. How do you think?

> BTW, it seems I missed the fact that ftmac100_alloc_rx_page() used a
> GFP_KERNEL allocation, while its called from softirq context (from
> ftmac100_rx_packet())

Tested. Thank you.

> Same problem of course in this Gigabit driver.

Will fix it.

Best regards,
Po-Yu Chuang