MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Driver Entry Points                               trangetcap(9E)



NAME
     trangetcap, transetcap - get/set SCSI transport capability

SYNOPSIS
     #include 



     int prefixtrangetcap(struct scsiaddress *ap, char *cap, int whom);


     int prefixtransetcap(struct scsiaddress *ap, char *cap, int value,
          int whom);


INTERFACE LEVEL
     Solaris architecture specific (Solaris DI).

PARAMETERS
     ap        Pointer to the scsiaddress(9S) structure.


     cap       Pointer to the string capability identifier.


     value     Defines the new state of the capability.


     whom      Specifies whether all targets or only  the  speci-
               fied target is affected.


DESCRIPTION
     The  trangetcap()  and   transetcap()   vectors   in   the
     scsihbatran(9S)  structure  must be initialized during the
     HBA driver's attach(9E) to point to HBA entry points  to  be
     called  when  a  target  driver  calls scsiifgetcap(9F) and
     scsiifsetcap(9F).


     trangetcap() is called to get the current value of a  capa-
     bility  specific to features provided by the HBA hardware or
     driver.  The name of the capability cap  is  the  NUL  ter-
     minated capability string.


     If whom is non-zero, the request is for the current value of
     the  capability  defined  for  the  target  specified by the
     scsiaddress(9S) structure pointed to by ap; if whom  is  0,
     all  targets are affected; else, the target specified by the
     scsiaddress structure pointed to by ap is affected.




SunOS 5.11          Last change: 30 Aug 1995                    1






Driver Entry Points                               trangetcap(9E)



     transetcap() is called to set the value of  the  capability
     cap to the value of value. If whom is non-zero, the capabil-
     ity  should  be  set  for  the  target  specified   by   the
     scsiaddress(9S)  structure  pointed to by ap; if whom is 0,
     all targets are affected; else, the target specified by  the
     scsiaddress  structure  pointed to by ap is affected. It is
     recommended that HBA drivers do not support setting capabil-
     ities for all targets, that is, whom is 0.


     A device may support only a subset of the defined  capabili-
     ties.


     Refer to scsiifgetcap(9F) for the list of defined capabili-
     ties.


     HBA drivers should use scsihbalookupcapstr(9F)  to  match
     cap against the canonical capability strings.

RETURN VALUES
     transetcap() must return  1 if the capability was  success-
     fully  set  to  the new value, 0 if the HBA  driver does not
     support changing the capability, and  -1 if  the  capability
     was not defined.


     trangetcap() must return the current value of a  capability
     or  -1 if the capability was not defined.

SEE ALSO
     attach(9E), scsihbaattach(9F), scsihbalookupcapstr(9F),
     scsiifgetcap(9F), scsiaddress(9S), scsihbatran(9S)


     Writing Device Drivers


















SunOS 5.11          Last change: 30 Aug 1995                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™