13 Oct, 2014

1 commit

  • Pull vfs updates from Al Viro:
    "The big thing in this pile is Eric's unmount-on-rmdir series; we
    finally have everything we need for that. The final piece of prereqs
    is delayed mntput() - now filesystem shutdown always happens on
    shallow stack.

    Other than that, we have several new primitives for iov_iter (Matt
    Wilcox, culled from his XIP-related series) pushing the conversion to
    ->read_iter()/ ->write_iter() a bit more, a bunch of fs/dcache.c
    cleanups and fixes (including the external name refcounting, which
    gives consistent behaviour of d_move() wrt procfs symlinks for long
    and short names alike) and assorted cleanups and fixes all over the
    place.

    This is just the first pile; there's a lot of stuff from various
    people that ought to go in this window. Starting with
    unionmount/overlayfs mess... ;-/"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (60 commits)
    fs/file_table.c: Update alloc_file() comment
    vfs: Deduplicate code shared by xattr system calls operating on paths
    reiserfs: remove pointless forward declaration of struct nameidata
    don't need that forward declaration of struct nameidata in dcache.h anymore
    take dname_external() into fs/dcache.c
    let path_init() failures treated the same way as subsequent link_path_walk()
    fix misuses of f_count() in ppp and netlink
    ncpfs: use list_for_each_entry() for d_subdirs walk
    vfs: move getname() from callers to do_mount()
    gfs2_atomic_open(): skip lookups on hashed dentry
    [infiniband] remove pointless assignments
    gadgetfs: saner API for gadgetfs_create_file()
    f_fs: saner API for ffs_sb_create_file()
    jfs: don't hash direct inode
    [s390] remove pointless assignment of ->f_op in vmlogrdr ->open()
    ecryptfs: ->f_op is never NULL
    android: ->f_op is never NULL
    nouveau: __iomem misannotations
    missing annotation in fs/file.c
    fs: namespace: suppress 'may be used uninitialized' warnings
    ...

    Linus Torvalds
     

09 Oct, 2014

1 commit


30 Sep, 2014

3 commits


17 Sep, 2014

1 commit

  • When receiving USB interrupt, bulk or isochronous packet, they normally
    come in fragments. So far the driver just handed each fragment off to
    the hci_recv_fragment function of the Bluetooth core. That function is
    however so specific that is does not belong in the core. This patch
    implements the same reassembly logic in the driver.

    In addition this fixes a long standing bug where multiple complete
    packets are received within a single USB packet.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

16 Sep, 2014

2 commits


15 Sep, 2014

1 commit

  • The complete TX URB handling is done via a switch statement in the
    btusb_send_frame function. To allow for more clear separation between
    control, bulk and isoc URBs, split them into allocation and submission.

    Previously the inc_tx function has been used for tracking in-flight
    URB for HCI commands and ACL data packets. Convert that into a common
    function that either submits the URB or queues it when needed.

    This provides the flexibility to allow vendor specific hdev->send_frame
    callbacks without having to duplicate the whole URB handling logic.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

14 Sep, 2014

1 commit


09 Sep, 2014

1 commit

  • Suspend could fail for some platforms because
    btusb_suspend==> btusb_stop_traffic ==> usb_kill_anchored_urbs.

    When btusb_bulk_complete returns before system suspend and resubmits
    an URB, the system cannot enter suspend state.

    Signed-off-by: Champion Chen
    Signed-off-by: Larry Finger
    Signed-off-by: Marcel Holtmann
    Cc: stable@vger.kernel.org

    Champion Chen
     

14 Aug, 2014

6 commits

  • The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedef for
    bt3c_info_t. Also, the name of the struct is changed to drop the _t,
    to make the name look less typedef-like.

    The following Coccinelle semantic patch detects the case:

    @tn@
    identifier i;
    type td;
    @@

    -typedef
    struct i { ... }
    -td
    ;

    @@
    type tn.td;
    identifier tn.i;
    @@

    -td
    + struct i

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Marcel Holtmann

    Himangi Saraogi
     
  • The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedefs for nsh_t and
    dtl1_info_t. Also, the name of the struct is changed to drop the _t,
    to make the name look less typedef-like.

    The following Coccinelle semantic patch detects the case for dtl1_info_t
    and a similar patch finds the nsh_t case:

    @tn@
    identifier i;
    type td;
    @@

    -typedef
    struct i { ... }
    -td
    ;

    @@
    type tn.td;
    identifier tn.i;
    @@

    -td
    + struct i

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Marcel Holtmann

    Himangi Saraogi
     
  • The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedef for
    btuart_info_t. Also, the name of the struct is changed to drop the _t,
    to make the name look less typedef-like.

    The following Coccinelle semantic patch detects the case:

    @tn@
    identifier i;
    type td;
    @@

    -typedef
    struct i { ... }
    -td
    ;

    @@
    type tn.td;
    identifier tn.i;
    @@

    -td
    + struct i

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Marcel Holtmann

    Himangi Saraogi
     
  • The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedef for
    bluecard_info_t. Also, the name of the struct is changed to drop the _t,
    to make the name look less typedef-like.

    The following Coccinelle semantic patch detects the case:

    @tn@
    identifier i;
    type td;
    @@

    -typedef
    struct i { ... }
    -td
    ;

    @@
    type tn.td;
    identifier tn.i;
    @@

    -td
    + struct i

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Marcel Holtmann

    Himangi Saraogi
     
  • usb devices info:

    T: Bus=01 Lev=02 Prnt=05 Port=00 Cnt=01 Dev#= 20 Spd=12 MxCh= 0
    D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=0930 ProdID=0227 Rev= 0.02
    C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
    A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms

    Signed-off-by: Vincent Zwanenburg
    Signed-off-by: Marcel Holtmann

    Vincent Zwanenburg
     
  • In this expression: seq = (seq - 1) % 8
    seq (u8) is implicitly converted to an int in the arithmetic operation.
    So if seq value is 0, operation is ((0 - 1) % 8) => (-1 % 8) => -1.
    The new seq value is 0xff which is an invalid ACK value, we expect 0x07.
    It leads to frequent dropped ACK and retransmission.
    Fix this by using '&' binary operator instead of '%'.

    Signed-off-by: Loic Poulain
    Signed-off-by: Marcel Holtmann
    Cc: stable@vger.kernel.org

    Loic Poulain
     

