linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yijing Wang <wangyijing@huawei.com>
To: Chris Clayton <chris2553@googlemail.com>
Cc: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>,
	Yijing Wang <wangyijing0307@gmail.com>,
	<linux-media@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>
Subject: Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner
Date: Mon, 28 Jan 2013 10:40:29 +0800	[thread overview]
Message-ID: <5105E51D.2020606@huawei.com> (raw)
In-Reply-To: <5105AFDB.9000200@googlemail.com>

Hi Chris,
   Sorry for the delay reply. It seems like my reply last night was missed.

>From the sysinfo you provide, there are no pcie port devices under /sys/bus/pci_express/devices.
Maybe because there are some problems with _OSC in your laptop, so pcie port driver won't create pcie port device
for hotplug, aer and so on.

Maybe you can add boot parameter "pcie_ports=native" and reboot your laptop.
Then use #modprobe pciehp pciehp_force=1 pciehp_debug=1 to load pciehp modules.
After above actions, enter /sys/bus/pci_express/devices/ directory and /sys/bus/pci/slots/
Some slots and pcie port devices should be there now.

/sys/bus/pci_express/devices:
total 0

/sys/bus/pci_express/drivers:
total 0
drwxr-xr-x 2 root root 0 Jan 27 13:17 pciehp/


On 2013/1/28 6:53, Chris Clayton wrote:
> Thanks again, Martin.
> 
> Firstly, maybe we should remove the linux-media list from the copy list. I imagine this hotplug stuff is just noise to them.
> 
> [snip]
>> Do you have any other express card around to try if it works at all? Try that always after a cold boot.
>>
> Not at the moment, but I ordered at USB3 expresscard yesterday, so I will have one soon.
> 
>> Posting a diff result of the below procedure might help:
>>
>> # lspci -vvvxxx > lspci.before_insertion.txt
>>
>> [plug your card into the slot]
>>
>> # lspci -vvvxxx > lspci.after_insertion.txt
>>
>> [ unplug your card]
>>
>> # lspci -vvvxxx > lspci.after_1st_removal.txt
>>
>> [re-plug your card into the slot]
>>
>> # lspci -vvvxxx > lspci.after_1st_re-insertion.txt
>>
>> [ unplug your card]
>>
>> # lspci -vvvxxx > lspci.after_2nd_removal.txt
>>
> 
> OK, I've been using kernel 3.8.0-rc kernels so far, but given that is still under development, I've switched to 3.7.4, mainly because you are having success with 3.7.x, acpiphp and pcie_aspm=off. I verified the environment as follows:
> 
> [chris:~]$ cat /proc/cmdline
> root=/dev/sda5 pcie_aspm=off ro resume=/dev/sda6
> [chris:~]$ dmesg | grep ASPM
> [    0.000000] PCIe ASPM is disabled
> [    0.348959]  pci0000:00: ACPI _OSC support notification failed, disabling PCIe ASPM
> [chris:~]$ dmesg | grep acpiphp
> [    0.400846] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
> [chris:~]$ dmesg | grep pciehp
> [chris:~]$ uname -a
> Linux laptop 3.7.4 #13 SMP PREEMPT Sun Jan 27 18:39:39 GMT 2013 i686 GNU/Linux
> 
> 
>> Then compare them using diff. These should have no difference:
>>
>> diff lspci.after_insertion.txt lspci.after_1st_re-insertion.txt
>> diff lspci.after_1st_removal.txt lspci.after_2nd_removal.txt
>>
> Correct, there were no differences.
> 
>>
>> These may have only little difference, or none:
>>
>> diff lspci.before_insertion.txt lspci.after_1st_removal.txt
> 
> 263c263
> <               LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
> ---
>  >               LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
> 265c265
> <               LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
> ---
>  >               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> 267c267
> <               LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> ---
>  >               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> 273c273
> <                       Changed: MRL- PresDet- LinkState-
> ---
>  >                       Changed: MRL- PresDet- LinkState+
> 295,296c295,296
> < 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 4c 12 04
> < 50: 03 00 01 10 60 b2 1c 00 08 00 00 00 00 00 00 00
> ---
>  > 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 04
>  > 50: 40 00 11 50 60 b2 1c 00 08 00 00 01 00 00 00 00
> 
>> diff lspci.after_1st_removal.txt lspci.after_2nd_removal.txt
>>
> No difference.
>>
>>
>> Finally, these should confirm whether the PresDet works for you (for me NOT with pciehp but does work with acpiphp).
>> You should see PresDet- to PresDet+ changes in:
>>
> Yes, I do see the PresDet- to PresDet+ changes
> 
>> diff lspci.before_insertion.txt lspci.after_insertion.txt
> 
> 263c263
> <               LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
> ---
>  >               LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
> 265c265
> <               LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
> ---
>  >               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> 267c267
> <               LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> ---
>  >               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> 272,273c272,273
> <               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> <                       Changed: MRL- PresDet- LinkState-
> ---
>  >               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>  >                       Changed: MRL- PresDet- LinkState+
> 295,296c295,296
> < 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 4c 12 04
> < 50: 03 00 01 10 60 b2 1c 00 08 00 00 00 00 00 00 00
> ---
>  > 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 04
>  > 50: 40 00 11 70 60 b2 1c 00 08 00 40 01 00 00 00 00
> 
>> diff lspci.after_1st_removal.txt lspci.after_1st_re-insertion.txt
> 267c267
> <               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> ---
>  >               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> 272c272
> <               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> ---
>  >               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> 296c296
> < 50: 40 00 11 50 60 b2 1c 00 08 00 00 01 00 00 00 00
> ---
>  > 50: 40 00 11 70 60 b2 1c 00 08 00 40 01 00 00 00 00
> 
>>
>> You should see PresDet+ to PresDet- changes in:
> Yes, I see those changes too.
>> diff lspci.after_insertion.txt lspci.after_1st_removal.txt
> 267c267
> <               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> ---
>  >               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> 272c272
> <               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> ---
>  >               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> 296c296
> < 50: 40 00 11 70 60 b2 1c 00 08 00 40 01 00 00 00 00
> ---
>  > 50: 40 00 11 50 60 b2 1c 00 08 00 00 01 00 00 00 00
> 
>> diff lspci.after_1st_re-insertion.txt lspci.after_2nd_removal.txt
> 267c267
> <               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> ---
>  >               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> 272c272
> <               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> ---
>  >               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> 296c296
> < 50: 40 00 11 70 60 b2 1c 00 08 00 40 01 00 00 00 00
> ---
>  > 50: 40 00 11 50 60 b2 1c 00 08 00 00 01 00 00 00 00
>>
>> I did plenty of these with my laptop using 3.3.x and 3.7.1 and the conclusion was
>> that pciehp got broken since some 3.6? (commit 0d52f54e2ef64c189dedc332e680b2eb4a34590a)
>> but I can live on 3.7.x with acpiphp and pcie_aspm=off.
> 
> I could live with that too, but despite my findings being in line with your predictions, hotplug does not work for me.
> 
>> The above test could tell you what
>> works in your case. Of course, you can try separately pciehp and acpiphp. With 3.4
>> series I lived with pciehp and pcie_aspm=force.
> Need sleep now, but tomorrow, I'll build a 3.4 kernel and try pciehp and pcie_aspm=force.
>>
>> Martin
>> BTW: Re-post your dmesg output so that we can see if you those OSC errors
>> (for details see "Re: Dell Vostro 3550: pci_hotplug+acpiphp require 'pcie_aspm=force' on kernel command-line for hotplug to work" thread).
>>
> I've attached a file containing the output from dmesg. I does contain errors related to OSC.
> 


