From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [libata/sata_sil] Error on startup Date: Sat, 13 Sep 2008 16:55:13 +0400 Message-ID: <48CBB831.9030403@ru.mvista.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from gateway-1237.mvista.com ([63.81.120.155]:16535 "EHLO imap.sh.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752580AbYIMMzS (ORCPT ); Sat, 13 Sep 2008 08:55:18 -0400 In-Reply-To: Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Alex Gonzalez Cc: linux-ide@vger.kernel.org Hello. Alex Gonzalez wrote: > I am seeing a problem with libata and the sata_sil driver. I was > redirected here from the lkml so I hope it's the correct list for > this. > > I am running a 2.6.21 SMP mips kernel and on some occasions the kernel > halts on startup. This only happens at boot time, that is, once the > system is running it never exhibits the problem. > > The problem occurs when trying to read the partitions from the SATA > drive, on the first call to read_dev_sector(). As I understand it, the > code finishes doing a sync_page() which starts an asynchronous I/O > operation and sleeps until awaken by an interrupt generated by the > SATA device. > > I have followed the code through until the call to ata_bmdma_start(), > where it does: > > iowrite8(dmactl | ATA_DMA_START, ap->ioaddr.bmdma_addr + ATA_DMA_CMD); > > On a working case, the device interrupts and the flow continues. On a > non working case, there is a delay of 5 or 6 seconds, and then a > series of calls to sil_freeze(), ata_bmdma_error_handler() and ata_bmdma_stop(). > > I am about to delve into the ATA specs to try to understand this > ATA spec. itself won't avail here, it doesn't cover host's DMA support. You probably want to read the part concerning "PCI Compatibility and PCI-Native Mode Bus Master Adapters" pf this document: http://www.t13.org/Documents/UploadedDocuments/project/d1510r1-Host-Adapter.pdf > interaction, but has anybody seen this behavior before? Please CC me > on replies. > Generally, DMA timeouts are seen quite frequently... MBR, Sergei