netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: leiming <tom.leiming@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Adrian Bunk <bunk@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Natalie Protasevich <protasnb@gmail.com>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux PM List <linux-pm@lists.linux-foundation.org>,
	Linux SCSI List <linux-scsi@vger.kernel.org>,
	video4linux-list@redhat.com, laurent.pinchart@skynet.be,
	mchehab@infradead.org
Subject: Re: 2.6.30-rc2-git2: Reported regressions from 2.6.29
Date: Sat, 18 Apr 2009 11:50:51 +0800	[thread overview]
Message-ID: <20090418115051.175f292f@linux-lm> (raw)
In-Reply-To: <alpine.LFD.2.00.0904171952260.4042@localhost.localdomain>

On Fri, 17 Apr 2009 19:55:29 -0700 (PDT)
Linus Torvalds <torvalds@linux-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

  reply	other threads:[~2009-04-18  3:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 21:42 2.6.30-rc2-git2: Reported regressions from 2.6.29 Rafael J. Wysocki
2009-04-17  0:40 ` Linus Torvalds
2009-04-17  1:25   ` Ingo Molnar
     [not found]     ` <20090417012544.GB16126-X9Un+BFzKDI@public.gmane.org>
2009-04-17 21:25       ` Rafael J. Wysocki
2009-04-17  0:41 ` David Miller
2009-04-17 21:27   ` Rafael J. Wysocki
2009-04-17  0:46 ` Linus Torvalds
2009-04-17 21:31   ` Rafael J. Wysocki
2009-04-17  1:28 ` Jeff Chua
2009-04-17  1:30 ` Zhang Rui
2009-04-17  2:34   ` yakui_zhao
2009-04-17 21:35   ` Rafael J. Wysocki
2009-04-17  1:37 ` Ming Lei
2009-04-17 21:36   ` Rafael J. Wysocki
2009-04-17 23:56     ` Laurent Pinchart
     [not found]       ` <200904180156.24366.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-04-18 12:29         ` Rafael J. Wysocki
2009-04-18  2:32     ` leiming
2009-04-18  2:55       ` Linus Torvalds
2009-04-18  3:50         ` leiming [this message]
2009-04-18  4:51         ` leiming
2009-04-18 12:33           ` Rafael J. Wysocki
2009-04-20 20:08           ` Laurent Pinchart
     [not found]             ` <200904202208.23899.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-04-21  1:47               ` Ming Lei
2009-04-21 23:21                 ` Laurent Pinchart
2009-05-09  3:28                   ` Ming Lei
2009-05-09 16:24                     ` Linus Torvalds
2009-05-09 21:37                       ` Mauro Carvalho Chehab
2009-04-24 13:44 ` Kalle Valo
     [not found]   ` <87ljpqqi89.fsf-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-04-25 21:57     ` Rafael J. Wysocki
     [not found] ` <200904170752.48078.edt@aei.ca>
     [not found]   ` <200904171648.38172.rjw@sisk.pl>
2009-04-26 13:35     ` Ed Tomlinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090418115051.175f292f@linux-lm \
    --to=tom.leiming@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@kernel.org \
    --cc=kernel-testers@vger.kernel.org \
    --cc=laurent.pinchart@skynet.be \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=protasnb@gmail.com \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).