• James Bottomley's avatar
    add a generic device transport class · 14cb343c
    James Bottomley authored
    Transport classes are a mechanism for providing transport specific
    services to drivers that the more generic command processing layers
    don't care about.  A good example is the SCSI mid-layer not caring about
    parallel transfer characteristics or providing services for domain
    validation.  Transport classes usually provide a transport specific API
    at one end and a class interface at the other (for the user to
    interrogate and set parameters).
    
    Originally, transport classes were SCSI specific.  However, this code is
    generic to the device model.  As long as you have a generic device
    representing a storage interface (or device) then you can attach a
    transport class to it.  The new code also allows an arbitrary number of
    transport classes to be attached to a device, unlike SCSI which only
    allowed one.  This is going to be important for things like SATA and SAS
    which share the PHY layer (and hence should be capable of sharing a PHY
    transport class).
    
    The generic transport class is designed to operate identically to the
    current SCSI transport classes, except that it uses generic devices
    rather than SCSI devices.
     
    We have five events:
     
     setup
     add
     -----
     configure
     -----
     remove
     destroy
    
    With callbacks for setup configure and remove.
    
    There's also an anonymous transport class which can only respond to 
    configure events (and which has no attributes).
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    14cb343c
transport_class.c 8.74 KB