firewire.c (169806) | firewire.c (169829) |
---|---|
1/*- 2 * Copyright (c) 2003 Hidetoshi Shimokawa 3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 * POSSIBILITY OF SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 2003 Hidetoshi Shimokawa 3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 * POSSIBILITY OF SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/dev/firewire/firewire.c 169806 2007-05-21 02:18:50Z simokawa $ | 34 * $FreeBSD: head/sys/dev/firewire/firewire.c 169829 2007-05-21 12:17:54Z simokawa $ |
35 * 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/types.h> 41 42#include <sys/kernel.h> --- 1437 unchanged lines hidden (view full) --- 1480} 1481 1482static void 1483fw_explore(struct firewire_comm *fc) 1484{ 1485 int node, err, s, i, todo, todo2, trys; 1486 char nodes[63]; 1487 struct fw_device dfwdev; | 35 * 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/types.h> 41 42#include <sys/kernel.h> --- 1437 unchanged lines hidden (view full) --- 1480} 1481 1482static void 1483fw_explore(struct firewire_comm *fc) 1484{ 1485 int node, err, s, i, todo, todo2, trys; 1486 char nodes[63]; 1487 struct fw_device dfwdev; |
1488 union fw_self_id *fwsid; |
|
1488 1489 todo = 0; 1490 /* setup dummy fwdev */ 1491 dfwdev.fc = fc; 1492 dfwdev.speed = 0; 1493 dfwdev.maxrec = 8; /* 512 */ 1494 dfwdev.status = FWDEVINIT; 1495 1496 for (node = 0; node <= fc->max_node; node ++) { 1497 /* We don't probe myself and linkdown nodes */ 1498 if (node == fc->nodeid) 1499 continue; | 1489 1490 todo = 0; 1491 /* setup dummy fwdev */ 1492 dfwdev.fc = fc; 1493 dfwdev.speed = 0; 1494 dfwdev.maxrec = 8; /* 512 */ 1495 dfwdev.status = FWDEVINIT; 1496 1497 for (node = 0; node <= fc->max_node; node ++) { 1498 /* We don't probe myself and linkdown nodes */ 1499 if (node == fc->nodeid) 1500 continue; |
1500 if (!fw_find_self_id(fc, node)->p0.link_active) { | 1501 fwsid = fw_find_self_id(fc, node); 1502 if (!fwsid || !fwsid->p0.link_active) { |
1501 if (firewire_debug) 1502 printf("node%d: link down\n", node); 1503 continue; 1504 } 1505 nodes[todo++] = node; 1506 } 1507 1508 s = splfw(); --- 626 unchanged lines hidden --- | 1503 if (firewire_debug) 1504 printf("node%d: link down\n", node); 1505 continue; 1506 } 1507 nodes[todo++] = node; 1508 } 1509 1510 s = splfw(); --- 626 unchanged lines hidden --- |