File tree Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -10356,26 +10356,20 @@ static int ufshcd_add_scsi_host(struct ufs_hba *hba)
10356
10356
dev_err (hba -> dev , "MCQ mode is disabled, err=%d\n" ,
10357
10357
err );
10358
10358
}
10359
- err = scsi_add_host (hba -> host , hba -> dev );
10360
- if (err ) {
10361
- dev_err (hba -> dev , "scsi_add_host failed\n" );
10362
- return err ;
10363
- }
10364
- hba -> scsi_host_added = true;
10365
- } else {
10366
- if (!hba -> lsdb_sup ) {
10367
- dev_err (hba -> dev ,
10368
- "%s: failed to initialize (legacy doorbell mode not supported)\n" ,
10369
- __func__ );
10370
- return - EINVAL ;
10371
- }
10372
- err = scsi_add_host (hba -> host , hba -> dev );
10373
- if (err ) {
10374
- dev_err (hba -> dev , "scsi_add_host failed\n" );
10375
- return err ;
10376
- }
10377
- hba -> scsi_host_added = true;
10378
10359
}
10360
+ if (!is_mcq_supported (hba ) && !hba -> lsdb_sup ) {
10361
+ dev_err (hba -> dev ,
10362
+ "%s: failed to initialize (legacy doorbell mode not supported)\n" ,
10363
+ __func__ );
10364
+ return - EINVAL ;
10365
+ }
10366
+
10367
+ err = scsi_add_host (hba -> host , hba -> dev );
10368
+ if (err ) {
10369
+ dev_err (hba -> dev , "scsi_add_host failed\n" );
10370
+ return err ;
10371
+ }
10372
+ hba -> scsi_host_added = true;
10379
10373
10380
10374
hba -> tmf_tag_set = (struct blk_mq_tag_set ) {
10381
10375
.nr_hw_queues = 1 ,
You can’t perform that action at this time.
0 commit comments