Date: Sun, 7 Aug 2011 17:19:59 +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-8@freebsd.org Subject: svn commit: r224695 - stable/8/sys/cam/ata Message-ID: <201108071719.p77HJxnp009290@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Aug 7 17:19:59 2011 New Revision: 224695 URL: http://svn.freebsd.org/changeset/base/224695 Log: MFC r224531: Higher-priority initialization request can eat request scheduling done from adaclose(). Add immediate_priority check into adaschedule() to restore it. Modified: stable/8/sys/cam/ata/ata_da.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sun Aug 7 17:18:22 2011 (r224694) +++ stable/8/sys/cam/ata/ata_da.c Sun Aug 7 17:19:59 2011 (r224695) @@ -444,12 +444,20 @@ static void adaschedule(struct cam_periph *periph) { struct ada_softc *softc = (struct ada_softc *)periph->softc; + uint32_t prio; + /* Check if cam_periph_getccb() was called. */ + prio = periph->immediate_priority; + + /* Check if we have more work to do. */ if (bioq_first(&softc->bio_queue) || (!softc->trim_running && bioq_first(&softc->trim_queue))) { - /* Have more work to do, so ensure we stay scheduled */ - xpt_schedule(periph, CAM_PRIORITY_NORMAL); + prio = CAM_PRIORITY_NORMAL; } + + /* Schedule CCB if any of above is true. */ + if (prio != CAM_PRIORITY_NONE) + xpt_schedule(periph, prio); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108071719.p77HJxnp009290>