-- 
Thanks!
Yijing


  parent reply	other threads:[~2013-01-28  2:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51016937.1020202@googlemail.com>
     [not found] ` <510189B1.606@fold.natur.cuni.cz>
2013-01-26 20:54   ` 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner Chris Clayton
2013-01-26 21:14     ` Martin Mokrejs
2013-01-27  9:57       ` Chris Clayton
2013-01-27  2:45     ` Yijing Wang
2013-01-27 11:19       ` Chris Clayton
2013-01-27 12:18         ` Yijing Wang
2013-01-27 13:37           ` Chris Clayton
2013-01-27 14:26             ` Martin Mokrejs
2013-01-27 15:34               ` Chris Clayton
2013-01-27 16:41                 ` Martin Mokrejs
2013-01-27 22:53                   ` Chris Clayton
2013-01-27 23:21                     ` Martin Mokrejs
2013-01-28  2:40                     ` Yijing Wang [this message]
2013-01-28 10:12                       ` Chris Clayton
2013-01-28 10:56                         ` Martin Mokrejs
2013-01-28 11:01                           ` Chris Clayton
2013-01-28 11:15                             ` Yijing Wang
2013-01-28 10:58                         ` Yijing Wang
2013-01-28 11:23                         ` Chris Clayton
2013-01-28 12:12                           ` Martin Mokrejs
2013-01-28 12:26                             ` Yijing Wang
2013-01-28 19:11                             ` Chris Clayton
2013-01-28 21:02                               ` Martin Mokrejs
2013-01-31 12:09                                 ` Chris Clayton
2013-01-31 13:05                                   ` Martin Mokrejs
2013-03-06 23:45                                   ` Bjorn Helgaas
2013-03-07 16:28                                     ` Chris Clayton
2013-03-07 17:30                                       ` Bjorn Helgaas
2013-03-07 20:21                                         ` Chris Clayton
2013-03-08  0:39                                           ` Bjorn Helgaas
2013-03-08 10:44                                             ` Chris Clayton
2013-03-08 22:57                                               ` Bjorn Helgaas
2013-03-09  9:20                                                 ` Chris Clayton
2013-03-12 22:20                                                   ` Bjorn Helgaas
2013-03-15 22:48                                                     ` Bjorn Helgaas
2013-03-19 15:46                                                       ` Chris Clayton
2013-04-01 17:28                                                         ` Bjorn Helgaas
2013-07-09  9:35                                                           ` Chris Clayton
2013-07-09 20:19                                                             ` Bjorn Helgaas

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=5105E51D.2020606@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=chris2553@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mmokrejs@fold.natur.cuni.cz \
    --cc=wangyijing0307@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).