ubsa.c (227309) | ubsa.c (233774) |
---|---|
1/*- 2 * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/usb/serial/ubsa.c 227309 2011-11-07 15:43:11Z ed $"); | 28__FBSDID("$FreeBSD: head/sys/dev/usb/serial/ubsa.c 233774 2012-04-02 10:50:42Z hselasky $"); |
29/*- 30 * Copyright (c) 2001 The NetBSD Foundation, Inc. 31 * All rights reserved. 32 * 33 * This code is derived from software contributed to The NetBSD Foundation 34 * by Ichiro FUKUHARA (ichiro@ichiro.org). 35 * 36 * Redistribution and use in source and binary forms, with or without --- 585 unchanged lines hidden (view full) --- 622 uint8_t buf[4]; 623 int actlen; 624 625 usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); 626 627 switch (USB_GET_STATE(xfer)) { 628 case USB_ST_TRANSFERRED: 629 | 29/*- 30 * Copyright (c) 2001 The NetBSD Foundation, Inc. 31 * All rights reserved. 32 * 33 * This code is derived from software contributed to The NetBSD Foundation 34 * by Ichiro FUKUHARA (ichiro@ichiro.org). 35 * 36 * Redistribution and use in source and binary forms, with or without --- 585 unchanged lines hidden (view full) --- 622 uint8_t buf[4]; 623 int actlen; 624 625 usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); 626 627 switch (USB_GET_STATE(xfer)) { 628 case USB_ST_TRANSFERRED: 629 |
630 if (actlen >= sizeof(buf)) { | 630 if (actlen >= (int)sizeof(buf)) { |
631 pc = usbd_xfer_get_frame(xfer, 0); 632 usbd_copy_out(pc, 0, buf, sizeof(buf)); 633 634 /* 635 * incidentally, Belkin adapter status bits match 636 * UART 16550 bits 637 */ 638 sc->sc_lsr = buf[2]; --- 34 unchanged lines hidden --- | 631 pc = usbd_xfer_get_frame(xfer, 0); 632 usbd_copy_out(pc, 0, buf, sizeof(buf)); 633 634 /* 635 * incidentally, Belkin adapter status bits match 636 * UART 16550 bits 637 */ 638 sc->sc_lsr = buf[2]; --- 34 unchanged lines hidden --- |