From patchwork Wed Jul 31 18:19:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11069079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4379513A4 for ; Wed, 31 Jul 2019 18:24:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31BC720069 for ; Wed, 31 Jul 2019 18:24:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25FB227F54; Wed, 31 Jul 2019 18:24:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C390220069 for ; Wed, 31 Jul 2019 18:24:15 +0000 (UTC) Received: from localhost ([::1]:43614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hstGp-00050J-5m for patchwork-qemu-devel@patchwork.kernel.org; Wed, 31 Jul 2019 14:24:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50675) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hstCh-0002V1-D0 for qemu-devel@nongnu.org; Wed, 31 Jul 2019 14:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hstCg-0001Iy-9i for qemu-devel@nongnu.org; Wed, 31 Jul 2019 14:19:59 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44025 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hstCg-0001II-3S for qemu-devel@nongnu.org; Wed, 31 Jul 2019 14:19:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 08B851A22A8; Wed, 31 Jul 2019 20:19:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id D6DAF1A22AB; Wed, 31 Jul 2019 20:19:55 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 31 Jul 2019 20:19:36 +0200 Message-Id: <1564597178-24649-11-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564597178-24649-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564597178-24649-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH for 4.2 v4 10/12] linux-user: Add support for HDIO_GET_BUSSTATE and HDIO_SET_BUSSTATE ioctls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic Add support for HDIO_GET_BUSSTATE and HDIO_SET_BUSSTATE ioctls. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index b9c6a5a..3796ee6 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -438,6 +438,7 @@ IOCTL(HDIO_GET_WCACHE, IOC_R, MK_PTR(TYPE_INT)) IOCTL(HDIO_GET_ACOUSTIC, IOC_R, MK_PTR(TYPE_INT)) IOCTL(HDIO_GET_ADDRESS, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(HDIO_GET_BUSSTATE, IOC_R, MK_PTR(TYPE_INT)) IOCTL(HDIO_DRIVE_CMD, IOC_R, MK_PTR(TYPE_INT)) IOCTL(HDIO_SET_UNMASKINTR, 0, TYPE_INT) IOCTL(HDIO_SET_MULTCOUNT, 0, TYPE_INT) @@ -449,6 +450,7 @@ IOCTL(HDIO_SET_NICE, 0, TYPE_INT) IOCTL(HDIO_SET_WCACHE, 0, TYPE_INT) IOCTL(HDIO_SET_ACOUSTIC, 0, TYPE_INT) + IOCTL(HDIO_SET_BUSSTATE, 0, TYPE_INT) IOCTL(HDIO_SET_ADDRESS, 0, TYPE_INT) IOCTL(VFAT_IOCTL_READDIR_BOTH, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2))) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index aa9c6af..766d7b9 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1069,6 +1069,7 @@ struct target_format_descr { #define TARGET_HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ #define TARGET_HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ #define TARGET_HDIO_GET_ADDRESS 0x0310 /* get lba addressing modes */ +#define TARGET_HDIO_GET_BUSSTATE 0x031a /* get hwif bus state */ #define TARGET_HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ /* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ @@ -1082,6 +1083,7 @@ struct target_format_descr { #define TARGET_HDIO_SET_NICE 0x0329 /* set nice flags */ #define TARGET_HDIO_SET_WCACHE 0x032b /* change write cache mode */ #define TARGET_HDIO_SET_ACOUSTIC 0x032c /* change acoustic behavior */ +#define TARGET_HDIO_SET_BUSSTATE 0x032d /* set hwif bus state */ #define TARGET_HDIO_SET_ADDRESS 0x032f /* change lba addressing modes */ /* loop ioctls */