Print this page
MFV: illumos-gate@d48defc5a82c2bc955d3c8c9a5a3c7ccea87d5d4
9793 vioblk attach doesn't always fail when it should
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
NEX-4424 kstat module needs cleanup
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
NEX-4420 format(1M) should be able to use device inquiry properties
Reviewed by: Dan McDonald <danmcd@omniti.com>
NEX-4419 blkdev and blkdev drivers should provide inquiry properties
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
re #13879 make libsqlite a real shared lib (tweaks)
  Fix rebuild after pull (remove files left in the way)
  Make sqlite.h SQLITE_VERSION more predictable.
OS-5 Integrate virtio drivers
    integration cleanup (copyrights, cddl 1.0)
port of illumos-1147
    1147 integrate the virtio-block driver
    Reviewed by: Dmitry Yusupov <Dmitry.Yusupov@nexenta.com>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

*** 1,31 **** /* ! * CDDL HEADER START * ! * The contents of this file are subject to the terms of the ! * Common Development and Distribution License (the "License"). ! * You may not use this file except in compliance with the License. ! * ! * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE ! * or http://www.opensolaris.org/os/licensing. ! * See the License for the specific language governing permissions ! * and limitations under the License. ! * ! * When distributing Covered Code, include this CDDL HEADER in each ! * file and include the License file at usr/src/OPENSOLARIS.LICENSE. ! * If applicable, add the following below this CDDL HEADER, with the ! * fields enclosed by brackets "[]" replaced with your own identifying ! * information: Portions Copyright [yyyy] [name of copyright owner] ! * ! * CDDL HEADER END */ /* * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Alexey Zaytsev <alexey.zaytsev@gmail.com> */ #include <sys/modctl.h> #include <sys/blkdev.h> #include <sys/types.h> #include <sys/errno.h> --- 1,25 ---- /* ! * This file and its contents are supplied under the terms of the ! * Common Development and Distribution License ("CDDL"), version 1.0. ! * You may only use this file in accordance with the terms of version ! * 1.0 of the CDDL. * ! * A full copy of the text of the CDDL should have accompanied this ! * source. A copy of the CDDL is also available via the Internet at ! * http://www.illumos.org/license/CDDL. */ /* * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Alexey Zaytsev <alexey.zaytsev@gmail.com> + * Copyright 2017, Joyent Inc. */ + /* + * VirtIO block device driver + */ #include <sys/modctl.h> #include <sys/blkdev.h> #include <sys/types.h> #include <sys/errno.h>
*** 827,843 **** break; case DDI_RESUME: case DDI_PM_RESUME: dev_err(devinfo, CE_WARN, "resume not supported yet"); ! ret = DDI_FAILURE; ! goto exit; default: dev_err(devinfo, CE_WARN, "cmd 0x%x not recognized", cmd); ! ret = DDI_FAILURE; ! goto exit; } sc = kmem_zalloc(sizeof (struct vioblk_softc), KM_SLEEP); ddi_set_driver_private(devinfo, sc); --- 821,835 ---- break; case DDI_RESUME: case DDI_PM_RESUME: dev_err(devinfo, CE_WARN, "resume not supported yet"); ! return (DDI_FAILURE); default: dev_err(devinfo, CE_WARN, "cmd 0x%x not recognized", cmd); ! return (DDI_FAILURE); } sc = kmem_zalloc(sizeof (struct vioblk_softc), KM_SLEEP); ddi_set_driver_private(devinfo, sc);
*** 1027,1038 **** kstat_delete(sc->sc_intrstat); exit_intrstat: mutex_destroy(&sc->lock_devid); cv_destroy(&sc->cv_devid); kmem_free(sc, sizeof (struct vioblk_softc)); ! exit: ! return (ret); } static int vioblk_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd) { --- 1019,1029 ---- kstat_delete(sc->sc_intrstat); exit_intrstat: mutex_destroy(&sc->lock_devid); cv_destroy(&sc->cv_devid); kmem_free(sc, sizeof (struct vioblk_softc)); ! return (DDI_FAILURE); } static int vioblk_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd) {