Skip to content

Commit 133f09a

Browse files
author
David S. Miller
committed
[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>
1 parent e450992 commit 133f09a

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

‎arch/sparc64/kernel/ds.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static int __devinit ds_probe(struct vio_dev *vdev,
598598
}
599599
dp->lp = lp;
600600

601-
err = ldc_bind(lp);
601+
err = ldc_bind(lp, "DS");
602602
if (err)
603603
goto out_free_ldc;
604604

‎arch/sparc64/kernel/ldc.c‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ struct ldc_channel {
158158
u8 mss;
159159
u8 state;
160160

161+
#define LDC_IRQ_NAME_MAX 32
162+
char rx_irq_name[LDC_IRQ_NAME_MAX];
163+
char tx_irq_name[LDC_IRQ_NAME_MAX];
164+
161165
struct hlist_head mh_list;
162166

163167
struct hlist_node list;
@@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free);
12261230
* state. This does not initiate a handshake, ldc_connect() does
12271231
* that.
12281232
*/
1229-
int ldc_bind(struct ldc_channel *lp)
1233+
int ldc_bind(struct ldc_channel *lp, const char *name)
12301234
{
12311235
unsigned long hv_err, flags;
12321236
int err = -EINVAL;
12331237

12341238
spin_lock_irqsave(&lp->lock, flags);
12351239

1240+
if (!name)
1241+
goto out_err;
1242+
12361243
if (lp->state != LDC_STATE_INIT)
12371244
goto out_err;
12381245

1246+
snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1247+
snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1248+
12391249
err = request_irq(lp->cfg.rx_irq, ldc_rx,
12401250
IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1241-
"LDC RX", lp);
1251+
lp->rx_irq_name, lp);
12421252
if (err)
12431253
goto out_err;
12441254

12451255
err = request_irq(lp->cfg.tx_irq, ldc_tx,
12461256
IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1247-
"LDC TX", lp);
1257+
lp->tx_irq_name, lp);
12481258
if (err)
12491259
goto out_free_rx_irq;
12501260

‎arch/sparc64/kernel/viohs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ void vio_port_up(struct vio_driver_state *vio)
724724

725725
err = 0;
726726
if (state == LDC_STATE_INIT) {
727-
err = ldc_bind(vio->lp);
727+
err = ldc_bind(vio->lp, vio->name);
728728
if (err)
729729
printk(KERN_WARNING "%s: Port %lu bind failed, "
730730
"err=%d\n",

‎include/asm-sparc64/ldc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern struct ldc_channel *ldc_alloc(unsigned long id,
5656
extern void ldc_free(struct ldc_channel *lp);
5757

5858
/* Register TX and RX queues of the link with the hypervisor. */
59-
extern int ldc_bind(struct ldc_channel *lp);
59+
extern int ldc_bind(struct ldc_channel *lp, const char *name);
6060

6161
/* For non-RAW protocols we need to complete a handshake before
6262
* communication can proceed. ldc_connect() does that, if the

0 commit comments

Comments
 (0)