Skip to content

Commit

Permalink
Add Sesne page for caching 0x08
Browse files Browse the repository at this point in the history
  • Loading branch information
erichelgeson committed Jun 26, 2022
1 parent 423b054 commit 127290a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 127290a

Please sign in to comment.