if_fwe.c (108712) | if_fwe.c (109623) |
---|---|
1/* 2 * Copyright (C) 2002 3 * Hidetoshi Shimokawa. 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 --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/* 2 * Copyright (C) 2002 3 * Hidetoshi Shimokawa. 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 --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/dev/firewire/if_fwe.c 108712 2003-01-05 14:58:45Z simokawa $ | 34 * $FreeBSD: head/sys/dev/firewire/if_fwe.c 109623 2003-01-21 08:56:16Z alfred $ |
35 */ 36 37#include "opt_inet.h" 38 39#include <sys/param.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> --- 418 unchanged lines hidden (view full) --- 461 xfer->send.off = 0; 462 xfer->spd = 2; 463 xfer->fc = fwe->fd.fc; 464 xfer->retry_req = fw_asybusy; 465 xfer->sc = (caddr_t)fwe; 466 xfer->act.hand = fwe_output_callback; 467 468 /* keep ip packet alignment for alpha */ | 35 */ 36 37#include "opt_inet.h" 38 39#include <sys/param.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> --- 418 unchanged lines hidden (view full) --- 461 xfer->send.off = 0; 462 xfer->spd = 2; 463 xfer->fc = fwe->fd.fc; 464 xfer->retry_req = fw_asybusy; 465 xfer->sc = (caddr_t)fwe; 466 xfer->act.hand = fwe_output_callback; 467 468 /* keep ip packet alignment for alpha */ |
469 M_PREPEND(m, ALIGN_PAD, M_DONTWAIT); | 469 M_PREPEND(m, ALIGN_PAD, M_NOWAIT); |
470 fp = (struct fw_pkt *)&xfer->dst; /* XXX */ 471 xfer->dst = *((int32_t *)&fwe->pkt_hdr); 472 fp->mode.stream.len = htons(m->m_pkthdr.len); 473 xfer->send.buf = (caddr_t) fp; 474 xfer->mbuf = m; 475 xfer->send.len = m->m_pkthdr.len + HDR_LEN; 476 477 i++; --- 61 unchanged lines hidden (view full) --- 539 fwe = (struct fwe_softc *)xferq->sc; 540 ifp = &fwe->fwe_if; 541#if 0 542 FWE_POLL_REGISTER(fwe_poll, fwe, ifp); 543#endif 544 while ((xfer = STAILQ_FIRST(&xferq->q)) != NULL) { 545 STAILQ_REMOVE_HEAD(&xferq->q, link); 546 xferq->queued --; | 470 fp = (struct fw_pkt *)&xfer->dst; /* XXX */ 471 xfer->dst = *((int32_t *)&fwe->pkt_hdr); 472 fp->mode.stream.len = htons(m->m_pkthdr.len); 473 xfer->send.buf = (caddr_t) fp; 474 xfer->mbuf = m; 475 xfer->send.len = m->m_pkthdr.len + HDR_LEN; 476 477 i++; --- 61 unchanged lines hidden (view full) --- 539 fwe = (struct fwe_softc *)xferq->sc; 540 ifp = &fwe->fwe_if; 541#if 0 542 FWE_POLL_REGISTER(fwe_poll, fwe, ifp); 543#endif 544 while ((xfer = STAILQ_FIRST(&xferq->q)) != NULL) { 545 STAILQ_REMOVE_HEAD(&xferq->q, link); 546 xferq->queued --; |
547 MGETHDR(m, M_DONTWAIT, MT_DATA); | 547 MGETHDR(m, M_NOWAIT, MT_DATA); |
548 if (m == NULL) { 549 printf("MGETHDR failed\n"); 550 fw_xfer_free(xfer); 551 return; 552 } 553 len = xfer->recv.off + xfer->recv.len; 554 FWEDEBUG("fwe_as_input len=%d\n", len); 555#if __FreeBSD_version >= 500000 --- 71 unchanged lines hidden --- | 548 if (m == NULL) { 549 printf("MGETHDR failed\n"); 550 fw_xfer_free(xfer); 551 return; 552 } 553 len = xfer->recv.off + xfer->recv.len; 554 FWEDEBUG("fwe_as_input len=%d\n", len); 555#if __FreeBSD_version >= 500000 --- 71 unchanged lines hidden --- |