From owner-svn-soc-all@FreeBSD.ORG Sat Sep 14 16:03:47 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B27592F for ; Sat, 14 Sep 2013 16:03:47 +0000 (UTC) (envelope-from zcore@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 284A92D93 for ; Sat, 14 Sep 2013 16:03:47 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8EG3ltv086368 for ; Sat, 14 Sep 2013 16:03:47 GMT (envelope-from zcore@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r8EG3lUi086363 for svn-soc-all@FreeBSD.org; Sat, 14 Sep 2013 16:03:47 GMT (envelope-from zcore@FreeBSD.org) Date: Sat, 14 Sep 2013 16:03:47 GMT Message-Id: <201309141603.r8EG3lUi086363@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to zcore@FreeBSD.org using -f From: zcore@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257338 - soc2013/zcore/head/usr.sbin/bhyve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2013 16:03:47 -0000 Author: zcore Date: Sat Sep 14 16:03:46 2013 New Revision: 257338 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257338 Log: correct ATAPI sectors Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Sat Sep 14 16:03:03 2013 (r257337) +++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Sat Sep 14 16:03:46 2013 (r257338) @@ -637,6 +637,7 @@ uint32_t *ptr = (uint32_t *)buf; sectors = blockif_size(p->bctx) / blockif_sectsz(p->bctx); + sectors >>= 2; ptr[0] = cpu_to_be32(sectors - 1); ptr[1] = cpu_to_be32(2048); cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; @@ -694,6 +695,7 @@ *bp++ = 0xaa; *bp++ = 0; sectors = blockif_size(p->bctx) / blockif_sectsz(p->bctx); + sectors >>= 2; if (msf) { *bp++ = 0; lba_to_msf(bp, sectors); @@ -770,6 +772,7 @@ *bp++ = 0; *bp++ = 0; sectors = blockif_size(p->bctx) / blockif_sectsz(p->bctx); + sectors >>= 2; if (msf) { *bp++ = 0; lba_to_msf(bp, sectors);