netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Olof Johansson <olof@lixom.net>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] PA Semi PWRficient Ethernet driver
Date: Mon, 29 Jan 2007 21:34:06 -0500	[thread overview]
Message-ID: <45BEAE9E.4000802@pobox.com> (raw)
In-Reply-To: <20070130014107.GA18935@lixom.net>

Olof Johansson wrote:
> On Mon, Jan 29, 2007 at 10:22:33AM -0800, Stephen Hemminger wrote:
>> Basic initalization, setup comments.
> 
> Thanks, fixes have been incorporated and will be reposted. Most of them
> was obviously just my lack of diligence. See however the two below.
> 
>>> +static irqreturn_t pasemi_mac_tx_intr(int irq, void *data)
>>> +{
>>> +	struct net_device *dev = data;
>>> +	struct pasemi_mac *mac = netdev_priv(dev);
>>> +	unsigned int reg;
>>> +
>>> +	pasemi_mac_clean_tx(mac);
>>> +
>>> +	reg = PAS_IOB_DMA_TXCH_RESET_PINTC | PAS_IOB_DMA_TXCH_RESET_SINTC;
>>> +	if (*mac->tx_status & PAS_STATUS_TIMER)
>>> +		reg |= PAS_IOB_DMA_TXCH_RESET_TINTC;
>>> +
>>> +	pci_write_config_dword(mac->iob_pdev, PAS_IOB_DMA_TXCH_RESET(mac->dma_txch),
>>> +			       reg);
>>> +
>>> +	return IRQ_HANDLED;
>>> +}
>> To do shared IRQ's properly you need to check to see if
>> this is your device IRQ or not. Maybe reading config value?
> 
> Right now it's guaranteed that the interrupts will not be shared. They're
> fixed for the on-chip devices, and no other driver should be binding to
> the same channels (and thus irqs).
> 
> If it changes in the future, the driver would need other rework as well.

Nonetheless, it is far more sane to check for work, and return if no 
work.  Who knows if the hardware will signal an interrupt early or late.


>>> +static struct pci_driver pasemi_mac_driver = {
>>> +   .name = "pasemi_mac",
>>> +   .id_table = pasemi_mac_pci_tbl,
>>> +   .probe = pasemi_mac_probe,
>> Don't you need a remove routine?
> 
> No hotplug support at this time, so I didn't see any use in providing one.

module remove.

	Jeff




  reply	other threads:[~2007-01-30  2:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29  6:08 [PATCH] PA Semi PWRficient Ethernet driver Olof Johansson
2007-01-29 18:22 ` Stephen Hemminger
2007-01-30  1:41   ` Olof Johansson
2007-01-30  2:34     ` Jeff Garzik [this message]
2007-01-30 20:53       ` Olof Johansson
2007-01-29 22:35 ` Francois Romieu
2007-01-30  1:41   ` Olof Johansson
2007-01-30 10:06     ` Christoph Hellwig
2007-01-30 15:34       ` Olof Johansson
2007-01-30 21:45     ` Francois Romieu
2007-01-31  4:52       ` Olof Johansson
2007-01-30  1:44 ` [PATCH] [v2]PA " Olof Johansson
2007-01-31  5:44   ` [PATCH] [v3] PA " Olof Johansson
2007-01-31 10:34     ` Jeff Garzik
2007-02-01  3:40       ` Olof Johansson
2007-01-31 12:44     ` Ingo Oeser
2007-01-31 15:16       ` Olof Johansson
2007-01-31 18:38     ` Stephen Hemminger
2007-02-01  3:20       ` Olof Johansson
2007-02-01  3:43     ` [PATCH] [v4] " Olof Johansson
2007-02-02 13:26       ` Jeff Garzik
2007-01-30 10:03 ` [PATCH] " Christoph Hellwig
2007-01-30 15:36   ` Olof Johansson

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=45BEAE9E.4000802@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=shemminger@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).