diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_ata.c')
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 37a9e73870d4..26a943eb153a 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -661,8 +661,13 @@ static void async_sas_ata_eh(void *data, async_cookie_t cookie) | |||
661 | struct ata_port *ap = dev->sata_dev.ap; | 661 | struct ata_port *ap = dev->sata_dev.ap; |
662 | struct sas_ha_struct *ha = dev->port->ha; | 662 | struct sas_ha_struct *ha = dev->port->ha; |
663 | 663 | ||
664 | /* hold a reference over eh since we may be racing with final | ||
665 | * remove once all commands are completed | ||
666 | */ | ||
667 | kref_get(&dev->kref); | ||
664 | ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata port error handler"); | 668 | ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata port error handler"); |
665 | ata_scsi_port_error_handler(ha->core.shost, ap); | 669 | ata_scsi_port_error_handler(ha->core.shost, ap); |
670 | sas_put_device(dev); | ||
666 | } | 671 | } |
667 | 672 | ||
668 | void sas_ata_strategy_handler(struct Scsi_Host *shost) | 673 | void sas_ata_strategy_handler(struct Scsi_Host *shost) |