sbp.c (108529) | sbp.c (108642) |
---|---|
1/* 2 * Copyright (c) 1998,1999,2000,2001 Katsushi Kobayashi and Hidetosh 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,1999,2000,2001 Katsushi Kobayashi and Hidetosh 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/sbp.c 108529 2003-01-01 08:22:29Z simokawa $ | 33 * $FreeBSD: head/sys/dev/firewire/sbp.c 108642 2003-01-04 06:40:57Z simokawa $ |
34 * 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/module.h> 40#include <sys/bus.h> 41#include <sys/mbuf.h> --- 411 unchanged lines hidden (view full) --- 453 crom_init_context(&cc, target->fwdev->csrrom); 454 /* XXX shoud parse appropriate unit directories only */ 455 maxlun = -1; 456 while (cc.depth >= 0) { 457 reg = crom_search_key(&cc, CROM_LUN); 458 if (reg == NULL) 459 break; 460 lun = reg->val & 0xff; | 34 * 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/module.h> 40#include <sys/bus.h> 41#include <sys/mbuf.h> --- 411 unchanged lines hidden (view full) --- 453 crom_init_context(&cc, target->fwdev->csrrom); 454 /* XXX shoud parse appropriate unit directories only */ 455 maxlun = -1; 456 while (cc.depth >= 0) { 457 reg = crom_search_key(&cc, CROM_LUN); 458 if (reg == NULL) 459 break; 460 lun = reg->val & 0xff; |
461 printf("lun %d found\n", lun); | 461SBP_DEBUG(0) 462 printf("target %d lun %d found\n", target->target_id, lun); 463END_DEBUG |
462 if (maxlun < lun) 463 maxlun = lun; 464 crom_next(&cc); 465 } 466 target->num_lun = maxlun + 1; 467 if (maxlun < 0) { 468 printf("no lun found!\n"); 469 } --- 1772 unchanged lines hidden --- | 464 if (maxlun < lun) 465 maxlun = lun; 466 crom_next(&cc); 467 } 468 target->num_lun = maxlun + 1; 469 if (maxlun < 0) { 470 printf("no lun found!\n"); 471 } --- 1772 unchanged lines hidden --- |