02 Apr, 2010

6 commits


01 Apr, 2010

1 commit


31 Mar, 2010

21 commits

  • Commit a2fd940f (bonding: fix broken multicast with round-robin mode)
    added a problem on litle endian machines.

    drivers/net/bonding/bond_main.c:4159: warning: comparison is always
    false due to limited range of data type

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

    Eric Dumazet
     
  • Unlock the lock before leaving the function.

    A simplified version of the semantic patch that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression E1;
    identifier f;
    @@

    f (...) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • fix this:

    eth2: :RX BD ring size for Q[0]: 256
    eth2:TX BD ring size for Q[0]: 256

    to look like:

    eth2: RX BD ring size for Q[0]: 256
    eth2: TX BD ring size for Q[0]: 256

    Signed-off-by: Kim Phillips
    Signed-off-by: David S. Miller

    Kim Phillips
     
  • Interfaces come up claiming having already received 3.0 GiB.
    Use kzalloc to properly initialize per-queue data.

    Signed-off-by: Kim Phillips
    Signed-off-by: David S. Miller

    Kim Phillips
     
  • gianfar needed to ensure existence of the *skbuff arrays before
    freeing the skbs in them, rather than ensuring their nonexistence.

    Signed-off-by: Andy Fleming
    Signed-off-by: David S. Miller

    Andy Fleming
     
  • tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
    This can cause a panic in tcp_collapse() if it is called as a result
    of the recv_actor dropping the socket lock.

    A userspace program that splices data from a socket to either another
    socket or to a file can trigger this bug.

    Signed-off-by: Steven J. Magnani
    Signed-off-by: David S. Miller

    Steven J. Magnani
     
  • The libertas driver calls wiphy_unregister() without a prior
    wiphy_register() when a devices fails initialization. Fix this by
    introducing a private flag.

    [ 9.310000] Unable to handle kernel NULL pointer dereference at virtual address 00000000

    [...]

    [ 9.330000] [] (wiphy_unregister+0xfc/0x19c) from [] (lbs_cfg_free+0x70/0x9c [libertas])
    [ 9.330000] [] (lbs_cfg_free+0x70/0x9c [libertas]) from [] (lbs_remove_card+0x180/0x210 [libertas])
    [ 9.330000] [] (lbs_remove_card+0x180/0x210 [libertas]) from [] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio])
    [ 9.330000] [] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio]) from [] (sdio_bus_probe+0xd4/0xf0)
    [ 9.330000] [] (sdio_bus_probe+0xd4/0xf0) from [] (driver_probe_device+0xa4/0x174)
    [ 9.330000] [] (driver_probe_device+0xa4/0x174) from [] (__driver_attach+0x60/0x84)
    [ 9.330000] [] (__driver_attach+0x60/0x84) from [] (bus_for_each_dev+0x4c/0x8c)
    [ 9.330000] [] (bus_for_each_dev+0x4c/0x8c) from [] (bus_add_driver+0xa0/0x228)
    [ 9.330000] [] (bus_add_driver+0xa0/0x228) from [] (driver_register+0xc0/0x150)
    [ 9.330000] [] (driver_register+0xc0/0x150) from [] (if_sdio_init_module+0x6c/0x108 [libertas_sdio])
    [ 9.330000] [] (if_sdio_init_module+0x6c/0x108 [libertas_sdio]) from [] (do_one_initcall+0x5c/0x1bc)
    [ 9.330000] [] (do_one_initcall+0x5c/0x1bc) from [] (sys_init_module+0xc0/0x1f0)
    [ 9.330000] [] (sys_init_module+0xc0/0x1f0) from [] (ret_fast_syscall+0x0/0x30)

    Signed-off-by: Daniel Mack
    Cc: Dan Williams
    Cc: John W. Linville
    Cc: Holger Schurig
    Cc: Bing Zhao
    Cc: libertas-dev@lists.infradead.org
    Cc: linux-wireless@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: John W. Linville

    Daniel Mack
     
  • IWL_RATE_COUNT is 13 and IWL_RATE_COUNT_LEGACY is 12.

    IWL_RATE_COUNT_LEGACY is the right one here because iwl3945_rates
    doesn't support 60M and also that's how "rates" is defined in
    iwlcore_init_geos() from drivers/net/wireless/iwlwifi/iwl-core.c.

    rates = kzalloc((sizeof(struct ieee80211_rate) * IWL_RATE_COUNT_LEGACY),
    GFP_KERNEL);

    Signed-off-by: Dan Carpenter
    Cc: stable@kernel.org
    Acked-by: Zhu Yi
    Signed-off-by: John W. Linville

    Dan Carpenter
     
  • An int urb is constructed but we fill it in with a bulk pipe type.

    Commit f661c6f8c67bd55e93348f160d590ff9edf08904 implemented a pipe type
    check when CONFIG_USB_DEBUG is enabled. The check failed for all the ar9170
    usb transfers and the driver could not configure the wifi dongle.

    This went unnoticed until now because most people don't have
    CONFIG_USB_DEBUG enabled.

    Signed-off-by: Valentin Longchamp
    Cc: Stable
    Acked-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Valentin Longchamp
     
  • Recent bug reports have shown that rt2500usb also suffers from the
    powersave problems that the PCI rt2x00 drivers suffer from.
    So disable powersaving by default for rt2500usb as well.

    Signed-off-by: Gertjan van Wingerde
    Acked-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Gertjan van Wingerde
     
  • Signed-off-by: Gertjan van Wingerde
    Acked-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Gertjan van Wingerde
     
  • Previously in interrupt handling tasklet, iwlwifi driver only clear/ack
    those interrupts that are enabled by the driver through inta_mask.
    If the hardware generates unattended interrupts, driver will not ack them,
    defeating the interrupt coalescing feature. This results in high number
    of interrupts per second and high CPU utilization.

    This patch addresses this issue by acking those unattended interrupts
    in the tasklet. Local test showed an order of magnitude improvement
    in terms of the number of interrupts without sacrificing networking
    throughput. This is a workaround for hardware issue.

    Signed-off-by: Shanyu Zhao
    Signed-off-by: Zhu Yi
    Signed-off-by: Reinette Chatre

    Shanyu Zhao
     
  • Forget one hunk in 4965 during "iwlwifi: error checking for number of tfds
    in queue" patch.

    Reported-by: Shanyu Zhao
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: Reinette Chatre
    CC: stable@kernel.org

    Wey-Yi Guy
     
  • Commit "cfg80211: convert bools into flags" mistakenly modified iwlwifi's
    regulatory settings instead of just converting it. Fix this.

    This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2172

    Signed-off-by: Reinette Chatre
    CC: stable@kernel.org

    Reinette Chatre
     
  • "mac80211: fix skb buffering issue" still left a race
    between enabling the hardware queues and the virtual
    interface queues. In hindsight it's totally obvious
    that enabling the netdev queues for a hardware queue
    when the hardware queue is enabled is wrong, because
    it could well possible that we can fill the hw queue
    with packets we already have pending. Thus, we must
    only enable the netdev queues once all the pending
    packets have been processed and sent off to the device.

    In testing, I haven't been able to trigger this race
    condition, but it's clearly there, possibly only when
    aggregation is being enabled.

    Signed-off-by: Johannes Berg
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Thanks to Chris Chabot for giving his old wireless usb dongle to me
    to test it under Linux.

    Signed-off-by: Hans de Goede
    Signed-off-by: John W. Linville

    Hans de Goede
     
  • Signed-off-by: Benjamin Larsson
    Signed-off-by: John W. Linville

    Benjamin Larsson
     
  • This patch adds support for the NEC WL300NU-G USB wifi dongle.

    Signed-off-by: Ben Konrath
    Signed-off-by: John W. Linville

    Ben Konrath
     
  • 1st) a PREQ should only be processed, if it has the same SN and better
    metric (instead of better or equal).
    2nd) next_hop[ETH_ALEN] now actually used to buffer
    mpath->next_hop->sta.addr for use out of lock.

    Signed-off-by: Marco Porsch
    Acked-by: Javier Cardona
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Porsch, Marco
     
  • Signed-off-by: John W. Linville

    John W. Linville
     
  • Stanse discovered that kmalloc is being called with GFP_KERNEL while
    holding this spinlock. The spinlock can be a mutex instead, which also
    enables the removal of the unlock/lock around the lock/unlock of
    cfg80211_mutex and the call to set_regdom.

    Reported-by: Jiri Slaby
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    John W. Linville
     

