From owner-freebsd-current Thu Jul 12 1:59:41 2001 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.dk (fw-rl0.freebsd.dk [212.242.86.114]) by hub.freebsd.org (Postfix) with ESMTP id AEAF937B401 for ; Thu, 12 Jul 2001 01:59:38 -0700 (PDT) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.11.3/8.11.3) id f6C8xTl97891; Thu, 12 Jul 2001 10:59:29 +0200 (CEST) (envelope-from sos) From: Søren Schmidt Message-Id: <200107120859.f6C8xTl97891@freebsd.dk> Subject: Re: Diagnosing a ata detection problem In-Reply-To: <3B4CEB1C.37285B20@reason.levels.unisa.edu.au> "from Benjamin Close at Jul 12, 2001 09:41:08 am" To: Benjamin Close Date: Thu, 12 Jul 2001 10:58:59 +0200 (CEST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG It seems Benjamin Close wrote: > Hi All, > FreeBSD -current hasn't correctly detected the CDROM drive in my laptop > for some time now. I've traced the problem down to the drive returning > an invalid ATAPI_LSB_MAGIC and ATAPI_MSB_MAGIC which is checked at line > 704 in dev/ata/ata-all.c > > It returns d0 d0, which I believe is an overflow indication. My work > around for this currently is comment out the if statement (as shown in > the attached patch). Whilst, it's not elegant, it works. That patch will allow non-ATAPI devices to sneak past the probe, which is not a good thing. If your drive doesn't return the ATAPI magic's it is broken as this is a non dispensible part of the spec. However it might be that your drive just has some wierd timing requirements, so playing a bit with DELAY(N) in the right places could do the trick. > --- dev/ata/ata-all.c Thu Jul 12 09:23:54 2001 > +++ dev/ata/ata-all.c.new Thu Jul 12 09:22:04 2001 > @@ -701,7 +701,7 @@ > if (bootverbose) > ata_printf(scp, ATA_SLAVE, > "ATAPI probe %02x %02x\n", lsb, msb); > - if (lsb == ATAPI_MAGIC_LSB && msb == * ATAPI_MAGIC_MSB) ^ this is not in the official sources > + /*if (lsb == ATAPI_MAGIC_LSB && msb == * > ATAPI_MAGIC_MSB)*/ > scp->devices |= ATA_ATAPI_SLAVE; > } > } -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message