From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] devi82365.c fix MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-galykppwdbheiewixreqvkexnb" Date: Tue, 28 May 2002 16:55:14 -0400 Topicbox-Message-UUID: 9ecac72e-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-galykppwdbheiewixreqvkexnb Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I've installed nemo's changes on sources. Nemo, make sure I got the diffs merged right and try it out on your card. --upas-galykppwdbheiewixreqvkexnb Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Tue May 28 13:06:26 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Tue May 28 13:06:24 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C8FFA19A6F; Tue, 28 May 2002 13:06:16 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 0AAEA19A64 for <9fans@cse.psu.edu>; Tue, 28 May 2002 13:05:12 -0400 (EDT) Message-ID: <1890f95b5b25fd97004929ac451ceae0@plan9.escet.urjc.es> To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] devi82365.c fix Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Tue, 28 May 2002 19:04:50 +0200 Following nigel advice I changed i82365 to set the 3v bit only for my card type and let my disk work. I tested it and it seems to work right. diff /n/dump/2002/0528/sys/src/9/pc/devi82365.c /sys/src/9/pc/devi82365.c 19a20 > Fcard3v= (1<<3), 48c50,52 < --- > Rcdgcr= 0x16, /* Card detect general control register*/ > Fslot1v= (1<<6), /* voltage for slot 1 (0 == 3.3v) */ > Fslot2v= (1<<7), /* voltage for slot 2 (0 == 3.3v) */ 95a100 > Ti82365SLDF, 173a179,182 > uchar enaval; > I82365* ctlr; > uchar cdgcr; > 178c187,196 < wrreg(pp, Rpc, Fautopower|Foutena|Fcardena); --- > enaval = Fautopower|Foutena|Fcardena; > ctlr = pp->cp; > if (ctlr->type == Ti82365SLDF){ > cdgcr = rdreg(pp, Rcdgcr); > if (pp - slot == 0 && (cdgcr&Fslot1v) == 0) > enaval |= Fcard3v; > if (pp - slot == 1 && (cdgcr&Fslot2v) == 0) > enaval |= Fcard3v; > } > wrreg(pp, Rpc, enaval); 459a478 > [Ti82365SLDF] "Intel 82365SL-DF", 487a507,509 > case 0x84: > cp->type = Ti82365SLDF; > /* has the 3v power bit and is like Ti82365 otherwise */ 490d511 < case 0x84: 515c536 < if(cp->type == Ti82365){ --- > if(cp->type == Ti82365 || cp->type == Ti82365SLDF){ 901a923,925 > uchar cdgcr; > uchar enaval; > I82365* ctlr; 971c995,1006 < wrreg(pp, Rpc, x|Fautopower|Foutena|Fcardena); --- > > enaval = x|Fautopower|Foutena|Fcardena; > ctlr = pp->cp; > if (ctlr->type == Ti82365SLDF){ > cdgcr = rdreg(pp, Rcdgcr); > if (slotno == 0 && (cdgcr&Fslot1v) == 0) > enaval |= Fcard3v; > if (slotno == 1 && (cdgcr&Fslot2v) == 0) > enaval |= Fcard3v; > } > > wrreg(pp, Rpc, enaval); --upas-galykppwdbheiewixreqvkexnb--