Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 => TerraTec Cinergy T Stick [0ccd:0093]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 1 Apr 2012 18:24:09 +0200
"Hans-Frieder Vogt" <hfvogt@xxxxxxx> wrote:
> However, I found the problem: the buffer 
> length needs to be msg[1].len, see below.

I spotted this bug, too, but it didn't fix the problem, as len is 1 for
both packets in my specific case. So it doesn't make a difference in this case.

But as I said in the previous mail: I did more debugging and I'm pretty sure that
the actual i2c reads and writes work as expected. The problem is at another level.

>  --- old/af9035.c 2012-04-01 16:41:53.694103691 +0200
> +++ new/af9035.c    2012-04-01 18:22:25.026930784 +0200
> @@ -209,24 +209,15 @@
>                                         msg[1].len);
>                 } else {
>                         /* I2C */
> -#if 0
> -                       /*
> -                        * FIXME: Keep that code. It should work but as it is
> -                        * not tested I left it disabled and return -
> EOPNOTSUPP
> -                        * for the sure.
> -                        */
>                         u8 buf[4 + msg[0].len];
>                         struct usb_req req = { CMD_I2C_RD, 0, sizeof(buf),
>                                         buf, msg[1].len, msg[1].buf };
> -                       buf[0] = msg[0].len;
> +                       buf[0] = msg[1].len;
>                         buf[1] = msg[0].addr << 1;
>                         buf[2] = 0x01;
>                         buf[3] = 0x00;
>                         memcpy(&buf[4], msg[0].buf, msg[0].len);
>                         ret = af9035_ctrl_msg(d->udev, &req);
> -#endif
> -                       pr_debug("%s: I2C operation not supported\n", 
> __func__);
> -                       ret = -EOPNOTSUPP;
>                 }
>         } else if (num == 1 && !(msg[0].flags & I2C_M_RD)) {
>                 if (msg[0].len > 40) {

-- 
Greetings, Michael.

PGP encryption is encouraged / 908D8B0E

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux