| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: if_smsc.c,v 1.22.2.13 2016/07/15 08:50:59 skrll Exp $ */ | | 1 | /* $NetBSD: if_smsc.c,v 1.22.2.14 2016/10/02 10:39:29 skrll Exp $ */ |
2 | | | 2 | |
3 | /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ | | 3 | /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ |
4 | /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ | | 4 | /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ |
5 | /*- | | 5 | /*- |
6 | * Copyright (c) 2012 | | 6 | * Copyright (c) 2012 |
7 | * Ben Gray <bgray@freebsd.org>. | | 7 | * Ben Gray <bgray@freebsd.org>. |
8 | * All rights reserved. | | 8 | * All rights reserved. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -1429,27 +1429,27 @@ smsc_rxeof(struct usbd_xfer *xfer, void | | | @@ -1429,27 +1429,27 @@ smsc_rxeof(struct usbd_xfer *xfer, void |
1429 | /* round up to next longword */ | | 1429 | /* round up to next longword */ |
1430 | pktlen = (pktlen + 3) & ~0x3; | | 1430 | pktlen = (pktlen + 3) & ~0x3; |
1431 | | | 1431 | |
1432 | /* total_len does not include the padding */ | | 1432 | /* total_len does not include the padding */ |
1433 | if (pktlen > total_len) | | 1433 | if (pktlen > total_len) |
1434 | pktlen = total_len; | | 1434 | pktlen = total_len; |
1435 | | | 1435 | |
1436 | buf += pktlen; | | 1436 | buf += pktlen; |
1437 | total_len -= pktlen; | | 1437 | total_len -= pktlen; |
1438 | | | 1438 | |
1439 | /* push the packet up */ | | 1439 | /* push the packet up */ |
1440 | s = splnet(); | | 1440 | s = splnet(); |
1441 | bpf_mtap(ifp, m); | | 1441 | bpf_mtap(ifp, m); |
1442 | if_percpuq_enqueue(ifp->if_percpuq, m); | | 1442 | if_percpuq_enqueue(sc->sc_ipq, m); |
1443 | splx(s); | | 1443 | splx(s); |
1444 | } | | 1444 | } |
1445 | | | 1445 | |
1446 | done: | | 1446 | done: |
1447 | /* Setup new transfer. */ | | 1447 | /* Setup new transfer. */ |
1448 | usbd_setup_xfer(xfer, c, c->sc_buf, sc->sc_bufsz, USBD_SHORT_XFER_OK, | | 1448 | usbd_setup_xfer(xfer, c, c->sc_buf, sc->sc_bufsz, USBD_SHORT_XFER_OK, |
1449 | USBD_NO_TIMEOUT, smsc_rxeof); | | 1449 | USBD_NO_TIMEOUT, smsc_rxeof); |
1450 | usbd_transfer(xfer); | | 1450 | usbd_transfer(xfer); |
1451 | | | 1451 | |
1452 | return; | | 1452 | return; |
1453 | } | | 1453 | } |
1454 | | | 1454 | |
1455 | void | | 1455 | void |