Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
#include <cam/cam_sim.h> | #include <cam/cam_sim.h> | ||||
#include <cam/cam_xpt_sim.h> | #include <cam/cam_xpt_sim.h> | ||||
#include <cam/cam_xpt_internal.h> | #include <cam/cam_xpt_internal.h> | ||||
#include <cam/cam_debug.h> | #include <cam/cam_debug.h> | ||||
#include <cam/scsi/scsi_all.h> | #include <cam/scsi/scsi_all.h> | ||||
#include <cam/scsi/scsi_message.h> | #include <cam/scsi/scsi_message.h> | ||||
#include <dev/hyperv/include/hyperv.h> | #include <dev/hyperv/include/hyperv.h> | ||||
#include <dev/hyperv/vmbus/hv_vmbus_priv.h> | |||||
#include "hv_vstorage.h" | #include "hv_vstorage.h" | ||||
#define STORVSC_RINGBUFFER_SIZE (20*PAGE_SIZE) | #define STORVSC_RINGBUFFER_SIZE (20*PAGE_SIZE) | ||||
#define STORVSC_MAX_LUNS_PER_TARGET (64) | #define STORVSC_MAX_LUNS_PER_TARGET (64) | ||||
#define STORVSC_MAX_IO_REQUESTS (STORVSC_MAX_LUNS_PER_TARGET * 2) | #define STORVSC_MAX_IO_REQUESTS (STORVSC_MAX_LUNS_PER_TARGET * 2) | ||||
#define BLKVSC_MAX_IDE_DISKS_PER_TARGET (1) | #define BLKVSC_MAX_IDE_DISKS_PER_TARGET (1) | ||||
#define BLKVSC_MAX_IO_REQUESTS STORVSC_MAX_IO_REQUESTS | #define BLKVSC_MAX_IO_REQUESTS STORVSC_MAX_IO_REQUESTS | ||||
#define STORVSC_MAX_TARGETS (2) | #define STORVSC_MAX_TARGETS (2) | ||||
▲ Show 20 Lines • Show All 1,018 Lines • ▼ Show 20 Lines | if (xpt_create_path(&sc->hs_path, /*periph*/NULL, | ||||
mtx_unlock(&sc->hs_lock); | mtx_unlock(&sc->hs_lock); | ||||
device_printf(dev, "Unable to create path\n"); | device_printf(dev, "Unable to create path\n"); | ||||
ret = ENXIO; | ret = ENXIO; | ||||
goto cleanup; | goto cleanup; | ||||
} | } | ||||
mtx_unlock(&sc->hs_lock); | mtx_unlock(&sc->hs_lock); | ||||
ring_buffer_stat(device_get_sysctl_ctx(dev), | |||||
device_get_name(dev), device_get_unit(dev), | |||||
hv_dev->channel); | |||||
root_mount_rel(root_mount_token); | root_mount_rel(root_mount_token); | ||||
return (0); | return (0); | ||||
cleanup: | cleanup: | ||||
root_mount_rel(root_mount_token); | root_mount_rel(root_mount_token); | ||||
while (!LIST_EMPTY(&sc->hs_free_list)) { | while (!LIST_EMPTY(&sc->hs_free_list)) { | ||||
reqp = LIST_FIRST(&sc->hs_free_list); | reqp = LIST_FIRST(&sc->hs_free_list); | ||||
▲ Show 20 Lines • Show All 1,028 Lines • Show Last 20 Lines |