[PATCH v10 00/15] ata: add multi-LUN support for ATAPI devices
From: Phil Pemberton
Date: Fri Oct 09 2026 - 12:30:12 EST
This series adds multi-LUN ATAPI support for Panasonic/COMPAQ PD/CD
drives and fixes stale CD capacity after media changes.
Patches 1-5 fix pre-existing ACPI/SCSI lifetime, OF-node reference and
ZPODD notification bugs and can be merged independently. Patches 6-9
fix port detach, quirk matching and sr media handling; patches 10-15
add multi-LUN support.
Set libata.atapi_max_lun=8 to scan LUNs 0-7 on BLIST_FORCELUN devices.
The default remains LUN 0 only.
Changes since v9:
- Add ACPI uevent lifetime and SCSI OF-node release fixes (1-2).
- Fix ZPODD initialization and wake-attribution races (4-5).
- Update all sr block-size limits together and initialize/check sense
data before classifying TEST UNIT READY failures (8-9).
- Track resume/rescan completion per LUN and request runtime resume
asynchronously, balancing PM references across retries (11).
- Attribute ZPODD notifications once per physical wake (11).
- Publish accepted SCSI devices under the port lock, serialized with
removal (11, 14).
Base unchanged from v9.
v9: https://lore.kernel.org/linux-ide/20261006234202.1139018-1-philpem@xxxxxxxxxxxxx/
Phil Pemberton (15):
ata: libata-acpi: pin the SCSI device while emitting a bay event
scsi: core: release the device tree node at final device release
ata: libata-zpodd: reference SCSI devices in PM callbacks
ata: libata-zpodd: publish initialized state before registering
notifications
ata: libata-zpodd: serialize wake attribution with physical power-on
ata: libata-core: pin SCSI devices during port detach
scsi: scsi_devinfo: preserve full-width quirk identifiers
scsi: sr: keep queue block sizes in sync with the medium
scsi: sr: retry unfinished media revalidation on the next open
ata: libata-scsi: add atapi_max_lun module parameter
ata: libata-scsi: convert dev->sdev to per-LUN array
ata: libata-scsi: route non-zero LUN commands for multi-LUN ATAPI
scsi: add BLIST_NO_LUN_1F blacklist flag
ata: libata-scsi: probe additional LUNs for multi-LUN ATAPI devices
scsi: scsi_devinfo: add COMPAQ PD-1 multi-LUN ATAPI device quirk
drivers/ata/libata-acpi.c | 16 +-
drivers/ata/libata-core.c | 26 ++-
drivers/ata/libata-eh.c | 21 +-
drivers/ata/libata-scsi.c | 411 +++++++++++++++++++++++++++---------
drivers/ata/libata-zpodd.c | 110 ++++++++--
drivers/ata/libata.h | 8 +-
drivers/scsi/scsi_devinfo.c | 13 +-
drivers/scsi/scsi_scan.c | 3 +
drivers/scsi/scsi_sysfs.c | 2 +
drivers/scsi/sr.c | 44 +++-
drivers/scsi/sr.h | 2 +
include/linux/libata.h | 16 +-
include/scsi/scsi_device.h | 4 +-
include/scsi/scsi_devinfo.h | 6 +-
14 files changed, 529 insertions(+), 153 deletions(-)
base-commit: 22430ae5d90ab288b0ee2ad99ae941f4a666b694
--
2.43.0