brcmsmac: Add tracepoint for macintstatus
Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
cdf4352f5c
commit
e3c0d8a6f6
|
@ -85,6 +85,26 @@ TRACE_EVENT(brcms_dpc,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(brcms_macintstatus,
|
||||||
|
TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,
|
||||||
|
u32 mask),
|
||||||
|
TP_ARGS(dev, in_isr, macintstatus, mask),
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__string(dev, dev_name(dev))
|
||||||
|
__field(int, in_isr)
|
||||||
|
__field(u32, macintstatus)
|
||||||
|
__field(u32, mask)
|
||||||
|
),
|
||||||
|
TP_fast_assign(
|
||||||
|
__assign_str(dev, dev_name(dev));
|
||||||
|
__entry->in_isr = in_isr;
|
||||||
|
__entry->macintstatus = macintstatus;
|
||||||
|
__entry->mask = mask;
|
||||||
|
),
|
||||||
|
TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev),
|
||||||
|
__entry->in_isr, __entry->macintstatus, __entry->mask)
|
||||||
|
);
|
||||||
|
|
||||||
#undef TRACE_SYSTEM
|
#undef TRACE_SYSTEM
|
||||||
#define TRACE_SYSTEM brcmsmac_tx
|
#define TRACE_SYSTEM brcmsmac_tx
|
||||||
|
|
||||||
|
|
|
@ -2552,13 +2552,13 @@ static inline u32 wlc_intstatus(struct brcms_c_info *wlc, bool in_isr)
|
||||||
{
|
{
|
||||||
struct brcms_hardware *wlc_hw = wlc->hw;
|
struct brcms_hardware *wlc_hw = wlc->hw;
|
||||||
struct bcma_device *core = wlc_hw->d11core;
|
struct bcma_device *core = wlc_hw->d11core;
|
||||||
u32 macintstatus;
|
u32 macintstatus, mask;
|
||||||
|
|
||||||
/* macintstatus includes a DMA interrupt summary bit */
|
/* macintstatus includes a DMA interrupt summary bit */
|
||||||
macintstatus = bcma_read32(core, D11REGOFFS(macintstatus));
|
macintstatus = bcma_read32(core, D11REGOFFS(macintstatus));
|
||||||
|
mask = in_isr ? wlc->macintmask : wlc->defmacintmask;
|
||||||
|
|
||||||
brcms_dbg_int(core, "wl%d: macintstatus: 0x%x\n", wlc_hw->unit,
|
trace_brcms_macintstatus(&core->dev, in_isr, macintstatus, mask);
|
||||||
macintstatus);
|
|
||||||
|
|
||||||
/* detect cardbus removed, in power down(suspend) and in reset */
|
/* detect cardbus removed, in power down(suspend) and in reset */
|
||||||
if (brcms_deviceremoved(wlc))
|
if (brcms_deviceremoved(wlc))
|
||||||
|
@ -2571,7 +2571,7 @@ static inline u32 wlc_intstatus(struct brcms_c_info *wlc, bool in_isr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* defer unsolicited interrupts */
|
/* defer unsolicited interrupts */
|
||||||
macintstatus &= (in_isr ? wlc->macintmask : wlc->defmacintmask);
|
macintstatus &= mask;
|
||||||
|
|
||||||
/* if not for us */
|
/* if not for us */
|
||||||
if (macintstatus == 0)
|
if (macintstatus == 0)
|
||||||
|
|
Loading…
Reference in New Issue