1. 23 Aug, 2011 7 commits
    • Nick Pelly's avatar
      omap-serial: Allow IXON and IXOFF to be disabled. · b280a97d
      Nick Pelly authored
      Fixes logic bug that software flow control cannot be disabled, because
      serial_omap_configure_xonxoff() is not called if both IXON and IXOFF bits
      are cleared.
      Signed-off-by: default avatarNick Pelly <npelly@google.com>
      Acked-by: default avatarGovindraj.R <govindraj.raja@ti.com>
      Tested-by: default avatarGovindraj.R <govindraj.raja@ti.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b280a97d
    • Jiri Slaby's avatar
      TTY: serial, document ignoring of uart->ops->startup error · 0055197e
      Jiri Slaby authored
      When a user has SYS_ADMIN capabilities and uart->ops->startup returns
      an error in uart_startup, we silently drop the error. We then return 0
      and behave as if it didn't fail. (Not quite, since we set TTY_IO_ERROR
      bit and leave ASYNC_INITIALIZED bit cleared.)
      
      This all is to allow setserial to work with improperly configured or
      unconfigured ports. User can thus set port properties and reconfigure
      properly.
      
      This patch only documents this behavior.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Russel King <linux@arm.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0055197e
    • Jiri Slaby's avatar
      TTY: pty, fix pty counting · 24d406a6
      Jiri Slaby authored
      tty_operations->remove is normally called like:
      queue_release_one_tty
       ->tty_shutdown
         ->tty_driver_remove_tty
           ->tty_operations->remove
      
      However tty_shutdown() is called from queue_release_one_tty() only if
      tty_operations->shutdown is NULL. But for pty, it is not.
      pty_unix98_shutdown() is used there as ->shutdown.
      
      So tty_operations->remove of pty (i.e. pty_unix98_remove()) is never
      called. This results in invalid pty_count. I.e. what can be seen in
      /proc/sys/kernel/pty/nr.
      
      I see this was already reported at:
        https://lkml.org/lkml/2009/11/5/370
      But it was not fixed since then.
      
      This patch is kind of a hackish way. The problem lies in ->install. We
      allocate there another tty (so-called tty->link). So ->install is
      called once, but ->remove twice, for both tty and tty->link. The fix
      here is to count both tty and tty->link and divide the count by 2 for
      user.
      
      And to have ->remove called, let's make tty_driver_remove_tty() global
      and call that from pty_unix98_shutdown() (tty_operations->shutdown).
      
      While at it, let's document that when ->shutdown is defined,
      tty_shutdown() is not called.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      24d406a6
    • Al Cooper's avatar
      8250: Fix race condition in serial8250_backup_timeout(). · dbb3b1ca
      Al Cooper authored
      This is to fix an issue where output will suddenly become very slow.
      The problem occurs on 8250 UARTS with the hardware bug UART_BUG_THRE.
      
      BACKGROUND
      For normal UARTs (without UART_BUG_THRE): When the serial core layer
      gets new transmit data and the transmitter is idle, it buffers the
      data and calls the 8250s' serial8250_start_tx() routine which will
      simply enable the TX interrupt in the IER register and return. This
      should immediately fire a THRE interrupt and begin transmitting the
      data.
      For buggy UARTs (with UART_BUG_THRE): merely enabling the TX interrupt
      in IER does not necessarily generate a new THRE interrupt.
      Therefore, a background timer periodically checks to see if there is
      pending data, and starts transmission if that is the case.
      
      The bug happens on SMP systems when the system has nothing to transmit,
      the transmit interrupt is disabled and the following sequence occurs:
      - CPU0: The background timer routine serial8250_backup_timeout()
        starts and saves the state of the interrupt enable register (IER)
        and then disables all interrupts in IER. NOTE: The transmit interrupt
        (TI) bit is saved as disabled.
      - CPU1: The serial core gets data to transmit, grabs the port lock and
        calls serial8250_start_tx() which enables the TI in IER.
      - CPU0: serial8250_backup_timeout() waits for the port lock.
      - CPU1: finishes (with TI enabled) and releases the port lock.
      - CPU0: serial8250_backup_timeout() calls the interrupt routine which
        will transmit the next fifo's worth of data and then restores the
        IER from the previously saved value (TI disabled).
      At this point, as long as the serial core has more transmit data
      buffered, it will not call serial8250_start_tx() again and the
      background timer routine will slowly transmit the data.
      
      The fix is to have serial8250_start_tx() get the port lock before
      it saves the IER state and release it after restoring IER. This will
      prevent serial8250_start_tx() from running in parallel.
      Signed-off-by: default avatarAl Cooper <alcooperx@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dbb3b1ca
    • Tomoya MORINAGA's avatar
      serial/8250_pci: delete duplicate data definition · dacacc3e
      Tomoya MORINAGA authored
      Data definiton "VendorID=10DB, device_id=800D" is already defined.
      This patch deletes the duplicate definition.
      Signed-off-by: default avatarTomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dacacc3e
    • Eric Smith's avatar
      8250_pci: add support for Rosewill RC-305 4x serial port card · 44178176
      Eric Smith authored
      This patch adds support for the Rosewill RC-305 four-port PCI serial
      card, and probably any other four-port serial cards based on the
      Moschip MCS9865 chip, assuming that the EEPROM on the card was
      programmed in accordance with Table 6 of the MCS9865 EEPROM
      Application Note version 0.3 dated 16-May-2008, available from the
      Moschip web site (registration required).
      
      This patch is based on an earlier patch [1] for the SYBA 6x serial
      port card by Ira W. Snyder.
      
      [1]: http://www.gossamer-threads.com/lists/linux/kernel/1162435Signed-off-by: default avatarEric Smith <eric@brouhaha.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      44178176
    • Axel Lin's avatar
      tty: Add "spi:" prefix for spi modalias · 8c4074cd
      Axel Lin authored
      Since commit e0626e38 (spi: prefix modalias with "spi:"),
      the spi modalias is prefixed with "spi:".
      
      This patch adds "spi:" prefix and removes "-spi" suffix in the modalias.
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8c4074cd
  2. 22 Aug, 2011 4 commits
  3. 08 Aug, 2011 2 commits
  4. 07 Aug, 2011 18 commits
    • Linus Torvalds's avatar
      9e233113
    • Rafael J. Wysocki's avatar
      sh: Fix boot crash related to SCI · fc97114b
      Rafael J. Wysocki authored
      Commit d006199e72a9 ("serial: sh-sci: Regtype probing doesn't need to be
      fatal.") made sci_init_single() return when sci_probe_regmap() succeeds,
      although it should return when sci_probe_regmap() fails.  This causes
      systems using the serial sh-sci driver to crash during boot.
      
      Fix the problem by using the right return condition.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc97114b
    • Linus Torvalds's avatar
      arm: remove stale export of 'sha_transform' · f23c126b
      Linus Torvalds authored
      The generic library code already exports the generic function, this was
      left-over from the ARM-specific version that just got removed.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f23c126b
    • Linus Torvalds's avatar
      arm: remove "optimized" SHA1 routines · 4d448714
      Linus Torvalds authored
      Since commit 1eb19a12 ("lib/sha1: use the git implementation of
      SHA-1"), the ARM SHA1 routines no longer work.  The reason? They
      depended on the larger 320-byte workspace, and now the sha1 workspace is
      just 16 words (64 bytes).  So the assembly version would overwrite the
      stack randomly.
      
      The optimized asm version is also probably slower than the new improved
      C version, so there's no reason to keep it around.  At least that was
      the case in git, where what appears to be the same assembly language
      version was removed two years ago because the optimized C BLK_SHA1 code
      was faster.
      Reported-and-tested-by: default avatarJoachim Eastwood <manabian@gmail.com>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4d448714
    • Al Viro's avatar
      fix rcu annotations noise in cred.h · 32955148
      Al Viro authored
      task->cred is declared as __rcu, and access to other tasks' ->cred is,
      indeed, protected.  Access to current->cred does not need rcu_dereference()
      at all, since only the task itself can change its ->cred.  sparse, of
      course, has no way of knowing that...
      
      Add force-cast in current_cred(), make current_fsuid() et.al. use it.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      32955148
    • Linus Torvalds's avatar
      vfs: rename 'do_follow_link' to 'should_follow_link' · 7813b94a
      Linus Torvalds authored
      Al points out that the do_follow_link() helper function really is
      misnamed - it's about whether we should try to follow a symlink or not,
      not about actually doing the following.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7813b94a
    • Ari Savolainen's avatar
      Fix POSIX ACL permission check · 206b1d09
      Ari Savolainen authored
      After commit 3567866b: "RCUify freeing acls, let check_acl() go ahead in
      RCU mode if acl is cached" posix_acl_permission is being called with an
      unsupported flag and the permission check fails. This patch fixes the issue.
      Signed-off-by: default avatarAri Savolainen <ari.m.savolainen@gmail.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      206b1d09
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd · c2f340a6
      Linus Torvalds authored
      * 'for-linus' of git://git.open-osd.org/linux-open-osd:
        ore: Make ore its own module
        exofs: Rename raid engine from exofs/ios.c => ore
        exofs: ios: Move to a per inode components & device-table
        exofs: Move exofs specific osd operations out of ios.c
        exofs: Add offset/length to exofs_get_io_state
        exofs: Fix truncate for the raid-groups case
        exofs: Small cleanup of exofs_fill_super
        exofs: BUG: Avoid sbi realloc
        exofs: Remove pnfs-osd private definitions
        nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4
      c2f340a6
    • Linus Torvalds's avatar
      vfs: optimize inode cache access patterns · 3ddcd056
      Linus Torvalds authored
      The inode structure layout is largely random, and some of the vfs paths
      really do care.  The path lookup in particular is already quite D$
      intensive, and profiles show that accessing the 'inode->i_op->xyz'
      fields is quite costly.
      
      We already optimized the dcache to not unnecessarily load the d_op
      structure for members that are often NULL using the DCACHE_OP_xyz bits
      in dentry->d_flags, and this does something very similar for the inode
      ops that are used during pathname lookup.
      
      It also re-orders the fields so that the fields accessed by 'stat' are
      together at the beginning of the inode structure, and roughly in the
      order accessed.
      
      The effect of this seems to be in the 1-2% range for an empty kernel
      "make -j" run (which is fairly kernel-intensive, mostly in filename
      lookup), so it's visible.  The numbers are fairly noisy, though, and
      likely depend a lot on exact microarchitecture.  So there's more tuning
      to be done.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ddcd056
    • Linus Torvalds's avatar
      vfs: renumber DCACHE_xyz flags, remove some stale ones · 830c0f0e
      Linus Torvalds authored
      Gcc tends to generate better code with small integers, including the
      DCACHE_xyz flag tests - so move the common ones to be first in the list.
      Also just remove the unused DCACHE_INOTIFY_PARENT_WATCHED and
      DCACHE_AUTOFS_PENDING values, their users no longer exists in the source
      tree.
      
      And add a "unlikely()" to the DCACHE_OP_COMPARE test, since we want the
      common case to be a nice straight-line fall-through.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      830c0f0e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7cd4767e
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: Compute protocol sequence numbers and fragment IDs using MD5.
        crypto: Move md5_transform to lib/md5.c
      7cd4767e
    • Boaz Harrosh's avatar
      ore: Make ore its own module · cf283ade
      Boaz Harrosh authored
      Export everything from ore need exporting. Change Kbuild and Kconfig
      to build ore.ko as an independent module. Import ore from exofs
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      cf283ade
    • Boaz Harrosh's avatar
      exofs: Rename raid engine from exofs/ios.c => ore · 8ff660ab
      Boaz Harrosh authored
      ORE stands for "Objects Raid Engine"
      
      This patch is a mechanical rename of everything that was in ios.c
      and its API declaration to an ore.c and an osd_ore.h header. The ore
      engine will later be used by the pnfs objects layout driver.
      
      * File ios.c => ore.c
      
      * Declaration of types and API are moved from exofs.h to a new
        osd_ore.h
      
      * All used types are prefixed by ore_ from their exofs_ name.
      
      * Shift includes from exofs.h to osd_ore.h so osd_ore.h is
        independent, include it from exofs.h.
      
      Other than a pure rename there are no other changes. Next patch
      will move the ore into it's own module and will export the API
      to be used by exofs and later the layout driver
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      8ff660ab
    • Boaz Harrosh's avatar
      exofs: ios: Move to a per inode components & device-table · 9e9db456
      Boaz Harrosh authored
      Exofs raid engine was saving on memory space by having a single layout-info,
      single pid, and a single device-table, global to the filesystem. Then passing
      a credential and object_id info at the io_state level, private for each
      inode. It would also devise this contraption of rotating the device table
      view for each inode->ino to spread out the device usage.
      
      This is not compatible with the pnfs-objects standard, demanding that
      each inode can have it's own layout-info, device-table, and each object
      component it's own pid, oid and creds.
      
      So: Bring exofs raid engine to be usable for generic pnfs-objects use by:
      
      * Define an exofs_comp structure that holds obj_id and credential info.
      
      * Break up exofs_layout struct to an exofs_components structure that holds a
        possible array of exofs_comp and the array of devices + the size of the
        arrays.
      
      * Add a "comps" parameter to get_io_state() that specifies the ids creds
        and device array to use for each IO.
      
        This enables to keep the layout global, but the device-table view, creds
        and IDs at the inode level. It only adds two 64bit to each inode, since
        some of these members already existed in another form.
      
      * ios raid engine now access layout-info and comps-info through the passed
        pointers. Everything is pre-prepared by caller for generic access of
        these structures and arrays.
      
      At the exofs Level:
      
      * Super block holds an exofs_components struct that holds the device
        array, previously in layout. The devices there are in device-table
        order. The device-array is twice bigger and repeats the device-table
        twice so now each inode's device array can point to a random device
        and have a round-robin view of the table, making it compatible to
        previous exofs versions.
      
      * Each inode has an exofs_components struct that is initialized at
        load time, with it's own view of the device table IDs and creds.
        When doing IO this gets passed to the io_state together with the
        layout.
      
      While preforming this change. Bugs where found where credentials with the
      wrong IDs where used to access the different SB objects (super.c). As well
      as some dead code. It was never noticed because the target we use does not
      check the credentials.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      9e9db456
    • Boaz Harrosh's avatar
      exofs: Move exofs specific osd operations out of ios.c · 85e44df4
      Boaz Harrosh authored
      ios.c will be moving to an external library, for use by the
      objects-layout-driver. Remove from it some exofs specific functions.
      
      Also g_attr_logical_length is used both by inode.c and ios.c
      move definition to the later, to keep it independent
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      85e44df4
    • Boaz Harrosh's avatar
      exofs: Add offset/length to exofs_get_io_state · e1042ba0
      Boaz Harrosh authored
      In future raid code we will need to know the IO offset/length
      and if it's a read or write to determine some of the array
      sizes we'll need.
      
      So add a new exofs_get_rw_state() API for use when
      writeing/reading. All other simple cases are left using the
      old way.
      
      The major change to this is that now we need to call
      exofs_get_io_state later at inode.c::read_exec and
      inode.c::write_exec when we actually know these things. So this
      patch is kept separate so I can test things apart from other
      changes.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      e1042ba0
    • David S. Miller's avatar
      net: Compute protocol sequence numbers and fragment IDs using MD5. · 6e5714ea
      David S. Miller authored
      Computers have become a lot faster since we compromised on the
      partial MD4 hash which we use currently for performance reasons.
      
      MD5 is a much safer choice, and is inline with both RFC1948 and
      other ISS generators (OpenBSD, Solaris, etc.)
      
      Furthermore, only having 24-bits of the sequence number be truly
      unpredictable is a very serious limitation.  So the periodic
      regeneration and 8-bit counter have been removed.  We compute and
      use a full 32-bit sequence number.
      
      For ipv6, DCCP was found to use a 32-bit truncated initial sequence
      number (it needs 43-bits) and that is fixed here as well.
      Reported-by: default avatarDan Kaminsky <dan@doxpara.com>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e5714ea
    • David S. Miller's avatar
      crypto: Move md5_transform to lib/md5.c · bc0b96b5
      David S. Miller authored
      We are going to use this for TCP/IP sequence number and fragment ID
      generation.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc0b96b5
  5. 06 Aug, 2011 9 commits