On Fri, 6 Jan 2006, Oliver Neukum wrote: > Am Freitag, 6. Januar 2006 22:59 schrieb Alan Stern: > > On Fri, 6 Jan 2006, Oliver Neukum wrote: > > > > > > Perhaps you are overreacting. Even though the total size of the > > > > structure > > > > may be 4, I bet that bLength and bDescriptorType still occupy just the > > > > first two bytes of the structure. Assuming this is so, there's nothing > > > > wrong with the existing headers. > > > > > > Data will be copied directly adjacent to this structure. > > > > Where does that happen? As far as I know, the usb_descriptor_header > > structure is only ever used as an alias pointer into the start of a real > > descriptor. > > Sorry. I confused it with usb_device_descriptor which is appended to in > devio.c > WHich is packed. Considering pure alignment it shouldn't be. Yet there seems > to be a problem in arm. Can you shed light on this?
Not without knowing a little more about what's going wrong. Where's the problem? What makes you think it's an alignment issue? Why struct usb_descriptor_header? I don't know why struct usb_device_descriptor is packed. In fact, most of the structures defined in usb_ch9.h are packed for no apparent reason. Maybe it's so you can dereference descriptors embedded in the rawdescriptors array; those definitely are _not_ aligned. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel