@@ -1308,6 +1308,12 @@ static void mpi3mr_update_tgtdev(struct mpi3mr_ioc *mrioc,
13081308 if (vdinf -> vd_state == MPI3_DEVICE0_VD_STATE_OFFLINE )
13091309 tgtdev -> is_hidden = 1 ;
13101310 tgtdev -> non_stl = 1 ;
1311+ tgtdev -> dev_spec .vd_inf .reset_to =
1312+ max_t (u8 , vdinf -> vd_reset_to ,
1313+ MPI3MR_INTADMCMD_TIMEOUT );
1314+ tgtdev -> dev_spec .vd_inf .abort_to =
1315+ max_t (u8 , vdinf -> vd_abort_to ,
1316+ MPI3MR_INTADMCMD_TIMEOUT );
13111317 tgtdev -> dev_spec .vd_inf .tg_id = vdinf_io_throttle_group ;
13121318 tgtdev -> dev_spec .vd_inf .tg_high =
13131319 le16_to_cpu (vdinf -> io_throttle_group_high ) * 2048 ;
@@ -2049,8 +2055,8 @@ static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc,
20492055 if (!fwevt -> process_evt )
20502056 goto evt_ack ;
20512057
2052- dprint_event_bh (mrioc , "processing event(0x%02x) in the bottom half handler\n" ,
2053- fwevt -> event_id );
2058+ dprint_event_bh (mrioc , "processing event(0x%02x) -(0x%08x) in the bottom half handler\n" ,
2059+ fwevt -> event_id , fwevt -> evt_ctx );
20542060
20552061 switch (fwevt -> event_id ) {
20562062 case MPI3_EVENT_DEVICE_ADDED :
@@ -2866,12 +2872,14 @@ static void mpi3mr_preparereset_evt_th(struct mpi3mr_ioc *mrioc,
28662872 "prepare for reset event top half with rc=start\n" );
28672873 if (mrioc -> prepare_for_reset )
28682874 return ;
2875+ scsi_block_requests (mrioc -> shost );
28692876 mrioc -> prepare_for_reset = 1 ;
28702877 mrioc -> prepare_for_reset_timeout_counter = 0 ;
28712878 } else if (evtdata -> reason_code == MPI3_EVENT_PREPARE_RESET_RC_ABORT ) {
28722879 dprint_event_th (mrioc ,
28732880 "prepare for reset top half with rc=abort\n" );
28742881 mrioc -> prepare_for_reset = 0 ;
2882+ scsi_unblock_requests (mrioc -> shost );
28752883 mrioc -> prepare_for_reset_timeout_counter = 0 ;
28762884 }
28772885 if ((event_reply -> msg_flags & MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_MASK )
@@ -3076,8 +3084,8 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
30763084 }
30773085 if (process_evt_bh || ack_req ) {
30783086 dprint_event_th (mrioc ,
3079- "scheduling bottom half handler for event(0x%02x), ack_required=%d\n" ,
3080- evt_type , ack_req );
3087+ "scheduling bottom half handler for event(0x%02x) - (0x%08x), ack_required=%d\n" ,
3088+ evt_type , le32_to_cpu ( event_reply -> event_context ) , ack_req );
30813089 sz = event_reply -> event_data_length * 4 ;
30823090 fwevt = mpi3mr_alloc_fwevt (sz );
30833091 if (!fwevt ) {
@@ -3915,11 +3923,13 @@ int mpi3mr_issue_tm(struct mpi3mr_ioc *mrioc, u8 tm_type,
39153923 if (scsi_tgt_priv_data )
39163924 atomic_inc (& scsi_tgt_priv_data -> block_io );
39173925
3918- if (tgtdev && (tgtdev -> dev_type == MPI3_DEVICE_DEVFORM_PCIE )) {
3919- if (cmd_priv && tgtdev -> dev_spec .pcie_inf .abort_to )
3920- timeout = tgtdev -> dev_spec .pcie_inf .abort_to ;
3921- else if (!cmd_priv && tgtdev -> dev_spec .pcie_inf .reset_to )
3922- timeout = tgtdev -> dev_spec .pcie_inf .reset_to ;
3926+ if (tgtdev ) {
3927+ if (tgtdev -> dev_type == MPI3_DEVICE_DEVFORM_PCIE )
3928+ timeout = cmd_priv ? tgtdev -> dev_spec .pcie_inf .abort_to
3929+ : tgtdev -> dev_spec .pcie_inf .reset_to ;
3930+ else if (tgtdev -> dev_type == MPI3_DEVICE_DEVFORM_VD )
3931+ timeout = cmd_priv ? tgtdev -> dev_spec .vd_inf .abort_to
3932+ : tgtdev -> dev_spec .vd_inf .reset_to ;
39233933 }
39243934
39253935 init_completion (& drv_cmd -> done );
0 commit comments