Linux I2C development
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
To: Ben Dooks <ben-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 1/2] i2c/busses: Diolan U2C-12 USB/I2C adapter driver
Date: Wed, 19 Jan 2011 14:16:13 -0800	[thread overview]
Message-ID: <1295475373.9786.422.camel@groeck-laptop> (raw)
In-Reply-To: <20110119211403.GM5432-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>

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-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
 [ ... ]

> > +/* 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

  parent reply	other threads:[~2011-01-19 22:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 21:26 [PATCH v2 0/2] Add support for Diolan U2C-12 USB/I2C adapter Guenter Roeck
     [not found] ` <1295472398-705-1-git-send-email-guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-01-19 21:26   ` [PATCH v2 1/2] i2c/busses: Diolan U2C-12 USB/I2C adapter driver Guenter Roeck
     [not found]     ` <1295472398-705-2-git-send-email-guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-01-19 21:14       ` Ben Dooks
     [not found]         ` <20110119211403.GM5432-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-01-19 21:47           ` Guenter Roeck
2011-01-19 22:16           ` Guenter Roeck [this message]
2011-01-26 23:49             ` Ben Dooks
2011-01-19 21:26   ` [PATCH v2 2/2] MAINTAINERS: Add maintainer for Diolan U2C-12 I2C " Guenter Roeck
     [not found]     ` <1295472398-705-3-git-send-email-guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-01-19 20:56       ` Ben Dooks
     [not found]         ` <20110119205631.GL5432-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-01-19 21:10           ` Guenter Roeck
2011-01-26 23:47             ` Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295475373.9786.422.camel@groeck-laptop \
    --to=guenter.roeck-izefyvvap7pwk0htik3j/w@public.gmane.org \
    --cc=ben-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox