PERFORCE change 169341 for review

Alexander Motin mav at FreeBSD.org
Fri Oct 9 10:21:11 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=169341

Change 169341 by mav at mav_mavtest on 2009/10/09 10:20:45

	Fix two timeout-related bugs in ata(4) wrapper.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#29 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#20 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#29 (text+ko) ====

@@ -1278,7 +1278,7 @@
 	request->transfersize = min(request->bytecount, 16*512);
 //	request->callback = ad_done;
 	request->retries = 0;
-	request->timeout = ccb->ccb_h.timeout / 1000;
+	request->timeout = (ccb->ccb_h.timeout + 999) / 1000;
 	callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED);
 	request->ccb = ccb;
 

==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#20 (text+ko) ====

@@ -514,6 +514,8 @@
 	if (ch->dma.unload)
 	    ch->dma.unload(request);
 #ifdef ATA_CAM
+	ch->running = NULL;
+	ch->state = ATA_IDLE;
 	ata_cam_end_transaction(ch->dev, request);
 #endif
 	mtx_unlock(&ch->state_mtx);


More information about the p4-projects mailing list