Skip to content

target: Updates for HW target mode

Nicholas A. Bellinger linux-scsi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target: Fix tfo->write_pending() fabric callback orderingdrivers/target/target_core_transport.c+16 -150 replies
2/2target: Convert se_nacl->nacl_sess_lock to use spin_lock_irq()drivers/target/target_core_fabric_lib.c drivers/target/target_core_pr.c drivers/target/target_core_transport.c+19 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] target: Updates for HW target mode

From: Nicholas Bellinger <[email protected]>

Greetings folks,

This short series fixes two issues found in target core code during recent HW target mode module development and validation. These two patches have been merged into lio-core-2.6.git/lio-4.0 and master, and now allow generic HW target mode to function using TCM code for the upcoming v4.0.0-rc6 release.

Patch #1 involves changing transport_generic_write_pending() to make sure that transport_generic_handle_data() will never have to sleep waiting for the struct target_core_fabric_ops->write_pending() callback to complete.

Patch #2 changes locking access to the struct se_nacl->nacl_sess_lock to disable interrupts using spin_lock_irq(), and handles the special case for target_core_pr.c: core_scsi3_pri_read_full_status() so that transport_deregister_session_configfs() can be called directly from interrupt context during HW target mode NEXUS -> TCM session shutdown and reset.

So far these have been tested using FC HW target mode via PCIe device-passthrough from within KVM guest on .37-rc3 code. This FC HW target module code will be posted seperately to linux-scsi for review.

Thanks,

Nicholas Bellinger (2):
target: Fix tfo->write_pending() fabric callback ordering
target: Convert se_nacl->nacl_sess_lock to use spin_lock_irq()

 drivers/target/target_core_fabric_lib.c |    8 +++---
 drivers/target/target_core_pr.c         |   11 ++++++++
 drivers/target/target_core_transport.c  |   39 ++++++++++++++++---------------
 3 files changed, 35 insertions(+), 23 deletions(-)