From owner-freebsd-scsi Thu Sep 6 12:25: 3 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from henoch.cc.fh-lippe.de (henoch.cc.fh-lippe.de [193.16.112.72]) by hub.freebsd.org (Postfix) with ESMTP id C423037B408 for ; Thu, 6 Sep 2001 12:24:56 -0700 (PDT) Received: from sulu.cc.fh-lippe.de([193.16.118.119]) (3799 bytes) by henoch.cc.fh-lippe.de via sendmail with P:esmtp/R:inet_hosts/T:smtp (sender: ) id for ; Thu, 6 Sep 2001 21:24:55 +0200 (MET DST) (Smail-3.2.0.111 2000-Feb-17 #1 built 2000-Mar-17) Received: from door.lippe.de(hentzii.cc.fh-lippe.de[193.16.112.177]) (3442 bytes) by sulu.cc.fh-lippe.de via sendmail with P:smtp/R:smart_host/T:smtp (sender: ) id for ; Thu, 6 Sep 2001 21:24:54 +0200 (MET DST) (Smail-3.2.0.111 2000-Feb-17 #1 built 2000-Mar-17) Received: from odie.lippe.de (root@odie.lippe.de [192.168.4.2]) by door.lippe.de (8.9.3/8.9.3) with ESMTP id VAA57577; Thu, 6 Sep 2001 21:20:49 +0200 (CEST) (envelope-from lkoeller@lippe.de) Received: from odie.lippe.de (lkoeller@localhost [127.0.0.1]) by odie.lippe.de (8.11.6/8.11.1) with ESMTP id f86JKgf03193; Thu, 6 Sep 2001 21:20:42 +0200 (CEST) (envelope-from lkoeller@odie.lippe.de) Message-Id: <200109061920.f86JKgf03193@odie.lippe.de> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 From: Lars =?iso-8859-1?Q?K=F6ller?= To: "Justin T. Gibbs" Cc: "Kenneth D. Merry" , freebsd-scsi@FreeBSD.ORG, lkoeller@cc.fh-lippe.de Subject: Re: Wire of SCSI devices gives warning messages In-Reply-To: Your message of "Thu, 06 Sep 2001 13:06:04 MDT." <200109061906.f86J64Y78966@aslan.scsiguy.com> X-Face: eCcoCV}FjV*O{6>[1$XP/e%]TJhEw2MF33dFh)^HM7Gfd=[/(4+0a$~ List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ---------- In reply to "Justin T. Gibbs" who wrote: >> >>Hi! >> >>No. it doesn't help, with this patch more devices and every > >Hit needs to be initialized to 0 both inside and outside the loop >or if you wanted to only do it once (but in a somewhat obfuscated way): > > while (hit = 0 && (i = resource_locate(i, periph_name)) != -1) { > > ... > > } > >Sorry for not looking at the code more closely when writing the patch. That doesn't matter, nobody is perfect ;-) No problem, I place the original initialization of hit = 0 back, but this changes nothing! static u_int camperiphunit(struct periph_driver *p_drv, path_id_t pathid, target_id_t target, lun_id_t lun) { u_int unit; int hit, i, val, dunit; const char *dname; char pathbuf[32], *strval, *periph_name; unit = 0; hit = 0; periph_name = p_drv->driver_name; snprintf(pathbuf, sizeof(pathbuf), "scbus%d", pathid); i = -1; while ((i = resource_locate(i, periph_name)) != -1) { hit = 0; dname = resource_query_name(i); dunit = resource_query_unit(i); .... But nothing has changed! .... SMP: AP CPU #1 Launched! sa0 at ahc0 bus 0 target 4 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 7.812MB/s transfers (7.812MHz, offset 15) (pass0:ahc0:0:4:0): Duplicate Wired Device entry! (pass0:ahc0:0:4:0): Second device (pass device at scbus0 target 5 lun 0) will not be wired (pass0:ahc0:0:4:0): Duplicate Wired Device entry! (pass0:ahc0:0:4:0): Second device (pass device at scbus0 target 8 lun 0) will not be wired Mounting root from ufs:/dev/da1s1a cd2 at ahc1 bus 0 target 5 lun 0 cd2: Removable CD-ROM SCSI-2 device cd2: 10.000MB/s transfers (10.000MHz, offset 15) cd2: cd present [331802 x 2048 byte records] .... Best regards Lars To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message