Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2006 02:14:33 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 110356 for review
Message-ID:  <200611220214.kAM2EXAZ000632@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110356

Change 110356 by imp@imp_lighthouse on 2006/11/22 02:14:23

	increment block to terminate loop
	try to get counts right, but something isn't quite right...

Affected files ...

.. //depot/projects/arm/src/sys/dev/flash/at45d.c#10 edit

Differences ...

==== //depot/projects/arm/src/sys/dev/flash/at45d.c#10 (text+ko) ====

@@ -257,7 +257,7 @@
 	at45d_get_mfg_info(sc->dev, buf);
 	printf("Reply is %#x %#x %#x %#x\n", buf[0], buf[1], buf[2], buf[3]);
 	at45d_wait_for_device_ready(sc->dev);
-	printf("Status is %#x\b", at45d_get_status(sc->dev));
+	printf("Status is %#x\n", at45d_get_status(sc->dev));
 
 	sc->disk = disk_alloc();
 	sc->disk->d_open = at45d_open;
@@ -324,8 +324,9 @@
 		bioq_remove(&sc->bio_queue, bp);
 		AT45D_UNLOCK(sc);
 		sz = sc->disk->d_sectorsize;
+		printf("Size is %d\n", sz);
 		end = bp->bio_pblkno + (bp->bio_bcount / sz);
-		for (block = bp->bio_pblkno; block < end; ) {
+		for (block = bp->bio_pblkno; block < end; block++) {
 			char *vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz;
 			if (bp->bio_cmd == BIO_READ)
 				txBuf[0] = CONTINUOUS_ARRAY_READ_HF;
@@ -335,6 +336,7 @@
 			txBuf[1] = ((block >> 5) & 0xFF);
 			txBuf[2] = ((block << 3) & 0xF8);
 			txBuf[3] = 0;
+			txBuf[4] = 0;
 			cmd.tx_cmd = txBuf;
 			cmd.tx_cmd_sz = 5;
 			cmd.rx_cmd = rxBuf;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611220214.kAM2EXAZ000632>