All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: "Frank Schäfer" <fschaefer.oss@googlemail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 3/4] em28xx-i2c: do not map -ENXIO errors to -ENODEV for empty i2c transfers
Date: Tue, 04 Feb 2014 16:47:34 -0200	[thread overview]
Message-ID: <20140204164734.62354b70@samsung.com> (raw)
In-Reply-To: <1390168117-2925-4-git-send-email-fschaefer.oss@googlemail.com>

Em Sun, 19 Jan 2014 22:48:36 +0100
Frank Schäfer <fschaefer.oss@googlemail.com> escreveu:

> Commit e63b009d6e "" changed the error codes i2c ACK errors from -ENODEV to -ENXIO.
> But it also introduced a line that maps -ENXIO back to -ENODEV in case of empty i2c
> messages, which makes no sense, because
> 1.) an ACK error is an ACK error no matter what the i2c message content is
> 2.) -ENXIO is perfectly suited for probing, too

I don't agree with this patch. 0-byte messages are only usin during device
probe.

> 3.) we are loosing the ability to distinguish USB device disconnects

Huh?

> 
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>  drivers/media/usb/em28xx/em28xx-i2c.c |    1 -
>  1 Datei geändert, 1 Zeile entfernt(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
> index ba6433c..a26d7d4 100644
> --- a/drivers/media/usb/em28xx/em28xx-i2c.c
> +++ b/drivers/media/usb/em28xx/em28xx-i2c.c
> @@ -539,7 +539,6 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
>  				if (rc == -ENXIO) {
>  					if (i2c_debug > 1)
>  						printk(KERN_CONT " no device\n");
> -					rc = -ENODEV;
>  				} else {
>  					if (i2c_debug > 1)
>  						printk(KERN_CONT " ERROR: %i\n", rc);


-- 

Cheers,
Mauro

  reply	other threads:[~2014-02-04 18:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-19 21:48 [PATCH 0/4] em28xx: resolve the remaining issues with the i2c code Frank Schäfer
2014-01-19 21:48 ` [PATCH 1/4] em28xx-i2c: fix the i2c error description strings for -ENXIO Frank Schäfer
2014-01-19 21:48 ` [PATCH 2/4] em28xx-i2c: fix the error code for unknown errors Frank Schäfer
2014-01-19 21:48 ` [PATCH 3/4] em28xx-i2c: do not map -ENXIO errors to -ENODEV for empty i2c transfers Frank Schäfer
2014-02-04 18:47   ` Mauro Carvalho Chehab [this message]
2014-02-09 18:34     ` Frank Schäfer
2014-02-11 23:51       ` Antti Palosaari
2014-01-19 21:48 ` [PATCH 4/4] em28xx-i2c: remove duplicate error printing code from em28xx_i2c_xfer() Frank Schäfer
2014-02-04 18:50   ` Mauro Carvalho Chehab
2014-02-09 18:38     ` Frank Schäfer

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=20140204164734.62354b70@samsung.com \
    --to=m.chehab@samsung.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.