24 Aug, 2010

2 commits


11 Aug, 2010

5 commits

  • It is very common that one altsetting may include only one iso-in or iso-out
    single endpoint, especially for high bandwidth endpoint, so support it.

    Signed-off-by: Ming Lei
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch fixes the warning below:
    [30753.755998] ------------[ cut here ]------------
    [30753.755998] WARNING: at /home/tom/git/linux-2.6/linux-2.6-next/arch/x86/include/asm/dma-mapping.h:155 hcd_buffer_free+0xb1/0xd4 [usbcore]()
    [30753.755998] Hardware name: 6475EK2
    [30753.755998] Modules linked in: uvcvideo ehci_hcd usbtest cdc_ether usbnet vfat fat usb_storage nfsd lockd nfs_acl auth_rpcgss exportfs mii tun videodev v4l1_compat v4l2_compat_ioctl32 fuse bridge stp llc sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf kvm_intel kvm arc4 ecb ath5k usbhid mac80211 snd_hda_codec_conexant ch341 usbserial ath cfg80211 thinkpad_acpi snd_hda_intel pcspkr wmi hwmon yenta_socket iTCO_wdt iTCO_vendor_support i2c_i801 e1000e snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc pata_acpi uhci_hcd ohci_hcd usbcore i915 drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded: uvcvideo]
    [30753.755998] Pid: 0, comm: swapper Tainted: G W 2.6.35-rc6-gkh-wl+ #49
    [30753.755998] Call Trace:
    [30753.755998] [] warn_slowpath_common+0x80/0x98
    [30753.755998] [] warn_slowpath_null+0x15/0x17
    [30753.755998] [] hcd_buffer_free+0xb1/0xd4 [usbcore]
    [30753.755998] [] usb_free_coherent+0x1c/0x1e [usbcore]
    [30753.755998] [] simple_free_urb+0x23/0x2f [usbtest]
    [30753.755998] [] iso_callback+0xbb/0x10f [usbtest]
    [30753.755998] [] usb_hcd_giveback_urb+0x8c/0xc0 [usbcore]
    [30753.755998] [] ehci_urb_done+0x84/0x95 [ehci_hcd]
    [30753.755998] [] ehci_work+0x41a/0x7dd [ehci_hcd]
    [30753.755998] [] ehci_irq+0x33b/0x370 [ehci_hcd]
    [30753.755998] [] ? sched_clock+0x9/0xd
    [30753.755998] [] ? sched_clock_local+0x1c/0x82
    [30753.755998] [] ? sched_clock_cpu+0xc3/0xce
    [30753.755998] [] ? trace_hardirqs_off+0xd/0xf
    [30753.755998] [] ? cpu_clock+0x43/0x5e
    [30753.755998] [] usb_hcd_irq+0x45/0xa1 [usbcore]
    [30753.755998] [] handle_IRQ_event+0x20/0xa5
    [30753.755998] [] handle_fasteoi_irq+0x92/0xd2
    [30753.755998] [] handle_irq+0x1f/0x2a
    [30753.755998] [] do_IRQ+0x57/0xbe
    [30753.755998] [] ret_from_intr+0x0/0x16
    [30753.755998] [] ? acpi_idle_enter_bm+0x231/0x269
    [30753.755998] [] ? acpi_idle_enter_bm+0x22a/0x269
    [30753.755998] [] cpuidle_idle_call+0x99/0xce
    [30753.755998] [] cpu_idle+0x61/0xaa
    [30753.755998] [] start_secondary+0x1c2/0x1c6
    [30753.755998] ---[ end trace 904cfaf7ab4cb1a2 ]---

    Signed-off-by: Ming Lei
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • All these files use the big kernel lock in a trivial
    way to serialize their private file operations,
    typically resulting from an earlier semi-automatic
    pushdown from VFS.

    None of these drivers appears to want to lock against
    other code, and they all use the BKL as the top-level
    lock in their file operations, meaning that there
    is no lock-order inversion problem.

    Consequently, we can remove the BKL completely,
    replacing it with a per-file mutex in every case.
    Using a scripted approach means we can avoid
    typos.

    file=$1
    name=$2
    if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
    sed -i '/include.*/d' ${file}
    else
    sed -i 's/include.*.*$/include /g' ${file}
    fi
    sed -i ${file} \
    -e "/^#include.*linux.mutex.h/,$ {
    1,/^\(static\|int\|long\)/ {
    /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

    } }" \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[ ]*cycle_kernel_lock();/d'
    else
    sed -i -e '/include.*\/d' ${file} \
    -e '/cycle_kernel_lock()/d'
    fi

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • And audit all the users. None needed the BKL. That was easy
    because there was only very few around.

    Tested with allmodconfig build on x86-64

    Signed-off-by: Andi Kleen
    Cc: Arnd Bergmann
    From: Andi Kleen

    Andi Kleen
     

