public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] scsi: scsi_debug: Changes to improve support for device types
@ 2025-03-10 15:55 Kai Mäkisara
  2025-03-10 15:55 ` [PATCH v2 1/5] scsi: scsi_debug: Fix two typos in command definitions Kai Mäkisara
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Kai Mäkisara @ 2025-03-10 15:55 UTC (permalink / raw)
  To: linux-scsi, dgilbert; +Cc: martin.petersen, James.Bottomley, Kai Mäkisara

The patch set includes changes to better support different device types.

The first patch fixes two obvious typos in the existing definitions.

The second patch adds a device type mask to the command definitions (struct
opcode_info_t). This makes possible for different command definitions for
different device types and makes easy to add opcodes specific to certain
device types. The mask is 32 bits wide and the bit positions are derived
from the Peripheral Device Type field returned from INQUIRY and used in
the struct scsi_device.

In addition to the mask, the second patch adds command filtering based on
device type to command queuing and building of the response in Report
Supported Opcodes.

The third patch splits definitions of READ(6), WRITE(6) and PRE-FETCH/READ
POSITION to versions for tapes and for other devices.

The fourth patch changes obtaining device type from sdebug_ptype to
struct scsi_device->type whenever it is set correctly. This improves
support for using different device types in the same debug host.

The patch set applies to 6.15/scsi-staging

v2:
- fixed devsel type in Patch 2, problem reported by the Kernel Test Robot
- added patch 5: Add ERASE for tapes

Kai Mäkisara (5):
  scsi: scsi_debug: Fix two typos in command definitions
  scsi: scsi_debug: Enable different command definitions for different
    device types
  scsi: scsi_debug: Move some tape-specific commands to separate
    definitions
  scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where
    possible
  scsi_scsi_debug: Add ERASE for tapes

 drivers/scsi/scsi_debug.c | 359 ++++++++++++++++++++++----------------
 1 file changed, 205 insertions(+), 154 deletions(-)

-- 
2.43.0


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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 15:55 [PATCH v2 0/5] scsi: scsi_debug: Changes to improve support for device types Kai Mäkisara
2025-03-10 15:55 ` [PATCH v2 1/5] scsi: scsi_debug: Fix two typos in command definitions Kai Mäkisara
2025-03-10 15:55 ` [PATCH v2 2/5] scsi: scsi_debug: Enable different command definitions for different device types Kai Mäkisara
2025-03-10 15:55 ` [PATCH v2 3/5] scsi: scsi_debug: Move some tape-specific commands to separate definitions Kai Mäkisara
2025-03-10 15:55 ` [PATCH v2 4/5] scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where possible Kai Mäkisara
2025-03-10 15:55 ` [PATCH v2 5/5] scsi_scsi_debug: Add ERASE for tapes Kai Mäkisara
2025-04-11 20:23 ` [PATCH v2 0/5] scsi: scsi_debug: Changes to improve support for device types Martin K. Petersen

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