Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760734AbYAaAV1 (ORCPT ); Wed, 30 Jan 2008 19:21:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756266AbYAaAVU (ORCPT ); Wed, 30 Jan 2008 19:21:20 -0500 Received: from idcmail-mo1so.shaw.ca ([24.71.223.10]:23100 "EHLO pd2mo3so.prod.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755687AbYAaAVS (ORCPT ); Wed, 30 Jan 2008 19:21:18 -0500 Date: Wed, 30 Jan 2008 18:20:34 -0600 From: Robert Hancock Subject: Re: Help Needed Reading / Poling the ATA Status Register In-reply-to: To: "frank.priest@gmail.com" Cc: linux-kernel Message-id: <47A11452.3030709@shaw.ca> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 24 frank.priest@gmail.com wrote: > I am currently writing some code to send some ATA commands directly to > the drive using ioctl and SG_IO which seems to work fine. However I > also need to read the ATA status register values in real time which I > am unsure how to do. > > I have seen in the libata developers guide the following functions to > read the status and alternative status registers:- > > u8 (*check_status)(struct ata_port *ap); > u8 (*check_altstatus)(struct ata_port *ap); > u8 (*check_err)(struct ata_port *ap); > > However I have no idea how to access these functions directly or even > if this is the best way to go about it. Any help at all would be much > appreciated. First question is why you need to poll the status register, since quite likely there is a better solution to whatever that reason is.. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/