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: Multiple configurations problem



On Jun 28, 2005, at 5:07 PM, Mark Cookson wrote:


Why do I get this message when I turn on my device (bus powered):

   38.747 [5]    AppleUSBOHCI: CreateDevice: addr=5, speed=full, power=500
   42.260 [5]    AppleUSBComposite[0x1cd3400](foobar) ConfigureDevice Config 0 with MaxPower 100
   42.260 [5]    AppleUSBComposite[0x1cd3400](foobar) ConfigureDevice Config 1 with MaxPower 100 cannot be used (available: 250, previous 100)

Both of the configs specify the same amount of power required.  Is that a problem?  Is the second message for real?  Telling me that I can’t use the second config?  Because if so, perhaps that’s the source of my problem...  Anyway, here’s what I’m trying.



The composite driver is trying to find a configuration which (1) does not exceed the power available to the port, and (2) has more MaxPower than any other configuration.  The error  it is reporting is misleading.  It found the first config with MaxPower of 100 and then it sees the next config also having MaxPower of 100 and so it decides to use the first one.  So in your case, the message should be that Config 1 will not be  selected because we already have a configuration with the same amount of power.  Make sense?


With respect to your other problem:  We do not just use the bNumInterfaces field of the config descriptor to figure out how many interfaces there are:  We start with that and allocate our structures depending on bNumInterfaces.  However, we then go and find all the interface descriptors using FindNextDescriptor.  As you see in the sources, we iterate from i = 0 to i < bNumInterfaces.  However, we then check to see if we actually found the interfaceDescritpor before proceeding.  So, my guess is that your config descriptor does not actually have 6 interface descriptors but only 5.  Do you have a CATC trace where we get the full configuration descriptor?  This will show us how many interface descriptors there are.  You could also look at your config descriptor dump, but I'm guessing that it would be painful to decode all the descriptors in it.

HTH,

--
Fernando Urbina
USB Technology Team
Apple Computer, Inc.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Multiple configurations problem (From: Mark Cookson <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.