FreeBSD Bugzilla – Attachment 214925 Details for
Bug 204521
[new driver] [request] Port rtsx from OpenBSD to FreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
add stop cmd from req and reposition sync_dma
write.diff (text/plain), 1.95 KB, created by
Jesper Schmitz Mouridsen
on 2020-05-27 15:46:13 UTC
(
hide
)
Description:
add stop cmd from req and reposition sync_dma
Filename:
MIME Type:
Creator:
Jesper Schmitz Mouridsen
Created:
2020-05-27 15:46:13 UTC
Size:
1.95 KB
patch
obsolete
>diff --git a/rtsx.c b/rtsx.c >index 9473137..157ef30 100644 >--- a/rtsx.c >+++ b/rtsx.c >@@ -1702,7 +1702,6 @@ rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd) > error = rtsx_send_req_get_resp(sc, cmd); > if (error) > return (error); >- } > > /* Configure DMA transfer mode parameters. */ > if (cmd->opcode == MMC_READ_MULTIPLE_BLOCK) >@@ -1727,7 +1726,7 @@ rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd) > * sent the write command and gotten the response, and will > * send CMD 12 manually after writing multiple blocks. > */ >- tmode = RTSX_TM_AUTO_WRITE3; >+ tmode = RTSX_TM_AUTO_WRITE3; > cfg2 |= RTSX_SD_NO_CALCULATE_CRC7 | RTSX_SD_NO_CHECK_CRC7; > > sc->rtsx_cmd_index = 0; >@@ -1776,14 +1775,12 @@ rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd) > rtsx_send_cmd_nowait(sc, cmd); > > sc->rtsx_intr_status = 0; >- >+ /* Sync data DMA buffer. */ >+ bus_dmamap_sync(sc->rtsx_data_dma_tag, sc->rtsx_data_dmamap, BUS_DMASYNC_PREREAD); >+ bus_dmamap_sync(sc->rtsx_data_dma_tag, sc->rtsx_data_dmamap, BUS_DMASYNC_PREWRITE); > if (!read) > memcpy(sc->rtsx_data_dmamem, cmd->data->data, cmd->data->len); > >- /* Sync data DMA buffer. */ >- bus_dmamap_sync(sc->rtsx_data_dma_tag, sc->rtsx_data_dmamap, BUS_DMASYNC_PREREAD); >- bus_dmamap_sync(sc->rtsx_data_dma_tag, sc->rtsx_data_dmamap, BUS_DMASYNC_PREWRITE); >- > /* Tell the chip where the data buffer is and run the transfer. */ > WRITE4(sc, RTSX_HDBAR, sc->rtsx_data_buffer); > WRITE4(sc, RTSX_HDBCTLR, RTSX_TRIG_DMA | (read ? RTSX_DMA_READ : 0) | >@@ -1799,9 +1796,11 @@ rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd) > bus_dmamap_sync(sc->rtsx_data_dma_tag, sc->rtsx_data_dmamap, BUS_DMASYNC_POSTWRITE); > > if (read) >- memcpy(cmd->data->data, sc->rtsx_data_dmamem, cmd->data->len); >- >- return (error); >+ memcpy(cmd->data->data, sc->rtsx_data_dmamem, cmd->data->len); >+ else >+ rtsx_send_req_get_resp(sc,sc->rtsx_req->stop); >+ >+ return (error); > } > > static int
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 204521
:
209887
|
214731
|
214733
|
214797
|
214840
| 214925 |
214987
|
214992
|
215518
|
215853
|
215874
|
215893
|
215894