diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
| -rw-r--r-- | drivers/ata/libata-scsi.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 9e92107691f2..a1a6e6298c33 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -423,9 +423,9 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, | |||
| 423 | * RETURNS: | 423 | * RETURNS: |
| 424 | * Zero on success, negative errno on error. | 424 | * Zero on success, negative errno on error. |
| 425 | */ | 425 | */ |
| 426 | static int ata_get_identity(struct scsi_device *sdev, void __user *arg) | 426 | static int ata_get_identity(struct ata_port *ap, struct scsi_device *sdev, |
| 427 | void __user *arg) | ||
| 427 | { | 428 | { |
| 428 | struct ata_port *ap = ata_shost_to_port(sdev->host); | ||
| 429 | struct ata_device *dev = ata_scsi_find_dev(ap, sdev); | 429 | struct ata_device *dev = ata_scsi_find_dev(ap, sdev); |
| 430 | u16 __user *dst = arg; | 430 | u16 __user *dst = arg; |
| 431 | char buf[40]; | 431 | char buf[40]; |
| @@ -645,7 +645,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) | |||
| 645 | return rc; | 645 | return rc; |
| 646 | } | 646 | } |
| 647 | 647 | ||
| 648 | int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) | 648 | int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev, |
| 649 | int cmd, void __user *arg) | ||
| 649 | { | 650 | { |
| 650 | int val = -EINVAL, rc = -EINVAL; | 651 | int val = -EINVAL, rc = -EINVAL; |
| 651 | 652 | ||
| @@ -663,7 +664,7 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) | |||
| 663 | return 0; | 664 | return 0; |
| 664 | 665 | ||
| 665 | case HDIO_GET_IDENTITY: | 666 | case HDIO_GET_IDENTITY: |
| 666 | return ata_get_identity(scsidev, arg); | 667 | return ata_get_identity(ap, scsidev, arg); |
| 667 | 668 | ||
| 668 | case HDIO_DRIVE_CMD: | 669 | case HDIO_DRIVE_CMD: |
| 669 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) | 670 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) |
| @@ -682,6 +683,14 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) | |||
| 682 | 683 | ||
| 683 | return rc; | 684 | return rc; |
| 684 | } | 685 | } |
| 686 | EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl); | ||
| 687 | |||
| 688 | int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) | ||
| 689 | { | ||
| 690 | return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host), | ||
| 691 | scsidev, cmd, arg); | ||
| 692 | } | ||
| 693 | EXPORT_SYMBOL_GPL(ata_scsi_ioctl); | ||
| 685 | 694 | ||
| 686 | /** | 695 | /** |
| 687 | * ata_scsi_qc_new - acquire new ata_queued_cmd reference | 696 | * ata_scsi_qc_new - acquire new ata_queued_cmd reference |
