FreeBSD Bugzilla – Attachment 215490 Details for
Bug 247208
mpt(4): VMWare virtualized LSI controller panics during hot-attach
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
diff (text/plain), 1.53 KB, created by
Mark Johnston
on 2020-06-12 14:58:52 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2020-06-12 14:58:52 UTC
Size:
1.53 KB
patch
obsolete
>diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c >index 6e41ff079e91..c2865ad8d6b4 100644 >--- a/sys/dev/mpt/mpt.c >+++ b/sys/dev/mpt/mpt.c >@@ -2601,17 +2601,19 @@ mpt_dma_buf_free(struct mpt_softc *mpt) > { > int i; > >- if (mpt->request_dmat == 0) { >- mpt_lprt(mpt, MPT_PRT_DEBUG, "already released dma memory\n"); >+ if (mpt->buffer_dmat == NULL) > return; >+ for (i = 0; i < MPT_MAX_REQUESTS(mpt); i++) >+ bus_dmamap_destroy(mpt->buffer_dmat, >+ mpt->request_pool[i].dmap); >+ >+ if (mpt->request_dmat != NULL) { >+ bus_dmamap_unload(mpt->request_dmat, mpt->request_dmap); >+ if (mpt->request != NULL) >+ bus_dmamem_free(mpt->request_dmat, mpt->request, >+ mpt->request_dmap); >+ bus_dma_tag_destroy(mpt->request_dmat); > } >- for (i = 0; i < MPT_MAX_REQUESTS(mpt); i++) { >- bus_dmamap_destroy(mpt->buffer_dmat, mpt->request_pool[i].dmap); >- } >- bus_dmamap_unload(mpt->request_dmat, mpt->request_dmap); >- bus_dmamem_free(mpt->request_dmat, mpt->request, mpt->request_dmap); >- bus_dma_tag_destroy(mpt->request_dmat); >- mpt->request_dmat = 0; > bus_dma_tag_destroy(mpt->buffer_dmat); > } > >diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c >index 94c568c4c205..e1155d9c7529 100644 >--- a/sys/dev/mpt/mpt_pci.c >+++ b/sys/dev/mpt/mpt_pci.c >@@ -651,7 +651,7 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) > } > > len = sizeof (request_t) * MPT_MAX_REQUESTS(mpt); >- mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO); >+ mpt->request_pool = malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); > > /* > * Create a parent dma tag for this device.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247208
: 215490