Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4738396imm; Tue, 11 Sep 2018 17:19:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZBqgepT3sjLUvlhKbcliiqAP6tr9lafba3Jrt/L9tG0stuQU+9q7+snFHT988DhLSRhMWk X-Received: by 2002:a63:1d47:: with SMTP id d7-v6mr30932615pgm.180.1536711545369; Tue, 11 Sep 2018 17:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536711545; cv=none; d=google.com; s=arc-20160816; b=wYn5XznPTrp1ER6uTXoX5atVasdxalGZXCVYkr1mqKZxAuPgvHirYqRNwzoCVWdxm9 aSaslkZctNshu+NxPSimg3JoP7RNyw/qzI/UNp5h5V8P0kQL1+nFVvMZqPAjCczPXNLU 5mU2DhprScOvNEAXFzfFdoMQtO0nJGeF7P0iN/oXJ6i8GJSHliqc3QMFApHY2ba2gZxv sqsGb+MRfffyslxt2hUXZHzf0pbfdOPvO3j8IjdDwhGC60H9hZKnBoZ6wsB4O7Ks6sbT 615HQtfWaXqvTjUUgcL0bNX6aNDVvKdtHYS9cEdsRpOWIvioBV0YPeBUonBwSm5nloWP GPKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to; bh=CPo+xrcK7HnmGaIXnh9fmqQmJlDONIK1uSv15qtWhuY=; b=vID/IuXGsr45PbKINbQCV37SxiYVXB+E/QWlZmv3WoWoUjdtSMCILES56sqhtnt5FW QRzf/3JriZIX0tv235tSfdfJwfFnc2ygW4iBgMWx3LKkSiVX3fZgAECRBgGWhj8P7vhl ieHeE4DqNGJ76pj938h0NFTTAl9hBu9yfhqxMBuM6cSsLweaLhtKGH8H7f/ZwalZutrq 24/zwW6sWKu61iry24z9fKzlpMMlGP6mRraVQLNZb5h2ujf6vUbkgeyk6UEWDFgU2o0y wPa5tbY0ncaVtpchkWcBoPbxbs/sP7MArEf5hgP4FcPgSBSdavUdJkcxRKNPLtnRuVte 9alA== 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 g3-v6si21486893pfc.216.2018.09.11.17.18.50; Tue, 11 Sep 2018 17:19:05 -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 S1728187AbeILFUa (ORCPT + 99 others); Wed, 12 Sep 2018 01:20:30 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:51526 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbeILFU3 (ORCPT ); Wed, 12 Sep 2018 01:20:29 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 2D6312A7D1; Tue, 11 Sep 2018 20:18:44 -0400 (EDT) To: Benjamin Herrenschmidt Cc: , , Message-Id: In-Reply-To: References: From: Finn Thain Subject: [PATCH 3/7] macintosh/via-macii: Synchronous bus reset Date: Tue, 11 Sep 2018 20:18:44 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the reset operation synchronous, like the other ADB drivers. The reset request is static data but callers may not know that. This way the struct is not in use when the reset method returns. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index cf6f7d52d6be..36a4f49e79b5 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c @@ -331,7 +331,8 @@ static int macii_reset_bus(void) return 0; /* Command = 0, Address = ignored */ - adb_request(&req, NULL, 0, 1, ADB_BUSRESET); + adb_request(&req, NULL, ADBREQ_NOSEND, 1, ADB_BUSRESET); + macii_send_request(&req, 1); /* Don't want any more requests during the Global Reset low time. */ udelay(3000); -- 2.16.4