30 Mar, 2010

1 commit

  • Official patch to fix the r8169 frame length check error.

    Based on this initial thread:
    http://marc.info/?l=linux-netdev&m=126202972828626&w=1
    This is the official patch to fix the frame length problems in the r8169
    driver. As noted in the previous thread, while this patch incurs a performance
    hit on the driver, its possible to improve performance dynamically by updating
    the mtu and rx_copybreak values at runtime to return performance to what it was
    for those NICS which are unaffected by the ideosyncracy (if there are any).

    Summary:

    A while back Eric submitted a patch for r8169 in which the proper
    allocated frame size was written to RXMaxSize to prevent the NIC from dmaing too
    much data. This was done in commit fdd7b4c3302c93f6833e338903ea77245eb510b4. A
    long time prior to that however, Francois posted
    126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c, which expiclitly disabled the MaxSize
    setting due to the fact that the hardware behaved in odd ways when overlong
    frames were received on NIC's supported by this driver. This was mentioned in a
    security conference recently:
    http://events.ccc.de/congress/2009/Fahrplan//events/3596.en.html

    It seems that if we can't enable frame size filtering, then, as Eric correctly
    noticed, we can find ourselves DMA-ing too much data to a buffer, causing
    corruption. As a result is seems that we are forced to allocate a frame which
    is ready to handle a maximally sized receive.

    This obviously has performance issues with it, so to mitigate that issue, this
    patch does two things:

    1) Raises the copybreak value to the frame allocation size, which should force
    appropriately sized packets to get allocated on rx, rather than a full new 16k
    buffer.

    2) This patch only disables frame filtering initially (i.e., during the NIC
    open), changing the MTU results in ring buffer allocation of a size in relation
    to the new mtu (along with a warning indicating that this is dangerous).

    Because of item (2), individuals who can't cope with the performance hit (or can
    otherwise filter frames to prevent the bug), or who have hardware they are sure
    is unaffected by this issue, can manually lower the copybreak and reset the mtu
    such that performance is restored easily.

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     

