Re: [PATCH] drivers/scsi/psi240i.c - io_request_lock fix

Jens Axboe (axboe@suse.de)
Wed, 9 Jan 2002 11:46:38 +0100


On Tue, Jan 08 2002, Douglas Gilbert wrote:
> Morten Helgesen wrote:
> >
> > 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,
> There is a bit more involved than just switching
> io_request_lock to host_lock. The former is global
> so it could be called from anywhere.
>
> >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 ...

Irk yes, that is very ugly! And it's even used currently in the driver
as well. How about passing the scsi host as device_id for the isr
instead?

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/