Skip to content

Commit e24e19b

Browse files
committed
Merge branch 'devel'
2 parents 3460dea + 44384cb commit e24e19b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ntb_hw_switchtec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
383383
if (size != 0 && xlate_pos < 12)
384384
return -EINVAL;
385385

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

19931994
rc = ntb_register_device(&sndev->ntb);

0 commit comments

Comments
 (0)