From patchwork Mon Apr 14 12:12:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3980341 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A61779F2BA for ; Mon, 14 Apr 2014 12:13:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBC37201F5 for ; Mon, 14 Apr 2014 12:13:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF159201ED for ; Mon, 14 Apr 2014 12:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752370AbaDNMNB (ORCPT ); Mon, 14 Apr 2014 08:13:01 -0400 Received: from top.free-electrons.com ([176.31.233.9]:58511 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751519AbaDNMNA (ORCPT ); Mon, 14 Apr 2014 08:13:00 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id C6B898E5; Mon, 14 Apr 2014 14:12:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost (unknown [190.2.108.71]) by mail.free-electrons.com (Postfix) with ESMTPSA id DC40960F; Mon, 14 Apr 2014 14:12:58 +0200 (CEST) Date: Mon, 14 Apr 2014 09:12:31 -0300 From: Ezequiel Garcia To: Sander Eikelenboom Cc: Hans Verkuil , Dan Williams , linux-media@vger.kernel.org, Mauro Carvalho Chehab , linux-usb@vger.kernel.org Subject: Re: stk1160 / ehci-pci 0000:00:0a.0: DMA-API: device driver maps memory fromstack [addr=ffff88003d0b56bf] Message-ID: <20140414121231.GA6393@arch.cereza> References: <438386739.20140413224553@eikelenboom.it> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <438386739.20140413224553@eikelenboom.it> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Apr 13, Sander Eikelenboom wrote: > > I'm hitting this warning on boot with a syntek usb video grabber, it's not clear > to me if it's a driver issue of the stk1160 or a generic ehci issue. > Can't reproduce the same warning easily here. Could you test the following patch? diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index 34a26e0..304fdb3 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -71,13 +71,14 @@ int stk1160_read_reg(struct stk1160 *dev, u16 reg, u8 *value) *value = 0; ret = usb_control_msg(dev->udev, pipe, 0x00, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - 0x00, reg, value, sizeof(u8), HZ); + 0x00, reg, dev->urb_buf, sizeof(u8), HZ); if (ret < 0) { stk1160_err("read failed on reg 0x%x (%d)\n", reg, ret); return ret; } + *value = dev->urb_buf[0]; return 0; }