Date: Tue, 3 Mar 2009 08:14:43 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r189299 - in stable/7/sys: . contrib/pf dev/ata dev/ath/ath_hal dev/cxgb Message-ID: <200903030814.n238Ehxk002622@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Mar 3 08:14:43 2009 New Revision: 189299 URL: http://svn.freebsd.org/changeset/base/189299 Log: MFC rev. 188700, 188731, 188733. Make core dumping to ad not to freeze even if interrupts, not disabled for some reason (noticed on SMP), stealing our events. ata_interrupt() does not need to return anything. It is not it's business to report request completion, expecially when it is not reliable. PR: kern/114370, kern/115801 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ata/ata-all.c stable/7/sys/dev/ata/ata-all.h stable/7/sys/dev/ata/ata-queue.c stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/dev/ata/ata-all.c ============================================================================== --- stable/7/sys/dev/ata/ata-all.c Tue Mar 3 07:58:01 2009 (r189298) +++ stable/7/sys/dev/ata/ata-all.c Tue Mar 3 08:14:43 2009 (r189299) @@ -140,7 +140,7 @@ ata_attach(device_t dev) return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, - (driver_intr_t *)ata_interrupt, ch, &ch->ih))) { + ata_interrupt, ch, &ch->ih))) { device_printf(dev, "unable to setup interrupt\n"); return error; } @@ -312,7 +312,7 @@ ata_resume(device_t dev) return error; } -int +void ata_interrupt(void *data) { struct ata_channel *ch = (struct ata_channel *)data; @@ -347,11 +347,10 @@ ata_interrupt(void *data) mtx_unlock(&ch->state_mtx); ATA_LOCKING(ch->dev, ATA_LF_UNLOCK); ata_finish(request); - return 1; + return; } } while (0); mtx_unlock(&ch->state_mtx); - return 0; } /* Modified: stable/7/sys/dev/ata/ata-all.h ============================================================================== --- stable/7/sys/dev/ata/ata-all.h Tue Mar 3 07:58:01 2009 (r189298) +++ stable/7/sys/dev/ata/ata-all.h Tue Mar 3 08:14:43 2009 (r189299) @@ -534,7 +534,7 @@ int ata_detach(device_t dev); int ata_reinit(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); -int ata_interrupt(void *data); +void ata_interrupt(void *data); int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_identify(device_t dev); void ata_default_registers(device_t dev); Modified: stable/7/sys/dev/ata/ata-queue.c ============================================================================== --- stable/7/sys/dev/ata/ata-queue.c Tue Mar 3 07:58:01 2009 (r189298) +++ stable/7/sys/dev/ata/ata-queue.c Tue Mar 3 08:14:43 2009 (r189299) @@ -214,8 +214,10 @@ ata_start(device_t dev) if (dumping) { mtx_unlock(&ch->state_mtx); mtx_unlock(&ch->queue_mtx); - while (!ata_interrupt(ch)) + while (ch->running) { + ata_interrupt(ch); DELAY(10); + } return; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903030814.n238Ehxk002622>