RE: [PATCH v3 10/17] ufs: core: mcq: Use shared tags for MCQ mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  static int ufshcd_map_queues(struct Scsi_Host *shost)
This seems like an old version of ufshcd_map_queues - returns void now.
Needs rebase?

>  {
> -       int i, ret;
> +       int i, queue_offset = 0;
> +       struct ufs_hba *hba = shost_priv(shost);
> +
> +       if (!is_mcq_supported(hba)) {
> +               hba->nr_queues[HCTX_TYPE_DEFAULT] = 1;
> +               hba->nr_queues[HCTX_TYPE_READ] = 0;
> +               hba->nr_queues[HCTX_TYPE_POLL] = 1;
> +               hba->nr_hw_queues = 1;
> +       }
> 
>         for (i = 0; i < shost->nr_maps; i++) {
>                 struct blk_mq_queue_map *map = &shost->tag_set.map[i];
> 
> -               switch (i) {
> -               case HCTX_TYPE_DEFAULT:
> -               case HCTX_TYPE_POLL:
> -                       map->nr_queues = 1;
> -                       break;
> -               case HCTX_TYPE_READ:
> -                       map->nr_queues = 0;
> +               map->nr_queues = hba->nr_queues[i];
> +               if (!map->nr_queues)
>                         continue;
> -               default:
> -                       WARN_ON_ONCE(true);
> -               }
> -               map->queue_offset = 0;
> -               ret = blk_mq_map_queues(map);
Ditto.

Thanks,
Avri

> -               WARN_ON_ONCE(ret);
> +               map->queue_offset = queue_offset;
> +               if (i == HCTX_TYPE_POLL && !is_mcq_supported(hba))
> +                       map->queue_offset = 0;
> +
> +               blk_mq_map_queues(map);
> +               queue_offset += map->nr_queues;
>         }
> 
>         return 0;
> --
> 2.7.4





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux