Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[darwin-kernel] IODMACommands, prepare, and writeBytes



Hello List,

I dislike crossposting, like most people, but as ata-scsi-dev seems to be rather deserted, forgive me if I repost this on darwin-kernel

We are writing a SCSI HBA, which wants to use DMA. However, some things -- such as inquiries -- are caught in the driver area. This information is then to be copied from a local buffer to the IOMemoryDescriptor of the SCSIParallelTaskIdentifier (obtained from GetDataBuffer) using writeBytes.

So far, so good.

Now, other commands (notably read and write), are to get their data via DMA, and here is the probelm:

Documentation tells us we can not prepare anything in a gated context. Other documentation tells us to use a commandGate for synchronization. This means, we have to prepare outside of the gated context.

If we prepare the memory descriptor, writeBytes reports success, but no bytes are delivered to a _ user space process _ sending an inquiry command via the SCSI Task User Client (the kernel is apparently able to query our drive still)

If we don't prepare the memory, generating segments fails with 0xe00002d8, "not ready".

We would not like having to make a distinction prior to the gated context, if we are or are not going to use DMA. How can we handle this issue?

Thanks for any hints and pointers

Alex

P.S. A DTS Incident for this has been filed, 34298181, but I wanted to see if the all-knowing list has some insight, too
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.