James.Smart@xxxxxxxxxx wrote:
Luben,
[Jeff Garzik wrote]
* Adaptec SAS abuses Scsi_Host_Template. The host template
is a set of ops for various layers, and it is fine as an
interface. No need to avoid it.
The scsi_host_template is a set of ops for (and interface between)
exactly two layers. What is the abuse?
Neither the Host Adapter, nor the FW, implements anything which has
to do with the scsi host template. What the Host Adapter
(the hardware) and
the FW implement is access to the transport -- that' all.
So in effect the LLDD is _access to the (SAS) transport_. Cf.
the USB Storage code and SBP code.
Putting the host template back into the LLDD is a step
_backwards_, i.e. it's just a workaround, not a step forward.
This statement absolutely amazes me....
Your first comment "Host Adapter, nor the FW ..." is true of every
adapter.
The job of a Device Driver is to map between the interface presented
by the Host Adapter/FW and the interfaces of the host os. This is true
of whatever the technology is - SCSI, Ethernet, rs232, whatever.
As the current design of the scsi subsystem has SCSI-hba's attaching
via the host template - of course the LLDD will contain the host
template.
The current SCSI subsystem has "low level drivers" attaching via the
scsi_host_template ("low level" from the perspective of the SCSI
subsystem). The SCSI low level drivers
(1) provide access to a transport
and either
(2a) drive interconnect hardware
or
(2b) rely on another driver or entire subsystem which provides
access to the interconnect.
In addition, it may
(3) expose means to manage the transport and/or interconnect
infrastructure.
The scsi_host_template only fulfills a role between the SCSI subsystem's
core driver and function (1) of the SCSI low level driver. As far as I
can tell, the scsi_host_template is irrelevant to any interface used for
(2b).
In http://marc.theaimsgroup.com/?l=linux-scsi&m=112629423714248 , Luben
used the following terms:
| The infrastructure is broken into
| * SAS LLDD,
| * SAS Layer.
The SAS LLDD is not the SCSI low level driver. The SAS Layer is the SCSI
low level driver.
Similarly, usbcore and ieee1394 (together with [eou]hci_hcd, ohci1394,
pcilynx) are not SCSI low level drivers. Usb-storage and sbp2 are SCSI
low level drivers.
Whenever "LLDDs" are discussed, it should be clarified whether SCSI
LLDDs (like the SAS Layer) or other LLDDs (like the SAS LLDD) are meant,
if not apparent from context.
- of course the LLDD will contain the host template.
Yes, a SCSI LLDD does contain it. A driver of interconnect hardware does
not necessarily contain it.
--
Stefan Richter
-=====-=-=-= =-=- -====
http://arcgraph.de/sr/
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html