Skip to content

Commit

Permalink
CHROMIUM: net: wireless: bcmdhd: WARN_ON_ONCE for SD bus errors
Browse files Browse the repository at this point in the history
We want these to be noticed by crash_reporter to assess the severity
of SD errors and to observe trends, so print a warning message the first
time we see one:

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 125 at /mnt/host/source/src/third_party/kernel/v3.18/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c:1112 sdioh_buffer_tofrom_bus+0x130/0x204()
    CPU: 0 PID: 125 Comm: dhd_dpc Tainted: G     U         3.18.0 torvalds#179
    Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
    Call trace:
    [<ffffffc000207484>] dump_backtrace+0x0/0x10c
    [<ffffffc0002075a0>] show_stack+0x10/0x1c
    [<ffffffc000abbe04>] dump_stack+0x74/0xb8
    [<ffffffc00021df38>] warn_slowpath_common+0x84/0xb0
    [<ffffffc00021e054>] warn_slowpath_null+0x14/0x20
    [<ffffffc00071c724>] sdioh_buffer_tofrom_bus+0x12c/0x204
    [<ffffffc00071d850>] sdioh_request_buffer+0x1b8/0x2b0
    [<ffffffc00071b8b4>] bcmsdh_recv_buf+0xdc/0x11c
    [<ffffffc00072910c>] dhd_bcmsdh_recv_buf.constprop.21+0x68/0x88
    [<ffffffc00072beb8>] dhdsdio_readframes+0xa7c/0x1424
    [<ffffffc00072f5d8>] dhd_bus_dpc+0x7e8/0xdb0
    [<ffffffc0006db47c>] dhd_dpc_thread+0xe4/0x128
    [<ffffffc000239bc4>] kthread+0xdc/0xe8
    ---[ end trace 047fb573e2381da4 ]---
    sdioh_buffer_tofrom_bus: RX FAILED ffffffc0b9e5c820, addr=0x08000, pkt_len=128, ERR=-5

BUG=chrome-os-partner:46070
TEST=manual error injection

Change-Id: Ia3324a8974a231db045f817e6783dd39ab7da270
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/309295
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
  • Loading branch information
Kevin Cernekee authored and Dmitry Shmidt committed Nov 2, 2015
1 parent c537733 commit 2292400
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ sdioh_buffer_tofrom_bus(sdioh_info_t *sd, uint fix_inc, uint write, uint func,

sdio_release_host(sd->func[func]);

WARN_ON_ONCE(err_ret);
if (err_ret)
sd_err(("%s: %s FAILED %p, addr=0x%05x, pkt_len=%d, ERR=%d\n", __FUNCTION__,
(write) ? "TX" : "RX", buf, addr, len, err_ret));
Expand Down

0 comments on commit 2292400

Please sign in to comment.