Date: Tue, 25 Aug 2009 10:00:21 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 167779 for review Message-ID: <200908251000.n7PA0LQK030500@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908251000.n7PA0LQK030500>