All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Frank Schäfer" <fschaefer.oss@googlemail.com>
Subject: Re: [PATCH 0/3] em28xx: add support for two buses on em2874 and upper
Date: Mon, 18 Mar 2013 18:17:39 -0300	[thread overview]
Message-ID: <20130318181739.7bccd1d4@redhat.com> (raw)
In-Reply-To: <CAGoCfiwB9BT2mDQqu2cwsRM-0eraqyxdY0V3fnH+S2RSNiGSdQ@mail.gmail.com>

Em Tue, 5 Mar 2013 10:43:10 -0500
Devin Heitmueller <dheitmueller@kernellabs.com> escreveu:

> 2013/3/5 Mauro Carvalho Chehab <mchehab@redhat.com>:
> > The em2874 chips and upper have 2 buses. On all known devices, bus 0 is
> > currently used only by eeprom, and bus 1 for the rest. Add support to
> > register both buses.
> 
> Did you add a mutex to ensure that both buses cannot be used at the
> same time?  Because using the bus requires you to toggle a register
> (thus you cannot be using both busses at the same time), you cannot
> rely on the existing i2c adapter lock anymore.
> 
> You don't want a situation where something is actively talking on bus
> 0, and then something else tries to talk on bus 1, flips the register
> bit and then the thread talking on bus 0 starts failing.

Good point. The I2C mutex won't solve for this case. I'll add a mutex
there at the xfer function on a separate patch.

Cheers,
Mauro

      parent reply	other threads:[~2013-03-18 21:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 10:55 [PATCH 0/3] em28xx: add support for two buses on em2874 and upper Mauro Carvalho Chehab
2013-03-05 10:55 ` [PATCH 1/3] em28xx: Prepare to support 2 different I2C buses Mauro Carvalho Chehab
2013-03-05 10:55 ` [PATCH 2/3] em28xx: Add a separate config dir for secondary bus Mauro Carvalho Chehab
2013-03-06 16:40   ` Frank Schäfer
2013-03-18 21:22     ` Mauro Carvalho Chehab
2013-03-05 10:55 ` [PATCH 3/3] em28xx: add support for registering multiple i2c buses Mauro Carvalho Chehab
2013-03-06 16:53   ` Frank Schäfer
2013-03-18 22:36     ` Mauro Carvalho Chehab
2013-03-05 15:43 ` [PATCH 0/3] em28xx: add support for two buses on em2874 and upper Devin Heitmueller
2013-03-06 17:44   ` Frank Schäfer
2013-03-18 21:22     ` Mauro Carvalho Chehab
2013-04-01 17:14       ` Frank Schäfer
2013-04-01 19:22         ` Mauro Carvalho Chehab
2013-04-01 20:39           ` Frank Schäfer
2013-04-01 22:12             ` Mauro Carvalho Chehab
2013-04-01 22:14               ` Mauro Carvalho Chehab
2013-04-02  0:48                 ` Devin Heitmueller
2013-04-02 19:06                   ` Frank Schäfer
2013-04-02 19:02               ` Frank Schäfer
2013-04-02 22:44                 ` Mauro Carvalho Chehab
2013-03-18 21:17   ` Mauro Carvalho Chehab [this message]

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=20130318181739.7bccd1d4@redhat.com \
    --to=mchehab@redhat.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.