All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Amol Lad <amol@verismonetworks.com>
Cc: James.Bottomley@steeleye.com,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/scsi/mca_53c9x.c : save_flags()/cli() removal
Date: Tue, 7 Nov 2006 12:53:29 -0800	[thread overview]
Message-ID: <20061107125329.6dc4eb53.akpm@osdl.org> (raw)
In-Reply-To: <1162816931.22062.132.camel@amol.verismonetworks.com>

On Mon, 06 Nov 2006 18:12:11 +0530
Amol Lad <amol@verismonetworks.com> wrote:

> Replaced save_flags()/cli() with spin_lock alternatives
> 
> Signed-off-by: Amol Lad <amol@verismonetworks.com>
> ---
> Andrew, 
> Please add this to -mm
> ---
> --- linux-2.6.19-rc4-orig/drivers/scsi/mca_53c9x.c	2006-08-24 02:46:33.000000000 +0530
> +++ linux-2.6.19-rc4/drivers/scsi/mca_53c9x.c	2006-11-06 18:03:22.000000000 +0530
> @@ -341,9 +341,7 @@ static void dma_init_read(struct NCR_ESP
>  {
>  	unsigned long flags;
>  
> -
> -	save_flags(flags);
> -	cli();
> +	spin_lock_irqsave(esp->ehost->host_lock, flags);
>  
>  	mca_disable_dma(esp->dma);
>  	mca_set_dma_mode(esp->dma, MCA_DMA_MODE_XFER | MCA_DMA_MODE_16 |
> @@ -352,16 +350,14 @@ static void dma_init_read(struct NCR_ESP
>  	mca_set_dma_count(esp->dma, length / 2); /* !!! */
>  	mca_enable_dma(esp->dma);
>  
> -	restore_flags(flags);
> +	spin_unlock_irqrestore(esp->ehost->host_lock, flags);
>  }
>  
>  static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length)
>  {
>  	unsigned long flags;
>  
> -
> -	save_flags(flags);
> -	cli();
> +	spin_lock_irqsave(esp->ehost->host_lock, flags);
>  
>  	mca_disable_dma(esp->dma);
>  	mca_set_dma_mode(esp->dma, MCA_DMA_MODE_XFER | MCA_DMA_MODE_WRITE |
> @@ -370,7 +366,7 @@ static void dma_init_write(struct NCR_ES
>  	mca_set_dma_count(esp->dma, length / 2); /* !!! */
>  	mca_enable_dma(esp->dma);
>  
> -	restore_flags(flags);
> +	spin_unlock_irqrestore(esp->ehost->host_lock, flags);
>  }
>  
>  static void dma_ints_off(struct NCR_ESP *esp)

hm.  How do we find out if this works?

If it _does_ work then we can now remove the Kconfig BROKEN_ON_SMP dependency
for this driver.


  reply	other threads:[~2006-11-07 20:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 12:42 [PATCH] drivers/scsi/mca_53c9x.c : save_flags()/cli() removal Amol Lad
2006-11-07 20:53 ` Andrew Morton [this message]
2006-11-08  0:19   ` James Bottomley
2006-11-08  5:36     ` Amol Lad
2006-11-08 15:36     ` Alan Cox
2006-11-07 22:29 ` Christoph Hellwig
2006-11-08  5:26   ` Amol Lad
  -- strict thread matches above, loose matches on Subject: below --
2006-11-07  6:51 Amol Lad
2006-10-16  6:49 [PATCH] drivers/scsi/mca_53c9x.c: " Amol Lad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061107125329.6dc4eb53.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=James.Bottomley@steeleye.com \
    --cc=amol@verismonetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.