From: Andy Fleming <hidden> Date: 2011-11-11 15:10:44
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
Signed-off-by: Andy Fleming <redacted>
---
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 53 ++++----------------------
1 files changed, 8 insertions(+), 45 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2011-11-14 05:26:36
From: Andy Fleming <redacted>
Date: Fri, 11 Nov 2011 09:10:39 -0600
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
Signed-off-by: Andy Fleming <redacted>
Hi Andy,
On Fri, Nov 11, 2011 at 05:10:39AM -0000, Andy Fleming wrote:
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
With this applied I'm getting
fsl-pq_mdio: probe of ffe24000.mdio failed with error -16
on my P1011 board which does not have a "tbi-phy" node. I'll post a fix
shortly.
baruch
Signed-off-by: Andy Fleming <redacted>
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
From: Kumar Gala <hidden> Date: 2011-12-02 04:38:23
On Nov 13, 2011, at 11:26 PM, David Miller wrote:
From: Andy Fleming <redacted>
Date: Fri, 11 Nov 2011 09:10:39 -0600
quoted
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
Signed-off-by: Andy Fleming <redacted>
From: Andy Fleming <hidden> Date: 2011-12-02 05:16:24
On Thu, Dec 1, 2011 at 10:38 PM, Kumar Gala [off-list ref] wrote:
On Nov 13, 2011, at 11:26 PM, David Miller wrote:
quoted
From: Andy Fleming <redacted>
Date: Fri, 11 Nov 2011 09:10:39 -0600
quoted
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
Signed-off-by: Andy Fleming <redacted>
Applied, thanks.
I believe we need this on mainline otherwise we get something like:
I concur. I also have a 2 separate patches I will send out tonight,
which are independent of each other, but related.
The first will revert c3e072f8a6c5625028531c40ec65f7e301531be2 (net:
fsl_pq_mdio: fix non tbi phy access), which hides a bug. The second
will fix the bug in our p1/p2 device trees so that they all have tbi
nodes.
The first patch only applies to net-next (reverts a commit in that
tree). The second patch only applies to Kumar's "next" branch (applies
changes on top of significant device-tree changes). I have no idea how
you guys want to deal with that. Personally, I think that the patches
can be applied to their respective trees, and anyone who is working
off the bleeding edge can go find the appropriate patch in the other
tree. If we get my first patch into mainline, then I imagine Kumar's
tree will have all the necessary components...
Anyway, I will leave that to you. I will submit the two patches in the
next hour or so.
Andy
From: Kumar Gala <hidden> Date: 2011-12-06 05:38:20
On Dec 1, 2011, at 10:38 PM, Kumar Gala wrote:
quoted hunk
On Nov 13, 2011, at 11:26 PM, David Miller wrote:
quoted
From: Andy Fleming <redacted>
Date: Fri, 11 Nov 2011 09:10:39 -0600
quoted
The code for setting the address of the internal TBI PHY was
convoluted enough without a maze of ifdefs. Clean it up a bit
so we allow the logic to fail down to -ENODEV at the end of
the if/else ladder, rather than using ifdefs to repeat the same
failure code over and over.
Also, remove the support for the auto-configuration. I'm not aware of
anyone using it, and it ends up using the bus mutex before it's been
initialized.
Signed-off-by: Andy Fleming <redacted>
From: David Miller <davem@davemloft.net> Date: 2011-12-06 05:41:27
From: Kumar Gala <redacted>
Date: Mon, 5 Dec 2011 23:38:14 -0600
Any comment on getting this patch pulled into net.git?
It requires a DT patch or related set of changes which have need
to be done differently as per feedback.
My understanding is there are two patches required, this revert plus
the changes to add the tbi property to the DT which are missing it.
That's why these tbi changes went in to begin with, to handle DT
which lack the property, or something like that. So you can't
just revert this thing without also fixing the DT that lack the
tbi property, or else you break those systems.
From: Kumar Gala <hidden> Date: 2011-12-07 05:35:31
On Dec 5, 2011, at 11:41 PM, David Miller wrote:
From: Kumar Gala <redacted>
Date: Mon, 5 Dec 2011 23:38:14 -0600
quoted
Any comment on getting this patch pulled into net.git?
It requires a DT patch or related set of changes which have need
to be done differently as per feedback.
My understanding is there are two patches required, this revert plus
the changes to add the tbi property to the DT which are missing it.
That's why these tbi changes went in to begin with, to handle DT
which lack the property, or something like that. So you can't
just revert this thing without also fixing the DT that lack the
tbi property, or else you break those systems.
We need this patch in 3.2 regardless of DT. Currently we get the oops on 3.2 on ALL systems. Andy should be working up a device tree patch to fix the subset of .dts that are missing the tbi property.
What happens in 'next' is slightly different issue.
- k
From: David Miller <davem@davemloft.net> Date: 2011-12-07 18:55:37
From: Kumar Gala <redacted>
Date: Tue, 6 Dec 2011 23:35:31 -0600
We need this patch in 3.2 regardless of DT. Currently we get the
oops on 3.2 on ALL systems. Andy should be working up a device tree
patch to fix the subset of .dts that are missing the tbi property.