Commit 133f09a1 authored by David S. Miller's avatar David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent e450992d
...@@ -598,7 +598,7 @@ static int __devinit ds_probe(struct vio_dev *vdev, ...@@ -598,7 +598,7 @@ static int __devinit ds_probe(struct vio_dev *vdev,
} }
dp->lp = lp; dp->lp = lp;
err = ldc_bind(lp); err = ldc_bind(lp, "DS");
if (err) if (err)
goto out_free_ldc; goto out_free_ldc;
......
...@@ -158,6 +158,10 @@ struct ldc_channel { ...@@ -158,6 +158,10 @@ struct ldc_channel {
u8 mss; u8 mss;
u8 state; 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_head mh_list;
struct hlist_node list; struct hlist_node list;
...@@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free); ...@@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free);
* state. This does not initiate a handshake, ldc_connect() does * state. This does not initiate a handshake, ldc_connect() does
* that. * that.
*/ */
int ldc_bind(struct ldc_channel *lp) int ldc_bind(struct ldc_channel *lp, const char *name)
{ {
unsigned long hv_err, flags; unsigned long hv_err, flags;
int err = -EINVAL; int err = -EINVAL;
spin_lock_irqsave(&lp->lock, flags); spin_lock_irqsave(&lp->lock, flags);
if (!name)
goto out_err;
if (lp->state != LDC_STATE_INIT) if (lp->state != LDC_STATE_INIT)
goto out_err; 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, err = request_irq(lp->cfg.rx_irq, ldc_rx,
IRQF_SAMPLE_RANDOM | IRQF_SHARED, IRQF_SAMPLE_RANDOM | IRQF_SHARED,
"LDC RX", lp); lp->rx_irq_name, lp);
if (err) if (err)
goto out_err; goto out_err;
err = request_irq(lp->cfg.tx_irq, ldc_tx, err = request_irq(lp->cfg.tx_irq, ldc_tx,
IRQF_SAMPLE_RANDOM | IRQF_SHARED, IRQF_SAMPLE_RANDOM | IRQF_SHARED,
"LDC TX", lp); lp->tx_irq_name, lp);
if (err) if (err)
goto out_free_rx_irq; goto out_free_rx_irq;
......
...@@ -724,7 +724,7 @@ void vio_port_up(struct vio_driver_state *vio) ...@@ -724,7 +724,7 @@ void vio_port_up(struct vio_driver_state *vio)
err = 0; err = 0;
if (state == LDC_STATE_INIT) { if (state == LDC_STATE_INIT) {
err = ldc_bind(vio->lp); err = ldc_bind(vio->lp, vio->name);
if (err) if (err)
printk(KERN_WARNING "%s: Port %lu bind failed, " printk(KERN_WARNING "%s: Port %lu bind failed, "
"err=%d\n", "err=%d\n",
......
...@@ -56,7 +56,7 @@ extern struct ldc_channel *ldc_alloc(unsigned long id, ...@@ -56,7 +56,7 @@ extern struct ldc_channel *ldc_alloc(unsigned long id,
extern void ldc_free(struct ldc_channel *lp); extern void ldc_free(struct ldc_channel *lp);
/* Register TX and RX queues of the link with the hypervisor. */ /* Register TX and RX queues of the link with the hypervisor. */
extern int ldc_bind(struct ldc_channel *lp); extern int ldc_bind(struct ldc_channel *lp, const char *name);
/* For non-RAW protocols we need to complete a handshake before /* For non-RAW protocols we need to complete a handshake before
* communication can proceed. ldc_connect() does that, if the * communication can proceed. ldc_connect() does that, if the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment