bcm2711_pcie.c (eb76c742) | bcm2711_pcie.c (a8a0f531) |
---|---|
1/* $OpenBSD: bcm2711_pcie.c,v 1.9 2021/12/04 16:08:02 kettenis Exp $ */ | 1/* $OpenBSD: bcm2711_pcie.c,v 1.10 2021/12/06 18:02:58 kettenis Exp $ */ |
2/* 3 * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 536 unchanged lines hidden (view full) --- 546 struct bcmpcie_softc *sc = t->_cookie; 547 int seg, error; 548 549 error = sc->sc_dmat->_dmamap_load_raw(sc->sc_dmat, map, 550 segs, nsegs, size, flags); 551 if (error) 552 return error; 553 | 2/* 3 * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 536 unchanged lines hidden (view full) --- 546 struct bcmpcie_softc *sc = t->_cookie; 547 int seg, error; 548 549 error = sc->sc_dmat->_dmamap_load_raw(sc->sc_dmat, map, 550 segs, nsegs, size, flags); 551 if (error) 552 return error; 553 |
554 if (sc->sc_dmaranges == NULL) 555 return 0; 556 |
|
554 /* For each segment. */ 555 for (seg = 0; seg < map->dm_nsegs; seg++) { 556 uint64_t addr = map->dm_segs[seg].ds_addr; 557 uint64_t size = map->dm_segs[seg].ds_len; 558 int i; 559 560 /* For each range. */ 561 for (i = 0; i < sc->sc_ndmaranges; i++) { --- 18 unchanged lines hidden --- | 557 /* For each segment. */ 558 for (seg = 0; seg < map->dm_nsegs; seg++) { 559 uint64_t addr = map->dm_segs[seg].ds_addr; 560 uint64_t size = map->dm_segs[seg].ds_len; 561 int i; 562 563 /* For each range. */ 564 for (i = 0; i < sc->sc_ndmaranges; i++) { --- 18 unchanged lines hidden --- |