[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161104134234.GC11277@microsemi.com>
Date: Fri, 4 Nov 2016 14:42:34 +0100
From: "Allan W. Nielsen" <allan.nielsen@...rosemi.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, <f.fainelli@...il.com>,
<raju.lakkaraju@...rosemi.com>, <cphealy@...il.com>,
<robh@...nel.org>
Subject: Re: [PATCH net-next 5/5] net: phy: Add downshift get/set support in
Microsemi PHYs driver
On 04/11/16 13:27, Andrew Lunn wrote:
> > + } else if (count) {
> > + /* Downshift count is either 2,3,4 or 5 */
> > + count = (((count - 2) << DOWNSHIFT_CNTL_POS) | DOWNSHIFT_EN);
>
> Ah, now i see why + 2. But this means it never does what you ask it to
> do. It would be better to round up < 2 to 2, and leave all the others
> as is.
Not sure I understand what you mean...
If the user configure "count == 1", then you want that to be rounded up to
"count == 2", because the HW does not support a count of 1???
If the user configure count to 6, 7, 8 etc. would you also like to round it down
to 5?
I'm okay with that but not sure it is want you mean... (and it will eliminate
your comment on ERANGE - because all values will be accepted, they are just
rounded to "closet" supported value).
(The other comments is understood, and we will get them fixed).
/Allan
Powered by blists - more mailing lists