From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1186C432C3 for ; Wed, 27 Nov 2019 21:21:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B6A021789 for ; Wed, 27 Nov 2019 21:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574889669; bh=7I0lFTe+1NEhYKeuw5K4FxjfDiPjGAU8oZZn+LzRD6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BI8BJOsV0D+c+gdEY1xxd+MrA/Q8NtHdzfkUjYqF9O0JG1qjJFCl3iUDDlizYEPPm kDQPQeNzol6mWjMpvzy5qjYLFVuBQA9M/vxourVZ3/EehFklOPoZXp2ktSj7kGM54w WEAVD2w6EDzJv570yKEoghmcmrg+QypHDWed5AvQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732189AbfK0VHr (ORCPT ); Wed, 27 Nov 2019 16:07:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:33978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732644AbfK0VHo (ORCPT ); Wed, 27 Nov 2019 16:07:44 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 59E8020637; Wed, 27 Nov 2019 21:07:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888863; bh=7I0lFTe+1NEhYKeuw5K4FxjfDiPjGAU8oZZn+LzRD6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A+/KiL1Kusauhpfm/2RyxsLHYLpIfsrUPLIXiQUpj2GR6Bcv1hvJ7KQf0q3NYzpFf Lf2ryCK8frwLhODjWVBlnqWzn658EDfpL1hGJ3FUOdS1gpeXYGZi1qfzybCLI7Jaz6 w7yOlLQEo8f0tqBgzA6H88ihggcG+JQnUoBM1skE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.19 299/306] USB: serial: mos7720: fix remote wakeup Date: Wed, 27 Nov 2019 21:32:29 +0100 Message-Id: <20191127203136.572198965@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Johan Hovold commit ea422312a462696093b5db59d294439796cba4ad upstream. The driver was setting the device remote-wakeup feature during probe in violation of the USB specification (which says it should only be set just prior to suspending the device). This could potentially waste power during suspend as well as lead to spurious wakeups. Note that USB core would clear the remote-wakeup feature at first resume. Fixes: 0f64478cbc7a ("USB: add USB serial mos7720 driver") Cc: stable # 2.6.19 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mos7720.c | 4 ---- 1 file changed, 4 deletions(-) --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -1894,10 +1894,6 @@ static int mos7720_startup(struct usb_se product = le16_to_cpu(serial->dev->descriptor.idProduct); dev = serial->dev; - /* setting configuration feature to one */ - usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), - (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000); - if (product == MOSCHIP_DEVICE_ID_7715) { struct urb *urb = serial->port[0]->interrupt_in_urb;