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]
Message-ID: <BAY163-W20B75700404320F942FB93FBB00@phx.gbl>
Date:	Wed, 30 Nov 2011 04:00:15 -0800
From:	Anand Kanaginhal <anand_dk@...mail.com>
To:	<greg@...ah.com>,
	linux kernel mailing <linux-kernel@...r.kernel.org>
Subject: RE: PCIe Hotplugging not working




----------------------------------------
> Date: Wed, 30 Nov 2011 07:55:52 +0900
> From: greg@...ah.com
> To: anand_dk@...mail.com
> CC: linux-pci@...r.kernel.org; linux-kernel@...r.kernel.org; linux-hotplug@...r.kernel.org
> Subject: Re: PCIe Hotplugging not working
>
> On Tue, Nov 29, 2011 at 09:50:41AM -0800, Anand Kanaginhal wrote:
>>
>> Resending as earlier sends failed
>
> You can not send html messages to vger.kernel.org mailing lists.
 Thanks for the info, I will keep that in mind.

>>> Why is a pci driver a "char" driver? Do you have a pointer to the
>>> source of this?
>>
>> I am doing an test before putting it in its right place. Another
>> reason is that I am treating it as character device and using IOCTLs
>> for various operations. I have attached the framework code here.
>
> Just a note, but your framework is backwards, you should allocate your
> character device in your probe function, not in the module init
> function.
>
> Also, what type of driver is this, why do you need ioctls for it?

I understand that it is slightly unconventional to do this. However this module is a very thin kernel layer for custom device and custom application, which interact with the system via the IOCTLs.
The module and a dummy device needs to be present to answer apps needs, thats the reason for keeping the device create in mod init. There would be many occasions and of these end point devices appear and disappear when the system is running. There are some other of these requirerments which make it simpler to implement it this way.

>>>> 2. I run depmod and "modules.pcimap" also got updated with my module.
>>>>
>>>> However
>>>> if I unplug and plug in the endpoint, my driver .probe and .remove functions
>>>> are not being invoked. Is there something more to be done at the bus
>>>> level to get the driver to hot plug ?
>>>
>>> You need a pci hotplug controller driver, is that loaded? That is what
>>> is responsible for eventually calling your remove function.
>>
>> How do I figure out if a pci hotplug controller driver is installed?
>
> How do you know that your hardware supports PCI hotplugging at all?
>
> You need a PCI hotplug controller in the system, generally if you have
> one, the driver will be loaded for it, but if you are using a custom
> kernel, you might have to build and install it yourself.

The PEX 8609 device that we are using supports Hot-Plug through a serial Hot-Plug interface brought out through I2C port.
now the only point is whether the controller driver for this is loaded in the system. 

>>>> I have tried various kernel version, Currently I am trying on 2.6.38.12 (UBUNTU flavor).
>>>
>>> We can't help you with distro-specific kernels, please use a kernel.org
>>> kernel and we will be glad to help you out.
>>
>> I have tried with vanilla kernel as well with the same results.
>
> What release did you try?
We had tried 2.6.38.8 from kernel.org and an earlier version if I recall correctly was based on 2.6.18.

> 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