Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 1999 12:54:54 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        nick.hibma@jrc.it (Nick Hibma)
Cc:        imp@village.org (Warner Losh), wilko@yedi.iaf.nl (Wilko Bulte), FreeBSD-hackers@FreeBSD.ORG
Subject:   Re: CAM-ification - documentation
Message-ID:  <199910081854.MAA03648@panzer.kdm.org>
In-Reply-To: <Pine.GS4.4.10.9910081004310.3456-100000@elect8> from Nick Hibma at "Oct 8, 1999 10:09:49 am"

next in thread | previous in thread | raw e-mail | index | archive | help
[ reply moved the bottom... ]

Nick Hibma wrote...
>  > Warner Losh wrote...
>  > > In message <199910072201.AAA43983@yedi.iaf.nl> Wilko Bulte writes:
>  > > : How difficult would CAMifying a driver be?
>  > > 
>  > > Speaking of which, has a "How to CAMify a driver" doc been written?
>  > 
>  > Nope.  You've CAMified a driver, would you like to write it? :)
>  > 
>  > Ken
>  > 
> 
> While on the topic: What documentation is there for CAM? I've found the
> following, but would like to know whether there is more 
> 
> - CAM specification (at Digital?)

www.t10.org, as Matt pointed out.  FreeBSD/CAM is mostly CAM-2, with some
CAM-3 thrown in.

> - justin's docu on freefall.
> 
> Especially some help on the topic of polling would be appreciated.
> Otherwise I'll have to resort to figuring out how to do things in
> interrupt context, and that is going to be dirty.

Well, first off, are you talking about polling for completion in a
peripheral driver or a SIM/HBA driver?  If you're looking to poll for CCB
completion in a peripheral driver, there's already xpt_polled_action() and
an example of how to use it in dadump() in scsi_da.c.

If you're talking about polling for transaction completion in a device
driver, my guess is that you're going to have to do things in an interrupt
context.  (Unless you use a kernel process to do it.)

The thing to remember is that when you get CCBs down in a CAM device
driver, it may well be in an interrupt context.  You have to be able to
deal with that.  My guess is that it might be easiest to just use a timeout
handler to poll the device for completion every so often.  A kernel process
may also be an option, depending on how nasty the device is.

I would recommend talking to Justin about it.  I'm sure he'll be glad to
give you some recommendations on how to proceed.  He's also not the only
one who knows about this sort of stuff.  By now, Matt Jacob has a reasonable
amount of experience with CAM drivers and he may also be able to give you
some advice.

Ken
-- 
Kenneth Merry
ken@kdm.org


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?199910081854.MAA03648>