27 Jul, 2010

1 commit


21 May, 2010

6 commits

  • Signed-off-by: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • BKL is not needed here because necessary locking is already provided
    by mutex sisusb->lock.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Greg Kroah-Hartman

    Alessio Igor Bogani
     
  • For more clearance what the functions actually do,

    usb_buffer_alloc() is renamed to usb_alloc_coherent()
    usb_buffer_free() is renamed to usb_free_coherent()

    They should only be used in code which really needs DMA coherency.

    All call sites have been changed accordingly, except for staging
    drivers.

    Signed-off-by: Daniel Mack
    Cc: Alan Stern
    Cc: Pedro Ribeiro
    Signed-off-by: Greg Kroah-Hartman

    Daniel Mack
     
  • This patch (as1350) removes all usages of coherent buffers for USB
    control-request setup-packet buffers. There's no good reason to
    reserve coherent memory for these things; control requests are hardly
    ever used in large quantity (the major exception is firmware
    transfers, and they aren't time-critical). Furthermore, only seven
    drivers used it. We might as well always use streaming DMA mappings
    for setup-packet buffers, and remove some extra complexity from
    usbcore.

    The DMA-mapping portion of hcd.c is currently in flux. A separate
    patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP
    after everything else settles down. The removal should go smoothly,
    as by then nobody will be using it.

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

    Alan Stern
     
  • Seems to me that BKL is not needed here because necessary locking is already
    provided by mutex sisusb->lock.

    Also change the returned value to long.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Greg Kroah-Hartman

    Alessio Igor Bogani
     
  • The usbcore headers: hcd.h and hub.h are shared between usbcore,
    HCDs and a couple of other drivers (e.g. USBIP modules).
    So, it makes sense to move them into a more public location and
    to cleanup dependency of those modules on kernel internal headers.
    This patch moves hcd.h from drivers/usb/core into include/linux/usb/

    Signed-of-by: Eric Lescouet
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Eric Lescouet
     

23 Apr, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

17 Mar, 2010

1 commit


03 Mar, 2010

16 commits


17 Feb, 2010

1 commit


24 Dec, 2009

3 commits

  • brightness status is reported by the Apple Cinema Displays as an
    'unsigned char' (u8) value, but the code used 'char' instead.

    Note that he driver was developed on the PowerPC architecture,
    where the two types are synonymous, which is not always the case.

    Fixed that. Otherwise the driver will interpret brightness
    levels > 127 as negative, and fail to load.

    Signed-off-by: pancho horrillo
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    pancho horrillo
     
  • Hi!

    $ lsusb -v
    Bus 001 Device 008: ID 05ac:921c Apple, Inc.
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 8
    idVendor 0x05ac Apple, Inc.
    idProduct 0x921c
    bcdDevice 1.15
    iManufacturer 1
    iProduct 2
    iSerial 0
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 34
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xe0
    Self Powered
    Remote Wakeup
    MaxPower 2mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 0 No Subclass
    bInterfaceProtocol 0 None
    iInterface 0
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.11
    bCountryCode 0 Not supported
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 92
    Report Descriptors:
    ** UNAVAILABLE **
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0008 1x 8 bytes
    bInterval 16

    Signed-off-by: pancho horrillo
    Signed-off-by: Greg Kroah-Hartman

    pancho horrillo
     
  • While converting emi62 to use request_firmware(), the driver was also
    changed to use the ihex helper functions. However, this broke the loading
    of the FPGA firmware because the code tries to access the addr field of
    the EOF record which works with a plain array that has an empty last
    record but not with the ihex helper functions where the end of the data is
    signaled with a NULL record pointer, resulting in:

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] emi62_load_firmware+0x33c/0x740 [emi62]

    This can be fixed by changing the loop condition to test the return value
    of ihex_next_binrec() directly (like in emi26.c).

    Signed-off-by: Clemens Ladisch
    Reported-and-tested-by: Der Mickster
    Acked-by: David Woodhouse
    Cc: stable
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     

12 Dec, 2009

1 commit


10 Oct, 2009

1 commit

  • Stanse found a memory leak in lcd_probe. Instead of returning without
    releasing the memory, jump to the error label which frees it.

    http://stanse.fi.muni.cz/

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

    Jiri Slaby
     

02 Oct, 2009

1 commit