From owner-p4-projects@FreeBSD.ORG Tue Oct 19 20:21:03 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6BFF516A52D; Tue, 19 Oct 2004 20:21:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27CB716A4F2 for ; Tue, 19 Oct 2004 20:21:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11B9A43D49 for ; Tue, 19 Oct 2004 20:21:03 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9JKL2Lj092713 for ; Tue, 19 Oct 2004 20:21:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9JKL2I5092710 for perforce@freebsd.org; Tue, 19 Oct 2004 20:21:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 19 Oct 2004 20:21:02 GMT Message-Id: <200410192021.i9JKL2I5092710@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 63380 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2004 20:21:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=63380 Change 63380 by rwatson@rwatson_zoo on 2004/10/19 20:20:23 Integ changes from CVS HEAD to netperf_socket--ATA fixes, if_vr build fix. Affected files ... .. //depot/projects/netperf_socket/sys/dev/ata/ata-all.c#21 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-queue.c#16 integrate .. //depot/projects/netperf_socket/sys/pci/if_vr.c#15 integrate Differences ... ==== //depot/projects/netperf_socket/sys/dev/ata/ata-all.c#21 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.232 2004/10/13 15:16:35 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.233 2004/10/19 20:13:38 sos Exp $"); #include "opt_ata.h" #include @@ -306,6 +306,12 @@ } } + ch->flags &= ~ATA_IMMEDIATE_MODE; + mtx_lock(&ch->state_mtx); + ch->state = ATA_IDLE; + mtx_unlock(&ch->state_mtx); + ch->locking(ch, ATA_LF_UNLOCK); + /* attach new devices */ if ((newdev = ~devices & ch->devices)) { if ((newdev & (ATA_ATA_MASTER | ATA_ATAPI_MASTER)) && @@ -323,12 +329,6 @@ if (bootverbose) ata_printf(ch, -1, "device config done ..\n"); - ch->flags &= ~ATA_IMMEDIATE_MODE; - mtx_lock(&ch->state_mtx); - ch->state = ATA_IDLE; - mtx_unlock(&ch->state_mtx); - ch->locking(ch, ATA_LF_UNLOCK); - ata_start(ch); return 0; } @@ -337,19 +337,19 @@ ata_suspend(device_t dev) { struct ata_channel *ch; - int gotit = 0; if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - while (!gotit) { + while (1) { mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { ch->state = ATA_ACTIVE; - gotit = 1; + mtx_unlock(&ch->state_mtx); + break; } mtx_unlock(&ch->state_mtx); - tsleep(&gotit, PRIBIO, "atasusp", hz/10); + tsleep(ch, PRIBIO, "atasusp", hz/10); } ch->locking(ch, ATA_LF_UNLOCK); return 0; ==== //depot/projects/netperf_socket/sys/dev/ata/ata-queue.c#16 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.37 2004/10/13 15:16:35 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.38 2004/10/19 20:11:23 sos Exp $"); #include "opt_ata.h" #include @@ -182,15 +182,13 @@ /* check for the right state */ mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { + ATA_DEBUG_RQ(request, "starting"); TAILQ_REMOVE(&ch->ata_queue, request, chain); ch->running = request; - - ATA_DEBUG_RQ(request, "starting"); - + ch->state = ATA_ACTIVE; if (!dumping) callout_reset(&request->callout, request->timeout * hz, (timeout_t*)ata_timeout, request); - if (ch->hw.begin_transaction(request) == ATA_OP_FINISHED) { ch->running = NULL; ch->state = ATA_IDLE; @@ -200,8 +198,6 @@ ata_finish(request); return; } - else - ch->state = ATA_ACTIVE; } mtx_unlock(&ch->state_mtx); } ==== //depot/projects/netperf_socket/sys/pci/if_vr.c#15 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pci/if_vr.c,v 1.96 2004/10/19 16:47:53 bms Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_vr.c,v 1.97 2004/10/19 20:02:07 bms Exp $"); /* * VIA Rhine fast ethernet PCI NIC driver @@ -1690,7 +1690,6 @@ static void vr_shutdown(device_t dev) { - struct vr_softc *sc = device_get_softc(dev); vr_detach(dev); }