From owner-freebsd-multimedia Mon Apr 13 14:01:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA17531 for freebsd-multimedia-outgoing; Mon, 13 Apr 1998 14:01:13 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA17525 for ; Mon, 13 Apr 1998 21:01:11 GMT (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id VAA01557; Mon, 13 Apr 1998 21:19:46 +0200 From: Luigi Rizzo Message-Id: <199804131919.VAA01557@labinfo.iet.unipi.it> Subject: Re: has anyone looked into a hard reset on ATAPI cdroms? To: perlsta@cs.sunyit.edu (Alfred Perlstein) Date: Mon, 13 Apr 1998 21:19:46 +0200 (MET DST) Cc: multimedia@FreeBSD.ORG In-Reply-To: <007801bd671c$97996680$0600a8c0@win95.local.sunyit.edu> from "Alfred Perlstein" at Apr 13, 98 04:41:34 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > i'm looking into implementing a hard reset on ATAPI cdroms, > the current way of "doing" it is just waiting for the device to unwedge > itself, which is kinda silly imo (at least from what i understand from the > Fbsd code) > > (the reason i'm trying this is cause if you manually mess with the eject > button the or play button on a ATAPI cdrom, the driver gets all confused it > seems, or out of sync with the cdrom) right... > what they seem to do is: > 1) try reset, and sleep pending i *think* an IRQ > 2) if the watch expires they hard reset the IDE bus > 3) if the reset returns then it's ok. > > also, anyone know what function/series of functions in the kernel i would > have to call to hard reset the drives on an IDE bus? would that violate > some level of code? in our atapi code there is no watchdog, so there is no chance you can call your hard reset. The wd driver _does_ have a watchdog, so you could see how it is done there and implement the same functionality in the atapi driver. Should not be hard, I looked at it in december, but was hoping that someone more knowledgeable than me in the internals of the wd/atapi drivers would have the time to implement it or at least give some good advice... In any case i am under the impression that you don't need any strange atapi command, just reset the IDE bus on a timeout same as it is done in the wd driver. I seem to remember that you need to add a reference to the IDE bus in the atapi device descriptor, so you know which bus to reset and which other device might be affected. The logic to assign unit numbers to atapi (or wcd ?) devices looked a bit involved when i looked at it. cheers luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message