Date: Sun, 23 Jun 2002 12:15:01 +0200 From: Martin Faxer <gmh003532@brfmasthugget.se> To: nsouch@FreeBSD.org Cc: hackers@FreeBSD.org Subject: ppbus questions Message-ID: <20020623101501.GA53454@lockdown.spectrum.fearmuffs.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020623101501.GA53454>