Guillaume Varlet
07/22/2009 10:14 AM
post34312
|
Hello.
My driver detect and initialise several instances of the device, a FPGA IP core.
When I run the driver, and i do an ifconfig on a specific interface, it works :
Jul 22 15:22:09 5 10 0 men-z087
Jul 22 15:22:09 5 10 0 Vendor .............. 0x1172
Jul 22 15:22:09 5 10 0 Device .............. 0x4d45
Jul 22 15:22:09 5 10 0 Revision ............ 0x0
Jul 22 15:22:09 5 10 0 Interrupt ........... 0xa
Jul 22 15:22:09 5 10 0 MAC address ......... 00c03a 9cc018
Jul 22 15:22:10 5 10 0 men-z087
Jul 22 15:22:10 5 10 0 Vendor .............. 0x1172
Jul 22 15:22:10 5 10 0 Device .............. 0x4d45
Jul 22 15:22:10 5 10 0 Revision ............ 0x0
Jul 22 15:22:10 5 10 0 Interrupt ........... 0xa
Jul 22 15:22:10 5 10 0 Interrupt ........... 0x0
Jul 22 15:22:10 5 10 0 MAC address ......... 00c03a 9cd018
Jul 22 15:22:12 5 14 0 men-z087 : link 0 up (100 BaseT Half Duplex)
Jul 22 15:22:13 5 14 0 men-z087 : link 1 up (100 BaseT Full Duplex)
#
# ifconfig men0
men0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
Jul 22 15:47:21 0 14 0 ifmedia_ioctl(ifp = 8154478,ifr = 824f01c,&dev->bsd_mii.mii_media = 815485c,cmd =
3223873846)
address: 00:c0:3a:9c:c0:18
Jul 22 15:47:21 0 14 0 ifmedia_ioctl(ifp = 8154478,ifr = 825281c,&dev->bsd_mii.mii_media = 815485c,cmd =
3223873846)
media: Ethernet autoselect (100baseTX)
Jul 22 15:47:21 0 14 0 ifmedia_ioctl(ifp = 8154478,ifr = 825201c,&dev->bsd_mii.mii_media = 815485c,cmd =
3223873846)
status: active
#
#
#
# ifconfig men1
men1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
Jul 22 15:47:38 0 14 0 ifmedia_ioctl(ifp = 815e798,ifr = 825981c,&dev->bsd_mii.mii_media = 815eb7c,cmd =
3223873846)
address: 00:c0:3a:9c:d0:18
Jul 22 15:47:38 0 14 0 ifmedia_ioctl(ifp = 815e798,ifr = 825981c,&dev->bsd_mii.mii_media = 815eb7c,cmd =
3223873846)
media: Ethernet autoselect (100baseTX full-duplex)
Jul 22 15:47:38 0 14 0 ifmedia_ioctl(ifp = 815e798,ifr = 825981c,&dev->bsd_mii.mii_media = 815eb7c,cmd =
3223873846)
status: active
#
But if I do an ifconfig without specifying the interface the driver crashes while trying to access the media state:
#
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
men0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
Jul 22 16:13:34 0 14 0 ifmedia_ioctl(ifp = 8154478,ifr = 812541293,&dev->bsd_mii.mii_media = 0,cmd = 0)
Jul 22 16:13:34 5 14 0 men-z087 : destroy the driver
Jul 22 16:13:34 5 21 0 run fault pid 790571 tid 2 signal 11 code 1 ip 0xb0328476 tmp/io-pkt-v4-
hcgvarlet12482704615876
address: 00:c0:3a:9c:c0:18
The debuger show me that the crash is done on the second call of ifmedia_ioctl() because MAC address can be displayed.
Do you have any idea of the source of the bug ?
Thanks.
Guillaume.
|
|
|