Date: Mon, 2 Oct 2006 21:03:41 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107121 for review Message-ID: <200610022103.k92L3f43098249@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107121 Change 107121 by imp@imp_lighthouse on 2006/10/02 21:03:08 Typos and fix interface botch Affected files ... .. //depot/projects/arm/src/sys/dev/mmc/mmcsd.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/dev/mmc/mmcsd.c#4 (text+ko) ==== @@ -98,6 +98,8 @@ sc->disk->d_name = "flash/card"; sc->disk->d_drv1 = sc; sc->disk->d_maxsize = DFLTPHYS; + sc->disk->d_sectorsize = mmc_get_sector_size(dev); + sc->disk->d_mediasize = mmc_get_media_size(dev); sc->disk->d_unit = device_get_unit(dev); disk_create(sc->disk, DISK_VERSION); bioq_init(&sc->bio_queue); @@ -121,8 +123,6 @@ sc = (struct mmcsd_softc *)dp->d_drv1; MMCSD_LOCK(sc); - sc->disk->d_sectorsize = mmc_get_sector_size(sc->dev); - sc->disk->d_mediasize = mmc_get_media_size(sc->dev); MMCSD_UNLOCK(sc); return 0; @@ -159,7 +159,7 @@ { struct mmcsd_softc *sc = (struct mmcsd_softc*)arg; struct bio *bp; - int sz, err; + int sz; daddr_t end; struct mmc_command cmd; struct mmc_command stop; @@ -179,12 +179,13 @@ } while (bp == NULL); MMCBUS_ACQUIRE_BUS(device_get_parent(dev), dev); bioq_remove(&sc->bio_queue, bp); - printf("at91_qdmmc_task: request %p\n", bp); + printf("mmc_task: request %p\n", bp); sz = sc->disk->d_sectorsize; end = bp->bio_pblkno + (bp->bio_bcount / sz); // XXX should use read/write_mulit for (block = bp->bio_pblkno; block < end; block++) { char *vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz; + memset(&req, 0, sizeof(req)); req.cmd = &cmd; cmd.data = &data; req.stop = &stop; @@ -207,7 +208,7 @@ stop.arg = 0; stop.flags = MMC_RSP_R1B | MMC_CMD_AC; MMCBUS_WAIT_FOR_REQUEST(device_get_parent(dev), dev, - &req, &err); + &req); // XXX error handling //XXX while (!(mmc_send_status(dev) & R1_READY_FOR_DATA)) // continue; @@ -226,7 +227,7 @@ }; static driver_t mmcsd_driver = { - "mmc", + "mmcsd", mmcsd_methods, sizeof(struct mmcsd_softc), };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610022103.k92L3f43098249>