aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index a70881c408e5..fedf62de9460 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2617,7 +2617,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2617 2617
2618static struct ata_device *ata_find_dev(struct ata_port *ap, int devno) 2618static struct ata_device *ata_find_dev(struct ata_port *ap, int devno)
2619{ 2619{
2620 if (ap->nr_pmp_links == 0) { 2620 if (!sata_pmp_attached(ap)) {
2621 if (likely(devno < ata_link_max_devices(&ap->link))) 2621 if (likely(devno < ata_link_max_devices(&ap->link)))
2622 return &ap->link.device[devno]; 2622 return &ap->link.device[devno];
2623 } else { 2623 } else {
@@ -2634,7 +2634,7 @@ static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap,
2634 int devno; 2634 int devno;
2635 2635
2636 /* skip commands not addressed to targets we simulate */ 2636 /* skip commands not addressed to targets we simulate */
2637 if (ap->nr_pmp_links == 0) { 2637 if (!sata_pmp_attached(ap)) {
2638 if (unlikely(scsidev->channel || scsidev->lun)) 2638 if (unlikely(scsidev->channel || scsidev->lun))
2639 return NULL; 2639 return NULL;
2640 devno = scsidev->id; 2640 devno = scsidev->id;
@@ -3492,7 +3492,7 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
3492 if (lun != SCAN_WILD_CARD && lun) 3492 if (lun != SCAN_WILD_CARD && lun)
3493 return -EINVAL; 3493 return -EINVAL;
3494 3494
3495 if (ap->nr_pmp_links == 0) { 3495 if (!sata_pmp_attached(ap)) {
3496 if (channel != SCAN_WILD_CARD && channel) 3496 if (channel != SCAN_WILD_CARD && channel)
3497 return -EINVAL; 3497 return -EINVAL;
3498 devno = id; 3498 devno = id;