Minor fixes and cleanups

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2006-10-12 16:43:38 +00:00
parent 631146b97d
commit af6b6fa8f1
3 changed files with 20 additions and 26 deletions

View File

@@ -198,7 +198,7 @@ static void q2t_modify_command_count(scsi_qla_host_t *ha, int cmd_count,
static void __q2t_send_notify_ack(scsi_qla_host_t *ha,
uint16_t target_id, uint16_t status, uint16_t task_flags,
uint16_t seq_id, uint32_t add_flags, uint16_t resp_code,
int resp_code_valid)
int resp_code_valid, uint16_t ox_id)
{
nack_entry_t *ntfy;
@@ -226,7 +226,7 @@ static void __q2t_send_notify_ack(scsi_qla_host_t *ha,
/* Do not increment here, the chip isn't decrementing */
/* ntfy->flags = __constant_cpu_to_le16(NOTIFY_ACK_RES_COUNT); */
ntfy->flags |= cpu_to_le16(add_flags);
/* ntfy->ox_id = iocb->ox_id; ToDo */
ntfy->ox_id = ox_id;
if (resp_code_valid) {
ntfy->resp_code = cpu_to_le16(resp_code);
@@ -246,14 +246,12 @@ out:
}
/* ha->hardware_lock supposed to be held on entry */
static inline void q2t_send_notify_ack(scsi_qla_host_t *ha,
notify_entry_t *iocb,
uint32_t add_flags,
uint16_t resp_code,
int resp_code_valid)
notify_entry_t *iocb, uint32_t add_flags, uint16_t resp_code,
int resp_code_valid)
{
__q2t_send_notify_ack(ha, GET_TARGET_ID(ha, iocb), iocb->status,
iocb->task_flags, iocb->seq_id,
add_flags, resp_code, resp_code_valid);
iocb->task_flags, iocb->seq_id, add_flags, resp_code,
resp_code_valid, iocb->ox_id);
}
/*
@@ -938,7 +936,7 @@ static void q2x_send_term_exchange(scsi_qla_host_t *ha, struct q2t_cmd *cmd)
}
SET_TARGET_ID(ha, ctio->target, GET_TARGET_ID(ha, atio));
//ToDo!! ctio->rx_id = atio->rx_id;
ctio->exchange_id = atio->exchange_id;
ctio->flags = __constant_cpu_to_le16(OF_FAST_POST | OF_TERM_EXCH |
OF_NO_DATA | OF_SS_MODE_1);

View File

@@ -79,17 +79,6 @@
#define ATIO_ACA_QUEUE 4
#define ATIO_UNTAGGED 5
/* CTIO additional flag ToDo: move to the appropriate place */
#define OF_TERM_EXCH BIT_14 /* Terminate exchange */
/* ToDo: move to the appropriate place */
#define CTIO_INVALID_RX_ID 0x08
#define CTIO_TIMEOUT 0x0B
#define CTIO_LIP_RESET 0x0E
#define CTIO_TARGET_RESET 0x17
#define CTIO_PORT_UNAVAILABLE 0x28
#define CTIO_PORT_LOGGED_OUT 0x29
/* TM failed response code, see FCP */
#define FC_TM_FAILED 0x5

View File

@@ -74,6 +74,7 @@
#define OF_NO_DATA (BIT_7 | BIT_6)
#define OF_INC_RC BIT_8 /* Increment command resource count */
#define OF_FAST_POST BIT_9 /* Enable mailbox fast posting. */
#define OF_TERM_EXCH BIT_14 /* Terminate exchange */
#define OF_SSTS BIT_15 /* Send SCSI status */
#endif
@@ -181,7 +182,8 @@ typedef struct
uint16_t seq_id;
uint16_t reserved_5[11];
uint16_t scsi_status;
uint8_t sense_data[18];
uint8_t sense_data[16];
uint16_t ox_id;
}notify_entry_t;
#endif
@@ -205,7 +207,8 @@ typedef struct
uint16_t status;
uint16_t task_flags;
uint16_t seq_id;
uint16_t reserved_3[21];
uint16_t reserved_3[20];
uint16_t ox_id;
}nack_entry_t;
#define NOTIFY_ACK_SUCCESS 0x01
#endif
@@ -285,10 +288,14 @@ typedef struct
uint32_t dseg_2_address; /* Data segment 2 address. */
uint32_t dseg_2_length; /* Data segment 2 length. */
}ctio_entry_t;
#define CTIO_SUCCESS 0x01
#define CTIO_ABORTED 0x02
#define CTIO_ERROR_INVALID_RX_ID 0x08
#define CTIO_ERROR_PORT_LOGGED_OUT 0x29
#define CTIO_SUCCESS 0x01
#define CTIO_ABORTED 0x02
#define CTIO_INVALID_RX_ID 0x08
#define CTIO_TIMEOUT 0x0B
#define CTIO_LIP_RESET 0x0E
#define CTIO_TARGET_RESET 0x17
#define CTIO_PORT_UNAVAILABLE 0x28
#define CTIO_PORT_LOGGED_OUT 0x29
#endif
#ifndef CTIO_RET_TYPE