28 Apr, 2010

1 commit


06 Apr, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
    smc91c92_cs: fix the problem of "Unable to find hardware address"
    r8169: clean up my printk uglyness
    net: Hook up cxgb4 to Kconfig and Makefile
    cxgb4: Add main driver file and driver Makefile
    cxgb4: Add remaining driver headers and L2T management
    cxgb4: Add packet queues and packet DMA code
    cxgb4: Add HW and FW support code
    cxgb4: Add register, message, and FW definitions
    netlabel: Fix several rcu_dereference() calls used without RCU read locks
    bonding: fix potential deadlock in bond_uninit()
    net: check the length of the socket address passed to connect(2)
    stmmac: add documentation for the driver.
    stmmac: fix kconfig for crc32 build error
    be2net: fix bug in vlan rx path for big endian architecture
    be2net: fix flashing on big endian architectures
    be2net: fix a bug in flashing the redboot section
    bonding: bond_xmit_roundrobin() fix
    drivers/net: Add missing unlock
    net: gianfar - align BD ring size console messages
    net: gianfar - initialize per-queue statistics
    ...

    Linus Torvalds
     

02 Apr, 2010

1 commit

  • check the length of the socket address passed to connect(2).

    Check the length of the socket address passed to connect(2). If the
    length is invalid, -EINVAL will be returned.

    Signed-off-by: Changli Gao
    ----
    net/bluetooth/l2cap.c | 3 ++-
    net/bluetooth/rfcomm/sock.c | 3 ++-
    net/bluetooth/sco.c | 3 ++-
    net/can/bcm.c | 3 +++
    net/ieee802154/af_ieee802154.c | 3 +++
    net/ipv4/af_inet.c | 5 +++++
    net/netlink/af_netlink.c | 3 +++
    7 files changed, 20 insertions(+), 3 deletions(-)
    Signed-off-by: David S. Miller

    Changli Gao
     

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
     

21 Mar, 2010

3 commits

  • Added very simple check that req buffer has enough space to
    fit configuration parameters. Shall be enough to reject packets
    with configuration size more than req buffer.

    Crash trace below

    [ 6069.659393] Unable to handle kernel paging request at virtual address 02000205
    [ 6069.673034] Internal error: Oops: 805 [#1] PREEMPT
    ...
    [ 6069.727172] PC is at l2cap_add_conf_opt+0x70/0xf0 [l2cap]
    [ 6069.732604] LR is at l2cap_recv_frame+0x1350/0x2e78 [l2cap]
    ...
    [ 6070.030303] Backtrace:
    [ 6070.032806] [] (l2cap_add_conf_opt+0x0/0xf0 [l2cap]) from
    [] (l2cap_recv_frame+0x1350/0x2e78 [l2cap])
    [ 6070.043823] r8:dc5d3100 r7:df2a91d6 r6:00000001 r5:df2a8000 r4:00000200
    [ 6070.050659] [] (l2cap_recv_frame+0x0/0x2e78 [l2cap]) from
    [] (l2cap_recv_acldata+0x2bc/0x350 [l2cap])
    [ 6070.061798] [] (l2cap_recv_acldata+0x0/0x350 [l2cap]) from
    [] (hci_rx_task+0x244/0x478 [bluetooth])
    [ 6070.072631] r6:dc647700 r5:00000001 r4:df2ab740
    [ 6070.077362] [] (hci_rx_task+0x0/0x478 [bluetooth]) from
    [] (tasklet_action+0x78/0xd8)
    [ 6070.087005] [] (tasklet_action+0x0/0xd8) from []

    Signed-off-by: Andrei Emeltchenko
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Andrei Emeltchenko
     
  • Some of the debug files ended up wrongly in sysfs, because at that point
    of time, debugfs didn't exist. Convert these files to use debugfs and
    also seq_file. This patch converts all of these files at once and then
    removes the exported symbol for the Bluetooth sysfs class.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • When creating a high number of Bluetooth sockets (L2CAP, SCO
    and RFCOMM) it is possible to scribble repeatedly on arbitrary
    pages of memory. Ensure that the content of these sysfs files is
    always less than one page. Even if this means truncating. The
    files in question are scheduled to be moved over to debugfs in
    the future anyway.

    Based on initial patches from Neil Brown and Linus Torvalds

    Reported-by: Neil Brown
    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     

14 Mar, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (108 commits)
    bridge: ensure to unlock in error path in br_multicast_query().
    drivers/net/tulip/eeprom.c: fix bogus "(null)" in tulip init messages
    sky2: Avoid rtnl_unlock without rtnl_lock
    ipv6: Send netlink notification when DAD fails
    drivers/net/tg3.c: change the field used with the TG3_FLAG_10_100_ONLY constant
    ipconfig: Handle devices which take some time to come up.
    mac80211: Fix memory leak in ieee80211_if_write()
    mac80211: Fix (dynamic) power save entry
    ipw2200: use kmalloc for large local variables
    ath5k: read eeprom IQ calibration values correctly for G mode
    ath5k: fix I/Q calibration (for real)
    ath5k: fix TSF reset
    ath5k: use fixed antenna for tx descriptors
    libipw: split ieee->networks into small pieces
    mac80211: Fix sta_mtx unlocking on insert STA failure path
    rt2x00: remove KSEG1ADDR define from rt2x00soc.h
    net: add ColdFire support to the smc91x driver
    asix: fix setting mac address for AX88772
    ipv6 ip6_tunnel: eliminate unused recursion field from ip6_tnl{}.
    net: Fix dev_mc_add()
    ...

    Linus Torvalds
     

08 Mar, 2010

1 commit

  • Passing the attribute to the low level IO functions allows all kinds
    of cleanups, by sharing low level IO code without requiring
    an own function for every piece of data.

    Also drivers can extend the attributes with own data fields
    and use that in the low level function.

    This makes the class attributes the same as sysdev_class attributes
    and plain attributes.

    This will allow further cleanups in drivers.

    Full tree sweep converting all users.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

03 Mar, 2010

1 commit


01 Mar, 2010

1 commit


28 Feb, 2010

1 commit


27 Feb, 2010

4 commits

  • The Bluetooth SIG PTS test case: TC_AG_ACS_BV_10_I, rejects eSCO with
    "Unsupported Feature or Parameter Value" (0x11). This patch adds case
    for SCO fallback.

    2007-09-20 12:20:37.787747 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 38 packets 1
    2007-09-20 12:20:37.842154 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 38 voice setting 0x0060
    2007-09-20 12:20:37.847037 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
    2007-09-20 12:20:37.855233 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 38 slots 1
    2007-09-20 12:20:39.913354 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x11 handle 38 bdaddr 00:16:93:01:01:7A type eSCO
    Error: Unsupported Feature or Parameter Value
    2007-09-20 12:20:39.922629 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 38 slots 5
    2007-09-20 12:20:58.126886 < ACL data: handle 38 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 0]
    0000: 0b 53 01 b8 .S..
    2007-09-20 12:20:58.130138 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 38 packets 1

    Signed-off-by: Stephen Coe
    Signed-off-by: Marcel Holtmann

    Stephen Coe
     
  • With the Bluetooth 3.0 specification and the introduction of alternate
    MAC/PHY (AMP) support, it is required to differentiate between primary
    BR/EDR controllers and 802.11 AMP controllers. So introduce a special
    type inside HCI device for differentiation.

    For now all AMP controllers will be treated as raw devices until an
    AMP manager has been implemented.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • The output of the inquiry cache is only useful for debugging purposes
    and so move it into debugfs.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • The hdev->type is misnamed and should be actually hdev->bus instead. So
    convert it now.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     

