netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: Wolfram Sang <wsa@kernel.org>
Cc: "Russell King - ARM Linux admin" <linux@armlinux.org.uk>,
	"Andrew Lunn" <andrew@lunn.ch>,
	netdev@vger.kernel.org, "Pali Rohár" <pali@kernel.org>,
	linux-i2c@vger.kernel.org
Subject: Re: question about i2c_transfer() function (regarding mdio-i2c on RollBall SFPs)
Date: Thu, 7 Jan 2021 22:42:11 +0100	[thread overview]
Message-ID: <20210107224211.4f01c055@nic.cz> (raw)
In-Reply-To: <20210107210248.GA894@kunai>

On Thu, 7 Jan 2021 22:02:48 +0100
Wolfram Sang <wsa@kernel.org> wrote:

> > My question is whether this is allowed, whether the msgs array passed
> > to the i2c_transfer() function can have multiple msgs pointing to the
> > same buffer (the one into which the original page is first stored
> > with first i2c_msg and then restored from it in the last i2c_msg).  
> 
> Sending the messages is serialized, so the buffers won't interfere. At
> first glance, I think it would work this way. But it's late evening
> here, so I will have another look again tomorrow.
> 

I thought as much, but maybe there is some driver which can offload
whole i2c_transfer to HW, and has to pass the addresses of the buffers
to the HW, and the HW can have problems if the buffers overlap
somewhere...

Marek

  reply	other threads:[~2021-01-07 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 18:25 question about i2c_transfer() function (regarding mdio-i2c on RollBall SFPs) Marek Behun
2021-01-07 21:02 ` Wolfram Sang
2021-01-07 21:42   ` Marek Behun [this message]
2021-01-08  8:40     ` Wolfram Sang

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=20210107224211.4f01c055@nic.cz \
    --to=marek.behun@nic.cz \
    --cc=andrew@lunn.ch \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=wsa@kernel.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;
as well as URLs for NNTP newsgroup(s).