All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
Cc: linux-pci@vger.kernel.org
Subject: Re: 3.2.11: PCI Express card cannot be re-detected withing cca 60sec timeframe
Date: Wed, 21 Mar 2012 15:29:17 -0700	[thread overview]
Message-ID: <CAE9FiQVnErU-cska4gpinyj-LOup-U+3vsEG2z_-7h6kyREYtw@mail.gmail.com> (raw)
In-Reply-To: <4F6A483D.50702@fold.natur.cuni.cz>

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

On Wed, Mar 21, 2012 at 2:29 PM, Martin Mokrejs
<mmokrejs@fold.natur.cuni.cz> wrote:
> Hi,
>  I am not sure whether this is a bug or feature but I have problems
> getting my USB3.0 PCI express card detected in my Dello Vostro 3550 laptop.
> It appears to me after removal of the card there is about 60s window when
> the PCI INT is still kept (not released). After that time it is released,
> no matter that I for example meanwhile re-plugged the card already into
> the slot.
>
>  After having found this I can confirm that my express card gets detected
> if I insert it in after at least 60 seconds since its previous removal.
>
>  I have attached the logs from my attempts. Would anybody please confirm
> this is the intended behavior? Or is that because USB delay of the PCI INT
> resource after cards removal? Could I be, as a user, informed that I am not
> supposed to re-insert the card in a whatever time window?
>
> Either way, thank you for comments,

can you please post whole boot log ?

wonder if your slot is supporting surprise removal.. if not, attached
patch could remove some
noise about

Mar 20 21:04:17 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card not
present on Slot(7)
Mar 20 21:04:18 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card
present on Slot(7)
Mar 20 21:04:19 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card not
present on Slot(7)
Mar 20 21:04:20 vostro kernel: pciehp 0000:00:1c.7:pcie04: Card
present on Slot(7).

also we have some patches in pci/linux-next, that will power off pcie
link after removal.

so please check if that tree is going to help or wait for kernel 3.4-rc1.

      Yinghai

[-- Attachment #2: pciehp_suprise_present.patch --]
[-- Type: text/x-patch, Size: 1205 bytes --]

Subject: [PATCH] pciehp: Don't enable presence notification while surprise removal is not supported.

If surprise removal is not supported, that event get dropped later.
So there is no point to enable that.

Also Some sick chipset have those bit flip around.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/hotplug/pciehp_hpc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/pci/hotplug/pciehp_hpc.c
===================================================================
--- linux-2.6.orig/drivers/pci/hotplug/pciehp_hpc.c
+++ linux-2.6/drivers/pci/hotplug/pciehp_hpc.c
@@ -808,7 +808,7 @@ int pciehp_get_cur_lnk_width(struct slot
 
 int pcie_enable_notification(struct controller *ctrl)
 {
-	u16 cmd, mask;
+	u16 cmd = 0, mask;
 
 	/*
 	 * TBD: Power fault detected software notification support.
@@ -820,7 +820,8 @@ int pcie_enable_notification(struct cont
 	 * when it is cleared in the interrupt service routine, and
 	 * next power fault detected interrupt was notified again.
 	 */
-	cmd = PCI_EXP_SLTCTL_PDCE;
+	if (HP_SUPR_RM(ctrl))
+		cmd |= PCI_EXP_SLTCTL_PDCE;
 	if (ATTN_BUTTN(ctrl))
 		cmd |= PCI_EXP_SLTCTL_ABPE;
 	if (MRL_SENS(ctrl))

  reply	other threads:[~2012-03-21 22:29 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 21:29 3.2.11: PCI Express card cannot be re-detected withing cca 60sec timeframe Martin Mokrejs
2012-03-21 22:29 ` Yinghai Lu [this message]
     [not found]   ` <4F6A5A53.305@fold.natur.cuni.cz>
2012-03-22  0:08     ` Yinghai Lu
     [not found]       ` <4F8BEB1D.9080903@fold.natur.cuni.cz>
2012-04-16 10:53         ` Martin Mokrejs
2012-04-16 11:05           ` Martin Mokrejs
2012-04-16 18:07         ` Yinghai Lu
2012-04-16 19:39           ` Martin Mokrejs
2012-04-16 19:45             ` Martin Mokrejs
2012-04-16 21:04             ` Yinghai Lu
2012-04-17  8:56               ` Martin Mokrejs
     [not found]           ` <4F8C6E4E.1000205@fold.natur.cuni.cz>
2012-04-16 20:53             ` Yinghai Lu
2012-04-17  1:42               ` Yinghai Lu
2012-04-17  2:48                 ` Yinghai Lu
2012-04-17  7:27                   ` Martin Mokrejs
2012-04-17  8:46                     ` Yinghai Lu
2012-04-17  8:58                       ` Yinghai Lu
2012-04-17  9:34                         ` Martin Mokrejs
2012-04-17 17:07                           ` Yinghai Lu
2012-04-17 19:02                             ` Yinghai Lu
2012-04-18 17:53                               ` Martin Mokrejs
2012-04-18 19:48                                 ` Yinghai Lu
2012-04-18 20:29                                   ` Martin Mokrejs
2012-04-18 20:58                                     ` Yinghai Lu
2012-04-18 22:55                                       ` Martin Mokrejs
2012-04-19  1:57                                         ` Yinghai Lu
2012-04-19  3:16                                           ` Mark Lord
2012-04-19 23:16                                       ` Martin Mokrejs
2012-04-19 21:48                                         ` Yinghai Lu
2012-04-20  2:06                                           ` Yinghai Lu
2012-04-20 11:23                                             ` Martin Mokrejs
2012-04-20 16:01                                               ` Yinghai Lu
2012-04-20 17:25                                                 ` Martin Mokrejs
2012-04-20 17:28                                                   ` Martin Mokrejs
2012-04-20 18:47                                                     ` Yinghai Lu
2012-04-20 23:17                                                       ` Sarah Sharp
2012-04-21  0:09                                                         ` Yinghai Lu
2012-04-21  4:46                                                           ` Yinghai Lu
2012-04-21  9:01                                                             ` Martin Mokrejs
2012-04-21  9:12                                                               ` Martin Mokrejs
2012-04-21 13:25                                                           ` Sarah Sharp
2012-04-21 18:46                                                             ` Yinghai Lu
2012-04-24 20:47                                                               ` Martin Mokrejs
2012-04-24 20:48                                                               ` Martin Mokrejs
2012-04-26 16:08                                                                 ` Yinghai Lu
2012-04-26 22:08                                                                   ` Martin Mokrejs
2012-04-26 22:44                                                                     ` Yinghai Lu
2012-04-26 23:26                                                                       ` Martin Mokrejs
2012-04-27  3:51                                                                         ` Yinghai Lu
2012-04-20 23:50                                                       ` Martin Mokrejs
2012-04-21  0:04                                                         ` Yinghai Lu
2012-05-04 16:16                                                       ` Martin Mokrejs
2012-04-19 17:32                                   ` Martin Mokrejs
2012-04-19 18:13                                     ` Yinghai Lu
2012-05-04 15:58                                   ` Martin Mokrejs
2012-05-04 20:43                                     ` Martin Mokrejs

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=CAE9FiQVnErU-cska4gpinyj-LOup-U+3vsEG2z_-7h6kyREYtw@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mmokrejs@fold.natur.cuni.cz \
    /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.