From owner-freebsd-current Fri Aug 25 16:20:07 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id QAA08571 for current-outgoing; Fri, 25 Aug 1995 16:20:07 -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 QAA08550 for ; Fri, 25 Aug 1995 16:20:04 -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 SAA21812 for ; Fri, 25 Aug 1995 18:19:39 -0500 Message-Id: <199508252319.SAA21812@chrome.onramp.net> X-Authentication-Warning: chrome.onramp.net: Host localhost.jdl.com didn't use HELO protocol To: freebsd-current@freebsd.org Subject: That IDE CD ROM thang again... Reply-To: jdl@chromatic.com Date: Fri, 25 Aug 1995 18:19:39 -0500 From: Jon Loeliger Sender: current-owner@freebsd.org Precedence: bulk Well, I was never able to get my wdc1 controller recognized at all. Don't know why yet. However, with some cable re-routing, I placed the CD ROM on wdc0 as the slave device and I got: wdc0 at 0x1f0-0x1f7 irq 14 on isa wdc0: unit 0 (wd0): wd0: 1033MB (2116800 sectors), 2100 cyls, 16 heads, 63 S/T, 512 B/S atapi0.1 at 0x1f0: attach called wdc0: unit 1 (atapi): , removable, cmd16 wdc0: ATAPI hard disks not supported Turns out, I *did* have to byte-pair shuffle the ID string in order to get real "english"here. Naturally though, it's not a hard disk. Apparently the "type" of device is returned from an insw() call, vaguely like: char tb [DEV_BSIZE]; /* Obtain parameters. */ insw (port + AR_DATA, tb, sizeof(tb) / sizeof(short)); ap = malloc (sizeof *ap, M_TEMP, M_NOWAIT); bcopy (tb, ap, sizeof *ap); return (ap); Just after that we use ap->devtype, expecting it to be AT_TYPE_DIRECT (hard disk) or AT_TYPE_CDROM. Where can I find the description of what should be coming back from the insw() call to determine why it's not a CDROM drive? Sure I see: struct atapi_params { unsigned devtype : 5; /* packet command size */ #define AT_TYPE_DIRECT 0 /* direct-access (magnetic disk) */ #define AT_TYPE_TAPE 1 /* streaming tape (QIC-121 model) */ #define AT_TYPE_CDROM 5 /* CD-ROM device */ #define AT_TYPE_OPTICAL 7 /* optical disk */ } But it looks like the insw() causes the devtype to be a lie somehow... The obvious serious hack is to slam ap->devtype to be AT_TYPE_CDROM at some point, but that doesn't strike me as being reliable or long term. Anyone fix this or get further? Thanks, jdl