From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anand Kanaginhal Date: Tue, 29 Nov 2011 17:50:41 +0000 Subject: RE: PCIe Hotplugging not working Message-Id: List-Id: References: ,,<20111129142214.GC14845@kroah.com> In-Reply-To: <20111129142214.GC14845@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: greg@kroah.com Cc: Linux PCI mailing , linux kernel mailing , linux hotplug mailing Resending as earlier sends failed > Date: Tue, 29 Nov 2011 23:22:14 +0900 > From: greg@kroah.com > To: anand_dk@hotmail.com > CC: linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; linux-hotplu= g@vger.kernel.org > Subject: Re: PCIe Hotplugging not working >=20 > On Tue, Nov 29, 2011 at 03:56:12AM -0800, Anand Kanaginhal wrote: > >=20 > >=20 > > I am trying to get PCIe endpoint hot - plugging working > >=20 > > The Set up is such that there is one endpoint (our custom device)=20 connected to PCI=A0 switch PLX 8609 8 port 8 lane switch.=20 > > 1. I have my driver module compiled, copied into /lib/modules/`uname -r= `/kernel/drivers/char/ >=20 > 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=20 is that I am treating it as character device and using IOCTLs for=20 various operations. I have attached the framework code here. > > 2. I run depmod and "modules.pcimap" also got updated with my module.=20 > >=20 > > However > > if I unplug and plug in the endpoint, my driver .probe and .remove fun= ctions > > are not being invoked. Is there something more to be done at the bus=20 > > level to get the driver to hot plug ? >=20 > 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?=20 > > I have tried various kernel version, Currently I am trying on 2.6.38.12= (UBUNTU flavor). >=20 > 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. > greg k-h Thanks Anand