26 Feb, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (41 commits)
    HID: usbhid: initialize interface pointers early enough
    HID: extend mask for BUTTON usage page
    HID: hid-ntrig: Single touch mode tap
    HID: hid-ntrig: multitouch cleanup and fix
    HID: n-trig: remove unnecessary tool switching
    HID: hid-ntrig add multi input quirk and clean up
    HID: usbhid: introduce timeout for stuck ctrl/out URBs
    HID: magicmouse: coding style and probe failure fixes
    HID: remove MODULE_VERSION from new drivers
    HID: fix up Kconfig entry for MagicMouse
    HID: add a device driver for the Apple Magic Mouse.
    HID: Export hid_register_report
    HID: Support for MosArt multitouch panel
    HID: add pressure support for the Stantum multitouch panel
    HID: fixed bug in single-touch emulation on the stantum panel
    HID: fix typo in error message
    HID: add mapping for "AL Network Chat" usage
    HID: use multi input quirk for TouchPack touchscreen
    HID: make full-fledged hid-bus drivers properly selectable
    HID: make Wacom modesetting failures non-fatal
    ...

    Linus Torvalds
     

13 Feb, 2010

1 commit


10 Feb, 2010

1 commit


06 Feb, 2010

1 commit

  • The report descriptor is read by user space (via the Service
    Discovery Protocol), so it is only available during the ioctl
    to connect. However, the HID probe function that needs the
    descriptor might not be called until a specific module is
    loaded. Keep a copy of the descriptor so it is available for
    later use.

    Signed-off-by: Michael Poole
    Signed-off-by: Marcel Holtmann

    Michael Poole
     

04 Feb, 2010

