[PATCH] mm/IA64: fix build error for numa_clear_node() under IA64

2013-03-20 Thread Yijing Wang
numa_clear_node() function is not implemented under IA64, it will be called in unmap_cpu_on_node() in mm/memory_hotplug.c. This cause build error under IA64, this patch add numa_clear_node() in IA64 to fix this problem. Signed-off-by: Yijing Wang --- arch/ia64/include/asm/numa.h |5

[PATCH] PCI: update device mps when doing pci hotplug

2013-02-04 Thread Yijing Wang
device may not work normally. The reference discussion at http://marc.info/?l=linux-pci&m=135420434508910&w=2 and http://marc.info/?l=linux-pci&m=134815603407842&w=2 Reported-by: Joe Jin Reported-by: Yijing Wang Signed-off-by: Yijing Wang Cc: Jon Ma

Re: [PATCH v3] PCI: Document PCIE BUS MPS parameters

2013-01-28 Thread Yijing Wang
On 2013/1/29 13:00, Jon Mason wrote: > On Fri, Jan 25, 2013 at 2:36 AM, Yijing Wang wrote: >> v0->v1: Update MPS parameters as non-arch and add MRRS >> description into pcie_bus_perf parameter suggested >> by Andrew Murray. >> v1->

[PATCH v4] PCI: Document PCIE BUS MPS parameters

2013-01-29 Thread Yijing Wang
us_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason at commit 5f39e6705 and commit b03e7495a8. Signed-off-by: Yijing Wang --- Documentation/kernel-parameters.txt | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-)

Re: [PATCH 2/2] acpiphp: remove dead code for PCI host bridge hotplug

2013-02-01 Thread Yijing Wang
On 2013/1/31 23:59, Yinghai Lu wrote: > On Thu, Jan 31, 2013 at 7:37 AM, Jiang Liu wrote: >> >> So I think the code in handle_hotplug_event_bridge() to handle P2P >> hot-addition >> is dead. Yijing has helped to test the code by faking ACPI CUSTOM_METHOD, >> and it >> does work as expected. > >

Re: [PATCH 1/2] acpiphp: create companion ACPI devices before creating PCI devices

2013-02-01 Thread Yijing Wang
On 2013/2/2 7:06, Bjorn Helgaas wrote: > On Wed, Jan 30, 2013 at 9:10 AM, Jiang Liu wrote: >> From: Jiang Liu >> >> With commit 4f535093cf8f6da8c "PCI: Put pci_dev in device tree as >> early as possible", companion ACPI devices should be created before >> creating correspoding PCI devices, otherw

Re: [PATCH v2] PCI: Document PCIE BUS MPS parameters

2013-01-25 Thread Yijing Wang
Hi Bjorn, Thanks for your review and comments! Please refer to inlined comment bellow. On 2013/1/25 12:57, Bjorn Helgaas wrote: > [+cc Jon, can you make sure this documentation is accurate?] > >> >> diff --git a/Documentation/kernel-parameters.txt >> b/Documentation/kernel-parameters.txt >> i

[PATCH v3] PCI: Document PCIE BUS MPS parameters

2013-01-25 Thread Yijing Wang
xt. These parameters were introduced by Jon Mason at commit 5f39e6705 and commit b03e7495a8. Signed-off-by: Yijing Wang --- Documentation/kernel-parameters.txt | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentati

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-26 Thread Yijing Wang
于 2013-01-27 4:54, Chris Clayton 写道: > Hi Martin, > > On 01/24/13 19:21, Martin Mokrejs wrote: >> Hi Chris, >>try to include in kernel only acpiphp and omit pciehp. Don't use modules >> but include >> them statically. And try, in addition, check whether "pcie_aspm=off" in >> grub.conf helped

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-27 Thread Yijing Wang
于 2013-01-27 19:19, Chris Clayton 写道: > Hi Yijing > > On 01/27/13 02:45, Yijing Wang wrote: >> 于 2013-01-27 4:54, Chris Clayton 写道: >>> Hi Martin, >>> >>> On 01/24/13 19:21, Martin Mokrejs wrote: >>>> Hi Chris, >>>>

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-27 Thread Yijing Wang
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 devi

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-28 Thread Yijing Wang
>> 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. >> > Sorry, I've tried your suggestion, but the two direc

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-28 Thread Yijing Wang
On 2013/1/28 19:01, Chris Clayton wrote: > [no one screamed, so linux-media ml dropped] > > Hi Martin, > > On 01/28/13 10:56, Martin Mokrejs wrote: >> >> >> Chris Clayton wrote: >>> Hi Yijing, >>> >>> On 01/28/13 02:40, Yijing Wang w