31 Jul, 2014

1 commit

  • btmrvl_add_card() function calls kthread_run that might return error
    (e.g. if current thread is killed). If one tries to use the error
    value as a pointer then invalid memory access oops happens.

    Check kthread_run() return value, if it is an error then release resources
    correctly.

    TEST=boot computer with BT modules enabled. I see the error message that
    BT device initialization failed. Now kernel does not crash. Hint: to enable
    BT run 'rmmod btmrvl_sdio; modprobe btmrvl_sdio'

    Signed-off-by: Anatol Pomozov
    Signed-off-by: Marcel Holtmann

    Anatol Pomozov
     

21 Jul, 2014

1 commit

  • The Asus Z97-DELUXE motherboard contains a Broadcom based Bluetooth
    controller on the USB bus. However vendor and product ID are listed
    as ASUSTek Computer.

    T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
    D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=0b05 ProdID=17cf Rev= 1.12
    S: Manufacturer=Broadcom Corp
    S: Product=BCM20702A0
    S: SerialNumber=54271E910064
    C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

    Reported-by: Jerome Leclanche
    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

20 Jul, 2014

1 commit

  • The ath3k driver is treating the version information badly when it
    comes to loading the right firmware version and comparing that it
    actually matches with the hardware.

    Initially this showed up as this:

    CHECK drivers/bluetooth/ath3k.c
    drivers/bluetooth/ath3k.c:373:17: warning: cast to restricted __le32
    drivers/bluetooth/ath3k.c:435:17: warning: cast to restricted __le32

    However when fixing this by actually using __packed and __le32 for
    the ath3_version structure, more issues came up:

    CHECK drivers/bluetooth/ath3k.c
    drivers/bluetooth/ath3k.c:381:32: warning: incorrect type in assignment (different base types)
    drivers/bluetooth/ath3k.c:381:32: expected restricted __le32 [usertype] rom_version
    drivers/bluetooth/ath3k.c:381:32: got int [signed]
    drivers/bluetooth/ath3k.c:382:34: warning: incorrect type in assignment (different base types)
    drivers/bluetooth/ath3k.c:382:34: expected restricted __le32 [usertype] build_version
    drivers/bluetooth/ath3k.c:382:34: got int [signed]
    drivers/bluetooth/ath3k.c:386:28: warning: restricted __le32 degrades to integer
    drivers/bluetooth/ath3k.c:386:56: warning: restricted __le32 degrades to integer

    This patch fixes every instance of the firmware version handling and
    makes sure it is endian safe and uses proper unaligned access.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

19 Jul, 2014

2 commits


15 Jul, 2014

1 commit

  • We should suspend hci device and purge remaining data in tx queue
    before enabling host sleep in firmware. If any data is sent to
    firmware after host sleep is activated, firmware may end up
    sending a TX_DONE interrupt to driver. If this interrupt gets
    delivered to host while the SDIO host controller is suspending,
    it may crash the system.

    Conversely, in resume handler, we should resume hci device after
    host sleep is de-activated.

    Signed-off-by: Chin-Ran Lo
    Signed-off-by: Bing Zhao
    Signed-off-by: Marcel Holtmann

    Chin-Ran Lo
     

12 Jul, 2014

1 commit


11 Jul, 2014

2 commits


08 Jul, 2014

1 commit

  • Add support for the QCA6174 chip.

    T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 30 Spd=12 MxCh= 0
    D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=13d3 ProdID=3432 Rev=00.02
    C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
    I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

    Signed-off-by: Anantha Krishnan
    Signed-off-by: Marcel Holtmann

    Anantha Krishnan
     

07 Jul, 2014

1 commit


06 Jul, 2014

4 commits

  • The isochronous endpoints are not valid when the Intel Bluetooth
    controller boots up in bootloader mode. So just mark these endpoints
    as broken and then they will not be configured.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • The interrupt interface for the Intel USB bootloader devices is only
    enabled after receiving SetInterface(0, AltSetting=0). When this USB
    command is not send, then no HCI events will be received.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • The module parameters to ignore devices based on USB VID/PID are not
    needed at all. So just remove them.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • Intel Bluetooth devices that boot up in bootloader mode can not
    be used as generic HCI devices, but their HCI transport is still
    valuable and so bring that up as raw-only devices.

    T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 14 Spd=12 MxCh= 0
    D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=8087 ProdID=0a5a Rev= 0.00
    S: Manufacturer=Intel(R) Corporation
    S: Product=Intel(R) Wilkins Peak 2x2
    S: SerialNumber=001122334455 WP_A0
    C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
    E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

05 Jul, 2014

1 commit


04 Jul, 2014

2 commits


03 Jul, 2014

5 commits