25 Aug, 2011

4 commits

  • By default the atmel_serial driver in RS485 mode disables receiving data until
    all data in the send buffer has been sent. This flag allows to receive data
    even whilst sending data.

    Signed-off-by: Bernhard Roth
    Signed-off-by: Claudio Scordino
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Bernhard Roth
     
  • The imx UART hardware controller can identify BREAK character and the
    imx_set_termios() can accept BRKINT set by users, but current existing
    imx_rxint() can't pass BREAK character and TTY_BREAK to the tty layer
    as other serial drivers do (8250.c omap_serial.c).

    Here add code to handle BREAK character and pass it to tty layer.

    To detect error occurrence, i use URXD_ERR to replace (URXD_OVRRUN |
    URXD_FRMERR | ...) because any kind of error occurs, URXD_ERR will
    always be set to 1.

    I put the URXD_BRK to the first place to check since when BREAK error
    occurs, not only URXD_BRK is set to 1, but also URXD_PRERR and
    URXD_FRMERR are all set to 1. This arrangement can filter out fake
    parity and frame errors when BREAK error occurs.

    Signed-off-by: Hui Wang
    Acked-by: Sascha Hauer
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • This reverts commit 6b1a98d1c4851235d9b6764b3f7b7db7909fc760.

    It causes a build error that needs to be resolved differently.

    Cc: Alan Cox
    Cc: Arnd Bergmann
    Cc: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This reverts commit 14a8d47d4e9f51372996914c16bdbf1c34e209b5.

    It causes a build error that needs to be resolved differently.

    Cc: Alan Cox
    Cc: Arnd Bergmann
    Cc: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

24 Aug, 2011

