ahci: ahci_host_intr() problem(s)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,


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.

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?

I would like to fix the first problem described above, but I don't understand 
what this function does.. so perhaps someone who has a greater understanding 
of this code should post a patch. Or explain what it should do :)

---
Bastiaan
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux