Search Linux Wireless

Re: [PATCH 4/7] wil6210: improve debug for WMI receive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-05-27 at 14:45 +0300, Vladimir Kondratiev wrote:
> Print error if no events received. This should not happen.
> If it is, it points to the problem in firmware.
> 
> Print information as soon as possible - mbox pointers and
> event header right after reading it. This helps to identify potential
> problem with memory allocation for the event buffer.
[]
> diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
[]
> @@ -658,21 +658,27 @@ void wmi_recv_cmd(struct wil6210_priv *wil)
[]
> 	for (;;) {
> +	for (n = 0;; n++) {
>  		u16 len;
>  
>  		r->head = ioread32(wil->csr + HOST_MBOX +
>  				   offsetof(struct wil6210_mbox_ctl, rx.head));
> -		if (r->tail == r->head)
> +		if (r->tail == r->head) {
> +			if (n == 0)
> +				wil_err(wil, "No events?\n");

This error message might be expanded a bit to describe
a bit more about what to do: report to you, turn on
event debugging, update firmware, etc...


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux