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

Add Sense page for caching 0x08 #137

Merged
merged 1 commit into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,14 @@ byte onModeSense(SCSI_DEVICE *dev, const byte *cdb)
}
a += 0x20;
if(pageCode != SCSI_SENSE_MODE_ALL) break;
case SCSI_SENSE_MODE_CACHING:
m_buf[a + 0] = SCSI_SENSE_MODE_CACHING;
m_buf[a + 1] = 0x0A; // Page length
if(pageControl != 1) {
m_buf[a + 2] = 0x01; // Disalbe Read Cache so no one asks for Cache Stats page.
}
a += 0x08;
if(pageCode != SCSI_SENSE_MODE_ALL) break;
case SCSI_SENSE_MODE_VENDOR_APPLE:
{
const byte page30[0x14] = {0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E, 0x43, 0x20};
Expand Down
1 change: 1 addition & 0 deletions src/scsi_sense.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#define SCSI_SENSE_MODE_FORMAT_DEVICE 0x03
#define SCSI_SENSE_MODE_DISK_GEOMETRY 0x04
#define SCSI_SENSE_MODE_FLEXABLE_GEOMETRY 0x05
#define SCSI_SENSE_MODE_CACHING 0x08
#define SCSI_SENSE_MODE_VENDOR_APPLE 0x30

#define SCSI_SENSE_MODE_ALL 0x3F
Expand Down