From owner-freebsd-current Sat Aug 26 06:48:20 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id GAA18473 for current-outgoing; Sat, 26 Aug 1995 06:48:20 -0700 Received: from chrome.onramp.net (chrome.onramp.net [199.1.166.202]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id GAA18467 for ; Sat, 26 Aug 1995 06:48:18 -0700 Received: from localhost.jdl.com (localhost.jdl.com [127.0.0.1]) by chrome.onramp.net (8.6.11/8.6.9) with SMTP id IAA25153; Sat, 26 Aug 1995 08:47:50 -0500 Message-Id: <199508261347.IAA25153@chrome.onramp.net> X-Authentication-Warning: chrome.onramp.net: Host localhost.jdl.com didn't use HELO protocol To: freebsd-current@freebsd.org, joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Subject: Re: That IDE CD ROM thang again... In-reply-to: Your message of "Sat, 26 Aug 1995 08:13:27 +0200." <199508260613.IAA09444@uriah.heep.sax.de> Reply-To: jdl@chromatic.com Clarity-Index: null Threat-Level: none Software-Engineering-Dead-Seriousness: There's no excuse for unreadable code. Net-thought: If you meet the Buddha on the net, put him in your Kill file. Date: Sat, 26 Aug 1995 08:47:50 -0500 From: Jon Loeliger Sender: current-owner@freebsd.org Precedence: bulk Apparently, J Wunsch scribbled: > As Jon Loeliger wrote: > > > > Well, I was never able to get my wdc1 controller recognized at all. > > Don't know why yet. > > Since it's not a controller? Usually, a wdc "controller" will only be > recognized if there's a disk attached, since it's actually the disk > that is answering on the bus. Well, yea, I think I understand that, but I used to have: controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr disk wd0 at wdc0 drive 0 #disk wd1 at wdc0 drive 1 controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr #disk wd2 at wdc1 drive 0 #disk wd3 at wdc1 drive 1 options ATAPI #Enable ATAPI support for IDE bus device wcd0 #IDE CD-ROM My boot logs showed it trying the CDROM on wdc0 even before wdc1 was reported NOT present. Aug 24 09:08:07 zinc /kernel: wdc0 at 0x1f0-0x1f7 irq 14 on isa Aug 24 09:08:07 zinc /kernel: wdc0: unit 0 (wd0): Aug 24 09:08:07 zinc /kernel: wd0: 1033MB (2116800 sectors), 2100 cyls, 16 heads, 63 S/T, 512 B/S Aug 24 09:08:07 zinc /kernel: atapi0.1 at 0x1f0: attach called Aug 24 09:08:07 zinc /kernel: atapi.1 at 0x1f0: identify not ready, status=1 Aug 24 09:08:08 zinc /kernel: wdc1 not found at 0x170 Steve Wallace and I mumbled about it like this: Apparently, Steven Wallace scribbled: > > Umm, you only have ONE IDE hard disk and ONE IDE CDROM? > I was under the impression you had two ide hard disks. > So you have one on each controller, eh? That should be okay, me: Well, I might have confused you some.... (Nah!) I actually have occasion to use two drives on this machine, so the second comes and goes as needed. It currently wasn't present, but the kernel silently allowed for it and just didn't find it. So, thinking that it might be confusing things, I did a round where I removed the second disk entry from the kernel to more accurately reflect the expected hardware. > but I notieced your prob: > wdc1 not found at 0x170 > > It should still recognize the controller, even if it has probs > on the atapi. Check your port and IRQ settings. Will do. I know that I can use this full configuration under lovely 'doze 95, so I'm pretty sure that the hardware itself is all playing together nicely. I'm NOT sure that I've correctly converted it to FreeBSD config lingo... The 'doze 95 poking reveals this: IDE controller (PCI) IRQ 14 0x1f0-1f7, 0x3f6-3f6 IDE controller standard IRQ 15 0x170-177, 0x376-376 I think I converted this to: controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr He then suggested the approach of making the CD ROM a slave drive, which has worked and gotten me this far... > I think it's in error to byte-shuffle only the ID string. Everything > from the drive must be byte-swapped, including the ID word and all > data. Oh my! OK, I'll give this a hack attack and see what I get. Any chance you can give me a one minute pointer to *where* that might take place? Like, where the buffers coming back from the drive are filled? I see the one in _probe() that's obtained with the insw(). Will they all look like that? > (Of course, you have to make a distinction whether to swap or > not before.) Yea, this is curious. I get the feeling that some people are able to get the IDE CD drives to work and others aren't. Is there some reasonable distinction separating the two camps? Do we need to start a collection of working/not-working drives and form the basis of a boot time lookup table (ick) to determine byte-swapping needs? > Disclaimer: i don't own an ATAPI CD, and the only wdc-style drive > i'm still operating sits in my notebook. OK, so you're lucky. :-) jdl