Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 13:45:52 -0400
From:      Gardner Buchanan <gardner.buchanan@adobe.com>
To:        "'freebsd-hackers@freebsd.org'" <freebsd-hackers@freebsd.org>
Subject:   CAM "wiring", LUNs and duplicate wired entries
Message-ID:  <F0599FEE436AD411A77B00805F6512CA01B284A9@ottmail1.jetform.com>

next in thread | raw e-mail | index | archive | help
Recently I've noticed that the SCSI ID "wiring" logic is missidentifying
duplicate IDs with seperate LUNs as "duplicates": my kernel config says
this:

# Wired down SCSI unit numbers.
#
device        scbus0 at sym0
device        da0 at scbus0 target 3 unit 0
device        cd0 at scbus0 target 3 unit 1
device        da1 at scbus0 target 6
device        da2 at scbus0 target 9

Here cd0 and da0 have the same bus and target, but are different LUNs.  The
probe messages look like this:

Aug 18 17:26:38 akbar /kernel: FreeBSD 4.6-STABLE #7: Sat Aug 17 19:19:11
EDT 2002
...
Aug 18 17:26:39 akbar /kernel: Waiting 3 seconds for SCSI devices to settle
Aug 18 17:26:39 akbar /kernel: (noperiph:sym0:0:-1:-1): SCSI BUS reset
delivered
Aug 18 17:26:39 akbar /kernel: (da0:sym0:0:3:0): Duplicate Wired Device
entry!
Aug 18 17:26:39 akbar /kernel: (da0:sym0:0:3:0): Second device (da device at
scbus0 target 8 lun 0) will not be wired
Aug 18 17:26:39 akbar /kernel: da3 at sym0 bus 0 target 8 lun 0
Aug 18 17:26:39 akbar /kernel: da3: <Quantum XP32150W 81HB> Fixed Direct
Access SCSI-2 device
Aug 18 17:26:39 akbar /kernel: da3: 20.000MB/s transfers (10.000MHz, offset
15, 16bit), Tagged Queueing Enabled
Aug 18 17:26:39 akbar /kernel: da3: 2050MB (4199760 512 byte sectors: 255H
63S/T 261C)
Aug 18 17:26:39 akbar /kernel: da2 at sym0 bus 0 target 9 lun 0
Aug 18 17:26:39 akbar /kernel: da2: <QUANTUM XP34550W LYK8> Fixed Direct
Access SCSI-2 device
Aug 18 17:26:39 akbar /kernel: da2: 40.000MB/s transfers (20.000MHz, offset
16, 16bit), Tagged Queueing Enabled
Aug 18 17:26:39 akbar /kernel: da2: 4341MB (8890760 512 byte sectors: 255H
63S/T  553C)
Aug 18 17:26:39 akbar /kernel: da1 at sym0 bus 0 target 6 lun 0
Aug 18 17:26:39 akbar /kernel: da1: <SEAGATE ST31230N HPM4> Fixed Direct
Access SCSI-2 device
Aug 18 17:26:39 akbar /kernel: da1: 10.000MB/s transfers (10.000MHz, offset
15),  Tagged Queueing Enabled
Aug 18 17:26:39 akbar /kernel: da1: 1003MB (2054864 512 byte sectors: 64H
32S/T 1003C)
Aug 18 17:26:39 akbar /kernel: Mounting root from ufs:/dev/da1s1a
Aug 18 17:26:39 akbar /kernel: cd0 at sym0 bus 0 target 3 lun 1
Aug 18 17:26:39 akbar /kernel: cd0: <MATSHITA PD-1 LF-1000 A109> Removable
CD-ROM SCSI-2 device
Aug 18 17:26:39 akbar /kernel: cd0: 5.000MB/s transfers (5.000MHz, offset 8)
Aug 18 17:26:40 akbar /kernel: cd0: Attempt to query device size failed: NOT
READY, Medium not present
Aug 18 17:26:40 akbar /kernel: da0 at sym0 bus 0 target 3 lun 0
Aug 18 17:26:40 akbar /kernel: da0: <MATSHITA PD-1 LF-1000 A109> Removable
Optical SCSI-2 device
Aug 18 17:26:40 akbar /kernel: da0: 5.000MB/s transfers (5.000MHz, offset 8)
Aug 18 17:26:40 akbar /kernel: da0: Attempt to query device size failed: NOT
READY, Medium not present

As near as I can make out, the code in cam_periph.c doesn't take into
account LUN when testing for duplicates.  I seem to be getting the correct
wired value though.  My understanding is I should get cd1, rather than cd0,
if the "wired" cd0 doesn't probe properly.

Am I missing the boat on how wiring is meant to work?

See you,

Gardner Buchanan
Adobe Systems Canada
+1 613 751 4800 x5635


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F0599FEE436AD411A77B00805F6512CA01B284A9>