1. 27 9月, 2009 5 次提交
  2. 26 9月, 2009 2 次提交
  3. 25 9月, 2009 2 次提交
    • A
      3c59x: Get rid of "Trying to free already-free IRQ" · 704cc92e
      Anton Vorontsov 提交于
      Following trace pops up if we try to suspend with 3c59x ethernet NIC
      brought down:
      
        root@b1:~# ifconfig eth16 down
        root@b1:~# echo mem > /sys/power/state
        ...
        3c59x 0000:00:10.0: suspend
        3c59x 0000:00:10.0: PME# disabled
        Trying to free already-free IRQ 48
        ------------[ cut here ]------------
        Badness at c00554e4 [verbose debug info unavailable]
        NIP: c00554e4 LR: c00554e4 CTR: c019a098
        REGS: c7975c60 TRAP: 0700   Not tainted  (2.6.31-rc4)
        MSR: 00021032 <ME,CE,IR,DR>  CR: 28242422  XER: 20000000
        TASK = c79cb0c0[1746] 'bash' THREAD: c7974000
        ...
        NIP [c00554e4] __free_irq+0x108/0x1b0
        LR [c00554e4] __free_irq+0x108/0x1b0
        Call Trace:
        [c7975d10] [c00554e4] __free_irq+0x108/0x1b0 (unreliable)
        [c7975d30] [c005559c] free_irq+0x10/0x24
        [c7975d40] [c01e21ec] vortex_suspend+0x70/0xc4
        [c7975d60] [c017e584] pci_legacy_suspend+0x58/0x100
      
      This is because the driver manages interrupts without checking for
      netif_running().
      
      Though, there are few other issues with suspend/resume in this driver.
      The intention of calling free_irq() in suspend() was to avoid any
      possible spurious interrupts (see commit 5b039e68
      "3c59x PM fixes"). But,
      
      - On resume, the driver was requesting IRQ just after pci_set_master(),
        but before vortex_up() (which actually resets 3c59x chips).
      
      - Issuing free_irq() on a shared IRQ doesn't guarantee that a buggy
        HW won't trigger spurious interrupts in another driver that
        requested the same interrupt. So, if we want to protect from
        unexpected interrupts, then on suspend we should issue disable_irq(),
        not free_irq().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      704cc92e
    • S
      ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 · edf42a27
      Sebastian Haas 提交于
      The driver mapped only 128 bytes of the CAN controller address space when a
      CPC-PCI v2 was detected (incl. CPC-104P). This patch will fix it by always
      mapping the whole address space (4096 bytes on all boards) of the
      corresponding PCI BAR.
      Signed-off-by: NSebastian Haas <haas@ems-wuensche.com>
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edf42a27
  4. 24 9月, 2009 8 次提交
    • A
      sysctl: remove "struct file *" argument of ->proc_handler · 8d65af78
      Alexey Dobriyan 提交于
      It's unused.
      
      It isn't needed -- read or write flag is already passed and sysctl
      shouldn't care about the rest.
      
      It _was_ used in two places at arch/frv for some reason.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d65af78
    • A
      virtio_net: Check for room in the vq before adding buffer · 0aea51c3
      Amit Shah 提交于
      Saves us one cycle of alloc-add-free if the queue was full.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
      0aea51c3
    • R
      virtio_net: avoid (most) NETDEV_TX_BUSY by stopping queue early. · 48925e37
      Rusty Russell 提交于
      Now we can tell the theoretical capacity remaining in the output
      queue, virtio_net can waste entries by stopping the queue early.
      
      It doesn't work in the case of indirect buffers and kmalloc failure,
      but that's rare (we could drop the packet in that case, but other
      drivers return TX_BUSY for similar reasons).
      
      For the record, I think this patch reflects poorly on the linux
      network API.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Dinesh Subhraveti <dineshs@us.ibm.com>
      48925e37
    • R
      virtio_net: formalize skb_vnet_hdr · b3f24698
      Rusty Russell 提交于
      We put the virtio_net_hdr into the skb's cb region; turn this into a
      union to clean up the code slightly and allow future expansion.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Dinesh Subhraveti <dineshs@us.ibm.com>
      b3f24698
    • R
      virtio_net: don't free buffers in xmit ring · b0c39dbd
      Rusty Russell 提交于
      The virtio_net driver is complicated by the two methods of freeing old
      xmit buffers (in addition to freeing old ones at the start of the xmit
      path).
      
      The original code used a 1/10 second timer attached to xmit_free(),
      reset on every xmit.  Before we orphaned skbs on xmit, the
      transmitting userspace could block with a full socket until the timer
      fired, the skb destructor was called, and they were re-woken.
      
      So we added the VIRTIO_F_NOTIFY_ON_EMPTY feature: supporting devices
      send an interrupt (even if normally suppressed) on an empty xmit ring
      which makes us schedule xmit_tasklet().  This was a benchmark win.
      
      Unfortunately, VIRTIO_F_NOTIFY_ON_EMPTY makes quite a lot of work: a
      host which is faster than the guest will fire the interrupt every xmit
      packet (slowing the guest down further).  Attempting mitigation in the
      host adds overhead of userspace timers (possibly with the additional
      pain of signals), and risks increasing latency anyway if you get it
      wrong.
      
      In practice, this effect was masked by benchmarks which take advantage
      of GSO (with its inherent transmit batching), but it's still there.
      
      Now we orphan xmitted skbs, the pressure is off: remove both paths and
      no longer request VIRTIO_F_NOTIFY_ON_EMPTY.  Note that the current
      QEMU will notify us even if we don't negotiate this feature (legal,
      but suboptimal); a patch is outstanding to improve that.
      
      Move the skb_orphan/nf_reset to after we've done the send and notified
      the other end, for a slight optimization.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Mark McLoughlin <markmc@redhat.com>
      b0c39dbd
    • R
      virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb. · 8958f574
      Rusty Russell 提交于
      This effectively reverts 99ffc696
      "virtio: wean net driver off NETDEV_TX_BUSY".
      
      The complexity of queuing an skb (setting a tasklet to re-xmit) is
      questionable, especially once we get rid of the other reason for the
      tasklet in the next patch.
      
      If the skb won't fit in the tx queue, just return NETDEV_TX_BUSY.
      This is frowned upon, so a followup patch uses a more complex solution.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      8958f574
    • R
      virtio_net: skb_orphan() and nf_reset() in xmit path. · 2b5bbe3b
      Rusty Russell 提交于
      The complex transmit free logic was introduced to avoid hangs on
      removing the ip_conntrack module and also because drivers aren't
      generally supposed to keep stale skbs for unbounded times.
      
      After some debate, it was decided that while doing skb_orphan()
      generally is a rat's nest, we can do it in this driver.  Following
      patches take advantage of this.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      2b5bbe3b
    • L
      cpumask: use zalloc_cpumask_var() where possible · 79f55997
      Li Zefan 提交于
      Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node().
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      79f55997
  5. 23 9月, 2009 23 次提交