p4-projects@freebsd.org
[Top] [All Lists]

PERFORCE change 167779 for review

Subject: PERFORCE change 167779 for review
From: Alexander Motin
Date: Tue, 25 Aug 2009 10:00:21 GMT
http://perforce.freebsd.org/chv.cgi?CH=167779

Change 167779 by mav@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
_______________________________________________
p4-projects@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "p4-projects-unsubscribe@xxxxxxxxxxx"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 167779 for review, Alexander Motin <=