Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp548975iog; Mon, 13 Jun 2022 07:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4cGdmgR0cOoj9tuT2eD2mQFs8DiCteVhNKmF6COH9LoYCEfD844+AH0JE25C3Uu0Lp6fI X-Received: by 2002:a05:6402:160b:b0:431:35df:63c0 with SMTP id f11-20020a056402160b00b0043135df63c0mr161817edv.124.1655132270896; Mon, 13 Jun 2022 07:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655132270; cv=none; d=google.com; s=arc-20160816; b=jJ7HMxhuIgi1qmPc1hjr6aYarmaPY21FNI4LFPvypZHPra82mOupKCofs6UzsjTs3l y/agSBzr8ABE3urGAA270gHOQmkNY+7eUWcYS7/eLwzd8MC8AzOTYhPnAIz5VqiG9uTo P4dLRs11Tk2sN8m2+bxTDvB3q2CTHyNus+O6YT+O60uMUGcSs2uNRt86bHdfgYVrggKo iQ2wZyQQ+obQWWNXyzbJfmPivLN/pX6xFUzM1HIsXFZ0JFtPH8ewklZcTQ0HvgdKHltC +Q4qP6SKRiBD4RZdNGfHZCZxA/fgOrFBQyDXRj2l2KG+tq+tynBJtaoDgTtWPsd+RkF0 e2Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5TCXQOe9LW4wEOl11fr9IP8rYjVy8KBQOGkzM9Pi3cs=; b=wv28bZvA2YSXjD4lYyUlf0WgWFj6RWSQ7ZeoVzX/Y2QSIG9Xt8azRFe9TV4DhE/8wj 6qDc9Tr0LJhAO2kUYv6n5ROEPOruMr4ipiObQzuSrUhUov1MhIjKY2L69If3RPBcVAKD UmIQPb2uRCUR98C1KbG/O8mf+T1cKO5ktKouYGDnEFKKuAbsw2KIWQR+mbi2LzOQ6Bi+ PTjwi0HecmSqGtynJPtCnSMQfZm0h/HycRIbB+0ieyYByGS39s9ipkt0eiKChqaAMBXi obFHMEWnaeo3rQFrlMX76lWFdPuXLzNa3X4SdaaCT8DXf2dj+FoqIbm6VujiJJwz2KPY GEfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U4vCVgSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd29-20020a170907629d00b0070ec2ee783esi8376775ejc.841.2022.06.13.07.57.25; Mon, 13 Jun 2022 07:57:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U4vCVgSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244607AbiFMKct (ORCPT + 99 others); Mon, 13 Jun 2022 06:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345938AbiFMKaM (ORCPT ); Mon, 13 Jun 2022 06:30:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9FAB2127E; Mon, 13 Jun 2022 03:21:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B006FB80E5C; Mon, 13 Jun 2022 10:21:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 070C7C3411C; Mon, 13 Jun 2022 10:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115660; bh=aRZPBIfUmeY/7zsPHU6zZqXyFI7wRPCiXmi7Q4AB3YU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U4vCVgSGEDAM8ykTXbIk4mxe5aj0lA3vwebwm2a00DU3Mz4uj305TXd1/XqSTyl61 jLUHaQzECxE3NBEQug6F6t4n+hUkayvhmhAv1M9SsBfkM6UQErH/V9EZ6MLOiFaiAH KO6G4g2EfbqBLUIh9Fyc0/qxusPv6GI1QG6tFxuI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathias Nyman , Dmitry Torokhov Subject: [PATCH 4.9 163/167] Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag Date: Mon, 13 Jun 2022 12:10:37 +0200 Message-Id: <20220613094919.196551093@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathias Nyman commit c42e65664390be7c1ef3838cd84956d3a2739d60 upstream. The bcm5974 driver does the allocation and dma mapping of the usb urb data buffer, but driver does not set the URB_NO_TRANSFER_DMA_MAP flag to let usb core know the buffer is already mapped. usb core tries to map the already mapped buffer, causing a warning: "xhci_hcd 0000:00:14.0: rejecting DMA map of vmalloc memory" Fix this by setting the URB_NO_TRANSFER_DMA_MAP, letting usb core know buffer is already mapped by bcm5974 driver Signed-off-by: Mathias Nyman Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=215890 Link: https://lore.kernel.org/r/20220606113636.588955-1-mathias.nyman@linux.intel.com Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/bcm5974.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -956,17 +956,22 @@ static int bcm5974_probe(struct usb_inte if (!dev->tp_data) goto err_free_bt_buffer; - if (dev->bt_urb) + if (dev->bt_urb) { usb_fill_int_urb(dev->bt_urb, udev, usb_rcvintpipe(udev, cfg->bt_ep), dev->bt_data, dev->cfg.bt_datalen, bcm5974_irq_button, dev, 1); + dev->bt_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + } + usb_fill_int_urb(dev->tp_urb, udev, usb_rcvintpipe(udev, cfg->tp_ep), dev->tp_data, dev->cfg.tp_datalen, bcm5974_irq_trackpad, dev, 1); + dev->tp_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + /* create bcm5974 device */ usb_make_path(udev, dev->phys, sizeof(dev->phys)); strlcat(dev->phys, "/input0", sizeof(dev->phys));