diff options
author | Asai Thambi S P <asamymuthupa@micron.com> | 2012-05-29 18:41:47 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-05-31 08:36:55 +0200 |
commit | 971890f25834e1e81ccb97b9413d0c2852d49208 (patch) | |
tree | 0310974c32b562ccad9e8d83b33c9a687ee5c522 /drivers/block/mtip32xx | |
parent | 2df7aa96e75c4447e8bae0fd03b8c386c36ece40 (diff) |
mtip32xx: Change HDIO_GET_IDENTITY to return stored data
For the ioctl command HDIO_GET_IDENTITY, return the stored copy of IDENTIFY
DATA instead of sending the command to the device - similar to libata.
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mtip32xx')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 4b057a7312d..73d7caa3cae 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -2295,13 +2295,12 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd, { switch (cmd) { case HDIO_GET_IDENTITY: - if (mtip_get_identify(dd->port, (void __user *) arg) < 0) { - dev_warn(&dd->pdev->dev, - "Unable to read identity\n"); - return -EIO; - } - + { + if (copy_to_user((void __user *)arg, dd->port->identify, + sizeof(u16) * ATA_ID_WORDS)) + return -EFAULT; break; + } case HDIO_DRIVE_CMD: { u8 drive_command[4]; |