24 Apr, 2013

2 commits

  • FW does the synchronization of the different modules during init.
    It will report different modules, that it is ready at different times.
    The fw download 'winner' will be reported fw ready first. Without this
    patch, btmrvl was already continuing before the FW told it too. Probably
    on behalf of the 'winner' which then never sees FW ready and times out.

    Signed-off-by: Andreas Fenkart
    Signed-off-by: Gustavo Padovan

    Andreas Fenkart
     
  • If not winner, driver must release the sdio host lock, so the fw
    download can progress. While holding the lock fw download is stalled
    and the following error is produced:

    [ 235.746015] Bluetooth: FW failed to be active in time!
    [ 235.752799] Bluetooth: Downloading firmware failed!

    Signed-off-by: Andreas Fenkart
    Signed-off-by: Gustavo Padovan

    Andreas Fenkart
     

19 Apr, 2013

1 commit


16 Mar, 2013

1 commit

  • The firmware images are shared with libertas_sdio WiFi chip and used to be
    in libertas/ subtree in linux-firmware. As btmrvl_sdio used to look into
    the linux-firmware root, it ended up being unsuccessful. Since the
    firmware files are not specific to the libertas hardware, they're being
    moved into mrvl/ now.

    Signed-off-by: Lubomir Rintel
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo Padovan

    Lubomir Rintel
     

11 Oct, 2012

1 commit


28 Sep, 2012

3 commits

  • Add extra check to avoid skb buffer overflow. Fixes crash below:

    [ 101.030427] ------------[ cut here ]------------
    [ 101.030459] kernel BUG at net/core/skbuff.c:127!
    [ 101.030486] invalid opcode: 0000 [#1] SMP
    ...
    [ 101.030806] Pid: 2010, comm: btmrvl_main_ser Not tainted 3.5.0+ #80 Laptop
    [ 101.030859] EIP: 0060:[] EFLAGS: 00010282 CPU: 0
    [ 101.030894] EIP is at skb_put+0x99/0xa0
    [ 101.030919] EAX: 00000080 EBX: f129380b ECX: ef923540 EDX: 00000001
    [ 101.030956] ESI: f00a4000 EDI: 00001003 EBP: ed4a5efc ESP: ed4a5ecc
    [ 101.030992] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    [ 101.031024] CR0: 8005003b CR2: 08fca014 CR3: 30960000 CR4: 000407f0
    [ 101.031062] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
    [ 101.031100] DR6: ffff0ff0 DR7: 00000400
    [ 101.031125] Process btmrvl_main_ser (pid: 2010, ti=ed4a4000 task=ef923540 task.ti=ed4a4000)
    [ 101.031174] Stack:
    [ 101.031188] c18126f8 c1651938 f853f8d2 00001003 00001003 f1292800 f1292808 f129380b
    [ 101.031250] f1292940 f00a4000 eddb1280 efc0f9c0 ed4a5f44 f853f8d2 00000040 00000000
    [ 101.031312] ef923540 c15ee096 ef923540 eddb12d4 00000004 f00a4000 00000040 00000000
    [ 101.031376] Call Trace:
    [ 101.031396] [] ? btmrvl_sdio_process_int_status+0x272/0x3d0 [btmrvl_sdio]
    [ 101.031444] [] btmrvl_sdio_process_int_status+0x272/0x3d0 [btmrvl_sdio]
    [ 101.031488] [] ? _raw_spin_unlock_irqrestore+0x36/0x70
    [ 101.031526] [] btmrvl_service_main_thread+0x244/0x300 [btmrvl]
    [ 101.031568] [] ? btmrvl_sdio_poll_card_status.isra.6.constprop.7+0x90/0x90 [btmrvl_sdio]
    [ 101.031619] [] ? try_to_wake_up+0x270/0x270
    [ 101.031648] [] ? btmrvl_process_event+0x3b0/0x3b0 [btmrvl]
    [ 101.031686] [] kthread+0x7d/0x90
    [ 101.031713] [] ? flush_kthread_work+0x150/0x150
    [ 101.031745] [] kernel_thread_helper+0x6/0x10
    ...
    [ 101.032008] EIP: [] skb_put+0x99/0xa0 SS:ESP 0068:ed4a5ecc
    [ 101.056125] ---[ end trace a0bd01d1a9a796c8 ]---

    Signed-off-by: Andrei Emeltchenko
    Signed-off-by: Gustavo Padovan

    Andrei Emeltchenko
     
  • The kernel.h macro DIV_ROUND_UP performs the computation
    (((n) + (d) - 1) / (d))

    Signed-off-by: Andrei Emeltchenko
    Signed-off-by: Gustavo Padovan

    Andrei Emeltchenko
     
  • Make code readable by correcting name from buf_block_len to num_blocks
    since it represent number of blocks; NOT a length of a block buffer.

    Signed-off-by: Andrei Emeltchenko
    Signed-off-by: Gustavo Padovan

    Andrei Emeltchenko
     

09 Sep, 2012

1 commit


07 Aug, 2012

1 commit


09 Jul, 2012

1 commit


26 Jun, 2012

1 commit


19 Jun, 2012

1 commit


05 Jun, 2012

1 commit


09 May, 2012

3 commits


10 Dec, 2011

1 commit


21 Nov, 2011

1 commit


01 Nov, 2011

1 commit


05 Oct, 2011

1 commit


13 Apr, 2011

1 commit


22 Jul, 2010

3 commits

  • Use kzalloc rather than the combination of kmalloc and memset.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression x,size,flags;
    statement S;
    @@

    -x = kmalloc(size,flags);
    +x = kzalloc(size,flags);
    if (x == NULL) S
    -memset(x, 0, size);
    //

    Signed-off-by: Julia Lawall
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Julia Lawall
     
  • When driver is sending a command or data and the firmware is also
    sending a sleep event, sometimes it is observed that driver will
    continue to send the command/data to firmware right after processing
    sleep event. Once sleep event is processed driver is not supposed to
    send anything because firmware is in sleep state after that. Previously
    interrupt processing was done in SDIO interrupt callback handler.
    Now it is done in btmrvl driver main thread to solve the
    cross-sending properly.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Marcel Holtmann

    Amitkumar Karwar
     
  • Clone checking of ret to simplify the code.

    This patch silences a compiler warning:
    drivers/bluetooth/btmrvl_sdio.c: In function ‘btmrvl_sdio_verify_fw_download’:
    drivers/bluetooth/btmrvl_sdio.c:80: warning: ‘fws1’ may be used uninitialized in this function
    drivers/bluetooth/btmrvl_sdio.c:80: note: ‘fws1’ was declared here

    Signed-off-by: Kulikov Vasiliy
    Reviewed-by: Dan Carpenter
    Signed-off-by: Marcel Holtmann

    Kulikov Vasiliy
     

10 May, 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
     

27 Feb, 2010

1 commit


04 Feb, 2010

1 commit


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
     

04 Dec, 2009

3 commits


23 Aug, 2009

7 commits