From owner-freebsd-hackers Sun Jun 23 3:15:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from lockdown.spectrum.fearmuffs.net (c164-147.pro.thalamus.se [212.31.164.147]) by hub.freebsd.org (Postfix) with ESMTP id 935F637B406; Sun, 23 Jun 2002 03:14:47 -0700 (PDT) Received: from lockdown.spectrum.fearmuffs.net (localhost.spectrum.fearmuffs.net [127.0.0.1]) by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3) with ESMTP id g5NAF1XD053536; Sun, 23 Jun 2002 12:15:01 +0200 (CEST) (envelope-from gmh003532@brfmasthugget.se) Received: (from redpixel@localhost) by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3/Submit) id g5NAF1Lu053535; Sun, 23 Jun 2002 12:15:01 +0200 (CEST) (envelope-from gmh003532@brfmasthugget.se) Date: Sun, 23 Jun 2002 12:15:01 +0200 From: Martin Faxer To: nsouch@FreeBSD.org Cc: hackers@FreeBSD.org Subject: ppbus questions Message-ID: <20020623101501.GA53454@lockdown.spectrum.fearmuffs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.99i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hi! i'm trying to write a driver for an old cd-rom drive that you connect to the parallel port. it is a shuttletech "para drive" 525. i don't have any driver docs or technical specifications but i believe that it uses some kind of a SCSI to parallel chipset. the linux tree seems to have drivers for shuttletech EPSA-2 chipsets, so i'm currently trying to port their probe routines to FreeBSD to see if my cd-rom is indeed equipped with one of those chipsets. the linux code uses outb() and inb() directly to communicate with the parallel port so i have to port it to use the ppbus interface. here are my questions: 1) do the ppb_[rw][dcs]tr() functions have any "side effects", like eg. does ppb_wdtr() drive strobe high or something like that to tell the device that there is data waiting, or is it simply a wrapper around outb() ? (ps. i tried to find the code for these functions but didn't succeed since the macros make use of PPBUS_IO() which is generated and calls some other function.) if the ppb_[rw][dcs]tr() function have side effects, are there any lower level functions which simply wrap around inb() and outb() ? 2) do the ppb_[rw][dcs]tr() functions wait, or do i have to call some function to do that, like DELAY() ? the linux code calls usleep() after sending commands to the device. (i believe it is bad to call DELAY() in a _probe() routine, but perhaps i can do that to start with...) 3) should i use micro sequences instead of doing ppb_*() calls ? i looked briefly at the man page but it seemed pretty complicated and i'm not a very experienced kernel hacker yet. i would be very grateful for any answers or tips you might have! best regards, Martin Faxér To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message