aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hplance.c
diff options
context:
space:
mode:
authorKars de Jong <jongk@linux-m68k.org>2006-12-09 04:29:58 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-09 12:41:18 -0500
commit8e8858e932a81d827e194abf82faf32d02396f55 (patch)
treee839f98a57e8eb307e5acce77d976f28c05bb84a /drivers/net/hplance.c
parent99b48cff405333afe26ac603b37639c410a48e5d (diff)
[PATCH] m68k/HP300: HP LANCE updates
- 7990: request_irq() should have SA_SHIRQ flag set - hplance_init() printed dev->name before register_netdev() had filled it in Signed-off-by: Kars de Jong <jongk@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/hplance.c')
-rw-r--r--drivers/net/hplance.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/hplance.c b/drivers/net/hplance.c
index 9c643f2a8d54..c991cb82ff22 100644
--- a/drivers/net/hplance.c
+++ b/drivers/net/hplance.c
@@ -77,6 +77,7 @@ static int __devinit hplance_init_one(struct dio_dev *d,
77{ 77{
78 struct net_device *dev; 78 struct net_device *dev;
79 int err = -ENOMEM; 79 int err = -ENOMEM;
80 int i;
80 81
81 dev = alloc_etherdev(sizeof(struct hplance_private)); 82 dev = alloc_etherdev(sizeof(struct hplance_private));
82 if (!dev) 83 if (!dev)
@@ -93,6 +94,15 @@ static int __devinit hplance_init_one(struct dio_dev *d,
93 goto out_release_mem_region; 94 goto out_release_mem_region;
94 95
95 dio_set_drvdata(d, dev); 96 dio_set_drvdata(d, dev);
97
98 printk(KERN_INFO "%s: %s; select code %d, addr %2.2x", dev->name, d->name, d->scode, dev->dev_addr[0]);
99
100 for (i=1; i<6; i++) {
101 printk(":%2.2x", dev->dev_addr[i]);
102 }
103
104 printk(", irq %d\n", d->ipl);
105
96 return 0; 106 return 0;
97 107
98 out_release_mem_region: 108 out_release_mem_region:
@@ -119,8 +129,6 @@ static void __init hplance_init(struct net_device *dev, struct dio_dev *d)
119 struct hplance_private *lp; 129 struct hplance_private *lp;
120 int i; 130 int i;
121 131
122 printk(KERN_INFO "%s: %s; select code %d, addr", dev->name, d->name, d->scode);
123
124 /* reset the board */ 132 /* reset the board */
125 out_8(va+DIO_IDOFF, 0xff); 133 out_8(va+DIO_IDOFF, 0xff);
126 udelay(100); /* ariba! ariba! udelay! udelay! */ 134 udelay(100); /* ariba! ariba! udelay! udelay! */
@@ -143,7 +151,6 @@ static void __init hplance_init(struct net_device *dev, struct dio_dev *d)
143 */ 151 */
144 dev->dev_addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4) 152 dev->dev_addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4)
145 | (in_8(va + HPLANCE_NVRAMOFF + i*4 + 3) & 0xF); 153 | (in_8(va + HPLANCE_NVRAMOFF + i*4 + 3) & 0xF);
146 printk("%c%2.2x", i == 0 ? ' ' : ':', dev->dev_addr[i]);
147 } 154 }
148 155
149 lp = netdev_priv(dev); 156 lp = netdev_priv(dev);
@@ -160,7 +167,6 @@ static void __init hplance_init(struct net_device *dev, struct dio_dev *d)
160 lp->lance.lance_log_tx_bufs = LANCE_LOG_TX_BUFFERS; 167 lp->lance.lance_log_tx_bufs = LANCE_LOG_TX_BUFFERS;
161 lp->lance.rx_ring_mod_mask = RX_RING_MOD_MASK; 168 lp->lance.rx_ring_mod_mask = RX_RING_MOD_MASK;
162 lp->lance.tx_ring_mod_mask = TX_RING_MOD_MASK; 169 lp->lance.tx_ring_mod_mask = TX_RING_MOD_MASK;
163 printk(", irq %d\n", lp->lance.irq);
164} 170}
165 171
166/* This is disgusting. We have to check the DIO status register for ack every 172/* This is disgusting. We have to check the DIO status register for ack every