1. 18 Apr, 2012 6 commits
    • Dan Williams's avatar
      serial/8250_pci: fix suspend/resume vs init/exit quirks · 5f1a3895
      Dan Williams authored
      Commit e86ff4a6 "serial/8250_pci: init-quirk msi support for kt serial
      controller" introduced a regression in suspend/resume by causing msi's
      to be enabled twice without an intervening disable.
      
      00:16.3 Serial controller: Intel Corporation Patsburg KT Controller (rev 05) (prog-if 02 [16550])
             Subsystem: Intel Corporation Device 7270
             Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 72
             I/O ports at 4080 [size=8]
             Memory at d1c30000 (32-bit, non-prefetchable) [size=4K]
             Capabilities: [c8] Power Management version 3
             Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
             Kernel driver in use: serial
      
      [  365.250523] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:16.3/msi_irqs'
      [  365.250525] Modules linked in: nls_utf8 ipv6 uinput sg iTCO_wdt
        iTCO_vendor_support ioatdma dca i2c_i801 i2c_core wmi sd_mod ahci libahci isci
        libsas libata scsi_transport_sas [last unloaded: scsi_wait_scan]
      [  365.250540] Pid: 9030, comm: kworker/u:1 Tainted: G        W    3.3.0-isci-3.0.213+ #1
      [  365.250542] Call Trace:
      [  365.250545]  [<ffffffff8115e955>] ? sysfs_add_one+0x99/0xad
      [  365.250548]  [<ffffffff8102db8b>] warn_slowpath_common+0x85/0x9e
      [  365.250551]  [<ffffffff8102dc96>] warn_slowpath_fmt+0x6e/0x70
      [  365.250555]  [<ffffffff8115e8fa>] ? sysfs_add_one+0x3e/0xad
      [  365.250558]  [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44
      [  365.250561]  [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44
      [  365.250564]  [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44
      [  365.250567]  [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44
      [  365.250570]  [<ffffffff8115e955>] sysfs_add_one+0x99/0xad
      [  365.250573]  [<ffffffff8115f031>] create_dir+0x72/0xa5
      [  365.250577]  [<ffffffff8115f194>] sysfs_create_dir+0xa2/0xbe
      [  365.250581]  [<ffffffff81262463>] kobject_add_internal+0x126/0x1f8
      [  365.250585]  [<ffffffff8126255b>] kset_register+0x26/0x3f
      [  365.250588]  [<ffffffff8126275a>] kset_create_and_add+0x62/0x7c
      [  365.250592]  [<ffffffff81293619>] populate_msi_sysfs+0x34/0x103
      [  365.250595]  [<ffffffff81293e1c>] pci_enable_msi_block+0x1b3/0x216
      [  365.250599]  [<ffffffff81303f7c>] try_enable_msi+0x13/0x17
      [  365.250603]  [<ffffffff81303fb3>] pciserial_resume_ports+0x21/0x42
      [  365.250607]  [<ffffffff81304041>] pciserial_resume_one+0x50/0x57
      [  365.250610]  [<ffffffff81283e1a>] pci_legacy_resume+0x38/0x47
      [  365.250613]  [<ffffffff81283e7d>] pci_pm_restore+0x54/0x87
      [  365.250616]  [<ffffffff81283e29>] ? pci_legacy_resume+0x47/0x47
      [  365.250619]  [<ffffffff8131e9e8>] dpm_run_callback+0x48/0x7b
      [  365.250623]  [<ffffffff8131f39a>] device_resume+0x342/0x394
      [  365.250626]  [<ffffffff8131f5b7>] async_resume+0x21/0x49
      
      That patch has since been reverted, but by inspection it seems that
      pciserial_suspend_ports() should be invoking .exit() quirks to release
      resources acquired during .init().
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5f1a3895
    • Sudhakar Mamillapalli's avatar
      serial/8250_pci: Clear FIFOs for Intel ME Serial Over Lan device on BI · 0ad372b9
      Sudhakar Mamillapalli authored
      When using Serial Over Lan (SOL) over the virtual serial port in a Intel
      management engine (ME) device, on device reset the serial FIFOs need to
      be cleared to keep the FIFO indexes in-sync between the host and the
      engine.
      
      On a reset the serial device assertes BI, so using that as a cue FIFOs
      are cleared.  So for this purpose a new handle_break callback has been
      added.  One other problem is that the serial registers might temporarily
      go to 0 on reset of this device.  So instead of using the IER register
      read, if 0 returned use the ier value in uart_8250_port. This is hidden
      under a custom serial_in.
      
      Cc: Nhan H Mai <nhan.h.mai@intel.com>
      Signed-off-by: default avatarSudhakar Mamillapalli <sudhakar@fb.com>
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0ad372b9
    • Greg Kroah-Hartman's avatar
      Merge 3.4-rc3 into tty-next · 665ab0f3
      Greg Kroah-Hartman authored
      This allows us to pick up some changes needed for other serial patches.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      665ab0f3
    • Dan Williams's avatar
      tegra, serial8250: add ->handle_break() uart_port op · bf03f65b
      Dan Williams authored
      The "KT" serial port has another use case for a "received break" quirk,
      so before adding another special case to the 8250 core take this
      opportunity to push such quirks out of the core and into a uart_port op.
      
      Stephen says:
      "If the callback function is to no longer live in 8250.c itself,
       arch/arm/mach-tegra/devices.c isn't logically a good place to put it,
       and that file will be going away once we get rid of all the board files
       and move solely to device tree."
      
      ...so since 8250_pci.c houses all the quirks for pci serial devices this
      quirk is similarly housed in of_serial.c.  Once the open firmware
      conversion completes the infrastructure details
      (include/linux/of_serial.h, and the export) can all be removed to make
      this self contained to of_serial.c.
      
      Cc: Nhan H Mai <nhan.h.mai@intel.com>
      Cc: Colin Cross <ccross@android.com>
      Cc: Olof Johansson <olof@lixom.net>
      [stephen: kill CONFIG_SERIAL_TEGRA in favor just using CONFIG_ARCH_TEGRA]
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarSudhakar Mamillapalli <sudhakar@fb.com>
      Reported-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
      Tested-by: default avatarStephen Warren <swarren@wwwdotorg.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bf03f65b
    • Govindraj.R's avatar
      OMAP2+: UART: Remove cpu checks for populating errata flags · 7c77c8de
      Govindraj.R authored
      Currently the errata is populated based on cpu checks this can
      be removed and replaced with module version check of uart ip block.
      MVR reg is provided within the uart reg map use the same
      to populate the errata and thus now errata population and handling
      can be managed within the driver itself.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: default avatarJon Hunter <jon-hunter@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7c77c8de
    • Rajanikanth H.V's avatar
      serial: pl011: implement workaround for CTS clear event issue · 4fd0690b
      Rajanikanth H.V authored
      Problem Observed:
      - interrupt status is set by rising or falling edge on CTS line
      - interrupt status is cleared on a .0. to .1. transition of the
        interrupt-clear register bit 1.
      - interrupt-clear register is reset by hardware once the interrupt
        status is .0..
        Remark: It seems not possible to read this register back by the
        CPU though, but internally this register exists.
      - when simultaneous set and reset event on the interrupt status
        happens, then the set-event has priority and the status remains
        .1.. As a result the interrupt-clear register is not reset to
        .0., and no new .0. to .1. transition can be detected on it when
        writing a .1. to it.
        This implies race condition, the clear must be performed at least
        one UARTCLK the riding edge of CTS RIS interrupt.
      
      Fix:
        Instead of resetting UART as done in commit
        c16d51a3
        "amba pl011: workaround for uart registers lockup" do the
        following:
      
        write .0. and then  .1. to the interrupt-clear register to make
        sure that this transition is detected. According to the datasheet
        writing a .0. does not have any effect, but actually it allows to
        reset the internal interrupt-clear register.
      
        Take into account:
        The .0. needs to last at least for one clk_uart clock period
        (~ 38 MHz, 26.08ns)
      
      This way we can do away with the tasklet and keep only a tiny
      fix triggered by the variant flag introduced in this patch.
      Signed-off-by: default avatarGuillaume Jaunet <guillaume.jaunet@stericsson.com>
      Signed-off-by: default avatarChristophe Arnal <christophe.arnal@stericsson.com>
      Signed-off-by: default avatarMatthias Locher  <Matthias.Locher@stericsson.com>
      Signed-off-by: default avatarRajanikanth H.V <rajanikanth.hv@stericsson.com>
      Reviewed-by: default avatarSrinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4fd0690b
  2. 17 Apr, 2012 1 commit
  3. 16 Apr, 2012 3 commits
    • Linus Torvalds's avatar
      Linux 3.4-rc3 · e816b57a
      Linus Torvalds authored
      e816b57a
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 9a8e5d41
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Nothing too disasterous, the biggest thing being the removal of the
        regulator support for vcore in the AMBA driver; only one SoC was using
        this and it got broken during the last merge window, which then
        started causing problems for other people.  Mutual agreement was
        reached for it to be removed."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7386/1: jump_label: fixup for rename to static_key
        ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
        ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
        ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
        ARM: 7383/1: nommu: populate vectors page from paging_init
        ARM: 7381/1: nommu: fix typo in mm/Kconfig
        ARM: 7380/1: DT: do not add a zero-sized memory property
        ARM: 7379/1: DT: fix atags_to_fdt() second call site
        ARM: 7366/3: amba: Remove AMBA level regulator support
        ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler
        ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
      9a8e5d41
    • Linus Torvalds's avatar
      x86-32: fix up strncpy_from_user() sign error · 12e993b8
      Linus Torvalds authored
      The 'max' range needs to be unsigned, since the size of the user address
      space is bigger than 2GB.
      
      We know that 'count' is positive in 'long' (that is checked in the
      caller), so we will truncate 'max' down to something that fits in a
      signed long, but before we actually do that, that comparison needs to be
      done in unsigned.
      
      Bug introduced in commit 92ae03f2 ("x86: merge 32/64-bit versions of
      'strncpy_from_user()' and speed it up").  On x86-64 you can't trigger
      this, since the user address space is much smaller than 63 bits, and on
      x86-32 it works in practice, since you would seldom hit the strncpy
      limits anyway.
      
      I had actually tested the corner-cases, I had only tested them on
      x86-64.  Besides, I had only worried about the case of a pointer *close*
      to the end of the address space, rather than really far away from it ;)
      
      This also changes the "we hit the user-specified maximum" to return
      'res', for the trivial reason that gcc seems to generate better code
      that way.  'res' and 'count' are the same in that case, so it really
      doesn't matter which one we return.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12e993b8
  4. 15 Apr, 2012 12 commits
  5. 14 Apr, 2012 13 commits
  6. 13 Apr, 2012 5 commits