Mailing Lists: Apple Mailing Lists

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

Re: usb digest, Vol 2 #598 - 5 msgs



Am Mittwoch, 01.10.03, um 07:00 Uhr (Europe/Berlin) schrieb Fernando Urbina <email@hidden>:

The problem is that if your IOMD is set for kIODirectionIn (i.e. For
reading), and you do a writeBytes() to it, it won't work. In that case,
search the system.log for some obscure messages about IOMD.


Sorry to say, but you're wrong. That's that we thought, too, but it's the other way around. Fortunately, the source is now available. Please check IOMemoryDescriptor.cpp, IOMemoryDescriptor::writeBytes().

Here is tested, if kIODirectionOut is set, and the routine refuses to accept writes then.
We've discussed this internally here and came to the conclusion:
kIODirectionOut is used synonymously to 'ReadOnly' (there's a comment in code about non-dirty pages, which need no special handling). This usage led to the confusion:
It seems, as if kIODirectionOut is considered as the direction from user space to kernel space (hence the kernel should read only there). Unfortunately, we had created that MD in kernel space to send data to USB. If we do this with kIODirectionOut, writeBytes refuses to work - in such a case kIODirectionOutIn or kIODirectionIn is appropriate.


Any comments?

Regards,

Gerd & Bernd.
--
Gerhard Weiss * Voice +49 621 7650 200 * Fax +49 621 7650 100
HERMSTEDT AG * Carl-Reuther-Str. 3 * 68305 Mannheim * Germany
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.



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.