--- Begin Message ---
- Subject: [seraphim-bugs 1752](Re: 1750)Re: [plamo:01986]PC-9801-108 が認識されません
- From: Hirofumi Nishizuka <nishi@xxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Mar 1999 12:11:21 +0900 (JST)
西塚です。
On Tue, 30 Mar 1999, 高井 幸輔 wrote:
>/etc/conf.modules といえば、 kerneld を使っていて
>カーネルがネットワークカードのドライバを要求するときは
>「eth0」、「eth1」… という名前を使うので、
>やはりこれ以外の名前はまずいのでは、と思います。
修正してみました。β15からの差分になっております。
drivers/net/Space.c と pc98_108.c への差分です。
モジュール化しなくても組み込めるようになりました。
また、nec108でなく、eth0として組み込めます。
お試し下さい。
--
西塚 博文 (NEC中研)
nishi@rpts.cl.nec.co.jp
diff -aruN lx98-b15/drivers/net/Space.c linux/drivers/net/Space.c
--- lx98-b15/drivers/net/Space.c Wed Sep 2 19:36:59 1998
+++ linux/drivers/net/Space.c Thu Mar 18 11:26:24 1999
@@ -94,6 +94,9 @@
extern int mace_probe(struct device *);
extern int cs89x0_probe(struct device *dev);
extern int ethertap_probe(struct device *dev);
+#ifdef CONFIG_PC98_108
+extern int pc98_108_probe(struct device *dev);
+#endif
/* Detachable devices ("pocket adaptors") */
extern int atp_init(struct device *);
@@ -165,6 +168,9 @@
#ifdef CONFIG_PC98
#ifdef CONFIG_PC98_CBUS_NE2000
&& ne_probe(dev)
+#endif
+#ifdef CONFIG_PC98_108
+ && pc98_108_probe(dev)
#endif
#endif /* CONFIG_PC98 */
#ifdef CONFIG_AT1500
diff -aruN lx98-b15/drivers/net/pc98_108.c linux/drivers/net/pc98_108.c
--- lx98-b15/drivers/net/pc98_108.c Thu Sep 17 13:04:54 1998
+++ linux/drivers/net/pc98_108.c Wed Mar 31 11:37:30 1999
@@ -4,6 +4,13 @@
Written by H.Nishizuka <nishi@rpts.cl.nec.co.jp>
*/
/* --- 変更履歴 ---
+ 3/31/99: (nishi)
+ o モジュール化して組み込んだときに、ethではなくnec108になる問題を
+ 修正した。
+
+ 3/18/99: (nishi)
+ o Space.c を修正してモジュールにしなくても組み込みできるようにした。
+
6/16/98: (nishi)
o IRQを自動認識するようにした。
-->insmod へのパラメータ irq=xxx が無くなりました。
@@ -20,7 +27,7 @@
*/
static const char *version =
- "pc98_108.c: *MEGA ALPHA* 6/16/98 Hirofumi Nishizuka (nishi@rpts.cl.nec.co.jp).\n";
+ "pc98_108.c: 3/31/99 Hirofumi Nishizuka (nishi@rpts.cl.nec.co.jp).\n";
#include <linux/module.h>
@@ -136,6 +143,7 @@
};
static int pc98_108_probe1(struct device *dev, int io);
+static unsigned version_printed = 0;
/*--------------------------------------------------------------------------*/
/*
@@ -649,10 +657,9 @@
#endif
#else
-__initfunc(static int pc98_108_probe(struct device *dev))
+__initfunc(int pc98_108_probe(struct device *dev))
{
int i, base = dev ? dev->base_addr : 0;
- static unsigned version_printed = 0;
if(ei_debug && version_printed++ == 0) {
printk(version);
@@ -1200,6 +1207,17 @@
int asic, nic;
int i, tmp;
+ if(ei_debug && version_printed++ == 0) {
+ printk(version);
+ }
+
+ if(dev == NULL) {
+ dev = init_etherdev(0, 0);
+ if(dev == NULL) {
+ return -ENOMEM;
+ }
+ }
+
asic_offset = (0x888 | ((io & 0xf000) / 2)) - io;
asic = io + asic_offset;
nic = io;
@@ -1320,8 +1338,9 @@
}
#ifdef MODULE
+static char devicename[9] = {0, };
static struct device dev_pc98_108 = {
- DEVICENAME, /* Device name */
+ devicename, /* Device name */
0, 0, 0, 0, /* rmem_end, rmem_start, mem_end, mem_start */
0x0, 0, /* I/O Address, IRQ */
0, 0, 0, NULL, pc98_108_probe /* start */
--- End Message ---