[linux-dvb] [PATCH] Support faulty USB IDs on DIBUSB_MC

matthieu castet castet.matthieu at free.fr
Mon Feb 9 20:40:44 CET 2009


Hi,

matthieu castet wrote:
> 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.
> 
Patrick, any info about that.

I attach a possible (untested) patch.


Matthieu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dibusb_i2c
Url: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20090209/82f9874c/attachment.txt 


More information about the linux-dvb mailing list