Adapt the capacity calculation based on reported sector size
Read the sector size from ATA Identify, so that the capacity reported is right when the sector size != 512B. Increase the COMRESET recovery time a bit more to account for long spin up mechanical drives - the timeout's only used if a drive is present, so is harmless on fast (eg. SSD) drives which recover well before the timeout. Tested on Titanium with an assortment of manufacturer drives, capacities, and sector sizes. Version 0.05. Tagged as 'SATADriver-0_05'
Showing with 31 additions and 16 deletions