Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293017
b: refs/heads/master
c: 8abda4d
h: refs/heads/master
i:
  293015: fd5c2c7
v: v3
  • Loading branch information
Dan Williams authored and James Bottomley committed Feb 29, 2012
1 parent 4990cac commit 2b05594
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d05919aad080074453de880822fe5805875645f
refs/heads/master: 8abda4d28a55ecb91e39ceb5e3ee264c5a3cd1af
5 changes: 5 additions & 0 deletions trunk/drivers/scsi/libsas/sas_ata.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,13 @@ static void async_sas_ata_eh(void *data, async_cookie_t cookie)
struct ata_port *ap = dev->sata_dev.ap;
struct sas_ha_struct *ha = dev->port->ha;

/* hold a reference over eh since we may be racing with final
* remove once all commands are completed
*/
kref_get(&dev->kref);
ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata port error handler");
ata_scsi_port_error_handler(ha->core.shost, ap);
sas_put_device(dev);
}

void sas_ata_strategy_handler(struct Scsi_Host *shost)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/scsi/libsas/sas_discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ void sas_free_device(struct kref *kref)
if (dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV)
kfree(dev->ex_dev.ex_phy);

if (dev_is_sata(dev) && dev->sata_dev.ap) {
ata_sas_port_destroy(dev->sata_dev.ap);
dev->sata_dev.ap = NULL;
}

kfree(dev);
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/scsi/libsas/sas_scsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,6 @@ void sas_target_destroy(struct scsi_target *starget)
if (!found_dev)
return;

if (dev_is_sata(found_dev))
ata_sas_port_destroy(found_dev->sata_dev.ap);

starget->hostdata = NULL;
sas_put_device(found_dev);
}
Expand Down

0 comments on commit 2b05594

Please sign in to comment.