PERFORCE change 171422 for review

Alexander Motin mav at FreeBSD.org
Sat Dec 5 19:34:45 UTC 2009


http://p4web.freebsd.org/chv.cgi?CH=171422

Change 171422 by mav at mav_mavtest on 2009/12/05 19:34:27

	Allow all ata(4) supported controllers, except some specifically handled
	to use transfers up to MAXPHYS or 255 pages size. PCI ATA BM spec
	defines many restrictions on data, but there is no limit on total size.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-dma.c#17 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#19 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#14 edit

Differences ...

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

@@ -76,7 +76,7 @@
     ch->dma.alignment = 2;
     ch->dma.boundary = 65536;
     ch->dma.segsize = 65536;
-    ch->dma.max_iosize = 128 * DEV_BSIZE;
+    ch->dma.max_iosize = MIN((ATA_DMA_ENTRIES - 1) * PAGE_SIZE, MAXPHYS);
     ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT;
     ch->dma.dma_slots = 1;
 

==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#19 (text+ko) ====

@@ -607,8 +607,6 @@
     /* chip does not reliably do 64K DMA transfers */
     if (ctlr->chip->cfg2 == MV_50XX || ctlr->chip->cfg2 == MV_60XX)
 	ch->dma.max_iosize = 64 * DEV_BSIZE;
-    else
-	ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE;
 }
 
 ATA_DECLARE_DRIVER(ata_marvell);

==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#14 (text+ko) ====

@@ -321,7 +321,6 @@
 	ATA_OUTL(ctlr->r_res2, 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16));
     }
 
-    ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE;
     if (ctlr->chip->cfg2 & SII_BUG) {
 	/* work around errata in early chips */
 	ch->dma.boundary = 8192;


More information about the p4-projects mailing list