Bug 178768

Summary: PCI device driver fails to access devices
Product: Red Hat Enterprise Linux 4 Reporter: Nobuaki Matsuura <nmatsuur>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-15 21:15:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nobuaki Matsuura 2006-01-24 05:59:41 UTC
Description of problem:
We are using an original PCI device driver in order to control 2 same PCI 
devices(co-processor type) mounted on a PCI board. The driver distinguishes 
these devices by minor number, #0 and #1. When the driver is accessing them 
alternately, it may attempts to write in a wrong device, e.g. it writes into 
#1's congfigration space despite of "#0" is set in the PCI device struct 
pci_dev. The driver controls IO space by using pci_write_config_word().

Version-Release number of selected component (if applicable):
kernel-smp-2.6.9-11.ELsmp (same for kernel-smp-2.6.9-22.ELsmp)

How reproducible:
Sometimes, but not always.

Steps to Reproduce:
1.User of the driver is 1 process only.
2.For bottom half handler, tasklet is used.
3.In the spin_lock_irqsave() state.
4.PCI config command registor(04h) is frequently switched(enable/disable).
  
Actual results:
The driver accesses to unintended devices, i.e. #1 instead of #0, vice varsa.
It occurs even after hundreds of msec interval.
Error frequency is unstable from 1/50 to 1/5000.
The frequency decreases for 1CPU (HyperThreading ON) compared to 2CPU.

Expected results:
The driver accesses devices according to the argument of pci_dev.

Additional info:
This phenomenon doesn't occur when the driver accesses just one device.
This phenomenon isn't observed in a case of 1CPU and HyperThreading OFF (using 
kernel-2.6.9-22.EL.i686.rpm).
This phenomenon has never happened for kernel 2.4.

Are there any information for similar case?
Are there any possible settings or means to avoid this situation?
Thanks for your attention.

Comment 1 Jason Baron 2006-08-15 21:15:52 UTC
We don't debug custom pci drivers. Perhaps you can contact GPS. thanks.


Global Professional Services
or call +1-866-273-3428 x45606


http://www.redhat.com/services/