1. 05 12月, 2008 1 次提交
  2. 04 12月, 2008 2 次提交
    • D
      atm: 32-bit ioctl compatibility · 8865c418
      David Woodhouse 提交于
      We lack compat ioctl support through most of the ATM code. This patch
      deals with most of it, and I can now at least use BR2684 and PPPoATM
      with 32-bit userspace.
      
      I haven't added a .compat_ioctl method to struct atm_ioctl, because
      AFAICT none of the current users need any conversion -- so we can just
      call the ->ioctl() method in every case. I looked at br2684, clip, lec,
      mpc, pppoatm and atmtcp.
      
      In svc_compat_ioctl() the only mangling which is needed is to change
      COMPAT_ATM_ADDPARTY to ATM_ADDPARTY. Although it's defined as
      	_IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
      it doesn't actually _take_ a struct atm_iobuf as an argument -- it takes
      a struct sockaddr_atmsvc, which _is_ the same between 32-bit and 64-bit
      code, so doesn't need conversion.
      
      Almost all of vcc_ioctl() would have been identical, so I converted that
      into a core do_vcc_ioctl() function with an 'int compat' argument.
      
      I've done the same with atm_dev_ioctl(), where there _are_ a few
      differences, but still it's relatively contained and there would
      otherwise have been a lot of duplication.
      
      I haven't done any of the actual device-specific ioctls, although I've
      added a compat_ioctl method to struct atmdev_ops.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8865c418
    • R
  3. 03 12月, 2008 2 次提交
  4. 02 12月, 2008 3 次提交
    • M
      lib/idr.c: fix rcu related race with idr_find · 6ff2d39b
      Manfred Spraul 提交于
      2nd part of the fixes needed for
      http://bugzilla.kernel.org/show_bug.cgi?id=11796.
      
      When the idr tree is either grown or shrunk, then the update to the number
      of layers and the top pointer were not atomic.  This race caused crashes.
      
      The attached patch fixes that by replicating the layers counter in each
      layer, thus idr_find doesn't need idp->layers anymore.
      Signed-off-by: NManfred Spraul <manfred@colorfullife.com>
      Cc: Clement Calmels <cboulte@gmail.com>
      Cc: Nadia Derbey <Nadia.Derbey@bull.net>
      Cc: Pierre Peiffer <peifferp@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6ff2d39b
    • D
      epoll: introduce resource usage limits · 7ef9964e
      Davide Libenzi 提交于
      It has been thought that the per-user file descriptors limit would also
      limit the resources that a normal user can request via the epoll
      interface.  Vegard Nossum reported a very simple program (a modified
      version attached) that can make a normal user to request a pretty large
      amount of kernel memory, well within the its maximum number of fds.  To
      solve such problem, default limits are now imposed, and /proc based
      configuration has been introduced.  A new directory has been created,
      named /proc/sys/fs/epoll/ and inside there, there are two configuration
      points:
      
        max_user_instances = Maximum number of devices - per user
      
        max_user_watches   = Maximum number of "watched" fds - per user
      
      The current default for "max_user_watches" limits the memory used by epoll
      to store "watches", to 1/32 of the amount of the low RAM.  As example, a
      256MB 32bit machine, will have "max_user_watches" set to roughly 90000.
      That should be enough to not break existing heavy epoll users.  The
      default value for "max_user_instances" is set to 128, that should be
      enough too.
      
      This also changes the userspace, because a new error code can now come out
      from EPOLL_CTL_ADD (-ENOSPC).  The EMFILE from epoll_create() was already
      listed, so that should be ok.
      
      [akpm@linux-foundation.org: use get_current_user()]
      Signed-off-by: NDavide Libenzi <davidel@xmailserver.org>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: <stable@kernel.org>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Reported-by: NVegard Nossum <vegardno@ifi.uio.no>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7ef9964e
    • T
      libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ · ac70a964
      Tejun Heo 提交于
      Some recent Seagate harddrives have firmware bug which causes FLUSH
      CACHE to timeout under certain circumstances if NCQ is being used.
      This can be worked around by disabling NCQ and fixed by updating the
      firmware.  Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
      devices.
      
      The wiki page has been updated to contain information on this issue.
      
        http://ata.wiki.kernel.org/index.php/Known_issuesSigned-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ac70a964
  5. 01 12月, 2008 3 次提交
  6. 30 11月, 2008 2 次提交
    • M
      Bluetooth: Enable per-module dynamic debug messages · a418b893
      Marcel Holtmann 提交于
      With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
      allow debugging without having to recompile the kernel. This patch turns
      all BT_DBG() calls into pr_debug() to support dynamic debug messages.
      
      As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
      some broken debug entries have been fixed.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a418b893
    • M
      Bluetooth: Send HCI Reset command by default on device initialization · 7a9d4020
      Marcel Holtmann 提交于
      The Bluetooth subsystem was not using the HCI Reset command when doing
      device initialization. The Bluetooth 1.0b specification was ambiguous
      on how the device firmware was suppose to handle it. Almost every device
      was triggering a transport reset at the same time. In case of USB this
      ended up in disconnects from the bus.
      
      All modern Bluetooth dongles handle this perfectly fine and a lot of
      them actually require that HCI Reset is sent. If not then they are
      either stuck in their HID Proxy mode or their internal structures for
      inquiry and paging are not correctly setup.
      
      To handle old and new devices smoothly the Bluetooth subsystem contains
      a quirk to force the HCI Reset on initialization. However maintaining
      such a quirk becomes more and more complicated. This patch turns the
      logic around and lets the old devices disable the HCI Reset command.
      
      The only device where the HCI_QUIRK_NO_RESET is still needed are the
      original Digianswer devices and dongles with an early CSR firmware.
      
      CSR reported that they fixed this for version 12 firmware. The last
      official release of version 11 firmware is build ID 115. The first
      version 12 candidate was build ID 117.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7a9d4020
  7. 29 11月, 2008 2 次提交
    • J
      mlx4_core: Save/restore default port IB capability mask · 9a5aa622
      Jack Morgenstein 提交于
      Commit 7ff93f8b ("mlx4_core: Multiple port type support") introduced
      support for different port types.  As part of that support, SET_PORT
      is invoked to set the port type during driver startup.  However, as a
      side-effect, for IB ports the invocation of this command also sets the
      port's capability mask to zero (losing the default value set by FW).
      
      To fix this, get the default ib port capabilities (via a MAD_IFC Port
      Info query) during driver startup, and save them for use in the
      mlx4_SET_PORT command when setting the port-type to Infiniband.
      
      This patch fixes problems with subnet manager (SM) failover such as
      <https://bugs.openfabrics.org/show_bug.cgi?id=1183>, which occurred
      because the IsTrapSupported bit in the capability mask was zeroed.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9a5aa622
    • G
      phy: power management support · 0f0ca340
      Giuseppe Cavallaro 提交于
      This patch adds the power management support into the physical
      abstraction layer.
      
      Suspend and resume functions respectively turns on/off the bit 11
      into the PHY Basic mode control register.
      Generic PHY device starts supporting PM.
      
      In order to support the wake-on LAN and avoid to put in power down
      the PHY device, the MDIO is aware of what the Ethernet device wants to do.
      
      Voluntary, no CONFIG_PM defines were added into the sources.
      Also generic suspend/resume functions are exported to allow
      other drivers use them (such as genphy_config_aneg etc.).
      
      Within the phy_driver_register function, we need to remove the
      memset. It overrides the device driver owner and it is not good.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0f0ca340
  8. 28 11月, 2008 2 次提交
    • H
    • R
      Allow architectures to override copy_user_highpage() · 487ff320
      Russell King 提交于
      With aliasing VIPT cache support, the ARM implementation of
      clear_user_page() and copy_user_page() sets up a temporary kernel space
      mapping such that we have the same cache colour as the userspace page.
      This avoids having to consider any userspace aliases from this operation.
      
      However, when highmem is enabled, kmap_atomic() have to setup mappings.
      The copy_user_highpage() and clear_user_highpage() call these functions
      before delegating the copies to copy_user_page() and clear_user_page().
      
      The effect of this is that each of the *_user_highpage() functions setup
      their own kmap mapping, followed by the *_user_page() functions setting
      up another mapping.  This is rather wasteful.
      
      Thankfully, copy_user_highpage() can be overriden by architectures by
      defining __HAVE_ARCH_COPY_USER_HIGHPAGE.  However, replacement of
      clear_user_highpage() is more difficult because its inline definition
      is not conditional.  It seems that you're expected to define
      __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE and provide a replacement
      __alloc_zeroed_user_highpage() implementation instead.
      
      The allocation itself is fine, so we don't want to override that.  What
      we really want to do is to override clear_user_highpage() with our own
      version which doesn't kmap_atomic() unnecessarily.
      
      Other VIPT architectures (PARISC and SH) would also like to override
      this function as well.
      Acked-by: NHugh Dickins <hugh@veritas.com>
      Acked-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      487ff320
  9. 27 11月, 2008 5 次提交
  10. 26 11月, 2008 18 次提交