|
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,
|
|
|
struct acpi_device *acpi_dev;
|
|
|
struct acpi_device_power_state *states;
|
|
|
|
|
|
- if (ap->flags & ATA_FLAG_ACPI_SATA)
|
|
|
- ata_dev = &ap->link.device[sdev->channel];
|
|
|
- else
|
|
|
+ if (ap->flags & ATA_FLAG_ACPI_SATA) {
|
|
|
+ if (!sata_pmp_attached(ap))
|
|
|
+ ata_dev = &ap->link.device[sdev->id];
|
|
|
+ else
|
|
|
+ ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id];
|
|
|
+ }
|
|
|
+ else {
|
|
|
ata_dev = &ap->link.device[sdev->id];
|
|
|
+ }
|
|
|
|
|
|
*handle = ata_dev_acpi_handle(ata_dev);
|
|
|
|