lkml.org 
[lkml]   [2004]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: drivers/block/ub.c
Date
Am Samstag, 26. Juni 2004 23:41 schrieb David S. Miller:
> On Sat, 26 Jun 2004 22:35:15 +0200
> Oliver Neukum <oliver@neukum.org> wrote:
>
> >
> > > +/* command block wrapper */
> > > +struct bulk_cb_wrap {
> > > + u32 Signature; /* contains 'USBC' */
> > > + u32 Tag; /* unique per command id */
> > > + u32 DataTransferLength; /* size of data */
> > > + u8 Flags; /* direction in bit 0 */
> > > + u8 Lun; /* LUN normally 0 */
> > > + u8 Length; /* of of the CDB */
> > > + u8 CDB[MAX_CDB_SIZE]; /* max command */
> > > +};
> >
> > should be packed attributed
>
> Only when necessary, and I do not belive any platform Linux supports
> needs it in this case.
>
> Packed attributing is _BAD_ when it isn't needed because it forces GCC
> to output multiple byte-sized loads in order to access larger than
> byte-sized elements because it cannot assume the proper alignment on RISC
> systems.

Unless I am mistaken, this structure is transfered as such over the bus,
so IMHO here it is needed.

Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans