From owner-p4-projects@FreeBSD.ORG Sat Dec 5 19:34:45 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 10BBC1065679; Sat, 5 Dec 2009 19:34:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C93B41065670 for ; Sat, 5 Dec 2009 19:34:44 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B6D398FC0C for ; Sat, 5 Dec 2009 19:34:44 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5JYi6N067896 for ; Sat, 5 Dec 2009 19:34:44 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nB5JYiAo067894 for perforce@freebsd.org; Sat, 5 Dec 2009 19:34:44 GMT (envelope-from mav@freebsd.org) Date: Sat, 5 Dec 2009 19:34:44 GMT Message-Id: <200912051934.nB5JYiAo067894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 171422 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 19:34:45 -0000 http://p4web.freebsd.org/chv.cgi?CH=171422 Change 171422 by mav@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;