public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] drivers/scsi/psi240i.c - io_request_lock fix
@ 2002-01-09 13:28 Adam J. Richter
  2002-01-09 13:52 ` Morten Helgesen
  0 siblings, 1 reply; 6+ messages in thread
From: Adam J. Richter @ 2002-01-09 13:28 UTC (permalink / raw)
  To: admin; +Cc: axboe, dougg, linux-kernel

>> = Morten Helgesen
>  = Douglas Gilbert

>From the look of this line in the patch:
>> +       struct Scsi_Host *host = PsiHost[irq - 10];
>
>It will work if the first controller is allocated irq 10,
>the second one irq 11, etc.   Unlikely ...

	No, I think Morten has the use of PsiHost right.  The
entries in PsiHost are apparently stored by IRQ.  It is not generally
the case that the first controller is at PsiHost[0], the second at
PsiHost[1], etc.

	I agree with Jens in that the practice is rather ugly, but that
is the way the driver worked before io_request_lock disappeared and
I think that improving that stylistic issue is not a prerequisite
for conversion from io_request_lock to host->host_lock.

	If I were you, Morten, I would go ahead with your patch
that makes the minimal changes and then, if you want, make stylistic
improvements as one or more separate patches, which are something
that you may want to talk over with the mainter of that driver, if
there currently is one.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] drivers/scsi/psi240i.c - io_request_lock fix
@ 2002-01-08 14:07 Morten Helgesen
  2002-01-09  1:09 ` Douglas Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Morten Helgesen @ 2002-01-08 14:07 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, linux-scsi

Hey Linus and the rest of you.

A simple fix for the io_request_lock issue leftovers in drivers/scsi/psi240i.c. 
Not tested, but compiles. Diffed against 2.5.2-pre10. Please apply.


== Morten

-- 

"Det er ikke lett å være menneske" - sitat fra en klok person.

mvh
Morten Helgesen 
UNIX System Administrator & C Developer 
Nextframe AS
admin@nextframe.net / 93445641
http://www.nextframe.net


--- vanilla-linux-2.5.2-pre10/drivers/scsi/psi240i.c    Tue Jan  8 10:57:31 2002
+++ patched-linux-2.5.2-pre10/drivers/scsi/psi240i.c    Tue Jan  8 14:48:56 2002
@@ -370,10 +370,11 @@
 static void do_Irq_Handler (int irq, void *dev_id, struct pt_regs *regs)
        {
        unsigned long flags;
+       struct Scsi_Host *host = PsiHost[irq - 10]; 
 
-       spin_lock_irqsave(&io_request_lock, flags);
+       spin_lock_irqsave(&host->host_lock, flags);
        Irq_Handler(irq, dev_id, regs);
-       spin_unlock_irqrestore(&io_request_lock, flags);
+       spin_unlock_irqrestore(&host->host_lock, flags);
        }
 /****************************************************************
  *     Name:   Psi240i_QueueCommand


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

end of thread, other threads:[~2002-01-09 13:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-09 13:28 [PATCH] drivers/scsi/psi240i.c - io_request_lock fix Adam J. Richter
2002-01-09 13:52 ` Morten Helgesen
  -- strict thread matches above, loose matches on Subject: below --
2002-01-08 14:07 Morten Helgesen
2002-01-09  1:09 ` Douglas Gilbert
2002-01-09 10:46   ` Jens Axboe
2002-01-09 11:07     ` Morten Helgesen

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