Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default SCSI level
Browse files Browse the repository at this point in the history
uweseimet committed Jan 7, 2025
1 parent 14171db commit ae6cabb
Showing 6 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cpp/base/primary_device.h
Original file line number Diff line number Diff line change
@@ -187,8 +187,8 @@ class PrimaryDevice : public Device
ProductData product_data = ProductData(
{ "SCSI2Pi", "", fmt::format("{0:02}{1:1}{2:1}", s2p_major_version, s2p_minor_version, s2p_revision) });

ScsiLevel level = ScsiLevel::SCSI_2;
ScsiLevel response_data_format = ScsiLevel::SCSI_2;
ScsiLevel level = ScsiLevel::NONE;
ScsiLevel response_data_format = ScsiLevel::SCSI_1_CCS;

SenseKey sense_key = SenseKey::NO_SENSE;
Asc asc = Asc::NO_ADDITIONAL_SENSE_INFORMATION;
1 change: 1 addition & 0 deletions cpp/devices/daynaport.cpp
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ DaynaPort::DaynaPort(int lun) : PrimaryDevice(SCDP, lun, DAYNAPORT_READ_HEADER_S
{
// These data are required by the DaynaPort drivers
PrimaryDevice::SetProductData( { "Dayna", "SCSI/Link", "1.4a" }, true);
SetScsiLevel(ScsiLevel::SCSI_2);
SupportsParams(true);
SetReady(true);
}
1 change: 1 addition & 0 deletions cpp/devices/optical_memory.cpp
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ OpticalMemory::OpticalMemory(int lun) : Disk(SCMO, lun, true, true, { 512, 1024,
geometries[2048 * 310352] = { 2048, 310352 };

Disk::SetProductData( { "", "SCSI MO", "" }, true);
SetScsiLevel(ScsiLevel::SCSI_2);
SetProtectable(true);
SetRemovable(true);
}
1 change: 1 addition & 0 deletions cpp/devices/printer.cpp
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@ using namespace memory_util;
Printer::Printer(int lun) : PrimaryDevice(SCLP, lun)
{
PrimaryDevice::SetProductData( { "", "SCSI PRINTER", "" }, true);
SetScsiLevel(ScsiLevel::SCSI_2);
SupportsParams(true);
SetReady(true);
}
1 change: 1 addition & 0 deletions cpp/devices/tape.cpp
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ using namespace s2p_util;
Tape::Tape(int lun) : StorageDevice(SCTP, lun, true, false, { 512, 1024, 2048, 4096, 8192 })
{
StorageDevice::SetProductData( { "", "SCSI TAPE", "" }, true);
SetScsiLevel(ScsiLevel::SCSI_2);
SupportsParams(true);
SetProtectable(true);
SetRemovable(true);
2 changes: 1 addition & 1 deletion cpp/test/primary_device_test.cpp
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ TEST(PrimaryDeviceTest, SetScsiLevel)
{
MockPrimaryDevice device(0);

EXPECT_EQ(ScsiLevel::SCSI_2, device.GetScsiLevel());
EXPECT_EQ(ScsiLevel::NONE, device.GetScsiLevel());

EXPECT_TRUE(device.SetScsiLevel(ScsiLevel::NONE));
EXPECT_FALSE(device.SetScsiLevel(static_cast<ScsiLevel>(10)));

0 comments on commit ae6cabb

Please sign in to comment.