AS2105-based enclosure size issues with >2TB HDDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm investigating an issue with a HDD enclosure based on AS2105 chip. A 4TB GPT partition is not considered valid because reported last LBA reported by the enclosure makes kernel think that secondary GPT is outside disk plate.
I found this patch [1] forcing it to use READ_CAPACITY_16 first and fall back to READ_CAPACITY_10 if no success.
This enclosure has the same  vendor and product IDs, but behavior is a bit different: READ_CAPACITY_16 fails 100% of times as unsupported command. READ_CAPACITY_10 has a distinct behavior depending on HDD size:

- 1TB and 2TB: READ_CAPACITY_10 returns correct size value
- 3TB and 4TB: READ_CAPACITY_10 returns size in a 2TB modulus

If we fix capacity size by reporting (READ_CAPACITY_10 + MODULO_2TB), the result will be invalid when user plugs a <2TB HDD. An idea (bring by Oliver) is:  first guess reading last sector using modulus result to check if size is valid.

Any other ideas? There is better way to detect if enclosure is returning real LBA capacity or a modulo 2TB result?

Thanks,
Alfredo Dal'Ava Júnior


[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/storage?id=32c37fc30c52508711ea6a108cfd5855b8a07176

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux