Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-09-01 Thread Rob Herring
On Wed, Aug 31, 2016 at 4:00 PM, Timur Tabi wrote: > Rob Herring wrote: >>> >>> It's not a generic phy. It's a funky "internal phy" that differs among >>> >SOCs. I call it the internal phy, but I could use another name. >>> > Internally, >>> >some people call it the "sgmii phy", but I don't thin

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Andrew Lunn
> >You can just as easily find the child node called ethernet-phy. > > As Andrew pointed out, using phy-handle allows me to place the phy > node anywhere. > > I've already made changes to this design, and every change has > raised objections. I don't see anything wrong with phy-handle. A > lot

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Timur Tabi
Rob Herring wrote: It's not a generic phy. It's a funky "internal phy" that differs among >SOCs. I call it the internal phy, but I could use another name. Internally, >some people call it the "sgmii phy", but I don't think that's accurate. Funky internal PHYs are precisely the types of PHYs

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Rob Herring
On Wed, Aug 31, 2016 at 10:11 AM, Timur Tabi wrote: > Rob Herring wrote: > >>> + internal-phy = <&emac_sgmii>; >> >> >> Can't this use the standard generic phy binding (i.e. 'phys'). It's a >> bit confusing as there's the ethernet phy binding (phy-handle) and the >> generic one. > >

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Timur Tabi
Florian Fainelli wrote: if these are truly 64-bits stats, how come you are using a single readl_* to access them? Or is the u64 rx_err_addr just used as temporary storage and aligned to the largest size you need to deal with? "*stats_itr += val;" takes the 32-bit val, zero-extends it to 64 bits

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Florian Fainelli
On 08/31/2016 11:57 AM, Timur Tabi wrote: > Timur Tabi wrote: >> >>> Seems that there are several unused members in the emac_stats struct: >>> +struct emac_stats { >>> ... >>> ... >>> Both rx_bcast_byte_cnt and rx_mcast_byte_cnt are not used anywhere/ + u64 rx_bcast_byte_cnt; /* br

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Timur Tabi
Timur Tabi wrote: Seems that there are several unused members in the emac_stats struct: +struct emac_stats { ... ... Both rx_bcast_byte_cnt and rx_mcast_byte_cnt are not used anywhere/ + u64 rx_bcast_byte_cnt; /* broadcast packets byte count (without FCS) */ + u64 rx_mcast_byte

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Andrew Lunn
> > +soc { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + emac0: ethernet@feb2 { > > + compatible = "qcom,fsm9900-emac"; > > + reg = <0xfeb2 0x1>, > > + <0xfeb36000 0x1000>; > > + interrupts = <76>; > > + > > +

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Timur Tabi
Rob Herring wrote: + internal-phy = <&emac_sgmii>; Can't this use the standard generic phy binding (i.e. 'phys'). It's a bit confusing as there's the ethernet phy binding (phy-handle) and the generic one. It's not a generic phy. It's a funky "internal phy" that differs among

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-31 Thread Rob Herring
On Thu, Aug 25, 2016 at 04:39:03PM -0500, Timur Tabi wrote: > Add support for the Qualcomm Technologies, Inc. EMAC gigabit Ethernet > controller. > > This driver supports the following features: > 1) Checksum offload. > 2) Interrupt coalescing support. > 3) SGMII phy. > 4) phylib interface for ext

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-27 Thread David Miller
From: Timur Tabi Date: Sat, 27 Aug 2016 07:26:39 -0500 > David Miller wrote: >> From: Timur Tabi >> Date: Thu, 25 Aug 2016 16:39:03 -0500 >> >>> +static const u8 duuid[] = { >>> + 0x77, 0x79, 0x60, 0xbf, >>> + 0x2d, 0xab, >>> + 0x9d, 0x4b, >>> + 0x94, 0xf0, >>> + 0xe1, 0x11, 0x98, 0x01

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-27 Thread Timur Tabi
Rami Rosen wrote: Hi, Shouldn't it be obj-$(CONFIG_QCOM_EMAC) instead obj-y? Yes, I noticed this soon after I posted this patch. I will fix it in v10. The return type of the method emac_tx_tpd_create() should be void, as it always returns true. Will fix, thanks. Seems that there are se

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-27 Thread Rami Rosen
Hi, Shouldn't it be obj-$(CONFIG_QCOM_EMAC) instead obj-y? QCOM_EMAC is defined as tristate in the drivers/net/ethernet/qualcomm/Kconfig by this patch, so it should be possible to build it as a *.ko module also. > diff --git a/drivers/net/ethernet/qualcomm/emac/Makefile > b/drivers/net/ethernet/

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-27 Thread Florian Fainelli
On August 27, 2016 5:26:39 AM PDT, Timur Tabi wrote: >David Miller wrote: >> From: Timur Tabi >> Date: Thu, 25 Aug 2016 16:39:03 -0500 >> >>> +static const u8 duuid[] = { >>> + 0x77, 0x79, 0x60, 0xbf, >>> + 0x2d, 0xab, >>> + 0x9d, 0x4b, >>> + 0x94, 0xf0, >>> + 0xe1, 0x11, 0x98, 0x01, 0x

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-27 Thread Timur Tabi
David Miller wrote: From: Timur Tabi Date: Thu, 25 Aug 2016 16:39:03 -0500 +static const u8 duuid[] = { + 0x77, 0x79, 0x60, 0xbf, + 0x2d, 0xab, + 0x9d, 0x4b, + 0x94, 0xf0, + 0xe1, 0x11, 0x98, 0x01, 0xa2, 0xba +}; This seems to be completely unused, please remove

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-26 Thread David Miller
From: Timur Tabi Date: Thu, 25 Aug 2016 16:39:03 -0500 > +static const u8 duuid[] = { > + 0x77, 0x79, 0x60, 0xbf, > + 0x2d, 0xab, > + 0x9d, 0x4b, > + 0x94, 0xf0, > + 0xe1, 0x11, 0x98, 0x01, 0xa2, 0xba > +}; This seems to be completely unused, please remove it.

[PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-25 Thread Timur Tabi
Add support for the Qualcomm Technologies, Inc. EMAC gigabit Ethernet controller. This driver supports the following features: 1) Checksum offload. 2) Interrupt coalescing support. 3) SGMII phy. 4) phylib interface for external phy Based on original work by Niranjana Vishwanathapura