From owner-svn-src-head@freebsd.org Thu Jul 21 03:11:36 2016 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 96BECB9E886; Thu, 21 Jul 2016 03:11:36 +0000 (UTC) (envelope-from imp@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 5AE591AA2; Thu, 21 Jul 2016 03:11:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6L3BZig041242; Thu, 21 Jul 2016 03:11:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6L3BZH4041241; Thu, 21 Jul 2016 03:11:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201607210311.u6L3BZH4041241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Jul 2016 03:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303123 - head/sys/cam 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.22 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: Thu, 21 Jul 2016 03:11:36 -0000 Author: imp Date: Thu Jul 21 03:11:35 2016 New Revision: 303123 URL: https://svnweb.freebsd.org/changeset/base/303123 Log: Fix mismerge and include the nvme support. Also, print out the name of any CCB's functions that's not supported. MFC after: 1 week Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jul 21 00:53:14 2016 (r303122) +++ head/sys/cam/cam_xpt.c Thu Jul 21 03:11:35 2016 (r303123) @@ -1033,6 +1033,8 @@ xpt_announce_periph(struct cam_periph *p else if (path->device->protocol == PROTO_SEMB) semb_print_ident( (struct sep_identify_data *)&path->device->ident_data); + else if (path->device->protocol == PROTO_NVME) + nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data); else printf("Unknown protocol device\n"); if (path->device->serial_num_len > 0) { @@ -1086,6 +1088,8 @@ xpt_denounce_periph(struct cam_periph *p else if (path->device->protocol == PROTO_SEMB) semb_print_ident_short( (struct sep_identify_data *)&path->device->ident_data); + else if (path->device->protocol == PROTO_NVME) + nvme_print_ident(path->device->nvme_cdata, path->device->nvme_data); else printf("Unknown protocol device"); if (path->device->serial_num_len > 0) @@ -2516,6 +2520,10 @@ xpt_action_default(union ccb *start_ccb) if (start_ccb->ccb_h.func_code == XPT_ATA_IO) start_ccb->ataio.resid = 0; /* FALLTHROUGH */ + case XPT_NVME_IO: + if (start_ccb->ccb_h.func_code == XPT_NVME_IO) + start_ccb->nvmeio.resid = 0; + /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: case XPT_SMP_IO: @@ -2655,6 +2663,8 @@ call_sim: cgd->inq_data = dev->inq_data; cgd->ident_data = dev->ident_data; cgd->inq_flags = dev->inq_flags; + cgd->nvme_data = dev->nvme_data; + cgd->nvme_cdata = dev->nvme_cdata; cgd->ccb_h.status = CAM_REQ_CMP; cgd->serial_num_len = dev->serial_num_len; if ((dev->serial_num_len > 0) @@ -3011,8 +3021,10 @@ call_sim: case XPT_TERM_IO: case XPT_ENG_INQ: /* XXX Implement */ - printf("%s: CCB type %#x not supported\n", __func__, - start_ccb->ccb_h.func_code); + xpt_print_path(start_ccb->ccb_h.path); + printf("%s: CCB type %#x %s not supported\n", __func__, + start_ccb->ccb_h.func_code, + xpt_action_name(start_ccb->ccb_h.func_code)); start_ccb->ccb_h.status = CAM_PROVIDE_FAIL; if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) { xpt_done(start_ccb); @@ -3315,6 +3327,13 @@ xpt_run_devq(struct cam_devq *devq) ata_cmd_string(&work_ccb->ataio.cmd, cdb_str, sizeof(cdb_str)))); break; + case XPT_NVME_IO: + CAM_DEBUG(work_ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. NCB: %s\n", + nvme_op_string(&work_ccb->nvmeio.cmd), + nvme_cmd_string(&work_ccb->nvmeio.cmd, + cdb_str, sizeof(cdb_str)))); + break; default: break; } @@ -3904,6 +3923,9 @@ xpt_bus_register(struct cam_sim *sim, de case XPORT_SATA: new_bus->xport = ata_get_xport(); break; + case XPORT_NVME: + new_bus->xport = nvme_get_xport(); + break; default: new_bus->xport = &xport_default; break;