public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fuchs <fuchsfl@gmail.com>
To: linux-sh@vger.kernel.org,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Artur Rojek <contact@artur-rojek.eu>
Cc: Adrian McMenamin <adrianmcmenamin@gmail.com>,
	linux-kernel@vger.kernel.org, Florian Fuchs <fuchsfl@gmail.com>
Subject: [PATCH v3 0/3] cdrom: gdrom: fix block I/O and capacity setting
Date: Thu, 23 Apr 2026 21:41:29 +0200	[thread overview]
Message-ID: <20260423194132.693271-1-fuchsfl@gmail.com> (raw)

Hi all,

This series fixes a gdrom driver Oops due to bad MMIO register access and
fixes the missing updates of the block layer gendisk capacity that
prevented ISO9660 mounts from working. It fixes also the case of disc
swapping by sending the Test Unit command prior to cdrom_open().

The change was tested on real Sega Dreamcast devices (PAL-E, NTSC-J,
NTSC-U) with physical CD-R discs and with GDEMU emulated discs. Before:
Oops on mount and an unusable drive. After: Successfully able to mount
and use the inserted medium.

Thanks,
Florian
---
v2->v3: Added patch "cdrom: gdrom: verify device access after disc swap"
        from Artur Rojek to also handle the disc swap case reliably. And
        added Acked-by, Reviewed-by from v2 to the respective patches.
        Also handle the GDROM case in gdrom_update_capacity().
v1->v2: for "cdrom: gdrom: replace port I/O with MMIO accessors": Don't
        use helper functions with io.*_rep(), but writesw() and readsw()
        local in the respective functions. Improved failure case of
        gdrom_update_capacity() in gdrom_bdops_open().

v2: https://lore.kernel.org/linux-sh/20260419162823.2829286-1-fuchsfl@gmail.com/
v1: https://lore.kernel.org/linux-sh/20260405082330.4104672-1-fuchsfl@gmail.com/

Artur Rojek (1):
  cdrom: gdrom: verify device access after disc swap

Florian Fuchs (2):
  cdrom: gdrom: replace port I/O with MMIO accessors
  cdrom: gdrom: update gendisk capacity on open

 drivers/cdrom/gdrom.c | 65 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 61 insertions(+), 4 deletions(-)


base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
-- 
2.43.0


             reply	other threads:[~2026-04-23 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 19:41 Florian Fuchs [this message]
2026-04-23 19:41 ` [PATCH v3 1/3] cdrom: gdrom: replace port I/O with MMIO accessors Florian Fuchs
2026-04-23 19:41 ` [PATCH v3 2/3] cdrom: gdrom: update gendisk capacity on open Florian Fuchs
2026-04-24 18:57   ` Artur Rojek
2026-04-23 19:41 ` [PATCH v3 3/3] cdrom: gdrom: verify device access after disc swap Florian Fuchs

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=20260423194132.693271-1-fuchsfl@gmail.com \
    --to=fuchsfl@gmail.com \
    --cc=adrianmcmenamin@gmail.com \
    --cc=contact@artur-rojek.eu \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox