On Wed, 2010-11-17 at 19:40 -0800, Mike Christie wrote: > On 11/10/2010 05:04 PM, Eddie Wai wrote: > > In the case the chip is undergoing different invasive operation > > which requires a chip reset, all NOPOUT request during this period > > For these invasive operations that reset the chip, do we always end up > having to relogin the connection/session or once the reset is done are > we able to just go on happily like nothing ever happened? Operations like mtu change/ifupdown/etc will require the chip to undergo reset. Prior to this, the connections will be cleaned up via the conn_failure->ep_disconnect path and eventually put into the reopen recovery path. During this period, we must disallow any send pdu requests to be queued to the chip for a more immediately connection tear down time (so we don't have to wait for the pdu's completion). We had to treat NOPOUT requests differently as the routine in libiscsi would continuously loop until the NOPOUT send request returns with success. This is the why we added the NOPOUT workaround. Once the chip reset is completed, the ep_connect requests from the recovery path will be honored and the pre-existed connections will get re-established. > > > must be silently dropped from queuing to the hardware. This patch > > will respond to libiscsi immediately with sent success. Since the > > request was not actually sent, the NOPIN wait timeout will get > > triggered and another NOPOUT request will commence through the > > proper channel. > > > > Signed-off-by: Eddie Wai<eddie.wai@xxxxxxxxxxxx> > > Acked-by: Anil Veerabhadrappa<anilgv@xxxxxxxxxxxx> > > --- > > drivers/scsi/bnx2i/bnx2i_iscsi.c | 16 ++++++++++++++++ > > 1 files changed, 16 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c > > index b32baf8..507cd25 100644 > > --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c > > +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c > > @@ -1068,6 +1068,22 @@ static int bnx2i_iscsi_send_generic_request(struct iscsi_task *task) > > char *buf; > > int data_len; > > > > + /* > > + * Forcefully terminate all in progress connection recovery at the > > + * earliest, either in bind(), send_pdu(LOGIN), or conn_start() > > + */ > > + if (bnx2i_adapter_ready(bnx2i_conn->ep->hba)) { > > + if ((task->hdr->opcode& ISCSI_OPCODE_MASK) == > > + ISCSI_OP_NOOP_OUT) > > + /* This is a WA to indicate to libiscsi that the nopout > > + * request was sent successfully without actually > > + * submitting to the hardware. > > + * Just silently drop the nopout request > > + */ > > + return 0; > > + else > > + return -EIO; > > + } > > bnx2i_iscsi_prep_generic_pdu_bd(bnx2i_conn); > > switch (task->hdr->opcode& ISCSI_OPCODE_MASK) { > > case ISCSI_OP_LOGIN: > > -- 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