1. 21 10月, 2009 1 次提交
  2. 16 9月, 2009 1 次提交
  3. 03 9月, 2009 2 次提交
    • U
      fec: don't enable irqs in hard irq context · 81538e74
      Uwe Kleine-König 提交于
      fec_enet_mii, fec_enet_rx and fec_enet_tx are both only called by
      fec_enet_interrupt in interrupt context.  So they must not use
      spin_lock_irq/spin_unlock_irq.
      
      This fixes:
      	WARNING: at kernel/lockdep.c:2140 trace_hardirqs_on_caller+0x130/0x194()
      	...
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Matt Waddel <Matt.Waddel@freescale.com>
      Cc: netdev@vger.kernel.org
      Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81538e74
    • U
      fec: fix recursive locking of mii_lock · 84177a20
      Uwe Kleine-König 提交于
      mii_discover_phy is only called by fec_enet_mii (via mip->mii_func).  So
      &fep->mii_lock is already held and mii_discover_phy must not call
      mii_queue which locks &fep->mii_lock, too.
      
      This was noticed by lockdep:
      
      	=============================================
      	[ INFO: possible recursive locking detected ]
      	2.6.31-rc8-00038-g37d0892c #109
      	---------------------------------------------
      	swapper/1 is trying to acquire lock:
      	 (&fep->mii_lock){-.....}, at: [<c01569f8>] mii_queue+0x2c/0xcc
      
      	but task is already holding lock:
      	 (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460
      
      	other info that might help us debug this:
      	2 locks held by swapper/1:
      	 #0:  (rtnl_mutex){+.+.+.}, at: [<c0183534>] rtnl_lock+0x18/0x20
      	 #1:  (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460
      
      	stack backtrace:
      	Backtrace:
      	[<c00226fc>] (dump_backtrace+0x0/0x108) from [<c01eac14>] (dump_stack+0x18/0x1c)
      	 r6:c781d118 r5:c03e41d8 r4:00000001
      	[<c01eabfc>] (dump_stack+0x0/0x1c) from [<c005bae4>] (__lock_acquire+0x1a20/0x1a88)
      	[<c005a0c4>] (__lock_acquire+0x0/0x1a88) from [<c005bbac>] (lock_acquire+0x60/0x74)
      	[<c005bb4c>] (lock_acquire+0x0/0x74) from [<c01edda8>] (_spin_lock_irqsave+0x54/0x68)
      	 r7:60000093 r6:c01569f8 r5:c785e468 r4:00000000
      	[<c01edd54>] (_spin_lock_irqsave+0x0/0x68) from [<c01569f8>] (mii_queue+0x2c/0xcc)
      	 r7:c785e468 r6:c0156b24 r5:600a0000 r4:c785e000
      	[<c01569cc>] (mii_queue+0x0/0xcc) from [<c0156b78>] (mii_discover_phy+0x54/0xa8)
      	 r8:00000002 r7:00000032 r6:c785e000 r5:c785e360 r4:c785e000
      	[<c0156b24>] (mii_discover_phy+0x0/0xa8) from [<c0156354>] (fec_enet_interrupt+0xa4/0x460)
      	 r5:c785e360 r4:c077a170
      	[<c01562b0>] (fec_enet_interrupt+0x0/0x460) from [<c0066674>] (handle_IRQ_event+0x48/0x120)
      	[<c006662c>] (handle_IRQ_event+0x0/0x120) from [<c0068438>] (handle_level_irq+0x94/0x11c)
      	...
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Matt Waddel <Matt.Waddel@freescale.com>
      Cc: netdev@vger.kernel.org
      Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84177a20
  4. 10 8月, 2009 1 次提交
    • G
      fec: fix FEC driver packet transmission breakage · 9555b31e
      Greg Ungerer 提交于
      Commit f0b3fbea ("FEC Buffer rework")
      breaks transmission of packets where the skb data buffer is not memory
      aligned according to FEC_ALIGNMENT. It incorrectly passes to
      dma_sync_single() the buffer address directly from the skb, instead of
      the address calculated for use (which may be the skb address or one of
      the bounce buffers).
      
      It seems there is no use converting the cpu address of the buffer to
      a physical either, since dma_map_single() expects the cpu address and
      will return the dma address to use in the descriptor. So remove the use
      of __pa() on the buffer address as well.
      
      This patch is against 2.6.30-rc5. This breakage is a regression over
      2.6.30, which does not have this problem.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9555b31e
  5. 13 7月, 2009 1 次提交
  6. 06 7月, 2009 1 次提交
  7. 13 6月, 2009 1 次提交
  8. 16 4月, 2009 11 次提交
  9. 09 4月, 2009 1 次提交
  10. 27 2月, 2009 1 次提交
  11. 01 2月, 2009 9 次提交
  12. 27 1月, 2009 1 次提交
  13. 13 11月, 2008 1 次提交
    • W
      netdevice: safe convert to netdev_priv() #part-2 · 4cf1653a
      Wang Chen 提交于
      We have some reasons to kill netdev->priv:
      1. netdev->priv is equal to netdev_priv().
      2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
         netdev_priv() is more flexible than netdev->priv.
      But we cann't kill netdev->priv, because so many drivers reference to it
      directly.
      
      This patch is a safe convert for netdev->priv to netdev_priv(netdev).
      Since all of the netdev->priv is only for read.
      But it is too big to be sent in one mail.
      I split it to 4 parts and make every part smaller than 100,000 bytes,
      which is max size allowed by vger.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cf1653a
  14. 28 10月, 2008 1 次提交
  15. 23 7月, 2008 3 次提交
  16. 01 5月, 2008 4 次提交