Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20395
b: refs/heads/master
c: 387f96b
h: refs/heads/master
i:
  20393: 1bd53cd
  20391: 86e50a2
v: v3
  • Loading branch information
andrew.vasquez@qlogic.com authored and unknown committed Feb 7, 2006
1 parent 4456de8 commit f335860
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62288f105b3cad0b8643526d2a41b5503d0a1476
refs/heads/master: 387f96b4d9391bf3ce6928fb9cd90c9c7df37291
14 changes: 14 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
goto qc_fail_command;
}

/* Close window on fcport/rport state-transitioning. */
if (!*(fc_port_t **)rport->dd_data) {
cmd->result = DID_IMM_RETRY << 16;
goto qc_fail_command;
}

if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
atomic_read(&ha->loop_state) == LOOP_DEAD) {
Expand Down Expand Up @@ -421,6 +427,12 @@ qla24xx_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
goto qc24_fail_command;
}

/* Close window on fcport/rport state-transitioning. */
if (!*(fc_port_t **)rport->dd_data) {
cmd->result = DID_IMM_RETRY << 16;
goto qc24_fail_command;
}

if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
atomic_read(&ha->loop_state) == LOOP_DEAD) {
Expand Down Expand Up @@ -1675,11 +1687,13 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *ha, fc_port_t *fcport,
spin_lock_irqsave(&fcport->rport_lock, flags);
fcport->drport = rport;
fcport->rport = NULL;
*(fc_port_t **)rport->dd_data = NULL;
spin_unlock_irqrestore(&fcport->rport_lock, flags);
set_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags);
} else {
spin_lock_irqsave(&fcport->rport_lock, flags);
fcport->rport = NULL;
*(fc_port_t **)rport->dd_data = NULL;
spin_unlock_irqrestore(&fcport->rport_lock, flags);
fc_remote_port_delete(rport);
}
Expand Down

0 comments on commit f335860

Please sign in to comment.