system hang if iopl called before getting pci access structure

From: Jitesh K Patil, Systems Engineer, Wipro Technologies. (jitesh.kpatil_at_wipro.com)
Date: 08/20/03


Date: 19 Aug 2003 21:36:20 -0700

Hi All,
I am trying to read a pci device.
Here is the snippet of the code with the problem in comments...

=============================================================
// Platform..... IA64
// OS........... Redhat Linux Advanced Server 2.1
// Kernel....... 2.4.18
// Build Tool... gcc
// Build Cmd.... gcc -O0 Try.c -lpci

// Get access structure
acc = pci_alloc() ;
pci_init(acc) ;
pci_scan_bus(acc);

// give permissions
// When I tried calling iopl(1) prior to the three lines of code above,
// the system hung, and I had to do a hard reset of the system.
// Why would this happen?
iopl(1) ;

// Get Device structure pointer
dev = pci_get_dev(acc, BUS, DEV, FNC);
=============================================================

Thanx in advance,
Jitesh



Relevant Pages

  • Re: [RFC] PCI: Runtime power management
    ... I don't really think it's necessary to disable the interrupt here. ... * @dev: PCI device affected ... * This enables the device as a runtime wakeup event source, ...
    (Linux-Kernel)
  • [PATCH 6/8 v4] PCI: support the SR-IOV capability
    ... Support Single Root I/O Virtualization capability. ... +struct iov_attr { ... * @dev: the PCI device ... * The major differences between Virtual Function and PCI device are: ...
    (Linux-Kernel)
  • [RFC] PCI: Runtime power management
    ... It currently requires platform support, ... * @dev: PCI device affected ...
    (Linux-Kernel)
  • [RFC][PATCH] device registration cleanups [3/9]
    ... * This adds a single pci device to the global ... * @bus: bus to check for new devices ... +static void pci_free_resources(struct pci_dev *dev) ... * Remove a PCI device from the device lists, ...
    (Linux-Kernel)
  • [PATCH 12/16 v6] PCI: support the SR-IOV capability
    ... Support Single Root I/O Virtualization capability. ... * @dev: the PCI device ... * The major differences between Virtual Function and PCI device are: ... struct pcie_link_state; ...
    (Linux-Kernel)

Loading