Re: 3.8.0-rc4+ - Oops on removing WinTV-HVR-1400 expresscard TV Tuner

2013-01-28 Thread Yijing Wang
On 2013/1/28 20:12, Martin Mokrejs wrote: > Chris Clayton wrote: >> >> [snip] >> >>> [chris:~]$ cat /proc/cmdline >>> root=/dev/sda5 pciehp_ports=native ro resume=/dev/sda6 >> ^^ >> **typo** >> I've run the test again with pcie_ports=native and the directories

Re: [RESEND BUGFIX PATCH 1/3] PCI/AER: fix pci_ops return NULL when hotplug a pci bus which was doing aer error inject

2012-08-27 Thread Yijing Wang
ide_pci_generic ide_core ata_piix libata mptsas >> mptscsih m >> ptbase scsi_transport_sas scsi_mod thermal thermal_sys hwmon >> > [...] >> >> Signed-off-by: Yijing Wang >> Signed-off-by: Jiang Liu >> --- >> drivers/pci/pcie/aer/aer_inject.c | 21 +++

Re: [RESEND BUGFIX PATCH 1/3] PCI/AER: fix pci_ops return NULL when hotplug a pci bus which was doing aer error inject

2012-08-27 Thread Yijing Wang
h. -- Thanks! Yijing >> On 08/27/2012 09:23 AM, Huang Ying wrote: >>> On Sat, 2012-08-25 at 17:59 +0800, Yijing Wang wrote: >>>> When we inject aer errors to the target pci device by aer_inject module, >>>> the pci_ops of pci >>>> bus

Re: [RFC PATCH v2 01/32] PCI: add pcie_flags_reg into struct pci_dev to cache PCIe capabilities register

2012-07-26 Thread Yijing Wang
于 2012-07-25 23:12, Don Dutile 写道: > resending since i did a reply vs reply-all last time... > > On 07/24/2012 12:31 PM, Jiang Liu wrote: >> From: Yijing Wang >> >> From: Yijing Wang >> >> Since PCI Express Capabilities Register is read only, cache it

[PATCH] irqdomain: add comment for __irq_domain_add

2013-08-28 Thread Yijing Wang
Add comment for __irq_domain_add. Signed-off-by: Yijing Wang --- kernel/irq/irqdomain.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 706724e..fd9d926 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq

[PATCH 1/2] PCI: introduce PCIe Device Serial NUmber Capability support

2013-07-09 Thread Yijing Wang
Serial Number is a good choice if device support. Signed-off-by: Yijing Wang Cc: "Rafael J. Wysocki" Cc: Oliver Neukum Cc: Paul Bolle Cc: Gu Zheng Cc: linux-...@vger.kernel.org --- drivers/pci/pci.c | 33 + drivers/pci/pci.h |1 + drivers/p

[PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-09 Thread Yijing Wang
spend, no action during suspend. We should do nothing in pciehp_resume, but we call pciehp_enable_slot(), so some uncomfortable messages show like above. In this case, we can improve it a little by add a guard if (!list_empty(bus->devices)). Reported-by: Paul Bolle Signed-off-by: Yij

Re: [PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-09 Thread Yijing Wang
>> In this case, we can improve it a little by add a guard >> if (!list_empty(bus->devices)). > > Great! > > I'm currently trying to bisect another problem, but hope to test this > patch (and the preceding patch it apparently needs) in a few days. > Please feel free to prod me if you think testin

Re: [PATCH 1/2] PCI: introduce PCIe Device Serial NUmber Capability support

2013-07-09 Thread Yijing Wang
On 2013/7/9 16:09, Gu Zheng wrote: > On 07/09/2013 03:55 PM, Yijing Wang wrote: > >> Introduce PCIe Ext Capability Device Serial Number support, >> so we can use the unique device serial number to identify >> the physical device. During system suspend, if the PCIe &

Re: [PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-09 Thread Yijing Wang
called pciehp_enable_slot(), > and with your patch we do nothing. I think that seems sensible, but > this part should be split into a separate patch. That way we can keep > the benefit of this change even if we trip over something with the > other changes. OK, I will split this cha

Re: [PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-10 Thread Yijing Wang
>> If the slot support surprise hot remove, this action maybe safe. right? > > If there's no device, config space accesses performed by .remove() > will fail (reads will return -1 data or error; writes will be > dropped). MMIO or I/O port accesses may fail with machine checks or > similar bad thi

Re: [PATCH 1/2] PCI: introduce PCIe Device Serial NUmber Capability support

2013-07-10 Thread Yijing Wang
>> + */ >> +void pci_get_dsn(struct pci_dev *dev, u64 *sn) > > How about: > > u64 pci_device_serial_number(struct pci_dev *dev) > > "get" suggests reference counting, which isn't happening here. And > why pass a pointer to a return value when we can just as easily return > it directly? Yes

Re: [PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-10 Thread Yijing Wang
>> We should do nothing in pciehp_resume, but we call >> pciehp_enable_slot(), so some uncomfortable messages show like above. >> In this case, we can improve it a little by add a guard >> if (!list_empty(bus->devices)). > > Great! > > I'm currently trying to bisect another problem, but hope

[PATCH -v2 3/3] PCI,pciehp: use PCIe DSN to identify device change during suspend

2013-07-11 Thread Yijing Wang
the reasonable way is first remove the old device, then enable the new device. Signed-off-by: Yijing Wang Cc: Paul Bolle Cc: "Rafael J. Wysocki" Cc: Oliver Neukum Cc: Gu Zheng Cc: linux-...@vger.kernel.org --- drivers/pci/hotplug/pciehp_core.c | 45 ++

[PATCH -v2 0/3] Use PCIe DSN to improve pciehp_resume

2013-07-11 Thread Yijing Wang
ard into new patch. Yijing Wang (3): PCI: introduce PCIe Device Serial Number Capability support PCI,pciehp: avoid add a device already exist before suspend during resume PCI,pciehp: use PCIe DSN to identify device change during suspend drivers/pci/hotplug/pciehp_cor

[PATCH -v2 2/3] PCI,pciehp: avoid add a device already exist before suspend during resume

2013-07-11 Thread Yijing Wang
ges like this: pciehp :00:1c.1:pcie04: Device :03:00.0 already exists at :03:00, cannot hot-add pciehp :00:1c.1:pcie04: Cannot add device at :03:00 Signed-off-by: Yijing Wang Cc: Paul Bolle Cc: "Rafael J. Wysocki" Cc: Oliver Neukum Cc: Gu Zhe

[PATCH -v2 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-11 Thread Yijing Wang
Serial Number is a good choice if device support. Signed-off-by: Yijing Wang --- drivers/pci/pci.c | 27 +++ drivers/pci/probe.c |2 ++ include/linux/pci.h |3 +++ 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci

Re: [PATCH -v2 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-11 Thread Yijing Wang
Hi Don, Thanks for your review and comments very much! >> +dev->sn = pci_device_serial_number(dev); >> + > Finally, 'the comment below': > I know you were following Bjorn's suggestion, which I thought > was an improvement, but why not do above assignment in > pci_device_serial_number() ?

Re: [PATCH 2/2] PCI,pciehp: avoid add a device already exist during pciehp_resume

2013-07-11 Thread Yijing Wang
On 2013/7/11 18:19, Paul Bolle wrote: > Yijing, > > On Thu, 2013-07-11 at 11:55 +0800, Yijing Wang wrote: >> Can you provide the lspci -vvv and lspci - info messages ? >> I want to confirm your hardware information which cause your resume error. >> You can get t

Re: [PATCH -v2 0/3] Use PCIe DSN to improve pciehp_resume

2013-07-11 Thread Yijing Wang
On 2013/7/11 22:19, Paul Bolle wrote: > On Thu, 2013-07-11 at 17:43 +0800, Yijing Wang wrote: >> v1->v2: Modify pci_get_dsn to pci_device_serial_number, >> power off slot before remove the old device during resume to avoid >> old .remove() meth

Re: [PATCH -v2 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-11 Thread Yijing Wang
>> > [...] >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 0fd1f15..10d190b 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -342,6 +342,7 @@ struct pci_dev { >> struct list_head msi_list; >> struct kset *msi_kset; >> #endif >> +u64 sn;

Re: [PATCH -v2 2/3] PCI,pciehp: avoid add a device already exist before suspend during resume

2013-07-11 Thread Yijing Wang
>> --- >> drivers/pci/hotplug/pciehp_core.c |9 ++--- >> 1 files changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/pci/hotplug/pciehp_core.c >> b/drivers/pci/hotplug/pciehp_core.c >> index 7d72c5e..1542735 100644 >> --- a/drivers/pci/hotplug/pciehp_core.c >> +++ b/driver

Re: [PATCH -v2 3/3] PCI,pciehp: use PCIe DSN to identify device change during suspend

2013-07-11 Thread Yijing Wang
On 2013/7/11 22:33, Paul Bolle wrote: > On Thu, 2013-07-11 at 17:43 +0800, Yijing Wang wrote: > [...] >> diff --git a/drivers/pci/hotplug/pciehp_core.c >> b/drivers/pci/hotplug/pciehp_core.c >> index 1542735..f2eb214 100644 >> --- a/drivers/pci/hotplug/pciehp_core.

Re: [PATCH -v2 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-11 Thread Yijing Wang
>> } >>> >>> + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DSN); >>> + if (!pos) >>> + return 0; >>> + >>> + pci_read_config_dword(dev, pos + 4,&lo); >>> + pci_read_config_dword(dev, pos + 8,&hi); >>> + sn = ((u64)hi<< 32) | lo; >> >> See comment b

Re: [PATCH -v2 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-11 Thread Yijing Wang
On 2013/7/12 2:18, Don Dutile wrote: > On 07/11/2013 04:09 PM, Bjorn Helgaas wrote: >> On Thu, Jul 11, 2013 at 3:51 AM, Don Dutile wrote: >>> On 07/11/2013 05:43 AM, Yijing Wang wrote: >>>> >>>> Introduce PCIe Ext Capability Device Serial Number sup

[PATCH -v3 3/3] PCI,pciehp: use PCIe DSN to identify device change during suspend

2013-07-12 Thread Yijing Wang
the reasonable way is first remove the old device, then enable the new device. Signed-off-by: Yijing Wang Cc: Paul Bolle Cc: "Rafael J. Wysocki" Cc: Oliver Neukum Cc: Gu Zheng Cc: linux-...@vger.kernel.org --- drivers/pci/hotplug/pciehp_core.c | 45 ++

[PATCH -v3 0/3] Use PCIe DSN to improve pciehp_resume

2013-07-12 Thread Yijing Wang
me to avoid old .remove() method to touch new hardware. Fix other typo and fail check problems. Split the list_empty() guard into new patch. Thanks for Bjorn's review and comments. This series applied to Bjorn's pci-next br

[PATCH -v3 2/3] PCI,pciehp: avoid add a device already exist before suspend during resume

2013-07-12 Thread Yijing Wang
ges like this: pciehp :00:1c.1:pcie04: Device :03:00.0 already exists at :03:00, cannot hot-add pciehp :00:1c.1:pcie04: Cannot add device at :03:00 Tested-by: Paul Bolle Signed-off-by: Yijing Wang Cc: Paul Bolle Cc: "Rafael J. Wysocki" Cc: Oliver N

[PATCH -v3 1/3] PCI: introduce PCIe Device Serial Number Capability support

2013-07-12 Thread Yijing Wang
Serial Number is a good choice if device support. Signed-off-by: Yijing Wang Cc: Paul Bolle Cc: "Rafael J. Wysocki" Cc: Oliver Neukum Cc: Gu Zheng Cc: linux-...@vger.kernel.org --- drivers/pci/pci.c | 30 ++ drivers/pci/pci.h |1 + drivers/p

Re: [PATCH 4/7] x86/pci: use pcie_cap to simplify code

2013-09-04 Thread Yijing Wang
On 2013/9/4 10:59, Bjorn Helgaas wrote: > On Tue, Sep 03, 2013 at 03:35:12PM +0800, Yijing Wang wrote: >> PCI core saves PCIe Cap offset in pcie_cap, >> use pcie_cap to simplify code. >> >> Signed-off-by: Yijing Wang >> --- >> arch/x86/pci/fixup.c |

Re: [PATCH 1/7] scsi/bfa: use pcie_capability_xxx to simplify code

2013-09-05 Thread Yijing Wang
>> @@ -794,10 +793,8 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad) >> break; >> } >> >> -pcie_cap_reg = pci_find_capability(pdev, PCI_CAP_ID_EXP); >> -if (mask != 0x && pcie_cap_reg) { >> -pcie_cap_reg

Re: [PATCH 2/7] scsi/csiostor: use pcie_capability_xxx to simplify code

2013-09-05 Thread Yijing Wang
On 2013/9/4 7:43, Bjorn Helgaas wrote: > On Tue, Sep 03, 2013 at 03:35:10PM +0800, Yijing Wang wrote: >> Pcie_capability_xxx() interfaces were introudced to > > s/introudced/introduced/ Will update it. > >> simplify code to access PCIe Cap config space. And >> b

[PATCH v2 4/6] x86/pci: use pcie_cap to simplify code

2013-09-05 Thread Yijing Wang
and add a dev_info to notify user that the pci_ops was replaced. Signed-off-by: Yijing Wang --- arch/x86/pci/fixup.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index f5809fa..edd7879 100644 --- a/arch/x86/

[PATCH v2 2/6] scsi/csiostor: use pcie_capability_xxx to simplify code

2013-09-05 Thread Yijing Wang
in set_pcie_port_type() when device is enumerated. So we can use pci_is_pcie() instead. Signed-off-by: Yijing Wang Cc: Jiang Liu Cc: "James E.J. Bottomley" Cc: Naresh Kumar Inna Cc: "David S. Miller" Cc: Jesper Juhl Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org ---

[PATCH v2 1/6] scsi/bfa: use pcie_set/get_readrq to simplify code

2013-09-05 Thread Yijing Wang
v1->v2: use pcie_get/set_readrq to simplify code a lot suggestd by Bjorn. Use pcie_get_readrq()/pcie_set_readrq() to simplify code. Signed-off-by: Yijing Wang Cc: Jiang Liu Cc: Anil Gurumurthy Cc: Vijaya Mohan Guvva Cc: "James E.J. Bottomley" Cc: linux-s...@vger.kernel.org Cc:

[PATCH v2 3/6] powerpc/pci: use pci_is_pcie() to simplify code

2013-09-05 Thread Yijing Wang
Use pci_is_pcie() to simplify code. Acked-by: Kumar Gala Reviewed-by: Gavin Shan Signed-off-by: Yijing Wang Cc: Gavin Shan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-...@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org --- arch/powerpc/kernel/eeh.c |3 +-- arch

[PATCH v2 6/6] scsi/qla2xxx: use pcie_is_pcie() to simplify code

2013-09-05 Thread Yijing Wang
Use pci_is_pcie() instead of pci_find_capability to simplify code. Acked-by: Chad Dupuis Signed-off-by: Yijing Wang Cc: Andrew Vasquez Cc: linux-dri...@qlogic.com Cc: "James E.J. Bottomley" Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/scsi/qla2xx

[PATCH v2 5/6] PCI: use pci_is_pcie() to simplify code

2013-09-05 Thread Yijing Wang
Use pci_is_pcie() instead of pci_find_capability to simplify code. Signed-off-by: Yijing Wang --- drivers/pci/probe.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index eeb50bd..0fa9075 100644 --- a/drivers/pci/probe.c

Re: [PATCH v2 1/6] scsi/bfa: use pcie_set/get_readrq to simplify code

2013-09-08 Thread Yijing Wang
On 2013/9/7 6:14, Bjorn Helgaas wrote: > On Thu, Sep 05, 2013 at 03:55:25PM +0800, Yijing Wang wrote: >> v1->v2: use pcie_get/set_readrq to simplify code >> a lot suggestd by Bjorn. >> >> Use pcie_get_readrq()/pcie_set_readrq() to simplify >> code. >> &

[PATCH 0/6] Simplify some mps and mrrs setting related code

2013-09-09 Thread Yijing Wang
ity. Yijing Wang (6): PCI: Export pcie_set_mps() and pcie_get_mps() title/pci: use cached pci_dev->pcie_mpss to simplify code IB/qib: Use pci_is_root_bus() to check whether it is a root bus IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code staging/et131x: Use cached pci_dev->

[PATCH 2/6] title/pci: use cached pci_dev->pcie_mpss to simplify code

2013-09-09 Thread Yijing Wang
The PCI core caches the "PCI-E Max Payload Size Supported" in pci_dev->pcie_mpss, so use that instead of pcie_capability_read_dword(). Signed-off-by: Yijing Wang --- arch/tile/kernel/pci.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/tile/k

[PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code

2013-09-09 Thread Yijing Wang
Refactor qib_tune_pcie_caps() function, use pcie_set_mps() and pcie_get_mps() to simply code. Because pci core caches the "PCI-E Max Payload Size Supported" in pci_dev->pcie_mpss, so use that instead of pcie_capability_read_word(). Remove the unused val2fld() and fld2val(). Signed-o

[PATCH 3/6] IB/qib: Use pci_is_root_bus() to check whether it is a root bus

2013-09-09 Thread Yijing Wang
Use pci_is_root_bus() instead of "if (bus->parent)" statement for better readability. Signed-off-by: Yijing Wang --- drivers/infiniband/hw/qib/qib_pcie.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infi

[PATCH 6/6] radeon: Use pcie_get_readrq() and pcie_set_readrq() to simplify code

2013-09-09 Thread Yijing Wang
Use pcie_get_readrq() and pcie_set_readrq() functions to simplify code. Signed-off-by: Yijing Wang --- drivers/gpu/drm/radeon/evergreen.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon

[PATCH 1/6] PCI: Export pcie_set_mps() and pcie_get_mps()

2013-09-09 Thread Yijing Wang
Export pcie_get_mps() and pcie_set_mps() functions, so driver can use them to simplify code. Signed-off-by: Yijing Wang --- drivers/pci/pci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b821a62..e35f7ec 100644 --- a

[PATCH 5/6] staging/et131x: Use cached pci_dev->pcie_mpss and pcie_set_readrq() to simplif code

2013-09-09 Thread Yijing Wang
The PCI core caches the "PCI-E Max Payload Size Supported" in pci_dev->pcie_mpss, so use that instead of pcie_capability_read_dword(). Also use pcie_set_readrq() instead of pcie_capability_clear_and_set_word() to simplify code. Signed-off-by: Yijing Wang --- drivers/staging/et

Re: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code

2013-09-09 Thread Yijing Wang
On 2013/9/9 22:55, Marciniszyn, Mike wrote: >> Subject: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to >> simplify >> code >> >> Refactor qib_tune_pcie_caps() function, use pcie_set_mps() and >> pcie_get_mps() to simply code. Because pci core caches the "PCI-E Max >> Payload Size Sup

[PATCH] irq/of: Fix comment typo for irq_of_parse_and_map

2013-08-30 Thread Yijing Wang
Fix trivial comment typo for irq_of_parse_and_map(). Signed-off-by: Yijing Wang --- drivers/of/irq.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 1264923..1752988 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -28,7

[PATCH 2/7] scsi/csiostor: use pcie_capability_xxx to simplify code

2013-09-03 Thread Yijing Wang
Pcie_capability_xxx() interfaces were introudced to simplify code to access PCIe Cap config space. And because PCI core saves the PCIe Cap offset in set_pcie_port_type() when device is enumerated. So we can use pci_is_pcie() instead. Signed-off-by: Yijing Wang Cc: Jiang Liu Cc: "Jame

[PATCH 7/7] scsi/qla2xxx: use pcie_is_pcie() to simplify code

2013-09-03 Thread Yijing Wang
Use pci_is_pcie() instead of pci_find_capability to simplify code. Signed-off-by: Yijing Wang Cc: Andrew Vasquez Cc: linux-dri...@qlogic.com Cc: "James E.J. Bottomley" Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/scsi/qla2xxx/qla_mr.c |6 ++---

[PATCH 6/7] PCI: use pci_is_pcie() to simplify code

2013-09-03 Thread Yijing Wang
Use pci_is_pcie() instead of pci_find_capability to simplify code. Signed-off-by: Yijing Wang --- drivers/pci/probe.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index eeb50bd..0fa9075 100644 --- a/drivers/pci/probe.c

[PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code

2013-09-03 Thread Yijing Wang
Use pci_is_pcie() to simplify code. Signed-off-by: Yijing Wang Cc: Gavin Shan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-...@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org --- arch/powerpc/kernel/eeh.c |3 +-- arch/powerpc/sysdev/fsl_pci.c |2 +- 2 files

[PATCH 5/7] ixgbe: use pcie_capability_read_word() to simplify code

2013-09-03 Thread Yijing Wang
use pcie_capability_read_word() to simplify code. Signed-off-by: Yijing Wang Cc: e1000-de...@lists.sourceforge.net Cc: net...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 1/7] scsi/bfa: use pcie_capability_xxx to simplify code

2013-09-03 Thread Yijing Wang
Pcie_capability_xxx() interfaces were introudced to simplify code to access PCIe Cap config space. And because PCI core saves the PCIe Cap offset in set_pcie_port_type() when device is enumerated. So we can use pci_is_pcie() instead. Signed-off-by: Yijing Wang Cc: Jiang Liu Cc: Anil Gurumurthy

[PATCH 4/7] x86/pci: use pcie_cap to simplify code

2013-09-03 Thread Yijing Wang
PCI core saves PCIe Cap offset in pcie_cap, use pcie_cap to simplify code. Signed-off-by: Yijing Wang --- arch/x86/pci/fixup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index f5809fa..ee8330d 100644 --- a/arch/x86/pci

IRQ Affinity Problem

2013-09-26 Thread Yijing Wang
Hi Yinghai, I'm sorry to disturb you. These days I was confused about IRQ Affinity Set and IrqBalance utility. And I found you committed a patch to remove CONFIG_IRQBALANCE by git log. And recommend using IrqBalance instead in commit 8b8e8c1bf7275. So I try to seek help from you. :) I found I

IRQ SMP affinity Problem

2013-09-28 Thread Yijing Wang
Hi Ingo, I found problems about irq affinity in my machine, I don't know whether it's my machine problem or linux can not support irq affinity setting in my machine. Do you have time to help point out that? Thank you very much! According to your Documentation/IRQ-Affiniy.txt I try to test irq

Re: [PATCH] Fix coalescing host bridge windows in arch/x86/pci/acpi.c

2013-09-23 Thread Yijing Wang
On 2013/9/23 14:15, Alexey Neyman wrote: > [Resending due to no response to the original message in a week] > > Hi all, > > I have a board with a BIOS bug that reports the following I/O port regions in > _CRS on one of the host bridges: > > 0x-0x03af // #0 > 0x03e0-0x0cf7 // #1 > 0x03b0-0x0

Re: [PATCH 00/40] PCI, ACPI, x86: pci root bus hotplug support

2012-10-17 Thread Yijing Wang
On 2012/9/20 2:54, Yinghai Lu wrote: Hi Yinghai, I applied this series patches to the latest pci-next, but git am fail occured. When I try to pull from for-pci-root-bus-hotplug branch, I found some patches missed(eg. SCI_EMULATE). Where can I get the newest pci root bus hotplug patches? Than

Re: [PATCH 00/40] PCI, ACPI, x86: pci root bus hotplug support

2012-10-17 Thread Yijing Wang
On 2012/10/18 0:19, Yinghai Lu wrote: > On Wed, Oct 17, 2012 at 12:50 AM, Yijing Wang wrote: >> On 2012/9/20 2:54, Yinghai Lu wrote: >> >> Hi Yinghai, >>I applied this series patches to the latest pci-next, but git am fail >> occured. >> When I tr

Re: 3.8-rc2: pciehp waitqueue hang...

2013-01-04 Thread Yijing Wang
On 2013/1/5 5:50, Bjorn Helgaas wrote: > [+to Yijing, +cc Kenji] > > On Fri, Jan 4, 2013 at 1:01 PM, Bjorn Helgaas wrote: >> On Thu, Jan 3, 2013 at 8:41 AM, Jiang Liu wrote: >>> Hi Daniel, >>> It seems like an issue caused by recursive PCIe HPC. >>> Could you please help to try the patch

Re: [E1000-devel] 82571EB: Detected Hardware Unit Hang

2012-12-18 Thread Yijing Wang
On 2012/12/19 11:04, Joe Jin wrote: > Hi all, > > I backported mps commits and ask customer pass "pci=pcie_bus_peer2pee" to > kernel > to limited MPS to 128 and issue disappeared, sound like this is a BIOS bug. > Hi Joe, I found similar problem when I do pci hotplug, discussion is here:http

[PATCH] mm: fix build warning about kernel_physical_mapping_remove()

2013-04-17 Thread Yijing Wang
If CONFIG_MEMORY_HOTREMOVE is not set, a build warning about "warning: ‘kernel_physical_mapping_remove’ defined but not used" report. Signed-off-by: Yijing Wang Cc: Tang Chen Cc: Wen Congyang --- arch/x86/mm/init_64.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) di

Re: [PATCH] mm: fix build warning about kernel_physical_mapping_remove()

2013-04-17 Thread Yijing Wang
On 2013/4/17 15:22, Wanpeng Li wrote: > On Wed, Apr 17, 2013 at 03:15:58PM +0800, Yijing Wang wrote: >> If CONFIG_MEMORY_HOTREMOVE is not set, a build warning about >> "warning: ‘kernel_physical_mapping_remove’ defined but not used" >> report. >> > &g

[RESEND][PATCH 3/7] net, ipw2x00: remove redundant D0 power state set

2013-06-04 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in ipw2100_pci_init_one(). Signed-off-by: Yijing Wang Cc: Stanislav Yakovlev Cc: "John W. Linville" Cc: net...@vger.kernel.org Cc: linux-wirel...@vger.kernel.org --- drivers/net/wireless/ip

[RESEND][PATCH] net: wireless: iwlegacy: fix build error for il_pm_ops

2013-06-04 Thread Yijing Wang
ules] Error 2 Acked-by: Jingoo Han Signed-off-by: Yijing Wang Cc: Stanislaw Gruszka Cc: "John W. Linville" Cc: net...@vger.kernel.org Cc: linux-wirel...@vger.kernel.org Cc: Jingoo Han --- drivers/net/wireless/iwlegacy/common.h |6 +++--- 1 files changed, 3 insertions(+), 3 dele

[RESEND][PATCH 2/7] usb, dwc3: remove redundant D0 power state set

2013-06-04 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc3_pci_probe(). Signed-off-by: Yijing Wang Cc: Felipe Balbi Cc: linux-o...@vger.kernel.org Cc: linux-...@vger.kernel.org --- drivers/usb/dwc3/dwc3-pci.c |1 - 1 files changed, 0 insertions(

[PATCH 2/9] amd8111e: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init() in init path. So we can use pdev->pm_cap instead of using pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code. Signed-off-by: Yijing Wang Cc: "David S. Miller" Cc:

[PATCH 1/9] Bnx2x: remove redundant D0 power state set

2013-06-18 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in bnx2x_init_dev(). Also remove redundant PM Cap find code, because pci core has been saved the pci device pm cap value. Signed-off-by: Yijing Wang Cc: Eilon Greenstein Cc: net...@vger.kernel.org Cc:

[PATCH 4/9] bnx2: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init() in init path. So we can use pdev->pm_cap instead of using pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code. Signed-off-by: Yijing Wang Cc: Michael Chan Cc: net...@vger.kern

[PATCH 3/9] aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init() in init path. So we can use pdev->pm_cap instead of using pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code. Signed-off-by: Yijing Wang Cc: Paul Mackerras Cc: Jean-Chri

[PATCH 5/9] cciss: rework pci pm related code for simplification

2013-06-18 Thread Yijing Wang
Use pci core pm interface to simplify code. Signed-off-by: Yijing Wang Cc: Mike Miller Cc: iss_storage...@hp.com Cc: linux-kernel@vger.kernel.org --- drivers/block/cciss.c | 16 +++- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/block/cciss.c b/drivers

[PATCH 6/9] hpsa: rework pci pm related code for simplification

2013-06-18 Thread Yijing Wang
Use pci core pm interface to simplify code. Signed-off-by: Yijing Wang Cc: "Stephen M. Cameron" Cc: "James E.J. Bottomley" Cc: iss_storage...@hp.com Cc: linux-s...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/scsi/hpsa.c | 16 +++- 1 files c

[PATCH 7/9] PCI: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci pm cap register offset has been saved in pci_pm_init(), so we can use pdev->pm_cap instead of using pci_find_capability(..) here. Signed-off-by: Yijing Wang Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/pci/pci.c|2 +- drivers/pci/quirks.c |

[PATCH 8/9] scsi/pm8001: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init() in init path. So we can use pdev->pm_cap instead of using pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code. Signed-off-by: Yijing Wang Cc: xjtu...@gmail.com Cc: l

[PATCH 9/9] radeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

2013-06-18 Thread Yijing Wang
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init() in init path. So we can use pdev->pm_cap instead of using pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code. Signed-off-by: Yijing Wang Cc: Benjamin Herrenschmidt Cc

Re: [PATCH] PCI: set correct value for iov device before device

2013-05-29 Thread Yijing Wang
Hi Xudong, This bug has been fixed by Jiang Liu in patch https://patchwork.kernel.org/patch/2613481/ On 2013/5/30 13:45, Xudong Hao wrote: > Since device registering is put into pci_device_add(), it must set value of > Virtual Function device's member before the pci_dev is put to device tree.

[PATCH 1/7] usb, chipidea: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in ci13xxx_pci_probe(). Signed-off-by: Yijing Wang --- drivers/usb/chipidea/ci13xxx_pci.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/ci13xxx_pci.c b/dr

[PATCH 2/7] usb, dwc3: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc3_pci_probe(). Signed-off-by: Yijing Wang --- drivers/usb/dwc3/dwc3-pci.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3

[PATCH 3/7] net, ipw2x00: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in ipw2100_pci_init_one(). Signed-off-by: Yijing Wang --- drivers/net/wireless/ipw2x00/ipw2100.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ipw2x00/ipw2

[PATCH 4/7] net, jme: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in jme_init_one(). Signed-off-by: Yijing Wang --- drivers/net/ethernet/jme.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/

[PATCH 5/7] dwc2: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc2_driver_probe(). Signed-off-by: Yijing Wang --- drivers/staging/dwc2/pci.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging

[PATCH 6/7] qlcnic: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in qlcnic_attach_func(). Signed-off-by: Yijing Wang --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/q

[PATCH 7/7] tulip: remove redundant D0 power state set

2013-05-30 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in tulip_init_one(). Signed-off-by: Yijing Wang --- drivers/net/ethernet/dec/tulip/tulip_core.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/dec/

[PATCH] net: wireless: iwlegacy: fix build error for il_pm_ops

2013-05-30 Thread Yijing Wang
les] Error 2 Signed-off-by: Yijing Wang Cc: Stanislaw Gruszka Cc: "John W. Linville" Cc: net...@vger.kernel.org Cc: linux-wirel...@vger.kernel.org Cc: Jingoo Han --- drivers/net/wireless/iwlegacy/common.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 5/7] dwc2: remove redundant D0 power state set

2013-06-02 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc2_driver_probe(). Acked-by: Paul Zimmerman Signed-off-by: Yijing Wang Cc: Paul Zimmerman Cc: linux-...@vger.kernel.org Cc: de...@driverdev.osuosl.org --- drivers/staging/dwc2/pci.c |2 -- 1

[PATCH 2/7] usb, dwc3: remove redundant D0 power state set

2013-06-02 Thread Yijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc3_pci_probe(). Signed-off-by: Yijing Wang Cc: Felipe Balbi Cc: linux-o...@vger.kernel.org Cc: linux-...@vger.kernel.org --- drivers/usb/dwc3/dwc3-pci.c |1 - 1 files changed, 0 insertions(

  1   2   3   4   5   6   7   8   9   10   >