[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090916210315.04dc743e@s6510>
Date: Wed, 16 Sep 2009 21:03:15 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: "Li, Charles" <Charles.Li@...rel.Com>
Cc: Greg KH <greg@...ah.com>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>, Choi@...ah.com,
David <David.Choi@...rel.Com>, Jeff Garzik <jgarzik@...hat.com>
Subject: Re: [PATCH] ks8851_ml ethernet network driver
On Wed, 16 Sep 2009 19:38:36 -0700
Greg KH <greg@...ah.com> 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).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists