From patchwork Mon Jul 20 20:37:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmFsw4PCoXpzIEjDg8KhbW9yc3preQ==?= X-Patchwork-Id: 36412 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6KKbFNw026930 for ; Mon, 20 Jul 2009 20:37:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751159AbZGTUhM (ORCPT ); Mon, 20 Jul 2009 16:37:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752366AbZGTUhM (ORCPT ); Mon, 20 Jul 2009 16:37:12 -0400 Received: from mail-ew0-f226.google.com ([209.85.219.226]:42160 "EHLO mail-ew0-f226.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbZGTUhK (ORCPT ); Mon, 20 Jul 2009 16:37:10 -0400 Received: by ewy26 with SMTP id 26so2591162ewy.37 for ; Mon, 20 Jul 2009 13:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ThsbEQqXxTVgHm1Eg9OMMkONk7OJn0dZoO02X3wPV/I=; b=c43qyQTsYpF9BXJ7qbfZ6zHudacnJvN/ch9N2PI6VsIEkyK8UUWks3alEOWFkykZSZ hSUvcMmic/XezDeJmzhVf5eSCo/YQIqTRp3hLgQilBxfOuaQjpGOwy+B0/1qvLKMHuh4 4Z4HrXbdID2sdtkTgb1v2y5BWDTuNo+/x44/E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=CQn0Zbo4a1QuziXMlg8m5xt+mwjl4lz5SsdxfaLTa58DOljxDSE+iAKPVKOARMXuY/ 3aZOnG9fs4S7M0/ls1GpX1IuZ4ext5s7B44fDJuOULaSVvvLs+ONrrwl1McZ90bkcaSs KdbgNNYvcI0/OoXpH6yTvF0Q+L26RFyjG8WRg= MIME-Version: 1.0 Received: by 10.216.20.67 with SMTP id o45mr1331201weo.106.1248122228712; Mon, 20 Jul 2009 13:37:08 -0700 (PDT) In-Reply-To: <200907201949.n6KJnOdY016111@demeter.kernel.org> References: <200907201949.n6KJnOdY016111@demeter.kernel.org> Date: Mon, 20 Jul 2009 22:37:08 +0200 Message-ID: <5c3736670907201337n41f08957r94fcde4383dd74d9@mail.gmail.com> Subject: Re: [Bug 13708] Aiptek DV-T300 support is incomplete From: =?ISO-8859-1?Q?Bal=E1zs_H=E1morszky?= To: bugzilla-daemon@bugzilla.kernel.org, mchehab@infradead.org, Andrew Morton , linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org I don't have my kernel tree with me (I'm at vacation atm.). The patch is made with only the -uN options, but I can make a new one on Friday (if needed). Thanks for the help! On Mon, Jul 20, 2009 at 21:49, wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=13708 > > > Andrew Morton changed: > >           What    |Removed                     |Added > ---------------------------------------------------------------------------- >                 CC|                            |akpm@linux-foundation.org > > > > > --- Comment #2 from Andrew Morton  2009-07-20 19:49:22 --- > It's quite painful to handle patches via bugzilla.  Could you resend it via > email please?  Documentation/SubmittingPatches has some details. > > Suitable recipients are > > Mauro Carvalho Chehab > Andrew Morton > linux-media@vger.kernel.org > > Thanks. > > -- > Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You reported the bug. > --- zr364xx-nemmux-de-uj-2.6.30-upgrade-utan-20090704.c 2009-07-04 23:29:51.000000000 +0200 +++ zr364xx-nemmux-de-uj-2.6.30-upgrade-elott-20090627.c 2009-06-27 14:37:51.000000000 +0200 @@ -59,6 +59,7 @@ #define METHOD0 0 #define METHOD1 1 #define METHOD2 2 +#define METHOD3 3 /* Module parameters */ @@ -95,7 +96,7 @@ {USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 }, {USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 }, {USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 }, - {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD2 }, + {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD3 }, {} /* Terminating entry */ }; @@ -213,7 +214,7 @@ }; /* init table */ -static message *init[3] = { m0, m1, m2 }; +static message *init[4] = { m0, m1, m2, m2 }; /* JPEG static data in header (Huffman table, etc) */ @@ -347,6 +348,11 @@ cam->buffer[3], cam->buffer[4], cam->buffer[5], cam->buffer[6], cam->buffer[7], cam->buffer[8]); } else { + if (ptr + actual_length - jpeg > MAX_FRAME_SIZE) + { + DBG("frame too big!"); + return 0; + } memcpy(ptr, cam->buffer, actual_length); ptr += actual_length; } @@ -847,6 +853,22 @@ m0d1[0] = mode; m1[2].value = 0xf000 + mode; m2[1].value = 0xf000 + mode; + + /* special case for METHOD3, the modes are different */ + if (cam->method == METHOD3) { + switch (mode) { + case 1: + m2[1].value = 0xf000 + 4; + break; + case 2: + m2[1].value = 0xf000 + 0; + break; + default: + m2[1].value = 0xf000 + 1; + break; + } + } + header2[437] = cam->height / 256; header2[438] = cam->height % 256; header2[439] = cam->width / 256;