Skip to content

Commit

Permalink
Merge pull request erichelgeson#137 from erichelgeson/eric/senseCache…
Browse files Browse the repository at this point in the history
…0x08

Add Sense page for caching 0x08
  • Loading branch information
erichelgeson authored and androda committed Jun 27, 2022
1 parent 4e7d205 commit f3232d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions F4_BlueSCSI/F4_BlueSCSI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,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 F4_BlueSCSI/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 f3232d5

Please sign in to comment.