Skip to content
Commit f7acede6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jeff Garzik
Browse files

libata: fix ata_id_logical_per_physical_sectors



The value we get from the low byte of the ATA_ID_SECTOR_SIZE word is not not
a plain multiple, but the log of it, so fix the helper to give the correct
answer.  Without this we'll get an incorrect minimal I/O size in the block
limits VPD page for 4k sector drives.

Also change the return value of ata_id_logical_per_physical_sectors to u16
for the unlikely case of very large logical sectors.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent bc496ed0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment