Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47365
b: refs/heads/master
c: 0529c15
h: refs/heads/master
i:
  47363: c842ebb
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Feb 9, 2007
1 parent c5016bb commit 96f9b83
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 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: 9ac7849e35f705830f7b016ff272b0ff1f7ff759
refs/heads/master: 0529c159dbdd79794796c1b50b39442d72efbe97
3 changes: 1 addition & 2 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,8 +1792,7 @@ static void ahci_remove_one (struct pci_dev *pdev)
unsigned int i;
int have_msi;

for (i = 0; i < host->n_ports; i++)
ata_port_detach(host->ports[i]);
ata_host_detach(host);

have_msi = hpriv->flags & AHCI_FLAG_MSI;
free_irq(host->irq, host);
Expand Down
22 changes: 19 additions & 3 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5991,6 +5991,23 @@ void ata_port_detach(struct ata_port *ap)
scsi_remove_host(ap->scsi_host);
}

/**
* ata_host_detach - Detach all ports of an ATA host
* @host: Host to detach
*
* Detach all ports of @host.
*
* LOCKING:
* Kernel thread context (may sleep).
*/
void ata_host_detach(struct ata_host *host)
{
int i;

for (i = 0; i < host->n_ports; i++)
ata_port_detach(host->ports[i]);
}

/**
* ata_host_remove - PCI layer callback for device removal
* @host: ATA host set that was removed
Expand All @@ -6006,8 +6023,7 @@ void ata_host_remove(struct ata_host *host)
{
unsigned int i;

for (i = 0; i < host->n_ports; i++)
ata_port_detach(host->ports[i]);
ata_host_detach(host);

free_irq(host->irq, host);
if (host->irq2)
Expand Down Expand Up @@ -6382,7 +6398,7 @@ EXPORT_SYMBOL_GPL(ata_std_bios_param);
EXPORT_SYMBOL_GPL(ata_std_ports);
EXPORT_SYMBOL_GPL(ata_host_init);
EXPORT_SYMBOL_GPL(ata_device_add);
EXPORT_SYMBOL_GPL(ata_port_detach);
EXPORT_SYMBOL_GPL(ata_host_detach);
EXPORT_SYMBOL_GPL(ata_host_remove);
EXPORT_SYMBOL_GPL(ata_sg_init);
EXPORT_SYMBOL_GPL(ata_sg_init_one);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ extern int ata_pci_device_resume(struct pci_dev *pdev);
extern int ata_pci_clear_simplex(struct pci_dev *pdev);
#endif /* CONFIG_PCI */
extern int ata_device_add(const struct ata_probe_ent *ent);
extern void ata_port_detach(struct ata_port *ap);
extern void ata_host_detach(struct ata_host *host);
extern void ata_host_init(struct ata_host *, struct device *,
unsigned long, const struct ata_port_operations *);
extern void ata_host_remove(struct ata_host *host);
Expand Down

0 comments on commit 96f9b83

Please sign in to comment.