<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy/fixed.c, branch v3.10.29</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/phy/fixed.c?h=v3.10.29</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/phy/fixed.c?h=v3.10.29'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-06-11T23:58:24Z</updated>
<entry>
<title>phy: Use pr_&lt;level&gt;</title>
<updated>2012-06-11T23:58:24Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-06-09T07:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d242488ce4627dd7e6333caab56df11ea25e239'/>
<id>urn:sha1:8d242488ce4627dd7e6333caab56df11ea25e239</id>
<content type='text'>
Use a more current logging style.

Add pr_fmt and missing newlines.
Remove embedded prefixes.
Neaten phy_print_status to avoid using KERN_CONT.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy/fixed: use an unique MDIO bus name.</title>
<updated>2012-01-11T00:35:02Z</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2012-01-09T23:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e6c643bb4502c50b6511206601b7760c610dfcc'/>
<id>urn:sha1:9e6c643bb4502c50b6511206601b7760c610dfcc</id>
<content type='text'>
Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&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>phy: error handling for platform_device_register_simple()</title>
<updated>2009-04-11T08:52:29Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2009-04-11T08:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57401d5e36d2966247e9c06b94f5133609c8da21'/>
<id>urn:sha1:57401d5e36d2966247e9c06b94f5133609c8da21</id>
<content type='text'>
platform_device_register_simple() returns ERR_PTR() and not NULL.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: two dynamic mii_bus allocation fallout fixes</title>
<updated>2008-10-09T16:45:04Z</updated>
<author>
<name>Lennert Buytenhek</name>
<email>buytenh@marvell.com</email>
</author>
<published>2008-10-09T16:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec2a5652ea53c102306f08cdf516f98e32bd4b61'/>
<id>urn:sha1:ec2a5652ea53c102306f08cdf516f98e32bd4b61</id>
<content type='text'>
1. arch/powerpc/platforms/pasemi/gpio_mdio.c also needs to be
   converted over to mdiobus_{alloc,free}().

2. drivers/net/phy/fixed.c used to embed a struct mii_bus into its
   struct fixed_mdio_bus and then use container_of() to go from the
   former to the latter.  Since mii bus structures are no longer
   embedded, we need to do something like use the mii bus private
   pointer to go from mii_bus to fixed_mdio_bus instead.

Signed-off-by: Lennert Buytenhek &lt;buytenh@marvell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: move to dynamic allocation of struct mii_bus</title>
<updated>2008-10-08T23:29:57Z</updated>
<author>
<name>Lennert Buytenhek</name>
<email>buytenh@marvell.com</email>
</author>
<published>2008-10-08T23:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=298cf9beb9679522de995e249eccbd82f7c51999'/>
<id>urn:sha1:298cf9beb9679522de995e249eccbd82f7c51999</id>
<content type='text'>
This patch introduces mdiobus_alloc() and mdiobus_free(), and
makes all mdio bus drivers use these functions to allocate their
struct mii_bus'es dynamically.

Signed-off-by: Lennert Buytenhek &lt;buytenh@marvell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
</content>
</entry>
<entry>
<title>phylib: rename mii_bus::dev to mii_bus::parent</title>
<updated>2008-10-08T23:27:49Z</updated>
<author>
<name>Lennert Buytenhek</name>
<email>buytenh@wantstofly.org</email>
</author>
<published>2008-10-01T15:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18ee49ddb0d242ed1d0e273038d5e4f6de7379d3'/>
<id>urn:sha1:18ee49ddb0d242ed1d0e273038d5e4f6de7379d3</id>
<content type='text'>
In preparation of giving mii_bus objects a device tree presence of
their own, rename struct mii_bus's -&gt;dev argument to -&gt;parent, since
having a 'struct device *dev' that points to our parent device
conflicts with introducing a 'struct device dev' representing our own
device.

Signed-off-by: Lennert Buytenhek &lt;buytenh@marvell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Andy Fleming &lt;afleming@freescale.com&gt;
</content>
</entry>
<entry>
<title>phy: Change mii_bus id field to a string</title>
<updated>2008-04-17T00:09:35Z</updated>
<author>
<name>Andy Fleming</name>
<email>afleming@freescale.com</email>
</author>
<published>2008-04-10T00:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0'/>
<id>urn:sha1:9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0</id>
<content type='text'>
Having the id field be an int was making more complex bus topologies
excessively difficult.  For now, just convert it to a string, and
change all instances of "bus-&gt;id = val" to
snprintf(id, MII_BUS_ID_LEN, "%x", val).

Signed-off-by: Andy Fleming &lt;afleming@freescale.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>net/phy/fixed.c: fix a use-after-free</title>
<updated>2008-02-11T16:15:36Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-02-02T21:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=651be3a2ba95bc30fcb737985741736e63231cdf'/>
<id>urn:sha1:651be3a2ba95bc30fcb737985741736e63231cdf</id>
<content type='text'>
This patch fixes a use-after-free introduced by
commit a79d8e93d300adb84cccc38ac396cfb118c238ad and spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
</entry>
<entry>
<title>phy/fixed.c: rework to not duplicate PHY layer functionality</title>
<updated>2008-01-24T01:33:58Z</updated>
<author>
<name>Vitaly Bordug</name>
<email>vitb@kernel.crashing.org</email>
</author>
<published>2007-12-06T22:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a79d8e93d300adb84cccc38ac396cfb118c238ad'/>
<id>urn:sha1:a79d8e93d300adb84cccc38ac396cfb118c238ad</id>
<content type='text'>
With that patch fixed.c now fully emulates MDIO bus, thus no need
to duplicate PHY layer functionality. That, in turn, drastically
simplifies the code, and drops down line count.

As an additional bonus, now there is no need to register MDIO bus
for each PHY, all emulated PHYs placed on the platform fixed MDIO bus.
There is also no more need to pre-allocate PHYs via .config option,
this is all now handled dynamically.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Vitaly Bordug &lt;vitb@kernel.crashing.org&gt;
Acked-by: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
</entry>
</feed>
