solaris_compatibility.c revision 2948
62N/A#include "../include/infiniband/arch.h"
62N/A#include "../include/infiniband/verbs.h"
2N/A#include "../include/infiniband/kern-abi.h"
59N/A#include "../include/infiniband/driver.h"
* The followings will be removed when changes in hermon_ioctl.h
#ifndef HERMON_GET_HWINFO_IOCTL_SUP
typedef struct hermon_hw_info_ioctl_s {
#pragma pack()
#define MLX4 0
typedef enum cp_prefix_e {
} cp_prefix_t;
typedef struct ibdev_cache_info_s {
int ibd_boardid_index;
typedef struct uverbs_cache_info_s {
int uvc_hca_instance;
typedef struct umad_cache_info_s {
int umc_port;
static int umad_cache_cnt = 0;
static int ibdev_cache_cnt = 0;
static int uverbs_cache_cnt = 0;
solaris_init(void)
solaris_fini(void)
sizeof (ibdev_cache_info_t));
sizeof (uverbs_cache_info_t));
const char *p, *ibdev;
if (!dev_list) {
goto error_exit1;
*dev_list);
goto error_exit2;
goto error_exit2;
dev_num);
goto error_exit2;
ret = 0;
if (root_dev_list)
return (ret);
#ifndef IB_USER_VERBS_V2_IN_V1
char *buf;
goto error_exit1;
#ifndef IB_USER_VERBS_V2_IN_V1
#ifndef IB_USER_VERBS_V2_IN_V1
goto error_exit2;
goto error_exit2;
goto error_exit2;
goto error_exit2;
int save_errno = 0;
minor);
if (! save_errno)
goto error_exit;
goto error_exit;
goto error_exit;
initialize(void)
minor);
switch (prefix) {
case CP_SOL_UVERBS:
&pos);
case CP_DEVICE:
case CP_D:
case CP_GIDS:
case CP_PKEYS:
case CP_MLX4:
case CP_PORTS:
case CP_UMAD:
case CP_SLASH:
case CP_SYS:
case CP_CLASS:
case CP_INFINIBAND_VERBS:
case CP_INFINIBAND:
case CP_INFINIBAND_MAD:
case CP_MISC:
case CP_RDMA_CM:
pos ++;
static ibdev_cache_info_t *
const char *p = devname;
int dev_num;
return (NULL);
if (!ibdev_cache_initialized) {
if (ibdev_cache_init()) {
return (NULL);
return (NULL);
return (NULL);
return (info);
if (!dev_list) {
goto error_exit1;
if (i == num_dev) {
goto error_exit2;
goto error_exit2;
goto error_exit3;
if (gid_table) {
if (!gids)
goto error_exit3;
gids);
if (rv != 0)
goto error_exit4;
if (pkey_table) {
if (!pkeys)
goto error_exit4;
pkeys);
if (rv != 0)
goto error_exit5;
ret = 0;
if (pkeys)
if (gids)
if (root_dev_list)
return (ret);
int fd;
#ifndef _LP64
int tmpfd;
int uverbs_indx;
NULL, 0);
goto err_dev;
goto err_dev;
if (fd < 0) {
goto err_dev;
#ifndef _LP64
if (tmpfd >= 0) {
goto err_close;
return (fd);
unsigned int device_num;
goto exit;
if (!uverbs_cache_initialized) {
if (uverbs_cache_init())
#ifdef DEBUG
goto exit;
goto exit;
goto exit;
goto exit;
exit:
return (len);
unsigned int port_num;
unsigned int gid_num;
unsigned int pkey_num;
float rate;
goto exit;
goto exit;
if (gids)
goto exit;
if (pkeys)
goto exit;
case IBV_PORT_NOP:
case IBV_PORT_DOWN:
case IBV_PORT_INIT:
case IBV_PORT_ARMED:
case IBV_PORT_ACTIVE:
case IBV_PORT_ACTIVE_DEFER:
rate = 0;
rate = 0;
exit:
return (len);
char *hca_hwpn)
int rc;
&hermon_hw_info)) != 0)
return (rc);
int rc;
&hermon_flash_info)) != 0)
return (rc);
int fd;
char *pn_psidp;
goto boardid_err;
if (!uverbs_cache_initialized) {
if (uverbs_cache_init())
#ifdef DEBUG
goto boardid_err;
for (i = 0; i < MAX_HCAS; i++) {
if (i == MAX_HCAS) {
goto boardid_err;
if (fd < 0) {
goto boardid_err;
goto boardid_err;
if (hca_hwpn[0]) {
if (hca_hwpsid[0]) {
} else if (hca_hwpn[0]) {
goto boardid_err;
for (i = 0; i < MLX_MAX_ID; i++) {
(const char *)hca_hwpsid,
(const char *)hca_hwpn,
unsigned int device_num;
goto exit;
goto exit;
exit:
return (len);
unsigned int dev_num;
goto exit;
if (!umad_cache_initialized) {
if (umad_cache_init())
#ifdef DEBUG
goto exit;
goto exit;
goto exit;
goto exit;
len =
exit:
return (len);
if (!initialized) {
goto exit;
if (!initialized)
goto exit;
goto exit;
goto exit;
goto exit;
exit:
return (len);
if (ncpus <= 0)
for (i = 0; i < ncpus; i++) {
if (i >= ncpus)
goto err_exit;
if (i >= ncpus)
goto err_exit;
== NULL) {
if (i >= ncpus)
goto err_exit;
== NULL) {
if (i >= ncpus)
goto err_exit;
return (ncpus);
for (i = 0; i < nr_cpus; i++) {
if (i >= nr_cpus)
if (i >= nr_cpus)
if (i >= nr_cpus)
if (i >= nr_cpus)
if (i >= nr_cpus)
if (i >= nr_cpus)
start = 0;
#ifdef DEBUG
goto gid_error_exit;
#ifdef DEBUG
goto gid_error_exit;
start = 0;
#ifdef DEBUG
goto pkey_error_exit;
#ifdef DEBUG
goto pkey_error_exit;
sizeof (cmd));
if (ret)
return (ret);