linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erik Mouw <erik@harddisk-recovery.com>
To: linux-ide@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk
Subject: libata-pata: how to select PIO mode instead of DMA?
Date: Wed, 20 Dec 2006 13:23:56 +0100	[thread overview]
Message-ID: <20061220122356.GE28435@harddisk-recovery.com> (raw)

Hi,

I'm experimenting with the libata-pata drivers in linux 2.6.19. So far
it looks good, great job Alan! 

We obviously have some drives that due to their damaged nature have
some funny behaviour. One of them is that some drives really don't like
DMA mode anymore and can only be reliably recovered in PIO mode. With
the old IDE drivers that was easy: hdparm -d 0 /dev/hda . Unfortunately
I can't find a way to do the same with libata-pata.

The libata-pata drivers have a set_piomode method that gets called in
libata-core.c:ata_set_mode(), which is only called from the bus probe
function and the exception handler. What is needed to force a drive
into PIO mode from userspace?


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

                 reply	other threads:[~2006-12-20 12:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061220122356.GE28435@harddisk-recovery.com \
    --to=erik@harddisk-recovery.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).