From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <675fc52d4267e9ef68bedb3cfb468f58@quanstro.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work From: erik quanstrom Date: Fri, 8 Feb 2008 09:55:25 -0500 In-Reply-To: <47AC224F.4090700@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 4bd1c87a-ead3-11e9-9d60-3106f5b1d025 > I changed sdata.c to: > > return SDretry if starting dmarequest fails, > return SDretry and reseting controller if dma times out, > return SDretry on request is done and error signaled, > > and added a counter that resets the controller if a request > was 1000 times retried... you might want to loop internally instead of counting to 1000. (which may be too high. i would think that 2 or 4 would do it. have you seen differently?) if more than one thread is doing i/o to the disk and you have a bad sector, it may take an arbitrary amount of time before you discover this fact. > The machine ran the whole night with bodth drives in DMA and heavy load. > vacing, pingflooded from outside, ddtest on both drives and still alive! :-) good deal. via's product page www.via.com.tw/en/products/chipsets/southbridge/vt8237/specs.jsp indicates that the nic & sata controller are both integrated into the sb. perhaps this extra southbridge configuration (pci.c) would make the sdata hack unnecessary? static void viaset(Pcidev *p, uchar link, uchar irq) { uchar pirq; pirq = pcicfgr8(p, 0x55 + (link >> 1)); pirq &= (link & 1)? 0x0f: 0xf0; pirq |= (link & 1)? (irq << 4): (irq & 15); pcicfgw8(p, 0x55 + (link>>1), pirq); if(p->vid != 0x3177 && p->vid != 0x3227) return; /* Set transition time to max */ pcicfgw8(p, 0xec, pcicfgr8(p, 0xec) & ~4); pcicfgw8(p, 0xe4, pcicfgr8(p, 0xe4) & ~0x80); pcicfgw8(p, 0xe5, pcicfgr8(p, 0xe5) | 0x80); // if(pcicfgr8(p, 0x81) & 0x80) // acpiregs = pcicfgr32(p, 0x88) & 0xff00; } - erik