http://bugs.winehq.org/show_bug.cgi?id=20012
Summary: Implement HalGetBusDataByOffset for the PCIConfiguration BusDataType Product: Wine Version: 1.1.29 Platform: PC URL: http://rh-software.com/ OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ray@pobox.co.uk
Created an attachment (id=23551) --> (http://bugs.winehq.org/attachment.cgi?id=23551) Scren capture showing example code working
With the fix http://bugs.winehq.org/show_bug.cgi?id=19966 SIV (http://rh-software.com/) no longer crashes when run under Wine, however none of the PCI Bus reporting actually works. As an experiment I wrote some code to read the PCI confutation data from "/sys/bus/pci/devices/0000:bb:dd.f/config" where bb:dd:f are the Bus, Device and Function numbers (the Device and Function are bits 7...3 and 2...0 of the slot number. The attached screen shot you can see I was able to read the data what HalGetBusDataByOffset() should return. I actually did this using the Windows API functions using the following code: if( ( fhl = CreateFile( file_name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL ) ) != INVALID_HANDLE_VALUE ) { if( ReadFile( fhl, data, sizeof( data ) &len, NULL ) ) { ... } CloseHandle( fhl ); but I would expect the Unix/Linux Native API should be used were this to be implemented. I am concerned that different Unix/Linux systems may have different device names, but looking at the lspci source there seems to be a pci library to address this. I could try and work-a-round this within SIV, but as SIV would probably not be able to use the Unix/Linux pci library that solution would be less portable than implementing a solution within HalGetBusDataByOffset() within Wine. For systems where this data could not be returned then the current return of 0 (PCI Bus does not exist) would be made. Note that in the case of the Bus existing and the slot being empty a return of 2 is expected.