Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hi. I am writing a pci driver and I don't know what else to do. The problem is, that I have a DAQ card that has 3 bars registered as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2012
    Posts
    12

    io port read freezes kernel


    Hi.

    I am writing a pci driver and I don't know what else to do. The problem is, that I have a DAQ card that has 3 bars registered as i/o ports.
    Bar 0 is for accessing the operation registers of the chip that handles the bus mastering.
    Bar 1 is for registers that concern the data acquisition process.

    I can not inl/outl to bar 1. Kernel freezes and a hard reboot is needed. Because this kept happening I tested the card with the driver provided for windows. When I installed linux back and tried to access the card everything was ok all of the sudden.

    But than I rebooted. And since than I can't get any reading done on bar 1. The freezes are back.

    the card is 32 bus master capable. I disable master and do not even request irq.

    I am at the end of my wit here. Been trying to fix this for the last week and a half.

    Any ideas on what might be the problem. Because I have googled like hell and cannot find anything usefull?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    There is probably some sort of initialization procedure you need to perform in order to do this. The fact that it works when rebooting after a Windows session, but not after rebooting from Linux, tells me that this is the case. Access the manufacturer's web site and see if you can find some specific documentation on using the board, or programming drivers for it, that might be relevant to your needs.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Feb 2012
    Posts
    12
    Yes I tried that. I have a manual describing the register contents of bar1 and the manual for the s5933 controler. But that's all. No info on external rom that the s5933 manual talks about, from where the initial configuration is loaded and they are reluctant to help me because some binary form drivers are available on their page (not for the distribution or kernel that I am supposed to support though)

    Since the same code that worked before reboot stopped working and I have not touched any configuration registers, my question is this: what does linux do when it detects a pci card. I read something about PnP in bios or after in linux?

    Because I am thinking that maby the driver on windows modified the configuration registers or EEPROM and that it was somehow reset after booting into linux?

    I'm just trying to understand this better

    And as for debugging - kernel does not crash or oops, just hangs. I cannot trigger a crash with sysrq, nor with nmi_watchdog

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Have you built your kernel and driver code for debugging? This is fairly new, but definitely available in 2.6.x kernels.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Feb 2012
    Posts
    12
    I have kdump and crash set up. I can force a crash and kdump statrs and I can access the ouput on reboot.

    But with this freeze there is absolutely nothing I can do to debug it. No way to make the kernel nudge. Or is there?

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Try booting with the noapic option. From the CentOS 5 Installation guide section on boot options:
    noapic

    this x86 boot command tells the kernel not to use the APIC chip. It may be helpful for some motherboards with a bad APIC (such as the Abit BP6) or with a buggy bios. systems based on the nvidia nforce3 chipset (such as the Asus SK8N) have been known to hang during IDE detection at boot time, or display other interrupt-delivery issues.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Just Joined!
    Join Date
    Feb 2012
    Posts
    12
    Yes, I already tried that. but it didn't help

  9. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Sorry. Running out of ideas. It always helps, when doing this sort of hardware/software diagnostics, to be there... sigh! Have you tried this in another computer? Preferably one from a different manufacturer w/ different motherboard? Perhaps there is some hardware issue that the Windows driver works around but that Linux doesn't.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #9
    Just Joined!
    Join Date
    Feb 2012
    Posts
    12
    Quote Originally Posted by Rubberman View Post
    Sorry. Running out of ideas.
    yeh, me too.
    I'll keep trying though because this has to work.

    thanks a lot, appreciate the help

  11. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    I'm just sorry that I recently ran out of Flooby Dust! If you don't know the term, it's a technical electrical engineering term for that "I have no clue why, but it works now!" magic elixir!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •