@@ -594,6 +594,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
594
594
595
595
aac_fib_init (cmd_fibcontext );
596
596
dinfo = (struct aac_get_name * ) fib_data (cmd_fibcontext );
597
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
597
598
598
599
dinfo -> command = cpu_to_le32 (VM_ContainerConfig );
599
600
dinfo -> type = cpu_to_le32 (CT_READ_NAME );
@@ -611,10 +612,8 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
611
612
/*
612
613
* Check that the command queued to the controller
613
614
*/
614
- if (status == - EINPROGRESS ) {
615
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
615
+ if (status == - EINPROGRESS )
616
616
return 0 ;
617
- }
618
617
619
618
printk (KERN_WARNING "aac_get_container_name: aac_fib_send failed with status: %d.\n" , status );
620
619
aac_fib_complete (cmd_fibcontext );
@@ -725,6 +724,7 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
725
724
726
725
dinfo -> count = cpu_to_le32 (scmd_id (scsicmd ));
727
726
dinfo -> type = cpu_to_le32 (FT_FILESYS );
727
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
728
728
729
729
status = aac_fib_send (ContainerCommand ,
730
730
fibptr ,
@@ -736,9 +736,7 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
736
736
/*
737
737
* Check that the command queued to the controller
738
738
*/
739
- if (status == - EINPROGRESS )
740
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
741
- else if (status < 0 ) {
739
+ if (status < 0 && status != - EINPROGRESS ) {
742
740
/* Inherit results from VM_NameServe, if any */
743
741
dresp -> status = cpu_to_le32 (ST_OK );
744
742
_aac_probe_container2 (context , fibptr );
@@ -766,6 +764,7 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru
766
764
dinfo -> count = cpu_to_le32 (scmd_id (scsicmd ));
767
765
dinfo -> type = cpu_to_le32 (FT_FILESYS );
768
766
scsicmd -> SCp .ptr = (char * )callback ;
767
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
769
768
770
769
status = aac_fib_send (ContainerCommand ,
771
770
fibptr ,
@@ -777,10 +776,9 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru
777
776
/*
778
777
* Check that the command queued to the controller
779
778
*/
780
- if (status == - EINPROGRESS ) {
781
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
779
+ if (status == - EINPROGRESS )
782
780
return 0 ;
783
- }
781
+
784
782
if (status < 0 ) {
785
783
scsicmd -> SCp .ptr = NULL ;
786
784
aac_fib_complete (fibptr );
@@ -1126,6 +1124,7 @@ static int aac_get_container_serial(struct scsi_cmnd * scsicmd)
1126
1124
dinfo -> command = cpu_to_le32 (VM_ContainerConfig );
1127
1125
dinfo -> type = cpu_to_le32 (CT_CID_TO_32BITS_UID );
1128
1126
dinfo -> cid = cpu_to_le32 (scmd_id (scsicmd ));
1127
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
1129
1128
1130
1129
status = aac_fib_send (ContainerCommand ,
1131
1130
cmd_fibcontext ,
@@ -1138,10 +1137,8 @@ static int aac_get_container_serial(struct scsi_cmnd * scsicmd)
1138
1137
/*
1139
1138
* Check that the command queued to the controller
1140
1139
*/
1141
- if (status == - EINPROGRESS ) {
1142
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
1140
+ if (status == - EINPROGRESS )
1143
1141
return 0 ;
1144
- }
1145
1142
1146
1143
printk (KERN_WARNING "aac_get_container_serial: aac_fib_send failed with status: %d.\n" , status );
1147
1144
aac_fib_complete (cmd_fibcontext );
@@ -2335,16 +2332,14 @@ static int aac_read(struct scsi_cmnd * scsicmd)
2335
2332
* Alocate and initialize a Fib
2336
2333
*/
2337
2334
cmd_fibcontext = aac_fib_alloc_tag (dev , scsicmd );
2338
-
2335
+ scsicmd -> SCp . phase = AAC_OWNER_FIRMWARE ;
2339
2336
status = aac_adapter_read (cmd_fibcontext , scsicmd , lba , count );
2340
2337
2341
2338
/*
2342
2339
* Check that the command queued to the controller
2343
2340
*/
2344
- if (status == - EINPROGRESS ) {
2345
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2341
+ if (status == - EINPROGRESS )
2346
2342
return 0 ;
2347
- }
2348
2343
2349
2344
printk (KERN_WARNING "aac_read: aac_fib_send failed with status: %d.\n" , status );
2350
2345
/*
@@ -2429,16 +2424,14 @@ static int aac_write(struct scsi_cmnd * scsicmd)
2429
2424
* Allocate and initialize a Fib then setup a BlockWrite command
2430
2425
*/
2431
2426
cmd_fibcontext = aac_fib_alloc_tag (dev , scsicmd );
2432
-
2427
+ scsicmd -> SCp . phase = AAC_OWNER_FIRMWARE ;
2433
2428
status = aac_adapter_write (cmd_fibcontext , scsicmd , lba , count , fua );
2434
2429
2435
2430
/*
2436
2431
* Check that the command queued to the controller
2437
2432
*/
2438
- if (status == - EINPROGRESS ) {
2439
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2433
+ if (status == - EINPROGRESS )
2440
2434
return 0 ;
2441
- }
2442
2435
2443
2436
printk (KERN_WARNING "aac_write: aac_fib_send failed with status: %d\n" , status );
2444
2437
/*
@@ -2588,6 +2581,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd)
2588
2581
synchronizecmd -> cid = cpu_to_le32 (scmd_id (scsicmd ));
2589
2582
synchronizecmd -> count =
2590
2583
cpu_to_le32 (sizeof (((struct aac_synchronize_reply * )NULL )-> data ));
2584
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2591
2585
2592
2586
/*
2593
2587
* Now send the Fib to the adapter
@@ -2603,10 +2597,8 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd)
2603
2597
/*
2604
2598
* Check that the command queued to the controller
2605
2599
*/
2606
- if (status == - EINPROGRESS ) {
2607
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2600
+ if (status == - EINPROGRESS )
2608
2601
return 0 ;
2609
- }
2610
2602
2611
2603
printk (KERN_WARNING
2612
2604
"aac_synchronize: aac_fib_send failed with status: %d.\n" , status );
@@ -2666,6 +2658,7 @@ static int aac_start_stop(struct scsi_cmnd *scsicmd)
2666
2658
pmcmd -> cid = cpu_to_le32 (sdev_id (sdev ));
2667
2659
pmcmd -> parm = (scsicmd -> cmnd [1 ] & 1 ) ?
2668
2660
cpu_to_le32 (CT_PM_UNIT_IMMEDIATE ) : 0 ;
2661
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2669
2662
2670
2663
/*
2671
2664
* Now send the Fib to the adapter
@@ -2681,10 +2674,8 @@ static int aac_start_stop(struct scsi_cmnd *scsicmd)
2681
2674
/*
2682
2675
* Check that the command queued to the controller
2683
2676
*/
2684
- if (status == - EINPROGRESS ) {
2685
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
2677
+ if (status == - EINPROGRESS )
2686
2678
return 0 ;
2687
- }
2688
2679
2689
2680
aac_fib_complete (cmd_fibcontext );
2690
2681
aac_fib_free (cmd_fibcontext );
@@ -3692,16 +3683,14 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
3692
3683
* Allocate and initialize a Fib then setup a BlockWrite command
3693
3684
*/
3694
3685
cmd_fibcontext = aac_fib_alloc_tag (dev , scsicmd );
3695
-
3686
+ scsicmd -> SCp . phase = AAC_OWNER_FIRMWARE ;
3696
3687
status = aac_adapter_scsi (cmd_fibcontext , scsicmd );
3697
3688
3698
3689
/*
3699
3690
* Check that the command queued to the controller
3700
3691
*/
3701
- if (status == - EINPROGRESS ) {
3702
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
3692
+ if (status == - EINPROGRESS )
3703
3693
return 0 ;
3704
- }
3705
3694
3706
3695
printk (KERN_WARNING "aac_srb: aac_fib_send failed with status: %d\n" , status );
3707
3696
aac_fib_complete (cmd_fibcontext );
@@ -3739,15 +3728,14 @@ static int aac_send_hba_fib(struct scsi_cmnd *scsicmd)
3739
3728
if (!cmd_fibcontext )
3740
3729
return -1 ;
3741
3730
3731
+ scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
3742
3732
status = aac_adapter_hba (cmd_fibcontext , scsicmd );
3743
3733
3744
3734
/*
3745
3735
* Check that the command queued to the controller
3746
3736
*/
3747
- if (status == - EINPROGRESS ) {
3748
- scsicmd -> SCp .phase = AAC_OWNER_FIRMWARE ;
3737
+ if (status == - EINPROGRESS )
3749
3738
return 0 ;
3750
- }
3751
3739
3752
3740
pr_warn ("aac_hba_cmd_req: aac_fib_send failed with status: %d\n" ,
3753
3741
status );
0 commit comments