Deleted Added
sdiff udiff text old ( 110891 ) new ( 111040 )
full compact
1/*
2 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
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

--- 16 unchanged lines hidden (view full) ---

25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/firewire/firewire.c 110891 2003-02-15 00:54:10Z simokawa $
34 *
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/types.h>
40#include <sys/mbuf.h>
41#include <sys/socket.h>

--- 288 unchanged lines hidden (view full) ---

330
331static void
332firewire_xfer_timeout(struct firewire_comm *fc)
333{
334 struct fw_xfer *xfer;
335 struct tlabel *tl;
336 struct timeval tv;
337 struct timeval split_timeout;
338 int i;
339
340 split_timeout.tv_sec = 6;
341 split_timeout.tv_usec = 0;
342
343 microtime(&tv);
344 timevalsub(&tv, &split_timeout);
345
346 for (i = 0; i < 0x40; i ++) {
347 while ((tl = STAILQ_FIRST(&fc->tlabels[i])) != NULL) {
348 xfer = tl->xfer;
349 if (timevalcmp(&xfer->tv, &tv, >))
350 /* the rests are newer than this */
351 break;
352 device_printf(fc->bdev,
353 "split transaction timeout dst=0x%x tl=0x%x\n",

--- 6 unchanged lines hidden (view full) ---

360 break;
361 default:
362 /* ??? */
363 fw_xfer_free(xfer);
364 break;
365 }
366 }
367 }
368}
369
370static void
371firewire_watchdog(void *arg)
372{
373 struct firewire_comm *fc;
374
375 fc = (struct firewire_comm *)arg;

--- 1260 unchanged lines hidden (view full) ---

1636 STAILQ_REMOVE_HEAD(&fc->pending, link);
1637 i++;
1638 if (xfer->act.hand)
1639 xfer->act.hand(xfer);
1640 }
1641 if (i > 0)
1642 printf("fw_attach_dev: %d pending handlers called\n", i);
1643 if (fc->retry_count > 0) {
1644 printf("retry_count = %d\n", fc->retry_count);
1645 callout_reset(&fc->retry_probe_callout, hz*2,
1646 (void *)fc->ibr, (void *)fc);
1647 }
1648 return;
1649}
1650
1651/*
1652 * To allocate uniq transaction label.
1653 */
1654static int

--- 483 unchanged lines hidden ---