Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29521
b: refs/heads/master
c: f0eb62b
h: refs/heads/master
i:
  29519: 3fe4e19
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jun 12, 2006
1 parent 75185f9 commit f72ce3d
Show file tree
Hide file tree
Showing 4 changed files with 20 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: d01712698c7c52bc71f41192e864dccc90a1217d
refs/heads/master: f0eb62b81dd16bfc4034916418c3406ba20011e1
15 changes: 13 additions & 2 deletions trunk/drivers/scsi/libata-bmdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,21 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,

/* FIXME: check ata_device_add return */
if (legacy_mode) {
if (legacy_mode & (1 << 0))
struct device *dev = &pdev->dev;
struct ata_host_set *host_set = NULL;

if (legacy_mode & (1 << 0)) {
ata_device_add(probe_ent);
if (legacy_mode & (1 << 1))
host_set = dev_get_drvdata(dev);
}

if (legacy_mode & (1 << 1)) {
ata_device_add(probe_ent2);
if (host_set) {
host_set->next = dev_get_drvdata(dev);
dev_set_drvdata(dev, host_set);
}
}
} else
ata_device_add(probe_ent);

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5621,8 +5621,12 @@ void ata_pci_remove_one (struct pci_dev *pdev)
{
struct device *dev = pci_dev_to_dev(pdev);
struct ata_host_set *host_set = dev_get_drvdata(dev);
struct ata_host_set *host_set2 = host_set->next;

ata_host_set_remove(host_set);
if (host_set2)
ata_host_set_remove(host_set2);

pci_release_regions(pdev);
pci_disable_device(pdev);
dev_set_drvdata(dev, NULL);
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ struct ata_host_set {
unsigned long flags;
int simplex_claimed; /* Keep seperate in case we
ever need to do this locked */
struct ata_port * ports[0];
struct ata_host_set *next; /* for legacy mode */
struct ata_port *ports[0];
};

struct ata_queued_cmd {
Expand Down

0 comments on commit f72ce3d

Please sign in to comment.