Skip to content
Snippets Groups Projects
  1. Mar 13, 2009
  2. Feb 27, 2009
  3. Feb 11, 2009
  4. Feb 01, 2009
  5. Jan 22, 2009
    • Steve Glendinning's avatar
      phy: Add suspend/resume support to SMSC PHYs · c64d2a9a
      Steve Glendinning authored
      
      All supported SMSC PHYs implement the standard "power down" bit 11 of
      BMCR, so this patch adds support using the generic genphy_{suspend,resume}
      functions.
      
      Signed-off-by: default avatarSteve Glendinning <steve.glendinning@smsc.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c64d2a9a
    • Anton Vorontsov's avatar
      phylib: Fix oops in suspend/resume paths · 6f051069
      Anton Vorontsov authored
      
      Suspend/resume routines check for phydrv != NULL, but that is
      wrong because "phydrv" comes from container_of(drv). If drv is NULL,
      then container_of(drv) will return non-NULL result, and the checks
      won't work.
      
      The Freescale TBI PHYs are driver-less, so "drv" is NULL, and that
      leads to the following oops:
      
      Unable to handle kernel paging request for data at address 0xffffffe4
      Faulting instruction address: 0xc0215554
      Oops: Kernel access of bad area, sig: 11 [#1]
      [...]
      NIP [c0215554] mdio_bus_suspend+0x34/0x70
      LR [c01cc508] suspend_device+0x258/0x2bc
      Call Trace:
      [cfad3da0] [cfad3db8] 0xcfad3db8 (unreliable)
      [cfad3db0] [c01cc508] suspend_device+0x258/0x2bc
      [cfad3dd0] [c01cc62c] dpm_suspend+0xc0/0x140
      [cfad3e20] [c01cc6f4] device_suspend+0x48/0x5c
      [cfad3e40] [c0068dd8] suspend_devices_and_enter+0x8c/0x148
      [cfad3e60] [c00690f8] enter_state+0x100/0x118
      [cfad3e80] [c00691c0] state_store+0xb0/0xe4
      [cfad3ea0] [c018c938] kobj_attr_store+0x24/0x3c
      [cfad3eb0] [c00ea9a8] flush_write_buffer+0x58/0x7c
      [cfad3ed0] [c00eadf0] sysfs_write_file+0x58/0xa0
      [cfad3ef0] [c009e810] vfs_write+0xb4/0x16c
      [cfad3f10] [c009ed40] sys_write+0x4c/0x90
      [cfad3f40] [c0014954] ret_from_syscall+0x0/0x38
      [...]
      
      This patch fixes the issue, plus removes unneeded parentheses
      and fixes indentation level in mdio_bus_suspend().
      
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f051069
  6. Jan 21, 2009
  7. Jan 14, 2009
    • Anton Vorontsov's avatar
      phylib: Fix Freescale TBI PHY detection · f0d44ae3
      Anton Vorontsov authored
      
      Freescale on-chip TBI PHYs reports PHY ID as 0x0, but as of
      
      commit 3ee82383
      Author: Giulio Benetti <giulio.benetti@micronovasrl.com>
      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->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: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f0d44ae3
  8. Dec 26, 2008
  9. Dec 17, 2008
    • Krzysztof Halasa's avatar
      net: kernel BUG at drivers/net/phy/mdio_bus.c:165! · e8e5752d
      Krzysztof Halasa authored
      
      kernel BUG at drivers/net/phy/mdio_bus.c:165!
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      
      How?
      
      mdiobus_alloc() sets bus->state = MDIOBUS_ALLOCATED.
      
      mdiobus_register() sets bus->state = MDIOBUS_REGISTERED but then can
         fail (mdiobus_scan()) returning an error to the caller.
      
      The caller aborts correctly with mdiobus_free() which does:
              if (bus->state == MDIOBUS_ALLOCATED) {
                      kfree(bus);
                      return;
              }
      
              BUG_ON(bus->state != MDIOBUS_UNREGISTERED);
      
      Signed-off-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8e5752d
  10. Dec 16, 2008
  11. Dec 10, 2008
  12. Nov 29, 2008
  13. Nov 25, 2008
  14. Nov 22, 2008
  15. Nov 21, 2008
  16. Nov 19, 2008
    • Trent Piepho's avatar
      phylib: Fix auto-negotiation restart avoidance · de339c2a
      Trent Piepho authored
      
      A previous patch, 51e2a384, made
      genphy_config_aneg() not restart aneg by calling genphy_restart_aneg() if
      the advertisement hadn't changed.
      
      But, genphy_restart_aneg() doesn't just restart aneg, it may also *enable*
      aneg or un-isolate the PHY from the MII (those functions are controlled by
      the same register).  The code to avoid calling genphy_restart_aneg() didn't
      consider this.
      
      So, modify genphy_config_aneg() to also check if the PHY needs to have aneg
      enabled or be un-isolated before deciding not to restart aneg.
      
      This caused a problem with certain Davicom PHYs, as that driver isolates
      the PHY (why?) before calling genphy_config_aneg() and expects the PHY to
      be un-isolated by that function.
      
      Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
      Reported-by: default avatarScott Wood <scottwood@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de339c2a
  17. Nov 17, 2008
  18. Nov 16, 2008
  19. Nov 15, 2008
  20. Nov 14, 2008
    • Lennert Buytenhek's avatar
      phylib: fix premature freeing of struct mii_bus · 3e44017b
      Lennert Buytenhek authored
      
      Commit 46abc021 ("phylib: give mdio
      buses a device tree presence") added a call to device_unregister() in
      a situation where the caller did not intend for the device to be
      freed yet, but apart from just unregistering the device from the
      system, device_unregister() does an additional put_device() that is
      intended to free it.
      
      The right function to use in this situation is device_del(), which
      unregisters the device from the system like device_unregister() does,
      but without dropping the reference count an additional time.
      
      Bug report from Bryan Wu <cooloney@kernel.org>.
      
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Tested-by: default avatarBryan Wu <cooloney@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      3e44017b
  21. Nov 10, 2008
  22. Nov 06, 2008
  23. Nov 04, 2008
  24. Oct 16, 2008
  25. Oct 14, 2008
  26. Oct 09, 2008
  27. Oct 08, 2008
Loading