From patchwork Fri May 8 02:48:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "figo.zhang" X-Patchwork-Id: 22501 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 n482jP2X030011 for ; Fri, 8 May 2009 02:48:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756374AbZEHCsa (ORCPT ); Thu, 7 May 2009 22:48:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755471AbZEHCsa (ORCPT ); Thu, 7 May 2009 22:48:30 -0400 Received: from mail.kolorific.com ([61.63.28.39]:40752 "EHLO mail.kolorific.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758857AbZEHCs3 (ORCPT ); Thu, 7 May 2009 22:48:29 -0400 Received: from [172.16.3.6] (unknown [116.228.155.46]) by mail.kolorific.com (Postfix) with ESMTP id 665D0F50053; Fri, 8 May 2009 10:48:27 +0800 (CST) Subject: [PATCH][RESEND]saa7134-video.c: fix the block bug From: "figo.zhang" To: kraxel@bytesex.org, Hans Verkuil , Mauro Carvalho Chehab Cc: g.liakhovetski@gmx.de, linux-media@vger.kernel.org, figo1802@126.com Date: Fri, 08 May 2009 10:48:24 +0800 Message-Id: <1241750904.3420.26.camel@myhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org when re-open or re-start (video_streamon), the q->curr would not be NULL in saa7134_buffer_queue(), and all the qbuf will add to q->queue list,no one to do activate to start DMA,and then no interrupt would happened,so it will be block. In VIDEOBUF_NEEDS_INIT state , initial the curr pointer to be NULL in the buffer_prepare() function. Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 493cad9..550d6ce 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -1057,6 +1057,7 @@ static int buffer_prepare(struct videobuf_queue *q, buf->vb.field = field; buf->fmt = fh->fmt; buf->pt = &fh->pt_cap; + dev->video_q.curr = NULL; err = videobuf_iolock(q,&buf->vb,&dev->ovbuf); if (err)