23 Jul, 2008

10 commits

  • Consumers that want to re-use their QPs in new connections need to
    know when the QP has exited the timewait state. Report the timewait
    event through the rdma_cm.

    Signed-off-by: Amir Vadai
    Acked-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Amir Vadai
     
  • Add an RDMA_CM_EVENT_ADDR_CHANGE event can be used by rdma-cm
    consumers that wish to have their RDMA sessions always use the same
    links (eg ) as the IP stack does. In the current code, this
    does not happen when bonding is used and fail-over happened but the IB
    link used by an already existing session is operating fine.

    Use the netevent notification for sensing that a change has happened
    in the IP stack, then scan the rdma-cm ID list to see if there is an
    ID that is "misaligned" with respect to the IP stack, and deliver
    RDMA_CM_EVENT_ADDR_CHANGE for this ID. The consumer can act on the
    event or just ignore it.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Or Gerlitz
     
  • When a kernel was rebuilt, the previous Module.markers was not cleared.
    It caused markers with different format strings to appear as duplicates
    when a markers was changed. This problem is present since
    scripts/mod/modpost.c started to generate Module.markers, commit
    b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

    It therefore applies to 2.6.25, 2.6.26 and linux-next.

    I merely merged the patches from Roland, Wenji and Takashi here.

    Credits to
    Roland McGrath
    Wenji Huang
    and
    Takashi Nishiie

    for providing the individual fixes.

    - Changelog :
    - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

    Signed-off-by: Mathieu Desnoyers
    Cc: Roland McGrath
    Cc: Wenji Huang
    Cc: Takashi Nishiie
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • Add missing cond_syscall() entry for compat_sys_epoll_pwait.

    Signed-off-by: Atsushi Nemoto
    Cc: Davide Libenzi
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Signed-off-by: Rajiv Andrade
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rajiv Andrade
     
  • struct pagemap_walk was placed on stack, some hooks are initialized, the
    rest (->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.

    Reported-by: Eric Sesterhenn
    Signed-off-by: Alexey Dobriyan
    Cc: "Vegard Nossum"
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Fix wrong domain attr updates, or we will always update the first sched
    domain attr.

    Signed-off-by: Miao Xie
    Cc: Hidetoshi Seto
    Cc: Paul Jackson
    Cc: Nick Piggin
    Cc: Ingo Molnar
    Cc: [2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miao Xie
     
  • Two small updates to the pcf857x driver: (a) the max732[89] chips are
    also second sources for the pcf8574/a, and (b) add a mutex to prevent
    trashing the cached state. Adding the lock is effectively a bugfix,
    although it seems unlikely that anyone would have run into the issue it
    protects against.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Maxim's MAX7301 is an SPI GPIO expander with 28 GPIOs. Note: MAX7301's
    interrupt feature is not supported yet.

    [akpm@linux-foundation.org: coding-style fixes]
    [g.liakhovetski@pengutronix.de: Fix inaccuracies in comments, check spi_setup()
    return code, mask off high byte in max7301_read()]
    Signed-off-by: Juergen Beisert
    Signed-off-by: Guennadi Liakhovetski
    Cc: Russell King
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Juergen Beisert
     
  • The Linux kernel puts the filename argument of execve() into the new
    address space. Many developers are surprised to learn this. Those who
    know and could use it, object "But it's not documented."

    Those who want to use it dislike the expression
    (char *)(1+ strlen(env[-1+ n_env]) + env[-1+ n_env])
    because it requires locating the last original environment variable,
    and assumes that the filename follows the characters.

    This patch documents the insertion of the filename, and makes it easier
    to find by adding a new tag AT_EXECFN in the ElfXX_auxv_t; see .

    In many cases readlink("/proc/self/exe",) gives the same answer. But if
    all the original pages get unmapped, then the kernel erases the symlink
    for /proc/self/exe. This can happen when a program decompressor does a
    good job of cleaning up after uncompressing directly to memory, so that
    the address space of the target program looks the same as if compression
    had never happened. One example is http://upx.sourceforge.net .

    One notable use of the underlying concept (what path containED the
    executable) is glibc expanding $ORIGIN in DT_RUNPATH. In practice for
    the near term, it may be a good idea for user-mode code to use both
    /proc/self/exe and AT_EXECFN as fall-back methods for each other.
    /proc/self/exe can fail due to unmapping, AT_EXECFN can fail because it
    won't be present on non-new systems. The auxvec or {AT_EXECFN}.d_val
    also can get overwritten, although in nearly all cases this would be the
    result of a bug.

    The runtime cost is one NEW_AUX_ENT using two words of stack space. The
    underlying value is maintained already as bprm->exec; setup_arg_pages()
    in fs/exec.c slides it for stack_shift, etc.

    Signed-off-by: John Reiser
    Cc: Roland McGrath
    Cc: Jakub Jelinek
    Cc: Ulrich Drepper
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Reiser
     

22 Jul, 2008

30 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
    usb-storage: revert DMA-alignment change for Wireless USB
    USB: use reset_resume when normal resume fails
    usb_gadget: composite cdc gadget fault handling
    usb gadget: minor USBCV fix for composite framework
    USB: Fix bug with byte order in isp116x-hcd.c fio write/read
    USB: fix double kfree in ipaq in error case
    USB: fix build error in cdc-acm for CONFIG_PM=n
    USB: remove board-specific UP2OCR configuration from pxa27x-udc
    USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
    USB: Fix pointer/int cast in USB devio code
    usb gadget: g_cdc dependso on NET
    USB: Au1xxx-usb: suspend/resume support.
    USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
    usbfs: don't store bad pointers in registration
    usbfs: fix race between open and unregister
    usbfs: simplify the lookup-by-minor routines
    usbfs: send disconnect signals when device is unregistered
    USB: Force unbinding of drivers lacking reset_resume or other methods
    USB: ohci-pnx4008: I2C cleanups and fixes
    USB: debug port converter does not accept more than 8 byte packets
    ...

    Linus Torvalds
     
  • This patch (as1110) reverts an earlier patch meant to help with
    Wireless USB host controllers. These controllers can have bulk
    maxpacket values larger than 512, which puts unusual constraints on
    the sizes of scatter-gather list elements. However it turns out that
    the block layer does not provide the support we need to enforce these
    constraints; merely changing the DMA alignment mask doesn't help.
    Hence there's no reason to keep the original patch. The Wireless USB
    problem will have to be solved a different way.

    In addition, there is a reason to get rid of the earlier patch. By
    dereferencing a pointer stored in the ep_in array of struct
    usb_device, the current code risks an invalid memory access when it
    runs concurrently with device removal. The members of that array are
    cleared before the driver's disconnect method is called, so it should
    not try to use them.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1109b) makes USB-Persist more resilient to errors. With
    the current code, if a normal resume fails, it's an unrecoverable
    error. With the patch, if a normal resume fails (and if the device is
    enabled for USB-Persist) then a reset-resume is tried.

    This fixes the problem reported in Bugzilla #10977.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • These two fixes ensure the new "CDC Composite Device" gadget
    fails cleanly when it's loaded on hardware that can't support
    this particular gadget driver.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Fill in a reserved/unused device qualifier field to ensure that
    the USBCV tests will always pass.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Lopo
     
  • URB payload data are transfered in wrong byte order on a big endinan
    architecture (AVR32).

    Signed-off-by: Julien May
    Signed-off-by: Greg Kroah-Hartman

    Julien May
     
  • in the error case the ipaq driver leaves a dangling pointer to already
    freed memory that will be freed again.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Here's the fix. cdc-wdm has the same problem. The fix is the same.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Remove the board-specific UP2OCR configuration from the
    pxa27x-udc driver.

    Signed-off-by: Daniel Ribeiro
    Signed-off-by: Greg Kroah-Hartman

    Daniel Ribeiro
     
  • A couple of USB register initializations had to be changed on MPC85xx
    platforms. This is due to the internal SoC buses being different on
    MPC83xx SoCs vs MPC85xx SoCs.

    We currently handle this via an ifdef since 83xx and 85xx are mutually
    exclusive kernel builds.

    Signed-off-by: Srikanth Srinivasan
    Signed-off-by: Kumar Gala
    Signed-off-by: Greg Kroah-Hartman

    Srikanth Srinivasan
     
  • Fix pointer/int cast in USB devio code, and thus avoid a compiler warning.

    A void* data argument passed to bus_find_device() and thence to match_devt()
    is used to carry a 32-bit datum. However, casting directly between a u32 and
    a pointer is not permitted - there must be an intermediate cast via (unsigned)
    long.

    This was introduced by the following patch:

    commit 94b1c9fa060ece2c8f080583beb6cc6008e41413
    Author: Alan Stern
    Date: Tue Jun 24 14:47:12 2008 -0400

    usbfs: simplify the lookup-by-minor routines

    This patch (as1105) simplifies the lookup-by-minor-number code in
    usbfs. Instead of passing the minor number to the callback, which
    must then reconstruct the entire dev_t value, the patch passes the
    dev_t value directly.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Signed-off-by: David Howells
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    David Howells
     
  • g_cdc needs to depend on NET, otherwise net-related build errors happen:

    ERROR: "netif_carrier_on" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "netif_carrier_off" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "netif_rx" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "free_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "register_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "print_mac" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "__alloc_skb" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "eth_type_trans" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "unregister_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "__netif_schedule" [drivers/usb/gadget/g_cdc.ko] undefined!
    ERROR: "skb_put" [drivers/usb/gadget/g_cdc.ko] undefined!

    Signed-off-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • Copy the OHCI/EHCI PM callbacks of the PCI implementation since
    they work equally well on Au1xxx hardware.

    Tested on Au1200.

    Signed-off-by: Manuel Lauss
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Manuel Lauss
     
  • - Fold multiple probe/remove callbacks into one function;
    - minor style fixes, no functional changes.

    Tested on Au1200.

    Signed-off-by: Manuel Lauss
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Manuel Lauss
     
  • This patch (as1107) fixes a small bug in the usbfs registration and
    unregistration code. It avoids leaving an error value stored in the
    device's usb_classdev field and it avoids trying to unregister a NULL
    pointer. (It also fixes a rather extreme overuse of whitespace.)

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1106) fixes a race between opening and unregistering
    device files in usbfs. The current code drops its reference to the
    device and then reacquires it, ignoring the possibility that the
    device structure might have been removed in the meantime. It also
    doesn't check whether the device is already in the NOTATTACHED state
    when the file is opened.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1105) simplifies the lookup-by-minor-number code in
    usbfs. Instead of passing the minor number to the callback, which
    must then reconstruct the entire dev_t value, the patch passes the
    dev_t value directly.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • USB device files are accessible in two ways: as files in usbfs and as
    character device nodes. The two paths are supposed to behave
    identically, but they don't. When the underlying USB device is
    unplugged, disconnect signals are sent to processes with open usbfs
    files (if they requested these signals) but not to processes with open
    device node files.

    This patch (as1104) fixes the bug by moving the disconnect-signalling
    code into a common subroutine which is called from both paths.
    Putting this subroutine in devio.c removes the only out-of-file
    reference to struct dev_state, and so the structure's declaration can
    be moved from usb.h into devio.c.

    Finally, the new subroutine performs one extra action: It kills all
    the outstanding async URBs. (I'd kill the outstanding synchronous
    URBs too, if there was any way to do it.) In the past this hasn't
    mattered much, because devices were unregistered from usbfs only
    when they were disconnected. But now the unregistration can also
    occur whenever devices are unbound from the usb_generic driver. At
    any rate, killing URBs when a device is unregistered from usbfs seems
    like a good thing to do.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1024) takes care of a FIXME issue: Drivers that don't
    have the necessary suspend, resume, reset_resume, pre_reset, or
    post_reset methods will be unbound and their interface reprobed when
    one of the unsupported events occurs.

    This is made slightly more difficult by the fact that bind operations
    won't work during a system sleep transition. So instead the code has
    to defer the operation until the transition ends.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Various cleanups and fixes to the i2c code in ohci-pnx4008:
    * Delete empty isp1301_command. The i2c driver command implementation
    is optional, so there's no point in providing an empty
    implementation.
    * Give a name to isp1301_driver. I'm surprised that i2c-core accepted
    to register this driver at all. I've chosen "isp1301_pnx" as the
    name, because it's not a generic ISP1301 driver (much like the
    isp1301_omap driver.) We might want to make the name even more
    specific (but "isp1301_ohci_pnx4008" doesn't fit.)
    * The ISP1301 is definitely not a hardware monitoring device.
    * Fix a memory leak on failure in isp1301_attach. If
    i2c_attach_client fails, the client is not registered so
    isp1301_detach is never called and the i2c_client memory is lost.
    * Use strlcpy instead of strcpy.

    Signed-off-by: Jean Delvare
    Cc: Vitaly Wool
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • USB debug port only supports 8 byte rx/tx packets. Although spec implies that
    "if a packet larger than eight bytes is received from the remote computer, the
    device must break the larger packet into eight-byte packets before sending the
    data to the Debug Port", the real PLX NET20DC device does not handle it right -
    data is corrupted on debug port end if serial interface sends >8 byte urbs.
    Patch below fixes the issue by limiting tx urb to 8 byte.

    Signed off by: Aleks Gorelov
    Signed-off-by: Greg Kroah-Hartman

    Aleksey Gorelov
     
  • cdc-acm must give up secondary interfaces if the primary is disconnected
    and vice versa. This wasn't done correctly.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • usb serial decrements the pm counter even if an interface has been
    disconnected. If it was a logical disconnect the interface may belong
    already to another driver. This patch introduces a check for disconnected
    interfaces.

    Signed-off-by: Oliver Neukum
    Cc: Stable
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • this patch implements

    - suspend/resume
    - aggressive autosuspend for the cdc-wdm driver
    - pre/post_reset

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • this patch saves power for cdc-acm devices that support remote wakeup
    while the device is connected.

    - request needs_remote_wakeup when needed
    - delayed write while a device is autoresumed
    - the device is marked busy when appropriate

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • The 28xb, as documented in comments, has the same ID's as the 28x.
    Remove the duplicated ID's from the device tables, and expand the
    comment to document this.

    Signed-off-by: Ben Collins
    Signed-off-by: Greg Kroah-Hartman

    Ben Collins
     
  • This fixes the compiler warning.

    Signed-off-by: Greg Kroah-Hartman

    Benny Halevy
     
  • fix interrupt transfer interval for Full/Low speed device.

    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Greg Kroah-Hartman

    Yoshihiro Shimoda
     
  • fix the problem that did not set IRQF_TRIGGER_ flag.

    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Greg Kroah-Hartman

    Yoshihiro Shimoda
     
  • This patch renames the existing usb_reset_device in hub.c to
    usb_reset_and_verify_device and renames the existing
    usb_reset_composite_device to usb_reset_device. Also the new
    usb_reset_and_verify_device does't need to be EXPORTED .

    The idea of the patch is that external interface driver
    should warn the other interfaces' driver of the same
    device before and after reseting the usb device. One interface
    driver shoud call _old_ usb_reset_composite_device instead of
    _old_ usb_reset_device since it can't assume the device contains
    only one interface. The _old_ usb_reset_composite_device
    is safe for single interface device also. we rename the two
    functions to make the change easily.

    This patch is under guideline from Alan Stern.

    Signed-off-by: Ming Lei

    Ming Lei