Bug 151644 - Reading Video BIOS using xf86ReadPciBIOS results in system hang - ATI Radeon 7000
Summary: Reading Video BIOS using xf86ReadPciBIOS results in system hang - ATI Radeon ...
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: X.Org (show other bugs)
Version: unspecified
Hardware: i386 SLES 9
: P2 - High : Major (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-16 22:45 UTC by Rod Macdonald
Modified: 2006-03-28 15:59 UTC (History)
6 users (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
XOrg patch used for RHEL4 (1.22 KB, patch)
2006-02-16 22:49 UTC, Rod Macdonald
Details | Diff
XFree86 patch for RHEL3 (1.24 KB, patch)
2006-02-16 22:50 UTC, Rod Macdonald
Details | Diff
xorg-x11-server-6.9.0-21.i586.rpm (3.07 MB, application/octet-stream)
2006-03-02 08:50 UTC, Stefan Dirsch
Details
xorg-x11-server-6.9.0-21.x86_64.rpm (3.36 MB, application/octet-stream)
2006-03-02 08:51 UTC, Stefan Dirsch
Details
additional fix (2.72 KB, patch)
2006-03-02 19:30 UTC, Egbert Eich
Details | Diff
xorg-x11-server-6.9.0-21.i586.rpm (3.07 MB, application/octet-stream)
2006-03-03 04:51 UTC, Stefan Dirsch
Details
xorg-x11-server-6.9.0-21.x86_64.rpm (3.36 MB, application/octet-stream)
2006-03-03 04:57 UTC, Stefan Dirsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rod Macdonald 2006-02-16 22:45:06 UTC
Dell has discovered a condition that will cause a system hang with Red Hat Enterprise Linux.  The symptom is an IERR on the PCI bus.  More details:  https://bugs.freedesktop.org/show_bug.cgi?id=4139

ATI has produced a workaround for this xf86 problem by forcing the driver to access the device directly.  This is by no means ideal but it is mentioned here because it is a viable workaround for servers where more than one graphics device will never be present.  The patch is available for RHEL 4 and will be attached shortly.
Comment 1 Rod Macdonald 2006-02-16 22:49:56 UTC
Created attachment 68925 [details]
XOrg patch used for RHEL4
Comment 2 Rod Macdonald 2006-02-16 22:50:31 UTC
Created attachment 68926 [details]
XFree86 patch for RHEL3
Comment 3 Egbert Eich 2006-02-17 09:14:40 UTC
Please test my patch in   
https://bugs.freedesktop.org/show_bug.cgi?id=4139
I should be able to test it myself also. I believe it is a better mid-term solution than the RH quick hack as this can pop up in other drivers also.
Comment 4 Stefan Dirsch 2006-02-17 09:22:24 UTC
According to previous comment by Egbert.
Comment 5 Rod Macdonald 2006-02-24 22:18:20 UTC
Dell is reporting a Sev 1 problem for SLES10 which has similarities to this one (IERR on reboot).  Would you be able to provide RPMs or other files with Egbert's patch for testing.

They are also reporting an IERR when "test this setting" was run.  Would that call xf86ReadPciBIOS?
Comment 8 Stefan Dirsch 2006-02-26 14:18:43 UTC
Fatal warning (for autobuild):

xf86pciBus.c: In function 'getPciVideoPtr':
xf86pciBus.c:1612: warning: control reaches end of non-void function

[...]
pciVideoPtr
getPciVideoPtr(tag)
{
    int n = 0;

    pciVideoPtr pvp = NULL;
    if (!xf86PciVideoInfo) return 0;
    
    while ((pvp = xf86PciVideoInfo[n++])) {
        if (pciTag(pvp->bus,pvp->device,pvp->func) == tag)
            return pvp;
    }
    if (!pvp) return 0;
}

Egbert, what's the correct fix? Always return 0, i.e.

---  if (!pvp) return 0;
+++  return 0;

since this is checked later by the functions, which call getPciVideoPtr?
Comment 9 Egbert Eich 2006-03-01 19:09:09 UTC
Yeah, this would be the correct fix.
Comment 10 Stefan Dirsch 2006-03-01 20:25:58 UTC
Thanks for checking!
Comment 11 Stefan Dirsch 2006-03-02 08:50:58 UTC
Created attachment 70926 [details]
xorg-x11-server-6.9.0-21.i586.rpm
Comment 12 Stefan Dirsch 2006-03-02 08:51:42 UTC
Created attachment 70927 [details]
xorg-x11-server-6.9.0-21.x86_64.rpm
Comment 13 Stefan Dirsch 2006-03-02 09:03:30 UTC
The RPMs in my previous comments right above include Egbert's patch. Rod, could you give it a try? Thanks.

Looking at Egbert's comment ("One may try something like this. Please note: this is entirely untested.") and the size of the patch itself I'm not really happy about still including this patch for CODE10. IMHO testing on different platforms, i.e. i386, x86_64 and ia64 (at least) would be required.

It might be an option to include only the patch in comment #1 for CODE10.
Egbert, could you check this patch as well (if you didn't yet)? Thanks.
Comment 14 Egbert Eich 2006-03-02 11:00:19 UTC
I'm testing my fix right now.
Comment 15 Egbert Eich 2006-03-02 19:14:49 UTC
---  if (!pvp) return 0;
+++  return 0;

This should actually be 
return NULL;
on the other hand in Pci.c in:

+           if (!(emptybase = getEmptyPciRange(Tag,b_reg))) {
+               xf86Msg(X_ERROR,"Cannot find empty range to map base to\n");
+               return NULL;                             
+           }                                             
return NULL; should be return 0;
Sorry.
Comment 16 Egbert Eich 2006-03-02 19:30:57 UTC
Created attachment 71067 [details]
additional fix

I've tested my patch and I verified that it works. I came across some other not totally unrelated problems which are addressed by this additional patch.
Comment 17 Stefan Dirsch 2006-03-02 22:10:27 UTC
Thanks, Egbert. I'll provide RPMs, which will include the changes of comments #15+16, for testing later. Egbert, on which platforms did you make your tests?
Comment 18 Stefan Dirsch 2006-03-03 04:51:07 UTC
Created attachment 71094 [details]
xorg-x11-server-6.9.0-21.i586.rpm
Comment 19 Stefan Dirsch 2006-03-03 04:57:31 UTC
Created attachment 71095 [details]
xorg-x11-server-6.9.0-21.x86_64.rpm
Comment 20 Stefan Dirsch 2006-03-03 04:58:35 UTC
Rod, could you give it a try? Thanks.
Comment 21 Marc Ruehrschneck 2006-03-14 12:10:55 UTC
Rod, any update from your side on this one?
Comment 22 Rod Macdonald 2006-03-14 16:28:12 UTC
I'll discuss with Dell to see if they can test the rpm.  For the short-term we are including the patch from comment #1 as part of the custom rpm ATI will provide to Dell.  Hopefully this can be replaced with Egbert's patch eventually.
Comment 23 Egbert Eich 2006-03-14 18:17:53 UTC
Yeah, I will prepare the patch for commit as there seems to be a consensus on this. 
Comment 24 Marc Ruehrschneck 2006-03-28 09:42:45 UTC
Egbert, do you plan to have this in CODE10 Beta 9 (this Thursday), or do you still need input from ATI at this point?
Comment 28 Stefan Dirsch 2006-03-28 15:59:31 UTC
Patch applied. Fixed with 10.1 > RC1, i.e. SLES/SLED Beta10.