<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy/phy.c, branch v3.0.31</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/phy/phy.c?h=v3.0.31</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/phy/phy.c?h=v3.0.31'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-04-29T21:03:01Z</updated>
<entry>
<title>ethtool: cosmetic: Use ethtool ethtool_cmd_speed API</title>
<updated>2011-04-29T21:03:01Z</updated>
<author>
<name>David Decotigny</name>
<email>decot@google.com</email>
</author>
<published>2011-04-27T18:32:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=707394972093e2056e1e8cc39be19cf9bcb3e7b3'/>
<id>urn:sha1:707394972093e2056e1e8cc39be19cf9bcb3e7b3</id>
<content type='text'>
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.

For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.

All drivers compiled with make allyesconfig ion x86_64 have been
updated.

Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny &lt;decot@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: Use full 32 bit speed range in ethtool's set_settings</title>
<updated>2011-04-29T21:03:00Z</updated>
<author>
<name>David Decotigny</name>
<email>decot@google.com</email>
</author>
<published>2011-04-27T18:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=25db0338813a8915457636b1f6abe6a28fa73f8d'/>
<id>urn:sha1:25db0338813a8915457636b1f6abe6a28fa73f8d</id>
<content type='text'>
This makes sure the ethtool's set_settings() callback of network
drivers don't ignore the 16 most significant bits when ethtool calls
their set_settings().

All drivers compiled with make allyesconfig on x86_64 have been
updated.

Signed-off-by: David Decotigny &lt;decot@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses</title>
<updated>2011-03-14T22:02:14Z</updated>
<author>
<name>Peter Korsgaard</name>
<email>jacmet@sunsite.dk</email>
</author>
<published>2011-03-10T06:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af1dc13e607c1d1a909e21ee87aafbe7b9d4ae81'/>
<id>urn:sha1:af1dc13e607c1d1a909e21ee87aafbe7b9d4ae81</id>
<content type='text'>
phylib would silently ignore the phy_id argument to these ioctls and
perform the read/write with the active phydev address, whereas most
non-phylib drivers seem to allow access to all mdio addresses
(E.G. pcnet_cs).

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add some KERN_CONT markers to continuation lines</title>
<updated>2010-11-28T18:47:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-11-23T22:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a40c9f88b5e3da500ddab9440e5ddac170c12281'/>
<id>urn:sha1:a40c9f88b5e3da500ddab9440e5ddac170c12281</id>
<content type='text'>
Cc: netdev@vger.kernel.org
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: make local function static</title>
<updated>2010-10-24T22:07:11Z</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2010-10-21T08:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=89ff05ec553f3e70b8773c501da01bf7ad952cab'/>
<id>urn:sha1:89ff05ec553f3e70b8773c501da01bf7ad952cab</id>
<content type='text'>
The following functions are not used directly by any drivers:
    phy_attach_direct
    phy_device_create
    phy_prepare_link
    genphy_config_advert
    genphy_setup_forced
    phy_config_interrupt
    phy_clear_interrypt
    phy_sanitize_settings
    phy_enable_interrupts
    phy_disable_interrupts

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy.c: fix kernel-doc warnings</title>
<updated>2010-08-10T07:09:21Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2010-08-09T13:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00c7d9202a19091d1873954ba158375d2efd5a64'/>
<id>urn:sha1:00c7d9202a19091d1873954ba158375d2efd5a64</id>
<content type='text'>
Fix phy.c kernel-doc notation:

Warning(drivers/net/phy/phy.c:313): No description found for parameter 'ifr'
Warning(drivers/net/phy/phy.c:313): Excess function parameter 'mii_data' description in 'phy_mii_ioctl'

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>net: support time stamping in phy devices.</title>
<updated>2010-07-19T02:15:26Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2010-07-17T08:49:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c1f19b51d1d87f3e3bb7e6648f43f7d57ed2da6b'/>
<id>urn:sha1:c1f19b51d1d87f3e3bb7e6648f43f7d57ed2da6b</id>
<content type='text'>
This patch adds a new networking option to allow hardware time stamps
from PHY devices. When enabled, likely candidates among incoming and
outgoing network packets are offered to the PHY driver for possible
time stamping. When accepted by the PHY driver, incoming packets are
deferred for later delivery by the driver.

The patch also adds phylib driver methods for the SIOCSHWTSTAMP ioctl
and callbacks for transmit and receive time stamping. Drivers may
optionally implement these functions.

Signed-off-by: Richard Cochran &lt;richard.cochran@omicron.at&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: preserve ifreq parameter when calling generic phy_mii_ioctl().</title>
<updated>2010-07-19T02:15:25Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2010-07-17T08:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=28b041139e344ecd0f144d6205b004ae354cfa1e'/>
<id>urn:sha1:28b041139e344ecd0f144d6205b004ae354cfa1e</id>
<content type='text'>
The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
We need access to the ifreq in order to support PHYs that can perform
hardware time stamping.

Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
This is unnecessary since phylib will check the command in any case.

Signed-off-by: Richard Cochran &lt;richard.cochran@omicron.at&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>phylib: Move workqueue initialization to a proper place</title>
<updated>2010-01-19T09:59:02Z</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2010-01-18T05:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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>
</feed>
