diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index 22517dfd021daab0c640fa9edf5488541ee2e9c2..c7ece8c52039d8baef0a8cf1698b74d8d98de0e0 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c @@ -598,7 +598,7 @@ static int __devinit ds_probe(struct vio_dev *vdev, } dp->lp = lp; - err = ldc_bind(lp); + err = ldc_bind(lp, "DS"); if (err) goto out_free_ldc; diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index 4cba28685967797e4c8eee2b4a3aaf949affac2f..dbb65b674a6725349b582b4725708ca0d11416ca 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; diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c index 3eb42e3624f37afff583089a98ef694537ca56f5..b0b1b87793429e7c0d4281b7561a4c6b108c0cd3 100644 --- a/arch/sparc64/kernel/viohs.c +++ b/arch/sparc64/kernel/viohs.c @@ -724,7 +724,7 @@ void vio_port_up(struct vio_driver_state *vio) err = 0; if (state == LDC_STATE_INIT) { - err = ldc_bind(vio->lp); + err = ldc_bind(vio->lp, vio->name); if (err) printk(KERN_WARNING "%s: Port %lu bind failed, " "err=%d\n", diff --git a/include/asm-sparc64/ldc.h b/include/asm-sparc64/ldc.h index 1c13738f13ffee6ad749f4f1e390ff74cf1ebd20..3c91f269f9dbeb9f4ee76c296322f0c34df72c29 100644 --- a/include/asm-sparc64/ldc.h +++ b/include/asm-sparc64/ldc.h @@ -56,7 +56,7 @@ extern struct ldc_channel *ldc_alloc(unsigned long id, extern void ldc_free(struct ldc_channel *lp); /* 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 * communication can proceed. ldc_connect() does that, if the