@@ -562,7 +562,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)
562562 }
563563 if (atomic_read (& fcport -> state ) != FCS_ONLINE ) {
564564 if (atomic_read (& fcport -> state ) == FCS_DEVICE_DEAD ||
565- atomic_read (& fcport -> state ) == FCS_DEVICE_LOST ||
566565 atomic_read (& base_vha -> loop_state ) == LOOP_DEAD ) {
567566 cmd -> result = DID_NO_CONNECT << 16 ;
568567 goto qc24_fail_command ;
@@ -2513,16 +2512,17 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
25132512{
25142513 struct fc_rport * rport ;
25152514 scsi_qla_host_t * base_vha ;
2515+ unsigned long flags ;
25162516
25172517 if (!fcport -> rport )
25182518 return ;
25192519
25202520 rport = fcport -> rport ;
25212521 if (defer ) {
25222522 base_vha = pci_get_drvdata (vha -> hw -> pdev );
2523- spin_lock_irq (vha -> host -> host_lock );
2523+ spin_lock_irqsave (vha -> host -> host_lock , flags );
25242524 fcport -> drport = rport ;
2525- spin_unlock_irq (vha -> host -> host_lock );
2525+ spin_unlock_irqrestore (vha -> host -> host_lock , flags );
25262526 set_bit (FCPORT_UPDATE_NEEDED , & base_vha -> dpc_flags );
25272527 qla2xxx_wake_dpc (base_vha );
25282528 } else
@@ -3282,10 +3282,10 @@ qla2x00_do_dpc(void *data)
32823282
32833283 set_user_nice (current , -20 );
32843284
3285+ set_current_state (TASK_INTERRUPTIBLE );
32853286 while (!kthread_should_stop ()) {
32863287 DEBUG3 (printk ("qla2x00: DPC handler sleeping\n" ));
32873288
3288- set_current_state (TASK_INTERRUPTIBLE );
32893289 schedule ();
32903290 __set_current_state (TASK_RUNNING );
32913291
@@ -3454,7 +3454,9 @@ qla2x00_do_dpc(void *data)
34543454 qla2x00_do_dpc_all_vps (base_vha );
34553455
34563456 ha -> dpc_active = 0 ;
3457+ set_current_state (TASK_INTERRUPTIBLE );
34573458 } /* End of while(1) */
3459+ __set_current_state (TASK_RUNNING );
34583460
34593461 DEBUG (printk ("scsi(%ld): DPC handler exiting\n" , base_vha -> host_no ));
34603462
0 commit comments