Commit 192c4e9b authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Prevent multiple ADISC commands per session

Add check to allow 1 discovery command per session to be sent.
Signed-off-by: default avatarQuinn Tran <qtran@marvell.com>
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 471f8e03
...@@ -473,9 +473,11 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport, ...@@ -473,9 +473,11 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
{ {
srb_t *sp; srb_t *sp;
struct srb_iocb *lio; struct srb_iocb *lio;
int rval; int rval = QLA_FUNCTION_FAILED;
if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
return rval;
rval = QLA_FUNCTION_FAILED;
fcport->flags |= FCF_ASYNC_SENT; fcport->flags |= FCF_ASYNC_SENT;
sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
if (!sp) if (!sp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment