2012-08-23 00:46:23

by Fengguang Wu

[permalink] [raw]
Subject: Unable to mount NFSROOT: pcie change breaks e1000?

Hi Jiang,

FYI, my NFSROOT mount breaks since this commit:

tree: git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/jiang-pcie-cap
head: 787d5164cb7a057cab67250b63c3cee46e98f1ad
commit: e9b21631b4f419d942de54e0a7cee51f77ac17ac [5/40] PCI/core: Use PCI Express Capability accessors

[ 477.256277] fc50 307200 vdf driver: virtio_blk
[ 477.257945] DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify explicit textual name for "root=" boot option.
[ 477.260925] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[ 477.261877] Pid: 1, comm: swapper/0 Not tainted 3.6.0-rc1+ #2572
[ 477.261877] Call Trace:
[ 477.261877] [<ffffffff819f7082>] panic+0xc9/0x1d2
[ 477.261877] [<ffffffff82214016>] mount_block_root+0x1e6/0x1fd
[ 477.261877] [<ffffffff82214290>] mount_root+0x144/0x14f
[ 477.261877] [<ffffffff82214408>] prepare_namespace+0x16d/0x1a6
[ 477.261877] [<ffffffff82213cfa>] kernel_init+0x1bb/0x1c0
[ 477.261877] [<ffffffff8221356f>] ? do_early_param+0x8c/0x8c
[ 477.261877] [<ffffffff81a110c4>] kernel_thread_helper+0x4/0x10
[ 477.261877] [<ffffffff81a09430>] ? retint_restore_args+0x13/0x13
[ 477.261877] [<ffffffff82213b3f>] ? start_kernel+0x37e/0x37e
[ 477.261877] [<ffffffff81a110c0>] ? gs_change+0x13/0x13
[ 477.261877] Rebooting in 10 seconds..

Thanks,
Fengguang


Attachments:
(No filename) (1.33 kB)
dmesg-kvm-waimea-24612-2012-08-23-05-33-52-3.6.0-rc1+-2572 (52.74 kB)
config-3.6.0-rc1+ (87.44 kB)
Download all attachments

2012-08-23 01:31:53

by Jiang Liu (Gerry)

[permalink] [raw]
Subject: Re: Unable to mount NFSROOT: pcie change breaks e1000?

Hi Fengguang,
Could you please help to verify whether following patch
fixes the issue?
Thanks!

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index f6b491b..fac08f5 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -842,6 +842,9 @@ static int pci_save_pcie_state(struct pci_dev *dev)
struct pci_cap_saved_state *save_state;
u16 *cap;

+ if (!pci_is_pcie(dev))
+ return 0;
+
save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP);
if (!save_state) {
dev_err(&dev->dev, "buffer not found in %s\n", __func__);

On 2012-8-23 8:46, Fengguang Wu wrote:
> buffer not found

2012-08-23 02:34:07

by Fengguang Wu

[permalink] [raw]
Subject: Re: Unable to mount NFSROOT: pcie change breaks e1000?

On Thu, Aug 23, 2012 at 09:31:32AM +0800, Jiang Liu wrote:
> Hi Fengguang,
> Could you please help to verify whether following patch
> fixes the issue?

It works! Thank you for the quick fix!

Tested-by: Fengguang Wu <[email protected]>

>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index f6b491b..fac08f5 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -842,6 +842,9 @@ static int pci_save_pcie_state(struct pci_dev *dev)
> struct pci_cap_saved_state *save_state;
> u16 *cap;
>
> + if (!pci_is_pcie(dev))
> + return 0;
> +
> save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP);
> if (!save_state) {
> dev_err(&dev->dev, "buffer not found in %s\n", __func__);
>
> On 2012-8-23 8:46, Fengguang Wu wrote:
> > buffer not found
>

2012-08-23 15:03:43

by Jiang Liu

[permalink] [raw]
Subject: Re: Unable to mount NFSROOT: pcie change breaks e1000?

Hi Bjorn,
Could you please help to fold this small patch into
"[5/40] PCI/core: Use PCI Express Capability accessors"?
It fixes a bug reported by Fengguang.
Thanks!
Gerry

On 08/23/2012 09:31 AM, Jiang Liu wrote:
> Hi Fengguang,
> Could you please help to verify whether following patch
> fixes the issue?
> Thanks!
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index f6b491b..fac08f5 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -842,6 +842,9 @@ static int pci_save_pcie_state(struct pci_dev *dev)
> struct pci_cap_saved_state *save_state;
> u16 *cap;
>
> + if (!pci_is_pcie(dev))
> + return 0;
> +
> save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP);
> if (!save_state) {
> dev_err(&dev->dev, "buffer not found in %s\n", __func__);
>
> On 2012-8-23 8:46, Fengguang Wu wrote:
>> buffer not found
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2012-08-23 16:12:37

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: Unable to mount NFSROOT: pcie change breaks e1000?

On Thu, Aug 23, 2012 at 9:03 AM, Jiang Liu <[email protected]> wrote:
> Hi Bjorn,
> Could you please help to fold this small patch into
> "[5/40] PCI/core: Use PCI Express Capability accessors"?
> It fixes a bug reported by Fengguang.

Thanks, I folded it in. I looked briefly at whether a similar fix is
needed in pci_restore_pcie_state(). I don't *think* so, but it
wouldn't hurt for you to also double-check and let me know if it does.

Bjorn

> On 08/23/2012 09:31 AM, Jiang Liu wrote:
>> Hi Fengguang,
>> Could you please help to verify whether following patch
>> fixes the issue?
>> Thanks!
>>
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index f6b491b..fac08f5 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -842,6 +842,9 @@ static int pci_save_pcie_state(struct pci_dev *dev)
>> struct pci_cap_saved_state *save_state;
>> u16 *cap;
>>
>> + if (!pci_is_pcie(dev))
>> + return 0;
>> +
>> save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP);
>> if (!save_state) {
>> dev_err(&dev->dev, "buffer not found in %s\n", __func__);
>>
>> On 2012-8-23 8:46, Fengguang Wu wrote:
>>> buffer not found
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>>
>

2012-08-24 14:42:19

by Jiang Liu

[permalink] [raw]
Subject: Re: Unable to mount NFSROOT: pcie change breaks e1000?

On 08/24/2012 12:12 AM, Bjorn Helgaas wrote:
> On Thu, Aug 23, 2012 at 9:03 AM, Jiang Liu <[email protected]> wrote:
>> Hi Bjorn,
>> Could you please help to fold this small patch into
>> "[5/40] PCI/core: Use PCI Express Capability accessors"?
>> It fixes a bug reported by Fengguang.
>
> Thanks, I folded it in. I looked briefly at whether a similar fix is
> needed in pci_restore_pcie_state(). I don't *think* so, but it
> wouldn't hurt for you to also double-check and let me know if it does.

I think it's optional to add a "pci_is_pcie()" check for pci_restore_pcie_state().
pci_find_saved_cap(dev, PCI_CAP_ID_EXP) should return NULL for non-PCIe device.

--Gerry