[PATCH v3 3/7] libsas: Use new workqueue to run sas event

2017-07-10 Thread Yijing Wang
, it may interrupt by other sas event works, like PHYE_LOSS_OF_SIGNAL. Finally, we would found lots unexpected errors. This patch is preparation of execute libsas sas event in sync. Signed-off-by: Yijing Wang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas

[PATCH v3 7/7] libsas: release disco mutex during waiting in sas_ex_discover_end_dev

2017-07-10 Thread Yijing Wang
revalidata domain happen during ata error handler, it should be safe to release disco mutex when sync probe, because no new revalidate domain event would be process until the sync return, and the current sas revalidate domain finish. Signed-off-by: Yijing Wang CC: John Garry CC: Johannes Thumshirn CC

[PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event

2017-07-10 Thread Yijing Wang
Sometimes, we want sync libsas probe or destruct in sas discovery work, like when libsas revalidate domain. We need to split probe and destruct work from the scsi host workqueue. Signed-off-by: Yijing Wang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas

[PATCH v3 2/7] libsas: remove unused port_gone_completion

2017-07-10 Thread Yijing Wang
No one uses the port_gone_completion in struct asd_sas_port, clean it out. Signed-off-by: Yijing Wang --- include/scsi/libsas.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index c41328d..628f48b 100644 --- a/include/scsi/libsas.h +++ b

[PATCH v3 6/7] libsas: add wait-complete support to sync discovery event

2017-07-10 Thread Yijing Wang
Introduce a sync flag to tag discovery event whether need to sync execute, per-event wait-complete ensure sync. Signed-off-by: Yijing Wang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams --- drivers/scsi/libsas/sas_discover.c

[PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-10 Thread Yijing Wang
es would occur. The first patch fix the sas events lost, and the second one introudce wait-complete to fix the hotplug order issues. v2->v3: some code improvements suggested by Johannes and John, split v2 patch 2 into several small pathes. v1->v2: some code improvements suggest

[PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-10 Thread Yijing Wang
ly, libsas delete the related sas port and sas devices, but LLDD driver expect libsas add the sas port and devices(last sas event). This patch and use static sas event work pool to appease this issue, since it's static work pool, it won't make memory exhaust. Signed-off-by: Yijing Wan

[PATCH v3 4/7] libsas: add sas event wait-complete support

2017-07-10 Thread Yijing Wang
Introduce wait-complete for libsas sas event processing, execute sas port create/destruct in sync. Signed-off-by: Yijing Wang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams --- drivers/scsi/libsas/sas_discover.c | 41

[Resend][PATCH v2 2/2] libsas: Enhance libsas hotplug

2017-06-14 Thread Yijing Wang
plete we use former wait-complete to achieve a sas event atomic process and use latter to make a sas discovery sync. 4. remove disco_mutex in sas_revalidate_domain, since now sas_revalidate_domain sync the destruct discovery event execution, it's no need to lock disco mutex there. S

[Resend][PATCH v2 0/2] Enhance libsas hotplug feature

2017-06-14 Thread Yijing Wang
tplug order issues. v1->v2: some code improvements suggested by John Garry Yijing Wang (2): libsas: Don't process sas events in static works libsas: Enhance libsas hotplug drivers/scsi/libsas/sas_discover.c | 58 +--- drivers/scsi/libsas/

[Resend][PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-14 Thread Yijing Wang
sas devices, but LLDD driver expect libsas add the sas port and devices(last sas event). This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsa

[PATCH v2 2/2] libsas: Enhance libsas hotplug

2017-06-14 Thread Yijing Wang
plete we use former wait-complete to achieve a sas event atomic process and use latter to make a sas discovery sync. 4. remove disco_mutex in sas_revalidate_domain, since now sas_revalidate_domain sync the destruct discovery event execution, it's no need to lock disco mutex there. S

[PATCH v2 0/2] Enhance libsas hotplug feature

2017-06-14 Thread Yijing Wang
tplug order issues. v1->v2: some code improvements suggested by John Garry Yijing Wang (2): libsas: Don't process sas events in static works libsas: Enhance libsas hotplug drivers/scsi/libsas/sas_discover.c | 58 +--- drivers/scsi/libsas/

[PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-14 Thread Yijing Wang
sas devices, but LLDD driver expect libsas add the sas port and devices(last sas event). This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsa

[PATCH 2/2] libsas: Enhance libsas hotplug

2017-05-19 Thread Yijing Wang
ait-complete to achieve a sas event atomic process and use latter to make a sas discovery sync. 4. remove disco_mutex in sas_revalidate_domain, since now sas_revalidate_domain sync the destruct discovery event execution, it's no need to lock disco mutex there. Signed-off-by: Yijing Wan

[PATCH 1/2] libsas: Don't process sas events in static works

2017-05-19 Thread Yijing Wang
sas devices, but LLDD driver expect libsas add the sas port and devices(last sas event). This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsa

[PATCH 0/2] Enhance libsas hotplug feature

2017-05-19 Thread Yijing Wang
tplug order issues. Yijing Wang (2): libsas: Don't process sas events in static works libsas: Enhance libsas hotplug drivers/scsi/libsas/sas_discover.c | 58 +--- drivers/scsi/libsas/sas_event.c| 90 ++ drivers/scsi/libsas/sas

[PATCH v2] block: Don't register a registered bdi device

2017-01-17 Thread Yijing Wang
device again. -v2: remove the spin lock protect, because the sd_probe caller should guarantee the scsi_device valid, and the bdi device is unregister when scsi_device/block queue removed. Signed-off-by: Yijing Wang --- block/genhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 d

[PATCH] block: Don't register a registered bdi device

2017-01-10 Thread Yijing Wang
n kernel. This patch check the bdi device state before register a new bdi device to avoid register a registered bdi device again. Signed-off-by: Yijing Wang --- block/genhd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index fcd6d4f..2c2f9

[PATCH 1/2] bcache: Remove redundant set_capacity

2016-11-24 Thread Yijing Wang
set_capacity() has been called in bcache_device_init(), remove the redundant one. Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 849ad44..b638a16 100644 --- a/drivers/md

[PATCH 2/2] bcache: remove unused parameter

2016-11-24 Thread Yijing Wang
Parameter bio is no longer used, clean it. Signed-off-by: Yijing Wang --- drivers/md/bcache/request.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 40ffe5e..bf6e432 100644 --- a/drivers/md/bcache

[RFC][PATCH v2 0/2] Improve libsas hotplug

2016-09-26 Thread Yijing Wang
v1-v2: Fix memory allocation issue in interrupt context. Yijing Wang (2): libsas: Alloc dynamic work to avoid missing sas events libsas: Fix hotplug issue in libsas drivers/scsi/libsas/sas_ata.c | 34 ++--- drivers/scsi/libsas/sas_discover.c | 245

[RFC][PATCH v2 1/2] libsas: Alloc dynamic work to avoid missing sas events

2016-09-26 Thread Yijing Wang
d them in kernel. This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_event.c| 61 ++ driver

[RFC][PATCH v2 2/2] libsas: Fix hotplug issue in libsas

2016-09-26 Thread Yijing Wang
ing, the old sas port resource may have not completely deleted, the new sas port resource of the same name will be created, and this will cause calltrace about sysfs device node. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_at

[RFC][PATCH v1 2/2] libsas: Fix hotplug issue in libsas

2016-09-12 Thread Yijing Wang
ing, the old sas port resource may have not completely deleted, the new sas port resource of the same name will be created, and this will cause calltrace about sysfs device node. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_at

[RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing sas events

2016-09-12 Thread Yijing Wang
d them in kernel. This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_event.c| 61 --- driver

[PATCH v3 2/3] bcache: update document info

2016-07-03 Thread Yijing Wang
There is no return in continue_at(), update the documentation. Signed-off-by: Yijing Wang --- drivers/md/bcache/closure.c |2 +- drivers/md/bcache/closure.h |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[PATCH v3 3/3] bcache: Remove redundant block_size assignment

2016-07-03 Thread Yijing Wang
We have assigned sb->block_size before the switch, so remove the redundant one. Reviewed-by: Coly Li Signed-off-by: Yijing Wang Acked-by: Eric Wheeler --- drivers/md/bcache/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH v3 1/3] bcache: Remove redundant parameter for cache_alloc()

2016-07-03 Thread Yijing Wang
Cache_sb is not used in cache_alloc, and we have copied sb info to cache->sb already, remove it. Reviewed-by: Coly Li Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH v2 1/3] bcache: Remove redundant parameter for cache_alloc()

2016-07-01 Thread Yijing Wang
Cache_sb is not used in cache_alloc, and we have copied sb info to cache->sb already, remove it. Reviewed-by: Coly Li Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH v2 2/3] bcache: update document info

2016-07-01 Thread Yijing Wang
There is no return in continue_at(), update the documentation. Signed-off-by: Yijing Wang --- drivers/md/bcache/closure.c |2 +- drivers/md/bcache/closure.h |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[PATCH v2 3/3] bcache: Remove redundant block_size assignment

2016-07-01 Thread Yijing Wang
We have assigned sb->block_size before the switch, so remove the redundant one. Reviewed-by: Coly Li Signed-off-by: Yijing Wang Acked-by: Eric Wheeler --- drivers/md/bcache/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[RESEND PATCH 3/3] bcache: Remove redundant block_size assignment

2016-06-21 Thread Yijing Wang
We have assigned sb->block_size before the switch, so remove the redundant one. Reviewed-by: Coly Li Signed-off-by: Yijing Wang Acked-by: Eric Wheeler --- drivers/md/bcache/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[RESEND PATCH 2/3] bcache: update document info

2016-06-21 Thread Yijing Wang
There is no return in continue_at(), update the documentation. Signed-off-by: Yijing Wang --- drivers/md/bcache/closure.c |2 +- drivers/md/bcache/closure.h |3 --- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[RESEND PATCH 1/3] bcache: Remove redundant parameter for cache_alloc()

2016-06-21 Thread Yijing Wang
Cache_sb is not used in cache_alloc, and we have copied sb info to cache->sb already, remove it. Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c in

[PATCH part3 v12 05/10] powerpc/PCI: Rename pcibios_root_bridge_prepare() to pcibios_root_bus_prepare()

2015-07-20 Thread Yijing Wang
Pcibios_root_bridge_prepare() in powerpc set root bus speed, it's not the preparation for pci host bridge. For better separation of host bridge and root bus creation, It's need to rename it to another weak function. Signed-off-by: Yijing Wang --- arch/powerpc/include/asm/machdep.h

[PATCH part3 v12 01/10] PCI: Save domain in pci_host_bridge

2015-07-20 Thread Yijing Wang
, so introduce pci_create_root_bus_generic and pci_scan_root_bus_generic() which simply assign domain number to -1. Tested-by: Gregory CLEMENT #mvebu part Signed-off-by: Yijing Wang --- arch/alpha/kernel/pci.c|4 ++-- arch/alpha/kernel/sys_nautilus.c |2 +- arch/arm/kernel

[PATCH part3 v12 00/10] Cleanup platform pci_domain_nr()

2015-07-20 Thread Yijing Wang
wrap function pci_create_root_bus_generic() and pci_create_root_bus_generic() for arm/arm64 which enable CONFIG_PCI_DOMAINS_GENERIC. Rebased this series based 4.2-rc1 Yijing Wang (10): PCI: Save domain in pci_host_bridge PCI: Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h

[PATCH part3 v12 08/10] PCI: Introduce common pci_domain_nr() and remove platform specific code

2015-07-20 Thread Yijing Wang
Now pci_host_bridge holds the domain number, we could introduce common pci_domain_nr(), and remove platform specific code. Signed-off-by: Yijing Wang --- arch/alpha/include/asm/pci.h |2 -- arch/ia64/include/asm/pci.h |1 - arch/microblaze/include/asm/pci.h |2 -- arch

[PATCH part3 v12 09/10] PCI: Remove pci_bus_assign_domain_nr()

2015-07-20 Thread Yijing Wang
Now we save the domain number in pci_host_bridge, we could remove pci_bus_assign_domain_nr() and clean the domain member in pci_bus. Signed-off-by: Yijing Wang --- drivers/pci/pci.c |5 - drivers/pci/pci.h |9 - drivers/pci/probe.c | 11 +++ include/linux/pci.h

[PATCH part3 v12 04/10] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-07-20 Thread Yijing Wang
Introduce pci_host_assign_domain_nr() to assign domain number for pci_host_bridge. Signed-off-by: Yijing Wang --- drivers/pci/pci.c | 24 +++- drivers/pci/pci.h |1 + 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c

[PATCH part3 v12 02/10] PCI: Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h

2015-07-20 Thread Yijing Wang
pci_bus_assign_domain_nr() is only called in probe.c, Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h. Signed-off-by: Yijing Wang --- drivers/pci/pci.h |9 + include/linux/pci.h |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a

[PATCH part3 v12 07/10] PCI: Create pci host bridge prior to root bus

2015-07-20 Thread Yijing Wang
Pci_host_bridge hold the domain number, we need to assign domain number prior to root bus creation, because root bus need to know the domain number to check whether it's alreay exist. Also it's preparation for separating pci_host_bridge creation from pci_create_root_bus(). Signed-off-

[PATCH part3 v12 03/10] PCI: Remove declaration for pci_get_new_domain_nr()

2015-07-20 Thread Yijing Wang
pci_get_new_domain_nr() is only used in drivers/pci/pci.c, remove the declaration in include/linux/pci.h. Signed-off-by: Yijing Wang --- drivers/pci/pci.c |4 ++-- include/linux/pci.h |3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers

[PATCH part3 v12 10/10] IA64/PCI: Fix build warning found by kbuild test

2015-07-20 Thread Yijing Wang
ci_bus * have opaque sysdata, so IA64 specific pci_domain_nr() could get the pci_controller and return the exact domain number, but now we use common pci_domain_nr() functions, so we should fix this warning. Signed-off-by: Yijing Wang --- arch/ia64/sn/kernel/io_acpi_init.c |6 +++--- arch/i

[PATCH part3 v12 06/10] PCI: Make pci_host_bridge hold sysdata in drvdata

2015-07-20 Thread Yijing Wang
Now platform specific sysdata is saved in pci_bus, and pcibios_root_bridge_prepare() need to know the sysdata. Later, we would move pcibios_root_bridge_prepare() prior to root bus creation, so we need to make pci_host_bridge hold sysdata. Signed-off-by: Yijing Wang --- arch/ia64/pci/pci.c

Re: [PATCH 17/36] PCI: Add support for more than two alt_size under same bridge

2015-07-14 Thread Yijing Wang
On 2015/7/15 13:08, Yinghai Lu wrote: > On Tue, Jul 14, 2015 at 8:07 PM, Yijing Wang wrote: >> On 2015/7/7 7:39, Yinghai Lu wrote: >>> Need to increase size to make sure it could fit all alt entries. >>> >>> So at last, we use 8M/17M as parent bridge alt_ali

Re: [PATCH 17/36] PCI: Add support for more than two alt_size under same bridge

2015-07-14 Thread Yijing Wang
_size: 8M/17M. > > At same time, child bridges must align/size: 4M/12M, 2M/6M. > and prarent bridge must align/size: 4M/20M. > > So at last, we use 8M/17M as parent bridge alt_align/alt_size. Tested-by: Yijing Wang Hi Yinghai, does this patch depend on the previous items in thi

Re: [RFC Patch V1 00/12] Reorganize struct msi_desc to prepare for support of generic MSI

2015-07-09 Thread Yijing Wang
struct msi_desc > genirq, PCI: Reorginize struct msi_desc to prepare for support of > generic MSI > genirq, PCI: Move alloc_msi_entry() from PCI MSI code into generic > MSI code Great, it loos good to me, for patch 1,6,8,9,10,11,12, Reviewed-by: Yijing Wang > >

Re: e1000e pci_disable_link_state_locked() issues

2015-05-22 Thread Yijing Wang
On 2015/5/21 3:47, Bjorn Helgaas wrote: > I think we have some issues with the e1000e usage of > pci_disable_link_state_locked(), which Yinghai added with 9f728f53dd70 > ("PCI/e1000e: Add and use pci_disable_link_state_locked()"). > > That fixed an AER deadlock in the following path, where pci_bus

Re: e1000e pci_disable_link_state_locked() issues

2015-05-22 Thread Yijing Wang
On 2015/5/21 3:47, Bjorn Helgaas wrote: > I think we have some issues with the e1000e usage of > pci_disable_link_state_locked(), which Yinghai added with 9f728f53dd70 > ("PCI/e1000e: Add and use pci_disable_link_state_locked()"). > > That fixed an AER deadlock in the following path, where pci_bus

Re: [PATCH v10 00/29] Refine PCI scan interfaces and make generic pci host bridge

2015-04-26 Thread Yijing Wang
root_bus_speed() > sparc/PCI: Use pci_scan_host_bridge() for simplicity > parisc/PCI: Use pci_scan_root_bus() for simplicity > PCI/mvebu: Use pci_common_init_dev() to simplify code > PCI/tegra: Remove redundant tegra_pcie_scan_bus() > PCI/designware: Use pci_scan_

[PATCH v10 19/29] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-21 Thread Yijing Wang
Now we could use pci_scan_host_bridge() to scan pci buses, provide powerpc specific pci_host_bridge_ops. Tested-by: Daniel Axtens Signed-off-by: Yijing Wang Reviewed-by: Daniel Axtens CC: Benjamin Herrenschmidt CC: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci-common.c | 62

[PATCH v10 06/29] PCI: Alloc busn resource dynamically for pci_scan_bus()

2015-04-21 Thread Yijing Wang
resource instead of default global one, and add a flag to pci_host_bridge, so when pci_host_bridge go to free, the dynamic busn resource could also be freed properly. Signed-off-by: Yijing Wang --- drivers/pci/probe.c | 27 +++ include/linux/pci.h |1 + 2 files changed

[PATCH v10 12/29] powerpc/PCI: Rename pcibios_root_bridge_prepare() to pcibios_set_root_bus_speed()

2015-04-21 Thread Yijing Wang
d add pci_host_bridge_ops to do the same thing in later patch. Signed-off-by: Yijing Wang --- arch/powerpc/include/asm/machdep.h |2 +- arch/powerpc/kernel/pci-common.c |8 +++- arch/powerpc/platforms/pseries/pci.c |8 arch/powerpc/platforms/pseries/pser

[PATCH v10 04/29] PCI: Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h

2015-04-21 Thread Yijing Wang
pci_bus_assign_domain_nr() is only called in probe.c, Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h. Signed-off-by: Yijing Wang --- drivers/pci/pci.h |9 + include/linux/pci.h |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a

[PATCH v10 03/29] PCI: Save domain in pci_host_bridge

2015-04-21 Thread Yijing Wang
, so we pass meaningless -1 as the domain number. Tested-by: Gregory CLEMENT #mvebu part Signed-off-by: Yijing Wang --- arch/alpha/kernel/pci.c|4 ++-- arch/alpha/kernel/sys_nautilus.c |2 +- arch/arm/kernel/bios32.c |2 +- arch/arm/mach-dove/pcie.c

[PATCH v10 20/29] PCI: Remove pcibios_root_bridge_prepare() and pcibos_set_root_bus_speed()

2015-04-21 Thread Yijing Wang
Now no one use weak pcibios_root_bridge_prepare() and pcibios_set_root_bus_speed, we could clean up them. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c |4 drivers/pci/probe.c | 18 +- include/linux/pci.h |2 -- 3 files changed, 1 insertions

[PATCH v10 25/29] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-04-21 Thread Yijing Wang
Use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang CC: Mohit Kumar CC: Jingoo Han --- drivers/pci/host/pcie-designware.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie

[PATCH v10 07/29] PCI: Allocate busn resource for pci_scan_root_bus()

2015-04-21 Thread Yijing Wang
add it to pci_host_bridge, in the later patch, it would be easy to check whether new pci_host_bridge busn resource conflict. Signed-off-by: Yijing Wang --- drivers/pci/probe.c | 43 ++- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/drivers/pci

[PATCH v10 05/29] PCI: Remove argument bus for pci_create_root_bus()

2015-04-21 Thread Yijing Wang
All pci_create_root_bus() callers have supplied busn resource, the argument bus is equal to busn_res->start, clean up the redundant argument bus for simplicity. Signed-off-by: Yijing Wang --- arch/ia64/pci/pci.c|3 +-- arch/powerpc/kernel/pci-common.c |2 +- arch/sp

[PATCH v10 09/29] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-04-21 Thread Yijing Wang
This patch separate pci_host_bridge creation out of pci_create_root_bus(), and try to make a generic pci_host_bridge, then we could make it hold host bridge specific operations like pcibios_root_bridge_prepare(). The changes are transparent to platform host bridge drivers. Signed-off-by: Yijing

[PATCH v10 08/29] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-04-21 Thread Yijing Wang
Introduce pci_host_assign_domain_nr() to assign domain number for pci_host_bridge. In the later patch, we would assign domain in pci_create_host_bridge, clean up the pci_bus_assign_domain_nr() and move this function into drivers/pci/host-bridge.c. Signed-off-by: Yijing Wang --- drivers/pci

[PATCH v10 00/29] Refine PCI scan interfaces and make generic pci host bridge

2015-04-21 Thread Yijing Wang
t and io/mem/bus resources but no platform specific pci_host_bridge operations 3. pci_scan_host_bridge() for callers provide its own parent and io/mem/bus resources Arnd Bergmann (1): xen/PCI: Don't use deprecated function pci_scan_bus_parented() Yijing Wang (28): PCI: Remov

[PATCH v10 13/29] PCI: Move pcibios_root_bridge_prepare() to pci_create_host_bridge()

2015-04-21 Thread Yijing Wang
Move pcibios_root_bridge_prepare() to pci_create_host_bridge(). Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 16 +--- drivers/pci/probe.c |3 --- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host

[PATCH v10 15/29] PCI: Introduce new scan function pci_scan_host_bridge()

2015-04-21 Thread Yijing Wang
Introduce new scan function pci_scan_host_bridge() to support host bridge drivers that need to provide platform own pci_host_bridge_ops. Signed-off-by: Yijing Wang --- drivers/pci/probe.c | 23 +++ include/linux/pci.h |3 +++ 2 files changed, 26 insertions(+), 0

[PATCH v10 16/29] PCI: Introduce pci_bus_child_max_busnr()

2015-04-21 Thread Yijing Wang
complete. But pci scan functions won't return the actual max bus number. So we could use pci_bus_child_max_busnr() to find that. Signed-off-by: Fengguang Wu Signed-off-by: Yijing Wang --- drivers/pci/hotplug/acpiphp_glue.c | 29 + drivers/pci/pci.c

[PATCH v10 10/29] PCI: Introduce pci_host_bridge_list to manage host bridges

2015-04-21 Thread Yijing Wang
Introduce pci_host_bridge_list to manage pci host bridges in system, this make us have the ability to check whether the new host would conflict with existing one. Then we could remove bus alreay exist check in __pci_create_root_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c

[PATCH v10 21/29] sparc/PCI: Use pci_scan_host_bridge() for simplicity

2015-04-21 Thread Yijing Wang
Now we could use pci_scan_host_bridge() to scan pci buses, provide sparc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang CC: "David S. Miller" CC: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c | 28 ++-- 1 files changed, 22 insertions(+), 6

[PATCH v10 02/29] PCI: Remove deprecated pci_scan_bus_parented()

2015-04-21 Thread Yijing Wang
No one uses pci_scan_bus_parented() any more, remove it. Signed-off-by: Yijing Wang --- drivers/pci/probe.c | 19 --- include/linux/pci.h |2 -- 2 files changed, 0 insertions(+), 21 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 6675a7a..7d6a61c

[PATCH v10 14/29] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-04-21 Thread Yijing Wang
: Yijing Wang --- drivers/pci/host-bridge.c |9 - drivers/pci/pci.h |3 ++- drivers/pci/probe.c |8 ++-- include/linux/pci.h |9 + 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host

[PATCH v10 11/29] PCI: Save sysdata in pci_host_bridge drvdata

2015-04-21 Thread Yijing Wang
Save platform specific sysdata in pci_host_bridge drvdata, host bridge specific operation need to access it before the pci bus creation. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c |3 ++- drivers/pci/pci.h |2 +- drivers/pci/probe.c | 13 ++--- 3

[PATCH v10 18/29] ia64/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-21 Thread Yijing Wang
From: Yijing Wang Signed-off-by: Yijing Wang CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org --- arch/ia64/pci/pci.c | 34 +++--- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 84f1eb8

[PATCH v10 26/29] PCI/xgene: Use pci_scan_root_bus() instead of pci_create_root_bus()

2015-04-21 Thread Yijing Wang
Use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang CC: Tanmay Inamdar --- drivers/pci/host/pci-xgene.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci

[PATCH v10 24/29] PCI/tegra: Remove redundant tegra_pcie_scan_bus()

2015-04-21 Thread Yijing Wang
Now pci_scan_root_bus() is almost similar to pci_create_root_bus() + pci_scan_child_bus(). So we could use common pci_scan_root_bus() in pci_common_init_dev() to scan pci busses. tegra_pcie_scan_bus() is redundant, remove it. Tested-by: Thierry Reding Signed-off-by: Yijing Wang Acked-by

[PATCH v10 28/29] PCI: Remove platform specific pci_domain_nr()

2015-04-21 Thread Yijing Wang
Now pci_host_bridge holds the domain number, so we could eliminate all platform specific pci_domain_nr(). Signed-off-by: Yijing Wang --- arch/alpha/include/asm/pci.h |2 -- arch/ia64/include/asm/pci.h |1 - arch/microblaze/pci/pci-common.c | 11 --- arch/mips/include

[PATCH v10 22/29] parisc/PCI: Use pci_scan_root_bus() for simplicity

2015-04-21 Thread Yijing Wang
From: Yijing Wang Now pci_bus_add_devices() has been ripped out from pci_scan_root_bus(), we could use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang CC: "James E.J. Bottomley" CC: linux-par...@vger.

[PATCH v10 17/29] x86/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-21 Thread Yijing Wang
Signed-off-by: Yijing Wang CC: Thomas Gleixner CC: x...@kernel.org --- arch/x86/pci/acpi.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d6aab1c..ec16499 100644 --- a/arch/x86/pci

[PATCH v10 27/29] PCI: Rename __pci_create_root_bus() to pci_create_root_bus()

2015-04-21 Thread Yijing Wang
Now no one use pci_create_root_bus(), we could remove it and rename __pci_create_root_bus() to pci_create_root_bus(). Signed-off-by: wangyij...@huawei.com --- drivers/pci/probe.c | 57 +++--- include/linux/pci.h |3 -- 2 files changed, 17 insertio

[PATCH v10 29/29] PCI: Remove pci_bus_assign_domain_nr()

2015-04-21 Thread Yijing Wang
Now we save the domain number in pci_host_bridge, we could remove pci_bus_assign_domain_nr() and clean the domain member in pci_bus. Also move pci_host_assign_domain_nr() to drivers/pci/host-bridge.c for simplicity. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 68

[PATCH v10 23/29] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-21 Thread Yijing Wang
Mvebu_pcie_scan_bus() is not necessary, we could use pci_common_init_dev() instead of pci_common_init(), and pass the device pointer as the parent. Then pci_scan_root_bus() will be called to scan the pci busses. Tested-by: Gregory CLEMENT Signed-off-by: Yijing Wang Reviewed-by: Gregory CLEMENT

[PATCH v10 01/29] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-04-21 Thread Yijing Wang
From: Arnd Bergmann Use pci_scan_root_bus() instead of deprecated function pci_scan_bus_parented(). Signed-off-by: Arnd Bergmann Signed-off-by: Yijing Wang CC: Konrad Rzeszutek Wilk CC: xen-de...@lists.xenproject.org --- drivers/pci/xen-pcifront.c | 16 +--- 1 files changed

Re: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource

2015-04-08 Thread Yijing Wang
On 2015/4/8 6:42, Bjorn Helgaas wrote: > On Fri, Apr 03, 2015 at 05:25:42PM +0800, Yijing Wang wrote: >> From: Yijing Wang >> >> Sometimes, the bus resource start number is not equal to >> root bus number. For example, in pci_scan_bus(), we always >> add the def

Re: [PATCH v9 03/30] PCI: Save domain in pci_host_bridge

2015-04-08 Thread Yijing Wang
On 2015/4/8 16:09, Gregory CLEMENT wrote: > Hi Yijing, > > On 03/04/2015 11:25, Yijing Wang wrote: >> Save domain in pci_host_bridge, so we could get domain >> from pci_host_bridge, and at the end of series, we could >> clean up the arch specific pci_domain_nr(). Fo

Re: [PATCH v9 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-08 Thread Yijing Wang
nd Armada 38x > SoCs, and I didn't saw any regression. So you can add my: > > Reviewed-by: Gregory CLEMENT > Tested-by: Gregory CLEMENT Great, thanks very much! Thanks! Yijing. > > > >> Signed-off-by: Yijing Wang >> CC: Thomas Petazzoni >> CC: Jason

Re: [PATCH v9 07/30] PCI: Add default bus resource in pci_host_bridge

2015-04-08 Thread Yijing Wang
>> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 1542df8..f189dfb 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -404,6 +404,8 @@ struct pci_host_bridge { >> int domain; >> struct device dev; >> struct pci_bus *bus;/* root bus */

Re: [PATCH v9 06/30] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-04-07 Thread Yijing Wang
>> +/* >> + * If support CONFIG_PCI_DOMAINS_GENERIC, use >> + * pci_host_assign_domain_nr() to update domain >> + * number. >> + */ >> +host->domain = domain; >> +pci_host_assign_domain_nr(host); > > I think it's a bit confusing that there's another "host->domain =" > a

Re: [PATCH v9 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-06 Thread Yijing Wang
hanks very much for your test and review. Thanks! Yijing. > > > On Fri, 2015-04-03 at 17:25 +0800, Yijing Wang wrote: >> Now we could use pci_scan_host_bridge() to scan >> pci buses, provide powerpc specific pci_host_bridge_ops. >> >> Sign

[PATCH v9 12/30] powerpc/PCI: Rename pcibios_root_bridge_prepare() to pcibios_set_root_bus_speed()

2015-04-03 Thread Yijing Wang
d add pci_host_bridge_ops to do the same thing in later patch. Signed-off-by: Yijing Wang --- arch/powerpc/include/asm/machdep.h |2 +- arch/powerpc/kernel/pci-common.c |8 +++- arch/powerpc/platforms/pseries/pci.c |8 arch/powerpc/platforms/pseries/pser

[PATCH v9 11/30] PCI: Save sysdata in pci_host_bridge drvdata

2015-04-03 Thread Yijing Wang
Save platform specific sysdata in pci_host_bridge drvdata, host bridge specific operation need to access it before the pci bus creation. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c |3 ++- drivers/pci/pci.h |2 +- drivers/pci/probe.c | 20

[PATCH v9 20/30] PCI: Remove pcibios_root_bridge_prepare() and pcibos_set_root_bus_speed()

2015-04-03 Thread Yijing Wang
Now no one use weak pcibios_root_bridge_prepare() and pcibios_set_root_bus_speed, we could clean up them. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c |4 drivers/pci/probe.c | 18 +- include/linux/pci.h |2 -- 3 files changed, 1 insertions

[PATCH v9 14/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-04-03 Thread Yijing Wang
: Yijing Wang --- drivers/pci/host-bridge.c |9 - drivers/pci/pci.h |5 +++-- drivers/pci/probe.c | 11 --- include/linux/pci.h |9 + 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host

[PATCH v9 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-03 Thread Yijing Wang
Mvebu_pcie_scan_bus() is not necessary, we could use pci_common_init_dev() instead of pci_common_init(), and pass the device pointer as the parent. Then pci_scan_root_bus() will be called to scan the pci busses. Signed-off-by: Yijing Wang CC: Thomas Petazzoni CC: Jason Cooper --- drivers/pci

[PATCH v9 28/30] PCI: Remove platform specific pci_domain_nr()

2015-04-03 Thread Yijing Wang
Now pci_host_bridge holds the domain number, so we could eliminate all platform specific pci_domain_nr(). Signed-off-by: Yijing Wang --- arch/alpha/include/asm/pci.h |2 -- arch/ia64/include/asm/pci.h |1 - arch/microblaze/pci/pci-common.c | 11 --- arch/mips/include

[PATCH v9 17/30] x86/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-03 Thread Yijing Wang
Signed-off-by: Yijing Wang CC: Thomas Gleixner CC: x...@kernel.org --- arch/x86/pci/acpi.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d2655d5..877acaf 100644 --- a/arch/x86/pci

[PATCH v9 01/30] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-04-03 Thread Yijing Wang
From: Arnd Bergmann Use pci_scan_root_bus() instead of deprecated function pci_scan_bus_parented(). Signed-off-by: Arnd Bergmann Signed-off-by: Yijing Wang CC: Konrad Rzeszutek Wilk CC: xen-de...@lists.xenproject.org --- drivers/pci/xen-pcifront.c | 16 +--- 1 files changed

[PATCH v9 09/30] PCI: Introduce pci_host_first_busnr() function

2015-04-03 Thread Yijing Wang
Use it to get the first bus number of the bus resource. Signed-off-by: Yijing Wang --- drivers/pci/pci.h | 11 +++ drivers/pci/probe.c | 19 ++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 8526790

[PATCH v9 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-03 Thread Yijing Wang
Now we could use pci_scan_host_bridge() to scan pci buses, provide powerpc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang CC: Benjamin Herrenschmidt CC: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci-common.c | 62 +++-- 1 files changed

[PATCH v9 04/30] PCI: Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h

2015-04-03 Thread Yijing Wang
pci_bus_assign_domain_nr() is only called in probe.c, Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h. Signed-off-by: Yijing Wang --- drivers/pci/pci.h |9 + include/linux/pci.h |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a

[PATCH v9 22/30] parisc/PCI: Use pci_scan_root_bus() for simplicity

2015-04-03 Thread Yijing Wang
From: Yijing Wang Now pci_bus_add_devices() has been ripped out from pci_scan_root_bus(), we could use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang CC: "James E.J. Bottomley" CC: linux-par...@vger.

  1   2   3   4   5   6   7   8   9   10   >