[usb] Allow USB endpoints to specify a reserved header length for refills

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-01-19 00:01:11 +00:00
parent 8dc23d9b83
commit 71b83a6d00
11 changed files with 31 additions and 20 deletions

View File

@@ -186,7 +186,7 @@ static int ncm_in_prefill ( struct ncm_device *ncm ) {
count = NCM_IN_MIN_COUNT;
if ( ( count * mtu ) > NCM_IN_MAX_SIZE )
continue;
usb_refill_init ( &ncm->usbnet.in, mtu, count );
usb_refill_init ( &ncm->usbnet.in, 0, mtu, count );
if ( ( rc = usb_prefill ( &ncm->usbnet.in ) ) != 0 ) {
DBGC ( ncm, "NCM %p could not prefill %dx %zd-byte "
"buffers for bulk IN\n", ncm, count, mtu );
@@ -575,7 +575,7 @@ static int ncm_probe ( struct usb_function *func,
ncm->netdev = netdev;
usbnet_init ( &ncm->usbnet, func, &ncm_intr_operations,
&ncm_in_operations, &ncm_out_operations );
usb_refill_init ( &ncm->usbnet.intr, 0, NCM_INTR_COUNT );
usb_refill_init ( &ncm->usbnet.intr, 0, 0, NCM_INTR_COUNT );
DBGC ( ncm, "NCM %p on %s\n", ncm, func->name );
/* Describe USB network device */