-
Notifications
You must be signed in to change notification settings - Fork 20
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
READ(6) bug in Initiator mode with oddly-sized HDD #330
Comments
@ZigZagJoe thanks for the contribution. We should be able to merge this shortly. |
Happy to help. As an aside: the Seagate SCSI reference manual I cite there states a 2GB max for READ(6), but with 21 bits for the LBA [max of 0x1FFFFF] * LBA size of 512 bytes that gives an actual max address of 1GB. So that's where that value I actually used came from. |
Yeah, this patch looks correct. https://www.staff.uni-mainz.de/tacke/scsi/SCSI2-09.html#9.2.5 agrees on the 21 bit limit for block address. |
Applying ZigZagJoe patch from issue: #330 Co-authored-by: zigzagjoe <[email protected]>
@ZigZagJoe this has been merged in to the repository, and will be incorporated in the next release. Until then, CI-built nightly/on-demand binaries can be had at https://github.com/ZuluSCSI/ZuluSCSI-firmware/releases/tag/latest |
ZuluSCSI currently handles oddly sized drives >1GB incorrectly in initiator mode.
Scenario: IBM DCAS32160 - 4226725 sectors in length. As this is not evenly divisible by 512 (g_initiator_state.max_sector_per_transfer), it trys to use READ(6) rather than READ(10) to read the last 165 sectors. However, READ(6) has a maximum sector of 0x1FFFFF (21 bits), but the code is checking start_sector < 0xFFFFFF (24 bits). This results in failure to read each of these remaining 165 sectors and an incomplete image.
Verified issue is corrected when checking for start_sector < 0x1FFFFF for READ(6) path.
Please see below for appropriate patch.
The text was updated successfully, but these errors were encountered: