Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp866180ybl; Thu, 22 Aug 2019 06:10:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvILUOzpyCOuHIngeYq9CssWvnrLHvS3Ka9xI+hLvChOhKLLp6psAudytNu86oxHd1MYHD X-Received: by 2002:aa7:8757:: with SMTP id g23mr656157pfo.63.1566479403496; Thu, 22 Aug 2019 06:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566479403; cv=none; d=google.com; s=arc-20160816; b=wDBpdjE+shsBoQrjqeRuK823NUfIcEpvNevRlvKfn3Fn+SzECNK3nRyNLBE3ahDXwa mEz0bYVGWDEZ9rrPIRUOZ37nhSHxcTBeZ55Na049kLKuL4enZ2gsA8iqTQJVLfIgk8H+ Fg1ugfyQok4CkpKKi8yx0bOuTt9Z2t72gGPV7+/d6RKBjMGRY1IdkTYsCSHhvpraHpNM hRaueeUgDsYZFT3HzIk2D5Sm0KtGy5rbZ+1EcZaBo7psiDVCGMJgGx6lgOYVqBVTQS9S hmhiqraayNlzWbzJ5kQeJNG/aDImqgbgBGn/yX8QLTs6z3VdJrDzpz6qyX37n1hUkmtr wmaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=8OcAhVM8lZQ3L1TUuH05xR/jk7qIn+DqF2clQmbWiQU=; b=KowKpYl+0HTRzx/4yLCToSN2vlwb6rSZWduOgjyX8SOL/uTP3Z16hZZQ4+qEemzrg5 hQxlFzz+6XGbQrPiW1jSs0yGsG3NOKrdijxnM6LqCMv5yDzzXDd3PMtBhxpSyV6lyqTA 0hyb0Zn241dE3LuDLbPB6kEhABtVM3pZyzDUDpwmPb8TCxLpoUOwkMkQz+s3rroP5CAA CtdAkvJOtCiNDoQ4h4CXZLvlPbER+WlkgzabqGpyxXDgDz2PKvPDpsq/6nWvMBvayiRW yDZ8q9uWvxztRytS9/H119P/6j7XTfiT1hWw89vE1MoHkpDVcMbt+Gbqw0gZqFMTt4Jv tNBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si17567219plh.254.2019.08.22.06.09.47; Thu, 22 Aug 2019 06:10:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732195AbfHVJpy (ORCPT + 99 others); Thu, 22 Aug 2019 05:45:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:47774 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725799AbfHVJpy (ORCPT ); Thu, 22 Aug 2019 05:45:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F0A84AFA4; Thu, 22 Aug 2019 09:45:52 +0000 (UTC) Message-ID: <1566467151.8347.23.camel@suse.com> Subject: Re: [PATCH] HID: quirks: Disable runtime suspend on Microsoft Corp. Basic Optical Mouse v2.0 From: Oliver Neukum To: Kai-Heng Feng , jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Thu, 22 Aug 2019 11:45:51 +0200 In-Reply-To: <20190822091744.3451-1-kai.heng.feng@canonical.com> References: <20190822091744.3451-1-kai.heng.feng@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, den 22.08.2019, 17:17 +0800 schrieb Kai-Heng Feng: > The optical sensor of the mouse gets turned off when it's runtime > suspended, so moving the mouse can't wake the mouse up, despite that > USB remote wakeup is successfully set. > > Introduce a new quirk to prevent the mouse from getting runtime > suspended. Hi, I am afraid this is a bad approach in principle. The device behaves according to spec. And it behaves like most hardware. If you do not want runtime PM for such devices, do not switch it on. The refcounting needs to be done correctly. This patch does something that udev should do and in a questionable manner. Regards Oliver