Skip to content

Commit

Permalink
scsi: qla2xxx: Prevent multiple ADISC commands per session
Browse files Browse the repository at this point in the history
Add check to allow 1 discovery command per session to be sent.

Signed-off-by: Quinn Tran <[email protected]>
Signed-off-by: Himanshu Madhani <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
Quinn Tran authored and martinkpetersen committed Feb 19, 2019
1 parent 471f8e0 commit 192c4e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
{
srb_t *sp;
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;
sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
if (!sp)
Expand Down

0 comments on commit 192c4e9

Please sign in to comment.