diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-02-04 12:21:37 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-02-04 12:21:37 +0000 |
commit | 86b01acdc561eb9c47f9d9e8c33b2d15e064aed7 (patch) | |
tree | aee1ab58f4d6c0ab894c5d06fa3e32cf92c8714f /usr/src/uts/sun4u/io | |
parent | b69deb59db49c8958cbaea43a0d6bf9029f5b19e (diff) | |
parent | 8bd53a1ca9fba2d5585cc775422e4d1db161bf96 (diff) | |
download | illumos-joyent-86b01acdc561eb9c47f9d9e8c33b2d15e064aed7.tar.gz |
[illumos-gate merge]
commit 8bd53a1ca9fba2d5585cc775422e4d1db161bf96
12255 proc_get_fdinfo() crash if fdinfo file grows
commit 8b06eaf6acc31eaadddc0fec3df9d1a4294b7cc2
12267 zfs '::abuf_find' dcmd is broken
commit a52121ea720d327228a95e9d0c4a426339f08c7f
12260 Fix zpool history unbounded memory usage
commit b5c83661f3899fe50c949117084b15d6478d9f5f
12251 remove sunfire-specific man pages
commit 46782190b8c59b1b5fd7df81b2231ef50061fe2a
12234 Want smbios battery support
commit 9a63ec2733c93e3ee31e95779a4f2f45a57eda59
12183 Want new IPD 13 DMA Cookie APIs
commit 31ad075e90bf5afda8ab4b8cc4d3ca3e89946115
12257 resync smatch to 0.6.1-rc1-il-4
commit 2d85dedb8eaa3ba69c85560030efe4cbc815efb8
12245 Support inheriting properties in zfs channel programs
commit 442c994cdeb1e51c84e6d7ba987af00893aa84c4
12269 mdb multilist walker should be a layered walker
commit 83bba2b4a81b05183e2f81f5601e23cba9972fad
12272 loader: bc_add can not use any other probes than ah=0x4b
Diffstat (limited to 'usr/src/uts/sun4u/io')
-rw-r--r-- | usr/src/uts/sun4u/io/pci/pci.c | 12 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/pci/pci_dma.c | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/usr/src/uts/sun4u/io/pci/pci.c b/usr/src/uts/sun4u/io/pci/pci.c index 15cb498378..d52c973b30 100644 --- a/usr/src/uts/sun4u/io/pci/pci.c +++ b/usr/src/uts/sun4u/io/pci/pci.c @@ -731,6 +731,8 @@ pci_dma_bindhdl(dev_info_t *dip, dev_info_t *rdip, mapped: *ccountp = 1; MAKE_DMA_COOKIE(cookiep, mp->dmai_mapping, mp->dmai_size); + mp->dmai_ncookies = 1; + mp->dmai_curcookie = 1; break; case DMAI_FLAGS_BYPASS: case DMAI_FLAGS_PEER_TO_PEER: @@ -738,6 +740,10 @@ mapped: goto map_err; *ccountp = WINLST(mp)->win_ncookies; *cookiep = *(ddi_dma_cookie_t *)(WINLST(mp) + 1); /* wholeobj */ + /* + * mp->dmai_ncookies and mp->dmai_curcookie are set by + * pci_dma_physwin(). + */ break; default: panic("%s%d: pci_dma_bindhdl(%p): bad dma type", @@ -809,6 +815,8 @@ pci_dma_unbindhdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_handle_t handle) SYNC_BUF_PA(mp) = 0; mp->dmai_error.err_cf = NULL; + mp->dmai_ncookies = 0; + mp->dmai_curcookie = 0; return (DDI_SUCCESS); } @@ -845,6 +853,8 @@ pci_dma_win(dev_info_t *dip, dev_info_t *rdip, mp->dmai_size); if (ccountp) *ccountp = 1; + mp->dmai_ncookies = 1; + mp->dmai_curcookie = 1; break; case DMAI_FLAGS_PEER_TO_PEER: case DMAI_FLAGS_BYPASS: { @@ -863,6 +873,8 @@ pci_dma_win(dev_info_t *dip, dev_info_t *rdip, win_p->win_curseg = 0; if (ccountp) *ccountp = win_p->win_ncookies; + mp->dmai_ncookies = win_p->win_ncookies; + mp->dmai_curcookie = 1; } break; default: diff --git a/usr/src/uts/sun4u/io/pci/pci_dma.c b/usr/src/uts/sun4u/io/pci/pci_dma.c index 9814a69e68..af68d98c98 100644 --- a/usr/src/uts/sun4u/io/pci/pci_dma.c +++ b/usr/src/uts/sun4u/io/pci/pci_dma.c @@ -267,6 +267,8 @@ pci_dma_allocmp(dev_info_t *dip, dev_info_t *rdip, int (*waitfp)(caddr_t), mp->dmai_flags = 0; mp->dmai_pfnlst = NULL; mp->dmai_winlst = NULL; + mp->dmai_ncookies = 0; + mp->dmai_curcookie = 0; /* * kmem_alloc debug: the following fields are not zero-ed @@ -1410,8 +1412,10 @@ pci_dma_physwin(pci_t *pci_p, ddi_dma_req_t *dmareq, ddi_dma_impl_t *mp) } mp->dmai_rflags &= ~DDI_DMA_REDZONE; cookie0_p = (ddi_dma_cookie_t *)(WINLST(mp) + 1); - mp->dmai_cookie = WINLST(mp)->win_ncookies > 1 ? cookie0_p + 1 : 0; + mp->dmai_cookie = cookie0_p + 1; mp->dmai_mapping = cookie0_p->dmac_laddress; + mp->dmai_ncookies = WINLST(mp)->win_ncookies; + mp->dmai_curcookie = 1; pci_dma_freepfn(mp); return (DDI_DMA_MAPPED); |