Re: [PATCH v13 05/11] can: etas_es58x: remove setting of dql.min_limit for now

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

 



On Fri. 19 Mar 2021 at 21:41, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> ---
>  drivers/net/can/usb/etas_es58x/es58x_core.c | 5 -----
>  drivers/net/can/usb/etas_es58x/es58x_core.h | 3 ---
>  2 files changed, 8 deletions(-)
>
> diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c
> index 89a4051afc82..d6a114a7e090 100644
> --- a/drivers/net/can/usb/etas_es58x/es58x_core.c
> +++ b/drivers/net/can/usb/etas_es58x/es58x_core.c
> @@ -2150,11 +2150,6 @@ static int es58x_init_netdev(struct es58x_device *es58x_dev, int channel_idx)
>         netdev_dbg(netdev, "%s: Registered channel %s\n",
>                    es58x_dev->udev->product, netdev->name);
>
> -#ifdef CONFIG_BQL
> -       netdev_get_tx_queue(netdev, 0)->dql.min_limit =
> -           es58x_dev->param->dql_limit_min;
> -#endif
> -
>         return ret;
>  }
>
> diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.h b/drivers/net/can/usb/etas_es58x/es58x_core.h
> index 71f278e6e85c..ba6cdb9dfcf4 100644
> --- a/drivers/net/can/usb/etas_es58x/es58x_core.h
> +++ b/drivers/net/can/usb/etas_es58x/es58x_core.h
> @@ -306,9 +306,6 @@ struct es58x_parameters {
>         u16 tx_urb_cmd_max_len;
>         u16 rx_urb_cmd_max_len;
>         u16 fifo_mask;
> -#ifdef CONFIG_BQL
> -       u16 dql_limit_min;
> -#endif
>         u8 tx_bulk_max;
>         u8 urb_cmd_header_len;
>         u8 rx_urb_max;

My current idea was to add an helper function
es58x_netdev_queue_set_dql_min_limit() as below and to remove it
the day the patch got accepted in the network devices.

Does it make sense? If you prefer to remove it for now, I will do so.

/**
 * es58x_netdev_queue_set_dql_min_limit - set dql minimum limit
 * @dev_queue: pointer to transmit queue
 * @min_limit: dql minimum limit
 *
 * Forces xmit_more() to return true until the minimum threshold
 * defined by @min_limit is reached (or until the tx queue is
 * empty). Warning: to be use with care, misuse will impact the
 * latency.
 */
static inline void es58x_netdev_queue_set_dql_min_limit(struct netdev_queue *q,
                            unsigned int min_limit)
{
#ifdef CONFIG_BQL
    q->dql.min_limit = min_limit;
#endif
}



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux