From owner-freebsd-scsi Wed Apr 7 13:39:58 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.plutotech.com (panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ABBF14CE2 for ; Wed, 7 Apr 1999 13:39:49 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.3/8.8.5) id OAA04869; Wed, 7 Apr 1999 14:28:34 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199904072028.OAA04869@panzer.plutotech.com> Subject: Re: Getting Pioneer CD changer to work In-Reply-To: <199904071957.VAA01873@yedi.iaf.nl> from Wilko Bulte at "Apr 7, 1999 9:57:25 pm" To: wilko@yedi.iaf.nl (Wilko Bulte) Date: Wed, 7 Apr 1999 14:28:34 -0600 (MDT) Cc: freebsd-scsi@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Wilko Bulte wrote... > As Kenneth D. Merry wrote ... > > Wilko Bulte wrote... > > > > > > I recently obtained a Pioneer 6 CD changer DRM604-X. Currently > > > I'm playing with it to see if I can get it to work on 4.x-current. > > [snip] > > > > With the magazine in and CDs loaded I get CCB already dequeued messages, > > > timeout nccb blabla, CAM status 0x4b > > Well, I got tired of the bus lockups, as the system disk was on the same > bus I could not capture messages easily. So, I dropped in an old Adaptec > 1542A (note the A). 4.0 detects the aha ok, and spits out a warning > like "1542A, trying to compensate" (or close to that; it sounded as > Startrek to me anyway ;-). And locks up, even when no devices are > attached to it. Time for more surgery: I freed up a PCI slot and > connected the Pioneer cdchanger to a Qlogic 1040 card. > > This resulted in a much better 'debuggable' system. I'm not surprised at all that a 1542A wouldn't work. I think Warner said something about it not working very well. And I'm not surprised that a QLogic 1040 worked better. :) > > > My guess is I need some quirk entries to at least catch the vendor > > > unique ASCs. They probably mean something like "need to load a CD" > > > or something, but I don't have any docs unfortunately. Worse, I got it > > > as-is and I'm not sure if it works correctly. > > > > > > Appreciate insight from people who used these beasts before. > > > > Well, I've got a couple of ideas. I think there are two things going on > > here: > > > > 1. Your drive responds with an odd ASC when there is no media present. > > 2. The 20 second timeout for the initial read capacity in the CD driver > > may be too short for your drive. > > > > So, to address the first problem, try the attached diffs. They'll > > basically make 0x0b an "acceptable" ASC for attachment purposes. > > I did that and it helps quite a bit: > > Apr 7 22:30:40 p100 last message repeated 2 times > Apr 7 22:30:40 p100 /kernel: (cd0:isp0:0:5:0): READ CD RECORDED CAPACITY. > CDB: > 25 0 0 0 0 0 0 0 0 0 > Apr 7 22:30:40 p100 /kernel: (cd0:isp0:0:5:0): NOT READY asc:3a,0 > Apr 7 22:30:40 p100 /kernel: (cd0:isp0:0:5:0): Medium not present > Apr 7 22:30:40 p100 /kernel: cd0 at isp0 bus 0 target 5 lun 0 > Apr 7 22:30:40 p100 /kernel: cd0: Removable > CD-RO > M SCSI-CCS device > Apr 7 22:30:40 p100 /kernel: cd0: Serial Number 6 > Apr 7 22:30:40 p100 /kernel: cd0: 3.300MB/s transfers > Apr 7 22:30:40 p100 /kernel: cd0: Attempt to query device size failed: NOT > READ > Y, Medium not present > Apr 7 22:30:51 p100 /kernel: (cd1:isp0:0:5:1): READ CD RECORDED CAPACITY. > CDB: > 25 20 0 0 0 0 0 0 0 0 > Apr 7 22:30:51 p100 /kernel: (cd1:isp0:0:5:1): NOT READY asc:3a,0 > Apr 7 22:30:51 p100 /kernel: (cd1:isp0:0:5:1): Medium not present > Apr 7 22:30:51 p100 /kernel: cd1 at isp0 bus 0 target 5 lun 1 > Apr 7 22:30:52 p100 /kernel: cd1: Removable > CD-RO > M SCSI-CCS device > > etc etc. This is with a full 6 cd magazine loaded. Well, that is better, but obviously the drive doesn't realize that it actually has media loaded, which is a problem. > > To address the second problem, go into cdstart() in sys/cam/scsi/scsi_cd.c > > and increase the timeout for the read capacity from 20 seconds to say 30 or > > 40 and see what happens. > > > > If putting 0x0b in allows the drive to probe without media present, then > > Yes it will, but only if you change 0b into b0 because that is what the > drive reports ;-) You got me scratchin my head with that one 8). Below is > what happens without a magazine loaded. Ooops! > Apr 7 22:42:53 p100 /kernel: (cd2:isp0:0:5:2): READ CD RECORDED CAPACITY. > CDB: > 25 40 0 0 0 0 0 0 0 0 > Apr 7 22:42:53 p100 /kernel: (cd2:isp0:0:5:2): NOT READY asc:b0,0 > Apr 7 22:42:53 p100 /kernel: (cd2:isp0:0:5:2): Vendor Specific ASC > Apr 7 22:42:53 p100 /kernel: cd2 at isp0 bus 0 target 5 lun 2 > Apr 7 22:42:53 p100 /kernel: cd2: Removable > CD-RO > M SCSI-CCS device > Apr 7 22:42:53 p100 /kernel: cd2: Serial Number 6 > Apr 7 22:42:53 p100 /kernel: cd2: 3.300MB/s transfers > Apr 7 22:42:53 p100 /kernel: cd2: Attempt to query device size failed: NOT > READ > Y, Vendor Specific ASC > Apr 7 22:42:53 p100 /kernel: ffs_mountfs: superblock updated for soft > updates > Apr 7 22:42:53 p100 /kernel: (cd3:isp0:0:5 > Apr 7 22:42:53 p100 /kernel: :3): READ CD RECORDED CAPACITY. CDB: 25 60 0 0 > 0 0 > 0 0 0 0 Well, that looks normal. When you boot without -v, you'll get the normal 1-line error message that you get when there's no media in the drive. > > that probably means that I need to come up with some generic tie-in to the > > error recovery code for acceptable errors on probe. I need to make it > > generic because there are other devices (Joerg's and Matt Dodd's Sony MO > > drives) that give back weird errors when no media is present. > > > > If it turns out that the read capacity timeout is too low, I can probably > > just bump the default. I would like to get a rough idea of how long it > > takes your drive to return a read capcity command, so we can avoid making > > the timeout really long. > > Now the nasty stuff: my drive has problems *reading*. Initially it whistled > like a bird while trying to do so. I assume this is the focussing voice > coil of the laser assembly. Cleaning the lens helped, it read (slightly > whistling, but much less than before) 2 out of 6 CDs. After a second > cleaning operation I made things worse: it now always reports "no medium > present" :-( Seems some more hardware surgery seems to be needed. Bummer. Well, there's not much we can do about that from a software standpoint. But it does explain the medium not present errors above. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message