[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1269105436.18314.81.camel@localhost>
Date:	Sat, 20 Mar 2010 17:17:15 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Dave Airlie <airlied@...hat.com>,
	David Woodhouse <dwmw2@...radead.org>
Cc:	linux-kernel@...r.kernel.org, 570321@...s.debian.org,
	571003@...s.debian.org, 548090@...s.debian.org
Subject: amd64-agp conflicts with sis-agp
This code in agp_amd64_init() can optionally bind to devices
generically, and it does this without going through the device core:
		/* Look for any AGP bridge */
		dev = NULL;
		err = -ENODEV;
		for_each_pci_dev(dev) {
			if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
				continue;
			/* Only one bridge supported right now */
			if (agp_amd64_probe(dev, NULL) == 0) {
				err = 0;
				break;
			}
		}
This is causing crashes on some systems where sis-agp is already bound
to the device.  It could even race with binding of another driver when
they are both built-in.  I think it should be using something like the
following instead of directly calling agp_amd64_probe():
			down(&dev->dev.sem);
			if (!dev->dev.driver &&
			    driver_probe_device(&drv->driver, &dev->dev) == 0)
				err = 0;
			up(&dev->dev.sem);
			if (err == 0)
				break;
Ben.
-- 
Ben Hutchings
Power corrupts.  Absolute power is kind of neat.
                           - John Lehman, Secretary of the US Navy 1981-1987
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists
 
