Re: 2.6.30-rc2-git2: Reported regressions from 2.6.29

From: leiming
Date: Sat Apr 18 2009 - 00:51:46 EST


On Fri, 17 Apr 2009 19:55:29 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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
> potentially bigger number than the already allocated buffer, no?
>
> So I think it should round down (ie use a regular divide). No?

Yes,you are correct, please ignore my last reply, and following is
the fixed patch.

Thanks.