Linux SCSI subsystem development
 help / color / mirror / Atom feed
* The PQ=1 saga
@ 2023-01-25  0:01 Martin K. Petersen
  2023-01-25  1:02 ` Brian Bunker
  2023-01-25  1:41 ` Bart Van Assche
  0 siblings, 2 replies; 14+ messages in thread
From: Martin K. Petersen @ 2023-01-25  0:01 UTC (permalink / raw)
  To: linux-scsi, Li Zhong
  Cc: Wenchao Hao, Andrey Melnikov, Martin Wilck, Bart Van Assche,
	Christoph Hellwig, Hannes Reinecke


I would like to revert commit 948e922fc446 ("scsi: core: map PQ=1,
PDT=other values to SCSI_SCAN_TARGET_PRESENT").

I have been spending quite a bit of time digging through old SCSI and
controller specs. As far as I can tell the original Linux behavior was
correct. Recent SPC specs are very abstract in this department resulting
in unfortunate ambiguity. But originally PQ=1 meant "LUN supports this
peripheral device type but no physical device is currently connected".

Based on this original definition, PQ=1 has been widely used throughout
the industry as a means to avoid associating an ULD driver with a
device. The LUN is accessible (primary commands, etc.) but no media is
present (no physical device connected).

Our original algorithm, which I would like to reinstate, is essentially
the following (in slightly unrolled form):

        if (PQ == 3)
            /* Don't expose device */
        else if ((PQ == 1 || sdev->pdt_1f_for_no_lun) && PDT == 0x1f)
            /* Don't expose device */
        else if (PQ == 1) {
            /* Expose device, don't bind ULD */
        } else /* PQ == 0 */
            /* Expose device, bind ULD if PDT is supported */

I would like to understand why -- in the case of the IBM 2145 --
exposing the sg device caused problems. Li: Can you shed some light on
the problems caused by 2145 LUNs reporting PQ=1?

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-11-20 16:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25  0:01 The PQ=1 saga Martin K. Petersen
2023-01-25  1:02 ` Brian Bunker
2023-01-25  4:04   ` Martin K. Petersen
2023-01-25 19:56     ` Brian Bunker
2023-01-25 20:36       ` Bart Van Assche
2023-01-25  1:41 ` Bart Van Assche
2023-01-25  8:33   ` Martin Wilck
2023-01-26  9:01     ` Hannes Reinecke
2023-01-27 19:57       ` Brian Bunker
2023-01-27 20:43         ` Bart Van Assche
2023-01-27 21:33           ` Brian Bunker
2023-01-30 13:35         ` Hannes Reinecke
2023-01-31 21:00           ` Brian Bunker
2025-11-20 16:46             ` Brian Bunker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox