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:	Thu, 19 Jul 2012 18:58:38 -0500
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	Ian Abbott <abbotti@....co.uk>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Ian Abbott <ian.abbott@....co.uk>
Subject: RE: [PATCH 15/90] staging: comedi: adv_pci1723: move
 comedi_pci_enable() into the attach

On Thursday, July 19, 2012 4:35 PM, gregkh wrote:
> On Thu, Jul 19, 2012 at 06:31:23PM -0500, H Hartley Sweeten wrote:
>> If the comedi pci drivers have the "attach_pci" callback defined, the
>> PCI api does correctly probe the driver. The comedi_pci_auto_config()
>> then passes the pci_dev directly to the driver and the search of the
>> PCI space for the device is not required.
>> 
>> If the "attach_pci" callback is not defined, the comedi_pci_auto_config()
>> then falls back to passing the bus/slot information to the driver and uses
>> the "attach" callback. In this case we could probably fast-track the search
>> by using pci_get_slot() instead of doing the for_each_pci_dev() loop.
>> 
>> I think the problem is the COMEDI_DEVCONFIG ioctl. The userspace
>> utility 'comedi_config' uses that ioctl to link a device node to a
>> comedi driver. That utility allows passing the bus/slot information
>> but it's not required. This means we have to search the PCI space
>> for the pci_dev that matches the driver.
>
> The ioctl shouldn't be needed anymore for PCI or USB devices, as the
> kernel handles the matching of the driver to the device.  Even if it
> didn't, there are other more "standard" ways that you can bind devices
> to drivers (through sysfs.)

I think it's still needed for some of the devices that require external
firmware. The comedi_config utility allows the user to remove the
driver binding and then reattach to it while passing the firmware blob
into the driver.

Not saying any of this is valid... And yes, there probably is a more
"standard" way to do this. I just need a hint of what that is... ;-)

> So, I'd really recommend ripping all of this logic out for PCI drivers
> as odds are, it's not used, and probably doesn't really work.

Ian Abbott is probably the best source to answer that.

> For old ISA cards, it makes sense, but the odds that anyone uses any ISA
> devices is pretty slim.

I lot of the ISA drivers actually work for PC/104 variations of the boards. I
think they are still used somewhat. But yes, the pure ISA cards probably
are not very common. It's almost impossible to actually find a PC that has
ISA slots.

Regards,
Hartley

--
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