1. 17 12月, 2008 1 次提交
  2. 15 11月, 2008 1 次提交
  3. 11 11月, 2008 1 次提交
  4. 04 11月, 2008 1 次提交
  5. 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
  6. 28 10月, 2008 1 次提交
  7. 22 10月, 2008 1 次提交
  8. 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
  9. 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
  10. 14 8月, 2008 1 次提交
  11. 07 8月, 2008 1 次提交
  12. 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
  13. 18 7月, 2008 1 次提交
  14. 17 7月, 2008 1 次提交
  15. 11 7月, 2008 1 次提交
  16. 13 5月, 2008 2 次提交
  17. 07 5月, 2008 1 次提交
  18. 29 4月, 2008 1 次提交
  19. 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
  20. 17 4月, 2008 1 次提交
  21. 26 3月, 2008 3 次提交
  22. 24 2月, 2008 1 次提交
  23. 15 2月, 2008 1 次提交
  24. 05 12月, 2007 1 次提交
  25. 18 10月, 2007 1 次提交
  26. 17 10月, 2007 1 次提交
  27. 16 10月, 2007 3 次提交
  28. 11 10月, 2007 4 次提交
    • J
      [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF() · 0795af57
      Joe Perches 提交于
      This is nicer than the MAC_FMT stuff.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0795af57
    • J
      [NET] drivers/net: statistics cleanup #1 -- save memory and shrink code · 09f75cd7
      Jeff Garzik 提交于
      We now have struct net_device_stats embedded in struct net_device,
      and the default ->get_stats() hook does the obvious thing for us.
      
      Run through drivers/net/* and remove the driver-local storage of
      statistics, and driver-local ->get_stats() hook where applicable.
      
      This was just the low-hanging fruit in drivers/net; plenty more drivers
      remain to be updated.
      
      [ Resolved conflicts with napi_struct changes and fix sunqe build
        regression... -DaveM ]
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09f75cd7
    • R
      [NET]: Nuke SET_MODULE_OWNER macro. · 10d024c1
      Ralf Baechle 提交于
      It's been a useless no-op for long enough in 2.6 so I figured it's time to
      remove it.  The number of people that could object because they're
      maintaining unified 2.4 and 2.6 drivers is probably rather small.
      
      [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10d024c1
    • S
      [NET]: Make NAPI polling independent of struct net_device objects. · bea3348e
      Stephen Hemminger 提交于
      Several devices have multiple independant RX queues per net
      device, and some have a single interrupt doorbell for several
      queues.
      
      In either case, it's easier to support layouts like that if the
      structure representing the poll is independant from the net
      device itself.
      
      The signature of the ->poll() call back goes from:
      
      	int foo_poll(struct net_device *dev, int *budget)
      
      to
      
      	int foo_poll(struct napi_struct *napi, int budget)
      
      The caller is returned the number of RX packets processed (or
      the number of "NAPI credits" consumed if you want to get
      abstract).  The callee no longer messes around bumping
      dev->quota, *budget, etc. because that is all handled in the
      caller upon return.
      
      The napi_struct is to be embedded in the device driver private data
      structures.
      
      Furthermore, it is the driver's responsibility to disable all NAPI
      instances in it's ->stop() device close handler.  Since the
      napi_struct is privatized into the driver's private data structures,
      only the driver knows how to get at all of the napi_struct instances
      it may have per-device.
      
      With lots of help and suggestions from Rusty Russell, Roland Dreier,
      Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
      
      Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
      Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
      
      [ Ported to current tree and all drivers converted.  Integrated
        Stephen's follow-on kerneldoc additions, and restored poll_list
        handling to the old style to fix mutual exclusion issues.  -DaveM ]
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bea3348e
  29. 19 7月, 2007 1 次提交
    • A
      Fix RGMII-ID handling in gianfar · 7132ab7f
      Andy Fleming 提交于
      The TSEC/eTSEC can detect the interface to the PHY automatically,
      but it isn't able to detect whether the RGMII connection needs internal
      delay.  So we need to detect that change in the device tree, propagate
      it to the platform data, and then check it if we're in RGMII.  This fixes
      a bug on the 8641D HPCN board where the Vitesse PHY doesn't use the delay
      for RGMII.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      7132ab7f
  30. 09 7月, 2007 1 次提交