Date: Tue, 19 Oct 2004 20:21:02 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 63380 for review Message-ID: <200410192021.i9JKL2I5092710@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/param.h> @@ -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 <sys/cdefs.h> -__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 <sys/param.h> @@ -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 <sys/cdefs.h> -__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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410192021.i9JKL2I5092710>