Opened 6 years ago

Closed 3 years ago

#14670 closed bug (fixed)

Support for USB drives greater than 2TB

Reported by: pulkomandy Owned by:
Priority: normal Milestone: R1/beta4
Component: Drivers/Disk/USB Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #17745
Platform: All

Description

Our current USB driver uses 32-bit LBA commands (READ_10, READ_CAPACITY_10, etc) to handle disk access. This works only for disks up to 2TB (4Gsectors). Disks larger than this report a "last sector" of 0xFFFFFFFF, which our code converts to a 0-sized disk.

Interestingly enough it is still possible to access the first 2TB of the drive, but the GPT add-on will be confused by partitions after the disk end, and DriveSetup will not allow initializing a 0-size drive.

The generic SCSI module uses the extended commands (READ_16, etc), however these are optional in the SCSI spec. So, we should first try the _10 variant and only switch to _16 when we detect a large drive, in order to preserve compatibility with the spec and with usual USB drives which will implement only the minimal set of commands required.

Change History (4)

comment:1 by waddlesplash, 3 years ago

Blocking: 17745 added

comment:2 by danboid, 3 years ago

I encountered this limitation today.

comment:3 by korli, 3 years ago

Milestone: UnscheduledR1/beta4

comment:4 by korli, 3 years ago

Resolution: fixed
Status: newclosed

merged in hrev56215

Note: See TracTickets for help on using tickets.