Search Linux Wireless

Re: [PATCH v6 10/10] ath10k: sdio support

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

 



Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> writes:

> From: Erik Stromdahl <erik.stromdahl@xxxxxxxxx>
>
> sdio/mailbox HIF implementation.
>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@xxxxxxxxx>
> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx>

[...]

> +static int ath10k_sdio_mbox_proc_cpu_intr(struct ath10k *ar)
> +{
> +	struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
> +	struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
> +	u8 cpu_int_status, *reg_buf;
> +	int ret;
> +
> +	mutex_lock(&irq_data->mtx);
> +	cpu_int_status = irq_data->irq_proc_reg->cpu_int_status &
> +			 irq_data->irq_en_reg->cpu_int_status_en;
> +	if (!cpu_int_status) {
> +		ath10k_warn(ar, "CPU interrupt status is zero\n");
> +		return -EIO;
> +	}
> +
> +	/* Clear the interrupt */
> +	irq_data->irq_proc_reg->cpu_int_status &= ~cpu_int_status;
> +
> +	/* Set up the register transfer buffer to hit the register 4 times ,
> +	 * this is done to make the access 4-byte aligned to mitigate issues
> +	 * with host bus interconnects that restrict bus transfer lengths to
> +	 * be a multiple of 4-bytes.
> +	 */
> +	reg_buf = kzalloc(4, GFP_KERNEL);
> +	if (!reg_buf)
> +		return -ENOMEM;

kbuild bot reported that I failed to release the mutex in these two
return cases above, I'll fix that in v7.

-- 
Kalle Valo



[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