diff mbox series

[for-next,v2,1/2] RDMA/efa: Fix setting of wrong bit in get/set_feature commands

Message ID 20200512152204.93091-2-galpress@amazon.com (mailing list archive)
State Mainlined
Commit cc8a635e24acf2793605f243c913c51b8c3702ab
Delegated to: Jason Gunthorpe
Headers show
Series EFA host information | expand

Commit Message

Gal Pressman May 12, 2020, 3:22 p.m. UTC
When using a control buffer the ctrl_data bit should be set in order to
indicate the control buffer address is valid, not ctrl_data_indirect
which is used when the control buffer itself is indirect.

Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Gunthorpe May 20, 2020, 12:04 a.m. UTC | #1
On Tue, May 12, 2020 at 06:22:03PM +0300, Gal Pressman wrote:
> When using a control buffer the ctrl_data bit should be set in order to
> indicate the control buffer address is valid, not ctrl_data_indirect
> which is used when the control buffer itself is indirect.
> 
> Reviewed-by: Firas JahJah <firasj@amazon.com>
> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> Signed-off-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

No fixes line??

Jason
Gal Pressman May 20, 2020, 8:03 a.m. UTC | #2
On 20/05/2020 3:04, Jason Gunthorpe wrote:
> On Tue, May 12, 2020 at 06:22:03PM +0300, Gal Pressman wrote:
>> When using a control buffer the ctrl_data bit should be set in order to
>> indicate the control buffer address is valid, not ctrl_data_indirect
>> which is used when the control buffer itself is indirect.
>>
>> Reviewed-by: Firas JahJah <firasj@amazon.com>
>> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
>> Signed-off-by: Gal Pressman <galpress@amazon.com>
>> ---
>>  drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> No fixes line??

The reason I didn't add a fixes line (and sent it to for-next) is that it turns
out this is the first set feature command to use a control buffer so nothing was
broken, but this is necessary for patch #2 to work.
Jason Gunthorpe May 21, 2020, 1:57 p.m. UTC | #3
On Wed, May 20, 2020 at 11:03:00AM +0300, Gal Pressman wrote:
> On 20/05/2020 3:04, Jason Gunthorpe wrote:
> > On Tue, May 12, 2020 at 06:22:03PM +0300, Gal Pressman wrote:
> >> When using a control buffer the ctrl_data bit should be set in order to
> >> indicate the control buffer address is valid, not ctrl_data_indirect
> >> which is used when the control buffer itself is indirect.
> >>
> >> Reviewed-by: Firas JahJah <firasj@amazon.com>
> >> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> >> Signed-off-by: Gal Pressman <galpress@amazon.com>
> >>  drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > No fixes line??
> 
> The reason I didn't add a fixes line (and sent it to for-next) is that it turns
> out this is the first set feature command to use a control buffer so nothing was
> broken, but this is necessary for patch #2 to work.

It should probably still have a fixes line in case someone decided to
backport the 2nd patch. But applied without

Jason
Gal Pressman May 21, 2020, 2:06 p.m. UTC | #4
On 21/05/2020 16:57, Jason Gunthorpe wrote:
> On Wed, May 20, 2020 at 11:03:00AM +0300, Gal Pressman wrote:
>> On 20/05/2020 3:04, Jason Gunthorpe wrote:
>>> On Tue, May 12, 2020 at 06:22:03PM +0300, Gal Pressman wrote:
>>>> When using a control buffer the ctrl_data bit should be set in order to
>>>> indicate the control buffer address is valid, not ctrl_data_indirect
>>>> which is used when the control buffer itself is indirect.
>>>>
>>>> Reviewed-by: Firas JahJah <firasj@amazon.com>
>>>> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
>>>> Signed-off-by: Gal Pressman <galpress@amazon.com>
>>>>  drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> No fixes line??
>>
>> The reason I didn't add a fixes line (and sent it to for-next) is that it turns
>> out this is the first set feature command to use a control buffer so nothing was
>> broken, but this is necessary for patch #2 to work.
> 
> It should probably still have a fixes line in case someone decided to
> backport the 2nd patch. But applied without

Hmm, you're right.
If it isn't too late:
Fixes: e9c6c5373088 ("RDMA/efa: Add common command handlers")

Thanks
Jason Gunthorpe May 21, 2020, 2:11 p.m. UTC | #5
On Thu, May 21, 2020 at 05:06:28PM +0300, Gal Pressman wrote:
> On 21/05/2020 16:57, Jason Gunthorpe wrote:
> > On Wed, May 20, 2020 at 11:03:00AM +0300, Gal Pressman wrote:
> >> On 20/05/2020 3:04, Jason Gunthorpe wrote:
> >>> On Tue, May 12, 2020 at 06:22:03PM +0300, Gal Pressman wrote:
> >>>> When using a control buffer the ctrl_data bit should be set in order to
> >>>> indicate the control buffer address is valid, not ctrl_data_indirect
> >>>> which is used when the control buffer itself is indirect.
> >>>>
> >>>> Reviewed-by: Firas JahJah <firasj@amazon.com>
> >>>> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> >>>> Signed-off-by: Gal Pressman <galpress@amazon.com>
> >>>>  drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++--
> >>>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> No fixes line??
> >>
> >> The reason I didn't add a fixes line (and sent it to for-next) is that it turns
> >> out this is the first set feature command to use a control buffer so nothing was
> >> broken, but this is necessary for patch #2 to work.
> > 
> > It should probably still have a fixes line in case someone decided to
> > backport the 2nd patch. But applied without
> 
> Hmm, you're right.
> If it isn't too late:
> Fixes: e9c6c5373088 ("RDMA/efa: Add common command handlers")

Okay done

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.c b/drivers/infiniband/hw/efa/efa_com_cmd.c
index eea5574a62e8..69f842c92ff6 100644
--- a/drivers/infiniband/hw/efa/efa_com_cmd.c
+++ b/drivers/infiniband/hw/efa/efa_com_cmd.c
@@ -388,7 +388,7 @@  static int efa_com_get_feature_ex(struct efa_com_dev *edev,
 
 	if (control_buff_size)
 		EFA_SET(&get_cmd.aq_common_descriptor.flags,
-			EFA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT, 1);
+			EFA_ADMIN_AQ_COMMON_DESC_CTRL_DATA, 1);
 
 	efa_com_set_dma_addr(control_buf_dma_addr,
 			     &get_cmd.control_buffer.address.mem_addr_high,
@@ -540,7 +540,7 @@  static int efa_com_set_feature_ex(struct efa_com_dev *edev,
 	if (control_buff_size) {
 		set_cmd->aq_common_descriptor.flags = 0;
 		EFA_SET(&set_cmd->aq_common_descriptor.flags,
-			EFA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT, 1);
+			EFA_ADMIN_AQ_COMMON_DESC_CTRL_DATA, 1);
 		efa_com_set_dma_addr(control_buf_dma_addr,
 				     &set_cmd->control_buffer.address.mem_addr_high,
 				     &set_cmd->control_buffer.address.mem_addr_low);