10 Dec, 2009

1 commit


09 Dec, 2009

39 commits

  • commit 46ceb60ca80fa07703bc6eb8f4651f900dff5a82 ("gianfar: Add
    Multiple group Support") introduced the following build error
    with CONFIG_NET_POLL_CONTROLLER=y:

    CC ggianfar.o
    ggianfar.c: In function 'gfar_netpoll':
    ggianfar.c:2653: error: invalid storage class for function 'gfar_interrupt'
    ggianfar.c:2652: warning: ISO C90 forbids mixed declarations and code
    ggianfar.c:2681: error: invalid storage class for function 'adjust_link'
    ggianfar.c:2764: error: invalid storage class for function 'gfar_set_multi'
    ggianfar.c:2855: error: invalid storage class for function 'gfar_clear_exact_match'
    ggianfar.c:2877: error: invalid storage class for function 'gfar_set_hash_for_addr'
    ggianfar.c:2898: error: invalid storage class for function 'gfar_set_mac_for_addr'
    ggianfar.c:2922: error: invalid storage class for function 'gfar_error'
    ggianfar.c:3020: warning: ISO C90 forbids mixed declarations and code
    ggianfar.c:3032: error: invalid storage class for function 'gfar_init'
    ggianfar.c:3037: error: invalid storage class for function 'gfar_exit'
    ggianfar.c:3041: error: initializer element is not constant
    ggianfar.c:3042: error: initializer element is not constant
    ggianfar.c:3042: warning: ISO C90 forbids mixed declarations and code
    ggianfar.c:3042: error: expected declaration or statement at end of input
    make[1]: *** [ggianfar.o] Error 1

    This patch fixes the issue.

    Reported-by: Benjamin Herrenschmidt
    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • About 50% of shutdowns of b44 Ethernet adapter ends by kernel panic
    with kernels compiled with stack-protector.

    Checking b44_magic_pattern() return values, one call of
    b44_magic_pattern() returns 127. It means, that set_bit(128, pmask)
    was called on line 1509. It means that bit 0 of 17th byte of pmask was
    overwritten. But pmask has only 16 bytes. Stack corruption happens.

    It seems that set_bit() on line 1509 always writes one bit off.

    The fix does not only solve the stack corruption, but also makes Wake
    On LAN working on my onboard B44 on Asus A7V-333X mainboard.

    It seems that this problem affects all kernel versions since commit
    725ad800 ([PATCH] b44: add wol for old nic) on 2006-06-20.

    Signed-off-by: Stanislav Brabec
    Signed-off-by: David S. Miller

    Stanislav Brabec
     
  • It can happen, that tcp_retransmit_skb fails due to some error.
    In such cases we might end up into a state where tp->retrans_out
    is zero but that's only because we removed the TCPCB_SACKED_RETRANS
    bit from a segment but couldn't retransmit it because of the error
    that happened. Therefore some assumptions that retrans_out checks
    are based do not necessarily hold, as there still can be an old
    retransmission but that is only visible in TCPCB_EVER_RETRANS bit.
    As retransmission happen in sequential order (except for some very
    rare corner cases), it's enough to check the head skb for that bit.

    Main reason for all this complexity is the fact that connection dying
    time now depends on the validity of the retrans_stamp, in particular,
    that successive retransmissions of a segment must not advance
    retrans_stamp under any conditions. It seems after quick thinking that
    this has relatively low impact as eventually TCP will go into CA_Loss
    and either use the existing check for !retrans_stamp case or send a
    retransmission successfully, setting a new base time for the dying
    timer (can happen only once). At worst, the dying time will be
    approximately the double of the intented time. In addition,
    tcp_packet_delayed() will return wrong result (has some cc aspects
    but due to rarity of these errors, it's hardly an issue).

    One of retrans_stamp clearing happens indirectly through first going
    into CA_Open state and then a later ACK lets the clearing to happen.
    Thus tcp_try_keep_open has to be modified too.

    Thanks to Damian Lukowski for hinting
    that this possibility exists (though the particular case discussed
    didn't after all have it happening but was just a debug patch
    artifact).

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • This patch moves retransmits_timed_out() from include/net/tcp.h
    to tcp_timer.c, where it is used.

    Reported-by: Frederic Leroy
    Signed-off-by: Damian Lukowski
    Acked-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Damian Lukowski
     
  • This patch fixes a problem in the TCP connection timeout calculation.
    Currently, timeout decisions are made on the basis of the current
    tcp_time_stamp and retrans_stamp, which is usually set at the first
    retransmission.
    However, if the retransmission fails in tcp_retransmit_skb(),
    retrans_stamp is not updated and remains zero. This leads to wrong
    decisions in retransmits_timed_out() if tcp_time_stamp is larger than
    the specified timeout, which is very likely.
    In this case, the TCP connection dies after the first attempted
    (and unsuccessful) retransmission.

    With this patch, tcp_skb_cb->when is used instead, when retrans_stamp
    is not available.

    This bug has been introduced together with retransmits_timed_out() in
    2.6.32, as the number of retransmissions has been used for timeout
    decisions before. The corresponding commit was
    6fa12c85031485dff38ce550c24f10da23b0adaa (Revert Backoff [v3]:
    Calculate TCP's connection close threshold as a time value.).

    Thanks to Ilpo Järvinen for code suggestions and Frederic Leroy for
    testing.

    Reported-by: Frederic Leroy
    Signed-off-by: Damian Lukowski
    Acked-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Damian Lukowski
     
  • use common_task instead of reset_task and link_chg_task, so it fix "call cancel_work_sync
    from the work itself".

    Signed-off-by: Jie Yang
    Signed-off-by: David S. Miller

    Jie Yang
     
  • add pci map direction in atl1c_buffer flags, it is used when call pci_unmap
    apis.
    Signed-off-by: Jie Yang
    Signed-off-by: David S. Miller

    Jie Yang
     
  • Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Unified firmware image may not contain MN type of firmware.
    Driver should fall back to NOMN firmware type instead
    of going to flash.

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

    Dhananjay Phadke
     
  • o netif_running() check for enabling interrupt at end of napi poll is
    not enough to cover firmwar recovery. Instead test __NX_DEV_UP bit.
    o Avoid re-entry into to netxen_nic_down() with __NX_DEV_UP bit check.

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

    Amit Kumar Salecha
     
  • o To prevent race conditions with other reset events.
    During suspend/resume and firmware recovery, acquire rtnl_lock,
    while changing interface state.

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

    Amit Kumar Salecha
     
  • Check for valid hw address.

    Signed-off-by: Denis Kirjanov
    Signed-off-by: David S. Miller

    Denis Kirjanov
     
  • Various additions and improvements to the Gigaset driver's README
    file, and added comments to its userspace visible include file.

    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • When built with debugging support, the Gigaset driver enabled some
    debugging messages by default. Change the default to "all off".

    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Fix the locking scheme on the fec_mpc52xx driver. This device can
    receive IRQs from three sources; the FEC itself, the tx DMA, and the
    rx DMA. Mutual exclusion was handled by taking a spin_lock() in the
    critical regions, but because the handlers are run with IRQs enabled,
    spin_lock() is insufficient and the driver can end up interrupting
    a critical region anyway from another IRQ.

    Asier Llano discovered that this occurs when an error IRQ is raised
    in the middle of handling rx irqs which resulted in an sk_buff memory
    leak.

    In addition, locking is spotty at best in the driver and inspection
    revealed quite a few places with insufficient locking.

    This patch is based on Asier's initial work, but reworks a number of
    things so that locks are held for as short a time as possible, so
    that spin_lock_irqsave() is used everywhere, and so the locks are
    dropped when calling into the network stack (because the lock only
    protects the hardware interface; not the network stack).

    Boot tested on a lite5200 with an NFS root. Has not been performance
    tested.

    Signed-off-by: Asier Llano
    Signed-off-by: Grant Likely
    Signed-off-by: David S. Miller

    Asier Llano
     
  • Use a more effective rss hash by default (src + dst, rather than just
    src).

    Signed-off-by: Brice Goglin
    Signed-off-by: David S. Miller

    Brice Goglin
     
  • in routed mode, we don't have a hardware address so netdev_ops doesnt
    need to validate our hardware address via .ndo_validate_addr

    Reported-by: Manuel Fuentes
    Signed-off-by: Chas Williams - CONTRACTOR
    Signed-off-by: David S. Miller

    chas williams - CONTRACTOR
     
  • due to reference counting sk_wmem_alloc now has a value of 1 when all
    the outstanding data has been sent.

    Signed-off-by: Chas Williams - CONTRACTOR
    Signed-off-by: David S. Miller

    chas williams - CONTRACTOR
     
  • fix oops when initializing lane interfaces. lec should probably be
    changed to use alloc_netdev() instead.

    Signed-off-by: Chas Williams - CONTRACTOR
    Signed-off-by: David S. Miller

    chas williams - CONTRACTOR
     
  • Adds kerneldoc for inet_twsk_unhash() & inet_twsk_bind_unhash().

    With help from Randy Dunlap.

    Suggested-by: Evgeniy Polyakov
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • When we find a timewait connection in __inet_hash_connect() and reuse
    it for a new connection request, we have a race window, releasing bind
    list lock and reacquiring it in __inet_twsk_kill() to remove timewait
    socket from list.

    Another thread might find the timewait socket we already chose, leading to
    list corruption and crashes.

    Fix is to remove timewait socket from bind list before releasing the bind lock.

    Note: This problem happens if sysctl_tcp_tw_reuse is set.

    Reported-by: kapil dakhane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • First patch changes __inet_hash_nolisten() and __inet6_hash()
    to get a timewait parameter to be able to unhash it from ehash
    at same time the new socket is inserted in hash.

    This makes sure timewait socket wont be found by a concurrent
    writer in __inet_check_established()

    Reported-by: kapil dakhane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Signed-off-by: Don Skidmore
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Don Skidmore
     
  • Here is an updated version, because ixgbe_get_ethtool_stats()
    needs to call dev_get_stats() or "ethtool -S" wont give
    correct tx_bytes/tx_packets values.

    Several cpus can update netdev->stats.tx_bytes & netdev->stats.tx_packets
    in parallel. In this case, TX stats are under estimated and false sharing
    takes place.

    After a pktgen session sending exactly 200000000 packets :
    # ifconfig fiber0 | grep TX
    TX packets:198501982 errors:0 dropped:0 overruns:0 carrier:0

    Multi queue devices should instead use txq->tx_bytes & txq->tx_packets
    in their xmit() method (appropriate txq lock already held by caller, no
    cache line miss), or use appropriate locking.

    After patch, same pktgen session gives :

    # ifconfig fiber0 | grep TX
    TX packets:200000000 errors:0 dropped:0 overruns:0 carrier:0

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

    Eric Dumazet
     
  • A workaround added for all ESB2 devices (adds a delay for all MDIC accesses
    which resolves an issue with the MDIC ready bit being set prematurely) is
    applicable only to devices in which the MAC-PHY interconnect is not
    operating in a certain mode with in-band MDIO. Check the control register
    for the operating mode and enable the workaround accordingly.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • The GG82563_REG() macro should not be used to determine the offset provided
    to the e1000e_[read|write]_kmrn_reg() functions since the first argument to
    the macro is already implied and gets masked off anyway in the functions.
    The resultant register reads/writes with this patch are functionally the
    same as before.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • Bit 7 in the CTRL_REG register is actually the Software Definable Pin 3,
    not the Software Definable Pin 7.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • GCC even warns about it, as reported by Andrew Morton:

    net/ipv4/tcp.c: In function 'do_tcp_getsockopt':
    net/ipv4/tcp.c:2544: warning: comparison is always false due to limited range of data type

    Signed-off-by: David S. Miller

    David S. Miller
     
  • David S. Miller
     
  • I messed up the merge in d7fc02c7bae7b1cf69269992cf880a43a350cdaa, where
    the conflict in question wasn't just about CTL_UNNUMBERED being removed,
    but the 'strategy' field is too (sysctl handling is now done through the
    /proc interface, with no duplicate protocols for reading the data).

    Reported-by: Larry Finger
    Reported-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block: (113 commits)
    cfq-iosched: Do not access cfqq after freeing it
    block: include linux/err.h to use ERR_PTR
    cfq-iosched: use call_rcu() instead of doing grace period stall on queue exit
    blkio: Allow CFQ group IO scheduling even when CFQ is a module
    blkio: Implement dynamic io controlling policy registration
    blkio: Export some symbols from blkio as its user CFQ can be a module
    block: Fix io_context leak after failure of clone with CLONE_IO
    block: Fix io_context leak after clone with CLONE_IO
    cfq-iosched: make nonrot check logic consistent
    io controller: quick fix for blk-cgroup and modular CFQ
    cfq-iosched: move IO controller declerations to a header file
    cfq-iosched: fix compile problem with !CONFIG_CGROUP
    blkio: Documentation
    blkio: Wait on sync-noidle queue even if rq_noidle = 1
    blkio: Implement group_isolation tunable
    blkio: Determine async workload length based on total number of queues
    blkio: Wait for cfq queue to get backlogged if group is empty
    blkio: Propagate cgroup weight updation to cfq groups
    blkio: Drop the reference to queue once the task changes cgroup
    blkio: Provide some isolation between groups
    ...

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (54 commits)
    Revert "pata_sis: Implement MWDMA for the UDMA 133 capable chips"
    libata: Clarify ata_set_lba_range_entries function
    libata: Report zeroed read after TRIM and max discard size
    pata_hpt3x2n: fix overclocked MWDMA0 timing
    pata_it8213: MWDMA0 is unsupported
    [libata] MWDMA0 is unsupported on PIIX-like PATA controllers
    pata_via: clear UDMA transfer mode bit for PIO and MWDMA
    pata_sis: Power Management fix
    pata_rz1000: Power Management fix
    pata_radisys: fix UDMA handling
    pata_ns87415: Power Management fix
    pata_marvell: fix marvell_pre_reset() documentation
    pata_legacy: add pointers to QDI65x0 documentation
    pata_legacy: fix access to control register for QDI6580
    pata_legacy: fix QDI6580DP support
    pata_it8213: fix it8213_pre_reset() documentation
    pata_it8213: fix wrong MWDMA timings being programmed
    pata_it8213: fix PIO2 underclocking
    pata_it8213: fix wrong PIO timings being programmed
    pata_it8213: fix UDMA handling
    ...

    Linus Torvalds
     
  • * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (149 commits)
    arm: omap: Add omap3_defconfig
    AM35xx: Defconfig for AM3517 EVM board
    AM35xx: Add support for AM3517 EVM board
    omap: 3630sdp: defconfig creation
    omap: 3630sdp: introduce 3630 sdp board support
    omap3: Add defconfig for IGEP v2 board
    omap3: Add minimal IGEP v2 support
    omap3: Add CompuLab CM-T35 defconfig
    omap3: Add CompuLab CM-T35 board support
    omap3: rx51: Add wl1251 wlan driver support
    omap3: rx51: Add SDRAM init
    omap1: Add default kernel configuration for Herald
    omap1: Add board support and LCD for HTC Herald
    omap: zoom2: update defconfig for LL_DEBUG_NONE
    omap: zoom3: defconfig creation
    omap3: zoom: Introduce zoom3 board support
    omap3: zoom: Drop i2c-1 speed to 2400
    omap3: zoom: rename zoom2 name to generic zoom
    omap3: zoom: split board file for software reuse
    omap3evm: MIgrate to smsc911x ethernet driver
    ...

    Fix trivial conflict (two unrelated config options added next to each
    other) in arch/arm/mach-omap2/Makefile

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: parport_mfc3 - Not makes it a bool before the comparison.
    m68k: don't export static inline functions
    fbdev: atafb - add palette register check
    m68k: Remove the BKL from sys_execve
    m68k: Cleanup linker scripts using new linker script macros.
    m68k: Make thread_info.h usable from assembly.
    m68knommu: define arch_has_single_step() and friends
    m68k: ptrace fixes
    m68k: use generic code for ptrace requests
    rtc: Add an RTC driver for the Ricoh RP5C01
    rtc: Add an RTC driver for the Oki MSM6242

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    ieee1394: Use hweight32
    firewire: cdev: reduce stack usage by ioctl_dispatch
    firewire: ohci: 0 may be a valid DMA address
    firewire: core: WARN on wrong usage of core transaction functions
    firewire: core: optimize Topology Map creation
    firewire: core: clarify generate_config_rom usage
    firewire: optimize config ROM creation
    firewire: cdev: normalize variable names
    firewire: normalize style of queue_work wrappers
    firewire: cdev: fix memory leak in an error path

    Linus Torvalds
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (272 commits)
    Fix soc_common PCMCIA configuration
    ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
    ARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver
    ARM: 5825/1: SA1100: h3600: update defconfig
    ARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100
    ARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys
    ARM: 5822/1: SA1100: h3100/h3600: clean up #includes
    ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
    ARM: 5820/1: SA1100: h3100/h3600: split h3600.c
    ARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
    ARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions
    ARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs
    ARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions
    ARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
    ARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
    ARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver
    ARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers
    ARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib
    ARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins
    ARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h
    ...

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    i2c-stub: Documentation update
    i2c-stub: Allow user to disable some commands
    i2c-stub: Implement I2C block support
    i2c: Refactor for_each callbacks
    i2c-i801: Retry on lost arbitration
    i2c: Remove big kernel lock from i2cdev_open
    ics932s401: Clean up detect function
    i2c: Simplify i2c_detect_address
    i2c: Drop probe, ignore and force module parameters
    i2c: Add missing __devinit markers to old i2c adapter drivers
    i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR
    i2c: Prevent priority inversion on top of bus lock
    i2c-voodoo3: Delete
    i2c-powermac: Drop temporary name buffer
    i2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus
    i2c-powermac: Log errors
    i2c-powermac: Refactor i2c_powermac_smbus_xfer
    i2c-powermac: Reject unsupported I2C transactions
    i2c/chips: Move ds1682 to drivers/misc

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: Add flag for devices capable of generating run-time wake-up events
    PM / Runtime: Remove unnecessary braces in __pm_runtime_set_status()
    PM / Runtime: Make documentation of runtime_idle() agree with the code
    PM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend()
    PM / Runtime: Use deferred_resume flag in pm_request_resume
    PM / Runtime: Export the PM runtime workqueue
    PM / Runtime: Fix lockdep warning in __pm_runtime_set_status()
    PM / Hibernate: Swap, use KERN_CONT
    PM / Hibernate: Shift remaining code from swsusp.c to hibernate.c
    PM / Hibernate: Move swap functions to kernel/power/swap.c.
    PM / freezer: Don't get over-anxious while waiting

    Linus Torvalds
     
  • * 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (84 commits)
    KVM: VMX: Fix comparison of guest efer with stale host value
    KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c
    KVM: Drop user return notifier when disabling virtualization on a cpu
    KVM: VMX: Disable unrestricted guest when EPT disabled
    KVM: x86 emulator: limit instructions to 15 bytes
    KVM: s390: Make psw available on all exits, not just a subset
    KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
    KVM: VMX: Report unexpected simultaneous exceptions as internal errors
    KVM: Allow internal errors reported to userspace to carry extra data
    KVM: Reorder IOCTLs in main kvm.h
    KVM: x86: Polish exception injection via KVM_SET_GUEST_DEBUG
    KVM: only clear irq_source_id if irqchip is present
    KVM: x86: disallow KVM_{SET,GET}_LAPIC without allocated in-kernel lapic
    KVM: x86: disallow multiple KVM_CREATE_IRQCHIP
    KVM: VMX: Remove vmx->msr_offset_efer
    KVM: MMU: update invlpg handler comment
    KVM: VMX: move CR3/PDPTR update to vmx_set_cr3
    KVM: remove duplicated task_switch check
    KVM: powerpc: Fix BUILD_BUG_ON condition
    KVM: VMX: Use shared msr infrastructure
    ...

    Trivial conflicts due to new Kconfig options in arch/Kconfig and kernel/Makefile

    Linus Torvalds