File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1254,6 +1254,13 @@ void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
1254
1254
struct utp_hpb_rsp * rsp_field = & lrbp -> ucd_rsp_ptr -> hr ;
1255
1255
int data_seg_len ;
1256
1256
1257
+ data_seg_len = be32_to_cpu (lrbp -> ucd_rsp_ptr -> header .dword_2 )
1258
+ & MASK_RSP_UPIU_DATA_SEG_LEN ;
1259
+
1260
+ /* If data segment length is zero, rsp_field is not valid */
1261
+ if (!data_seg_len )
1262
+ return ;
1263
+
1257
1264
if (unlikely (lrbp -> lun != rsp_field -> lun )) {
1258
1265
struct scsi_device * sdev ;
1259
1266
bool found = false;
@@ -1288,18 +1295,6 @@ void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
1288
1295
return ;
1289
1296
}
1290
1297
1291
- data_seg_len = be32_to_cpu (lrbp -> ucd_rsp_ptr -> header .dword_2 )
1292
- & MASK_RSP_UPIU_DATA_SEG_LEN ;
1293
-
1294
- /* To flush remained rsp_list, we queue the map_work task */
1295
- if (!data_seg_len ) {
1296
- if (!ufshpb_is_general_lun (hpb -> lun ))
1297
- return ;
1298
-
1299
- ufshpb_kick_map_work (hpb );
1300
- return ;
1301
- }
1302
-
1303
1298
BUILD_BUG_ON (sizeof (struct utp_hpb_rsp ) != UTP_HPB_RSP_SIZE );
1304
1299
1305
1300
if (!ufshpb_is_hpb_rsp_valid (hba , lrbp , rsp_field ))
You can’t perform that action at this time.
0 commit comments