20 May, 2011

22 commits

  • I was investigating some warnings that spew because of the
    _DEBUG_FOO ifdef'ery in here.

    Instead of adding more ifdefs to fix that warning, let's use
    pr_debug() and get rid of these CPP checks altogether.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch updates the tg3 version to 3.119.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit 4d95847381228639844c7197deb8b2211274ef22, entitled
    "tg3: Workaround rx_discards stat bug", was intended to be applied to
    the 5717, 5718, 5719_A0, and 5720 A0 chip revisions. The implementation
    missed the latter two when applying the fix in a critical area. This
    patch fixes the problem.

    Signed-off-by: Matt Carlson
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch removes some excessive parenthesizing.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch consolidates all the netdev feature bit assignments to one
    location.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch moves the code that asserts the TSO_CAPABLE flag closer to
    where the TSO capabilities flags are set. There isn't a good enough
    reason for the code to be separated.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit 4d95847381228639844c7197deb8b2211274ef22, entitled
    "tg3: Workaround rx_discards stat bug" modified the hardware statistics
    data structure. The modification shifted the statistics so that the
    labels no longer corresponded to the counter values. This patch fixes
    the problem by utilizing reserved space for the new counters.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit bb158d696489244f79fd4c3abd47968a06b48c79, entitled
    "tg3: Add TSO loopback test", mistakenly inverted the checksum field
    test from the receive BD. This patch corrects the problem.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Autonegotiation setup has gotten a little more complicated since the tg3
    driver was created. This patch consolidates autoneg setup into one
    routine and modifies the call sites accordingly.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit 21a00ab270f95d32e502d92f166dd75c518d3c5f, entitled
    "tg3: Fix EEE interoperability issue", added an EEE interoperability
    fix. We found that the fix doesn't work if applied too early though.
    This patch delays the fix until right before allowing LPI assertion.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Commit 4d163b75e979833979cc401ae433cb1d7743d57e, entitled
    "tg3: Fix 5719 A0 tx completion bug" turned off TSO to fix a hardware
    bug. In doing so, it accidentally turned off all IPv6 TCP checksum
    offloading too. This patch fixes the problem by reenabling the hardware
    bit that control both features. The TSO capability is still not exposed
    to the kernel.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The PCIe max FTS limit is too aggressive on these chips. This patch
    loosens the limit a little to eliminate data corruption issues.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch consolidates the skb cleanup code into a function named
    tg3_skb_error_unmap(). The modification addresses a long-standing bug
    where pci_unmap_single() was incorrectly being called instead of
    pci_unmap_page() in tigon3_dma_hwbug_workaround().

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • It has been recently discovered that all tg3 devices have a 4Gb boundary
    DMA problem, and that all 5755 and newer devices can't handle fragments
    less than or equal to 8 bytes in size. This patch adjusts the flags and
    removes tg3_start_xmit(). tg3_start_xmit_dma_bug() has been renamed to
    tg3_start_xmit().

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Probably just cut and pasted from the other parse_opts() implementations
    in the 9p sources.

    Signed-off-by: David S. Miller

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

    David S. Miller
     
  • v3 -> v4: fix return boolean false instead of 0 for ic_is_init_dev

    Currently the ip auto configuration has a hardcoded delay of 1 second.
    When (ethernet) link takes longer to come up (e.g. more than 3 seconds),
    nfs root may not be found.

    Remove the hardcoded delay, and wait for carrier on at least one network
    device.

    Signed-off-by: Micha Nelissen
    Cc: David Miller
    Signed-off-by: David S. Miller

    Micha Nelissen
     
  • During the sctp_close() call, we do not use rcu primitives to
    destroy the address list attached to the endpoint. At the same
    time, we do the removal of addresses from this list before
    attempting to remove the socket from the port hash

    As a result, it is possible for another process to find the socket
    in the port hash that is in the process of being closed. It then
    proceeds to traverse the address list to find the conflict, only
    to have that address list suddenly disappear without rcu() critical
    section.

    Fix issue by closing address list removal inside RCU critical
    section.

    Race can result in a kernel crash with general protection fault or
    kernel NULL pointer dereference:

    kernel: general protection fault: 0000 [#1] SMP
    kernel: RIP: 0010:[] [] sctp_bind_addr_conflict+0x64/0x82 [sctp]
    kernel: Call Trace:
    kernel: [] ? sctp_get_port_local+0x17b/0x2a3 [sctp]
    kernel: [] ? sctp_bind_addr_match+0x33/0x68 [sctp]
    kernel: [] ? sctp_do_bind+0xd3/0x141 [sctp]
    kernel: [] ? sctp_bindx_add+0x4d/0x8e [sctp]
    kernel: [] ? sctp_setsockopt_bindx+0x112/0x4a4 [sctp]
    kernel: [] ? generic_file_aio_write+0x7f/0x9b
    kernel: [] ? sctp_setsockopt+0x14f/0xfee [sctp]
    kernel: [] ? do_sync_write+0xab/0xeb
    kernel: [] ? fsnotify+0x239/0x282
    kernel: [] ? alloc_file+0x18/0xb1
    kernel: [] ? compat_sys_setsockopt+0x1a5/0x1d9
    kernel: [] ? compat_sys_socketcall+0x143/0x1a4
    kernel: [] ? sysenter_dispatch+0x7/0x32

    Signed-off-by: Jacek Luczak
    Acked-by: Vlad Yasevich
    CC: Eric Dumazet
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Jacek Luczak
     
  • ipv6 has per device ICMP SNMP counters, taking too much space because
    they use percpu storage.

    needed size per device is :
    (512+4)*sizeof(long)*number_of_possible_cpus*2

    On a 32bit kernel, 16 possible cpus, this wastes more than 64kbytes of
    memory per ipv6 enabled network device, taken in vmalloc pool.

    Since ICMP messages are rare, just use shared counters (atomic_long_t)

    Per network space ICMP counters are still using percpu memory, we might
    also convert them to shared counters in a future patch.

    Signed-off-by: Eric Dumazet
    CC: Denys Fedoryshchenko
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The characters in a line should be no more than 80.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • As these functions are only used in this file.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • David S. Miller
     

19 May, 2011

8 commits


18 May, 2011

10 commits

  • Commit 7fee226ad239 (add a noref bit on skb dst) forgot to use
    skb_dst_force() on packets queued in sk_error_queue

    This triggers following warning, for applications using IP_CMSG_PKTINFO
    receiving one error status

    ------------[ cut here ]------------
    WARNING: at include/linux/skbuff.h:457 ip_cmsg_recv_pktinfo+0xa6/0xb0()
    Hardware name: 2669UYD
    Modules linked in: isofs vboxnetadp vboxnetflt nfsd ebtable_nat ebtables
    lib80211_crypt_ccmp uinput xcbc hdaps tp_smapi thinkpad_ec radeonfb fb_ddc
    radeon ttm drm_kms_helper drm ipw2200 intel_agp intel_gtt libipw i2c_algo_bit
    i2c_i801 agpgart rng_core cfbfillrect cfbcopyarea cfbimgblt video raid10 raid1
    raid0 linear md_mod vboxdrv
    Pid: 4697, comm: miredo Not tainted 2.6.39-rc6-00569-g5895198-dirty #22
    Call Trace:
    [] ? printk+0x1d/0x1f
    [] warn_slowpath_common+0x72/0xa0
    [] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] warn_slowpath_null+0x20/0x30
    [] ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] ip_cmsg_recv+0x127/0x260
    [] ? skb_dequeue+0x4d/0x70
    [] ? skb_copy_datagram_iovec+0x53/0x300
    [] ? sub_preempt_count+0x24/0x50
    [] ip_recv_error+0x23d/0x270
    [] udp_recvmsg+0x264/0x2b0
    [] inet_recvmsg+0xd9/0x130
    [] sock_recvmsg+0xf2/0x120
    [] ? might_fault+0x4b/0xa0
    [] ? verify_iovec+0x4c/0xc0
    [] ? sock_recvmsg_nosec+0x100/0x100
    [] __sys_recvmsg+0x114/0x1e0
    [] ? __lock_acquire+0x365/0x780
    [] ? fget_light+0xa6/0x3e0
    [] ? fget_light+0xbf/0x3e0
    [] ? fget_light+0x2e/0x3e0
    [] sys_recvmsg+0x39/0x60

    Close bug https://bugzilla.kernel.org/show_bug.cgi?id=34622

    Reported-by: Witold Baryluk
    Signed-off-by: Eric Dumazet
    CC: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This fixes:

    drivers/net/sfc/mcdi_mac.c: In function ‘efx_mcdi_set_mac’:
    drivers/net/sfc/mcdi_mac.c:36:2: warning: case value ‘3’ not in enumerated type ‘enum efx_fc_type’

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Conflicts:
    drivers/net/vmxnet3/vmxnet3_ethtool.c
    net/core/dev.c

    David S. Miller
     
  • Noticed by Joe Perches.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Cool, how about we make 'Features changed' debug as well?
    This way userspace can't fill up the log just by tweaking tun features
    with an ioctl.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • recvmmsg fails on a raw socket with EINVAL. The reason for this is
    packet_recvmsg checks the incoming flags:

    err = -EINVAL;
    if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE))
    goto out;

    This patch strips out MSG_WAITFORONE when calling recvmmsg which
    fixes the issue.

    Signed-off-by: Anton Blanchard
    Cc: stable@kernel.org [2.6.34+]
    Signed-off-by: David S. Miller

    Anton Blanchard
     
  • The later causes warnings with gcc 4.5+. __CONST_RING_SIZE was introduced in
    667c78afaec0 to fix this but as netback wasn't upstream at the time it did not
    benefit, hence:

    CC drivers/net/xen-netback/netback.o
    drivers/net/xen-netback/netback.c:110:37: warning: variably modified 'grant_copy_op' at file scope [enabled by default]
    drivers/net/xen-netback/netback.c:111:30: warning: variably modified 'meta' at file scope [enabled by default]
    drivers/net/xen-netback/netback.c: In function 'xen_netbk_rx_action':
    drivers/net/xen-netback/netback.c:584:6: warning: variable 'irq' set but not used [-Wunused-but-set-variable]

    Thanks to Witold Baryluk for pointing this out.

    Signed-off-by: Ian Campbell
    Cc: Witold Baryluk
    Signed-off-by: David S. Miller

    Ian Campbell
     
  • David S. Miller
     
  • David S. Miller