cvs commit: src/share/man/man9 bus_dma.9

Justin T. Gibbs gibbs at scsiguy.com
Sat Jun 14 12:13:23 PDT 2003


> It sure doesn't make sense to combine PREREAD and POSTREAD or PREWRITE
> and POSTWRITE, but I don't see what would be wrong with
> PREREAD|POSTWRITE or POSTREAD|PREWRITE.  One can imagine a scenario
> where the device is DMA'ing some data to memory and where you DMA it
> back to the device, and thus you would like to do a POSTREAD|PREWRITE.
> I agree that this sounds unlikely

...

It is not only unlikely, but it makes no sense.  Why would you acknowledge
the completion of a device dma only to turn right around and send it
*unaltered* right back to the device?  The only possible scenario I can
think is a contrived example of verifying the integrity of the dma path.
This is not a case that needs to be optimized so why force the sync operation
implementations to support it?

> Anyways, whether it's useful or not, I believe it would be more
> consistent with other manpages to leave things as is and maybe add a
> comment to tell that some combinations make no sense.

It shouldn't be the manpage that forces the implementation.  If you find
that having flags that allow undefined behavior is "unclean", lets just
change the implementation so that you specify only one value out of
an enumeration and provide explict values for any allowed combined
operations.

--
Justin



More information about the cvs-src mailing list