Skip to content

Commit

Permalink
Merge pull request #331 from ZuluSCSI/initiator-odd-size-fix
Browse files Browse the repository at this point in the history
Apply @ZigZagJoe's patch to fix initiator mode for oddly-sized HDDs
  • Loading branch information
aperezbios authored Nov 3, 2023
2 parents d993265 + 64c8240 commit 8966933
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ZuluSCSI_initiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,9 @@ bool scsiInitiatorReadDataToFile(int target_id, uint32_t start_sector, uint32_t
{
int status = -1;

if (start_sector < 0xFFFFFF && sectorcount <= 256)
// Read6 command supports 21 bit LBA - max of 0x1FFFFF
// ref: https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf pg 134
if (start_sector < 0x1FFFFF && sectorcount <= 256)
{
// Use READ6 command for compatibility with old SCSI1 drives
uint8_t command[6] = {0x08,
Expand Down

0 comments on commit 8966933

Please sign in to comment.