public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: Patrick Boettcher <patrick.boettcher@desy.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] Support faulty USB IDs on DIBUSB_MC
Date: Thu, 29 Jan 2009 21:46:32 +0100	[thread overview]
Message-ID: <498215A8.3020203@free.fr> (raw)
In-Reply-To: <49820C26.5090309@free.fr>

matthieu castet wrote:
> Hi Patrick,
> 
> Patrick Boettcher wrote:
>> Hi,
>>
>> sorry for not answering ealier, recently I became the master of 
>> postponing things. :(
>>
>> On Thu, 29 Jan 2009, Mauro Carvalho Chehab wrote:
>>
>>>> +/* 14 */    { USB_DEVICE(USB_VID_CYPRESS,        
>>>> USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) },
>>>> +#endif
>>>
>>> It doesn't sound a very good approach the need of recompiling the 
>>> driver to
>>> allow it to work with a broken card. The better would be to have some 
>>> modprobe
>>> option to force it to accept a certain USB ID as a valid ID for the 
>>> card.
>>
>> The most correct way would be to reprogram the eeprom, by simply 
>> writing to 0xa0 (0x50 << 1) I2C address... There was a thread on the 
>> linux-dvb some time ago.
>>
BTW dibusb_i2c_xfer seems to do things very dangerous :
it assumes that it get only write/read request or write request.

That means that read can be understood as write. For example a program 
doing
file = open("/dev/i2c-x", O_RDWR);
ioctl(file, I2C_SLAVE, 0x50)
  read(file, data, 10)
will corrupt the eeprom as it will be understood as a write.

Now that I think of that, I run sensors-detect on this machine, may be 
this is what trash the eeprom ?


Matthieu

  reply	other threads:[~2009-01-29 20:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07 11:36 [linux-dvb] [PATCH] Support faulty USB IDs on DIBUSB_MC matthieu castet
2009-01-19 20:38 ` matthieu castet
2009-01-29  9:47   ` Mauro Carvalho Chehab
2009-01-29 10:19     ` Patrick Boettcher
2009-01-29 12:05       ` Mauro Carvalho Chehab
2009-01-29 13:08         ` Patrick Boettcher
2009-01-29 13:34           ` Mauro Carvalho Chehab
2009-01-29 20:05       ` matthieu castet
2009-01-29 20:46         ` matthieu castet [this message]
2009-02-09 19:40           ` matthieu castet
2009-02-09 19:44             ` [linux-dvb] " Devin Heitmueller
2009-02-09 20:16               ` matthieu castet
2009-02-09 20:32                 ` Devin Heitmueller
2009-02-09 19:51             ` Devin Heitmueller
2009-05-16 13:08           ` [PATCH] DIBUSB_MC : fix i2c to not corrupt eeprom in case of strange read pattern matthieu castet
2009-05-20  8:42             ` Patrick Boettcher

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=498215A8.3020203@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=patrick.boettcher@desy.de \
    /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