5 commits

  • David S. Miller
     
  • When in sniff mode with a long interval time (1.28s) it can take 4+ seconds
    to establish a SCO link. Fix by requesting active mode before requesting
    SCO connection. This improves SCO setup time to ~500ms.

    Bluetooth headsets that use a long interval time, and exhibit the long
    SCO connection time include Motorola H790, HX1 and H17. They have a
    CSR 2.1 chipset.

    Verified this behavior and fix with host Bluetooth chipsets: BCM4329 and
    TI1271.

    2009-10-13 14:17:46.183722 > HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 1 mode 0x02 interval 2048
    Mode: Sniff
    2009-10-13 14:17:53.436285 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
    2009-10-13 14:17:53.445593 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
    2009-10-13 14:17:57.788855 > HCI Event: Synchronous Connect Complete 0x2c) plen 17
    status 0x00 handle 257 bdaddr 00:1A:0E:F1:A4:7F type eSCO
    Air mode: CVSD

    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     
  • When processing a RFCOMM UA frame when the socket is closed and we were
    not the RFCOMM initiator would cause rfcomm_session_put() to be called
    twice during rfcomm_process_rx(). This would cause a kernel panic in
    rfcomm_session_close() then.

    This could be easily reproduced during disconnect with devices such as
    Motorola H270 that send RFCOMM UA followed quickly by L2CAP disconnect
    request. This trace for this looks like:

    2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
    RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
    2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
    2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
    RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
    2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
    RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
    2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
    2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
    RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
    2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041

    Avoid calling rfcomm_session_put() twice by skipping this call
    in rfcomm_recv_ua() if the socket is closed.

    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     
  • With the commit 9e726b17422bade75fba94e625cd35fd1353e682 the
    rfcomm_session_put() gets accidentially called from a timeout
    callback and results in this:

    BUG: sleeping function called from invalid context at net/core/sock.c:1897
    in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
    Pid: 0, comm: swapper Tainted: P 2.6.32 #31
    Call Trace:
    [] __might_sleep+0xf8/0xfa
    [] lock_sock_nested+0x29/0xc4
    [] lock_sock+0xb/0xd [l2cap]
    [] l2cap_sock_shutdown+0x1c/0x76 [l2cap]
    [] ? clockevents_program_event+0x75/0x7e
    [] ? tick_dev_program_event+0x37/0xa5
    [] l2cap_sock_release+0x27/0x67 [l2cap]
    [] sock_release+0x1a/0x67
    [] rfcomm_session_del+0x34/0x53 [rfcomm]
    [] rfcomm_session_put+0x14/0x16 [rfcomm]
    [] rfcomm_session_timeout+0xe/0x1a [rfcomm]
    [] run_timer_softirq+0x1e2/0x29a
    [] ? rfcomm_session_timeout+0x0/0x1a [rfcomm]
    [] __do_softirq+0xfe/0x1c5
    [] ? timer_interrupt+0x1a/0x21
    [] call_softirq+0x1c/0x28
    [] do_softirq+0x33/0x6b
    [] irq_exit+0x36/0x85
    [] do_IRQ+0xa6/0xbd
    [] ret_from_intr+0x0/0xa
    [] ? acpi_idle_enter_bm+0x269/0x294
    [] ? acpi_idle_enter_bm+0x25f/0x294
    [] ? cpuidle_idle_call+0x97/0x107
    [] ? cpu_idle+0x53/0xaa
    [] ? rest_init+0x7a/0x7c
    [] ? start_kernel+0x389/0x394
    [] ? x86_64_start_reservations+0xac/0xb0
    [] ? x86_64_start_kernel+0xe4/0xeb

    To fix this, the rfcomm_session_put() needs to be moved out of
    rfcomm_session_timeout() into rfcomm_process_sessions(). In that
    context it is perfectly fine to sleep and disconnect the socket.

    Signed-off-by: Marcel Holtmann
    Tested-by: David John

    Marcel Holtmann
     
  • General Motors carkits that use LGE BT chipsets return this error code
    when an eSCO is attempted, despite advertising eSCO support.

    2009-08-13 14:41:39.755518 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
    2009-08-13 14:41:39.757563 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
    2009-08-13 14:41:39.789484 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x1a handle 257 bdaddr 00:1E:B2:23:5E:B3 type eSCO
    Error: Unsupported Remote Feature / Unsupported LMP Feature

    Signed-off-by: Jaikumar Ganesh
    Signed-off-by: Nick Pelly
    Signed-off-by: Marcel Holtmann

    Nick Pelly
     

03 Feb, 2010

1 commit

  • In commit 2da31939a42 ("Bluetooth: Implement raw output support for HIDP
    layer"), support for Bluetooth hid_output_raw_report was added, but it
    pushes the data to the intr socket instead of the ctrl one. This has been
    fixed by 6bf8268f9a91f1 ("Bluetooth: Use the control channel for raw HID reports")

    Still, it is necessary to distinguish whether the report in question should be
    either FEATURE or OUTPUT. For this, we have to extend the generic HID API,
    so that hid_output_raw_report() callback provides means to specify this
    value so that it can be passed down to lower level hardware drivers (currently
    Bluetooth and USB).

    Based on original patch by Bastien Nocera
    Acked-by: Marcel Holtmann
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

30 Jan, 2010

3 commits


14 Jan, 2010

1 commit

  • Convert code away from ->read_proc/->write_proc interfaces. Switch to
    proc_create()/proc_create_data() which make addition of proc entries
    reliable wrt NULL ->proc_fops, NULL ->data and so on.

    Problem with ->read_proc et al is described here commit
    786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
    /proc entries"

    [akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix]
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Tilman Schmidt
    Signed-off-by: Karsten Keil
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

18 Dec, 2009

4 commits


10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

08 Dec, 2009

1 commit


04 Dec, 2009

4 commits