• Wey-Yi Guy's avatar
    iwlwifi: add continuous uCode event log capability · a9e1cb6a
    Wey-Yi Guy authored
    In order to help uCode debugging, adding the capability to provide
    continuous uCode event logging function.
    uCode events is located in round-robin event queue and filled by uCode,
    by enable continuous event logging, driver check the write pointer
    and log the newly added events in iwl_bg_ucode_trace() timer function.
    There is still possibility of missing events if event queue being
    wrapped before next event dump; but with this capability, we can have
    much better understanding of the uCode behavior during runtime; it can
    help to debug the uCode related issues.
    Methods to enable/disable the continuous event log:
    step 1: enable ucode trace timer
         "echo 1 >
    step 2: start ftrace
         sudo ./trace-cmd record -e iwlwifi_ucode:* sleep 1d
    step 3: stop ftrace
         sudo ./trace-cmd report trace.dat
    step 4: disable ucode trace timer
         "echo 0 >
    use "ucode_tracing" debugfs file to display number of event
    queue wrapped when driver attempt the continuous event logging. If event
    queue being wrapped more than once when driver has opportunity to log
    the event; it indicated there are events missing in the event log trace.
    This continuous event log function only available for 4965 and newer
    Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
    Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>