lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] nvme: Add Arbitration Burst support
On Tue, Jun 23, 2020 at 07:57:15PM -0700, Keith Busch wrote:
> On Tue, Jun 23, 2020 at 09:24:32PM +0800, Baolin Wang wrote:
> > +void nvme_set_arbitration_burst(struct nvme_ctrl *ctrl)
> > +{
> > + u32 result;
> > + int status;
> > +
> > + if (!ctrl->rab)
> > + return;
> > +
> > + /*
> > + * The Arbitration Burst setting indicates the maximum number of
> > + * commands that the controller may launch at one time from a
> > + * particular Submission Queue. It is recommended that host software
> > + * configure the Arbitration Burst setting as close to the recommended
> > + * value by the controller as possible.
> > + */
> > + status = nvme_set_features(ctrl, NVME_FEAT_ARBITRATION, ctrl->rab,
>
> Since 'rab' is an 8-bit field, but the feature's AB value is only 3
> bits, we should add a validity check.

Sure.

>
> > +}
> > +EXPORT_SYMBOL_GPL(nvme_set_arbitration_burst);
>
> I don't see any particular reason to export this function just for the
> pci transport to use. Just make it a local static function an call it
> from nvme_init_identify().

OK. Thanks.

\
 
 \ /
  Last update: 2020-06-24 05:07    [W:0.107 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site