firewire.c (110891) | firewire.c (111040) |
---|---|
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 * | 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 $ | 33 * $FreeBSD: head/sys/dev/firewire/firewire.c 111040 2003-02-17 14:24:06Z 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; | 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; | 338 int i, s; |
339 340 split_timeout.tv_sec = 6; 341 split_timeout.tv_usec = 0; 342 343 microtime(&tv); 344 timevalsub(&tv, &split_timeout); 345 | 339 340 split_timeout.tv_sec = 6; 341 split_timeout.tv_usec = 0; 342 343 microtime(&tv); 344 timevalsub(&tv, &split_timeout); 345 |
346 s = splfw(); |
|
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 } | 347 for (i = 0; i < 0x40; i ++) { 348 while ((tl = STAILQ_FIRST(&fc->tlabels[i])) != NULL) { 349 xfer = tl->xfer; 350 if (timevalcmp(&xfer->tv, &tv, >)) 351 /* the rests are newer than this */ 352 break; 353 device_printf(fc->bdev, 354 "split transaction timeout dst=0x%x tl=0x%x\n", --- 6 unchanged lines hidden (view full) --- 361 break; 362 default: 363 /* ??? */ 364 fw_xfer_free(xfer); 365 break; 366 } 367 } 368 } |
369 splx(s); |
|
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) { | 370} 371 372static void 373firewire_watchdog(void *arg) 374{ 375 struct firewire_comm *fc; 376 377 fc = (struct firewire_comm *)arg; --- 1260 unchanged lines hidden (view full) --- 1638 STAILQ_REMOVE_HEAD(&fc->pending, link); 1639 i++; 1640 if (xfer->act.hand) 1641 xfer->act.hand(xfer); 1642 } 1643 if (i > 0) 1644 printf("fw_attach_dev: %d pending handlers called\n", i); 1645 if (fc->retry_count > 0) { |
1644 printf("retry_count = %d\n", fc->retry_count); | 1646 printf("probe failed for %d node\n", fc->retry_count); 1647#if 0 |
1645 callout_reset(&fc->retry_probe_callout, hz*2, 1646 (void *)fc->ibr, (void *)fc); | 1648 callout_reset(&fc->retry_probe_callout, hz*2, 1649 (void *)fc->ibr, (void *)fc); |
1650#endif |
|
1647 } 1648 return; 1649} 1650 1651/* 1652 * To allocate uniq transaction label. 1653 */ 1654static int --- 483 unchanged lines hidden --- | 1651 } 1652 return; 1653} 1654 1655/* 1656 * To allocate uniq transaction label. 1657 */ 1658static int --- 483 unchanged lines hidden --- |