29 Mar, 2010

2 commits


28 Mar, 2010

3 commits

  • This is quite similar to b39fe41f481d20c201012e4483e76c203802dda7
    though said registers are not even documented as 64-bit registers
    - as opposed to the initial TxDescStartAddress ones - but as single
    bytes which must be combined into 32 bits at the MMIO read/write
    level before being merged into a 64 bit logical entity.

    Credits go to Ben Hutchings for the MAR
    registers (aka "multicast is broken for ages on ARM) and to
    Timo Teräs for the MAC registers.

    Signed-off-by: Francois Romieu
    Signed-off-by: David S. Miller

    Francois Romieu
     
  • pcnet_cs:
    *add new id (Allied Telesis LM33-PCM-T Lan&Modem multifunction card)
    *use PROD_ID for LA-PCM.(because LA-PCM and LM33-PCM-T use the same MANF_ID).

    Signed-off-by: Ken Kawasaki
    Signed-off-by: David S. Miller

    Ken Kawasaki
     
  • Round-robin (mode 0) does nothing to ensure that any multicast traffic
    originally destined for the host will continue to arrive at the host when
    the link that sent the IGMP join or membership report goes down. One of
    the benefits of absolute round-robin transmit.

    Keeping track of subscribed multicast groups for each slave did not seem
    like a good use of resources, so I decided to simply send on the
    curr_active slave of the bond (typically the first enslaved device that
    is up). This makes failover management simple as IGMP membership
    reports only need to be sent when the curr_active_slave changes. I
    tested this patch and it appears to work as expected.

    Originally reported by Lon Hohberger .

    Signed-off-by: Andy Gospodarek
    CC: Lon Hohberger
    CC: Jay Vosburgh
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Andy Gospodarek
     

27 Mar, 2010

6 commits

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

    Joe Perches
     
  • Previously the driver tweaked txqueuelen to avoid false Tx hang reports
    seen at half duplex. This had the effect of overriding user set values
    on link change/reset. Testing shows that adjusting only the timeout
    factor is sufficient to prevent Tx hang reports at half duplex.

    This patch removes all instances of tx_queue_len in the driver.

    Based on e1000e patch by Franco Fichtner

    CC: Franco Fichtner
    Signed-off-by: Emil Tantilov
    Acked-by: Jesse Brandeburg
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Emil Tantilov
     
  • When cache is unresolved, c->mf[6]c_parent is set to 65535 and
    minvif, maxvif are not initialized, hence we must avoid to
    parse IIF and OIF.
    A second problem can happen when the user dumps a cache entry
    where a VIF, that was referenced at creation time, has been
    removed.

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     
  • When running the offline diagnostic tests check to see if any VFs are
    online. If so then only run the link test. This is necessary because
    the VFs running in guest VMs aren't aware of when the PF is taken
    offline for a diagnostic test. Also put a message to the system log
    telling the system administrator to take the VFs offline manually if
    (s)he wants to run a full diagnostic. Return 1 on each of the tests
    not run to alert the user of the condition.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     
  • igb was previously checking the wrong bits in the MANC register to determine
    if managability was enabled. As a result it was incorrectly powering down and
    resetting the phy when it didn't need to.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Fix the following warnings:

    be_ethtool.c:493: warning: integer constant is too large for 'long' type
    be_ethtool.c:493: warning: integer constant is too large for 'long' type

    Signed-off-by: Zhitong Wang
    Acked-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    wzt wzt