From owner-svn-src-head@freebsd.org Tue Apr 18 19:36:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DD5ED42AC0; Tue, 18 Apr 2017 19:36:59 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA2C159C; Tue, 18 Apr 2017 19:36:59 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3IJawO2060672; Tue, 18 Apr 2017 19:36:58 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3IJawY6060671; Tue, 18 Apr 2017 19:36:58 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201704181936.v3IJawY6060671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 18 Apr 2017 19:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317099 - head/sys/boot/uboot/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 18 Apr 2017 19:36:59 -0000 Author: tsoome Date: Tue Apr 18 19:36:58 2017 New Revision: 317099 URL: https://svnweb.freebsd.org/changeset/base/317099 Log: loader: uboot disk ioctl should call disk_ioctl As the uboot disk interface is using common/disk.c API, we also should use disk_ioctl() call, this will give us chance to read partition sizes and have feature parity with UEFI and BIOS implementations. This does also fix arm boot issue on some systems, reported/tested by Ian, thanks. Reported by: ian Reviewed by: ian Differential Revision: https://reviews.freebsd.org/D10421 Modified: head/sys/boot/uboot/lib/disk.c Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Tue Apr 18 19:15:06 2017 (r317098) +++ head/sys/boot/uboot/lib/disk.c Tue Apr 18 19:36:58 2017 (r317099) @@ -275,8 +275,13 @@ static int stor_ioctl(struct open_file *f, u_long cmd, void *data) { struct disk_devdesc *dev; + int rc; dev = (struct disk_devdesc *)f->f_devdata; + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + switch (cmd) { case DIOCGSECTORSIZE: *(u_int *)data = SI(dev).bsize;