On 12/02/2011 12:42 AM, vikas.chaudhary@xxxxxxxxxx wrote: > > /** > + * qla4xxx_is_eh_active: You need a description of the function above after the colon. And actually qla4xxx is doing a dash in other places. So you should do: /** * qla4xxx_is_eh_active - check if eh is rinning And just to make sure, if the host state is in SHOST_CANCEL_RECOVERY the drivers shutdown code will have cleaned up the command right? It looks like it, but I was not 100% sure. > + * @shost: Pointer to SCSI Host struct > + * > + * This routine finds that if reset host is called in EH > + * scenario or from some application like sg_reset > + **/ > +static int qla4xxx_is_eh_active(struct Scsi_Host *shost) > +{ > + if (shost->shost_state == SHOST_RECOVERY) > + return 1; > + return 0; > +} > + > +/** > * qla4xxx_eh_host_reset - kernel callback > * @cmd: Pointer to Linux's SCSI command structure > * > @@ -4832,6 +4846,11 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd) > if (ql4xdontresethba) { > DEBUG2(printk("scsi%ld: %s: Don't Reset HBA\n", > ha->host_no, __func__)); > + > + /* Clear outstanding srb in queues */ > + if (qla4xxx_is_eh_active(cmd->device->host)) > + qla4xxx_abort_active_cmds(ha, DID_ABORT << 16); > + > return FAILED; > } > -- 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