Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

usb_pipe_get_max_bulk_transfer_size (9F)

Name

usb_pipe_get_max_bulk_transfer_size - Get maximum bulk transfer size

Synopsis

#include <sys/usb/usba.h>

int usb_pipe_get_max_bulk_transfer_size(
dev_info_t dip, size_t *
size);

Interface Level

Solaris DDI specific (Solaris DDI)

Parameters

dip

Pointer to the device's dev_info structure.

size

Returns the bulk transfer size.

Description

The usb_pipe_get_max_bulk_transfer_size() function returns the maximum data transfer size in bytes that the host controller driver can support per bulk request. This information can be used to limit or break down larger requests to manageable sizes.

Return Values

USB_SUCCESS

Size is returned in size argument.

USB_INVALID_ARGS

dip and/or size argument is NULL.

USB_FAILURE

Size could not be returned. Zero is returned in size arg.

Context

May be called from user, kernel or interrupt context.

Examples


    int xxx_attach(dev_info_t *dip, int command)
    {
           ...
           usb_pipe_get_max_bulk_transfer_size(dip, &state>max_xfer_size);
           ...
    }

    void xxx_minphys(struct buf bp)
    {
           ...
           if (bp->b_bcount > state->max_xfer_size) {
                   bp->b_bcount = state->max_xfer_size;
           }
           ...
    }

            

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Architecture
PCI-based systems
Interface Stability
Committed
Availability
system/io/usb

See Also

attributes(7), usb_alloc_request(9F), usb_pipe_bulk_xfer(9F), usb_bulk_request(9S)