public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* two SCSI HBAs having same host no in Linux 2.4 kernel
@ 2004-03-17 14:10 N.C.Krishna Murthy
  2004-03-17 14:46 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: N.C.Krishna Murthy @ 2004-03-17 14:10 UTC (permalink / raw)
  To: SCSI -DEVELOPERS

Hi,
	In 2.4 kernel ,a scsi HBA driver gets it's host no after scsi_register() call 
returns.
The call to scsi_register is made from the driver's 'detect' routine.
scsi_register_host calls the driver's 'detect' routine.

The following is an excerpt from scsi_register_host which does the above job.
-----------------------------------------------------------------------------
if (tpnt->use_new_eh_code) {
                spin_lock_irqsave(&io_request_lock, flags);
                tpnt->present = tpnt->detect(tpnt);
                spin_unlock_irqrestore(&io_request_lock, flags);
        } else
                tpnt->present = tpnt->detect(tpnt);
-----------------------------------------------------------------------------
In case of drivers which do not support new_eh_code, 'detect' is called
without any locks. Is this SMP safe? 

We were testing our iSCSI driver on an SMP machine which had a FC HBA as well.
Both iSCSI driver and FC HBA had the same host no allocated. The behaviour
could not be reproduced consistently though. 

Please let me know in case I am missing something.


Thanx
N.C.Krishna Murthy


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

end of thread, other threads:[~2004-03-17 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-17 14:10 two SCSI HBAs having same host no in Linux 2.4 kernel N.C.Krishna Murthy
2004-03-17 14:46 ` Matthew Wilcox
2004-03-17 14:48   ` N.C.Krishna Murthy

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