PERFORCE change 167779 for review
Alexander Motin
mav at FreeBSD.org
Tue Aug 25 10:00:22 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167779
Change 167779 by mav at mav_mavbook on 2009/08/25 10:00:01
With high request rates and long ATA timeouts it looks cheaper to
ignore some rare obsoleted timeouts then bother with stopping them
to rearm again in just a few milliseconds.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#54 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#54 (text+ko) ====
@@ -851,6 +851,7 @@
for (i = 0; i < ch->numslots; i++) {
struct ahci_slot *slot = &ch->slot[i];
+ callout_drain(&slot->timeout);
if (slot->dma.data_map) {
bus_dmamap_destroy(ch->dma.data_tag, slot->dma.data_map);
slot->dma.data_map = NULL;
@@ -1246,6 +1247,10 @@
struct ahci_channel *ch = device_get_softc(dev);
int i;
+ /* Check for stale timeout. */
+ if (slot->state != AHCI_SLOT_RUNNING)
+ return;
+
device_printf(dev, "Timeout on slot %d\n", slot->slot);
/* Kick controller into sane state. */
ahci_stop(ch->dev);
@@ -1278,8 +1283,6 @@
struct ahci_channel *ch = device_get_softc(dev);
union ccb *ccb = slot->ccb;
- /* Cancel command execution timeout */
- callout_stop(&slot->timeout);
bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
BUS_DMASYNC_POSTWRITE);
/* Read result registers to the result struct
More information about the p4-projects
mailing list