[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 <wangyij...@huawei.com> CC: John Garry <john.ga...@huawei.com> CC: Johann

[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 <wangyij...@huawei.com> CC: John Garry &l

[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 <wangyij...@huawei.com> CC: John Garry <john.ga...@huawei.com> CC: Johann

[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 <wangyij...@huawei.com> --- 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/i

[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 <wangyij...@huawei.com> CC: John Garry <john.ga...@huawei.com> CC: Johannes Thumshirn <jthumsh...@suse.de> CC: Ewan Milne <emi...@redh

[PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-10 Thread Yijing Wang
ccur. 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 suggested by John

[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
ccur. 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 suggested by John

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

2017-07-10 Thread Yijing Wang
inally, 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 Wang <wangyij

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

2017-07-10 Thread Yijing Wang
inally, 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 Wang CC: Joh

[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 <wangyij...@huawei.com> CC: John Garry <john.ga...@huawei.com> CC: Johannes Thumshirn <jthumsh...@suse.de> CC: Ewan Milne <emi...@redhat.com>

[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. Signed

[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. Signed

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

2017-06-14 Thread Yijing Wang
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/sas_event.

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

2017-06-14 Thread Yijing Wang
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/sas_event.

[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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.

[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. Signed

[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. Signed

[PATCH v2 0/2] Enhance libsas hotplug feature

2017-06-14 Thread Yijing Wang
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/sas_event.

[PATCH v2 0/2] Enhance libsas hotplug feature

2017-06-14 Thread Yijing Wang
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/sas_event.

[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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.

[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-20 Thread Yijing Wang
r 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. Signed-off-by: Yijin

[PATCH 2/2] libsas: Enhance libsas hotplug

2017-05-20 Thread Yijing Wang
r 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. Signed-off-by: Yijing Wang --

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

2017-05-20 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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.

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

2017-05-20 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-20 Thread Yijing Wang
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_expander.

[PATCH 0/2] Enhance libsas hotplug feature

2017-05-20 Thread Yijing Wang
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_expander.

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

2017-01-17 Thread Yijing Wang
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 <wangyij...@huawei.com> --- block/genhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

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

2017-01-17 Thread Yijing Wang
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 deletion(-) diff --git a/block

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

2017-01-10 Thread Yijing Wang
device state before register a new bdi device to avoid register a registered bdi device again. Signed-off-by: Yijing Wang <wangyij...@huawei.com> --- block/genhd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index fcd6d4f..2c2f95e

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

2017-01-10 Thread Yijing Wang
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..2c2f95e 100644 --- a/block/genhd.c +++ b

[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 <wangyij...@huawei.com> --- 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

[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 <wangyij...@huawei.com> --- 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..b

[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 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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.com> Signed-off-by: Qilin Chen <chenqil...@huawei.com>

[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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.com> Signed-off

[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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.com> Signed-off

[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 <wangyij...@huawei.com> Signed-off-by: Yousong He <heyous...@huawei.com> Signed-off-by: Qilin Chen <chenqil...@huawei.com>

[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 <wangyij...@huawei.com> --- 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/closu

[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 <col...@suse.de> Signed-off-by: Yijing Wang <wangyij...@huawei.com> Acked-by: Eric Wheeler <bca...@lists.ewheeler.net> --- drivers/md/bcache/super.c |1 - 1 files change

[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 <col...@suse.de> Signed-off-by: Yijing Wang <wangyij...@huawei.com> --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions

[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 <col...@suse.de> Signed-off-by: Yijing Wang <wangyij...@huawei.com> --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions

[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 <wangyij...@huawei.com> --- 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/closu

[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 <col...@suse.de> Signed-off-by: Yijing Wang <wangyij...@huawei.com> Acked-by: Eric Wheeler <bca...@lists.ewheeler.net> --- drivers/md/bcache/super.c |1 - 1 files change

[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 <col...@suse.de> Signed-off-by: Yijing Wang <wangyij...@huawei.com> Acked-by: Eric Wheeler <bca...@lists.ewheeler.net> --- drivers/md/bcache/super.c |1 - 1 files change

[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 <wangyij...@huawei.com> --- 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/closu

[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 <wangyij...@huawei.com> --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/d

[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 |2

[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

[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-by: Yijing

[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

[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 wangyij...@huawei.com --- arch/alpha/include/asm/pci.h |2 -- arch/ia64/include/asm/pci.h |1 - arch/microblaze/include/asm

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

2015-07-20 Thread Yijing Wang
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 PCI: Remove

[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 wangyij...@huawei.com --- drivers/pci/pci.h |9 + include/linux/pci.h |6 -- 2 files changed, 9 insertions(+), 6 deletions

[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-by: Yijing

[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 wangyij...@huawei.com --- drivers/pci/pci.c |5 - drivers/pci/pci.h |9 - drivers/pci/probe.c | 11

[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 wangyij...@huawei.com --- drivers/pci/pci.c | 24 +++- drivers/pci/pci.h |1 + 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c

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

2015-07-20 Thread Yijing Wang
* 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 wangyij...@huawei.com --- arch/ia64/sn/kernel/io_acpi_init.c |6

[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 wangyij...@huawei.com --- arch

[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 wangyij...@huawei.com --- arch/powerpc/include/asm

[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 gregory.clem...@free-electrons.com #mvebu part Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/alpha/kernel/pci.c|4 ++-- arch

[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 wangyij...@huawei.com --- drivers/pci/pci.c |4 ++-- include/linux/pci.h |3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers

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 item

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

2015-07-14 Thread Yijing Wang
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 wangyij...@huawei.com Hi Yinghai, does this patch depend on the previous items in this patchset ? Could you provide another version

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 wangyij...@huawei.com 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_align/alt_size. Tested

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

2015-07-09 Thread Yijing Wang
nirq, 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 > > arch/mips/pci/msi-octeon.c

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

2015-07-09 Thread Yijing Wang
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 wangyij...@huawei.com arch/mips/pci/msi-octeon.c |2 +- arch/powerpc/platforms/cell/axon_msi.c |6 +-- arch/powerpc/platforms/pasemi/msi.c|4

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

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

  1   2   3   4   5   6   7   8   9   10   >