Skip to content

Commit

Permalink
Merge pull request #53 from tsirakisn/argo-st9
Browse files Browse the repository at this point in the history
S9: [argo] Replace v4v with argo
  • Loading branch information
jean-edouard authored Jun 20, 2019
2 parents b8dc82d + 2026cbb commit b29a2fd
Show file tree
Hide file tree
Showing 35 changed files with 564 additions and 555 deletions.
8 changes: 4 additions & 4 deletions atapi_pt_helper/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AC_CHECK_HEADERS([stdio.h fcntl.h errno.h signal.h])
AC_CHECK_HEADERS([sys/ioctl.h sys/types.h sys/stat.h])
AC_CHECK_HEADERS([scsi/sg.h])
AC_CHECK_HEADERS([linux/bsg.h])
AC_CHECK_HEADERS([xenstore.h libv4v.h])
AC_CHECK_HEADERS([xenstore.h libargo.h])
AC_HEADER_ASSERT

AC_C_INLINE
Expand All @@ -25,9 +25,9 @@ AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])

PKG_CHECK_MODULES(LIBV4V, libv4v, [], [AC_MSG_ERROR("libv4v required.")])
AC_SUBST(LIBV4V_CFLAGS)
AC_SUBST(LIBV4V_LIBS)
PKG_CHECK_MODULES(LIBARGO, libargo, [], [AC_MSG_ERROR("libargo required.")])
AC_SUBST(LIBARGO_CFLAGS)
AC_SUBST(LIBARGO_LIBS)

AC_OUTPUT([Makefile
src/Makefile])
2 changes: 1 addition & 1 deletion atapi_pt_helper/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bin_PROGRAMS = atapi_pt_helper

SRCS=atapi_pt_helper.c version.c
atapi_pt_helper_SOURCES = ${SRCS}
atapi_pt_helper_LDADD = ${X_LIBS} -lxenstore -lv4v -lrt
atapi_pt_helper_LDADD = ${X_LIBS} -lxenstore -largo -lrt

AM_CFLAGS=-g

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#ifndef _ATAPI_PT_V4V_H_
#define _ATAPI_PT_V4V_H_
#ifndef _ATAPI_PT_ARGO_H_
#define _ATAPI_PT_ARGO_H_

typedef enum {
ATAPI_PT_LOCK_STATE_UNLOCKED = 0x00,
Expand All @@ -27,67 +27,67 @@ typedef enum {
} atapi_pt_lock_state_t;

typedef enum {
ATAPI_PTV4V_OPEN = 0x00,
ATAPI_PTV4V_SG_IO = 0x01,
ATAPI_PTV4V_SG_GET_RESERVED_SIZE = 0x02,
ATAPI_PTV4V_ACQUIRE_LOCK = 0x03,
ATAPI_PTV4V_RELEASE_LOCK = 0x04,
} atapi_ptv4v_cmd_t;
ATAPI_PTARGO_OPEN = 0x00,
ATAPI_PTARGO_SG_IO = 0x01,
ATAPI_PTARGO_SG_GET_RESERVED_SIZE = 0x02,
ATAPI_PTARGO_ACQUIRE_LOCK = 0x03,
ATAPI_PTARGO_RELEASE_LOCK = 0x04,
} atapi_ptargo_cmd_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_OPEN */
uint8_t cmd; /* ATAPI_PTARGO_OPEN */
uint8_t device_id;
char device_path[256];
} __attribute__((packed)) pt_v4vcmd_open_request_t;
} __attribute__((packed)) pt_argocmd_open_request_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_OPEN */
uint8_t cmd; /* ATAPI_PTARGO_OPEN */
uint8_t device_id;
} __attribute__((packed)) pt_v4vcmd_open_response_t;
} __attribute__((packed)) pt_argocmd_open_response_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_ACQUIRE_LOCK */
uint8_t cmd; /* ATAPI_PTARGO_ACQUIRE_LOCK */
uint8_t device_id;
} __attribute__((packed)) pt_v4vcmd_acquire_lock_request_t;
} __attribute__((packed)) pt_argocmd_acquire_lock_request_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_ACQUIRE_LOCK */
uint8_t cmd; /* ATAPI_PTARGO_ACQUIRE_LOCK */
uint8_t device_id;
uint8_t lock_state; /* atapi_pt_lock_state_t */
} __attribute__((packed)) pt_v4vcmd_acquire_lock_response_t;
} __attribute__((packed)) pt_argocmd_acquire_lock_response_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_RELEASE_LOCK */
uint8_t cmd; /* ATAPI_PTARGO_RELEASE_LOCK */
uint8_t device_id;
} __attribute__((packed)) pt_v4vcmd_release_lock_request_t;
} __attribute__((packed)) pt_argocmd_release_lock_request_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_SG_GET_RESERVED_SIZE */
uint8_t cmd; /* ATAPI_PTARGO_SG_GET_RESERVED_SIZE */
uint8_t device_id;
} __attribute__((packed)) pt_v4vcmd_sg_get_reserved_size_request_t;
} __attribute__((packed)) pt_argocmd_sg_get_reserved_size_request_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_SG_GET_RESERVED_SIZE */
uint8_t cmd; /* ATAPI_PTARGO_SG_GET_RESERVED_SIZE */
uint8_t device_id;
uint32_t size;
} __attribute__((packed)) pt_v4vcmd_sg_get_reserved_size_response_t;
} __attribute__((packed)) pt_argocmd_sg_get_reserved_size_response_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_SG_IO */
uint8_t cmd; /* ATAPI_PTARGO_SG_IO */
uint8_t device_id;
struct sg_io_v4 sgio;
uint8_t request_data[12]; /* ATAPI_PACKET_SIZE */
uint32_t dout_data_len;
uint8_t dout_data[];
} __attribute__((packed)) pt_v4vcmd_sg_io_request_t;
} __attribute__((packed)) pt_argocmd_sg_io_request_t;

typedef struct {
uint8_t cmd; /* ATAPI_PTV4V_SG_IO */
uint8_t cmd; /* ATAPI_PTARGO_SG_IO */
uint8_t device_id;
struct sg_io_v4 sgio;
uint8_t sense_data[64]; /* struct request_sense */
uint32_t din_data_len;
uint8_t din_data[];
} __attribute__((packed)) pt_v4vcmd_sg_io_response_t;
} __attribute__((packed)) pt_argocmd_sg_io_response_t;

#endif /* !_ATAPI_PT_V4V_H_ */
#endif /* !_ATAPI_PT_ARGO_H_ */
Loading

0 comments on commit b29a2fd

Please sign in to comment.