1/* $NetBSD: if_cdce.c,v 1.4 2004/10/24 12:50:54 augustss Exp $ */ 2 3/*- 4 * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> 5 * Copyright (c) 2003-2005 Craig Boston 6 * Copyright (c) 2004 Daniel Hartmeier 7 * Copyright (c) 2009 Hans Petter Selasky 8 * All rights reserved. --- 27 unchanged lines hidden (view full) --- 36 */ 37 38/* 39 * USB Communication Device Class (Ethernet Networking Control Model) 40 * http://www.usb.org/developers/devclass_docs/usbcdc11.pdf 41 */ 42 43#include <sys/cdefs.h> |
44__FBSDID("$FreeBSD: head/sys/dev/usb/net/if_cdce.c 189528 2009-03-08 06:56:13Z thompsa $"); |
45 46#include "usbdevs.h" 47#include <dev/usb/usb.h> 48#include <dev/usb/usb_mfunc.h> 49#include <dev/usb/usb_error.h> 50#include <dev/usb/usb_cdc.h> 51#include <dev/usb/usb_defs.h> 52 --- 607 unchanged lines hidden (view full) --- 660 /* FALLTHROUGH */ 661 case USB_ST_SETUP: 662 /* 663 * TODO: Implement support for multi frame transfers, 664 * when the USB hardware supports it. 665 */ 666 for (x = 0; x != 1; x++) { 667 if (sc->sc_rx_buf[x] == NULL) { |
668 m = usb2_ether_newbuf(); |
669 if (m == NULL) 670 goto tr_stall; 671 sc->sc_rx_buf[x] = m; |
672 } else { 673 m = sc->sc_rx_buf[x]; 674 } 675 676 usb2_set_frame_data(xfer, m->m_data, x); 677 xfer->frlengths[x] = m->m_len; 678 } 679 /* set number of frames and start hardware */ --- 89 unchanged lines hidden --- |