You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[SCSI] libiscsi: allow drivers to modify the itt sent to the target
bnx2i and cxgb3i need to encode LLD info in the itt so that the firmware/hardware can process the pdu. This patch allows the LLDs to encode info in the task->hdr->itt that they setup in the alloc_pdu callout (any resources that are allocated can be freed with the pdu in the cleanup_task callout). If the LLD encodes info in the itt they should implement a parse_pdu_itt callout. If parse_pdu_itt is not implemented libiscsi will do the right thing for the LLD. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
committed by
James Bottomley
parent
38e1a8f547
commit
262ef63627
@@ -30,6 +30,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <scsi/iscsi_proto.h>
|
||||
#include <scsi/iscsi_if.h>
|
||||
#include <scsi/scsi_transport_iscsi.h>
|
||||
|
||||
struct scsi_transport_template;
|
||||
struct scsi_host_template;
|
||||
@@ -70,12 +71,12 @@ enum {
|
||||
/* Connection suspend "bit" */
|
||||
#define ISCSI_SUSPEND_BIT 1
|
||||
|
||||
#define ISCSI_ITT_MASK (0x1fff)
|
||||
#define ISCSI_ITT_MASK 0x1fff
|
||||
#define ISCSI_TOTAL_CMDS_MAX 4096
|
||||
/* this must be a power of two greater than ISCSI_MGMT_CMDS_MAX */
|
||||
#define ISCSI_TOTAL_CMDS_MIN 16
|
||||
#define ISCSI_AGE_SHIFT 28
|
||||
#define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT)
|
||||
#define ISCSI_AGE_MASK 0xf
|
||||
|
||||
#define ISCSI_ADDRESS_BUF_LEN 64
|
||||
|
||||
|
||||
@@ -122,6 +122,9 @@ struct iscsi_transport {
|
||||
int (*xmit_pdu) (struct iscsi_task *task);
|
||||
int (*init_pdu) (struct iscsi_task *task, unsigned int offset,
|
||||
unsigned int count);
|
||||
void (*parse_pdu_itt) (struct iscsi_conn *conn, itt_t itt,
|
||||
int *index, int *age);
|
||||
|
||||
void (*session_recovery_timedout) (struct iscsi_cls_session *session);
|
||||
struct iscsi_endpoint *(*ep_connect) (struct sockaddr *dst_addr,
|
||||
int non_blocking);
|
||||
|
||||
Reference in New Issue
Block a user