1. 09 1月, 2009 1 次提交
  2. 07 1月, 2009 1 次提交
  3. 23 12月, 2008 1 次提交
  4. 18 12月, 2008 5 次提交
  5. 17 12月, 2008 9 次提交
  6. 15 11月, 2008 1 次提交
  7. 11 11月, 2008 1 次提交
  8. 04 11月, 2008 1 次提交
  9. 31 10月, 2008 2 次提交
    • T
      gianfar: Don't reset TBI<->SerDes link if it's already up · bdb59f94
      Trent Piepho 提交于
      The link may be up already via the chip's reset strapping, or though action
      of U-Boot, or from the last time the interface was brought up.  Resetting
      the link causes it to go down for several seconds.  This can significantly
      increase the time from power-on to DHCP completion and a device being
      accessible to the network.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Acked-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      bdb59f94
    • T
      gianfar: Fix race in TBI/SerDes configuration · c132419e
      Trent Piepho 提交于
      The init_phy() function attaches to the PHY, then configures the
      SerDes<->TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
      (sort of) and is accessed via the gianfar's MDIO registers, using the
      functions gfar_local_mdio_read/write(), which don't do any locking.
      
      The previously attached PHY will start a work-queue on a timer, and
      probably an irq handler as well, which will talk to the PHY and thus use
      the MDIO bus.  This uses phy_read/write(), which have locking, but not
      against the gfar_local_mdio versions.
      
      The result is that PHY code will try to use the MDIO bus at the same time
      as the SerDes setup code, corrupting the transfers.
      
      Setting up the SerDes before attaching to the PHY will insure that there is
      no race between the SerDes code and *our* PHY, but doesn't fix everything.
      Typically the PHYs for all gianfar devices are on the same MDIO bus, which
      is associated with the first gianfar device.  This means that the first
      gianfar's SerDes code could corrupt the MDIO transfers for a different
      gianfar's PHY.
      
      The lock used by phy_read/write() is contained in the mii_bus structure,
      which is pointed to by the PHY.  This is difficult to access from the
      gianfar drivers, as there is no link between a gianfar device and the
      mii_bus which shares the same MDIO registers.  As far as the device layer
      and drivers are concerned they are two unrelated devices (which happen to
      share registers).
      
      Generally all gianfar devices' PHYs will be on the bus associated with the
      first gianfar.  But this might not be the case, so simply locking the
      gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
      code is going to use.
      
      We solve this by having the code that creates the gianfar platform device
      look in the device tree for an mdio device that shares the gianfar's
      registers.  If one is found the ID of its platform device is saved in the
      gianfar's platform data.
      
      A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
      ID to search through the platform devices for a gianfar_mdio device with
      the right ID.  The platform device's driver data is the mii_bus structure,
      which the SerDes setup code can use to lock the current bus.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c132419e
  10. 28 10月, 2008 1 次提交
  11. 22 10月, 2008 1 次提交
  12. 09 10月, 2008 1 次提交
    • T
      gianfar: Create net device with carrier down · d3eab82b
      Trent Piepho 提交于
      The device's carrier status is controlled via the functions
      netif_carrier_on() and netif_carrier_off().  These set or clear a bit
      indicating the carrier (aka lower level link) is down, and if the state
      changed, they fire off a routing netlink event.
      
      Add a call to netif_carrier_off() before register_netdev() so that the
      newly created device will be set to carrier down.  Then when the carrier
      comes up for the first time, a netlink event will be generated, as the
      carrier changed from down to up.  Otherwise the initial carrier up will
      appear to be changing the status from up to up, and so no event is
      generated since that's not a change.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3eab82b
  13. 27 8月, 2008 1 次提交
    • S
      net: don't grab a mutex within a timer context in gianfar · ab939905
      Sebastian Siewior 提交于
      I got the following backtrace while network was unavailble:
      
      |NETDEV WATCHDOG: eth0: transmit timed out
      |BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/kernel/mutex.c:87
      |in_atomic():1, irqs_disabled():0
      |Call Trace:
      |[c0383d90] [c0006dd8] show_stack+0x48/0x184 (unreliable)
      |[c0383db0] [c001e938] __might_sleep+0xe0/0xf4
      |[c0383dc0] [c025a43c] mutex_lock+0x24/0x3c
      |[c0383de0] [c019005c] phy_stop+0x20/0x70
      |[c0383df0] [c018d4ec] stop_gfar+0x28/0xf4
      |[c0383e10] [c018e8c4] gfar_timeout+0x30/0x60
      |[c0383e20] [c01fe7c0] dev_watchdog+0xa8/0x144
      |[c0383e30] [c002f93c] run_timer_softirq+0x148/0x1c8
      |[c0383e60] [c002b084] __do_softirq+0x5c/0xc4
      |[c0383e80] [c00046fc] do_softirq+0x3c/0x54
      |[c0383e90] [c002ac60] irq_exit+0x3c/0x5c
      |[c0383ea0] [c000b378] timer_interrupt+0xe0/0xf8
      |[c0383ec0] [c000e5ac] ret_from_except+0x0/0x18
      |[c0383f80] [c000804c] cpu_idle+0xcc/0xdc
      |[c0383fa0] [c025c07c] etext+0x7c/0x90
      |[c0383fc0] [c0338960] start_kernel+0x294/0x2a8
      |[c0383ff0] [c00003dc] skpinv+0x304/0x340
      |------------[ cut here ]------------
      
      The phylock was once a spinlock but got changed into a mutex via
      commit 35b5f6b1 aka [PHYLIB: Locking fixes for PHY I/O potentially sleeping]
      Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ab939905
  14. 14 8月, 2008 1 次提交
  15. 07 8月, 2008 1 次提交
  16. 21 7月, 2008 1 次提交
    • A
      gianfar: do not touch net queue in adjust_link phylib callback · afc07946
      Anton Vorontsov 提交于
      If the net queue has not been started, we'll get this nice oops
      and non-working ethernet:
      
      PHY: 0:01 - Link is Up - 1000/Full
      ------------[ cut here ]------------
      kernel BUG at net/core/dev.c:1328!
      Oops: Exception in kernel mode, sig: 5 [#1]
      MPC837x RDB
      Modules linked in:
      NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac
      REGS: cf837e40 TRAP: 0700   Not tainted  (2.6.26-05253-g14b395e3)
      MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
      TASK = cf819400[5] 'events/0' THREAD: cf836000
      GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000
      GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000
      GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000
      GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014
      NIP [c02544a0] __netif_schedule+0x28/0x8c
      LR [c01a17d0] adjust_link+0x124/0x1cc
      Call Trace:
      [cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable)
      [cf837f10] [c01a17d0] adjust_link+0x124/0x1cc
      [cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448
      [cf837f60] [c0040254] run_workqueue+0xc8/0x168
      [cf837f90] [c00408d8] worker_thread+0x70/0xd0
      [cf837fd0] [c0044630] kthread+0x48/0x84
      [cf837ff0] [c0012610] kernel_thread+0x44/0x60
      Instruction dump:
      7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78
      7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
      ---[ end trace 13dfd73ee42d0c30 ]---
      
      Since the driver is using phylib (which is doing netif_carrier_on/off()),
      we should simply remove netif_tx_schedule_all() from adjust_link().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      afc07946
  17. 18 7月, 2008 1 次提交
  18. 17 7月, 2008 1 次提交
  19. 11 7月, 2008 1 次提交
  20. 13 5月, 2008 2 次提交
  21. 07 5月, 2008 1 次提交
  22. 29 4月, 2008 1 次提交
  23. 25 4月, 2008 2 次提交
    • A
      gianfar: Fix skb allocation strategy · 815b97c6
      Andy Fleming 提交于
      gianfar was unable to handle failed skb allocation for rx buffers, so
      we were spinning until it succeeded.  Actually, it was worse--we were
      spinning for a long time, and then silently failing.  Instead, we take
      Stephen Hemminger's suggestion to try the allocation earlier, and drop the
      packet if it failed.
      
      We also make a couple of tweaks to how buffer descriptors are set up.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      815b97c6
    • K
      net drivers: fix platform driver hotplug/coldplug · 72abb461
      Kay Sievers 提交于
      Since 43cc71ee, the platform modalias is
      prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable network
      platform drivers, to re-enable auto loading.
      
      NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support.
      That looks problematic in the first place (it even uses the ancient "struct
      device_driver" binding scheme for platform_bus!) and I suspect it will vanish
      soonish when arch/powerpc rules the world.  Also, drivers/net/ne.c would have
      needed more thought to sort out.
      
      [akpm@linux-foundation.org: fix sgiseeq.c]
      [dbrownell@users.sourceforge.net: more drivers, registration fixes]
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Vitaly Bordug <vitb@kernel.crashing.org>
      Cc: Dale Farnsworth <dale@farnsworth.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Andrew Victor <andrew@sanpeople.com>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      72abb461
  24. 17 4月, 2008 1 次提交
  25. 26 3月, 2008 1 次提交