[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090418115051.175f292f@linux-lm>
Date: Sat, 18 Apr 2009 11:50:51 +0800
From: leiming <tom.leiming@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Adrian Bunk <bunk@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Natalie Protasevich <protasnb@...il.com>,
Kernel Testers List <kernel-testers@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>,
Linux PM List <linux-pm@...ts.linux-foundation.org>,
Linux SCSI List <linux-scsi@...r.kernel.org>,
video4linux-list@...hat.com, laurent.pinchart@...net.be,
mchehab@...radead.org
Subject: Re: 2.6.30-rc2-git2: Reported regressions from 2.6.29
On Fri, 17 Apr 2009 19:55:29 -0700 (PDT)
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> @@ -742,7 +742,7 @@ static int uvc_alloc_urb_buffers(struct
> > uvc_video_device *video,
> > /* Buffers are already allocated, bail out. */
> > if (video->urb_size)
> > - return 0;
> > + return DIV_ROUND_UP(video->urb_size, psize);
>
> I don't think this is right. It should round _down_.
>
> It's supposed to return 'npackets', but if you pass it a different
> packet size than it was passed originally, it can now return a
Now uvc only uses the previous allocated buffer in suspend/resume
path, so the packet size doen't change in this path.
> potentially bigger number than the already allocated buffer, no?
If this case does exist, the URBs need to be updated and the patch is
not enough.
>
> So I think it should round down (ie use a regular divide). No?
Because the following fact:
uvc_alloc_urb_buffers()
{
...
video->urb_size = psize * npackets;
...
}
so DIV_ROUND_UP still can work correctly.
Thanks!
--
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists