From owner-svn-soc-all@FreeBSD.ORG Sun Sep 15 09:50:43 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 00ECA1F2 for ; Sun, 15 Sep 2013 09:50:42 +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 E1936286B for ; Sun, 15 Sep 2013 09:50:42 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8F9ogQh055475 for ; Sun, 15 Sep 2013 09:50:42 GMT (envelope-from zcore@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r8F9ogdM055458 for svn-soc-all@FreeBSD.org; Sun, 15 Sep 2013 09:50:42 GMT (envelope-from zcore@FreeBSD.org) Date: Sun, 15 Sep 2013 09:50:42 GMT Message-Id: <201309150950.r8F9ogdM055458@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: r257364 - 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: Sun, 15 Sep 2013 09:50:43 -0000 Author: zcore Date: Sun Sep 15 09:50:42 2013 New Revision: 257364 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257364 Log: use self-defined OPCODES 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 Sun Sep 15 09:50:15 2013 (r257363) +++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Sun Sep 15 09:50:42 2013 (r257364) @@ -72,6 +72,22 @@ }; /* + * SCSI opcodes + */ +#define TEST_UNIT_READY 0x00 +#define REQUEST_SENSE 0x03 +#define INQUIRY 0x12 +#define START_STOP_UNIT 0x1B +#define PREVENT_ALLOW 0x1E +#define READ_CAPACITY 0x25 +#define READ_10 0x28 +#define POSITION_TO_ELEMENT 0x2B +#define READ_TOC 0x43 +#define MODE_SENSE_10 0x5A +#define READ_12 0xA8 +#define READ_CD 0xBE + +/* * Debug printf */ #ifdef AHCI_DEBUG @@ -894,28 +910,28 @@ } switch (acmd[0]) { - case ATAPI_TEST_UNIT_READY: + case TEST_UNIT_READY: cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); break; - case ATAPI_INQUIRY: + case INQUIRY: atapi_inquiry(p, slot, cfis); break; - case ATAPI_READ_CAPACITY: + case READ_CAPACITY: atapi_read_capacity(p, slot, cfis); break; - case ATAPI_PREVENT_ALLOW: + case PREVENT_ALLOW: /* TODO */ cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); break; - case ATAPI_READ_TOC: + case READ_TOC: atapi_read_toc(p, slot, cfis); break; - case ATAPI_READ_BIG: + case READ_10: atapi_read(p, slot, cfis); break; - case ATAPI_REQUEST_SENSE: + case REQUEST_SENSE: atapi_request_sense(p, slot, cfis); break; default: