<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/phy/phy_device.c, branch linux-2.6.35.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-04-02T21:30:39+00:00</updated>
<entry>
<title>phylib: Support phy module autoloading</title>
<updated>2010-04-02T21:30:39+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2010-04-02T01:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8626d3b4328061f5b82b11ae1d6918a0c3602f42'/>
<id>urn:sha1:8626d3b4328061f5b82b11ae1d6918a0c3602f42</id>
<content type='text'>
We don't use the normal hotplug mechanism because it doesn't work. It will
load the module some time after the device appears, but that's not good
enough for us -- we need the driver loaded _immediately_ because otherwise
the NIC driver may just abort and then the phy 'device' goes away.

[bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>libphy: add phy_find_first function</title>
<updated>2010-02-04T18:23:02+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2010-02-04T18:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8f76db1db369f3a130ac3fd33e2eee5f1610d9c'/>
<id>urn:sha1:f8f76db1db369f3a130ac3fd33e2eee5f1610d9c</id>
<content type='text'>
Many drivers do this in them manually. Now they can use this function.

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: Move workqueue initialization to a proper place</title>
<updated>2010-01-19T09:59:02+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2010-01-18T05:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f9c85a1b03bfa5c0a0d8488a3a7766f3c9fb756'/>
<id>urn:sha1:4f9c85a1b03bfa5c0a0d8488a3a7766f3c9fb756</id>
<content type='text'>
commit 541cd3ee00a4fe975b22fac6a3bc846bacef37f7 ("phylib: Fix deadlock
on resume") caused TI DaVinci EMAC ethernet driver to oops upon resume:

 PM: resume of devices complete after 237.098 msecs
 Restarting tasks ... done.
 kernel BUG at kernel/workqueue.c:354!
 Unable to handle kernel NULL pointer dereference at virtual address 00000000
 [...]
 Backtrace:
 [&lt;c002c598&gt;] (__bug+0x0/0x2c) from [&lt;c0052a54&gt;] (queue_delayed_work_on+0x74/0xf8)
 [&lt;c00529e0&gt;] (queue_delayed_work_on+0x0/0xf8) from [&lt;c0052b30&gt;] (queue_delayed_work+0x2c/0x30)

The oops pops up because TI DaVinci EMAC driver detaches PHY on
suspend and attaches it back on resume. Attaching makes phylib call
phy_start_machine() that initializes a workqueue. On the other hand,
PHY's resume routine will call phy_start_machine() again, and that
will cause the oops since we just destroyed the already scheduled
workqueue.

This patch fixes the issue by moving workqueue initialization to
phy_device_create().

p.s. We don't see this oops with ucc_geth and gianfar drivers because
they perform a fine-grained suspend, i.e. they just stop the PHYs
without detaching.

Reported-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Tested-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: Properly reinitialize PHYs after hibernation</title>
<updated>2009-12-31T06:03:42+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2009-12-30T08:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f5cb43406d0b29b96248f5328a14a6f6abf8ae6'/>
<id>urn:sha1:2f5cb43406d0b29b96248f5328a14a6f6abf8ae6</id>
<content type='text'>
Since hibernation assumes power loss, we should fully reinitialize
PHYs (including platform fixups), as if PHYs were just attached.

This patch factors phy_init_hw() out of phy_attach_direct(), then
converts mdio_bus to dev_pm_ops and adds an appropriate restore()
callback.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>NET: phy_device, fix lock imbalance</title>
<updated>2009-07-14T19:03:39+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-07-13T11:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc23283c7bc90958927abe26eedc562701743a88'/>
<id>urn:sha1:bc23283c7bc90958927abe26eedc562701743a88</id>
<content type='text'>
Don't forget to unlock a mutex in phy_scan_fixups on a fail path.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy_device: fix parameter name in kernel-doc</title>
<updated>2009-06-17T11:31:20+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2009-06-16T16:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d4ac5d5ef9dd965ae211ebe8acbf83dc4d9571b'/>
<id>urn:sha1:1d4ac5d5ef9dd965ae211ebe8acbf83dc4d9571b</id>
<content type='text'>
Fix kernel-doc parameter name in phy_device.c.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: add *_direct() variants of phy_connect and phy_attach functions</title>
<updated>2009-04-27T09:53:46+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2009-04-25T12:52:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa94f6d93c5382810ff41f010f12ca8698fc775e'/>
<id>urn:sha1:fa94f6d93c5382810ff41f010f12ca8698fc775e</id>
<content type='text'>
Add phy_connect_direct() and phy_attach_direct() functions so that
drivers can use a pointer to the phy_device instead of trying to determine
the phy's bus_id string.

This patch is useful for OF device tree descriptions of phy devices where
the driver doesn't need or know what the bus_id value in order to get a
phy_device pointer.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: rework to prepare for OF registration of PHYs</title>
<updated>2009-04-27T09:53:45+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2009-04-25T12:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4dea547fef1ba23f9d23f5e7f5218187a7dcf1b3'/>
<id>urn:sha1:4dea547fef1ba23f9d23f5e7f5218187a7dcf1b3</id>
<content type='text'>
This patch makes changes in preparation for supporting open firmware
device tree descriptions of MDIO busses.  Changes include:
- Cleanup handling of phy_map[] entries; they are already NULLed when
  registering and so don't need to be re-cleared, and it is good practice
  to clear them out when unregistering.
- Split phy_device registration out into a new function so that the
  OF helpers can do two stage registration (separate allocation and
  registration steps).

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: Fix Freescale TBI PHY detection</title>
<updated>2009-01-14T22:38:02+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2009-01-14T22:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0d44ae310bc8eb0b6694e257015d8b24e1a357c'/>
<id>urn:sha1:f0d44ae310bc8eb0b6694e257015d8b24e1a357c</id>
<content type='text'>
Freescale on-chip TBI PHYs reports PHY ID as 0x0, but as of

commit 3ee82383f0098a2e13acc8cf1be8e47512f41e5a
Author: Giulio Benetti &lt;giulio.benetti@micronovasrl.com&gt;
Date:   Thu Nov 13 21:53:13 2008 +0000

    phy: fix phy address bug

    PHYID returns 0xffff and not 0xffffffff when not found and in some
    case(at91sam9263) 0x0. Maybe this patch could be useful.

phy_device.c treats PHY ID == 0x0 as bogus IDs, and that results in
gianfar driver failure to see the TBI PHYs. This code snippet triggers:

	if (!priv-&gt;tbiphy) {
		printk(KERN_WARNING "SGMII mode requires that the device "
				"tree specify a tbi-handle\n");
		return;
	}

Although tbi-handle is specified in the device tree.

Btw, technically PHY ID == 0x0 is a valid ID (if we ever see a PHY
manufactured by Xerox :-).

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: PHYLIB mdio fixes #2</title>
<updated>2008-12-26T00:50:41+00:00</updated>
<author>
<name>Krzysztof Halasa</name>
<email>khc@pm.waw.pl</email>
</author>
<published>2008-12-26T00:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=161c8d2f50109b44b664eaf23831ea1587979a61'/>
<id>urn:sha1:161c8d2f50109b44b664eaf23831ea1587979a61</id>
<content type='text'>
The PHYLIB mdio code has more problems in error paths:
- mdiobus_release can be called before bus-&gt;state is set to
  MDIOBUS_REGISTERED
- mdiobus_scan allocates resources which need to be freed
- the comment is wrong, the resistors used are actually pull-ups.

Signed-off-by: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
