linux/drivers/watchdog/acquirewdt.c
<<
alue >/spa30. >/form0. >a alue href="../linux+v3alu9/drivers/watchdog/acquirewdt.c">alue >img src="../.static/gfx/right.png" alt=">>">al>/spa30.al>spa3 class="lxr_search">aluealue >input typopthidden" namoptnavtarget" /opt">alue >input typopttext" namoptsearch" idptsearch">alue >buttv3 typoptsubmit">Search/form0. >/spa30.al>spa3 class="lxr_prefs"0. >a href="+prefs?return=drivers/watchdog/acquirewdt.c"alue onclick="return ajax_prefs();">alue Prefs. >/a>al>/spa30.ue >/div0.ue >form ac.6.3="ajax+*" method="post" onsubmit="return false;">al>input typopthidden" namoptajax_lookup" idptajax_lookup" /opt">aue >/form0.aue >div class="headingbottvm">div idptsearch_results" class="search_results". 0.ue >/div0. >div idptcontent">. >div idptfile_contents"0
   1>/a>>spa3 class="comment">/*>/spa30.   2>/a>>spa3 class="comment"> *ue    Acquire Single Board Computer Watchdog Timer driver>/spa30.   3>/a>>spa3 class="comment"> *>/spa30.   4>/a>>spa3 class="comment"> *ue    Based on wdt.c. Original copyright messages:>/spa30.   5>/a>>spa3 class="comment"> *>/spa30.   6>/a>>spa3 class="comment"> *ue    (c) Copyright 1996 Ala3 Cox <ala3@lxorguk.ukuu.org.uk>,>/spa30.   7>/a>>spa3 class="comment"> *ue                                            All Rights Reserved.>/spa30.   8>/a>>spa3 class="comment"> *>/spa30.   9>/a>>spa3 class="comment"> *ue    This program is free software; you ca3 redistribute it and/or>/spa30.  ="v2a>>spa3 class="comment"> *ue    modify it under the terms of the GNU General Public License>/spa30.  11>/a>>spa3 class="comment"> *ue    as published by the Free Software Founda.6.3; either vers6.3>/spa30.  12>/a>>spa3 class="comment"> *ue    2 of the License, or (at your v2.6.3) any later vers6.3.>/spa30.  13>/a>>spa3 class="comment"> *>/spa30.  14>/a>>spa3 class="comment"> *ue    Neither Ala3 Cox nor CymruNet Ltd. admit liability nor provide>/spa30.  15>/a>>spa3 class="comment"> *ue    warranty for any of this software. This material is provided>/spa30.  16>/a>>spa3 class="comment"> *ue    "AS-IS" and at no charge.>/spa30.  17>/a>>spa3 class="comment"> *>/spa30.  18>/a>>spa3 class="comment"> *ue    (c) Copyright 1995    Ala3 Cox <ala3@lxorguk.ukuu.org.uk>>/spa30.  19>/a>>spa3 class="comment"> *>/spa30.  2"v2a>>spa3 class="comment"> *ue    14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>>/spa30.  21>/a>>spa3 class="comment"> *ue        Added nowayout module 
  vv3 to override CONFIG_WATCHDOG_NOWAYOUT>/spa30.  22>/a>>spa3 class="comment"> *ue        Can't add timeout - driver doesn't allow changing  
 /o>/spa30.  23>/a>>spa3 class="comment"> */>/spa30.  24>/a>.  25>/a>>spa3 class="comment">/*>/spa30.  26>/a>>spa3 class="comment"> *ue    Theory of Opera vv3:>/spa30.  27>/a>>spa3 class="comment"> *ue            The Watch-Dog Timer is provided to ensure that standalono>/spa30.  28>/a>>spa3 class="comment"> *ue            Systems ca3 always recover from catastrophic condi vv3s that>/spa30.  29>/a>>spa3 class="comment"> *ue            caused the CPU to crash. This condi vv3 may have 
ccurred by>/spa30.  3"v2a>>spa3 class="comment"> *ue            external EMI or a software bug. When the CPU stops working>/spa30.  31>/a>>spa3 class="comment"> *ue            correctly, hardware on the board will either perform a hardware>/spa30.  32>/a>>spa3 class="comment"> *ue            reset (cold boot) or a non-maskable interrupt (NMI) to bring the>/spa30.  33>/a>>spa3 class="comment"> *ue            system back to a known state.>/spa30.  34>/a>>spa3 class="comment"> *>/spa30.  35>/a>>spa3 class="comment"> *ue            The Watch-Dog Timer is controlled by two I/O Ports.>/spa30.  36>/a>>spa3 class="comment"> *ue              443 hex       - Read  - Enable or refresh the Watch-Dog Timer>/spa30.  37>/a>>spa3 class="comment"> *ue              043 hex       - Read  - Disable the Watch-Dog Timer>/spa30.  38>/a>>spa3 class="comment"> *>/spa30.  39>/a>>spa3 class="comment"> *ue            To enable the Watch-Dog Timer, a read from I/O port 443h must>/spa30.  4"v2a>>spa3 class="comment"> *ue            be performed. This will enable and activate the countdown timer>/spa30.  41>/a>>spa3 class="comment"> *ue            which will eventually time out and either reset the CPU or cause>/spa30.  42>/a>>spa3 class="comment"> *ue            a3 NMI depending on the 21rewdt.c#L31" idptL31" class="line" namoptL31">  3124.7n>n>n>n>n>n>n>n>lass=i21.a href idptL28" og/ae" namoptL42">  42>/a>>spa3 class="comment"> *ue         4  system back to a know4 stat4.>/spa30.  42>/a>>spa3 class="comment"> *ue  Based onn wdt.c. Original copyriquire4dmit liability nor provide>/spa30.<<<<<<<<  36>/a>>spa3 class="comment"> *ue4        4  The Watch-Dog Timer i4 cont4olled by two I/O Ports.>/spa30.  36>/a>>spa3 class="comment"> *ue4        4    443 hex       - Rea4  - E4able or refresh the Watch-Doge" namoptL36">  36>/a>>spa3 class="comment"> *ue4        4    043 hex       - Rea4  - D4ded to ensure that standalono>/spa30.  36>/a>>spa3 class="comment"> *ue4pa30.  36>/a>>spa3 class="comment"> *ue4        4  To enable the Watch-D4g Tim4r, a read from I/O port 443h ne" namoptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/5        5  which will eventually5time 5dt.c#L2" idptL2" class="line" namoptL2">   2>/a>>spa3 class="comment"> *ue   5        5  a3 NMI depending on t5e 21r5wdt.c#L31" idptL31" class="line" naIncludes,4.7fpens,4variL38"s,4ers/watparg oc#Ls,4..ne" namoptL36">  36>/a>>spa3 class="comment"> *ue5        5  system back to a know5 stat5wdt.c#L24" idptL24" class="line" namoptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/530.pr_fmtlled(turn ajax_code=fmttfile_cont aj">fmtlled)eturn ajax_code=KBUILD_MODNAMEtfile_cont aj">KBUILD_MODNAMElled #L24" idptL24dptLng">L17" i:cquirewe" namoeturn ajax_code=fmttfile_cont aj">fmtlledptL25">  25>/a>>spa3 class="comment">/*>/5        5    443 hex       - Rea5  - E56lledptL25">  25>/a>>spa3 class="comment">/*>/5        5    043 hex       - Rea5  - D5ded to ensure that standalo/*aIncludesline" namoptL24">  24>/a>.  2include/gfx/r/ers/wa.hef="drivef aj">gfx/r/ers/wa.hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/ers/waparg .hef="drivef aj">gfx/r/ers/waparg .hom c"linhat>/spa30o ensure that standalo/*aFassnew ers/waparg .c#L2drine" namoptL24">  24>/a>.  2include/gfx/r/m0.as.hef="drivef aj">gfx/r/m0.as.hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/errno.hef="drivef aj">gfx/r/errno.hom c"linhat>/spa30.n>n-ENODEV/..ns="lindrine" namoptL24">  24>/a>.  2include/gfx/r/kernel.hef="drivef aj">gfx/r/kernel.hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/eiscdevica.hef="drivef aj">gfx/r/eiscdevica.hom c"linhat>/spa30.o ensure that standalo/*aFassMODULE_ALIAS_MISCDEVe" namoptL24">  24>/a>.  24>/a>.  2include/gfx/r/ href="d.hef="drivef aj">gfx/r/ href="d.hom c"linhat>/spa30.n>n href="dtspecific if="drine" namoptL24">  24>/a>.  2include/gfx/r/fs.hef="drivef aj">gfx/r/fs.hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/io40" .hef="drivef aj">gfx/r/io40" .hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/platf="d_devica.hef="drivef aj">gfx/r/platf="d_devica.hom c"linhat>/so ensure that standalo/*aFassplatf="d_d/acquifrg oss="rine" namoptL24">  24>/a>.  2include/gfx/r/ini .hef="drivef aj">gfx/r/ini .hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/uaccesd.hef="drivef aj">gfx/r/uaccesd.hom c"linhat>/spa30.  24>/a>.  2include/gfx/r/io.hef="drivef aj">gfx/r/io.hom c"linhat>/spa30.  24>/a>.  25>/a>>spa3 class="comment">/*>/7        7  system back to a know7 stat7wdt.c#L24" idptL24" class="/*aMrs/watinf="ds="lisine" namoptL24">  24>/a>.DRV_NAMElled #L24" idptL24dptLng">L17" iivers/watcquirewe" namoptL24">  24>/a>.ptL22" claAMElled #L24" idptL24dptLng">L17" ivers/watWDTquirewe" namoptL24">  24>/a>.  24>/a>.ptL22" clHEARTBEATlled 0ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/7        7  To enable the Watch-D7g Tim7r, a read from I/O port 443/*at.c#LrivevariL38"sdine" namoptL24">  24>/a>.  24>/a>.platf="d_devicalled *turn ajax_code=ive_platf="d_devicatfile_cont aj">ive_platf="d_devicalled;ptL24">  24>/a>.ive_is_olanlled;ptL24">  24>/a>.expect_closalled;ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/830.  24>/a>.n>watidhdonsanen hydptLprobeiverstLewdcquirnsine" namoptL24">  24>/a>.atc_1" clled = 0x43;ptL24">  24>/a>.ers/wa_parg lled(turn ajax_code=atc_1" ctfile_cont aj">atc_1" clled,st.c, 0);ptL24">  24>/a>.MODULE_PARM_DESClled(turn ajax_code=atc_1" ctfile_cont aj">atc_1" clled,s#L24" idptL24dptLng">L17" ivers/watWDT .c#L2d" c.c#L2sioL40" c(.7fault 0x43)quirewe" namo);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/9        9  which will eventually9time 9dt.c#L2" idptL2" class="line"aYou="lin. idptLewd-a>n>watidhdonsanen hydptLprobeiverstLewdcquirnsine" namoptL24">  24>/a>.atc_1"artlled = 0x443;ptL24">  24>/a>.ers/wa_parg lled(turn ajax_code=atc_1"arttfile_cont aj">atc_1"artlled,st.c, 0);ptL24">  24>/a>.MODULE_PARM_DESClled(turn ajax_code=atc_1"arttfile_cont aj">atc_1"artlled,s#L24" idptL24dptLng">L17" ivers/watWDT .c#L2d"art.c#L2sioL40" c(.7fault 0x443)quirewe" namo);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/9 (c) Cop9yright 1996 Ala3 Cox &l9  - E96om cearch"sturn ajax_code=booltfile_cont aj">boollled #urn ajax_code=ref="dritfile_cont aj">ref="drilled = turn ajax_code=ptL22" class="lintfile_cont aj">ptL22" class="line"ed;ptL24">  24>/a>.ers/wa_parg lled(turn ajax_code=ref="dritfile_cont aj">ref="drilled,sturn ajax_code=booltfile_cont aj">boollled, 0);ptL24">  24>/a>.MODULE_PARM_DESClled(turn ajax_code=ref="dritfile_cont aj">ref="drilled,ptL24">  24>/a>.L17" i idptL3" candot"beid" cpdog/aceid"artdog(.7fault=quirewe" namoptL24">  24>/a>.__MODULE_STRINGlled(turn ajax_code=ptL22" class="lintfile_cont aj">ptL22" class="line"ed) o ensure thatdptLng">L17" i)quirewe" namo);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/10   2 of t0he License, or (at your 02 enthwdt.c#L31" idptL31" class="e" namoptL2">   2>/a>>spa3 class="comment"> *ue   10pa30.  42>/a>>spa3 class="comment"> *ue10   Neithe0r Ala3 Cox nor CymruNet 04 enthdmit liability nor provide>/sne" namoptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/10   "0AS-IS" and at no ch06 enth6om cearch"svoidcturn ajax_code=ive_keepal/a>tfile_cont aj">ive_keepal/a>lled(void)ptL25">  25>/a>>spa3 class="comment">/*>/10pa30.  25>/a>>spa3 class="comment">/*>/10   (c) Co0pyright 1995    Ala3 Cox08 enth8om c  24>/a>.inb_clled(turn ajax_code=atc_1"arttfile_cont aj">atc_1"artlled);ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/1    2 of tthe License, or (at your  v2.6112om cearch"svoidcturn ajax_code=ive_1" ctfile_cont aj">ive_1" clled(void)ptL25">  25>/a>>spa3 class="comment">/*>/1spa30.  25>/a>>spa3 class="comment">/*>/1    Neitheer Ala3 Cox nor CymruNet  Ltd.1admit   24>/a>.inb_clled(turn ajax_code=atc_1" ctfile_cont aj">atc_1" clled);ptL24">  24>/a>.  24>/a>.  24>/a>.   2>/a>>spa3 class="comment"> *ue   1spa30.  31>/a>>spa3 class="comment"> *ue1    14-De1c-2001 Matt Domsch <M1att_D1msch@dell.com>>/spa30.  24>/a>.  25>/a>>spa3 class="comment">/*>/12   2 of thhe License, or (at your vv2.6122om cearch"sturn ajax_code=ssize_ttfile_cont aj">ssize_tlled #urn ajax_code=ive_writetfile_cont aj">ive_writelled(clruefcturn ajax_code=a1c9tfile_cont aj">f1c9lled *turn ajax_code=a1c9tfile_cont aj">f1c9lled,pwdtstsss="cturn ajax_code=__usertfile_cont aj">__userlled *turn ajax_code=buftfile_cont aj">buflled,ptL24">  24>/a>./spa30.size_tlled #urn ajax_code=L41" tfile_cont aj">L41" lled,sturn ajax_code=loff_ttfile_cont aj">loff_tlled *turn ajax_code=ppostfile_cont aj">pposlled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/1spa30.  24>/a>.L41" lled) {ptL25">  25>/a>>spa3 class="comment">/*>/1spa30.ref="drilled) {ptL25">  25>/a>>spa3 class="comment">/*>/1s   (c) Co   Systems ca3 always re1cover128dt.chat>/spa30.size_tlled #urn ajax_code=itfile_cont aj">ie"ed;ptL24">  24>/a>.  13>/a>>spa3 class="comment"> *>/sp   14-De1   external EMI or a sof1tware1bug. When the CPU stops workiiiiiiiiiiiiiiiiiiiiiiiiiiif/a> months ago..nsine" namoptL24">  24>/a>.expect_closalled = 0;ptL24">  24>/a>.n 2e.c#L4assno" we go" ogee" namoptL24">  24>/a>./spa30.  24>/a>./spa30.ie"ed = 0; #urn ajax_code=itfile_cont aj">ie"ed != turn ajax_code=L41" tfile_cont aj">L41" lled; #urn ajax_code=itfile_cont aj">ie"ed++) {ptL25">  25>/a>>spa3 class="comment">/*>/1         1   The Watch-Dog Timer i1s con135dt.chat>/spa30.Le"ed;ptL24">  24>/a>.get_userlled(turn ajax_code=ctfile_cont aj">Le"ed,sturn ajax_code=buftfile_cont aj">buflled + #urn ajax_code=itfile_cont aj">ie"ed))ptL24">  24>/a>.EFAULne"ed;ptL24">  24>/a>./spa30.Le"ed == o ensure thatdptLng">Lc#L2V.c#L2e" namo)ptL24">  24>/a>.expect_closalled = 42;ptL24">  24>/a>.  24>/a>.  24>/a>.  16>/a>>spa3 class="comment"> *ue          14  system back to a know14 sta14.>/spa30.  24>/a>.ive_keepal/a>lled();ptL24">  24>/a>.  24>/a>.L41" lled;ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/14        14  To enable the Watch-D14g Ti14r, a earch"slongcturn ajax_code=ive_ioctltfile_cont aj">ive_ioctllled(clruefcturn ajax_code=a1c9tfile_cont aj">f1c9lled *turn ajax_code=a1c9tfile_cont aj">f1c9lled,punsigned t.ccturn ajax_code=cmdtfile_cont aj">Lmdlled,punsigned longcturn ajax_code=irgtfile_cont aj">irglled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/15        15  which will eventually15time15oard hat>/spat.ccturn ajax_code=chdog/stfile_cont aj">chdog/se"ed,sturn ajax_code=p" valtfile_cont aj">p" vallled = -#urn ajax_code=EINVALtfile_cont aj">EINVALlled;ptL24">  24>/a>.__userlled *turn ajax_code=irgctfile_cont aj">irgclled = (voidcturn ajax_code=__usertfile_cont aj">__userlled *)turn ajax_code=irgtfile_cont aj">irglled;ptL24">  24>/a>.__userlled *turn ajax_code=ctfile_cont aj">clled = turn ajax_code=irgctfile_cont aj">irgclled;ptL24">  24>/a>.ahref="d_inf=lled #urn ajax_code=ide" tfile_cont aj">ide" lled = {ptL25">  25>/a>>spa3 class="comment">/*>/15        1eef="drivers/watchdog/ac1q con155dt.chat>/spa30.chdog/se"ed = turn ajax_code=pDIOF_KEEPALIVEPINGtfile_cont aj">pDIOF_KEEPALIVEPINGe"ed | turn ajax_code=pDIOF_MAGICCLOSEtfile_cont aj">pDIOF_MAGICCLOSElled,ptL24">  24>/a>..f1rm"lin_a>.  24>/a>.ide" itylled = turn ajax_code=ptL22" claAMEtfile_cont aj">ptL22" claAMElled,ptL24">  24>/a>./spa};ptL24">  24>/a>.  24>/a>.Lmdlled) {ptL25">  25>/a>>spa3 class="comment">/*>/16        16  which will eventually16time16oard hat>/sparashdturn ajax_code=pDIOC_GETSUPPORntfile_cont aj">pDIOC_GETSUPPORnard :ptL25">  25>/a>>spa3 class="comment">/*>/16        16  a3 NMI depending on t16e 2116askabhat>/spa30.L4tL_to_userlled(turn ajax_code=irgctfile_cont aj">irgclled, &#urn ajax_code=ide" tfile_cont aj">ide" lled,tsizeof(turn ajax_code=ide" tfile_cont aj">ide" lled)) ?/-#urn ajax_code=EFAULntfile_cont aj">EFAULne"ed : 0;ptL24">  24>/a>.  24>/a>.pDIOC_GETSTATUSard :ptL25">  25>/a>>spa3 class="comment">/*>/16        16ef="drivers/watchdog/ac16 con165ard hat>/sparashdturn ajax_code=pDIOC_GETBOOTSTATUStfile_cont aj">pDIOC_GETBOOTSTATUSard :ptL25">  25>/a>>spa3 class="comment">/*>/16   "AAS-IS" and at no cha  - 166dt.chat>/spa30.cut_userlled(0,sturn ajax_code=ctfile_cont aj">clled);ptL24">  24>/a>.  24>/a>./sparashdturn ajax_code=pDIOC_SETOPTIONStfile_cont aj">pDIOC_SETOPTIONSard :ptL25">  25>/a>>spa3 class="comment">/*>/16        16  To enable the Watch-D16g Ti169dt.chat>/spa{ptL25">  25>/a>>spa3 class="comment">/*>/17        17  be performed. This wi17l en170dt.chat>/spa30.get_userlled(turn ajax_code=chdog/stfile_cont aj">chdog/se"ed,sturn ajax_code=ctfile_cont aj">clled))ptL24">  24>/a>.EFAULne"ed;ptL24">  24>/a>.chdog/se"ed &dturn ajax_code=pDIOS_DISABLECARDtfile_cont aj">pDIOS_DISABLECARDlled) {ptL25">  25>/a>>spa3 class="comment">/*>/17        17  system back to a know17 sta17wdt.chat>/spa30.ive_1" clled();ptL24">  24>/a>.p" vallled = 0;ptL24">  24>/a>./spa30.  24>/a>.chdog/se"ed &dturn ajax_code=pDIOS_ENABLECARDtfile_cont aj">pDIOS_ENABLECARDlled) {ptL25">  25>/a>>spa3 class="comment">/*>/17pa30.ive_keepal/a>lled();ptL24">  24>/a>./spa30.p" vallled = 0;ptL24">  24>/a>.  24>/a>.p" vallled;ptL24">  24>/a>.  24>/a>.pDIOC_KEEPALIVEard :ptL25">  25>/a>>spa3 class="comment">/*>/18        18  system back to a know18 sta18wdt.chat>/spa30.tfile_cont aj">ive_keepal/a>lled();ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/18 (c) Cop18yright 1996 Ala3 Cox &l18  - 186ard hat>/sparashdturn ajax_code=pDIOC_GETTIMElintfile_cont aj">pDIOC_GETTIMElinard :ptL25">  25>/a>>spa3 class="comment">/*>/18pa30.cut_userlled(turn ajax_code=ptL22" clHEARTBEATtfile_cont aj">ptL22" clHEARTBEATlled,sturn ajax_code=ctfile_cont aj">clled);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/18        18  To enable the Watch-D18g Ti189dt.chat>/spa.7fault:ptL25">  25>/a>>spa3 class="comment">/*>/19        19  be performed. This wi19l en190dt.chat>/spa30.ENOTTYlled;ptL24">  24>/a>.  24>/a>.  24>/a>.  24>/a>.ive_olanlled(clruefcturn ajax_code=inodetfile_cont aj">inodelled *turn ajax_code=inodetfile_cont aj">inodelled,sclruefcturn ajax_code=a1c9tfile_cont aj">f1c9lled *turn ajax_code=a1c9tfile_cont aj">f1c9lled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/19 (c) Cop19yright 1996 Ala3 Cox &l19  - 19"drivtest_and_set_bi lled(0,s&#urn ajax_code=ave_is_olantfile_cont aj">ive_is_olanlled))ptL24">  24>/a>.EBUSYlled;ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/19 This pr1oogram is free software;1 g Ti199om cref="drilled)ptL25">  25>/a>>spa3 class="comment">/*>/20   modif2  it under the terms of 2hl en200dt.chat>/spa30.__ers/wa_geilled(turn ajax_code=THIS_MODULEtfile_cont aj">THIS_MODULElled);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/20   2 of 20he License, or (at your202 en202ard hat>/spao ensure thatlass="line"aA.c#L41" ine" namoptL24">  24>/a>./spaturn ajax_code=ive_keepal/a>tfile_cont aj">ive_keepal/a>lled();ptL24">  24>/a>.nonseeuirew_olanlled(turn ajax_code=inodetfile_cont aj">inodelled,sturn ajax_code=a1c9tfile_cont aj">f1c9lled);ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/20pa30.ive_closalled(clruefcturn ajax_code=inodetfile_cont aj">inodelled *turn ajax_code=inodetfile_cont aj">inodelled,sclruefcturn ajax_code=a1c9tfile_cont aj">f1c9lled *turn ajax_code=a1c9tfile_cont aj">f1c9lled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/20pa30.expect_closalled == 42) {ptL25">  25>/a>>spa3 class="comment">/*>/2    modif2y it under the terms of 2the G210dt.chat>/spa30.ive_1" clled();ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/2    2 of 2the License, or (at your2 v2.621askabhat>/spa30.cr_cri lled(t ensure thatdptLng">L17" iUnexpected closa,sno" d" cpearna3 class!\nquirewe" namo);ptL24">  24>/a>./spa30.tfile_cont aj">ive_keepal/a>lled();ptL24">  24>/a>.  24>/a>.clear_bi lled(0,s&#urn ajax_code=ave_is_olantfile_cont aj">ive_is_olanlled);ptL24">  24>/a>.expect_closalled = 0;ptL24">  24>/a>./spap"  
 /0;ptL24">  24>/a>.  24>/a>.  24>/a>.   2>/a>>spa3 class="comment"> *ue   2        A2dded nowayout module 
  2vv3 t22ut and either reset the CPU or causKernel I.c#Lfaceae" namoptL42">  42>/a>>spa3 class="comment"> *ue22   2 of 2hhe License, or (at your2vv2.622wdt.c#L31" idptL31" class="line" namoptL24">  24>/a>.  24>/a>.f1c9_olass="lidskabh#urn ajax_code=ave_fopdtfile_cont aj">ave_fopdlled = {ptL25">  25>/a>>spa3 class="comment">/*>/2spa30.cwnerdt.chat>/spa30= turn ajax_code=THIS_MODULEtfile_cont aj">THIS_MODULElled,ptL24">  24>/a>.llseeudt.chat>/spa3= turn ajax_code=no_llseeutfile_cont aj">no_llseeulled,ptL24">  24>/a>.writelledhat>/spa30= turn ajax_code=ave_writetfile_cont aj">ive_writelled,ptL24">  24>/a>.unlocked_ioctllled = #urn ajax_code=ave_ioctltfile_cont aj">ive_ioctllled,ptL24">  24>/a>.olanlled hat>/spa30= turn ajax_code=ave_olantfile_cont aj">ive_olanlled,ptL24">  24>/a>.releasadt.chat>/spa= turn ajax_code=ave_closatfile_cont aj">ive_closalled,ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/2 pa30.eiscdevicaskabh#urn ajax_code=ave_eiscdevtfile_cont aj">ive_eiscdevlled = {ptL25">  25>/a>>spa3 class="comment">/*>/2    Neith2href="drivers/watchdog/a2cquir234skabhat>/spa.turn ajax_code=minortfile_cont aj">minorskabha= turn ajax_code=ptL22" clMINORtfile_cont aj">ptL22" clMINORlled,ptL24">  24>/a>.nimemit Luirew href="dquirewe" namo,ptL24">  24>/a>.fopdlled a = &#urn ajax_code=ave_fopdtfile_cont aj">ave_fopdlled,ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/2         2   To enable the Watch-D2og Ti23r, a read from I/O port 443/*e" namoptL24">  24>/a>.  42>/a>>spa3 class="comment"> *ue2         2   which will eventually2 time24ut and either reset the CPU one" namoptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/2         24  system back to a know24 sta243om cearch"st.ccturn ajax_code=__devini tfile_cont aj">__devini skabh#urn ajax_code=ave_probetfile_cont aj">ave_probelled(clruefcturn ajax_code=platf="d_devicatfile_cont aj">platf="d_devicalled *turn ajax_code=devtfile_cont aj">devlled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/24        24  The Watch-Dog Timer i24 con245dt.chat>/spat.ccturn ajax_code=reitfile_cont aj">re lled;ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/2         24    043 hex       - Rea24  - 24ded t        if (turn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled != turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled) {ptL25">  25>/a>>spa3 class="comment">/*>/2    (c) C24ref="drivers/watchdog/a24quir248dt.chat>/spa30.request_regog/lled(turn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled, 1,sturn ajax_code=ptL22" claAMEtfile_cont aj">ptL22" claAMElled)) {ptL25">  25>/a>>spa3 class="comment">/*>/2         24  To enable the Watch-D24g Ti249dt.chat>/spa30.cr_errlled(t ensure thatdptLng">L17" iI/O addresdr0x%04x already.isuuse\nquirewe" namo,sturn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled);ptL24">  24>/a>.re lled = -#urn ajax_code=EIOtfile_cont aj">EIOlled;ptL24">  24>/a>.drilled;ptL24">  24>/a>.  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/25        2eef="drivers/watchdog/ac2q con255dt.chat>/spaif (!turn ajax_code=request_regog/tfile_cont aj">request_regog/lled(turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled,s1,sturn ajax_code=ptL22" claAMEtfile_cont aj">ptL22" claAMElled)) {ptL25">  25>/a>>spa3 class="comment">/*>/25        25    443 hex       - Rea25  - 256dt.chat>/spa30.cr_errlled(t ensure thatdptLng">L17" iI/O addresdr0x%04x already.isuuse\nquirewe" namo,sturn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled);ptL24">  24>/a>.re lled = -#urn ajax_code=EIOtfile_cont aj">EIOlled;ptL24">  24>/a>./spa30.unreg_1" clled;ptL24">  24>/a>.  24>/a>.re lled = turn ajax_code=eisc_regostertfile_cont aj">eisc_regosterlled(&#urn ajax_code=ave_eiscdevtfile_cont aj">ive_eiscdevlled);ptL24">  24>/a>.re lled != 0) {ptL25">  25>/a>>spa3 class="comment">/*>/26        26  a3 NMI depending on t26e 2126askabhat>/spa30.cr_errlled(t ensure thatdptLng">L17" icandot"regoster eiscdev on minor=%d (err=%d)\nquirewe" namo,ptL25">  25>/a>>spa3 class="comment">/*>/26        26  system back to a know26 sta26wdt.chat>/spa30.ptL22" clMINORlled,aturn ajax_code=reitfile_cont aj">re lled);ptL24">  24>/a>.unreg_regog/dlled;ptL24">  24>/a>./spa}ptL24">  24>/a>.cr_inf=lled(t ensure thatdptLng">L17" iini ialized. (ref="dri=%d)\nquirewe" namo, #urn ajax_code=ref="dritfile_cont aj">ref="drilled);ptL24">  24>/a>.  24>/a>./spap"  
 /0;ptL24">  24>/a>.unreg_regog/dlled:ptL25">  25>/a>>spa3 class="comment">/*>/27        27  be performed. This wi27l en270dt.chat>/spaturn ajax_code=releasa_regog/tfile_cont aj">releasa_regog/lled(turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled,s1);ptL24">  24>/a>.unreg_1" clled:ptL25">  25>/a>>spa3 class="comment">/*>/27        27  a3 NMI depending on t27e 2127askabhat>/spaif (turn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled != turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled)ptL25">  25>/a>>spa3 class="comment">/*>/27        27  system back to a know27 sta27wdt.chat>/spa30.releasa_regog/lled(turn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled, 1);ptL24">  24>/a>.drilled:ptL25">  25>/a>>spa3 class="comment">/*>/27        27ef="drivers/watchdog/ac27 con275dt.chat>/spap"  
 /turn ajax_code=p" tfile_cont aj">re lled;ptL24">  24>/a>.  24>/a>.  24>/a>.__devexi skabh#urn ajax_code=ave_remoa>tfile_cont aj">ive_remoa>lled(clruefcturn ajax_code=platf="d_devicatfile_cont aj">platf="d_devicalled *turn ajax_code=devtfile_cont aj">devlled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/28        28  be performed. This wi28l en280dt.chat>/spaturn ajax_code=eisc_deregostertfile_cont aj">eisc_deregosterlled(&#urn ajax_code=ave_eiscdevtfile_cont aj">ive_eiscdevlled);ptL24">  24>/a>.releasa_regog/lled(turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled,s1);ptL24">  24>/a>.atc_1" clled != turn ajax_code=wtc_1"arttfile_cont aj">atc_1"artlled)ptL25">  25>/a>>spa3 class="comment">/*>/28        28  system back to a know28 sta28wdt.chat>/spa30.releasa_regog/lled(turn ajax_code=wtc_1" ctfile_cont aj">atc_1" clled, 1);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/2830.  24>/a>.  24>/a>.  24>/a>.ive_1hutdownlled(clruefcturn ajax_code=platf="d_devicatfile_cont aj">platf="d_devicalled *turn ajax_code=devtfile_cont aj">devlled)ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/29        29  be performed. This wi29l en290dt.chat>/spao ensure thatlass="line"aT 
 /oge.WDT off/if we have ansoft 1hutdown one" namoptL24">  24>/a>.ive_1" clled();ptL24">  24>/a>.  24>/a>.  24>/a>./a>.tfile_cont aj">platf="d_d>/a>.skabh#urn ajax_code=avers/watc_d>/a>.tfile_cont aj">avers/watc_d>/a>.lled = {ptL25">  25>/a>>spa3 class="comment">/*>/2930.probelledpa30.ave_probelled,ptL25">  25>/a>>spa3 class="comment">/*>/29 (c) Cop29yright 1996 Ala3 Cox &l29  - 29"drivtfile_cont aj">remoa>lleda30.__devexi _clled(turn ajax_code=ave_remoa>tfile_cont aj">ive_remoa>lled),ptL25">  25>/a>>spa3 class="comment">/*>/29pa30.1hutdownlled0.ive_1hutdownlled,ptL25">  25>/a>>spa3 class="comment">/*>/2930.d>/a>.lled 30.  25>/a>>spa3 class="comment">/*>/29        2oogram is free software;2 g Ti299dt.chat>/spa30.cwnerdt.cha= turn ajax_code=THIS_MODULEtfile_cont aj">THIS_MODULElled,ptL24">  24>/a>.nimemit DRVlaAMElled,ptL24">  24>/a>.  24>/a>.  24>/a>.  24>/a>.__ini skabh#urn ajax_code=ave_ini tfile_cont aj">ave_ini lled(void)ptL25">  25>/a>>spa3 class="comment">/*>/305  Neith30ef="drivers/watchdog/ac305 en305namo{ptL25">  25>/a>>spa3 class="comment">/*>/30   "30AS-IS" and at no c306 en30"driverrlled;ptL24">  24>/a>.  24>/a>.cr_inf=lled(t ensure thatdptLng">L17" iWDT 4>/a>. versAvers/w sLngle bo=rdrlasputer ini ialisLng\nquirewe" namo);ptL24">  24>/a>.  24>/a>.errlled = ourn ajax_code=platf="d_d>/a>._regostertfile_cont aj">platf="d_d>/a>._regosterlled(&#urn ajax_code=avers/watc_d>/a>.tfile_cont aj">avers/watc_d>/a>.lled);ptL24">  24>/a>.errlled)ptL25">  25>/a>>spa3 class="comment">/*>/3    2 of 3the License, or (at your3 v2.631askabhat>/spa30.errlled;ptL24">  24>/a>.  24>/a>.ave_platf="d_devicalled = ourn ajax_code=platf="d_devica_regoster_simpc9tfile_cont aj">platf="d_devica_regoster_simpc9lled(turn ajax_code=DRVlaAMEtfile_cont aj">DRVlaAMElled,ptL24">  24>/a>.NULLlled, 0);ptL24">  24>/a>.IS_ERRlled(turn ajax_code=ave_platf="d_devicatfile_cont aj">ave_platf="d_devicalled)) {ptL25">  25>/a>>spa3 class="comment">/*>/3 pa30.errlled = ourn ajax_code=PTR_ERRtfile_cont aj">PTR_ERRlled(turn ajax_code=ave_platf="d_devicatfile_cont aj">ave_platf="d_devicalled);ptL24">  24>/a>./a>.tfile_cont aj">unreg_platf="d_d>/a>.lled;ptL24">  24>/a>./spa}ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/32   2 of 3hhe License, or (at your3vv2.632wdt.c#urn ajax_code=unreg_platf="d_d>/a>.tfile_cont aj">unreg_platf="d_d>/a>.lled:ptL25">  25>/a>>spa3 class="comment">/*>/3/spa30./a>._unregostertfile_cont aj">platf="d_d>/a>._unregosterlled(&#urn ajax_code=avers/watc_d>/a>.tfile_cont aj">avers/watc_d>/a>.lled);ptL24">  24>/a>.errlled;ptL24">  24>/a>.  24>/a>.  25>/a>>spa3 class="comment">/*>/3 pa30.__exi skabh#urn ajax_code=ave_exi tfile_cont aj">ave_exi lled(void)ptL25">  25>/a>>spa3 class="comment">/*>/3    (c) C3   Systems ca3 always re3cover328om c{ptL25">  25>/a>>spa3 class="comment">/*>/3 pa30./spaourn ajax_code=platf="d_devica_unregostertfile_cont aj">platf="d_devica_unregosterlled(turn ajax_code=ave_platf="d_devicatfile_cont aj">ave_platf="d_devicalled);ptL24">  24>/a>./a>._unregostertfile_cont aj">platf="d_d>/a>._unregosterlled(&#urn ajax_code=avers/watc_d>/a>.tfile_cont aj">avers/watc_d>/a>.lled);ptL24">  24>/a>.cr_inf=lled(t ensure thatdptLng">L17" iWhref="d Mrs/wa Unloaded\nquirewe" namo);ptL24">  24>/a>.  24>/a>.  24>/a>.ers/wa_ini lled(turn ajax_code=ave_ini tfile_cont aj">ave_ini lled);ptL24">  24>/a>.ers/wa_exi lled(turn ajax_code=ave_exi tfile_cont aj">ave_exi lled);ptL24">  24>/a>.  25>/a>>spa3 class="comment">/*>/3ppa30.MODULE_AUTHORlled(t ensure thatdptLng">L17" iDavidcWoodhousequirewe" namo);ptL24">  24>/a>.MODULE_DESCRIPTIONlled(t ensure thatdptLng">L17" iAvers/w Inc. SLngle Bo=rdrCasputer Whref="d Timer 4>/a>.quirewe" namo);ptL24">  24>/a>.MODULE_LICENSElled(t ensure thatdptLng">L17" iGPLquirewe" namo);ptL24">  24>/a>.MODULE_ALIAS_MISCDEVlled(turn ajax_code=ptL22" clMINORtfile_cont aj">ptL22" clMINORlled);ptL24">  24>/a>.  2http://sourcef="ge.net/projects/lxrt>LXRnlassunitylled,/ogis experis="lal a>.  2mailto:lxr@ll ux.no">lxr@ll ux.nolled.
d/div>

lxr.ll ux.no kindly hosted by/tL24">  2http://www.redpill-ll pro.no">Redpill Ll pro ASlled,/provider of Ll uxssdtsultearnand olass="lid servicas sLncei1995.
d/div>