Date: Tue, 27 Oct 2009 14:33:05 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 169855 for review Message-ID: <200910271433.n9REX5kN008342@repoman.freebsd.org>
index | next in thread | raw e-mail
http://p4web.freebsd.org/chv.cgi?CH=169855 Change 169855 by mav@mav_mavtest on 2009/10/27 14:32:41 Tune PMP reset/rescan timings. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#15 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#15 (text+ko) ==== @@ -93,6 +93,7 @@ int pm_step; int pm_try; int found; + int reset; int frozen; int restart; union ccb saved_ccb; @@ -482,6 +483,7 @@ ata_pm_read_cmd(ataio, 0, softc->pm_step); break; case PMP_STATE_CLEAR: + softc->reset = 0; cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -571,6 +573,7 @@ case PMP_STATE_CONFIG: softc->pm_step = 0; softc->state = PMP_STATE_RESET; + softc->reset |= ~softc->found; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; @@ -595,6 +598,12 @@ if (softc->pm_step >= softc->pm_ports) { softc->pm_step = 0; softc->pm_try = 0; + cam_freeze_devq(periph->path); + cam_release_devq(periph->path, + RELSIM_RELEASE_AFTER_TIMEOUT, + /*reduction*/0, + /*timeout*/10, + /*getcount_only*/0); printf("PM connect done\n"); softc->state = PMP_STATE_CHECK; } @@ -611,7 +620,7 @@ softc->found |= (1 << softc->pm_step); softc->pm_step++; } else { - if (softc->pm_try < 100) { + if (softc->pm_try < 10) { cam_freeze_devq(periph->path); cam_release_devq(periph->path, RELSIM_RELEASE_AFTER_TIMEOUT, @@ -632,6 +641,14 @@ } } if (softc->pm_step >= softc->pm_ports) { + if (softc->reset & softc->found) { + cam_freeze_devq(periph->path); + cam_release_devq(periph->path, + RELSIM_RELEASE_AFTER_TIMEOUT, + /*reduction*/0, + /*timeout*/1000, + /*getcount_only*/0); + } softc->state = PMP_STATE_CLEAR; softc->pm_step = 0; }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910271433.n9REX5kN008342>
