On Wed, 2011-01-19 at 16:14 -0500, Ben Dooks wrote: > On Wed, Jan 19, 2011 at 01:26:37PM -0800, Guenter Roeck wrote: > > Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> [ ... ] > > +/* Structure to hold all of our device specific stuff */ > > +struct i2c_diolan_u2c { > > + struct usb_device *usb_dev; /* the usb device for this device */ > > + struct usb_interface *interface;/* the interface for this device */ > > + struct i2c_adapter adapter; /* i2c related things */ > > + int olen; /* Output buffer length */ > > + int ocount; /* Number of enqueued messages */ > > + u8 obuffer[DIOLAN_OUTBUF_LEN]; /* output buffer */ > > + u8 ibuffer[DIOLAN_INBUF_LEN]; /* input buffer */ > > you should cache-line align the buffers to avoid any problems with > dma-vs-cache, etc. > There are several other drivers which don't cache-align the buffers used with usb_bulk_msg(). Do those all have potential problems, or is this only relevant for optimization ? If it is just for optimization, I'd argue that the speed here is so slow that it won't make much of a difference, if any, if the buffers were aligned. Thanks, Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html