mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0
On switchtec_ntb_mw_set_trans() call, when (only) address == 0, it acts as ntb_mw_clear_trans(). Fix this, since address == 0 and size != 0 is valid combination for setting translation. Signed-off-by: Alexander Fomichev <[email protected]> Reviewed-by: Logan Gunthorpe <[email protected]> Signed-off-by: Jon Mason <[email protected]>
This commit is contained in:
parent
ae89339b08
commit
c16c665560
1 changed files with 1 additions and 1 deletions
|
|
@ -306,7 +306,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (addr == 0 || size == 0) {
|
||||
if (size == 0) {
|
||||
if (widx < nr_direct_mw)
|
||||
switchtec_ntb_mw_clr_direct(sndev, widx);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue