有四个DM9000的网卡,现在linux内核只能驱动一个网卡eth0,别的都不能用,怎么办?
一块板子上有四个DM9000的网卡,现在linux内核只能驱动一个网卡eth0,别的都不能用,怎么办?
驱动程序是好的
/* DM9000 Drivers*/
/* address:nGCS1->0x08000000*/
/* Base addr->0x300*/
/* INT->EINT4*/
static struct resource smdk_dm9k0_resource[] = {
[0] = {
.start = S3C2410_CS1 + 0x300 + 0x0,
.end = S3C2410_CS1 + 0x300 + 0x3,
.flags = IORESOURCE_MEM
},
[1] = {
.start = S3C2410_CS1 + 0x300 + 0x4 ,
.end = S3C2410_CS1 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM
},
[2] = {
.start = IRQ_EINT4,
.end = IRQ_EINT4,
.flags = IORESOURCE_IRQ
}
};
/**static struct resource smdk_dm9k1_resource[] = {
[0] = {
.start = S3C2410_CS3 + 0x300 + 0x0,
.end = S3C2410_CS3 + 0x300 + 0x3,
.flags = IORESOURCE_MEM
},
[1] = {
.start = S3C2410_CS3 + 0x300 + 0x4 ,
.end = S3C2410_CS3 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM
},
[2] = {
.start = IRQ_EINT6,
.end = IRQ_EINT6,
.flags = IORESOURCE_IRQ
}
};**/
/*static struct resource smdk_dm9k2_resource[] = {
{
.start = S3C2410_CS4+ 0x300 + 0x0,
.end = S3C2410_CS4 + 0x300 + 0x3,
.flags = IORESOURCE_MEM,
}, {
.start = S3C2410_CS4 + 0x300 + 0x4,
.end = S3C2410_CS4 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_EINT7,
.end = IRQ_EINT7,
.flags = IORESOURCE_IRQ,
},
};
* for the moment we limit ourselves to 16bit IO until some
* better IO routines can be written and tested
*/
static struct dm9000_plat_data smdk_dm9k_platdata = {
.flags = DM9000_PLATF_16BITONLY
};
/*static struct dm9000_plat_data smdk_vfd_platdata = {
.flags = DM9000_PLATF_8BITONLY
};
static struct platform_device smdk_device_dm9k2 = {
.name = "vfd",
.id = 2,
.num_resources = ARRAY_SIZE(smdk_dm9k2_resource),
.resource = smdk_dm9k2_resource,
.dev = {
.platform_data = &smdk_vfd_platdata,
}
};*/
static struct platform_device smdk_device_dm9k0 = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(smdk_dm9k0_resource),
.resource = smdk_dm9k0_resource,
.dev = {
.platform_data = &smdk_dm9k_platdata,
}
};
/**static struct platform_device smdk_device_dm9k1 = {
.name = "dm9000",
.id = 1,
.num_resources = ARRAY_SIZE(smdk_dm9k1_resource),
.resource = smdk_dm9k1_resource,
.dev = {
.platform_data = &smdk_dm9k_platdata,
}
};**/
#define UCON S3C2410_UCON_DEFAULT
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
static struct s3c2410_uartcfg smdk2410_uartcfgs[] = {
[0] = {
.hwport = 0,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
},
[1] = {
.hwport = 1,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
},
[2] = {
.hwport = 2,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
}
};
static struct platform_device *smdk2410_devices[] __initdata = {
&s3c_device_usb,
// &s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c,
&s3c_device_iis,
&s3c_device_nand,
&smdk_device_dm9k0,
//// &smdk_device_dm9k1,
// &smdk_device_dm9k2,
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
有四个网卡,但只能驱动一个,你怎么推断驱动程序是好的?
明显驱动有问题。确认OS是否找到硬件,驱动是否支持多卡。
驱动支持多个卡,
所谓“4个dm9k”, 究竟是一个PCI function上有4个ports, 还是一个PCI device上有4个functions?
如果是后者, 没有任何理由只识别eth0。
能用一个就能用其他的。
ifconfig -a看看
其他的可能没有up
用minor进行区别