USB_PIPE_GET_MAX_BULK_TRANSFER_SIZE(9F) | Kernel Functions for Drivers | USB_PIPE_GET_MAX_BULK_TRANSFER_SIZE(9F) |
usb_pipe_get_max_bulk_transfer_size - Get maximum bulk transfer size
#include <sys/usb/usba.h> int usb_pipe_get_max_bulk_transfer_size(dev_info_t dip, size_t *size);
illumos DDI specific (illumos DDI)
dip
size
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.
USB_SUCCESS
USB_INVALID_ARGS
USB_FAILURE
May be called from user, kernel or interrupt context.
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;
}
...
}
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | PCI-based systems |
Interface stability | Committed |
attributes(7), usb_alloc_request(9F), usb_pipe_bulk_xfer(9F), usb_bulk_request(9S)
January 5, 2004 | OmniOS |