21 commits

  • Support the DesignWare 8250 by a new compatible string and registering
    the DesignWare helpers. If the registration of the helpers fails, then
    continue as a normal 8250 as we may still get some useful debug out.

    Cc: Alan Cox
    Cc: Arnd Bergmann
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • The Synopsys DesignWare 8250 is an 8250 that has an extra interrupt that
    gets raised when writing to the LCR when busy. To handle this we need
    special serial_out, serial_in and handle_irq methods. Add a new
    function serial8250_use_designware_io() that configures a uart_port with
    these accessors.

    Cc: Alan Cox
    Acked-by: Arnd Bergmann
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • Now that platforms can override the port IRQ handler and the only user
    of these UPIO modes has been converted over, kill off UPIO_DWAPB and
    UPIO_DWAPB32.

    Acked-by: Alan Cox
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • The Synopsys DesignWare UART in pmc-sierra msp71xx has an extra feature
    where the UART detects a write attempt to the LCR whilst busy and raises
    an interrupt. The driver needs to clear the interrupt and rewrite the
    LCR. Move this into platform code and out of the 8250 driver.

    Acked-by: Ralf Baechle
    Acked-by: Alan Cox
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • Convert to pr_foo() helpers rather than printk(KERN_.*).

    Acked-by: Ralf Baechle
    Acked-by: Anoop P A
    Acked-by: Alan Cox
    Signed-off-by: Jamie Iles
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • Some ports (e.g. Synopsys DesignWare 8250) have special requirements for
    handling the interrupts. Allow these platforms to specify their own
    interrupt handler that will override the default.
    serial8250_handle_irq() is provided so that platforms can extend the IRQ
    handler rather than completely replacing it.

    Signed-off-by: Jamie Iles
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • Some serial ports may have unusal requirements for interrupt handling
    (e.g. the Synopsys DesignWare 8250-alike port and it's busy detect
    interrupt). Add a .handle_irq callback that can be used for platforms
    to override the interrupt behaviour in a similar fashion to the
    .serial_out and .serial_in callbacks.

    Signed-off-by: Jamie Iles
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jamie Iles
     
  • With uart tx/rx/err interrupt handling moved into the driver for s3c64xx
    and later SoC's, the uart interrupt handling in plaform code can be removed.
    The uart device irq resources is reduced to one and the related unused
    macros are removed.

    Suggested-by: Grant Likely
    CC: Ben Dooks
    Signed-off-by: Thomas Abraham
    Signed-off-by: Greg Kroah-Hartman

    Thomas Abraham
     
  • s3c64xx and later SoC's include the interrupt mask and pending registers
    in the uart controller, unlike the s3c24xx SoC's which have these registers
    in the interrupt controller. When the mask and pending registers are part
    of the uart controller, a unified interrupt handler can handle the tx/rx
    interrupt. With this, the static reservation of interrupt numbers for the
    uart tx/rx/err interrupts in the linux irq space is not required and
    simplifies adding device tree support.

    Suggested-by: Grant Likely
    CC: Ben Dooks
    Signed-off-by: Thomas Abraham
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Thomas Abraham
     
  • Serial TX IRQ is not RX IRQ plus 1 in some blackfin chips.
    Give individual platform resources to both TX and RX irqs.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Greg Kroah-Hartman

    Sonic Zhang
     
  • Even though this is valid C we should not mix C99 initializers with
    obfuscated ANSI C. Stick to C99 and initialize c by its name.

    Found by clang:
    drivers/tty/vt/vt.c:262:55: warning: explicitly assigning a variable of
    type 'unsigned int' to itself [-Wself-assign]
    struct vt_notifier_param param = { .vc = vc, unicode = unicode };
    ~~~~~~~ ^ ~~~~~~~

    Signed-off-by: Mathias Krause
    Signed-off-by: Greg Kroah-Hartman

    Mathias Krause
     
  • bfin_5xx.c is not a general name for all Blackfin chips.

    Signed-off-by: Sonic Zhang
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Sonic Zhang
     
  • Signed-off-by: Sonic Zhang
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Sonic Zhang
     
  • It makes the code really ugly. And since it can be enabled only before
    building and only in the source files, it can be barely used by users.
    That said, I've not seen anybody to use it in the past few years.

    This crap is copied to some more drivers over the tty tree. Since I'm
    not their maintainer, I'm not sure if I should remove them too?

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • We used it really only serial and ami_serial. The rest of the
    callsites were BUG/WARN_ONs to check if BTM is held. Now that we
    pruned tty_locked from both of the real users, we can get rid of
    tty_lock along with __big_tty_mutex_owner.

    Signed-off-by: Jiri Slaby
    Acked-by: Arnd Bergmann
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • The same as in "TTY: serial, remove BTM from wait_until_sent" we don't
    need to take BTM in wait_until_sent of ami_serial. Exactly the same
    as serial, ami_serial accesses some "info" members (xmit_fifo_size,
    timeout), but their assignment on other places in the code is not
    protected by BTM anyway.

    So the BTM protects nothing here. This removal helps us to get rid of
    tty_locked() and __big_tty_mutex_owner in the following patch. This
    was suggested by Arnd.

    Signed-off-by: Jiri Slaby
    Acked-by: Arnd Bergmann
    Cc: Alan Cox
    Cc: Andreas Bombe
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • tty_wakeup can be called from any context. So there is no need to have
    an extra tasklet for calling that. Hence save some space and remove
    the tasklet completely.

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • It doesn't make sense to set console to uart_port in console->setup.
    At that time the console is set by uart_add_one_port already.

    The call chain looked like:
    uart_add_one_port()
    uport->cons = drv->cons; setup()
    port->cons = co;
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • During the BKL removal process, the BKL was switched to tty_lock
    (BTM). Now we should start pruning the BTM further. Let's start with
    wait_until_sent of the serial layer. This will allow us to switch to
    the tty port helpers and thus clean it up much.

    In wait_until_sent there are some uport members accessed, but neither
    of them is protected by BTM at the location they are set ('=>' means
    function call):
    * uport->fifosize (set in tty_ioctl => uart_ioctl => uart_set_info)
    * uport->type (set in add_one_port prior to tty_register_device)
    * uport->timeout (set usually in tty_ioctl => tty_mode_ioctl =>
    tty_set_termios => uart_set_termios => uart_change_speed =>
    uport->ops->set_termios => uart_update_timeout)
    * call to uport->ops->tx_empty()

    If the tx_empty hook needs some lock to protect accesses to registers,
    it should take &uport->lock spinlock like 8250 does. Otherwise there
    still might be races e.g. with ISRs.

    This should also fix the issue Andreas is seeing (BTM in comparison to
    BKL doesn't have any hidden functionality like unlocking during
    sleeping).

    Signed-off-by: Jiri Slaby
    References: https://lkml.org/lkml/2011/5/25/562
    Cc: Alan Cox
    Acked-by: Arnd Bergmann
    Cc: Andreas Bombe
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     
  • Redundant comment line was removed

    Signed-off-by: Edwin van Vliet
    Reviewed-by: Jesper Juhl
    Signed-off-by: Greg Kroah-Hartman

    Edwin van Vliet
     
  • The ePAPR embedded hypervisor specification provides an API for "byte
    channels", which are serial-like virtual devices for sending and receiving
    streams of bytes. This driver provides Linux kernel support for byte
    channels via three distinct interfaces:

    1) An early-console (udbg) driver. This provides early console output
    through a byte channel. The byte channel handle must be specified in a
    Kconfig option.

    2) A normal console driver. Output is sent to the byte channel designated
    for stdout in the device tree. The console driver is for handling kernel
    printk calls.

    3) A tty driver, which is used to handle user-space input and output. The
    byte channel used for the console is designated as the default tty.

    Signed-off-by: Timur Tabi
    Signed-off-by: Greg Kroah-Hartman

    Timur Tabi
     

