scsi_mid_low_api.txt in lk 2.5.72+
PATCH 1/1 scsi_mid_low_api.txt in lk 2.5.72+
The scsi_mid_low_api.txt file describes the interface between the SCSI mid level and a low level driver, seen from the latter's perspective. It is found in the kernel source in the Documentation/scsi directory.
The attachment incorporates a patch sent to me by Christoph and ideas in Mike Anderson's refcounting document (url?).
It anticipates various patches that Christoph has sent to this list being accepted. These include:
- addition of scsi_host_alloc()
- renaming of struct SHT to struct scsi_host_template
The attachment (gzipped due to its size) is a diff against lk 2.5.72 . A gzipped version of the document can be found at:
http://www.torque.net/scsi/scsi_mid_low_api.txt.gz
Idea: perhaps scsi_add_host() could have an extra argument to inhibit the scsi device scan (or alternatively a new field in struct scsi_host_template and struct Scsi_Host). Then LLDs that know about their devices hot (un)plugging can use scsi_add_device() and scsi_remove_device() at their leisure. [Actually ieee1394/sbp2.c is already doing this ...]
Comments and corrections welcome.
Doug Gilbert
Quoted 4 lines · Douglas Gilbert
It anticipates various patches that Christoph has sent to this list being accepted. These include:
- addition ofscsi_host_alloc()
- renaming of struct SHT to structscsi_host_template
This seems to be in now. I'll also send you another update once the header reorgansization is finished.
Quoted 6 lines
Idea: perhaps
scsi_add_host()could have an extra argument to inhibit the scsi device scan (or alternatively a new field in structscsi_host_templateand structScsi_Host). Then LLDs that know about their devices hot (un)plugging can usescsi_add_device()andscsi_remove_device()at their leisure. [Actuallyieee1394/sbp2.cis already doing this ...]
I though about this already but maybe the cleaner interface would be to remove the call to scsi_scan_host from scsi_add_host and let drivers that want it do it themselves. (and the same for scsi_forget_host in scsi_remove_host)