From patchwork Thu Mar 8 05:01:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130941 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6065610lja; Wed, 7 Mar 2018 21:47:06 -0800 (PST) X-Google-Smtp-Source: AG47ELuzsjOWQwwoa6nX7bAttCfyROvRg8u76g1nRQiXANiVp4ZkCceHxciE5B/yJumNjKmJpBem X-Received: by 10.98.249.10 with SMTP id o10mr25097861pfh.222.1520488026355; Wed, 07 Mar 2018 21:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520488026; cv=none; d=google.com; s=arc-20160816; b=dJ6iUA6gWeYDUiKNxAT45UA6gFcgGvrAcYG++NxM4mzbg+1Som5UrSpwVA0w58V1bf yhwYsckTa1UYghyCs3XyRAValjoK3CQmdtXMK1LWs1YQKNIh2uWW7gvaq4hLtiQm0whd XfgDHzcikK4KUPcqTepy6r6P2AzoFrSJp1Vtk4yMJd8QuzUNQ37yZzUjOKDeA0AUfsFM QE6BjwycBdlalXvpmOIXWK912RZP0CQAlq719gJy5j76ul7AUu7FhN2UaIBkHpUt8g4p Z04PZunyzOwhKraPFtRk+0x4DlQBKQeENQd3BWcBmCQdGFQbv+UQjMtuPtzo/D32ixSn Y5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature:arc-authentication-results; bh=TzAPGmNKMMGBvJ9+kDIZDy6948Pq1oUGymC0IPsj4WI=; b=ZGV2SZ9dp+0TyNf++wm38L2R5Uhj3Av4cemvbKLTXZeBpm1md2FFtHpWXsQvMTe682 Om99R4Aht+Upj8rrgo1ccelAHwaRP1He/TDl3GvvRLcvoOwnqpVx3GIWFNEQ6EU4rsgb iA1KF0Zi2cz+H5hCn7ooPXzDBYOd/XyLfM3tZ/XLXbSJ1vRAiHBR7T/RLlcaSfQpHgHr HBL0+avjqV+FezFq5bxLe5kHHqBc27KTCAxEeQ2J3NE1Wl0fPT5grXgvy/ZV7XrV5Pom YvcBt5AfPPkNypvBUnQPvfoj2ahWI5PXl9FU3YGvuZLcr2p2VZsy53d6RTcfORUD5Y2C nnBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Cnn4ffEf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si12590581pgc.280.2018.03.07.21.47.06; Wed, 07 Mar 2018 21:47:06 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Cnn4ffEf; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966424AbeCHFrD (ORCPT + 28 others); Thu, 8 Mar 2018 00:47:03 -0500 Received: from mail-cys01nam02on0130.outbound.protection.outlook.com ([104.47.37.130]:16451 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965957AbeCHFFJ (ORCPT ); Thu, 8 Mar 2018 00:05:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TzAPGmNKMMGBvJ9+kDIZDy6948Pq1oUGymC0IPsj4WI=; b=Cnn4ffEfe1RPKf9gjb1FfIegAjGMoW4hhXD09D3u3kPni7vH0OpU8bK7Mb3mGsorJPTYm3OvtHR2I0Cr/TfqeOwCsAiw5rkj6R/0OBnfSP4A6EFfIdkCN2oDagA4TyAnJqwxkv7z1SLUTQVttHpY/I3+JG3ojyelfaGKSX7bCRg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0981.namprd21.prod.outlook.com (52.132.133.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.1; Thu, 8 Mar 2018 05:05:02 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 05:05:02 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: John Stultz , Wei Xu , Guodong Xu , Amit Pundir , Rob Herring , John Youn , Douglas Anderson , Chen Yu , Felipe Balbi , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 001/101] usb: dwc2: Make sure we disconnect the gadget state Thread-Topic: [PATCH AUTOSEL for 4.4 001/101] usb: dwc2: Make sure we disconnect the gadget state Thread-Index: AQHTtpp4PSxFJnxF0UW0CSuxCwf8TA== Date: Thu, 8 Mar 2018 05:01:07 +0000 Message-ID: <20180308050023.8548-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0981; 7:ub9P3eiK5uXSXgM9DlsnTPVVQ5sjfdT9abj4dY75+ELAMvL8aewIQj5NO9BGfNb1IxHHYPAfxaVVAEMje+gKzytgmpWIw5x/zzEN99dIno3kq1TEbk8X1uC9T7bTkseisnU5v2+cjd0yuaZyxkXVMBIllTH40nkPX06QJwkwbcuaJDcuU/5DHBDcSZkQ9bV6GD18k+z25lQOQNgqnL8fyQz66ja0dmgIUk5lZ2eeYcaShpo4RDvJDgMEfqNF+bcS; 20:4JnEC2v3MTUZoGHloYrRXnFjdlpVdNPm4G7IsDoe8KT1/qKc7NyWMxdCPPyD4qoQ43Q82v3RTFpkp+/QGp3VjLOgSW0fhsP/9jZaWE4H+cKA7tvPYtU3nIlC8EuS19eFeApgpskO6iIV37NtysJglpB2iTqMJUJpBkAWgGSramk= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 85094276-87fc-4d81-f433-08d584b2268e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0981; x-ms-traffictypediagnostic: DM5PR2101MB0981: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(50582790962513)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0981; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0981; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(199004)(189003)(305945005)(86612001)(7416002)(2906002)(7736002)(6486002)(36756003)(54906003)(110136005)(6436002)(10290500003)(316002)(186003)(22452003)(10090500001)(478600001)(105586002)(6512007)(53936002)(66066001)(68736007)(102836004)(3280700002)(107886003)(25786009)(8936002)(59450400001)(106356001)(6506007)(5660300001)(3846002)(97736004)(14454004)(2501003)(26005)(5250100002)(4326008)(3660700001)(86362001)(575784001)(6116002)(81166006)(99286004)(72206003)(2900100001)(1076002)(8676002)(81156014)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0981; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OcLlqJ6fLdQbrparQjP7bZMfI3dz2YE8uZvLsQkbRiDaRHkZ6dCZmaMbXFAFWq1sFkJiGwflapAgDfr3AQBKefkX0+316U0Qp85V0H9GjkSNhh0S4bP3a1DPlEY309a74B71u/ExxOJxs5iuZgk/JGR0Kv13WxIilhsmxKMQ0/jkh9p7h4Wme+fckbPcLnA3DUQcMJGvsGxkwSkiL+VgQFMEBOIA4jdqhKcxR0H1KXxo6PM3EZrHLP6UVzAUzCC7Inv+N/qxdaIzIkgt14BjpL0AGY58pRwx3JlKjLOiikUIKHxCLJ8tGWT2jCm8QAq4kuXtBuMb5xvtUTNeoL+B+w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85094276-87fc-4d81-f433-08d584b2268e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:01:07.9344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0981 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Stultz [ Upstream commit dad3f793f20fbb5c0c342f0f5a0bdf69a4d76089 ] I had seen some odd behavior with HiKey's usb-gadget interface that I finally seemed to have chased down. Basically every other time I plugged in the OTG port, the gadget interface would properly initialize. The other times, I'd get a big WARN_ON in dwc2_hsotg_init_fifo() about the fifo_map not being clear. Ends up if we don't disconnect the gadget state, the fifo-map doesn't get cleared properly, which causes WARN_ON messages and also results in the device not properly being setup as a gadget every other time the OTG port is connected. So this patch adds a call to dwc2_hsotg_disconnect() in the reset path so the state is properly cleared. With it, the gadget interface initializes properly on every plug in. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: John Youn Signed-off-by: John Stultz Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc2/hcd.c | 1 + 1 file changed, 1 insertion(+) -- 2.14.1 diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 571c21727ff9..88bd950665fa 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1385,6 +1385,7 @@ static void dwc2_conn_id_status_change(struct work_struct *work) dwc2_core_init(hsotg, false, -1); dwc2_enable_global_interrupts(hsotg); spin_lock_irqsave(&hsotg->lock, flags); + dwc2_hsotg_disconnect(hsotg); dwc2_hsotg_core_init_disconnected(hsotg, false); spin_unlock_irqrestore(&hsotg->lock, flags); dwc2_hsotg_core_connect(hsotg); From patchwork Thu Mar 8 05:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130940 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6065211lja; Wed, 7 Mar 2018 21:46:35 -0800 (PST) X-Google-Smtp-Source: AG47ELsRC5CP2vdjroIkk9nn/FV2G5gMeaZgw5Cz9kXnQi7Gxc0oquEzCk8VKGjCLTkVo789BOAN X-Received: by 2002:a17:902:b690:: with SMTP id c16-v6mr23236666pls.264.1520487995681; Wed, 07 Mar 2018 21:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520487995; cv=none; d=google.com; s=arc-20160816; b=FAjsCxNxOSwrvgjrRO7w2DfcFkfvmaaalmxTo6NuOfegjzj0955aAPdfC3oai+8pTO +YXhQed4Qj8kuCdSAgd/A37lqysxyFQORg2zDmRt9E8AohCqZ9GgYM7M4croTFqVzmEE aHwdf8t3SH4ieZB1ztG0wyBVjzykkRb9onHdyKYml6hZ52YPkLOQH+5XAHf0rDW9CXlJ pSxOJGpxBlRuvn6Xv9OkvYCbBZuZ8W4Vg/09bCPN4xGYLpneXNnZKgYg1qBzIEI4G2sL lLfNGJDBwerTr+aw6W0xDp77s5YK/EoAyL64EanjrQXDCJAZO2K7FA4HHiDp1MzI+1Xc 4QrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=mbpM3bTu/E1T2SDyZlVur64ZGk5CAplt/nA+w10opyo=; b=OB2IgYMwuensaWBcYesb2gOqnKY0QJoHXRGagqpIfVz4TG9FrxFgYFZVQZLheWU4Z8 RQTP0fPby+MFoCBsm5s8u71nB4h2JMgMCsqJNAG5MPeqwRli8uwFn8VIG2A2+Cn6UEBb m+obh6APDi6G4cw+9uu/qjCkCMtyBFsIFs7HS8vtZa0bEcjp4rrfQ9v2LiCMt5J54KfE 5DqiKAy/BbX+BunoYVLwlp67W6nT7Xlli2VQAjPOQtfNnBCpnTVMko4bKPXSqKWjo/uo jCXsUQqKk7q0krKOV1ejaCRL2YuIX5BXJqaTfhbJqzNYSvZEDAmJwfs2+/a4fsA3J9hU +aLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LT4PZtMm; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si12416872pge.300.2018.03.07.21.46.35; Wed, 07 Mar 2018 21:46:35 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LT4PZtMm; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966242AbeCHFqb (ORCPT + 28 others); Thu, 8 Mar 2018 00:46:31 -0500 Received: from mail-by2nam03on0127.outbound.protection.outlook.com ([104.47.42.127]:45712 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965997AbeCHFFK (ORCPT ); Thu, 8 Mar 2018 00:05:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mbpM3bTu/E1T2SDyZlVur64ZGk5CAplt/nA+w10opyo=; b=LT4PZtMmXg0PJi77+ObktBZodSS9FXjnC7YIKoJP+2TNMOCXxP4UBkKIafH19JZsdHPuqO2USkLlrCzKHAvwkf7mGWFpSWJ+PX4RCCFHgbw9C93pWca5YSo5l61WXdCsxIt8DACNPzm+uZ2TNCkpkpzNlRLR9zCHFTRq8mQOcmQ= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0981.namprd21.prod.outlook.com (52.132.133.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.1; Thu, 8 Mar 2018 05:05:03 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 05:05:03 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Mark Rutland , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 003/101] drivers/perf: arm_pmu: handle no platform_device Thread-Topic: [PATCH AUTOSEL for 4.4 003/101] drivers/perf: arm_pmu: handle no platform_device Thread-Index: AQHTtpp41YPk/YUCoUOXlmWEWl2Tfw== Date: Thu, 8 Mar 2018 05:01:08 +0000 Message-ID: <20180308050023.8548-3-alexander.levin@microsoft.com> References: <20180308050023.8548-1-alexander.levin@microsoft.com> In-Reply-To: <20180308050023.8548-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0981; 7:CleHxz7VwzXYmdRyCdj3WSiONJj34Xp3nq+BlAGscAEuQZul6G7rdz/eF4n62BNLRBIeIxQBo1PHveuQjlVn7P9j5EhiCe8OLFdZKcxC16r6ECUrDZYnmJ7QZ7TFxpU3XfDxvUYYwXXQinDbc6UxCEy9JbLTafcj9+Sq2k6rPZsJXk8tLtSQZFHl3IgY0iyOaLJmjJeqO3waN6lO96JP9/1zebsjBGXOLKAHfqvHAC+KCyNN/LQPnSV9Dtxdwzk2; 20:SdV++a48svm3tNKim/TCIHo/gaOvoESbFX04Lq+4rrL83wneRnAPj+B542N80Dn1A573L9jkoI4Bd63T5MkVe5OZP8kAC+5/8l8EPomZuNtyhFIA5Vbh0/s6Rpn008MrYpT4dpYy3KyizQ1j0jJL9NKNGelvGS0gtwAo0s0FgdU= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 717cec56-8c29-4c5a-68f4-08d584b22733 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0981; x-ms-traffictypediagnostic: DM5PR2101MB0981: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0981; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0981; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(199004)(189003)(305945005)(86612001)(2906002)(7736002)(6486002)(36756003)(54906003)(110136005)(6436002)(2950100002)(10290500003)(316002)(186003)(22452003)(10090500001)(478600001)(105586002)(6512007)(53936002)(66066001)(68736007)(76176011)(102836004)(3280700002)(107886003)(25786009)(8936002)(59450400001)(106356001)(6506007)(5660300001)(3846002)(97736004)(14454004)(2501003)(26005)(5250100002)(4326008)(3660700001)(86362001)(6116002)(81166006)(99286004)(72206003)(2900100001)(1076002)(8676002)(81156014)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0981; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Mo1sXKRlqpHTqmnrz7sc33ua/pLTNpxF9Ddg07oic6WzWnbhexKJ6eR5W9s/WtxBISNA6RXrU6WLYkAMvaNXeIrrmkgq55RSceqqoClJAyQDoUABpw4w9iq1EAwNcFQPZBvQ4V2VVCYrJoeffSMMdduTtO+vKSJT/p2ToryLNs1YOyOqUjWJrgRHMa4chXVOpOyNupFcUiDv3KaMRm3gH7QoyTQeds5bK9pF1J8PapePNZMiejvBPDX8BygM+qH1EZ1aFmiOy10wiPxHwUYC2nvpZ7DogLKxSEF+LYTMSeHARg14WjGwNs1RNbn0HnvXSXuiRn6s8XWiKzQinmCMPQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 717cec56-8c29-4c5a-68f4-08d584b22733 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:01:08.7490 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0981 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland [ Upstream commit 7654137071fa706e5c91f4f27bc2a5cd7e435a9b ] In armpmu_dispatch_irq() we look at arm_pmu::plat_device to acquire platdata, so that we can defer to platform-specific IRQ handling, required on some 32-bit parts. With the advent of ACPI we won't always have a platform_device, and so we must avoid trying to dereference fields from it. This patch fixes up armpmu_dispatch_irq() to avoid doing so, introducing a new armpmu_get_platdata() helper. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/arm_pmu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.14.1 diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 8af1f900ea65..1ba58fb6f796 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -321,10 +321,16 @@ validate_group(struct perf_event *event) return 0; } +static struct arm_pmu_platdata *armpmu_get_platdata(struct arm_pmu *armpmu) +{ + struct platform_device *pdev = armpmu->plat_device; + + return pdev ? dev_get_platdata(&pdev->dev) : NULL; +} + static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) { struct arm_pmu *armpmu; - struct platform_device *plat_device; struct arm_pmu_platdata *plat; int ret; u64 start_clock, finish_clock; @@ -336,8 +342,8 @@ static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) * dereference. */ armpmu = *(void **)dev; - plat_device = armpmu->plat_device; - plat = dev_get_platdata(&plat_device->dev); + + plat = armpmu_get_platdata(armpmu); start_clock = sched_clock(); if (plat && plat->handle_irq) From patchwork Thu Mar 8 05:01:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130938 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6052178lja; Wed, 7 Mar 2018 21:29:17 -0800 (PST) X-Google-Smtp-Source: AG47ELtqWmKjKPcEYlmNVeK0RX+CnIOYNmlo0VUXRG3mXY+BJ7/LxlKug8NOwm0yQbhzRbqAjZ1w X-Received: by 10.99.117.89 with SMTP id f25mr19829944pgn.18.1520486956890; Wed, 07 Mar 2018 21:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520486956; cv=none; d=google.com; s=arc-20160816; b=1Cp0eS9sTYSy4hXiQ3jj5teMnPI9C4RrjkBgkgpoq5IjdwqHgUblscCuywn0sJxlDp 8xnSJhsJ2RB7FwB6Mvf0x7q1yDUS2du8afuZd1DqbfyXnYpgE9C/MxzXP4osyrS4pPPU GOUuztJXf+PJ9DaV4kXzukbj73mHaKG+OQZaOU1E78YQPxshMEkOL8RejgGrNxW0AtSs 0dRESx5tvHlDb6Xd++djISmD932DrKzT5gWiw818c1y/lFUD2K8D0S3+YefXHZe7KqKA +1HzflFBKzFRWvQZJp/ruPPgn+RAa1DlqN0R5UKTUEGS7IIzUSznMFNclOsIobdXcGVh gwng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=r+CDo/eMKRw7SYQfR30RVsUxytki+wgwv9GNImi+9H0=; b=tkdEMFqz8tqez5VkrXHUa8dJNBfoarR4pGmy95P1J1bFl6YW8KT8PN2v2T5kg9jadE jwF40ayuKfG2YlQoDOujU5AoHzy3UibAYSVXmeFn08hSWqYctNjhXpP23S0KcYToWewW P6xQ6rkvwkWBXY1e/+asCZOxbj4Ukqc4xOb6UB8kD++8mONA3nWQ1UGIh1FH7qnkRZrg lkunSJAnSzsfAlFuyHP056dABltTE6strL1qWaarFNwVNYydm/hbNNveqAn6fFQiO6VH uvK8tfYDsk/2ZFI5UBxEp2fWkoY48oXkw+VZ6skMHCaPP4Ud8xBg1SH2yox4lE/ADDnH m3+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LeF+L0ds; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si12561231pgu.708.2018.03.07.21.29.16; Wed, 07 Mar 2018 21:29:16 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=LeF+L0ds; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966487AbeCHFG7 (ORCPT + 28 others); Thu, 8 Mar 2018 00:06:59 -0500 Received: from mail-cys01nam02hn0204.outbound.protection.outlook.com ([104.47.37.204]:8367 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755278AbeCHFGu (ORCPT ); Thu, 8 Mar 2018 00:06:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=r+CDo/eMKRw7SYQfR30RVsUxytki+wgwv9GNImi+9H0=; b=LeF+L0dsrgOH1wG5xQak5YqmQmlvfVgPdQAJMcpjYLx2grRDg5lN71CygWLxWuI/5OcJ0V/r8ONuRImMXSw6XKRDWuVhK+YvVwHud2eJWsNZ+DWi14YrkJJVL7ttzJrHrLoC9fJspe6R3JjPkWFpvG7ADC3LLrzjBGlncG516OQ= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1016.namprd21.prod.outlook.com (52.132.133.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 05:06:46 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 05:06:46 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Kishon Vijay Abraham I , Bjorn Helgaas , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 061/101] ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP Thread-Topic: [PATCH AUTOSEL for 4.4 061/101] ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP Thread-Index: AQHTtpqV0fXiVdUpC0Kn3mpIkjy7TQ== Date: Thu, 8 Mar 2018 05:01:57 +0000 Message-ID: <20180308050023.8548-61-alexander.levin@microsoft.com> References: <20180308050023.8548-1-alexander.levin@microsoft.com> In-Reply-To: <20180308050023.8548-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1016; 7:e9VefMp2kYCiftEuqhKsCZEutUlXrBaDscNlrsNz3VRVW0FR3ZAKa0yJXzuKrwUSPxq0b82XHRhPkMnm3X8lXOKGLWvFwPW6mPPFA/081x0ceVSQdRY2DJna9NS+XsYF9bbT0kvvoG8f6LTSOMpVOe9ZzBdlKPcMEuzL7eWzQN2117VDVYhYEryQT1p3B38o8ZS1Lo7/9a5ijG4Kug4gAjOnYmQOfA+YsaS4cN1A3eI4LS7qexULWnFpSlGBVNpz; 20:tp0YjYoihrGZLnQJx1CyHrO7pduHsQGS/eSGD9gihY3+I+sTXb13acAGCC1/7QuvjBi3flgw3kruFqgqviqzsk1pIbb2l0dA9GTAgmVdW51w0GZMRpntZdIRoSmtKYizwSSAeoOebjjaXCPEN+/2abUaiPXgP4iR80GSLUiynEI= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b090c894-7487-42c6-cf0f-08d584b26487 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1016; x-ms-traffictypediagnostic: DM5PR2101MB1016: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171)(211936372134217)(153496737603132); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231220)(944501244)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR2101MB1016; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1016; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:SPM; SFS:(10019020)(396003)(366004)(39380400002)(39860400002)(346002)(376002)(199004)(189003)(3660700001)(10290500003)(14454004)(25786009)(478600001)(53936002)(5660300001)(6436002)(6486002)(68736007)(110136005)(54906003)(316002)(6512007)(105586002)(22452003)(3280700002)(2900100001)(3846002)(6116002)(72206003)(4326008)(2906002)(59450400001)(6506007)(102836004)(86612001)(1076002)(36756003)(76176011)(26005)(186003)(107886003)(6666003)(2950100002)(7736002)(97736004)(8676002)(99286004)(5250100002)(8936002)(81166006)(81156014)(86362001)(305945005)(2501003)(66066001)(106356001)(10090500001)(22906009)(133343001)(121003001)(217873001); DIR:OUT; SFP:1501; SCL:5; SRVR:DM5PR2101MB1016; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: HpNHb6qlSVVwLLQbQKI8DaXBnJpauQ6UCJQVOuwm3PuWlI+gJxOpTNgS/uYYPUmeKJMjoXjczRkD9ID8asla/tW/t4euddLdimBV9nFfnzRU38rYqm6BMIKaHAMehPzd1GL9ZtkbBxXzEp15Bk7GBopuFmKSRPp60BE/X1PEe0OINaM3w3UqlJSv0dwXdJj8NWsk7h6EROBx2rPGtak3FVO25lua8NJJiHSnYOXNPm0n82gJFKGOs8j3kh6cZkPVeSf3vkSkIsQFlIyMqOpApHSlAZGXAC68pEQ3gZ+nLRZRCqkH+cce3aBqdeDy7YJ8Gl64QEHXFiGFqBQMRHEo/lzZGm/TidF4FblHJ/5ZsCZfeN9OTzTZUo9bhIfMY4+SABhqKaONsqyBepPzSFoKzA== spamdiagnosticoutput: 1:22 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b090c894-7487-42c6-cf0f-08d584b26487 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:01:57.2413 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1016 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kishon Vijay Abraham I [ Upstream commit 2c949ce38f4e81d7487f165fa3b8f77d74a2a6c4 ] The PCIe programming sequence in TRM suggests CLKSTCTRL of PCIe should be set to SW_WKUP. There are no issues when CLKSTCTRL is set to HW_AUTO in RC mode. However in EP mode, the host system is not able to access the MEMSPACE and setting the CLKSTCTRL to SW_WKUP fixes it. Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 diff --git a/arch/arm/mach-omap2/clockdomains7xx_data.c b/arch/arm/mach-omap2/clockdomains7xx_data.c index 7581e036bda6..70e3b711e79c 100644 --- a/arch/arm/mach-omap2/clockdomains7xx_data.c +++ b/arch/arm/mach-omap2/clockdomains7xx_data.c @@ -524,7 +524,7 @@ static struct clockdomain pcie_7xx_clkdm = { .dep_bit = DRA7XX_PCIE_STATDEP_SHIFT, .wkdep_srcs = pcie_wkup_sleep_deps, .sleepdep_srcs = pcie_wkup_sleep_deps, - .flags = CLKDM_CAN_HWSUP_SWSUP, + .flags = CLKDM_CAN_SWSUP, }; static struct clockdomain atl_7xx_clkdm = { From patchwork Thu Mar 8 05:02:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130937 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6050596lja; Wed, 7 Mar 2018 21:27:13 -0800 (PST) X-Google-Smtp-Source: AG47ELvzxe+kzf6H4FobQPBVBQlQoi0wa0nPtbTb9kTzf0vSOz5LBsoBNdQKtVMw1AbSfQqka9Z6 X-Received: by 2002:a17:902:2843:: with SMTP id e61-v6mr22961712plb.437.1520486833164; Wed, 07 Mar 2018 21:27:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520486833; cv=none; d=google.com; s=arc-20160816; b=EJEggcW3edphUjLUjg/9y0UMigvVrqGKUdvCFWJGqTGEn5wvIDqJYMLXs1ot7t8hEE 8Sp/cS9X1Iu2Tj/aJ/mUebsg4xGmDiAAg1+n/iUlw1YkTr56L1lVjCU8jBN0LqRQ+N8X OLCoEvp4pcO2H+rlUJzfIuGGVmv9/23Tcx7U5uWW/1zEvrQlkpxVekeId3OwtxUDgNYI uLPc9Gs2BolmwzsOcAnVYITSnETboBDULlEGmjejhd4LTA1iraVhpneSnszwnRB+sWiA EcrmlkpjWRIG90nqtBZpp3r2UWJ774jQOjdUCwezRBTSVMORyGZSH4J6zY9Dv/KKiuSE bEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XaJAl2WpAnkYa6BzjK2mjagiaIrgZLknN50IbuXSv4A=; b=GOvEykPcYnFUx0XOjd6+g6b8SY9YXm8vo6qs0VVwVu3xAo4gkU7Ge1QbZtckPRK5tZ 27fkH+mCr1mJ+KBjNhWgLoRr8a5CAS2JckQfTPf59dQ4XHu22foMZO4/eBlaq67scGkP fSHUP3UorlxOQHsjvHLcTvxd1sh6zy71nbc4+S10QmNrwe/o+S4FGQeN7VRKt2zigAB7 RHI+F4Sp5kLYFqwe42DXxnO7Dj+PsZk//jtXUt5I7nVc/ygh5D26xCNf3ou/cBajKK1E S9+q26lsv6FwX+1CzX/i7dEwPpQbgJl00YaWE+asT9AK9OMNxkp/K6jfuMOtHot7WdiF NWCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mR/gzrPR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t21-v6si14633631plj.269.2018.03.07.21.27.12; Wed, 07 Mar 2018 21:27:13 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mR/gzrPR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966582AbeCHF1K (ORCPT + 28 others); Thu, 8 Mar 2018 00:27:10 -0500 Received: from mail-bn3nam01on0139.outbound.protection.outlook.com ([104.47.33.139]:41401 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966541AbeCHFHI (ORCPT ); Thu, 8 Mar 2018 00:07:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XaJAl2WpAnkYa6BzjK2mjagiaIrgZLknN50IbuXSv4A=; b=mR/gzrPRfY929GBfXTSMlAlDgqNMs/ntj929o/TF0rLsJuUJImFbI99sxkFWxmpIp5BlVgqP8ZKAEG5QviS4SZ9BJyerNsOMM/wasGII5mC1HXTZBHJgajdukm51K+neHYxTMzkMy1y2LFtCfZOMzOD0IpUz5nS8I4qwJepJhbw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1077.namprd21.prod.outlook.com (52.132.130.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 05:07:06 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 05:07:06 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Loic Poulain , Marcel Holtmann , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 078/101] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Topic: [PATCH AUTOSEL for 4.4 078/101] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Index: AQHTtpqbVcj6f9wG9UG9fhKP8c2fFw== Date: Thu, 8 Mar 2018 05:02:07 +0000 Message-ID: <20180308050023.8548-78-alexander.levin@microsoft.com> References: <20180308050023.8548-1-alexander.levin@microsoft.com> In-Reply-To: <20180308050023.8548-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1077; 7:tj2nA7JBLQ5/J/OMPLadJ0n46D6N5mNPT4NzIeuwVa/9ugxOKgOS4z3CD9KJ5KrbB8tqvq73YUfxwJyXqCcHm67rxnXOVAf/P7lIDz2PFnELm3PUGs2+4G48ozPBEC5+iJhhU2XlwJ9OZRDw4PkP+y3Ko/GakLVg2j5weu7LalqWchiLrua/k3mP+za/NS4IV5Wr2u0F9NzQFwfm8XW7EfJltsfmroFMynj+jFOgbg7fnVzmUMchSpiT/vH3XnXt; 20:B+YySTD8ANx3dDuPqPgb6mi+d8QATtFOLEOnUXu80QUst0vqCxAwsa1DfV01igcXp2+kKZ5S5SDhsQaNqrQyr+QrM2+JkbLuwM6F07zvcAWe7DJsSEESL8QdsSh7bcaCONBjuzZpO/KsdYyXDkwLyggsJfZ1IMbz2ZeaJrC3EhY= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: bda393c8-b351-416f-dfb9-08d584b27051 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1077; x-ms-traffictypediagnostic: DM5PR2101MB1077: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB1077; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1077; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(376002)(346002)(39380400002)(396003)(39860400002)(199004)(189003)(86362001)(102836004)(575784001)(6506007)(22452003)(2950100002)(186003)(68736007)(26005)(106356001)(105586002)(66066001)(86612001)(3846002)(3280700002)(2900100001)(25786009)(53936002)(5660300001)(2906002)(3660700001)(10090500001)(6512007)(1076002)(4326008)(6116002)(305945005)(110136005)(107886003)(54906003)(2501003)(5250100002)(8676002)(8936002)(81156014)(81166006)(14454004)(76176011)(7736002)(72206003)(10290500003)(478600001)(6486002)(6436002)(99286004)(36756003)(97736004)(316002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1077; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: fsDx4BXDOF+QV/3itoGP+dlcWWhD1qdtS0X8yAKjoU2ZU7T4k4WyPr0u/Mk2KvvXdYeVEVtb4c++s9WDTYcbMEfi/sh6tzN488a/wucNWVr7HDVvL2Hhyx0gHQwBb7FSrI1m+B0oRhCMpIArxTae4aD+05Z7beCHiOZ0Rb7FwfBOcz5EszqJzzwrQBLI05PRQoCQWQPZkK8yPKndhHa9m4VN9+SlCLcm7qk4puPZNJEpQ6y5U4N7yTScIwotd9HRSsGdKtG7CLxpZ0BOUhVA26OH/Umxy0OIYxYPiysKGmeXAflWLxCyCJ8GM36DtZKDSiE8JgHiZMtLfKE7Ta5ybA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: bda393c8-b351-416f-dfb9-08d584b27051 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:02:07.2664 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit ba8f3597900291a93604643017fff66a14546015 ] Assuming that the original code idea was to enable in-band sleeping only if the setup_rome method returns succes and run in 'standard' mode otherwise, we should not return setup_rome return value which makes qca_setup fail if no rampatch/nvm file found. This fixes BT issue on the dragonboard-820C p4 which includes the following QCA controller: hci0: Product:0x00000008 hci0: Patch :0x00000111 hci0: ROM :0x00000302 hci0: SOC :0x00000044 Since there is no rampatch for this controller revision, just make it work as is. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/hci_qca.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.14.1 diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 71325e443e46..8a3bf0a8c31d 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -936,6 +936,9 @@ static int qca_setup(struct hci_uart *hu) if (!ret) { set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); qca_debugfs_init(hdev); + } else if (ret == -ENOENT) { + /* No patch/nvm-config found, run with original fw/config */ + ret = 0; } /* Setup bdaddr */ From patchwork Thu Mar 8 05:02:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130936 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6049406lja; Wed, 7 Mar 2018 21:25:35 -0800 (PST) X-Google-Smtp-Source: AG47ELsAkEvgO42oHxuE8O7KYzLgOLeLZ1e8YZpZFyb18sQjBiyRC/407McSfc1rrjcMPY/3mZhW X-Received: by 10.98.103.69 with SMTP id b66mr25290322pfc.114.1520486735486; Wed, 07 Mar 2018 21:25:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520486735; cv=none; d=google.com; s=arc-20160816; b=oC8qT34XUX/SJUUqOuZkkBogipDv29dlByoPpGgEgvwhQ+e1/FM783nmY7hy1x48JJ KysSfS6mLM+Ta9DVs+UH1BBiDur9IJCmLRi/nU2dX//K1nervE0p1qGlEht1aUPl4JPW 4tlg9Er0oZJwhQQ/4JeZwsAMaWQoVnNlEutTRhGa2AFVuVSIUdn/InnazRtVCELLNNGi 7d3f71Pcs/AT746GmD5XYj1pfqEuYWvO7UVXH70NeXLEyT94sfctNSAuDMeQbgkvYqrL 0j4KjsNo2cUCEWP2cZhS8Z1+iCSzHUpMn3kBxAr846XaDCzeqS/5T4JhFPE6WQRKoPk2 pIFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=AkJhVfJ1nAur6Od7PlwDuH0UJiq+I5seQQeV+TnQWkY=; b=VDtuXUtVKOhSLFufFh06Vt0h0aL31wO9c+MA+KU5NDxsy1ogZ6Tou0E1CHwLDqkfDE F2DGaMrEoahbuJbCMg5MDrNKuuONsfp0tRooHLmHlk0oiuCTT679RTzIYb6T71QTMwUS ICc/PfXgPrIwUJt/f/2YJWpD/TBA3YVEa8/eaLBKiJHHcHz2KXQDuqn7JEx0B2adtT67 9xANNT/g2+FLgXjw8zo56HRgNKQK18yuFjBaW5qOboW1uTkGAKC1c2fMVTmmtNzIGrLK wOT/5MI00uJIX82Uy3o6Jk8y5ZQD0GJT+jUjELq0vSoljKeBgAkib9ooU+3FGObxpjCy hgdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=GkDRSsmM; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15-v6si14712782pli.431.2018.03.07.21.25.34; Wed, 07 Mar 2018 21:25:35 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=GkDRSsmM; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966675AbeCHFZc (ORCPT + 28 others); Thu, 8 Mar 2018 00:25:32 -0500 Received: from mail-bn3nam01on0110.outbound.protection.outlook.com ([104.47.33.110]:54752 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966589AbeCHFHU (ORCPT ); Thu, 8 Mar 2018 00:07:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AkJhVfJ1nAur6Od7PlwDuH0UJiq+I5seQQeV+TnQWkY=; b=GkDRSsmMOtoSWLEzlobPPiuJfVu2xkKbbdNPJ2B3C6cWI1M2TE0G5bxe8DsppWy7JeUDbJUVCI3xoo8FNtGsgnDvw2L3n5ySsrLFh15ZoKoPOc/VxBX9KLmpeyNEhIcNW+SOXtiyxtOMSFiGVFdPx5/ceUDyEfcpIFb3IL7kT3M= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1077.namprd21.prod.outlook.com (52.132.130.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 05:07:15 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 05:07:15 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arnd Bergmann , Benson Leung , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 085/101] cros_ec: fix nul-termination for firmware build info Thread-Topic: [PATCH AUTOSEL for 4.4 085/101] cros_ec: fix nul-termination for firmware build info Thread-Index: AQHTtpqda72hFANWRUqQdTnYsn7hFQ== Date: Thu, 8 Mar 2018 05:02:10 +0000 Message-ID: <20180308050023.8548-85-alexander.levin@microsoft.com> References: <20180308050023.8548-1-alexander.levin@microsoft.com> In-Reply-To: <20180308050023.8548-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1077; 20:QG+dO7+KZcg8Qw6yGdkGmDqjv5DhxphPPUJi7w6kgkc/PX4EoAKgeyU5VPGxb/WdlECqZYqqtKCXwYZlOFeUWQyKob5s8OfBnDW8IWFm8rzDviPrZ5pQaxdCNniEzXyHdZ2Eq19r51/hxW15iqpBPYgMWuEPHbDusE5DKx+j86o= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 06e43d71-c231-4272-7bde-08d584b275cb x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1077; x-ms-traffictypediagnostic: DM5PR2101MB1077: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(20558992708506)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB1077; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1077; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(376002)(346002)(39380400002)(396003)(39860400002)(199004)(189003)(86362001)(102836004)(575784001)(6506007)(59450400001)(22452003)(2950100002)(186003)(68736007)(26005)(106356001)(105586002)(66066001)(6666003)(86612001)(3846002)(3280700002)(2900100001)(25786009)(53936002)(5660300001)(2906002)(3660700001)(10090500001)(6512007)(1076002)(4326008)(6116002)(305945005)(110136005)(107886003)(54906003)(2501003)(5250100002)(8676002)(8936002)(81156014)(81166006)(14454004)(76176011)(7736002)(72206003)(10290500003)(478600001)(6486002)(6436002)(99286004)(36756003)(97736004)(316002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1077; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pEBPY6RKR9G6zG1xfevwU0GMZjGEDq/TiWhyKJNiWMTM14lXrzjK3lZKQH96/wpeq82Jx7MAhnJZA4+CbrDT9g7d0WwfMb4uj+uunxcKL+yPMfADaqTV4RG5D4zktbVCPQwsfLDIK/xyEfGd87MTrPgQtJDGxt7u86iiVAMpU/j34+k3j6OTUQ1lyVh/MauySG9CW61wVZFsWCkL4qWw3y68iKx6kKqj0nDBqCuo2PBHAYXoMadaURhsTO9wZ/ok04QQPnBPs+yOifnYu1nxuZ78z7Hc5x7uLraeEpevFJeAgG8MOJmljkdZp1s8dAE+wgbscArkM56FvwNPORBRaA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06e43d71-c231-4272-7bde-08d584b275cb X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:02:10.4977 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 50a0d71a5d20e1d3eff1d974fdc8559ad6d74892 ] As gcc-8 reports, we zero out the wrong byte: drivers/platform/chrome/cros_ec_sysfs.c: In function 'show_ec_version': drivers/platform/chrome/cros_ec_sysfs.c:190:12: error: array subscript 4294967295 is above array bounds of 'uint8_t[]' [-Werror=array-bounds] This changes the code back to what it did before changing to a zero-length array structure. Fixes: a841178445bb ("mfd: cros_ec: Use a zero-length array for command data") Signed-off-by: Arnd Bergmann Signed-off-by: Benson Leung Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c index f3baf9973989..24f1630a8b3f 100644 --- a/drivers/platform/chrome/cros_ec_sysfs.c +++ b/drivers/platform/chrome/cros_ec_sysfs.c @@ -187,7 +187,7 @@ static ssize_t show_ec_version(struct device *dev, count += scnprintf(buf + count, PAGE_SIZE - count, "Build info: EC error %d\n", msg->result); else { - msg->data[sizeof(msg->data) - 1] = '\0'; + msg->data[EC_HOST_PARAM_SIZE - 1] = '\0'; count += scnprintf(buf + count, PAGE_SIZE - count, "Build info: %s\n", msg->data); }