nvme.h (248760) | nvme.h (248767) |
---|---|
1/*- 2 * Copyright (C) 2012 Intel Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (C) 2012 Intel Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/nvme/nvme.h 248760 2013-03-26 21:08:32Z jimharris $ | 26 * $FreeBSD: head/sys/dev/nvme/nvme.h 248767 2013-03-26 21:58:38Z jimharris $ |
27 */ 28 29#ifndef __NVME_H__ 30#define __NVME_H__ 31 32#ifdef _KERNEL 33#include <sys/types.h> 34#endif --- 693 unchanged lines hidden (view full) --- 728struct nvme_consumer; 729 730typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *); 731 732typedef void *(*nvme_cons_ns_fn_t)(struct nvme_namespace *, void *); 733typedef void *(*nvme_cons_ctrlr_fn_t)(struct nvme_controller *); 734typedef void (*nvme_cons_async_fn_t)(void *, const struct nvme_completion *, 735 uint32_t, void *, uint32_t); | 27 */ 28 29#ifndef __NVME_H__ 30#define __NVME_H__ 31 32#ifdef _KERNEL 33#include <sys/types.h> 34#endif --- 693 unchanged lines hidden (view full) --- 728struct nvme_consumer; 729 730typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *); 731 732typedef void *(*nvme_cons_ns_fn_t)(struct nvme_namespace *, void *); 733typedef void *(*nvme_cons_ctrlr_fn_t)(struct nvme_controller *); 734typedef void (*nvme_cons_async_fn_t)(void *, const struct nvme_completion *, 735 uint32_t, void *, uint32_t); |
736typedef void (*nvme_cons_fail_fn_t)(void *); |
|
736 737enum nvme_namespace_flags { 738 NVME_NS_DEALLOCATE_SUPPORTED = 0x1, 739 NVME_NS_FLUSH_SUPPORTED = 0x2, 740}; 741 742/* Admin functions */ 743void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, --- 20 unchanged lines hidden (view full) --- 764 uint8_t num_ranges, nvme_cb_fn_t cb_fn, 765 void *cb_arg); 766int nvme_ns_cmd_flush(struct nvme_namespace *ns, nvme_cb_fn_t cb_fn, 767 void *cb_arg); 768 769/* Registration functions */ 770struct nvme_consumer * nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, 771 nvme_cons_ctrlr_fn_t ctrlr_fn, | 737 738enum nvme_namespace_flags { 739 NVME_NS_DEALLOCATE_SUPPORTED = 0x1, 740 NVME_NS_FLUSH_SUPPORTED = 0x2, 741}; 742 743/* Admin functions */ 744void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, --- 20 unchanged lines hidden (view full) --- 765 uint8_t num_ranges, nvme_cb_fn_t cb_fn, 766 void *cb_arg); 767int nvme_ns_cmd_flush(struct nvme_namespace *ns, nvme_cb_fn_t cb_fn, 768 void *cb_arg); 769 770/* Registration functions */ 771struct nvme_consumer * nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, 772 nvme_cons_ctrlr_fn_t ctrlr_fn, |
772 nvme_cons_async_fn_t async_fn); | 773 nvme_cons_async_fn_t async_fn, 774 nvme_cons_fail_fn_t fail_fn); |
773void nvme_unregister_consumer(struct nvme_consumer *consumer); 774 775/* Controller helper functions */ 776device_t nvme_ctrlr_get_device(struct nvme_controller *ctrlr); 777const struct nvme_controller_data * 778 nvme_ctrlr_get_data(struct nvme_controller *ctrlr); 779 780/* Namespace helper functions */ --- 16 unchanged lines hidden --- | 775void nvme_unregister_consumer(struct nvme_consumer *consumer); 776 777/* Controller helper functions */ 778device_t nvme_ctrlr_get_device(struct nvme_controller *ctrlr); 779const struct nvme_controller_data * 780 nvme_ctrlr_get_data(struct nvme_controller *ctrlr); 781 782/* Namespace helper functions */ --- 16 unchanged lines hidden --- |