te
Copyright (c) 2004, Sun Microsystems, Inc.,
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
size
USB_INVALID_ARGS
USB_FAILURE
Copyright (c) 2004, Sun Microsystems, Inc.,
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
USB_PIPE_GET_MAX_BULK_TRANSFER_SIZE 9F "Jan 5, 2004"
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
illumos DDI specific (illumos DDI)
PARAMETERS
dip
Pointer to the device's dev_info structure.
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.
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(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Architecture PCI-based systems |
Interface stability Committed |
SEE ALSO
attributes(5), usb_pipe_bulk_xfer(9F), usb_alloc_request(9F),
usb_bulk_request(9S)