netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matheos Worku <Matheos.Worku@Sun.COM>
To: Ingo Oeser <netdev@axxeo.de>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Ariel.Hendel@Sun.COM,
	Greg.Onufer@Sun.COM, jeff@garzik.org, Ashley.Saulsbury@Sun.COM
Subject: Re: [PATCH]: Third (final?) release of Sun Neptune driver
Date: Fri, 05 Oct 2007 10:45:43 -0700	[thread overview]
Message-ID: <47067847.7030204@sun.com> (raw)
In-Reply-To: <200710051846.19965.netdev@axxeo.de>

Ingo Oeser wrote:
> Hi David,
>
> some minor nits.
>
> Could this driver be split into more files. 8k lines per file
> is quite a lot. Although GCC might optimize it best this way :-)
>   

Ingo,

Some r info on  Neptune HW  to explains some of the constants ...
Regards
Matheos

>> +	ctrl_val = (ENET_SERDES_CTRL_SDET_0 |
>> +		    ENET_SERDES_CTRL_SDET_1 |
>> +		    ENET_SERDES_CTRL_SDET_2 |
>> +		    ENET_SERDES_CTRL_SDET_3 |
>> +		    (0x5 << ENET_SERDES_CTRL_EMPH_0_SHIFT) |
>> +		    (0x5 << ENET_SERDES_CTRL_EMPH_1_SHIFT) |
>> +		    (0x5 << ENET_SERDES_CTRL_EMPH_2_SHIFT) |
>> +		    (0x5 << ENET_SERDES_CTRL_EMPH_3_SHIFT) |
>> +		    (0x1 << ENET_SERDES_CTRL_LADJ_0_SHIFT) |
>> +		    (0x1 << ENET_SERDES_CTRL_LADJ_1_SHIFT) |
>> +		    (0x1 << ENET_SERDES_CTRL_LADJ_2_SHIFT) |
>> +		    (0x1 << ENET_SERDES_CTRL_LADJ_3_SHIFT));
>> +	test_cfg_val = 0;
>> +
>> +	if (lp->loopback_mode == LOOPBACK_PHY) {
>> +		test_cfg_val |= ((ENET_TEST_MD_PAD_LOOPBACK <<
>> +				  ENET_SERDES_TEST_MD_0_SHIFT) |
>> +				 (ENET_TEST_MD_PAD_LOOPBACK <<
>> +				  ENET_SERDES_TEST_MD_1_SHIFT) |
>> +				 (ENET_TEST_MD_PAD_LOOPBACK <<
>> +				  ENET_SERDES_TEST_MD_2_SHIFT) |
>> +				 (ENET_TEST_MD_PAD_LOOPBACK <<
>> +				  ENET_SERDES_TEST_MD_3_SHIFT));
>> +	}
>> +
>> +	nw64(ctrl_reg, ctrl_val);
>> +	nw64(test_cfg_reg, test_cfg_val);
>> +
>> +	for (i = 0; i < 4; i++) {
>>     
>
> why 4? (magic number)
>   
The MAC HW has 4 SERDES lanes. Need to configure each lane
>   
>   
>> +static void niu_set_max_burst(struct niu *np, struct tx_ring_info *rp)
>> +{
>> +	int mtu = np->dev->mtu;
>> +
>> +	rp->max_burst = mtu + 32;
>> +	if (rp->max_burst > 4096)
>> +		rp->max_burst = 4096;
>>     
>
> Why 32 and 4096? (Magic values)
>   
These values were recommended by the HW designers for fair utilization 
of DRR  feature among TX/RX rings.
>   
>> +}
>> +
>>     
>
> ... ok, I stop here, since this drivers is damn big :-)
>
> Best Regards
>
> Ingo Oeser
>   


  parent reply	other threads:[~2007-10-05 17:45 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 10:12 [PATCH]: Third (final?) release of Sun Neptune driver David Miller
2007-10-05 15:35 ` Stephen Hemminger
2007-10-05 22:49   ` David Miller
2007-10-05 22:54   ` David Miller
2007-10-05 23:31     ` Jeff Garzik
2007-10-05 22:56   ` David Miller
2007-10-05 23:07   ` David Miller
2007-10-05 23:24   ` David Miller
2007-10-05 23:32     ` Jeff Garzik
2007-10-05 23:27   ` David Miller
2007-10-05 15:39 ` Stephen Hemminger
2007-10-05 21:12   ` David Miller
2007-10-05 21:18     ` Stephen Hemminger
2007-10-05 23:30       ` David Miller
2007-10-05 15:40 ` Stephen Hemminger
2007-10-05 21:12   ` David Miller
2007-10-05 21:14     ` Jeff Garzik
2007-10-05 21:21       ` Stephen Hemminger
2007-10-05 21:40         ` David Miller
2007-10-05 21:38       ` David Miller
2007-10-05 23:42   ` David Miller
2007-10-05 15:43 ` Stephen Hemminger
2007-10-06  0:04   ` David Miller
2007-10-06  0:28     ` Stephen Hemminger
2007-10-06  0:46       ` David Miller
2007-10-06  8:32       ` Johannes Berg
2007-10-05 16:46 ` Ingo Oeser
2007-10-05 16:49   ` Ingo Oeser
2007-10-06  0:08     ` David Miller
2007-10-08 16:04       ` Oliver Hartkopp
2007-10-05 16:55   ` Jeff Garzik
2007-10-05 17:45   ` Matheos Worku [this message]
2007-10-05 21:18   ` David Miller
2007-10-05 21:20   ` David Miller
     [not found]   ` <470677A0.5060502@sun.com>
2007-10-05 21:24     ` David Miller
2007-10-05 22:18   ` Matheos Worku
2007-10-05 22:43     ` David Miller
2007-10-06  0:10   ` David Miller
2007-10-08 16:01 ` Oliver Hartkopp
2007-10-08 23:08   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47067847.7030204@sun.com \
    --to=matheos.worku@sun.com \
    --cc=Ariel.Hendel@Sun.COM \
    --cc=Ashley.Saulsbury@Sun.COM \
    --cc=Greg.Onufer@Sun.COM \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=netdev@axxeo.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).