Deleted Added
full compact
ispvar.h (292598) ispvar.h (292921)
1/* $FreeBSD: stable/10/sys/dev/isp/ispvar.h 292598 2015-12-22 13:19:29Z mav $ */
1/* $FreeBSD: stable/10/sys/dev/isp/ispvar.h 292921 2015-12-30 11:49:48Z mav $ */
2/*-
3 * Copyright (c) 1997-2009 by Matthew Jacob
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *

--- 303 unchanged lines hidden (view full) ---

313#define ISP_HANDLE_USAGE_SHIFT 13
314#define ISP_H2HT(hdl) ((hdl & ISP_HANDLE_USAGE_MASK) >> ISP_HANDLE_USAGE_SHIFT)
315# define ISP_HANDLE_NONE 0
316# define ISP_HANDLE_INITIATOR 1
317# define ISP_HANDLE_TARGET 2
318#define ISP_HANDLE_SEQ_MASK 0xffff0000
319#define ISP_HANDLE_SEQ_SHIFT 16
320#define ISP_H2SEQ(hdl) ((hdl & ISP_HANDLE_SEQ_MASK) >> ISP_HANDLE_SEQ_SHIFT)
2/*-
3 * Copyright (c) 1997-2009 by Matthew Jacob
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *

--- 303 unchanged lines hidden (view full) ---

313#define ISP_HANDLE_USAGE_SHIFT 13
314#define ISP_H2HT(hdl) ((hdl & ISP_HANDLE_USAGE_MASK) >> ISP_HANDLE_USAGE_SHIFT)
315# define ISP_HANDLE_NONE 0
316# define ISP_HANDLE_INITIATOR 1
317# define ISP_HANDLE_TARGET 2
318#define ISP_HANDLE_SEQ_MASK 0xffff0000
319#define ISP_HANDLE_SEQ_SHIFT 16
320#define ISP_H2SEQ(hdl) ((hdl & ISP_HANDLE_SEQ_MASK) >> ISP_HANDLE_SEQ_SHIFT)
321#define ISP_VALID_INI_HANDLE(c, hdl) \
322 (ISP_H2HT(hdl) == ISP_HANDLE_INITIATOR && (hdl & ISP_HANDLE_CMD_MASK) < (c)->isp_maxcmds && \
323 ISP_H2SEQ(hdl) == ISP_H2SEQ((c)->isp_xflist[hdl & ISP_HANDLE_CMD_MASK].handle))
324#ifdef ISP_TARGET_MODE
325#define ISP_VALID_TGT_HANDLE(c, hdl) \
326 (ISP_H2HT(hdl) == ISP_HANDLE_TARGET && (hdl & ISP_HANDLE_CMD_MASK) < (c)->isp_maxcmds && \
327 ISP_H2SEQ(hdl) == ISP_H2SEQ((c)->isp_tgtlist[hdl & ISP_HANDLE_CMD_MASK].handle))
328#define ISP_VALID_HANDLE(c, hdl) \
321#define ISP_VALID_HANDLE(c, hdl) \
329 (ISP_VALID_INI_HANDLE((c), hdl) || ISP_VALID_TGT_HANDLE((c), hdl))
330#else
331#define ISP_VALID_HANDLE ISP_VALID_INI_HANDLE
332#endif
322 ((ISP_H2HT(hdl) == ISP_HANDLE_INITIATOR || \
323 ISP_H2HT(hdl) == ISP_HANDLE_TARGET) && \
324 ((hdl) & ISP_HANDLE_CMD_MASK) < (c)->isp_maxcmds && \
325 (hdl) == ((c)->isp_xflist[(hdl) & ISP_HANDLE_CMD_MASK].handle))
333#define ISP_BAD_HANDLE_INDEX 0xffffffff
334
335
336/*
337 * FC Port Database entry.
338 *
339 * It has a handle that the f/w uses to address commands to a device.
340 * This handle's value may be assigned by the firmware (e.g., for local loop

--- 252 unchanged lines hidden (view full) ---

593 void * isp_mbxworkp;
594
595 /*
596 * Active commands are stored here, indexed by handle functions.
597 */
598 isp_hdl_t *isp_xflist;
599 isp_hdl_t *isp_xffree;
600
326#define ISP_BAD_HANDLE_INDEX 0xffffffff
327
328
329/*
330 * FC Port Database entry.
331 *
332 * It has a handle that the f/w uses to address commands to a device.
333 * This handle's value may be assigned by the firmware (e.g., for local loop

--- 252 unchanged lines hidden (view full) ---

586 void * isp_mbxworkp;
587
588 /*
589 * Active commands are stored here, indexed by handle functions.
590 */
591 isp_hdl_t *isp_xflist;
592 isp_hdl_t *isp_xffree;
593
601#ifdef ISP_TARGET_MODE
602 /*
594 /*
603 * Active target commands are stored here, indexed by handle functions.
604 */
605 isp_hdl_t *isp_tgtlist;
606 isp_hdl_t *isp_tgtfree;
607#endif
608
609 /*
610 * request/result queue pointers and DMA handles for them.
611 */
612 void * isp_rquest;
613 void * isp_result;
614 XS_DMA_ADDR_T isp_rquest_dma;
615 XS_DMA_ADDR_T isp_result_dma;
616#ifdef ISP_TARGET_MODE
617 /* for 24XX only */

--- 542 unchanged lines hidden ---
595 * request/result queue pointers and DMA handles for them.
596 */
597 void * isp_rquest;
598 void * isp_result;
599 XS_DMA_ADDR_T isp_rquest_dma;
600 XS_DMA_ADDR_T isp_result_dma;
601#ifdef ISP_TARGET_MODE
602 /* for 24XX only */

--- 542 unchanged lines hidden ---