public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add missing spin_unlock_irq to ide.c (244ac16)
@ 2001-05-25 20:59 Rasmus Andersen
  2001-05-25 21:11 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus Andersen @ 2001-05-25 20:59 UTC (permalink / raw)
  To: linux-kernel

(I forgot to cc l-k on this one when it went to andre.)

Hi.

This patch adds a spin_unlock_irqsave to ide_spin_wait_hwgroup as
reported by the Stanford team way back. It applies against 244ac16.


--- linux-244-ac16-clean/drivers/ide/ide.c	Fri May 25 21:11:08 2001
+++ linux-244-ac16/drivers/ide/ide.c	Fri May 25 22:46:43 2001
@@ -2362,6 +2362,8 @@
 		__restore_flags(lflags);	/* local CPU only */
 		spin_lock_irq(&io_request_lock);
 	}
+
+        spin_unlock_irq(&io_request_lock);
 	return 0;
 }
 
-- 
        Rasmus(rasmus@jaquet.dk)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add missing spin_unlock_irq to ide.c (244ac16)
  2001-05-25 20:59 [PATCH] Add missing spin_unlock_irq to ide.c (244ac16) Rasmus Andersen
@ 2001-05-25 21:11 ` Jens Axboe
  2001-05-25 21:17   ` Rasmus Andersen
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2001-05-25 21:11 UTC (permalink / raw)
  To: Rasmus Andersen; +Cc: linux-kernel

On Fri, May 25 2001, Rasmus Andersen wrote:
> (I forgot to cc l-k on this one when it went to andre.)
> 
> Hi.
> 
> This patch adds a spin_unlock_irqsave to ide_spin_wait_hwgroup as
> reported by the Stanford team way back. It applies against 244ac16.
> 
> 
> --- linux-244-ac16-clean/drivers/ide/ide.c	Fri May 25 21:11:08 2001
> +++ linux-244-ac16/drivers/ide/ide.c	Fri May 25 22:46:43 2001
> @@ -2362,6 +2362,8 @@
>  		__restore_flags(lflags);	/* local CPU only */
>  		spin_lock_irq(&io_request_lock);
>  	}
> +
> +        spin_unlock_irq(&io_request_lock);
>  	return 0;
>  }

This isn't right. Granted the locking isn't straight forward here, but
take a look at ide_write_setting -> ide_spin_wait_hwgroup and the
latters return value.

BTW, also try and follow local style when making such changes.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add missing spin_unlock_irq to ide.c (244ac16)
  2001-05-25 21:11 ` Jens Axboe
@ 2001-05-25 21:17   ` Rasmus Andersen
  0 siblings, 0 replies; 3+ messages in thread
From: Rasmus Andersen @ 2001-05-25 21:17 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

On Fri, May 25, 2001 at 11:11:23PM +0200, Jens Axboe wrote:
[...] 
> This isn't right. Granted the locking isn't straight forward here, but
> take a look at ide_write_setting -> ide_spin_wait_hwgroup and the
> latters return value.
 
Yes, Andre set me straight here. My apologies for being lazy and
not checking the call path.

-- 
        Rasmus(rasmus@jaquet.dk)

You know how dumb the average guy is?  Well, by  definition, half
of them are even dumber than that.
            -- J.R. "Bob" Dobbs 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-25 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-25 20:59 [PATCH] Add missing spin_unlock_irq to ide.c (244ac16) Rasmus Andersen
2001-05-25 21:11 ` Jens Axboe
2001-05-25 21:17   ` Rasmus Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox