diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-12 02:22:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 07:04:24 -0400 |
commit | 133f09a169f3022be3de671b29658b7ecb375022 (patch) | |
tree | c30e7d34eceb96dd1b0d2b999713bc99f74efbdd | |
parent | e450992d13ffaec6dde4bbbd308b834ae9fc3708 (diff) |
[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>
-rw-r--r-- | arch/sparc64/kernel/ds.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/ldc.c | 16 | ||||
-rw-r--r-- | arch/sparc64/kernel/viohs.c | 2 | ||||
-rw-r--r-- | include/asm-sparc64/ldc.h | 2 |
4 files changed, 16 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index 22517dfd021d..c7ece8c52039 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, | |||
598 | } | 598 | } |
599 | dp->lp = lp; | 599 | dp->lp = lp; |
600 | 600 | ||
601 | err = ldc_bind(lp); | 601 | err = ldc_bind(lp, "DS"); |
602 | if (err) | 602 | if (err) |
603 | goto out_free_ldc; | 603 | goto out_free_ldc; |
604 | 604 | ||
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 { | |||
158 | u8 mss; | 158 | u8 mss; |
159 | u8 state; | 159 | u8 state; |
160 | 160 | ||
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 | |||
161 | struct hlist_head mh_list; | 165 | struct hlist_head mh_list; |
162 | 166 | ||
163 | struct hlist_node list; | 167 | struct hlist_node list; |
@@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free); | |||
1226 | * state. This does not initiate a handshake, ldc_connect() does | 1230 | * state. This does not initiate a handshake, ldc_connect() does |
1227 | * that. | 1231 | * that. |
1228 | */ | 1232 | */ |
1229 | int ldc_bind(struct ldc_channel *lp) | 1233 | int ldc_bind(struct ldc_channel *lp, const char *name) |
1230 | { | 1234 | { |
1231 | unsigned long hv_err, flags; | 1235 | unsigned long hv_err, flags; |
1232 | int err = -EINVAL; | 1236 | int err = -EINVAL; |
1233 | 1237 | ||
1234 | spin_lock_irqsave(&lp->lock, flags); | 1238 | spin_lock_irqsave(&lp->lock, flags); |
1235 | 1239 | ||
1240 | if (!name) | ||
1241 | goto out_err; | ||
1242 | |||
1236 | if (lp->state != LDC_STATE_INIT) | 1243 | if (lp->state != LDC_STATE_INIT) |
1237 | goto out_err; | 1244 | goto out_err; |
1238 | 1245 | ||
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 | |||
1239 | err = request_irq(lp->cfg.rx_irq, ldc_rx, | 1249 | err = request_irq(lp->cfg.rx_irq, ldc_rx, |
1240 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1250 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, |
1241 | "LDC RX", lp); | 1251 | lp->rx_irq_name, lp); |
1242 | if (err) | 1252 | if (err) |
1243 | goto out_err; | 1253 | goto out_err; |
1244 | 1254 | ||
1245 | err = request_irq(lp->cfg.tx_irq, ldc_tx, | 1255 | err = request_irq(lp->cfg.tx_irq, ldc_tx, |
1246 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1256 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, |
1247 | "LDC TX", lp); | 1257 | lp->tx_irq_name, lp); |
1248 | if (err) | 1258 | if (err) |
1249 | goto out_free_rx_irq; | 1259 | goto out_free_rx_irq; |
1250 | 1260 | ||
diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c index 3eb42e3624f3..b0b1b8779342 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) | |||
724 | 724 | ||
725 | err = 0; | 725 | err = 0; |
726 | if (state == LDC_STATE_INIT) { | 726 | if (state == LDC_STATE_INIT) { |
727 | err = ldc_bind(vio->lp); | 727 | err = ldc_bind(vio->lp, vio->name); |
728 | if (err) | 728 | if (err) |
729 | printk(KERN_WARNING "%s: Port %lu bind failed, " | 729 | printk(KERN_WARNING "%s: Port %lu bind failed, " |
730 | "err=%d\n", | 730 | "err=%d\n", |
diff --git a/include/asm-sparc64/ldc.h b/include/asm-sparc64/ldc.h index 1c13738f13ff..3c91f269f9db 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, | |||
56 | extern void ldc_free(struct ldc_channel *lp); | 56 | extern void ldc_free(struct ldc_channel *lp); |
57 | 57 | ||
58 | /* Register TX and RX queues of the link with the hypervisor. */ | 58 | /* 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); |
60 | 60 | ||
61 | /* For non-RAW protocols we need to complete a handshake before | 61 | /* For non-RAW protocols we need to complete a handshake before |
62 | * communication can proceed. ldc_connect() does that, if the | 62 | * communication can proceed. ldc_connect() does that, if the |