Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-cao committed Jan 4, 2024
2 parents 3460dea + 44384cb commit e24e19b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ntb_hw_switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
if (size != 0 && xlate_pos < 12)
return -EINVAL;

if (!IS_ALIGNED(addr, BIT_ULL(xlate_pos))) {
if (size != 0 && !IS_ALIGNED(addr, BIT_ULL(xlate_pos))) {
/*
* In certain circumstances we can get a buffer that is
* not aligned to its size. (Most of the time
Expand Down Expand Up @@ -1988,6 +1988,7 @@ static int switchtec_ntb_add(struct device *dev,
* still up. Tell them to force it down (it will go back up
* once we register the ntb device).
*/
switchtec_ntb_setup_crosslink(sndev);
switchtec_ntb_send_msg(sndev, LINK_MESSAGE, MSG_LINK_FORCE_DOWN);

rc = ntb_register_device(&sndev->ntb);
Expand Down

0 comments on commit e24e19b

Please sign in to comment.