Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753101AbcKGMxv (ORCPT ); Mon, 7 Nov 2016 07:53:51 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:59287 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751970AbcKGMxu (ORCPT ); Mon, 7 Nov 2016 07:53:50 -0500 Date: Mon, 7 Nov 2016 10:53:42 -0200 From: Mauro Carvalho Chehab To: Johannes Stezenbach Cc: VDR User , Linux Media Mailing List , Mauro Carvalho Chehab , Andy Lutomirski , Jiri Kosina , Patrick Boettcher , Linux Kernel Mailing List , Andy Lutomirski , Michael Krufky , Mauro Carvalho Chehab , =?UTF-8?B?SsO2cmc=?= Otte Subject: Re: [PATCH v2 18/31] gp8psk: don't do DMA on stack Message-ID: <20161107105342.2ea517bb@vento.lan> In-Reply-To: <20161107112947.qlxpzhxi5k3w7ajz@linuxtv.org> References: <632081ba085ddf0ded63cce3dbcf3870485d3cd3.1476179975.git.mchehab@s-opensource.com> <20161107112947.qlxpzhxi5k3w7ajz@linuxtv.org> Organization: Samsung X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1718 Lines: 46 Em Mon, 7 Nov 2016 12:29:47 +0100 Johannes Stezenbach escreveu: > On Sun, Nov 06, 2016 at 11:51:14AM -0800, VDR User wrote: > > I applied this patch to the 4.8.4 kernel driver (that I'm currently > > running) and it caused nothing but "frontend 0/0 timed out while > > tuning". Is there another patch that should be used in conjunction > > with this? If not, this patch breaks the gp8psk driver. > > > > Thanks. > > Thanks for testing. "If it's not tested it's broken"... > > > On Tue, Oct 11, 2016 at 3:09 AM, Mauro Carvalho Chehab > > wrote: > > > > index 5d0384dd45b5..fa215ad37f7b 100644 > > > --- a/drivers/media/usb/dvb-usb/gp8psk.c > > > +++ b/drivers/media/usb/dvb-usb/gp8psk.c > > > > int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) > > > { > > > + struct gp8psk_state *st = d->priv; > > > int ret = 0,try = 0; > > > > > > if ((ret = mutex_lock_interruptible(&d->usb_mutex))) > > > return ret; > > > > > > while (ret >= 0 && ret != blen && try < 3) { > > > + memcpy(st->data, b, blen); > > > ret = usb_control_msg(d->udev, > > > usb_rcvctrlpipe(d->udev,0), > > > req, > > > USB_TYPE_VENDOR | USB_DIR_IN, > > > - value,index,b,blen, > > > + value, index, st->data, blen, > > > 2000); > > I guess for usb_in the memcpy should be after the usb_control_msg > and from st->data to b. Yes, this should fix the issue. Just sent a patch with Johannes suggestion. Please test. Regards, Mauro