All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Shlomo Pongratz <shlomopongratz@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: Cabled PCIE device hotplug/hot-removal
Date: Sun, 29 Jul 2012 14:59:05 +0000	[thread overview]
Message-ID: <20120729145905.GC5945@kroah.com> (raw)
In-Reply-To: <CAHzK-V0idPrHhf-YuC_HAxxxQABExW7mUUWN31f-ZpdnC8W+GA@mail.gmail.com>

On Sun, Jul 29, 2012 at 03:36:09PM +0300, Shlomo Pongratz wrote:
> On Thu, Jul 26, 2012 at 8:09 PM, Greg KH <greg@kroah.com> wrote:
> > On Thu, Jul 26, 2012 at 08:03:09PM +0300, Shlomo Pongratz wrote:
> >> Hi,
> >>
> >> I have a  PCIe device connected with cables to a host (kernel 3.5.0-rc7+).
> >> What are the handler I need to add to a driver in order to catch cable
> >> pull-out / push-in?
> >
> > You shouldn't need anything special, aren't you already getting probe
> > and disconnect callbacks when the device is discovered and removed?
> 
> When the device is loaded the probe is called
> When I "echo 1" to the remove sysfs entry the remove callback is called.
> But when I power down the card no callback is called.

Then I would blame your pci hotplug controller, that is its
responsibility.

> >> The pcisig presentation
> >> "http://www.pcisig.com/developers/main/training_materials/get_document?doc_idôca40ec1721aa7fadd05e2903b0172c36656294"
> >> talks about PERST# detection for cabled PCIe hotplug.
> >>
> >> Does the kernel detect it?
> >>
> >> None of the pci_driver or pci_error_handlers callbacks were called
> >> when using powered down/up the device (electrically).
> >
> > Do you have the pciehp driver loaded properly when this happens?
> 
> My {dot}config includes it into the kernel, i.e.
> CONFIG_HOTPLUG_PCI_PCIE=y

And is it working properly?  Does your hardware support this (i.e. your
BIOS?)

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Shlomo Pongratz <shlomopongratz@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: Cabled PCIE device hotplug/hot-removal
Date: Sun, 29 Jul 2012 07:59:05 -0700	[thread overview]
Message-ID: <20120729145905.GC5945@kroah.com> (raw)
In-Reply-To: <CAHzK-V0idPrHhf-YuC_HAxxxQABExW7mUUWN31f-ZpdnC8W+GA@mail.gmail.com>

On Sun, Jul 29, 2012 at 03:36:09PM +0300, Shlomo Pongratz wrote:
> On Thu, Jul 26, 2012 at 8:09 PM, Greg KH <greg@kroah.com> wrote:
> > On Thu, Jul 26, 2012 at 08:03:09PM +0300, Shlomo Pongratz wrote:
> >> Hi,
> >>
> >> I have a  PCIe device connected with cables to a host (kernel 3.5.0-rc7+).
> >> What are the handler I need to add to a driver in order to catch cable
> >> pull-out / push-in?
> >
> > You shouldn't need anything special, aren't you already getting probe
> > and disconnect callbacks when the device is discovered and removed?
> 
> When the device is loaded the probe is called
> When I "echo 1" to the remove sysfs entry the remove callback is called.
> But when I power down the card no callback is called.

Then I would blame your pci hotplug controller, that is its
responsibility.

> >> The pcisig presentation
> >> "http://www.pcisig.com/developers/main/training_materials/get_document?doc_id=f4ca40ec1721aa7fadd05e2903b0172c36656294"
> >> talks about PERST# detection for cabled PCIe hotplug.
> >>
> >> Does the kernel detect it?
> >>
> >> None of the pci_driver or pci_error_handlers callbacks were called
> >> when using powered down/up the device (electrically).
> >
> > Do you have the pciehp driver loaded properly when this happens?
> 
> My {dot}config includes it into the kernel, i.e.
> CONFIG_HOTPLUG_PCI_PCIE=y

And is it working properly?  Does your hardware support this (i.e. your
BIOS?)

greg k-h

  reply	other threads:[~2012-07-29 14:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 17:03 Cabled PCIE device hotplug/hot-removal Shlomo Pongratz
2012-07-26 17:03 ` Shlomo Pongratz
2012-07-26 17:09 ` Greg KH
2012-07-26 17:09   ` Greg KH
2012-07-29 12:36   ` Shlomo Pongratz
2012-07-29 12:36     ` Shlomo Pongratz
2012-07-29 14:59     ` Greg KH [this message]
2012-07-29 14:59       ` Greg KH
2012-07-31 11:02     ` Kaneshige, Kenji
2012-07-31 11:02       ` Kaneshige, Kenji
2012-07-31 14:59       ` Shlomo Pongratz
2012-07-31 14:59         ` Shlomo Pongratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120729145905.GC5945@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=shlomopongratz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.