16 Sep, 2009

1 commit


25 Aug, 2009

2 commits

  • This patch adds support of USB autosuspend to the btusb driver.

    If the device doesn't support remote wakeup, simple support based on
    up/down is provided. If the device supports remote wakeup, additional
    support for autosuspend while the interface is up is provided. This is
    done by queueing URBs in an anchor structure and waking the device up
    from a work queue on sending. Reception triggers remote wakeup.

    The last busy facility of the USB autosuspend code is used. To close
    a race between autosuspend and transmission, a counter of ongoing
    transmissions is maintained.

    Add #ifdefs for CONFIG_PM as necessary.

    Signed-off-by: Oliver Neukum
    Tested-by: Sarah Sharp
    Signed-off-by: Marcel Holtmann

    Oliver Neukum
     
  • The error message "Removed only %u out of %u pkts" is printed when multiple
    to be acked packets are queued.

    if (i++ >= pkts_to_be_removed)
    break;

    This will break out of the loop and increase the counter i when
    i==pkts_to_be_removed and the loop ends up with i=pkts_to_be_removed+1.

    The following line

    if (i != pkts_to_be_removed) {
    BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed);
    }

    will then display the false message.

    The counter i must not increase on the same statement.

    Signed-off-by: Wending Weng
    Signed-off-by: Marcel Holtmann

    Wending Weng
     

23 Aug, 2009

17 commits


13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

15 Jun, 2009

1 commit


14 Jun, 2009

1 commit


11 Jun, 2009

2 commits

  • Bluetooth shouldn't be doing this as most drivers don't support the flag,
    furthermore it shouldn't be needed with newer buffering. This becomes rather
    more visible as the locking fixes make the abuse of low_latency visible as
    spew on the users console/dmesg.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • There are several pretty much unfixable races in the old ldisc code, especially
    with respect to pty behaviour and also to hangup. It's easier to rewrite the
    code than simply try and patch it up.

    This patch
    - splits the ldisc from the tty (so we will be able to refcount it more cleanly
    later)
    - introduces a mutex lock for ldisc changing on an active device
    - fixes the complete mess that hangup caused
    - implements hopefully correct setldisc/close/hangup locking

    There are still some problems around pty pairs that have always been there but
    at least it is now possible to understand the code and fix further problems.

    This fixes the following known bugs
    - hang up can leak ldisc references
    - hang up may not call open/close on ldisc in a matched way
    - pty/tty pairs can deadlock during an ldisc change
    - reading the ldisc proc files can cause every ldisc to be loaded

    and probably a few other of the mysterious ldisc race reports.

    I'm sure it also adds the odd new one.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

08 Jun, 2009

4 commits


27 Feb, 2009

3 commits


30 Nov, 2008

8 commits

  • 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: Marcel Holtmann

    Marcel Holtmann
     
  • This patch allows the Asus WL-BTD202 dongle to be used with a mono
    headset without having to specify "options btusb force_scofix=1".

    Based on a patch from Guillaume Bedot

    Signed-off-by: Marcel Holtmann

    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: Marcel Holtmann

    Marcel Holtmann
     
  • The old hci_usb driver has been fully replaced with the new btusb driver
    and all major distributions switched to the new driver now. This removes
    it since it should not be used at all anymore.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • Following the pattern from hci_*.c, turn off BT_DBG messages unless
    they have been requested via HCI_UART_DEBUG

    Signed-off-by: Nick Pelly
    Acked-by: Brian Swetland
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     
  • Since size, addr, fcs, and tmp are unsigned, it would seem better to use
    simple_strtoul that simple_strtol.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://www.emn.fr/x-info/coccinelle/)

    //
    @r2@
    long e;
    position p;
    @@

    e = simple_strtol@p(...)

    @@
    position p != r2.p;
    type T;
    T e;
    @@

    e =
    - simple_strtol@p
    + simple_strtoul
    (...)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Marcel Holtmann

    Julia Lawall
     
  • This patch fixes accumulating of the header in case packet was requeued
    in the error path.

    Signed-off-by: Tomas Winkler
    Signed-off-by: Marcel Holtmann

    Tomas Winkler
     
  • During suspend it is important that all URBs are cancelled and then on
    resume re-submitted. This gives initial suspend/resume support.

    Based on initial work from Oliver Neukum

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann