From owner-p4-projects@FreeBSD.ORG Fri Oct 9 10:21:10 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A03601065679; Fri, 9 Oct 2009 10:21:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 648D2106566B for ; Fri, 9 Oct 2009 10:21:10 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 540F18FC14 for ; Fri, 9 Oct 2009 10:21:10 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n99ALAJK026800 for ; Fri, 9 Oct 2009 10:21:10 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n99AL960026798 for perforce@freebsd.org; Fri, 9 Oct 2009 10:21:09 GMT (envelope-from mav@freebsd.org) Date: Fri, 9 Oct 2009 10:21:09 GMT Message-Id: <200910091021.n99AL960026798@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Cc: Subject: PERFORCE change 169341 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 10:21:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=169341 Change 169341 by mav@mav_mavtest on 2009/10/09 10:20:45 Fix two timeout-related bugs in ata(4) wrapper. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#29 edit .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#20 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#29 (text+ko) ==== @@ -1278,7 +1278,7 @@ request->transfersize = min(request->bytecount, 16*512); // request->callback = ad_done; request->retries = 0; - request->timeout = ccb->ccb_h.timeout / 1000; + request->timeout = (ccb->ccb_h.timeout + 999) / 1000; callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); request->ccb = ccb; ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#20 (text+ko) ==== @@ -514,6 +514,8 @@ if (ch->dma.unload) ch->dma.unload(request); #ifdef ATA_CAM + ch->running = NULL; + ch->state = ATA_IDLE; ata_cam_end_transaction(ch->dev, request); #endif mtx_unlock(&ch->state_mtx);