MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers
                            usbgetmaxpktsperisocrequest(9F)



NAME
     usbgetmaxpktsperisocrequest - Get  maximum  number  of
     packets allowed per isochronous request

SYNOPSIS
     #include 



     uintt usbgetmaxpktsperisocrequest(devinfot *dip);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI)

PARAMETERS
     dip    Pointer to the device's devinfo structure.


DESCRIPTION
     The usbgetmaxpktsperisocrequest() function returns the
     maximum  number  of isochronous packets per request that the
     host control driver can support. This number can be used  to
     determine the maximum amount of data which can be handled by
     a single isochronous request. That length is found by:

       max = usbgetmaxpktsperisocrequest(dip) * endpointmaxpacketsize;



     where endpointmaxpacketsize is the  wMaxPacketSize  field
     of  the  isochronous  endpoint  over which the transfer will
     take place.

RETURN VALUES
     On  success,  the  usbgetcurrentframenumber()   function
     returns  the maximum number of isochronous pkts per request.
     On failure it returns 0. The function fails if dip is NUL.

CONTEXT
     May be called from user, kernel or interrupt context.

EXAMPLES
       /*
        * Set up to receive periodic isochronous data, requesting
        * the maximum amount for each transfer.
        */

       int pkt;
       /* Get max packet size from endpoint descriptor. */
       uintt epmaxpktsize = epdescr.wMaxPacketSize;



SunOS 5.11           Last change: 5 Jan 2004                    1






Kernel Functions for Drivers
                            usbgetmaxpktsperisocrequest(9F)



       uintt isocpktscount = usbgetmaxpktsperisocrequest(dip);

       /*
        * Allocate an isoc request, specifying the max number of packets
        * and the greatest size transfer possible.
        */
       usbisocreqt *isocreq = usballocisocreq(dip,
           isocpktscount,
           isocpktscount * epmaxpktsize,
           USBFLAGSLEP);

       /* Init each packet descriptor for maximum size. */
       for (pkt = 0; pkt < isocpktscount; pkt]) {
           isocreq->isocpktdescr[pkt].isocpktlength = epmaxpktsize;

       }


       /* Set the length of a packet in the request too. */
       isocreq->isocpktslength = epmaxpktsize;

       /* Other isoc request initialization. */
       ...
       ...

       if (usbpipeisocxfer(pipe, isocreq, USBFLAGSNOSLEP) != USBSUCES) {
           ...
       }


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:





















SunOS 5.11           Last change: 5 Jan 2004                    2






Kernel Functions for Drivers
                            usbgetmaxpktsperisocrequest(9F)




           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Architecture                 PCI-based systems           
    
     Interface stability          Committed                   
    
     Availability                 SUNWusb                     
    


SEE ALSO
     attributes(5),                       usbpipeisocxfer(9F),
     usballocrequest(9F),     usbgetcurrentframenumber(9F).
     usbepdescr(9S), usbisocrequest(9S)







































SunOS 5.11           Last change: 5 Jan 2004                    3






Kernel Functions for Drivers
                            usbgetmaxpktsperisocrequest(9F)






















































SunOS 5.11           Last change: 5 Jan 2004                    4






OpenSolaris man pages main menu

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