Date: Thu, 06 Sep 2001 21:20:42 +0200 From: Lars =?iso-8859-1?Q?K=F6ller?= <LKoeller@cc.fh-lippe.de> To: "Justin T. Gibbs" <gibbs@scsiguy.com> Cc: "Kenneth D. Merry" <ken@plutotech.com>, freebsd-scsi@FreeBSD.ORG, lkoeller@cc.fh-lippe.de Subject: Re: Wire of SCSI devices gives warning messages Message-ID: <200109061920.f86JKgf03193@odie.lippe.de> In-Reply-To: Your message of "Thu, 06 Sep 2001 13:06:04 MDT." <200109061906.f86J64Y78966@aslan.scsiguy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----------
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: <ARCHIVE Python 28388-XXX 5ACB> 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: <PIONEER CD-ROM DR-U10X 1.07> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109061920.f86JKgf03193>
