lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Jan 2010 13:18:01 -0800
From:	Greg KH <gregkh@...e.de>
To:	Ben Hutchings <bhutchings@...arflare.com>
Cc:	Krzysztof Halasa <khc@...waw.pl>, Tilman Schmidt <tilman@...p.cc>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	LKML <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
	Karsten Keil <isdn@...ux-pingi.de>,
	isdn4linux@...tserv.isdn4linux.de
Subject: Re: Can we remove pci_find_device() yet?

On Tue, Jan 12, 2010 at 08:53:25PM +0000, Ben Hutchings wrote:
> > How do I do that properly, in terms of PCI API?
> 
> One of our older controllers had a similar design error in that the two
> functions would sometimes have to be reset together.  The way we look
> for the second function is:
> 
> 	dev = pci_dev_get(dev1);
> 	while ((dev = pci_get_device(vendor_id, device_id, dev))) {
> 		if (dev->bus == dev1->bus &&
> 		    dev->devfn == dev1->devfn + 1) {
> 			dev2 = dev;
> 			break;
> 		}
> 	}
> 
> I assume this is 'properly' since no-one has told me otherwise.

As of right now, yes, this is the "correct" way to do this.

I need to dig up the "let multiple drivers bind to a single device"
patch set to make this not necessary in the future.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