mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ravi Wijayaratne <ravi_wija@yahoo.com>
To: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Reading SATA command/status register (lib-ata)
Date: Thu, 6 Oct 2005 09:55:44 -0700 (PDT)	[thread overview]
Message-ID: <20051006165544.71775.qmail@web32512.mail.mud.yahoo.com> (raw)

Hi all

I am calling libata-core.c:sata_phy_reset(port) from a kernel thread
to reset the hot plugged SATA drive. My machine locks up at the place
where it reads the status from the device in ata_busy_sleep(..).

1494         while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) {
1495                 msleep(50);
1496                 status = ata_chk_status(ap);
1497         }

ata_chk_status simply does a readl(status_register). It is not clear to me 
where the hang is. My machine locks up before I call msleep or ata_chk_status.
(determined by printks) after iterating the above routine a few times. When it 
locks up nothing responds. I cant even get to kdb to debug.

But what I noted is that every time it seem to lock up the when the ATA_BUSY status is
removed. (State changes from 0xd0 to 0x50 in ATA Status register). The ATA spec says
that each time this register is read any interrupts are cleared. I wander whether this
would cause the machine to hang ? 

Some insight will be much appreciated.

Thanks
Ravi
 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

                 reply	other threads:[~2005-10-06 16:55 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=20051006165544.71775.qmail@web32512.mail.mud.yahoo.com \
    --to=ravi_wija@yahoo.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®