From: Jeff Garzik <jeff@garzik.org>
To: Bastiaan Jacques <b.jacques@planet.nl>
Cc: linux-ide@vger.kernel.org
Subject: Re: ahci: ahci_host_intr() problem(s)?
Date: Sat, 15 Apr 2006 14:47:00 -0400 [thread overview]
Message-ID: <44413FA4.8050205@garzik.org> (raw)
In-Reply-To: <200604151859.46130.b.jacques@planet.nl>
Bastiaan Jacques wrote:
> I was looking at ahci_host_intr() when I noticed something strange: it always
> returns 1. Now, that alone is odd because when a function is successful it
> ordinarily returns 0 (zero).
>
> But more importantly, it is called in ahci_interrupt():
>
> if (!ahci_host_intr(ap, qc))
> if (ata_ratelimit())
> dev_printk(KERN_WARNING, host_set->dev,
> "unhandled interrupt on port %u\n",
> i);
>
> So that if-statement is always false; this seems like a logic error to me.
Its dead code at present, yes.
> Back to ahci_host_intr itself. it does:
>
> serr = readl(port_mmio + PORT_SCR_ERR);
> writel(serr, port_mmio + PORT_SCR_ERR);
>
> This looks like first we are reading a value from the port, and then writing
> the same value back without modification. Why?
Standard write-1s-to-clear register behavior.
Jeff
prev parent reply other threads:[~2006-04-15 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 16:59 ahci: ahci_host_intr() problem(s)? Bastiaan Jacques
2006-04-15 18:47 ` Jeff Garzik [this message]
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=44413FA4.8050205@garzik.org \
--to=jeff@garzik.org \
--cc=b.jacques@planet.nl \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.