Re: [PATCH]qla4xxx:Add support for Async Message PDUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David C Somayajulu wrote:
On Thu, 2008-04-24 at 11:40 -0500, Mike Christie wrote:
David C Somayajulu wrote:
On Tue, 2008-04-22 at 11:20 -0500, Mike Christie wrote:
David C Somayajulu wrote:
+int qla4xxx_conn_close_sess_logout(struct scsi_qla_host * ha,
+	   uint16_t fw_ddb_index, uint16_t connection_id, uint16_t option)
+{
+	uint32_t mbox_cmd[MBOX_REG_COUNT];
+	uint32_t mbox_sts[MBOX_REG_COUNT];
+
+	memset(&mbox_cmd, 0, sizeof(mbox_cmd));
+	memset(&mbox_sts, 0, sizeof(mbox_sts));
+
+	mbox_cmd[0] = MBOX_CMD_CONN_CLOSE_SESS_LOGOUT;
+	mbox_cmd[1] = fw_ddb_index;
+	mbox_cmd[2] = connection_id;
+	mbox_cmd[3] = LOGOUT_OPTION_RESET;
+
+	if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, &mbox_cmd[0],
+		&mbox_sts[0]) != QLA_SUCCESS) {
+		DEBUG2(printk("scsi%ld: %s: MBOX_CMD_CONN_CLOSE_SESS_LOGOUT "
+			      "option %04x failed sts %04X %04X",
+			      ha->host_no, __func__,
+			      option, mbox_sts[0], mbox_sts[1]));
+		if (mbox_sts[0] == 0x4005)
+			DEBUG2(printk("%s reason %04X\n", __func__,
+				      mbox_sts[1]));
+	}
+	return QLA_SUCCESS;
Does this logout function logout a session and stop it from being logged back in, or does it logout the session then the firmware tries to log back in?
Once the session is logged out, it stays in that state till the user
initiates a login. The firmware does not automatically try to login
again.
I think we want to login in this case. Did you guys test with this Equalogic boxes, or what boxes did you try that send a logout request and always do not want you to relogin?

EQL boxes have that magic target load balancing, where if they detect a problem the box will send the async logout request. It then expects the initiator to try a relogin, and at that time it will use the login redirect feature to send us to a new portal.
Mike, you are correct. Async Logout is for recovery (stated in RFC5048).
I have since confirmed with one of the storage vendors as well. I am
trying to see if there is a Time2Wait (seconds) type thing the initiator
needs to honor before it does the re-login. I will repost the patch.

There is. I think in the dropping connections related asyn pdus there is a time2wait value, and with the logout request asyn pdu, you will get a time2wait in the logout response.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux