From owner-freebsd-multimedia Mon Apr 13 13:46:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA14584 for freebsd-multimedia-outgoing; Mon, 13 Apr 1998 13:46:23 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from fang.cs.sunyit.edu (root@fang.cs.sunyit.edu [192.52.220.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA14577 for ; Mon, 13 Apr 1998 20:46:21 GMT (envelope-from perlsta@cs.sunyit.edu) Received: from win95.local.sunyit.edu (A-T34.rh.sunyit.edu [150.156.210.241]) by fang.cs.sunyit.edu (8.8.5/8.7.3) with SMTP id PAA02343 for ; Mon, 13 Apr 1998 15:47:51 GMT Message-ID: <007801bd671c$97996680$0600a8c0@win95.local.sunyit.edu> From: "Alfred Perlstein" To: Subject: has anyone looked into a hard reset on ATAPI cdroms? Date: Mon, 13 Apr 1998 16:41:53 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 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) 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