]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where possible
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>
Mon, 10 Mar 2025 15:55:56 +0000 (17:55 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 11 Apr 2025 20:19:27 +0000 (16:19 -0400)
commit34252036774b19f66eb9241e4b0b5a07f3461dbe
treeed91b6ec208040ab6de7eef0f6ec1b8fc77f44c6
parent5b0cb8c984bf68dc98aa02ab534e7ddb47157693
scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where possible

Devices of several types can be created for a single host. The module
device type should be used only when the devices are created.

Scsi_scan sets the device type initially to 0xff and sets the correct
type based in Inquiry results. This means that Inquiry must report
sdebug_ptype as long as scsi_device->type is not set (the limit 32
comes from the 5-bit length of the Peripheral Device Type in Inquiry).

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250310155557.2872-5-Kai.Makisara@kolumbus.fi
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c