04 Feb, 2010

27 commits

  • David S. Miller
     
  • a developer had complained of getting lots of warnings:

    "eth16 selects TX queue 98, but real number of TX queues is 64"

    http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html

    As there was no follow up on that bug, I am submitting this
    patch assuming that the other return points will not return
    invalid txq's, and also that this fixes the bug (not tested).

    Signed-off-by: Krishna Kumar
    Signed-off-by: Jesse Brandeburg
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Krishna Kumar
     
  • Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove
    skb_dma_map/unmap calls from driver) looks to have introduced a bug in
    ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
    through count until it becomes -1 and return that.

    The caller of ixgbe_tx_map expects 0 on error, so return that instead.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Anton Blanchard
     
  • o context resources can be in used, while resource cleanup is in progress,
    during fw recover.
    o Null pointer execption can occur in send_cmd_desc, if fw recovery
    module frees tx ring without rtnl lock.
    o Same applies to ethtool register dump.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • For NX2031, first try to scrub interrupt before requesting firmware
    reset. Return statement was missing after scrubbbing interrupt.

    Signed-off-by: Vernon Mauery
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Earlier refactoring has made these inclusions unnecessary.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • In particular, the comment about EVQ_RPTR_REG is based on inconsistent
    preliminary hardware documentation, though the following code was
    fixed long before release.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Guido Barzini
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • SFC9000-family boards do not all use MDIO PHYs, so we need a different
    test for PHY aliveness.

    Introduce a PHY operation test_alive(). For PHYs attached to Falcon,
    use a common implementation based on the existing PHY MDIO test.
    For PHYs managed through MCDI, use the appropriate MCDI request.

    Change test name in ethtool from 'core mdio' to 'phy alive'.

    Rename test_results::mdio to phy_alive and test_results::phy to phy_ext.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • This allows the driver to recover if the MC firmware has crashed due
    to an assertion failure.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • This fixes commit (38ff3e6bb987ec583268da8eb22628293095d43b) ("dccp_probe:
    Fix module load dependencies between dccp and dccp_probe", from 15 Jan).

    It fixes the construction of the first argument of try_then_request_module(),
    where only valid return codes from the first argument should be returned.

    What we do now is assign the result of register_jprobe() to ret, without
    the side effect of the comparison.

    Acked-by: Gerrit Renker
    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This fixes a bug introduced in commit de4ef86cfce60d2250111f34f8a084e769f23b16
    ("dccp: fix dccp rmmod when kernel configured to use slub", 17 Jan): the
    vsnprintf used sizeof(slab_name_fmt), which became truncated to 4 bytes, since
    slab_name_fmt is now a 4-byte pointer and no longer a 32-character array.

    This lead to error messages such as
    FATAL: Error inserting dccp: No buffer space available

    >> kernel: [ 1456.341501] kmem_cache_create: duplicate cache cci
    generated due to the truncation after the 3rd character.

    Fixed for the moment by introducing a symbolic constant. Tested to fix the bug.

    Signed-off-by: Gerrit Renker
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • String constants that are continued on subsequent lines with \
    are not good.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • This driver is for CAN interface cards based on the PLX90xx PCI bridge.
    Driver supports now:
    - Adlink PCI-7841/cPCI-7841 card (http://www.adlinktech.com/)
    - Adlink PCI-7841/cPCI-7841 SE card
    - Marathon CAN-bus-PCI card (http://www.marathon.ru/)
    - TEWS TECHNOLOGIES TPMC810 card (http://www.tews.com/)

    Changes since v1:
    - Added some defines for static inline int plx_pci_check_sja1000(...)
    - static struct pci_device_id plx_pci_tbl[] replaced by
    static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl)
    - Typo fixed

    Signed-off-by: Pavel Cheblakov
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Pavel Cheblakov
     
  • Add memory barriers to fix crashes observed on newest PowerPC platforms.
    The HW and driver state of the receive rings were getting out of sync.

    Signed-off-by: Divy Le Ray
    Signed-off-by: David S. Miller

    Divy Le Ray
     
  • The book keeping structure for transmit always had the flags value
    cleared so transmit DMA maps were never released correctly.
    Based on patch by Jarek Poplawski, problem observed by Michael Breuer.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • ChangeLog:
    Implement .reset_resume support to retain a live network connection
    during suspend despite USB power loss.
    - rework operation to reference cached data in mcs7830_data and
    netdev->dev_addr
    - update netdev->dev_addr only in case new MAC was set successfully
    . Tests done:
    . ethtool -d pre-/post-suspend: register values match
    . running ssh session suspend, resume: works
    . ifdown device, suspend, resume: works
    . ifup, suspend, unplug, resume: WORKS (eth1 is removed, re-ifup of eth1
    after card replug works)
    . verified identical MAC in ifconfig post-resume
    (ok, should be verified on network side to be fully certain...)

    Keywords: suspend resume network connection dead interface down

    Signed-off-by: Andreas Mohr
    Signed-off-by: David S. Miller

    Andreas Mohr
     
  • ChangeLog:
    - rename register, add comment

    Signed-off-by: Andreas Mohr
    Signed-off-by: David S. Miller

    Andreas Mohr
     
  • ChangeLog:
    - spelling corrections / whitespace

    Signed-off-by: Andreas Mohr
    Signed-off-by: David S. Miller

    Andreas Mohr
     
  • ChangeLog:
    - evaluate Rx error statistics from trailing Rx status byte
    - add driver TODO list
    - add myself to authors

    Quilt series run-tested, based on 2.6.33-rc4 (net-2.6.git mcs7830 has idle history,
    should be good to go).

    Signed-off-by: Andreas Mohr
    Signed-off-by: David S. Miller

    Andreas Mohr
     
  • Netlink code does module autoload if protocol userspace is asking for is
    not ready. However, module can dissapear right after it was autoloaded.
    Example: modprobe/rmmod stress-testing and xfrm_user.ko providing NETLINK_XFRM.

    netlink_create() in such situation _will_ create userspace socket and
    _will_not_ pin module. Now if module was removed and we're going to call
    ->netlink_rcv into nothing:

    BUG: unable to handle kernel paging request at ffffffffa02f842a
    ^^^^^^^^^^^^^^^^
    modules are loaded near these addresses here

    IP: [] 0xffffffffa02f842a
    PGD 161f067 PUD 1623063 PMD baa12067 PTE 0
    Oops: 0010 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
    CPU 1
    Pid: 11515, comm: ip Not tainted 2.6.33-rc5-netns-00594-gaaa5728-dirty #6 P5E/P5E
    RIP: 0010:[] [] 0xffffffffa02f842a
    RSP: 0018:ffff8800baa3db48 EFLAGS: 00010292
    RAX: ffff8800baa3dfd8 RBX: ffff8800be353640 RCX: 0000000000000000
    RDX: ffffffff81959380 RSI: ffff8800bab7f130 RDI: 0000000000000001
    RBP: ffff8800baa3db58 R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000011
    R13: ffff8800be353640 R14: ffff8800bcdec240 R15: ffff8800bd488010
    FS: 00007f93749656f0(0000) GS:ffff880002300000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffffffffa02f842a CR3: 00000000ba82b000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process ip (pid: 11515, threadinfo ffff8800baa3c000, task ffff8800bab7eb30)
    Stack:
    ffffffff813637c0 ffff8800bd488000 ffff8800baa3dba8 ffffffff8136397d
    0000000000000000 ffffffff81344adc 7fffffffffffffff 0000000000000000
    ffff8800baa3ded8 ffff8800be353640 ffff8800bcdec240 0000000000000000
    Call Trace:
    [] ? netlink_unicast+0x100/0x2d0
    [] netlink_unicast+0x2bd/0x2d0

    netlink_unicast_kernel:
    nlk->netlink_rcv(skb);

    [] ? memcpy_fromiovec+0x6c/0x90
    [] netlink_sendmsg+0x1d3/0x2d0
    [] sock_sendmsg+0xbb/0xf0
    [] ? __lock_acquire+0x27b/0xa60
    [] ? might_fault+0x73/0xd0
    [] ? might_fault+0x73/0xd0
    [] ? __lock_release+0x82/0x170
    [] ? might_fault+0xbe/0xd0
    [] ? might_fault+0x73/0xd0
    [] ? verify_iovec+0x47/0xd0
    [] sys_sendmsg+0x1a9/0x360
    [] ? _raw_spin_unlock_irqrestore+0x65/0x70
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? _raw_spin_unlock_irqrestore+0x42/0x70
    [] ? __up_read+0x84/0xb0
    [] ? trace_hardirqs_on_caller+0x145/0x190
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b
    Code: Bad RIP value.
    RIP [] 0xffffffffa02f842a
    RSP
    CR2: ffffffffa02f842a

    If module was quickly removed after autoloading, return -E.

    Return -EPROTONOSUPPORT if module was quickly removed after autoloading.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • 1. After sock_register() returns, it's possible to create sockets,
    even if module still not initialized fully (blame generic module code
    for that!)
    2. Consequently, pfkey_create() can be called with pfkey_net_id still not
    initialized which will BUG_ON in net_generic():
    kernel BUG at include/net/netns/generic.h:43!
    3. During netns shutdown, netns ops should be unregistered after
    key manager unregistered because key manager calls can be triggered
    from xfrm_user module:

    general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    pfkey_broadcast+0x111/0x210 [af_key]
    pfkey_send_notify+0x16a/0x300 [af_key]
    km_state_notify+0x41/0x70
    xfrm_flush_sa+0x75/0x90 [xfrm_user]
    4. Unregister netns ops after socket ops just in case and for symmetry.

    Reported by Luca Tettamanti.

    Signed-off-by: Alexey Dobriyan
    Tested-by: Luca Tettamanti
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

03 Feb, 2010

13 commits

  • On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
    > > There are at least two ways to fix it: using a big cannon and a small
    > > one. The former way is to disable notification registration, since it is
    > > not used by anyone at all. Second way is to check whether calling
    > > process is root and its destination group is -1 (kind of priveledged
    > > one) before command is dispatched to workqueue.
    >
    > Well if no one is using it, removing it makes the most sense, right?
    >
    > No objection from me, care to make up a patch either way for this?

    Getting it is not used, let's drop support for notifications about
    (un)registered events from connector.
    Another option was to check credentials on receiving, but we can always
    restore it without bugs if needed, but genetlink has a wider code base
    and none complained, that userspace can not get notification when some
    other clients were (un)registered.

    Kudos for Sebastian Krahmer , who found a bug in the
    code.

    Signed-off-by: Evgeniy Polyakov
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: David S. Miller

    Evgeniy Polyakov
     
  • Loopback test (offline) added in ethtool self test.
    o Set device in loopback mode
    o Send packets
    o Process receive packets in qlcnic_process_rcv_ring_diag()
    o Compare packets
    o Reset device in normal mode.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Interrupt test (offline) added in ethtool self test.
    Register a temporary interrupt handler and then send command to fw
    to raise an interrupt.

    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Added support of device identification by blinking LED for specified time.

    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Sucheta Chakraborty
     
  • o context resources can be in used, while resoruce cleanup is in progress,
    during fw recover.
    o Null pointer execption can occur in send_cmd_desc, if fw recovery
    module frees tx ring without rtnl lock.
    o Same applies to ethtool register dump and FW health registers should be dump
    in any case.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • o After firmware recovery, clear device reset state transition register.
    Otherwise firmware reload can occur unnecessary.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Added missing identifier that distinguishes between
    FCOE/ISCSI/ETHERNET functions.

    Signed-off-by: Rajesh K Borundia
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into
    correct section in every case.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Btw of the dma-debug problem reported by Michael Breuer I spotted
    a tiny misspelling in TX_MAP_PAGE definition introduced by commit
    6b84dacadbdc3.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • virtio_net receives packets from its pre-allocated vring buffers, then it
    delivers these packets to upper layer protocols as skb buffs. So it's not
    necessary to pre-allocate skb for each mergable buffer, then frees extra
    skbs when buffers are merged into a large packet. This patch has deferred
    skb allocation in receiving packets for both big packets and mergeable buffers
    to reduce skb pre-allocations and skb frees. It frees unused buffers by calling
    detach_unused_buf in vring, so recv skb queue is not needed.

    Signed-off-by: Shirley Ma
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Shirley Ma
     
  • There's currently no way for a virtio driver to ask for unused
    buffers, so it has to keep a list itself to reclaim them at shutdown.
    This is redundant, since virtio_ring stores that information. So
    add a new hook to do this.

    Signed-off-by: Shirley Ma
    Signed-off-by: Amit Shah
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Shirley Ma
     
  • Use atomic_inc_return() in get_acqseq() to avoid taking a spinlock

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy