提交 971890f2 编写于 作者: A Asai Thambi S P 提交者: Jens Axboe

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: NAsai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 2df7aa96
...@@ -2295,13 +2295,12 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd, ...@@ -2295,13 +2295,12 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd,
{ {
switch (cmd) { switch (cmd) {
case HDIO_GET_IDENTITY: case HDIO_GET_IDENTITY:
if (mtip_get_identify(dd->port, (void __user *) arg) < 0) { {
dev_warn(&dd->pdev->dev, if (copy_to_user((void __user *)arg, dd->port->identify,
"Unable to read identity\n"); sizeof(u16) * ATA_ID_WORDS))
return -EIO; return -EFAULT;
}
break; break;
}
case HDIO_DRIVE_CMD: case HDIO_DRIVE_CMD:
{ {
u8 drive_command[4]; u8 drive_command[4];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册