Thread (18 messages) 18 messages, 4 authors, 2009-10-01

Re: [PATCH] ks8851_ml ethernet network driver

From: Stephen Hemminger <hidden>
Date: 2009-09-17 04:03:18

On Wed, 16 Sep 2009 19:38:36 -0700
Greg KH [off-list ref] wrote:
/**
+ * ks_irq - device interrupt handler
+ * @irq: Interrupt number passed from the IRQ hnalder.
+ * @pw: The private word passed to register_irq(), our struct ks_net.
+ *
+ * This is the handler invoked to find out what happened
+ *
+ * Read the interrupt status, work out what needs to be done and then clear
+ * any of the interrupts that are not needed.
+ */
+
+static irqreturn_t ks_irq(int irq, void *pw)
+{
+	struct ks_net *ks = pw;
+	struct net_device *netdev = ks->netdev;
+	u16 status;
+
+	/*this should be the first in IRQ handler */
+	ks_save_cmd_reg(ks);
+
+	status = ks_rdreg16(ks, KS_ISR);
+	ks_wrreg16(ks, KS_ISR, status);
if status == 0 or status == ~0 then device should not return IRQ_HANDLED.
In the former case, the IRQ is shared, in later case the device is not present
on the bus (hotplug).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help