Re: [PATCH v2 1/2] i2c/busses: Diolan U2C-12 USB/I2C adapter driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux