Re: [PATCH 4/4] net: dsa: Add Lantiq / Intel DSA driver for vrx200

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >> +static const struct gswip_rmon_cnt_desc gswip_rmon_cnt[] = {
> >> +	/** Receive Packet Count (only packets that are accepted and not discarded). */
> >> +	MIB_DESC(1, 0x1F, "RxGoodPkts"),
> >> +	/** Receive Size 1024-1522 (or more, if configured) Packet Count. */
> >> +	MIB_DESC(1, 0x17, "RxMaxBytePkts"),
> >> +	/** Transmit Size 1024-1522 (or more, if configured) Packet Count. */
> >> +	MIB_DESC(1, 0x05, "TxMaxBytePkts"),
> > 
> > Most of the comments here don't add anything useful. Maybe remove
> > them?
> 
> Ok I removed them.

The comments i left above are useful, since they give additional
information which is not obvious from the name.

> Are the names ok, or should they follow any Linux definition?

There are no standard names. So each driver tends to be different.

> > Please return ETIMEOUT when needed. Maybe use one of the variants of
> > readx_poll_timeout().
> 
> I am returning ETIMEOUT now.
> 
> When I would use readx_poll_timeout() I can not use the gswip_mdio_r()
> function, because it takes two arguments and would have to use readl
> directly.

Yes, they don't always fit, which is why is said "maybe".

> > The names make this unclear. The callback is used to configure the MAC
> > layer when something happens at the PHY layer. phyaddr does not appear
> > to be an address, not should it be doing anything to a PHY.
> 
> I renamed this to phyconf, as this contains multiple configuration
> values. This tells the mac what settings the phy wants to use.

macconf might be better, since this is configuring the MAC, not the
PHY.

> This is sort of a firmware, but it is also in the GPL driver.
> Currently the probe function is not marked __init so we can not make
> this easily __initdata.
> It has 64 entries of 8 bytes each so, 512 bytes, I think we can put this
> into the code.

512 bytes is fine.

    Andrew




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux