From owner-freebsd-bugs Sun Aug 6 22: 0: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2D96C37B546 for ; Sun, 6 Aug 2000 22:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA01091; Sun, 6 Aug 2000 22:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 6 Aug 2000 22:00:03 -0700 (PDT) Message-Id: <200008070500.WAA01091@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Andre Albsmeier Subject: Re: kern/20347: YAMAHA CDR100 does not like multiple LUN probing Reply-To: Andre Albsmeier Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/20347; it has been noted by GNATS. From: Andre Albsmeier To: "Kenneth D. Merry" Cc: Andre Albsmeier , FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/20347: YAMAHA CDR100 does not like multiple LUN probing Date: Mon, 7 Aug 2000 06:49:59 +0200 On Sun, 06-Aug-2000 at 13:33:42 -0600, Kenneth D. Merry wrote: > On Wed, Aug 02, 2000 at 18:46:31 +0200, Andre Albsmeier wrote: > > On Tue, 01-Aug-2000 at 14:03:09 -0600, Kenneth D. Merry wrote: > > > On Tue, Aug 01, 2000 at 21:07:32 +0200, Andre Albsmeier wrote: > > > > >Environment: > > > > > > > > probably all FreeBSD versions > > > > > > > > >Description: > > > > > > > > The YAMAHA CDR100 doesn't like multiple LUN probing. If you, for example, > > > > wire down your devices like this > > > > > > > > device pass15 at scbus1 target 5 > > > > device cd1 at scbus1 target 5 > > > > device pass16 at scbus1 target 6 > > > > device cd0 at scbus1 target 6 > > > > > > > > where target 5 is a "YAMAHA CDR100" and target 6 is another cdrom, > > > > the following message appears in dmesg > > > > > > > > (cd0:ahc1:0:5:0): Duplicate Wired Device entry! > > > > (cd0:ahc1:0:5:0): Second device will not be wired > > > > (cd0:ahc1:0:5:0): lost device > > > > (cd0:ahc1:0:5:0): removing device entry > > > > > > > > and the other cdrom (target 6) becomes cd1. > > > > > > This isn't a problem with the drive and multiple-lun probing, but rather a > > > problem with the hard-wiring code. > > > > > > The problem is that the hard-wiring code evidently can't deal with multiple > > > peripheral drivers wired to the same bus/target/lun. > > > > > > A work-around here would be to not hard-wire your pass devices, and just > > > hard-wire your CDROM devices. > > > > I tried this already with the following entries: > > > > #device pass15 at scbus1 target 5 > > device cd1 at scbus1 target 5 > > #device pass16 at scbus1 target 6 > > device cd0 at scbus1 target 6 > > > > Same result: > > > > andre@bali:~>dmesg | egrep 'cd|pass0' > > (pass0:ahc0:0:0:0): Duplicate Wired Device entry! > > (pass0:ahc0:0:0:0): Second device will not be wired > > (pass0:ahc0:0:0:0): Duplicate Wired Device entry! > > (pass0:ahc0:0:0:0): Second device will not be wired > > You shouldn't get those messages unless you've got pass0 wired down... > In any case, that looks to be a different device than the one that is going > away: Well, all others are wired down. pass0 is a standard disk drive. I have now attached the complete dmesg below (with quirk entry and without errors :-)) > > (cd0:ahc1:0:5:0): lost device > > (cd0:ahc1:0:5:0): removing device entry > > cd1 at ahc1 bus 0 target 6 lun 0 > > cd1: Removable CD-ROM SCSI-2 device > > cd1: 20.000MB/s transfers (20.000MHz, offset 15) > > cd1: Attempt to query device size failed: NOT READY, Medium not present - tray closed > > > > It looks like there is some missing information in there, namely why cd0 > went away... > > > Another try was this: I removed all wiring entries > > from the kernel conf (leaving only a "device cd" line): > > > > device cd > > #device pass15 at scbus1 target 5 > > #device cd1 at scbus1 target 5 > > #device pass16 at scbus1 target 6 > > #device cd0 at scbus1 target 6 > > > > And the result: > > > > andre@bali:~> dmesg | grep cd > > (cd1:ahc1:0:5:0): lost device > > (cd1:ahc1:0:5:0): removing device entry > > cd0 at ahc1 bus 0 target 6 lun 0 > > cd0: Removable CD-ROM SCSI-2 device > > cd0: 20.000MB/s transfers (20.000MHz, offset 15) > > There weren't any other error messages before the 'lost device' message? As far as I can remeber, no. > > I have three other Yamaha CD-Writers: CD400, CD4260 and a CD6416. > > With all of these everything works perfectly. > > > > Also, the CDR100 is known to be broken with multiple LUN probing. > > You can see this if you enable the 'Multiple LUN support' in the > > Adaptec BIOS: When booting, you will see 8 CDR100 devices appear > > under the assigned SCSI ID when the controller BIOS scans the bus. > > All other CD Writers behave normally here... > > > > > > I think, we should consider putting the quirk entry into cam_xpt.c > > -- sure the hard-wiring code will still have the problems you wrote > > about but the CDR100 is broken for sure :-( > > > > What do you think? > > I think you're right, that drive needs a quirk entry, but it still isn't > clear to me what's going on with those error messages. Well, I can do more tests if you like. I can do all variations of tests: with and without quirk, with and w/o pass device, .... Actually, the "lost device" together with the "removing device entry" errors were already seen on 3.x-STABLE. I never cared about them since I don't really use the CD functionality of the CDR100. But with 4.1-STABLE, the errors made my cd0 drive (the Plextor) become cd1 and so I deciced to dig into this. > But all the problems go away when you add the quirk entry? Yes, I can even use the CDR100 as CD-ROM drive now. Here is the complete dmesg now (with quirk entry): Copyright (c) 1992-2000 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.1-STABLE #0: Thu Aug 3 22:25:07 CEST 2000 root@bali.ofw.tld:/src/obj-4/src/src-4/sys/bali Timecounter "i8254" frequency 1193154 Hz CPU: Pentium III/Pentium III Xeon/Celeron (503.94-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x672 Stepping = 2 Features=0x383f9ff real memory = 268423168 (262132K bytes) avail memory = 257937408 (251892K bytes) Preloaded elf kernel "kernel" at 0xc0314000. Pentium Pro MTRR support enabled npx0: on motherboard npx0: INT 16 interface apm0: on motherboard apm: found APM BIOS v1.2, connected at v1.2 pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at 0.0 irq 11 isab0: at device 4.0 on pci0 isa0: on isab0 pci0: at 4.1 pci0: at 4.2 intpm0: port 0xe800-0xe80f irq 9 at device 4.3 on pci0 intpm0: I/O mapped e800 intpm0: intr IRQ 9 enabled revision 0 smbus0: on intsmb0 smb0: on smbus0 intpm0: PM I/O mapped e400 bktr0: mem 0xe1000000-0xe1000fff irq 14 at device 9.0 on pci0 iicbb0: on bti2c0 iicbus0: on iicbb0 master-only iicsmb0: on iicbus0 smbus1: on iicsmb0 smb1: on smbus1 iic0: on iicbus0 smbus2: on bti2c0 smb2: on smbus2 bktr0: Hauppauge Model 61314 B1M bktr0: Detected a MSP3410D-B4 at 0x80 Hauppauge WinCast/TV, Philips PAL I tuner, msp3400c stereo. pci0: (vendor=0x109e, dev=0x0878) at 9.1 irq 14 fxp0: port 0xd000-0xd01f mem 0xde000000-0xde0fffff,0xe0000000-0xe0000fff irq 15 at device 10.0 on pci0 fxp0: Ethernet address 00:a0:c9:ca:9c:85 ahc0: port 0xb800-0xb8ff mem 0xdd800000-0xdd800fff irq 10 at device 11.0 on pci0 ahc0: aic7890/91 Wide Channel A, SCSI Id=7, 16/255 SCBs ahc1: port 0xb400-0xb4ff mem 0xdd000000-0xdd000fff irq 11 at device 12.0 on pci0 ahc1: aic7880 Single Channel A, SCSI Id=7, 16/255 SCBs isa0: too many dependant configs (8) isa0: unexpected small tag 14 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 psm0: irq 12 on atkbdc0 psm0: model Generic PS/2 mouse, device ID 0 vga0: at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: on isa0 sc0: VGA <9 virtual consoles, flags=0x200> fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 fd1: <1200-KB 5.25" drive> on fdc0 drive 1 sio0 at port 0x3f8-0x3ff irq 4 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/9 bytes threshold lpt0: on ppbus0 lpt0: Interrupt-driven port unknown: can't assign resources unknown: can't assign resources unknown: can't assign resources unknown: can't assign resources unknown: can't assign resources unknown0: at iomem 0-0x9ffff,0x100000-0xfffffff,0xe8000-0xeffff,0xf0000-0xf3fff,0xf4000-0xf7fff,0xf8000-0xfffff,0xce600-0xcffff,0xfffe0000-0xffffffff on isa0 unknown: can't assign resources unknown1: at port 0x40-0x43 irq 0 on isa0 unknown2: at port 0x70-0x71 irq 8 on isa0 unknown: can't assign resources unknown3: at port 0xf0 irq 13 on isa0 unknown4: at port 0-0xf,0x80-0x90,0x94-0x9f,0xc0-0xde drq 4 on isa0 unknown5: at port 0x61 on isa0 unknown6: at port 0xcf8-0xcff on isa0 unknown: can't assign resources sbc0: at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,5 on isa0 sbc0: setting card to irq 5, drq 1, 5 pcm0: on sbc0 joy0: at port 0x200-0x207 on isa0 unknown7: at port 0x620-0x623 on isa0 da0 at ahc0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled da0: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C) da1 at ahc0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-2 device da1: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled da1: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C) da2 at ahc0 bus 0 target 2 lun 0 da2: Fixed Direct Access SCSI-2 device da2: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled da2: 4341MB (8890760 512 byte sectors: 255H 63S/T 553C) da3 at ahc0 bus 0 target 3 lun 0 da3: Fixed Direct Access SCSI-2 device da3: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled da3: 4341MB (8890760 512 byte sectors: 255H 63S/T 553C) Mounting root from ufs:/dev/da2s1a da10 at ahc1 bus 0 target 0 lun 0 da10: Removable Direct Access SCSI-2 device da10: 20.000MB/s transfers (20.000MHz, offset 15) da10: Attempt to query device size failed: NOT READY, Medium not present da11 at ahc1 bus 0 target 1 lun 0 da11: Removable Direct Access SCSI-2 device da11: 3.300MB/s transfers da11: Attempt to query device size failed: NOT READY, Medium not present cd0 at ahc1 bus 0 target 6 lun 0 cd0: Removable CD-ROM SCSI-2 device cd0: 20.000MB/s transfers (20.000MHz, offset 15) cd0: cd present [224480 x 2048 byte records] cd1 at ahc1 bus 0 target 5 lun 0 cd1: Removable Worm SCSI-2 device cd1: 3.300MB/s transfers cd1: Attempt to query device size failed: NOT READY, Logical unit not ready, cause not reportable To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message