Skip to contentSkip to conversation

scsi_add_host() context

DISCUSSION Douglas Gilbert 2 participants 2 messages Nov 18, 2002 – Nov 19, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

While examining the various calls in the mid level that can be called from a LLD, most are designed to be called from an interrupt or related context (e.g. scsi_adjust_queue_depth() ).

However, the detection of a new host requires a LLD to call scsi_register() and scsi_add_host(). The latter call does a SCSI bus scan which takes time and sends commands like
INQUIRY and REPORT_LUNS back through the LLD. So scsi_add_host()
should not be called from an interrupt context. Can this be
guaranteed in a hotplug environment? Is a worker thread
required?

Doug Gilbert

#1 lore raw
Quoted 5 lines · Douglas Gilbert

While examining the various calls in the mid level that can be called from a LLD, most are designed to be called from an interrupt or related context (e.g. scsi_adjust_queue_depth() ).

Quoted 7 lines

However, the detection of a new host requires a LLD to call scsi_register() and scsi_add_host(). The latter call does a SCSI bus scan which takes time and sends commands like INQUIRY and REPORT_LUNS back through the LLD. So scsi_add_host() should not be called from an interrupt context. Can this be guaranteed in a hotplug environment? Is a worker thread required?

For the driver model ->probe is defined to run in process context, yes.