Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3323442imu; Sun, 11 Nov 2018 12:22:12 -0800 (PST) X-Google-Smtp-Source: AJdET5dJnkqbUVJPKq1alxMEmBlAA/6mvzrROaL1FJ88miLkKPPNPp1DQH2txMmKUn9N9SMgIbRf X-Received: by 2002:a17:902:748b:: with SMTP id h11mr1004739pll.325.1541967732934; Sun, 11 Nov 2018 12:22:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967732; cv=none; d=google.com; s=arc-20160816; b=C98/i64wxeHCeViMWGadlj+ZTMtbW44oyb2USxSOEKC2JPTNENn4QXBPzXiWZXFB0A Dkxe6tx847ABDGfHmlX/8/svUdb4QCOCGrK9bJejKgXi619EFLVFQLFmIOfXpD8gUSv0 jSsRk63sX5+48qB0G+3X/xXL51E+KMqA8yQJSj7hd2VQ8WX6DTQh2jHXYs8HWRXHxkG/ 6jCLWRRUrQs27ETXhgPRcFbz8ZxD1bj3kyKoS/gHhLs3eKPcKZBRgI/UjnNmDeQhdwY2 CQBg9scSafF8HaapHTSgDnkkIDdeGJlXPBdeSfVtO2LM917ZIGpb68m2VXQXA3zj2SEr J5GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=2ZQ+4/dneCyW2V9ATEuaYm6+OejguY/2Md5nTbPscAU=; b=X8mH0BIeRzLxAaWlkdkBFrbJoz9WWy6gwny0UehEPuLlIr6OPJgqUF3SxN37/fYbQj eP2mvDNyLw+RL2fwCccuv9tMoUrepMbtj1nimQPNligMPAfAL+wLjl+sETyrfB/2wCEN lhbTdAo4pQdbMnQojE5B/EdWXolh2r8sGzKnKhqv+dNdPsRIyocZqk5QdRo3RcyNCNff DINZeWW9kY2CCabU8H6Wi4FyRU1ZMxE7/9eqTo3kZkzlPSr014DC8Mn0WyBfkRuPLnve azj9e4epJ+qVkD6LWXPfdvX1fsqZf2qWPd2uuWUArSKx3ojE7vg5Wre1unIYL4ryzJS1 gLsQ== 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 3-v6si15794290pfd.146.2018.11.11.12.21.57; Sun, 11 Nov 2018 12:22:12 -0800 (PST) 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 S1730938AbeKLGJV (ORCPT + 99 others); Mon, 12 Nov 2018 01:09:21 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53412 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbeKLGJV (ORCPT ); Mon, 12 Nov 2018 01:09:21 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvt8-0000l9-Ks; Sun, 11 Nov 2018 19:59:18 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsP-0001S9-UB; Sun, 11 Nov 2018 19:58:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Corey Minyard" , "Nordmark Claes" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 076/366] ipmi:bt: Set the timeout before doing a capabilities check In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Corey Minyard commit fe50a7d0393a552e4539da2d31261a59d6415950 upstream. There was one place where the timeout value for an operation was not being set, if a capabilities request was done from idle. Move the timeout value setting to before where that change might be requested. IMHO the cause here is the invisible returns in the macros. Maybe that's a job for later, though. Reported-by: Nordmark Claes Signed-off-by: Corey Minyard Signed-off-by: Ben Hutchings --- drivers/char/ipmi/ipmi_bt_sm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/char/ipmi/ipmi_bt_sm.c +++ b/drivers/char/ipmi/ipmi_bt_sm.c @@ -522,11 +522,12 @@ static enum si_sm_result bt_event(struct if (status & BT_H_BUSY) /* clear a leftover H_BUSY */ BT_CONTROL(BT_H_BUSY); + bt->timeout = bt->BT_CAP_req2rsp; + /* Read BT capabilities if it hasn't been done yet */ if (!bt->BT_CAP_outreqs) BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN, SI_SM_CALL_WITHOUT_DELAY); - bt->timeout = bt->BT_CAP_req2rsp; BT_SI_SM_RETURN(SI_SM_IDLE); case BT_STATE_XACTION_START: