From: Finn Thain <fthain@telegraphics.com.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Joshua Thompson <funaho@jurai.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-m68k@lists.linux-m68k.org,
Laurent Vivier <lvivier@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/9] Macintosh II ADB driver fixes
Date: Sun, 28 Jun 2020 14:23:12 +1000 [thread overview]
Message-ID: <cover.1593318192.git.fthain@telegraphics.com.au> (raw)
Various issues with the via-macii driver have become apparent over the
years. Some examples:
- A Talk command response can be lost. This can result in phantom devices
being probed or an incorrect device handler ID being retrieved.
- A reply packet containing a null byte can get truncated. Such packets
are sometimes generated by ADB keyboards.
- A Talk Register 3 reply from device 15 (that is, command byte 0xFF)
can be mistaken for a bus timeout (empty packet).
This patch series contains fixes for all known bugs in the via-macii
driver, plus a few code style improvements. It has been successfully
tested on an Apple Centris 650 and qemu-system-m68k.
The patched kernel does regress on past QEMU releases, due to ADB
transceiver emulation bugs. Those bugs have been fixed in mainline QEMU.
My thanks go to Mark Cave-Ayland for that effort and for figuring out
the improvements to the signalling between the VIA and the transceiver.
Note to -stable maintainers: these fixes can be cherry-picked without
difficulty, if you have the 5 commits that appeared in v5.0:
b52dce8738938 macintosh/via-macii: Synchronous bus reset
5f93d7081a47e macintosh/via-macii: Remove BUG_ON assertions
5ce6185c2ef4e macintosh/via-macii: Simplify locking
351e5ad327d07 macintosh/via-macii, macintosh/adb-iop: Modernize printk calls
47fd2060660e6 macintosh/via-macii, macintosh/adb-iop: Clean up whitespace
Just for the sake of simplicity, the 'fixes' tags in this series limit
backporting to 'v5.0+'.
Finn Thain (9):
macintosh/via-macii: Access autopoll_devs when inside lock
macintosh/via-macii: Poll the device most likely to respond
macintosh/via-macii: Handle /CTLR_IRQ signal correctly
macintosh/via-macii: Remove read_done state
macintosh/via-macii: Handle poll replies correctly
macintosh/via-macii: Use bool type for reading_reply variable
macintosh/via-macii: Use unsigned type for autopoll_devs variable
macintosh/via-macii: Use the stack for reset request storage
macintosh/via-macii: Clarify definition of macii_init()
drivers/macintosh/via-macii.c | 324 +++++++++++++++++++---------------
1 file changed, 179 insertions(+), 145 deletions(-)
--
2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Finn Thain <fthain@telegraphics.com.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
linuxppc-dev@lists.ozlabs.org, Joshua Thompson <funaho@jurai.org>
Subject: [PATCH 0/9] Macintosh II ADB driver fixes
Date: Sun, 28 Jun 2020 14:23:12 +1000 [thread overview]
Message-ID: <cover.1593318192.git.fthain@telegraphics.com.au> (raw)
Various issues with the via-macii driver have become apparent over the
years. Some examples:
- A Talk command response can be lost. This can result in phantom devices
being probed or an incorrect device handler ID being retrieved.
- A reply packet containing a null byte can get truncated. Such packets
are sometimes generated by ADB keyboards.
- A Talk Register 3 reply from device 15 (that is, command byte 0xFF)
can be mistaken for a bus timeout (empty packet).
This patch series contains fixes for all known bugs in the via-macii
driver, plus a few code style improvements. It has been successfully
tested on an Apple Centris 650 and qemu-system-m68k.
The patched kernel does regress on past QEMU releases, due to ADB
transceiver emulation bugs. Those bugs have been fixed in mainline QEMU.
My thanks go to Mark Cave-Ayland for that effort and for figuring out
the improvements to the signalling between the VIA and the transceiver.
Note to -stable maintainers: these fixes can be cherry-picked without
difficulty, if you have the 5 commits that appeared in v5.0:
b52dce8738938 macintosh/via-macii: Synchronous bus reset
5f93d7081a47e macintosh/via-macii: Remove BUG_ON assertions
5ce6185c2ef4e macintosh/via-macii: Simplify locking
351e5ad327d07 macintosh/via-macii, macintosh/adb-iop: Modernize printk calls
47fd2060660e6 macintosh/via-macii, macintosh/adb-iop: Clean up whitespace
Just for the sake of simplicity, the 'fixes' tags in this series limit
backporting to 'v5.0+'.
Finn Thain (9):
macintosh/via-macii: Access autopoll_devs when inside lock
macintosh/via-macii: Poll the device most likely to respond
macintosh/via-macii: Handle /CTLR_IRQ signal correctly
macintosh/via-macii: Remove read_done state
macintosh/via-macii: Handle poll replies correctly
macintosh/via-macii: Use bool type for reading_reply variable
macintosh/via-macii: Use unsigned type for autopoll_devs variable
macintosh/via-macii: Use the stack for reset request storage
macintosh/via-macii: Clarify definition of macii_init()
drivers/macintosh/via-macii.c | 324 +++++++++++++++++++---------------
1 file changed, 179 insertions(+), 145 deletions(-)
--
2.26.2
next reply other threads:[~2020-06-28 4:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 4:23 Finn Thain [this message]
2020-06-28 4:23 ` [PATCH 0/9] Macintosh II ADB driver fixes Finn Thain
2020-06-28 4:23 ` [PATCH 5/9] macintosh/via-macii: Handle poll replies correctly Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 3/9] macintosh/via-macii: Handle /CTLR_IRQ signal correctly Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 8/9] macintosh/via-macii: Use the stack for reset request storage Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 2/9] macintosh/via-macii: Poll the device most likely to respond Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-08-09 18:55 ` Guenter Roeck
2020-08-09 18:55 ` Guenter Roeck
2020-08-09 22:58 ` Finn Thain
2020-08-09 22:58 ` Finn Thain
2020-08-10 1:16 ` Guenter Roeck
2020-08-10 1:16 ` Guenter Roeck
2020-06-28 4:23 ` [PATCH 9/9] macintosh/via-macii: Clarify definition of macii_init() Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 6/9] macintosh/via-macii: Use bool type for reading_reply variable Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 7/9] macintosh/via-macii: Use unsigned type for autopoll_devs variable Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-06-28 4:23 ` [PATCH 1/9] macintosh/via-macii: Access autopoll_devs when inside lock Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-08-09 19:01 ` Guenter Roeck
2020-08-09 19:01 ` Guenter Roeck
2020-08-09 23:15 ` Finn Thain
2020-08-09 23:15 ` Finn Thain
2020-06-28 4:23 ` [PATCH 4/9] macintosh/via-macii: Remove read_done state Finn Thain
2020-06-28 4:23 ` Finn Thain
2020-07-27 7:26 ` [PATCH 0/9] Macintosh II ADB driver fixes Michael Ellerman
2020-07-27 7:26 ` Michael Ellerman
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=cover.1593318192.git.fthain@telegraphics.com.au \
--to=fthain@telegraphics.com.au \
--cc=benh@kernel.crashing.org \
--cc=funaho@jurai.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
/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.