From owner-svn-src-head@FreeBSD.ORG Wed Jul 8 06:00:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88282106564A; Wed, 8 Jul 2009 06:00:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7686A8FC1B; Wed, 8 Jul 2009 06:00:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6860L1r040263; Wed, 8 Jul 2009 06:00:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6860L9D040261; Wed, 8 Jul 2009 06:00:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907080600.n6860L9D040261@svn.freebsd.org> From: Alexander Motin Date: Wed, 8 Jul 2009 06:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195439 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 06:00:21 -0000 Author: mav Date: Wed Jul 8 06:00:21 2009 New Revision: 195439 URL: http://svn.freebsd.org/changeset/base/195439 Log: Fix kernel panic, when ataahci driver is used on system with increased MAXPHYS. Current ataahci driver memory allocation scheme includes only 64 items in DMA S/G table, and so not guarantied to support transactions with more then 252K data. Approved by: re (kensmith) MFC after: 2 weeks Modified: head/sys/dev/ata/chipsets/ata-ahci.c Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Wed Jul 8 06:00:18 2009 (r195438) +++ head/sys/dev/ata/chipsets/ata-ahci.c Wed Jul 8 06:00:21 2009 (r195439) @@ -914,7 +914,7 @@ ata_ahci_dmainit(device_t dev) ata_dmainit(dev); /* note start and stop are not used here */ ch->dma.setprd = ata_ahci_dmasetprd; - ch->dma.max_iosize = 8192 * DEV_BSIZE; + ch->dma.max_iosize = (ATA_AHCI_DMA_ENTRIES - 1) * PAGE_SIZE; if (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_64BIT) ch->dma.max_address = BUS_SPACE_MAXADDR; }