lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Sep 2010 10:53:41 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Yong Wang <yong.y.wang@...ux.intel.com>
Cc:	David Brownell <dbrownell@...rs.sourceforge.net>,
	Feng Tang <feng.tang@...el.com>,
	George Shore <george@...rgeshore.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jean-Hugues Deschenes <jean-hugues.deschenes@...asic.com>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dw_spi: Allow interrupt sharing

On Tue, Sep 07, 2010 at 03:27:27PM +0800, Yong Wang wrote:
> Allow interrupt sharing since exclusive interrupt line for
> DW SPI controller is not provided on every platform.
> 
> Signed-off-by: Yong Wang <yong.y.wang@...el.com>
> ---
>  drivers/spi/dw_spi.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
> index d256cb0..11fbbf6 100644
> --- a/drivers/spi/dw_spi.c
> +++ b/drivers/spi/dw_spi.c
> @@ -396,6 +396,11 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)
>  static irqreturn_t dw_spi_irq(int irq, void *dev_id)
>  {
>  	struct dw_spi *dws = dev_id;
> +	u16 irq_status, irq_mask = 0x3f;
> +
> +	irq_status = dw_readw(dws, isr) & irq_mask;
> +	if (!irq_status)
> +		return IRQ_NONE;

To be more concise, this could have simply been:

if (!dw_readw(dws, isr) & 0x3f)
	return IRQ_NONE;

... but I'm nitpicking here.  If I don't get an updated version of
this patch from you in the next few days then I'll apply this one.

g.

>  
>  	if (!dws->cur_msg) {
>  		spi_mask_intr(dws, SPI_INT_TXEI);
> @@ -883,7 +888,7 @@ int __devinit dw_spi_add_host(struct dw_spi *dws)
>  	dws->dma_inited = 0;
>  	dws->dma_addr = (dma_addr_t)(dws->paddr + 0x60);
>  
> -	ret = request_irq(dws->irq, dw_spi_irq, 0,
> +	ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED,
>  			"dw_spi", dws);
>  	if (ret < 0) {
>  		dev_err(&master->dev, "can not get IRQ\n");
> -- 
> 1.5.5.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