Date: Thu, 22 Jan 2009 22:29:21 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187603 - head/sys/arm/at91 Message-ID: <200901222229.n0MMTLdF024141@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Jan 22 22:29:21 2009 New Revision: 187603 URL: http://svn.freebsd.org/changeset/base/187603 Log: Don't over-commit the DMA. Use the passed in size of the transfer rather than a fixed 512... This fixes the mount root problem on at91. Prior to the SD card reorg, all data transfers were 512 bytes, so we didn't notice. Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Thu Jan 22 21:56:41 2009 (r187602) +++ head/sys/arm/at91/at91_mci.c Thu Jan 22 22:29:21 2009 (r187603) @@ -313,7 +313,6 @@ at91_mci_start_cmd(struct at91_mci_softc int i; struct mmc_data *data; struct mmc_request *req; - size_t block_size = 1 << 9; // Fixed, per mmc/sd spec for 2GB cards void *vaddr; bus_addr_t paddr; @@ -355,7 +354,7 @@ at91_mci_start_cmd(struct at91_mci_softc // Set block size and turn on PDC mode for dma xfer and disable // PDC until we're ready. mr = RD4(sc, MCI_MR) & ~MCI_MR_BLKLEN; - WR4(sc, MCI_MR, mr | (block_size << 16) | MCI_MR_PDCMODE); + WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE); WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS); if (cmdr & MCI_CMDR_TRCMD_START) { if (cmdr & MCI_CMDR_TRDIR)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901222229.n0MMTLdF024141>