diff options
author | jake <jake@FreeBSD.org> | 2000-05-23 20:41:01 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-05-23 20:41:01 +0000 |
commit | d93fbc99166053b75c2eeb69b5cb603cfaf79ec0 (patch) | |
tree | a4f130be4544ce7cfe4afa8c93f996b871433cb8 /sys/cam | |
parent | e814d2a0db522b0f163eef55a56d05aa226951f3 (diff) | |
download | FreeBSD-src-d93fbc99166053b75c2eeb69b5cb603cfaf79ec0.zip FreeBSD-src-d93fbc99166053b75c2eeb69b5cb603cfaf79ec0.tar.gz |
Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_ccb.h | 8 | ||||
-rw-r--r-- | sys/cam/cam_periph.h | 8 | ||||
-rw-r--r-- | sys/cam/cam_queue.h | 6 | ||||
-rw-r--r-- | sys/cam/cam_xpt.c | 31 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 12 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 8 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_pt.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_targ_bh.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_target.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_targetio.h | 2 |
10 files changed, 41 insertions, 40 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 3224522..e02c72f 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -202,10 +202,10 @@ typedef enum { #define XPT_FC_IS_QUEUED(ccb) \ (((ccb)->ccb_h.func_code & XPT_FC_QUEUED) != 0) typedef union { - LIST_ENTRY(ccb_hdr) le; - SLIST_ENTRY(ccb_hdr) sle; - TAILQ_ENTRY(ccb_hdr) tqe; - STAILQ_ENTRY(ccb_hdr) stqe; + LIST_ENTRY(struct ccb_hdr) le; + SLIST_ENTRY(struct ccb_hdr) sle; + TAILQ_ENTRY(struct ccb_hdr) tqe; + STAILQ_ENTRY(struct ccb_hdr) stqe; } camq_entry; typedef union { diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h index 54c549c..e2bc2e7 100644 --- a/sys/cam/cam_periph.h +++ b/sys/cam/cam_periph.h @@ -49,7 +49,7 @@ typedef periph_init_t *periph_init_func_t; struct periph_driver { periph_init_func_t init; char *driver_name; - TAILQ_HEAD(,cam_periph) units; + TAILQ_HEAD(, struct cam_periph) units; u_int generation; }; @@ -89,9 +89,9 @@ struct cam_periph { #define CAM_PERIPH_RECOVERY_INPROG 0x20 u_int32_t immediate_priority; u_int32_t refcount; - SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */ - SLIST_ENTRY(cam_periph) periph_links; - TAILQ_ENTRY(cam_periph) unit_links; + SLIST_HEAD(, struct ccb_hdr) ccb_list; /* For "immediate" requests */ + SLIST_ENTRY(struct cam_periph) periph_links; + TAILQ_ENTRY(struct cam_periph) unit_links; ac_callback_t *deferred_callback; ac_code deferred_ac; }; diff --git a/sys/cam/cam_queue.h b/sys/cam/cam_queue.h index 3d0a29c..52fb9b3 100644 --- a/sys/cam/cam_queue.h +++ b/sys/cam/cam_queue.h @@ -50,9 +50,9 @@ struct camq { u_int32_t qfrozen_cnt; }; -TAILQ_HEAD(ccb_hdr_tailq, ccb_hdr); -LIST_HEAD(ccb_hdr_list, ccb_hdr); -SLIST_HEAD(ccb_hdr_slist, ccb_hdr); +TAILQ_HEAD(ccb_hdr_tailq, struct ccb_hdr); +LIST_HEAD(ccb_hdr_list, struct ccb_hdr); +SLIST_HEAD(ccb_hdr_slist, struct ccb_hdr); struct cam_ccbq { struct camq queue; diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 53ff288..5f24a9d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -69,16 +69,16 @@ * SIMs and peripherals to the async callback lists. */ struct async_node { - SLIST_ENTRY(async_node) links; + SLIST_ENTRY(struct async_node) links; u_int32_t event_enable; /* Async Event enables */ void (*callback)(void *arg, u_int32_t code, struct cam_path *path, void *args); void *callback_arg; }; -SLIST_HEAD(async_list, async_node); -SLIST_HEAD(periph_list, cam_periph); -static STAILQ_HEAD(highpowerlist, ccb_hdr) highpowerq; +SLIST_HEAD(async_list, struct async_node); +SLIST_HEAD(periph_list, struct cam_periph); +static STAILQ_HEAD(highpowerlist, struct ccb_hdr) highpowerq; /* * This is the maximum number of high powered commands (e.g. start unit) @@ -107,7 +107,7 @@ struct cam_ed_qinfo { * cam_ed structure for each device on the bus. */ struct cam_ed { - TAILQ_ENTRY(cam_ed) links; + TAILQ_ENTRY(struct cam_ed) links; struct cam_ed_qinfo alloc_ccb_entry; struct cam_ed_qinfo send_ccb_entry; struct cam_et *target; @@ -155,8 +155,8 @@ struct cam_ed { * of retries, or a bus rescan finds the device missing. */ struct cam_et { - TAILQ_HEAD(, cam_ed) ed_entries; - TAILQ_ENTRY(cam_et) links; + TAILQ_HEAD(, struct cam_ed) ed_entries; + TAILQ_ENTRY(struct cam_et) links; struct cam_eb *bus; target_id_t target_id; u_int32_t refcount; @@ -170,8 +170,8 @@ struct cam_et { * xpt_bus_deregister. */ struct cam_eb { - TAILQ_HEAD(, cam_et) et_entries; - TAILQ_ENTRY(cam_eb) links; + TAILQ_HEAD(, struct cam_et) et_entries; + TAILQ_ENTRY(struct cam_eb) links; path_id_t path_id; struct cam_sim *sim; struct timeval last_reset; @@ -515,12 +515,12 @@ typedef int xpt_pdrvfunc_t (struct periph_driver **pdrv, void *arg); static struct xpt_softc xsoftc; /* Queues for our software interrupt handler */ -typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t; +typedef TAILQ_HEAD(cam_isrq, struct ccb_hdr) cam_isrq_t; static cam_isrq_t cam_bioq; static cam_isrq_t cam_netq; /* "Pool" of inactive ccbs managed by xpt_alloc_ccb and xpt_free_ccb */ -static SLIST_HEAD(,ccb_hdr) ccb_freeq; +static SLIST_HEAD(, struct ccb_hdr) ccb_freeq; static u_int xpt_max_ccbs; /* * Maximum size of ccb pool. Modified as * devices are added/removed or have their @@ -575,7 +575,7 @@ static struct cdevsw xpt_cdevsw = { static struct intr_config_hook *xpt_config_hook; /* Registered busses */ -static TAILQ_HEAD(,cam_eb) xpt_busses; +static TAILQ_HEAD(, struct cam_eb) xpt_busses; static u_int bus_generation; /* Storage for debugging datastructures */ @@ -1395,7 +1395,8 @@ xpt_remove_periph(struct cam_periph *periph) device->generation++; - SLIST_REMOVE(periph_head, periph, cam_periph, periph_links); + SLIST_REMOVE(periph_head, periph, struct cam_periph, + periph_links); splx(s); } @@ -3130,7 +3131,7 @@ xpt_action(union ccb *start_ccb) added &= ~cur_entry->event_enable; if (csa->event_enable == 0) { SLIST_REMOVE(async_head, cur_entry, - async_node, links); + struct async_node, links); csa->ccb_h.path->device->refcount--; free(cur_entry, M_DEVBUF); } else { @@ -5038,7 +5039,7 @@ typedef enum { } probe_flags; typedef struct { - TAILQ_HEAD(, ccb_hdr) request_ccbs; + TAILQ_HEAD(, struct ccb_hdr) request_ccbs; probe_action action; union ccb saved_ccb; probe_flags flags; diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index e862e62..cd7d1b08 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -126,13 +126,13 @@ struct cd_softc { cd_state state; volatile cd_flags flags; struct bio_queue_head bio_queue; - LIST_HEAD(, ccb_hdr) pending_ccbs; + LIST_HEAD(, struct ccb_hdr) pending_ccbs; struct cd_params params; struct disk disk; union ccb saved_ccb; cd_quirks quirks; struct devstat device_stats; - STAILQ_ENTRY(cd_softc) changer_links; + STAILQ_ENTRY(struct cd_softc) changer_links; struct cdchanger *changer; int bufs_left; struct cam_periph *periph; @@ -299,11 +299,11 @@ struct cdchanger { struct callout_handle short_handle; struct callout_handle long_handle; volatile cd_changer_flags flags; - STAILQ_ENTRY(cdchanger) changer_links; - STAILQ_HEAD(chdevlist, cd_softc) chluns; + STAILQ_ENTRY(struct cdchanger) changer_links; + STAILQ_HEAD(chdevlist, struct cd_softc) chluns; }; -static STAILQ_HEAD(changerlist, cdchanger) changerq; +static STAILQ_HEAD(changerlist, struct cdchanger) changerq; void cdinit(void) @@ -477,7 +477,7 @@ cdcleanup(struct cam_periph *periph) softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED; } - STAILQ_REMOVE(&changerq, softc->changer, cdchanger, + STAILQ_REMOVE(&changerq, softc->changer, struct cdchanger, changer_links); xpt_print_path(periph->path); printf("removing changer entry\n"); diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index f7fdd55..f615a00 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -117,8 +117,8 @@ struct disk_params { struct da_softc { struct bio_queue_head bio_queue; struct devstat device_stats; - SLIST_ENTRY(da_softc) links; - LIST_HEAD(, ccb_hdr) pending_ccbs; + SLIST_ENTRY(struct da_softc) links; + LIST_HEAD(, struct ccb_hdr) pending_ccbs; da_state state; da_flags flags; da_quirks quirks; @@ -278,7 +278,7 @@ static struct cdevsw da_cdevsw = { static struct cdevsw dadisk_cdevsw; -static SLIST_HEAD(,da_softc) softc_list; +static SLIST_HEAD(, struct da_softc) softc_list; static struct extend_array *daperiphs; static int @@ -825,7 +825,7 @@ daoninvalidate(struct cam_periph *periph) } splx(s); - SLIST_REMOVE(&softc_list, softc, da_softc, links); + SLIST_REMOVE(&softc_list, softc, struct da_softc, links); xpt_print_path(periph->path); printf("lost device\n"); diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 8f51ea8..589cc21 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -78,7 +78,7 @@ typedef enum { struct pt_softc { struct bio_queue_head bio_queue; struct devstat device_stats; - LIST_HEAD(, ccb_hdr) pending_ccbs; + LIST_HEAD(, struct ccb_hdr) pending_ccbs; pt_state state; pt_flags flags; union ccb saved_ccb; diff --git a/sys/cam/scsi/scsi_targ_bh.c b/sys/cam/scsi/scsi_targ_bh.c index ba80ac1..50c0717 100644 --- a/sys/cam/scsi/scsi_targ_bh.c +++ b/sys/cam/scsi/scsi_targ_bh.c @@ -80,7 +80,7 @@ typedef enum { /* We stick a pointer to the originating accept TIO in each continue I/O CCB */ #define ccb_atio ppriv_ptr1 -TAILQ_HEAD(ccb_queue, ccb_hdr); +TAILQ_HEAD(ccb_queue, struct ccb_hdr); struct targbh_softc { struct ccb_queue pending_queue; diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index db27cac..c3b2439 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -1763,7 +1763,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb) frozen = (done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0; if (softc->state == TARG_STATE_TEARDOWN) { SLIST_REMOVE(&softc->immed_notify_slist, - &done_ccb->ccb_h, ccb_hdr, + &done_ccb->ccb_h, struct ccb_hdr, periph_links.sle); free(done_ccb, M_DEVBUF); } else if (done_ccb->ccb_h.status == CAM_REQ_ABORTED) { diff --git a/sys/cam/scsi/scsi_targetio.h b/sys/cam/scsi/scsi_targetio.h index f628d94..c9b1e54 100644 --- a/sys/cam/scsi/scsi_targetio.h +++ b/sys/cam/scsi/scsi_targetio.h @@ -38,7 +38,7 @@ #include <cam/cam.h> #include <cam/cam_ccb.h> -TAILQ_HEAD(ccb_queue, ccb_hdr); +TAILQ_HEAD(ccb_queue, struct ccb_hdr); /* Determine and clear exception state in the driver */ typedef enum { |