[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100607.011835.55846752.davem@davemloft.net>
Date: Mon, 07 Jun 2010 01:18:35 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: richardcochran@...il.com
Cc: afleming@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] phylib: Add support for the LXT973 phy.
From: Richard Cochran <richardcochran@...il.com>
Date: Sat, 5 Jun 2010 16:00:17 +0200
> On Wed, Jun 02, 2010 at 02:32:11PM -0500, Andy Fleming wrote:
>> Yeah, I was clearly not thinking clearly. dev_flags will be
>> overwritten, and is not meant for this. I believe, what we should do
>> is add a "port" field to the PHY device, and if PCR_FIBER_SELECT is
>> set, then set the port field to PORT_FIBRE. I'm not entirely clear on
>> the semantics of that field in the ethtool cmd, but it seems like the
>> right idea.
>
> Here is another try. Is that more like it?
I think this is overkill.
One, and only one, PHY driver wants to maintain a boolean state and
we're adding a full 32-bit flags member to the generic PHY device
struct to accomodate this?
Andy if you have ideas to use that state via ethtool or whatever in
the future, you come back to us when the future arrives and you've
implemented the code in the generic PHY lib code to do that stuff.
As it stands right now, that code doesn't exist so accomodating it is
just silly.
I also think worrying about the phy_dev->priv pointer being misused in
the future inside of this driver is a completely bogus argument by any
measure.
We have many cases all over the kernel tree, in drivers and elsewhere,
where we encode integer states in what are normally pointer values
when we need to maintain a small piece of state and don't need to do a
full blown memory allocation to allocate a piece of extra memory to
hold that state.
Richard, please just resubmit your original patch and I will apply it.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists