@@ -386,46 +386,14 @@ struct sas_phy *sas_get_local_phy(struct domain_device *dev)
386
386
}
387
387
EXPORT_SYMBOL_GPL (sas_get_local_phy );
388
388
389
- static void sas_wait_eh (struct domain_device * dev )
390
- {
391
- struct sas_ha_struct * ha = dev -> port -> ha ;
392
- DEFINE_WAIT (wait );
393
-
394
- if (dev_is_sata (dev )) {
395
- ata_port_wait_eh (dev -> sata_dev .ap );
396
- return ;
397
- }
398
- retry :
399
- spin_lock_irq (& ha -> lock );
400
-
401
- while (test_bit (SAS_DEV_EH_PENDING , & dev -> state )) {
402
- prepare_to_wait (& ha -> eh_wait_q , & wait , TASK_UNINTERRUPTIBLE );
403
- spin_unlock_irq (& ha -> lock );
404
- schedule ();
405
- spin_lock_irq (& ha -> lock );
406
- }
407
- finish_wait (& ha -> eh_wait_q , & wait );
408
-
409
- spin_unlock_irq (& ha -> lock );
410
-
411
- /* make sure SCSI EH is complete */
412
- if (scsi_host_in_recovery (ha -> shost )) {
413
- msleep (10 );
414
- goto retry ;
415
- }
416
- }
417
-
418
- static int sas_queue_reset (struct domain_device * dev , int reset_type ,
419
- u64 lun , int wait )
389
+ static int sas_queue_reset (struct domain_device * dev , int reset_type , u64 lun )
420
390
{
421
391
struct sas_ha_struct * ha = dev -> port -> ha ;
422
392
int scheduled = 0 , tries = 100 ;
423
393
424
394
/* ata: promote lun reset to bus reset */
425
395
if (dev_is_sata (dev )) {
426
396
sas_ata_schedule_reset (dev );
427
- if (wait )
428
- sas_ata_wait_eh (dev );
429
397
return SUCCESS ;
430
398
}
431
399
@@ -443,9 +411,6 @@ static int sas_queue_reset(struct domain_device *dev, int reset_type,
443
411
}
444
412
spin_unlock_irq (& ha -> lock );
445
413
446
- if (wait )
447
- sas_wait_eh (dev );
448
-
449
414
if (scheduled )
450
415
return SUCCESS ;
451
416
}
@@ -498,7 +463,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
498
463
struct sas_internal * i = to_sas_internal (host -> transportt );
499
464
500
465
if (current != host -> ehandler )
501
- return sas_queue_reset (dev , SAS_DEV_LU_RESET , cmd -> device -> lun , 0 );
466
+ return sas_queue_reset (dev , SAS_DEV_LU_RESET , cmd -> device -> lun );
502
467
503
468
int_to_scsilun (cmd -> device -> lun , & lun );
504
469
@@ -521,7 +486,7 @@ int sas_eh_target_reset_handler(struct scsi_cmnd *cmd)
521
486
struct sas_internal * i = to_sas_internal (host -> transportt );
522
487
523
488
if (current != host -> ehandler )
524
- return sas_queue_reset (dev , SAS_DEV_RESET , 0 , 0 );
489
+ return sas_queue_reset (dev , SAS_DEV_RESET , 0 );
525
490
526
491
if (!i -> dft -> lldd_I_T_nexus_reset )
527
492
return FAILED ;
0 commit comments