Skip to content
Commit bbe1fe7e authored by Eran Tromer's avatar Eran Tromer Committed by Jeff Garzik
Browse files

[PATCH] libata: return sense data in HDIO_DRIVE_CMD ioctl



Make the HDIO_DRIVE_CMD ioctl in libata (ATA command pass through) return a
few ATA registers to userspace, following the same convention as the
drivers/ide implementation of the same ioctl.  This is needed to support ATA
commands like CHECK POWER MODE, which return information in nsectors.

This fixes "hdparm -C" on SATA drives.

Forcing the sense data read via the cc flag causes spurious check conditions,
so we filter these out (following the ATA command pass-through specification
T10/04-262r7).

Signed-off-by: default avatarEran Tromer <eran@tromer.org>
Acked-by: default avatarTejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 4ad99f15
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