Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38969
b: refs/heads/master
c: 07db518
h: refs/heads/master
i:
  38967: 6e5143c
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 3, 2006
1 parent 82fb924 commit 8463fac
Show file tree
Hide file tree
Showing 2 changed files with 26 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: bb8ee4998498e15b5c8ed94cd7dd8d07e586c0ab
refs/heads/master: 07db51831371f2875ef234b1535a15afdb381b6c
25 changes: 25 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,23 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha)
return (return_status);
}

static void
qla2x00_block_error_handler(struct scsi_cmnd *cmnd)
{
struct Scsi_Host *shost = cmnd->device->host;
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
unsigned long flags;

spin_lock_irqsave(shost->host_lock, flags);
while (rport->port_state == FC_PORTSTATE_BLOCKED) {
spin_unlock_irqrestore(shost->host_lock, flags);
msleep(1000);
spin_lock_irqsave(shost->host_lock, flags);
}
spin_unlock_irqrestore(shost->host_lock, flags);
return;
}

/**************************************************************************
* qla2xxx_eh_abort
*
Expand All @@ -615,6 +632,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
unsigned long flags;
int wait = 0;

qla2x00_block_error_handler(cmd);

if (!CMD_SP(cmd))
return SUCCESS;

Expand Down Expand Up @@ -748,6 +767,8 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
unsigned int id, lun;
unsigned long serial;

qla2x00_block_error_handler(cmd);

ret = FAILED;

id = cmd->device->id;
Expand Down Expand Up @@ -877,6 +898,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
unsigned int id, lun;
unsigned long serial;

qla2x00_block_error_handler(cmd);

ret = FAILED;

id = cmd->device->id;
Expand Down Expand Up @@ -936,6 +959,8 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
unsigned int id, lun;
unsigned long serial;

qla2x00_block_error_handler(cmd);

ret = FAILED;

id = cmd->device->id;
Expand Down

0 comments on commit 8463fac

Please sign in to comment.