Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a device based on the Linux SG 3 driver, e.g. for SCSI-to-USB bridge #107

Open
uweseimet opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@uweseimet
Copy link
Owner

uweseimet commented Nov 27, 2024

A new device type SCSG shall use the Linux SG 3 (generic SCSI) driver. This device type directly exposes any device that the Linux SG driver supports as a SCSI device, usually mass storage devices.

As all commands are passed to the actual device instead of being emulated, INQUIRY does not report "SCSI2Pi:SCSI HD" etc., but the real name of the device, based on the device's INQUIRY data. The same applies for other device data like the SCSI level.

Notes:

  • Linux limits the maximum SCSI transfer size per SCSI command. This means that s2p has to split large transfers into smaller chunks. s2p does this for block-oriented commands, but not for others.
  • s2p can only support known SCSI commands, i.e. those listed on https://www.scsi2pi.net/en/scsi_commands.html. This is because the target (s2p) needs to know the number of bytes in each CDB. Unknown commands are rejected with INVALID COMMAND OPERATION CODE.
  • Knowledge about each command is also required in order to correctly split large transfers into smaller ones, e.g. a single READ(10) transfer in several smaller READ(10) transfers with sizes within the Linux limits.
@uweseimet uweseimet added the enhancement New feature or request label Nov 27, 2024
@uweseimet uweseimet self-assigned this Nov 27, 2024
@uweseimet uweseimet moved this to In progress in SCSI2Pi release 4.1 Nov 27, 2024
@uweseimet uweseimet moved this to In progress in SCSI2Pi release 4.2 Nov 28, 2024
@uweseimet uweseimet changed the title Evaluate/implement a device type that maps to the Linux sg driver Evaluate/implement a device type that maps to the Linux SG 3 driver Nov 30, 2024
@uweseimet uweseimet changed the title Evaluate/implement a device type that maps to the Linux SG 3 driver Implement a device that maps to the Linux SG 3 driver, e.g. for a SCSI-to-USB bridge Dec 1, 2024
@uweseimet uweseimet changed the title Implement a device that maps to the Linux SG 3 driver, e.g. for a SCSI-to-USB bridge Implement a device that maps to the Linux SG 3 driver, e.g. a SCSI-to-USB bridge Dec 1, 2024
@uweseimet uweseimet removed the on hold label Dec 1, 2024
@uweseimet uweseimet changed the title Implement a device that maps to the Linux SG 3 driver, e.g. a SCSI-to-USB bridge Implement a SCSI-to-USB bridge based on the Linux SG 3 driver Dec 2, 2024
@uweseimet uweseimet changed the title Implement a SCSI-to-USB bridge based on the Linux SG 3 driver Implement a device type SCSG based on the Linux SG 3 driver, e.g. for SCSI-to-USB Dec 2, 2024
@uweseimet
Copy link
Owner Author

uweseimet commented Dec 2, 2024

This feature has passed initial tests with an Atari TT, a USB stick, a USB floppy drive and a USB DVD drive.

@uweseimet uweseimet moved this to In progress in SCSI2Pi release 5.0 Dec 2, 2024
@uweseimet uweseimet changed the title Implement a device type SCSG based on the Linux SG 3 driver, e.g. for SCSI-to-USB Implement a device based on the Linux SG 3 driver, e.g. for SCSI-to-USB Dec 2, 2024
@uweseimet uweseimet changed the title Implement a device based on the Linux SG 3 driver, e.g. for SCSI-to-USB Implement a device based on the Linux SG 3 driver, e.g. for SCSI-to-USB bridge Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

1 participant