Skip to content

Commit

Permalink
Merge pull request #133 from mactcp/main
Browse files Browse the repository at this point in the history
Fix handling of dbd bit in onModeSense(), cleanup some stray command table definitions.
  • Loading branch information
erichelgeson authored Jun 24, 2022
2 parents ad87d86 + f29da7c commit 4dbba49
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ SCSI_COMMAND_HANDLER(onRead10);
SCSI_COMMAND_HANDLER(onWrite6);
SCSI_COMMAND_HANDLER(onWrite10);
SCSI_COMMAND_HANDLER(onInquiry);
SCSI_COMMAND_HANDLER(onModeSense);
SCSI_COMMAND_HANDLER(onReadCapacity);
SCSI_COMMAND_HANDLER(onModeSense);
SCSI_COMMAND_HANDLER(onModeSelect);
Expand Down Expand Up @@ -285,7 +284,6 @@ void setup()
scsi_command_table[SCSI_WRITE6] = onWrite6;
scsi_command_table[SCSI_WRITE10] = onWrite10;
scsi_command_table[SCSI_INQUIRY] = onInquiry;
scsi_command_table[SCSI_MODE_SELECT6] = onModeSense;
scsi_command_table[SCSI_READ_CAPACITY] = onReadCapacity;
scsi_command_table[SCSI_MODE_SENSE6] = onModeSense;
scsi_command_table[SCSI_MODE_SENSE10] = onModeSense;
Expand Down Expand Up @@ -1165,7 +1163,7 @@ byte onModeSense(SCSI_DEVICE *dev, const byte *cdb)
int pageCode = cdb[2] & 0x3F;
int pageControl = cdb[2] >> 6;
int a = 4;
byte dbd = cdb[1] * 0x80;
byte dbd = cdb[1] & 0x08;

if(cdb[0] == SCSI_MODE_SENSE10) a = 8;

Expand Down

0 comments on commit 4dbba49

Please sign in to comment.