From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from baythorne.infradead.org (baythorne.infradead.org [81.187.2.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id E0DA3687A5 for ; Sun, 20 Nov 2005 10:20:04 +1100 (EST) From: David Woodhouse To: airlied@linux.ie, greg@kroah.com Content-Type: text/plain Date: Sat, 19 Nov 2005 23:19:49 +0000 Message-Id: <1132442389.4084.5.camel@baythorne.infradead.org> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org Subject: [PATCH] Fix oops in MGA DRM on root bus. List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , I think that if a PCI bus is a root bus, attached to a host bridge not a PCI->PCI bridge, then bus->self is allowed to be NULL. Certainly that's the case on my Pegasos, and it makes the MGA DRM driver oops... Signed-off-by: David Woodhouse diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c --- a/drivers/char/drm/mga_drv.c +++ b/drivers/char/drm/mga_drv.c @@ -161,7 +161,7 @@ static int mga_driver_device_is_agp(drm_ * device. */ - if ((pdev->device == 0x0525) + if ((pdev->device == 0x0525) && pdev->bus->self && && (pdev->bus->self->vendor == 0x3388) && (pdev->bus->self->device == 0x0021)) { return 0; -- dwmw2