linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec
@ 2019-04-08 14:45 Wesley Sheng
  2019-04-08 14:45 ` [PATCH 1/3] ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function Wesley Sheng
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Wesley Sheng @ 2019-04-08 14:45 UTC (permalink / raw)
  To: kurt.schwemmer, logang, jdmason, dave.jiang, allenbh, linux-pci,
	linux-ntb, linux-kernel
  Cc: wesleyshenggit, wesley.sheng, kelvin.cao

Hi, Everyone,

This patch series remove redundant steps and fix one bug of the 
ntb_hw_switchtec module.

When a re-initialization is caused by a link event, the driver will
re-setup the shared memory windows. But at that time, the shared memory
is still valid, and it's unnecessary to free, reallocate and then
initialize it again. Remove these redundant steps.

In case of NTB crosslink topology, the setting of shared memory window
in the virtual partition doesn't reset on peer's reboot. So skip the
re-setup of shared memory window for that case.

Switchtec does not support setting multiple MWs simultaneously. However,
there's a race condition when a re-initialization is caused by a link 
event, the driver will re-setup the shared memory window asynchronously
and this races with the client setting up its memory windows on the 
link up event. Fix this by ensure do the entire initialization in a work
queue and signal the client once it's done. 

Regard,
Wesley

Joey Zhang (2):
  ntb_hw_switchtec: Remove redundant steps of
    switchtec_ntb_reinit_peer() function
  ntb_hw_switchtec: Fix setup MW with failure bug

Wesley Sheng (1):
  ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window
    for crosslink case

 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 80 +++++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 31 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec
@ 2019-04-22 14:42 Wesley Sheng
  2019-04-22 14:42 ` [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Wesley Sheng
  0 siblings, 1 reply; 7+ messages in thread
From: Wesley Sheng @ 2019-04-22 14:42 UTC (permalink / raw)
  To: kurt.schwemmer, logang, jdmason, dave.jiang, allenbh, linux-pci,
	linux-ntb, linux-kernel
  Cc: wesleyshenggit, wesley.sheng, kelvin.cao

Hi, Everyone,

This patch series remove redundant steps and fix one bug of the 
ntb_hw_switchtec module.

When a re-initialization is caused by a link event, the driver will
re-setup the shared memory windows. But at that time, the shared memory
is still valid, and it's unnecessary to free, reallocate and then
initialize it again. Remove these redundant steps.

In case of NTB crosslink topology, the setting of shared memory window
in the virtual partition doesn't reset on peer's reboot. So skip the
re-setup of shared memory window for that case.

Switchtec does not support setting multiple MWs simultaneously. However,
there's a race condition when a re-initialization is caused by a link 
event, the driver will re-setup the shared memory window asynchronously
and this races with the client setting up its memory windows on the 
link up event. Fix this by ensure do the entire initialization in a work
queue and signal the client once it's done. 

Regard,
Wesley

--

Changed since v1:
  - It's a resend of v1

--


Joey Zhang (2):
  ntb_hw_switchtec: Remove redundant steps of
    switchtec_ntb_reinit_peer() function
  ntb_hw_switchtec: Fix setup MW with failure bug

Wesley Sheng (1):
  ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window
    for crosslink case

 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 80 +++++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 31 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec
@ 2019-06-06  7:09 Kelvin Cao
  2019-06-06  7:09 ` [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Kelvin Cao
  0 siblings, 1 reply; 7+ messages in thread
From: Kelvin Cao @ 2019-06-06  7:09 UTC (permalink / raw)
  To: kurt.schwemmer, logang, jdmason, dave.jiang, allenbh, linux-pci,
	linux-ntb, linux-kernel
  Cc: kelvin.cao, kelvincao

Hi, Everyone,

This patch series remove redundant steps and fix one bug of the 
ntb_hw_switchtec module.

When a re-initialization is caused by a link event, the driver will
re-setup the shared memory windows. But at that time, the shared memory
is still valid, and it's unnecessary to free, reallocate and then
initialize it again. Remove these redundant steps.

In case of NTB crosslink topology, the setting of shared memory window
in the virtual partition doesn't reset on peer's reboot. So skip the
re-setup of shared memory window for that case.

Switchtec does not support setting multiple MWs simultaneously. However,
there's a race condition when a re-initialization is caused by a link 
event, the driver will re-setup the shared memory window asynchronously
and this races with the client setting up its memory windows on the 
link up event. Fix this by ensure do the entire initialization in a work
queue and signal the client once it's done. 

Regard,
Kelvin

--

Changed since v1:
  - It's a second resend of v1

--

Joey Zhang (2):
  ntb_hw_switchtec: Remove redundant steps of
    switchtec_ntb_reinit_peer() function
  ntb_hw_switchtec: Fix setup MW with failure bug

Wesley Sheng (1):
  ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window
    for crosslink case

 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 80 +++++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 31 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-06  7:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 14:45 [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec Wesley Sheng
2019-04-08 14:45 ` [PATCH 1/3] ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function Wesley Sheng
2019-04-08 14:45 ` [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Wesley Sheng
2019-04-08 14:45 ` [PATCH 3/3] ntb_hw_switchtec: Fix setup MW with failure bug Wesley Sheng
2019-04-08 16:00 ` [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec Logan Gunthorpe
2019-04-22 14:42 Wesley Sheng
2019-04-22 14:42 ` [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Wesley Sheng
2019-06-06  7:09 [PATCH 0/3] Redundant steps removal and bug fix of ntb_hw_switchtec Kelvin Cao
2019-06-06  7:09 ` [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Kelvin Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).