Date: Mon, 2 Sep 2013 06:41:55 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r255142 - projects/camlock/sys/cam Message-ID: <201309020641.r826ftEZ026830@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Sep 2 06:41:54 2013 New Revision: 255142 URL: http://svnweb.freebsd.org/changeset/base/255142 Log: As much as possible keep SIM KBI: - move new fields to the end of struct cam_sim; - resurrect xpt_create_path_unlocked() as dummy wrapper. Modified: projects/camlock/sys/cam/cam_sim.h projects/camlock/sys/cam/cam_xpt.c projects/camlock/sys/cam/cam_xpt.h Modified: projects/camlock/sys/cam/cam_sim.h ============================================================================== --- projects/camlock/sys/cam/cam_sim.h Mon Sep 2 05:59:39 2013 (r255141) +++ projects/camlock/sys/cam/cam_sim.h Mon Sep 2 06:41:54 2013 (r255142) @@ -95,11 +95,6 @@ struct cam_sim { void *softc; struct mtx *mtx; TAILQ_HEAD(, ccb_hdr) sim_doneq; - struct mtx sim_doneq_mtx; - int sim_doneq_flags; -#define CAM_SIM_DQ_ONQ 0x04 -#define CAM_SIM_DQ_POLLED 0x08 -#define CAM_SIM_DQ_BATCH 0x10 TAILQ_ENTRY(cam_sim) links; u_int32_t path_id;/* The Boot device may set this to 0? */ u_int32_t unit_number; @@ -112,6 +107,11 @@ struct cam_sim { struct callout callout; struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ + int sim_doneq_flags; +#define CAM_SIM_DQ_ONQ 0x04 +#define CAM_SIM_DQ_POLLED 0x08 +#define CAM_SIM_DQ_BATCH 0x10 + struct mtx sim_doneq_mtx; }; #define CAM_SIM_LOCK(sim) mtx_lock((sim)->mtx) Modified: projects/camlock/sys/cam/cam_xpt.c ============================================================================== --- projects/camlock/sys/cam/cam_xpt.c Mon Sep 2 05:59:39 2013 (r255141) +++ projects/camlock/sys/cam/cam_xpt.c Mon Sep 2 06:41:54 2013 (r255142) @@ -3364,6 +3364,16 @@ xpt_create_path(struct cam_path **new_pa } cam_status +xpt_create_path_unlocked(struct cam_path **new_path_ptr, + struct cam_periph *periph, path_id_t path_id, + target_id_t target_id, lun_id_t lun_id) +{ + + return (xpt_create_path(new_path_ptr, periph, path_id, target_id, + lun_id)); +} + +cam_status xpt_compile_path(struct cam_path *new_path, struct cam_periph *perph, path_id_t path_id, target_id_t target_id, lun_id_t lun_id) { Modified: projects/camlock/sys/cam/cam_xpt.h ============================================================================== --- projects/camlock/sys/cam/cam_xpt.h Mon Sep 2 05:59:39 2013 (r255141) +++ projects/camlock/sys/cam/cam_xpt.h Mon Sep 2 06:41:54 2013 (r255142) @@ -79,6 +79,10 @@ cam_status xpt_create_path(struct cam_p struct cam_periph *perph, path_id_t path_id, target_id_t target_id, lun_id_t lun_id); +cam_status xpt_create_path_unlocked(struct cam_path **new_path_ptr, + struct cam_periph *perph, + path_id_t path_id, + target_id_t target_id, lun_id_t lun_id); int xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path); void xpt_free_path(struct cam_path *path);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309020641.r826ftEZ026830>