linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: John Youn <John.Youn@synopsys.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	linux-usb@vger.kernel.org
Subject: [PATCH v2 02/25] target: Add common TMR enum
Date: Mon, 18 Jul 2022 18:26:16 -0700	[thread overview]
Message-ID: <27f3e2ced002bd9b738f4245f7e9b674b3bb3436.1658192351.git.Thinh.Nguyen@synopsys.com> (raw)
In-Reply-To: <cover.1658192351.git.Thinh.Nguyen@synopsys.com>

Add the following common TMR enum:
* TMR_I_T_NEXUS_RESET
* TMR_QUERY_TASK
* TMR_QUERY_TASK_SET
* TMR_QUERY_ASYNC_EVENT

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
 Changes in v2:
 - Changed enum numbering to continue from 8, 9, 10, ...

 drivers/target/target_core_transport.c | 10 ++++++++++
 include/target/target_core_base.h      |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 7838dc20f713..92cb4a4a9ab9 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3094,6 +3094,10 @@ static const char *target_tmf_name(enum tcm_tmreq_table tmf)
 	case TMR_TARGET_WARM_RESET:	return "TARGET_WARM_RESET";
 	case TMR_TARGET_COLD_RESET:	return "TARGET_COLD_RESET";
 	case TMR_LUN_RESET_PRO:		return "LUN_RESET_PRO";
+	case TMR_I_T_NEXUS_RESET:	return "I_T_NEXUS_RESET";
+	case TMR_QUERY_TASK:		return "QUERY_TASK";
+	case TMR_QUERY_TASK_SET:	return "QUERY_TASK_SET";
+	case TMR_QUERY_ASYNC_EVENT:	return "QUERY_ASYNC_EVENT";
 	case TMR_UNKNOWN:		break;
 	}
 	return "(?)";
@@ -3542,6 +3546,12 @@ static void target_tmr_work(struct work_struct *work)
 	case TMR_TARGET_COLD_RESET:
 		tmr->response = TMR_FUNCTION_REJECTED;
 		break;
+	case TMR_I_T_NEXUS_RESET:
+	case TMR_QUERY_TASK:
+	case TMR_QUERY_TASK_SET:
+	case TMR_QUERY_ASYNC_EVENT:
+		tmr->response = TMR_FUNCTION_REJECTED;
+		break;
 	default:
 		pr_err("Unknown TMR function: 0x%02x.\n",
 				tmr->function);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 8e3da143a1ce..b3e3125fac97 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -211,6 +211,10 @@ enum tcm_tmreq_table {
 	TMR_LUN_RESET		= 5,
 	TMR_TARGET_WARM_RESET	= 6,
 	TMR_TARGET_COLD_RESET	= 7,
+	TMR_I_T_NEXUS_RESET	= 8,
+	TMR_QUERY_TASK		= 9,
+	TMR_QUERY_TASK_SET	= 10,
+	TMR_QUERY_ASYNC_EVENT	= 11,
 	TMR_LUN_RESET_PRO	= 0x80,
 	TMR_UNKNOWN		= 0xff,
 };
-- 
2.28.0


  parent reply	other threads:[~2022-07-19  2:02 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  1:26 [PATCH v2 00/25] usb: gadget: f_tcm: Enhance UASP driver Thinh Nguyen
2022-07-19  1:26 ` [PATCH v2 01/25] target: Add overlapped response to tmrsp_table Thinh Nguyen
2022-07-19  1:26 ` Thinh Nguyen [this message]
2022-07-19  1:26 ` [PATCH v2 03/25] usb: gadget: f_tcm: Increase stream count Thinh Nguyen
2022-07-19  9:02   ` Sergei Shtylyov
2022-07-19  1:26 ` [PATCH v2 04/25] usb: gadget: f_tcm: Increase bMaxBurst Thinh Nguyen
2022-07-19  1:26 ` [PATCH v2 05/25] usb: gadget: f_tcm: Don't set static stream_id Thinh Nguyen
2022-07-19  1:26 ` [PATCH v2 06/25] usb: gadget: f_tcm: Allocate matching number of commands to streams Thinh Nguyen
2022-07-19  1:26 ` [PATCH v2 07/25] usb: gadget: f_tcm: Limit number of sessions Thinh Nguyen
2022-07-19  1:26 ` [PATCH v2 08/25] usb: gadget: f_tcm: Handle multiple commands in parallel Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 09/25] usb: gadget: f_tcm: Use extra number of commands Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 10/25] usb: gadget: f_tcm: Return ATA cmd direction Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 11/25] usb: gadget: f_tcm: Execute command on write completion Thinh Nguyen
2022-08-26  7:00   ` Sebastian Andrzej Siewior
2022-08-26 18:37     ` Thinh Nguyen
2022-08-29 19:49       ` Sebastian Andrzej Siewior
2022-08-29 21:47         ` Thinh Nguyen
2022-08-30 10:03           ` Sebastian Andrzej Siewior
2022-07-19  1:27 ` [PATCH v2 12/25] usb: gadget: f_tcm: Minor cleanup redundant code Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 13/25] usb: gadget: f_tcm: Don't free command immediately Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 14/25] usb: gadget: f_tcm: Translate error to sense Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 15/25] usb: gadget: f_tcm: Cleanup unused variable Thinh Nguyen
2022-08-26  7:17   ` Sebastian Andrzej Siewior
2022-08-26 18:41     ` Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 16/25] usb: gadget: f_tcm: Update state on data write Thinh Nguyen
2022-08-26  7:22   ` Sebastian Andrzej Siewior
2022-08-26 19:01     ` Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 17/25] usb: gadget: f_tcm: Handle abort command Thinh Nguyen
2022-08-26  7:48   ` Sebastian Andrzej Siewior
2022-08-26 19:04     ` Thinh Nguyen
2022-07-19  1:27 ` [PATCH v2 18/25] usb: gadget: f_tcm: Cleanup requests on ep disable Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 19/25] usb: gadget: f_tcm: Decrement command ref count on cleanup Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 20/25] usb: gadget: f_tcm: Save CPU ID per command Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 21/25] usb: gadget: f_tcm: Get stream by tag Thinh Nguyen
2022-08-26  9:06   ` Sebastian Andrzej Siewior
2022-08-26 19:05     ` Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 22/25] usb: gadget: f_tcm: Send sense on cancelled transfer Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 23/25] usb: gadget: f_tcm: Handle TASK_MANAGEMENT commands Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 24/25] usb: gadget: f_tcm: Check overlapped command Thinh Nguyen
2022-08-26 10:46   ` Sebastian Andrzej Siewior
2022-08-26 19:27     ` Thinh Nguyen
2022-07-19  1:28 ` [PATCH v2 25/25] usb: gadget: f_tcm: Comply with UAS Task Management requirement Thinh Nguyen
2022-08-19  8:31 ` [PATCH v2 00/25] usb: gadget: f_tcm: Enhance UASP driver Greg Kroah-Hartman
2022-08-19 17:18   ` Thinh Nguyen
2022-08-26  2:34     ` Thinh Nguyen
2022-08-26 10:52 ` Sebastian Andrzej Siewior
2022-08-26 19:36   ` Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27f3e2ced002bd9b738f4245f7e9b674b3bb3436.1658192351.git.Thinh.Nguyen@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).