diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 5252143b6297..a18c0f6d6668 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -371,6 +371,7 @@ static int sas_issue_ata_cmd(struct domain_device *dev, u8 command, | |||
371 | 371 | ||
372 | task->dev = dev; | 372 | task->dev = dev; |
373 | 373 | ||
374 | task->ata_task.fis.fis_type = 0x27; | ||
374 | task->ata_task.fis.command = command; | 375 | task->ata_task.fis.command = command; |
375 | task->ata_task.fis.features = features; | 376 | task->ata_task.fis.features = features; |
376 | task->ata_task.fis.device = d2h_fis->device; | 377 | task->ata_task.fis.device = d2h_fis->device; |
@@ -483,11 +484,7 @@ cont1: | |||
483 | 484 | ||
484 | sas_fill_in_rphy(dev, dev->rphy); | 485 | sas_fill_in_rphy(dev, dev->rphy); |
485 | 486 | ||
486 | res = sas_rphy_add(dev->rphy); | 487 | return 0; |
487 | if (res) | ||
488 | goto out_err; | ||
489 | |||
490 | return res; | ||
491 | out_err: | 488 | out_err: |
492 | dev->sata_dev.identify_packet_device = NULL; | 489 | dev->sata_dev.identify_packet_device = NULL; |
493 | dev->sata_dev.identify_device = NULL; | 490 | dev->sata_dev.identify_device = NULL; |
@@ -555,7 +552,7 @@ int sas_discover_sata(struct domain_device *dev) | |||
555 | 552 | ||
556 | res = sas_notify_lldd_dev_found(dev); | 553 | res = sas_notify_lldd_dev_found(dev); |
557 | if (res) | 554 | if (res) |
558 | goto out_err2; | 555 | return res; |
559 | 556 | ||
560 | switch (dev->dev_type) { | 557 | switch (dev->dev_type) { |
561 | case SATA_DEV: | 558 | case SATA_DEV: |
@@ -567,23 +564,12 @@ int sas_discover_sata(struct domain_device *dev) | |||
567 | default: | 564 | default: |
568 | break; | 565 | break; |
569 | } | 566 | } |
570 | if (res) | ||
571 | goto out_err; | ||
572 | |||
573 | sas_notify_lldd_dev_gone(dev); | 567 | sas_notify_lldd_dev_gone(dev); |
574 | res = sas_notify_lldd_dev_found(dev); | 568 | if (!res) { |
575 | if (res) | 569 | sas_notify_lldd_dev_found(dev); |
576 | goto out_err2; | 570 | res = sas_rphy_add(dev->rphy); |
577 | 571 | } | |
578 | res = sas_rphy_add(dev->rphy); | ||
579 | if (res) | ||
580 | goto out_err; | ||
581 | |||
582 | return res; | ||
583 | 572 | ||
584 | out_err: | ||
585 | sas_notify_lldd_dev_gone(dev); | ||
586 | out_err2: | ||
587 | return res; | 573 | return res; |
588 | } | 574 | } |
589 | 575 | ||