From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 24 16:27:35 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31E2D16A41F for ; Mon, 24 Oct 2005 16:27:35 +0000 (GMT) (envelope-from sos@FreeBSD.org) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 741AF43D45 for ; Mon, 24 Oct 2005 16:27:34 +0000 (GMT) (envelope-from sos@FreeBSD.org) Received: from [194.192.25.136] (mac.deepcore.dk [194.192.25.136]) by spider.deepcore.dk (8.13.4/8.13.3) with ESMTP id j9OGRLDq050461; Mon, 24 Oct 2005 18:27:21 +0200 (CEST) (envelope-from sos@FreeBSD.org) In-Reply-To: <200510232049.16352.Jason.Harmening@gmail.com> References: <200510232049.16352.Jason.Harmening@gmail.com> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <08AD1F28-AE42-4C36-B5E0-3E909130BDB8@FreeBSD.org> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= Date: Mon, 24 Oct 2005 18:27:29 +0200 To: Jason Harmening X-Mailer: Apple Mail (2.734) X-mail-scanned: by DeepCore Virus & Spam killer v1.12 Cc: freebsd-hackers@FreeBSD.org Subject: Re: Native ATAPI MO driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 16:27:35 -0000 On 24/10/2005, at 3:49, Jason Harmening wrote: > Hi, > > I have a 2.3G Fujitsu MO drive, and I've gotten tired of using =20 > atapicam to > access it. I'm thinking of writing a native ATAPI driver that =20 > could be added > to the kernel through a configuration line like: > > device atapimo > > I've been doing a little work to see how feasible this is--the =20 > kernel already > defines the ATA_ATAPI_TYPE_OPTICAL device type that is received =20 > from my drive > during probing. But ATA_ATAPI_TYPE_OPTICAL isn't actually used =20 > anywhere, and > there is no driver that can actually recognize and attach to an =20 > ATAPI MO > drive. > > I modified the atapifd driver (src/sys/dev/ata/atapi-fd.c) to also =20 > recognize > ATA_ATAPI_TYPE_OPTICAL, and my drive was actually recognized during =20= > probing > as afd0, but afd_attach returned an error. It looks as if afd_sense=20= > () was > failing, which I'm guessing is because ATAPI MO drives (or mine, at =20= > least) > use a different capabilities page code and/or capabilities page =20 > structure > than ATAPI floppies. The atapi-fd driver uses 0x5 for its =20 > "Capabilities and > Mechanical Status" page code, while everything else (atapi-cd, =20 > atapi-tape) > uses 0x2a. All three drivers have distinctly different structures =20 > for this > page. > > So I'm wondering: do ATAPI MO drives use a capabilities page code/=20 > structure > more like CD/DVD drives, or do they have their own unique ATAPI page > structure? If so, where can I find a document outlining the =20 > structure? > > I've found loads of documents detailing the page structure for CD/=20 > DVD drives, > but nothing for MO drives (or floppies or tape drives for that =20 > matter). > > Also, beyond the capabilities page, are there any other special =20 > considerations > I'd need to make for an MO driver? I did plan to write such a driver back when, but HW seemed to have =20 disappeared from all the vendors I've asked so it was pu ton the =20 backburner. Anyhow I should have the docs somewhere so it should be possible to =20 get this working... S=F8ren Schmidt sos@FreeBSD.org