* drivers - modules versus compiled in? @ 2001-10-31 21:18 Kevin B. Hendricks 2001-11-01 17:48 ` Dan Malek 0 siblings, 1 reply; 4+ messages in thread From: Kevin B. Hendricks @ 2001-10-31 21:18 UTC (permalink / raw) To: linuxppc-dev Hi, What is differnt between the cases a driver is compiled in versus if it is loaded as a module? I seem to be having stability issues with the driver if it is compiled in but once I compile it as a module to start to play with it without having to reboot all of the time, the driver is does not exhibit the same bad behavior. Are the allocated memory areas differnt? Are the IRQs different? is the power-up sequence different? Any hints as to what might have changed? Thanks, Kevin ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers - modules versus compiled in? 2001-10-31 21:18 drivers - modules versus compiled in? Kevin B. Hendricks @ 2001-11-01 17:48 ` Dan Malek 2001-11-01 18:01 ` Kevin B. Hendricks 0 siblings, 1 reply; 4+ messages in thread From: Dan Malek @ 2001-11-01 17:48 UTC (permalink / raw) To: Kevin B. Hendricks; +Cc: linuxppc-dev Kevin B. Hendricks wrote: > Are the allocated memory areas differnt? Yes, this is usually why you may see different behavior. First, the module itself is allocated from kernel memory that other errant pointers could access that wouldn't otherwise. Usually, the problem is related to buffers or data structures the driver allocates that are further used for DMA operations. Things like 'virt_to_bus()' won't work on static objects in a module, while it will in a compiled driver. > Any hints as to what might have changed? Provide some hints to us :-). What type of system, what kernel, what driver? Thanks. -- Dan ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers - modules versus compiled in? 2001-11-01 17:48 ` Dan Malek @ 2001-11-01 18:01 ` Kevin B. Hendricks 2001-11-01 18:11 ` Kevin B. Hendricks 0 siblings, 1 reply; 4+ messages in thread From: Kevin B. Hendricks @ 2001-11-01 18:01 UTC (permalink / raw) To: Dan Malek; +Cc: linuxppc-dev Hi Dan, The driver in question is the tulip nic driver with my modifications to support the PNIC_II chip (but most of the driver is common acrosss other chips that tulip supports including transmit and receive buffer code, which I have not touched) The funny thing is that when compiled as a module, it works flawlessly. But when I compile it into the kernel, it seems a bit flakey and some received packets get lost somehow (I can see the transmitted packets generating link activity on the switch, but nothing seems to come the other way). The driver debug messages all look sane and it looks like the driver is working but not data is ever returned from the card. This driver does use DMA and does allocate buffer space for it. Given the "virt_to_bus()' issue you describe, I would expect the compiled in kernel to be the working one and not the one built as a module. Are there any mechanisms that would help isolate a module's memory from corruption that don't exist when compiled into a kernel? Thanks, Kevin On November 1, 2001 12:48, you wrote: > Kevin B. Hendricks wrote: > > Are the allocated memory areas differnt? > > Yes, this is usually why you may see different behavior. First, > the module itself is allocated from kernel memory that other errant > pointers could access that wouldn't otherwise. Usually, the problem > is related to buffers or data structures the driver allocates that > are further used for DMA operations. Things like 'virt_to_bus()' > won't work on static objects in a module, while it will in a > compiled driver. > > > Any hints as to what might have changed? > > Provide some hints to us :-). What type of system, what > kernel, what driver? > > Thanks. > > > -- Dan ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers - modules versus compiled in? 2001-11-01 18:01 ` Kevin B. Hendricks @ 2001-11-01 18:11 ` Kevin B. Hendricks 0 siblings, 0 replies; 4+ messages in thread From: Kevin B. Hendricks @ 2001-11-01 18:11 UTC (permalink / raw) To: Dan Malek; +Cc: linuxppc-dev Hi, I forgot to include my info: Kernel 2.4.10-ac6 PowerMac B+W G3 with 512Meg with every pci slot filled (Adaptec SCSI Card, Radeon 32Meg Mac Edition PCI Card, and an AsanteFast 10/100 NIC (the one I am trying to get to work better). Thanks, Kevin On November 1, 2001 01:01, Kevin B. Hendricks wrote: > Hi Dan, > > The driver in question is the tulip nic driver with my modifications to > support the PNIC_II chip (but most of the driver is common acrosss other > chips that tulip supports including transmit and receive buffer code, > which I have not touched) > > The funny thing is that when compiled as a module, it works flawlessly. > But when I compile it into the kernel, it seems a bit flakey and some > received packets get lost somehow (I can see the transmitted packets > generating link activity on the switch, but nothing seems to come the > other way). The driver debug messages all look sane and it looks like > the driver is working but not data is ever returned from the card. > > This driver does use DMA and does allocate buffer space for it. > > Given the "virt_to_bus()' issue you describe, I would expect the > compiled in kernel to be the working one and not the one built as a > module. > > Are there any mechanisms that would help isolate a module's memory from > corruption that don't exist when compiled into a kernel? > > Thanks, > > Kevin > > On November 1, 2001 12:48, you wrote: > > Kevin B. Hendricks wrote: > > > Are the allocated memory areas differnt? > > > > Yes, this is usually why you may see different behavior. First, > > the module itself is allocated from kernel memory that other errant > > pointers could access that wouldn't otherwise. Usually, the problem > > is related to buffers or data structures the driver allocates that > > are further used for DMA operations. Things like 'virt_to_bus()' > > won't work on static objects in a module, while it will in a > > compiled driver. > > > > > Any hints as to what might have changed? > > > > Provide some hints to us :-). What type of system, what > > kernel, what driver? > > > > Thanks. > > > > > > -- Dan > ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-01 18:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-10-31 21:18 drivers - modules versus compiled in? Kevin B. Hendricks 2001-11-01 17:48 ` Dan Malek 2001-11-01 18:01 ` Kevin B. Hendricks 2001-11-01 18:11 ` Kevin B. Hendricks
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).