All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: <linuxppc-dev@lists.ozlabs.org>,
	<linux-m68k@lists.linux-m68k.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/7] macintosh/via-macii: Synchronous bus reset
Date: Tue, 11 Sep 2018 20:18:44 -0400 (EDT)	[thread overview]
Message-ID: <df79f23f3ccd7261c498bdbe93404b9f2c53a88e.1536709753.git.fthain@telegraphics.com.au> (raw)
In-Reply-To: <cover.1536709753.git.fthain@telegraphics.com.au>

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 <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 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


  parent reply	other threads:[~2018-09-12  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  0:18 [PATCH 0/7] Miscellaneous Macintosh fixes and clean up Finn Thain
2018-09-12  0:18 ` [PATCH 6/7] macintosh/via-macii, macintosh/adb-iop: Modernize printk calls Finn Thain
2018-09-12  0:18 ` [PATCH 5/7] macintosh/via-macii: Simplify locking Finn Thain
2018-09-12  0:18 ` [PATCH 1/7] macintosh: Use common code to access RTC Finn Thain
2018-10-04 13:05   ` Geert Uytterhoeven
2018-10-04 13:05     ` Geert Uytterhoeven
2018-10-15  4:00   ` [1/7] " Michael Ellerman
2018-10-15  4:00     ` Michael Ellerman
2018-09-12  0:18 ` Finn Thain [this message]
2018-09-12  0:18 ` [PATCH 7/7] macintosh/via-macii, macintosh/adb-iop: Clean up whitespace Finn Thain
2018-09-12  0:18 ` [PATCH 4/7] macintosh/via-macii: Remove BUG_ON assertions Finn Thain
2018-09-12  0:18 ` [PATCH 2/7] macintosh/adb: Rework printk output again Finn Thain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df79f23f3ccd7261c498bdbe93404b9f2c53a88e.1536709753.git.fthain@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.