Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 1998 16:41:53 -0400
From:      "Alfred Perlstein" <perlsta@cs.sunyit.edu>
To:        <multimedia@FreeBSD.ORG>
Subject:   has anyone looked into a hard reset on ATAPI cdroms?
Message-ID:  <007801bd671c$97996680$0600a8c0@win95.local.sunyit.edu>

next 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)

i took a peek at the linux kernel and they have a #define for the atapi
reset in there:

/* special command codes for strategy routine. */
#define PACKET_COMMAND        4315
#define REQUEST_SENSE_COMMAND 4316
#define RESET_DRIVE_COMMAND   4317            <===== HERE!!!

/* Some ATAPI command opcodes (just like SCSI).
   (Some other cdrom-specific codes are in cdrom.h.) */
#define TEST_UNIT_READY         0x00
#define REQUEST_SENSE           0x03


does that look like a real atapi opcode? cause i'm having a hard time
tracing through the spagetti mess of code in there....

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?

anyhow back to squinting at the 2 source trees,
thank you
-Alfred


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?007801bd671c$97996680$0600a8c0>