summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2008-04-12 17:21:22 +0000
committersos <sos@FreeBSD.org>2008-04-12 17:21:22 +0000
commitc7e894e8b0e9bdaf380328d6ca4d813f4443304c (patch)
tree0979bf3c14a6661460395ea98d30df8760b94a31 /sys/dev/ata
parentcd9fb4aea0a817d2863b3261200fa4556edd221c (diff)
downloadFreeBSD-src-c7e894e8b0e9bdaf380328d6ca4d813f4443304c.zip
FreeBSD-src-c7e894e8b0e9bdaf380328d6ca4d813f4443304c.tar.gz
Dont call hw.status recursively.
Spotted by: Marcel Moolenaar
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-chipset.c12
-rw-r--r--sys/dev/ata/ata-pci.c2
-rw-r--r--sys/dev/ata/ata-pci.h1
3 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 236b5c1..7c8d5e55 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -2417,13 +2417,11 @@ ata_intel_31244_allocate(device_t dev)
static int
ata_intel_31244_status(device_t dev)
{
- struct ata_channel *ch = device_get_softc(dev);
-
/* do we have any PHY events ? */
ata_sata_phy_check_events(dev);
/* any drive action to take care of ? */
- return ch->hw.status(dev);
+ return ata_pci_status(dev);
}
static void
@@ -3751,7 +3749,7 @@ ata_promise_status(device_t dev)
struct ata_channel *ch = device_get_softc(dev);
if (ATA_INL(ctlr->r_res1, 0x1c) & (ch->unit ? 0x00004000 : 0x00000400)) {
- return ch->hw.status(dev);
+ return ata_pci_status(dev);
}
return 0;
}
@@ -3918,7 +3916,7 @@ ata_promise_tx2_status(device_t dev)
ATA_IDX_OUTB(ch, ATA_BMDEVSPEC_0, 0x0b);
if (ATA_IDX_INB(ch, ATA_BMDEVSPEC_1) & 0x20) {
- return ch->hw.status(dev);
+ return ata_pci_status(dev);
}
return 0;
}
@@ -5040,7 +5038,7 @@ ata_cmd_status(device_t dev)
(ch->unit ? 0x08 : 0x04))) {
pci_write_config(device_get_parent(dev), 0x71,
reg71 & ~(ch->unit ? 0x04 : 0x08), 1);
- return ch->hw.status(dev);
+ return ata_pci_status(dev);
}
return 0;
}
@@ -5162,7 +5160,7 @@ ata_sii_status(device_t dev)
ata_sata_phy_check_events(dev);
if (ATA_INL(ctlr->r_res2, 0xa0 + offset1) & 0x00000800)
- return ch->hw.status(dev);
+ return ata_pci_status(dev);
else
return 0;
}
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index daee8e5..ab5342b 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -422,7 +422,7 @@ ata_pci_allocate(device_t dev)
return 0;
}
-static int
+int
ata_pci_status(device_t dev)
{
struct ata_channel *ch = device_get_softc(dev);
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index 314b333..7a83ec8 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -459,6 +459,7 @@ int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, st
int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep);
int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie);
int ata_pci_allocate(device_t dev);
+int ata_pci_status(device_t dev);
void ata_pci_hw(device_t dev);
void ata_pci_dmainit(device_t dev);
char *ata_pcivendor2str(device_t dev);
OpenPOWER on IntegriCloud