23 Aug, 2011

3 commits


22 Aug, 2011

3 commits


21 Aug, 2011

4 commits

  • This fixes a regression introduced by commit cdcb725c05fe ("Btrfs: check
    if there is enough space for balancing smarter"). We can't do 64-bit
    divides on 32-bit architectures.

    In cases where we need to divide/multiply by 2 we should just left/right
    shift respectively, and in cases where theres N number of devices use
    do_div. Also make the counters u64 to match up with rw_devices.
    Thanks,

    Signed-off-by: Josef Bacik
    Acked-and-tested-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Josef Bacik
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: flush any pending end_io requests before DIO reads w/dioread_nolock
    ext4: fix nomblk_io_submit option so it correctly converts uninit blocks
    ext4: Resolve the hang of direct i/o read in handling EXT4_IO_END_UNWRITTEN.
    ext4: call ext4_ioend_wait and ext4_flush_completed_IO in ext4_evict_inode
    ext4: Fix ext4_should_writeback_data() for no-journal mode

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
    ALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.c
    ALSA: hda - Don't spew too many ELD errors
    ALSA: usb-audio - Fix missing mixer dB information
    ALSA: hda - Add "PCM" volume to vmaster slave list
    ALSA: hda - Fix duplicated capture-volume creation for ALC268 models
    ALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelist
    ALSA: snd_usb_caiaq: track submitted output urbs

    Linus Torvalds
     
  • Fix new kernel-doc warning in pci.c:

    Warning(drivers/pci/pci.c:3259): No description found for parameter 'mps'
    Warning(drivers/pci/pci.c:3259): Excess function parameter 'rq' description in 'pcie_set_mps'

    Signed-off-by: Randy Dunlap
    Cc: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

20 Aug, 2011

5 commits

  • The label outnodev is only used when kzalloc has not yet taken place or has
    failed, so there is no need for the call for kfree under this label.

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

    //
    @@
    identifier x;
    expression E1!=0,E2,E3,E4;
    statement S;
    iterator I;
    @@

    (
    if (...) { ... when != kfree(x)
    when != x = E3
    when != E3 = x
    * return ...;
    }
    ... when != x = E2
    when != I(...,x,...) S
    if (...) { ... when != x = E4
    kfree(x); ... return ...; }
    )
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • snd_hda_get_conn_index() returns a negative value while the current code
    stores it in an unsigned int. It must be stored in a signed integer.

    Reported-by: Jesper Juhl
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Currently HD-audio driver shows the all error ELD byte as an error
    in the kernel message. This is annoying when the video driver doesn't
    set the correct ELD from the beginning. e.g. radeon sends a zero-byte
    data, but we still check ELD with the fixed 128 byte as a workaround
    for some broken devices, it spews 128-times errors.

    For avoiding this, the driver aborts reading when the first byte is
    invalid. In such a case, the whole data is certainly invalid.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel:
    drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge

    Linus Torvalds
     
  • There is a race between ext4 buffer write and direct_IO read with
    dioread_nolock mount option enabled. The problem is that we clear
    PageWriteback flag during end_io time but will do
    uninitialized-to-initialized extent conversion later with dioread_nolock.
    If an O_direct read request comes in during this period, ext4 will return
    zero instead of the recently written data.

    This patch checks whether there are any pending uninitialized-to-initialized
    extent conversion requests before doing O_direct read to close the race.
    Note that this is just a bandaid fix. The fundamental issue is that we
    clear PageWriteback flag before we really complete an IO, which is
    problem-prone. To fix the fundamental issue, we may need to implement an
    extent tree cache that we can use to look up pending to-be-converted extents.

    Signed-off-by: Jiaying Zhang
    Signed-off-by: "Theodore Ts'o"
    Cc: stable@kernel.org

    Jiaying Zhang