Re: [PATCH v4 1/7] ata: libata-scsi: add atapi_max_lun module parameter
From: Niklas Cassel
Date: Tue May 12 2026 - 06:02:44 EST
On Tue, May 12, 2026 at 10:46:39AM +0900, Damien Le Moal wrote:
> On 5/7/26 08:45, Phil Pemberton wrote:
> > Until now libata has hard-coded shost->max_lun = 1 for every ATA host,
> > so the SCSI layer never scans past LUN 0. This blocks support for
> > the small handful of multi-LUN ATAPI devices (Panasonic LF-1195C and
> > COMPAQ PD-1 PD/CD combos export CD on LUN 0 and PD on LUN 1; old
> > Nakamichi MJ-x.y CD changers expose one LUN per disc slot, up to 7).
> >
> > Introduce a libata module parameter, atapi_max_lun, that controls the
> > upper bound of the per-host SCSI LUN scan. Default is 1, preserving
> > current behaviour exactly: out-of-the-box only LUN 0 is scanned.
> > Range is clamped to 1..ATAPI_MAX_LUN (8, the SCSI-2 ceiling).
> >
> > Subsequent patches gate actual LUN>0 probing on BLIST_FORCELUN, so a
> > device must both be on the SCSI device list (or carry the appropriate
> > quirk) and run on a host whose atapi_max_lun has been raised before
> > any extra LUNs are scanned.
> >
> > Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> > Signed-off-by: Phil Pemberton <philpem@xxxxxxxxxxxxx>
>
> Looks good, but this does not apply to libata tree for-7.2 / for-next branch.
> What is this based on ? Please rebase and resend as I would like to run some tests.
Tip:
When using "git format-patch" you can specify --base <SHA1> and
then the base SHA1 will be added at the end of the cover-letter.
Kind regards,
Niklas