23 Jul, 2009

6 commits


22 Jul, 2009

11 commits

  • There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent
    he loop counter is of type 'unsigned char' and it should count to 128.

    The compiler will incorrectly decide that a trivial loop like this:

    unsigned char i, ...

    for (i = 0; i < 128; i++) {
    ..

    is endless, and will compile it to a single instruction that just
    branches to itself.

    This was triggered by the addition of '-fno-strict-overflow', and we
    could play games with compiler versions and go back to '-fwrapv'
    instead, but the trivial way to avoid it is to just make the loop
    induction variable be an 'int' instead.

    Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure
    for digging through assembler differences and finding it.

    Reported-and-tested-by: Krzysztof Oledzki
    Found-by: Troy Moure
    Gcc-bug-acked-by: Ian Lance Taylor
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Reset rx chain before trying to drain it.
    Shut interrupts off last, incase there's something to report.

    Signed-off-by: Mike McCormack
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Mike McCormack
     
  • Don't leak kernel stack information through uninitialized structure members.

    Signed-off-by: Michael Buesch
    Acked-by: Borislav Petkov .
    Signed-off-by: David S. Miller

    Michael Buesch
     
  • I'm using ide on 2.6.30.1 with xfs filesystem. I noticed a kernel memory
    leak after writing lots of data, the kmalloc-96 slab cache keeps
    growing. It seems the struct ide_cmd kmalloced by idedisk_prepare_flush
    is never kfreed.

    Commit a09485df9cda49fbde2766c86eb18a9cae585162 ("ide: move request
    type specific code from ide_end_drive_cmd() to callers (v3)") and
    f505d49ffd25ed062e76ffd17568d3937fcd338c ("ide: fix barriers support")
    cause this regression, cmd->rq must now be set for ide_complete_cmd to
    honor the IDE_TFLAG_DYN flag.

    Signed-off-by: Maxime Bizon
    Acked-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Maxime Bizon
     
  • The values in the advertising field are typically ADVERTISED_xxx, not
    SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
    ADVERTISED_1000baseT_Full have the same value.

    The semantic match that finds this problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    struct ethtool_cmd E;
    @@
    *E.advertising = SUPPORTED_10000baseT_Full
    //

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

    Julia Lawall
     
  • If the NULL test is necessary, then the dereference should be moved below
    the NULL test.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T;
    expression E,E1;
    identifier i,fld;
    statement S;
    @@

    - T i = E->fld;
    + T i;
    ... when != E=E1
    when != i
    if (E == NULL||...) S
    + i = E->fld;
    //

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

    Julia Lawall
     
  • If the NULL test is necessary, then the dereferences should be moved below
    the NULL test.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T;
    expression E,E1;
    identifier i,fld;
    statement S;
    @@

    - T i = E->fld;
    + T i;
    ... when != E=E1
    when != i
    BUG_ON (E == NULL||...);
    + i = E->fld;
    //

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

    Julia Lawall
     
  • Signed-off-by: Evgeniy Polyakov
    Signed-off-by: David S. Miller

    Evgeniy Polyakov
     
  • Many Nokia handsets support a Phonet interface to the cellular modem
    via a vendor-specific USB interface. CDC Phonet follows the
    Communications Device Class model, with one control interface, and
    and a pair of inactive and active data alternative interface. The later
    has two bulk endpoint, one per direction.

    This was tested against Nokia E61, Nokia N95, and the existing Phonet
    gadget function for the Linux composite USB gadget framework.

    Signed-off-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Rémi Denis-Courmont
     
  • Set the driver data before using it. Fixes an oops when doing rmmod.

    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • A pointer to mac_sonic_probe is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    Various other functions that are called by mac_sonic_probe need to move
    to .devinit.text, too.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Tested-by: Finn Thain
    Signed-off-by: David S. Miller

    Uwe Kleine-König
     

21 Jul, 2009

8 commits

  • Netbooks based on the Soltech TA12 do not send a key release
    for volume keys causing Linux to think the key is constantly
    being pressed forever.

    Added quirk data for forced release keys.

    BugLink: https://bugs.launchpad.net//bugs/397499

    Signed-off-by: Jerone Young
    Signed-off-by: Tim Gardner
    Signed-off-by: Dmitry Torokhov

    Jerone Young
     
  • Standard data flow for MMC/SD/SDIO cards requires that the mvsdio
    controller be set for big endian operation. This is causing problems
    with buffers which length is not a multiple of 4 bytes as the last
    partial word doesn't get shifted all the way and stored properly in
    memory. Let's compensate for this.

    Signed-off-by: Nicolas Pitre
    CC: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     
  • This function does not have an error return and returning an error is
    instead interpreted as having a lot of pending bytes.

    Reported by Jeff Harris who provided a list of some of the remaining
    offenders.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • If spin_lock_irqsave is called twice in a row with the same second
    argument, the interrupt state at the point of the second call overwrites
    the value saved by the first call. Indeed, the second call does not
    need to save the interrupt state, so it is changed to a simple
    spin_lock.

    The semantic match that finds this problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    expression lock1,lock2;
    expression flags;
    @@

    *spin_lock_irqsave(lock1,flags)
    ... when != flags
    *spin_lock_irqsave(lock2,flags)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • The buffer for the consoles are unconditionally allocated at con_init()
    time, which miss the creation of the vcs(a) devices.

    Since 2.6.30 (commit 4995f8ef9d3aac72745e12419d7fbaa8d01b1d81, 'vcs:
    hook sysfs devices into object lifetime instead of "binding"' to be
    exact) these devices are no longer created at open() and removed on
    close(), but controlled by the lifetime of the buffers.

    Reported-by: Gerardo Exequiel Pozzi
    Tested-by: Gerardo Exequiel Pozzi
    Cc: stable@kernel.org
    Signed-off-by: Kay Sievers
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Kay Sievers
     
  • This patch fixes a problem when a device is stopped while in the
    bus-off state. Then the carrier remains off forever.

    Signed-off-by: Kurt Van Dijck
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • If dev_alloc_skb() failed in can_restart(), the device was left behind
    in the bus-off state. This patch restarts the device nevertheless.

    Signed-off-by: Kurt Van Dijck
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • Remove duplicated #include('s) in
    drivers/net/can/sja1000/sja1000.c

    Signed-off-by: Huang Weiyi
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     

20 Jul, 2009

8 commits

  • rain_maker@root-forum.org wrote:
    > Hello cesar,
    >
    > In a recent thread in a german linux forum, a user reported his PIC
    > NIC not being recognized by the kernel.
    >
    > Fortunately he provided enough information and I was able to help him
    > and get the device working with the sc92031 driver.
    >
    > The device ID is [1088:2031] (Vendor is called "Microcomputer Systems
    > (M) Son"), here is the respective thread in "ubuntuusers.de"
    >
    > http://forum.ubuntuusers.de/topic/lankarte-unter-xubuntu-wird-nicht-erkannt/
    >
    > (Although you might not speak german, the code provided will show
    > you, that the device is actually working with your driver).
    >
    > It would be nice, if you include this new device ID to the
    > sc92031-driver.
    >
    > Regards,
    >
    > Axel Köllhofer (aka Rain_Maker)

    Cc: rain_maker@root-forum.org
    Signed-off-by: Cesar Eduardo Barros
    Signed-off-by: David S. Miller

    Cesar Eduardo Barros
     
  • 3c589_cs:
    re-initialize the multicast in the tc589_reset,
    and spin_lock the set_multicast_list function.

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

    Ken Kawasaki
     
  • Check temperature for all PCI functions, that can allow
    graceful shutdown of all interfaces on the overheated card.

    Old code was only monitoring temperature for function 0 only.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • netxen: fix deadlock on dev close

    The tx ring accounting fix in commit cb2107be43d2fc5eadec58b92b
    ("netxen: fix tx ring accounting") introduced intermittent
    deadlock when inteface is going down.

    This was possibly combined effect of speculative tx pause,
    calling netif_tx_lock instead of queue lock and unclean
    synchronization with napi which could end up unmasking
    interrupt.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • o Use D3 reset context deletion for NX2031, it cleans up
    more resources in the firmware.
    o Release rx buffers after hardware context has been reset.
    o Delete tx context after rx context, some firmware control
    commands are sent on tx context, so it should be the last
    to go.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • Network driver for the SPI version of the Micrel KS8851
    network chip.

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

    Ben Dooks
     
  • Add mac driver support for evaluation board based on w90p910.

    Signed-off-by: Wan ZongShun
    Signed-off-by: David S. Miller

    Wan ZongShun
     
  • If the NULL test is necessary, then the dereferences should be moved below
    the NULL test.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T;
    expression E,E1;
    identifier i,fld;
    statement S;
    @@

    - T i = E->fld;
    + T i;
    ... when != E=E1
    when != i
    if (E == NULL||...) S
    + i = E->fld;
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jiri Kosina

    Julia Lawall
     

19 Jul, 2009

2 commits

  • The variable virtio_blk references the function virtblk_probe() (which
    is in .devinit section) and also references the function
    virtblk_remove() ( which is in .devexit section). So, virtio_blk
    simultaneously refers .devinit and .devexit section. To avoid this
    messup, we mark virtio_blk as __refdata.

    We were warned by the following warning:

    LD drivers/block/built-in.o
    WARNING: drivers/block/built-in.o(.data+0xc8dc): Section mismatch in
    reference from the variable virtio_blk to the function
    .devinit.text:virtblk_probe()
    The variable virtio_blk references
    the function __devinit virtblk_probe()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: drivers/block/built-in.o(.data+0xc8e0): Section mismatch in
    reference from the variable virtio_blk to the function
    .devexit.text:virtblk_remove()
    The variable virtio_blk references
    the function __devexit virtblk_remove()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Rakib Mullick
    Signed-off-by: Tejun Heo

    Rakib Mullick
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: Realview & Versatile: Fix i2c_board_info definitions
    [ARM] 5608/1: Updated U300 defconfig
    [ARM] 5606/1: Fix ep93xx watchdog driver headers
    [ARM] 5594/1: Correct U300 VIC init PM setting
    [ARM] 5595/1: ep93xx: missing header in dma-m2p.c
    [ARM] Kirkwood: Correct header define
    [ARM] pxa: fix ULPI_{DIR,NXT,STP} MFP defines
    backlight: fix pwm_bl.c to notify platform code when suspending
    [ARM] pxa: use kzalloc() in pxa_init_gpio_chip()
    [ARM] pxa: correct I2CPWR clock for pxa3xx
    pxamci: correct DMA flow control
    ARM: add support for the EET board, based on the i.MX31 pcm037 module
    pcm037: add MT9T031 camera support
    Armadillo 500 add NAND flash device support (resend).
    ARM MXC: Armadillo 500 add NOR flash device support (resend).
    mx31: remove duplicated #include

    Linus Torvalds
     

18 Jul, 2009

2 commits


17 Jul, 2009

3 commits