diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 23:22:55 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 04:04:24 -0700 |
commit | 133f09a169f3022be3de671b29658b7ecb375022 (patch) | |
tree | c30e7d34eceb96dd1b0d2b999713bc99f74efbdd /arch/sparc64/kernel/ldc.c | |
parent | e450992d13ffaec6dde4bbbd308b834ae9fc3708 (diff) | |
download | blackbird-op-linux-133f09a169f3022be3de671b29658b7ecb375022.tar.gz blackbird-op-linux-133f09a169f3022be3de671b29658b7ecb375022.zip |
[SPARC64]: Use more mearningful names for IRQ registry.
All of the interrupts say "LDX RX" and "LDX TX" currently
which is next to useless. Put a device specific prefix
before "RX" and "TX" instead which makes it much more
useful.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/ldc.c')
-rw-r--r-- | arch/sparc64/kernel/ldc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index 4cba28685967..dbb65b674a67 100644 --- a/arch/sparc64/kernel/ldc.c +++ b/arch/sparc64/kernel/ldc.c @@ -158,6 +158,10 @@ struct ldc_channel { u8 mss; u8 state; +#define LDC_IRQ_NAME_MAX 32 + char rx_irq_name[LDC_IRQ_NAME_MAX]; + char tx_irq_name[LDC_IRQ_NAME_MAX]; + struct hlist_head mh_list; struct hlist_node list; @@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free); * state. This does not initiate a handshake, ldc_connect() does * that. */ -int ldc_bind(struct ldc_channel *lp) +int ldc_bind(struct ldc_channel *lp, const char *name) { unsigned long hv_err, flags; int err = -EINVAL; spin_lock_irqsave(&lp->lock, flags); + if (!name) + goto out_err; + if (lp->state != LDC_STATE_INIT) goto out_err; + snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); + snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); + err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_SAMPLE_RANDOM | IRQF_SHARED, - "LDC RX", lp); + lp->rx_irq_name, lp); if (err) goto out_err; err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_SAMPLE_RANDOM | IRQF_SHARED, - "LDC TX", lp); + lp->tx_irq_name, lp); if (err) goto out_free_rx_irq; |