Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 1998 21:19:46 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        perlsta@cs.sunyit.edu (Alfred Perlstein)
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: has anyone looked into a hard reset on ATAPI cdroms?
Message-ID:  <199804131919.VAA01557@labinfo.iet.unipi.it>
In-Reply-To: <007801bd671c$97996680$0600a8c0@win95.local.sunyit.edu> from "Alfred Perlstein" at Apr 13, 98 04:41:34 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804131919.VAA01557>