Deleted Added
full compact
ispvar.h (163899) ispvar.h (164272)
1/* $FreeBSD: head/sys/dev/isp/ispvar.h 163899 2006-11-02 03:21:32Z mjacob $ */
1/* $FreeBSD: head/sys/dev/isp/ispvar.h 164272 2006-11-14 08:45:48Z mjacob $ */
2/*-
3 * Soft Definitions for for Qlogic ISP SCSI adapters.
4 *
5 * Copyright (c) 1997-2006 by Matthew Jacob
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

70 uint16_t dv_conf1;
71 uint16_t dv_clock; /* clock frequency */
72};
73
74/*
75 * Overall parameters
76 */
77#define MAX_TARGETS 16
2/*-
3 * Soft Definitions for for Qlogic ISP SCSI adapters.
4 *
5 * Copyright (c) 1997-2006 by Matthew Jacob
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

70 uint16_t dv_conf1;
71 uint16_t dv_clock; /* clock frequency */
72};
73
74/*
75 * Overall parameters
76 */
77#define MAX_TARGETS 16
78#define MAX_FC_TARG 256
78#define MAX_FC_TARG 512
79#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS)
80#define ISP_MAX_LUNS(isp) (isp)->isp_maxluns
81
82/*
83 * Macros to access ISP registers through bus specific layers-
84 * mostly wrappers to vector through the mdvec structure.
85 */
86#define ISP_READ_ISR(isp, isrp, semap, mbox0p) \

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

298 * duples.
299 *
300 * + There can never be two non-NIL entries with the same handle.
301 *
302 * + There can never be two non-NIL entries which have the same ini_map_idx
303 * value.
304 */
305typedef struct {
79#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS)
80#define ISP_MAX_LUNS(isp) (isp)->isp_maxluns
81
82/*
83 * Macros to access ISP registers through bus specific layers-
84 * mostly wrappers to vector through the mdvec structure.
85 */
86#define ISP_READ_ISR(isp, isrp, semap, mbox0p) \

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

298 * duples.
299 *
300 * + There can never be two non-NIL entries with the same handle.
301 *
302 * + There can never be two non-NIL entries which have the same ini_map_idx
303 * value.
304 */
305typedef struct {
306 /*
307 * This is the handle that the firmware needs in order for us to
308 * send commands to the device. For pre-24XX cards, this would be
309 * the 'loopid'.
310 */
306 uint16_t handle;
311 uint16_t handle;
312 /*
313 * The ini_map_idx, if nonzero, is the system virtual target ID (+1)
314 * as a cross-reference with the isp_ini_map.
315 *
316 * A device is 'autologin' if the firmware automatically logs into
317 * it (re-logins as needed). Basically, local private loop devices.
318 *
319 * The state is the current state of thsi entry.
320 *
321 * Role is Initiator, Target, Both
322 *
323 * Portid is obvious, as or node && port WWNs. The new_role and
324 * new_portid is for when we are pending a change.
325 */
307 uint16_t ini_map_idx : 12,
308 autologin : 1, /* F/W does PLOGI/PLOGO */
309 state : 3;
326 uint16_t ini_map_idx : 12,
327 autologin : 1, /* F/W does PLOGI/PLOGO */
328 state : 3;
310 uint32_t : 6,
329 uint32_t reserved : 6,
311 roles : 2,
312 portid : 24;
330 roles : 2,
331 portid : 24;
313 uint32_t : 6,
332 uint32_t new_reserved : 6,
314 new_roles : 2,
315 new_portid : 24;
316 uint64_t node_wwn;
317 uint64_t port_wwn;
318} fcportdb_t;
319
320#define FC_PORTDB_STATE_NIL 0
321#define FC_PORTDB_STATE_PROBATIONAL 1
322#define FC_PORTDB_STATE_DEAD 2
323#define FC_PORTDB_STATE_CHANGED 3
324#define FC_PORTDB_STATE_NEW 4
325#define FC_PORTDB_STATE_PENDING_VALID 5
333 new_roles : 2,
334 new_portid : 24;
335 uint64_t node_wwn;
336 uint64_t port_wwn;
337} fcportdb_t;
338
339#define FC_PORTDB_STATE_NIL 0
340#define FC_PORTDB_STATE_PROBATIONAL 1
341#define FC_PORTDB_STATE_DEAD 2
342#define FC_PORTDB_STATE_CHANGED 3
343#define FC_PORTDB_STATE_NEW 4
344#define FC_PORTDB_STATE_PENDING_VALID 5
345#define FC_PORTDB_STATE_ZOMBIE 6
326#define FC_PORTDB_STATE_VALID 7
327
328/*
329 * FC card specific information
330 */
331typedef struct {
332 uint32_t : 10,
333 isp_tmode : 1,

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

352 uint16_t isp_execthrottle;
353 uint8_t isp_retry_delay;
354 uint8_t isp_retry_count;
355 uint8_t isp_reserved;
356 uint16_t isp_maxalloc;
357 uint16_t isp_maxfrmlen;
358 uint64_t isp_nodewwn;
359 uint64_t isp_portwwn;
346#define FC_PORTDB_STATE_VALID 7
347
348/*
349 * FC card specific information
350 */
351typedef struct {
352 uint32_t : 10,
353 isp_tmode : 1,

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

372 uint16_t isp_execthrottle;
373 uint8_t isp_retry_delay;
374 uint8_t isp_retry_count;
375 uint8_t isp_reserved;
376 uint16_t isp_maxalloc;
377 uint16_t isp_maxfrmlen;
378 uint64_t isp_nodewwn;
379 uint64_t isp_portwwn;
380
381 /*
382 * Our Port Data Base
383 */
360 fcportdb_t portdb[MAX_FC_TARG];
384 fcportdb_t portdb[MAX_FC_TARG];
385
386 /*
387 * This maps system virtual 'target' id to a portdb entry.
388 *
389 * The mapping function is to take any non-zero entry and
390 * subtract one to get the portdb index. This means that
391 * entries which are zero are unmapped (i.e., don't exist).
392 */
361 uint16_t isp_ini_map[MAX_FC_TARG];
393 uint16_t isp_ini_map[MAX_FC_TARG];
394
362 /*
363 * Scratch DMA mapped in area to fetch Port Database stuff, etc.
364 */
365 void * isp_scratch;
366 XS_DMA_ADDR_T isp_scdma;
367#ifdef ISP_FW_CRASH_DUMP
368 uint16_t * isp_dump_data;
369#endif

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

844#define ISP_LOGCONFIG 0x1 /* log configuration messages */
845#define ISP_LOGINFO 0x2 /* log informational messages */
846#define ISP_LOGWARN 0x4 /* log warning messages */
847#define ISP_LOGERR 0x8 /* log error messages */
848#define ISP_LOGDEBUG0 0x10 /* log simple debug messages */
849#define ISP_LOGDEBUG1 0x20 /* log intermediate debug messages */
850#define ISP_LOGDEBUG2 0x40 /* log most debug messages */
851#define ISP_LOGDEBUG3 0x80 /* log high frequency debug messages */
395 /*
396 * Scratch DMA mapped in area to fetch Port Database stuff, etc.
397 */
398 void * isp_scratch;
399 XS_DMA_ADDR_T isp_scdma;
400#ifdef ISP_FW_CRASH_DUMP
401 uint16_t * isp_dump_data;
402#endif

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

877#define ISP_LOGCONFIG 0x1 /* log configuration messages */
878#define ISP_LOGINFO 0x2 /* log informational messages */
879#define ISP_LOGWARN 0x4 /* log warning messages */
880#define ISP_LOGERR 0x8 /* log error messages */
881#define ISP_LOGDEBUG0 0x10 /* log simple debug messages */
882#define ISP_LOGDEBUG1 0x20 /* log intermediate debug messages */
883#define ISP_LOGDEBUG2 0x40 /* log most debug messages */
884#define ISP_LOGDEBUG3 0x80 /* log high frequency debug messages */
852#define ISP_LOGDEBUG4 0x100 /* log high frequency debug messages */
885#define ISP_LOGSANCFG 0x100 /* log SAN configuration */
853#define ISP_LOGTDEBUG0 0x200 /* log simple debug messages (target mode) */
854#define ISP_LOGTDEBUG1 0x400 /* log intermediate debug messages (target) */
855#define ISP_LOGTDEBUG2 0x800 /* log all debug messages (target) */
856
857/*
858 * Each Platform provides it's own isposinfo substructure of the ispsoftc
859 * defined above.
860 *

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

929 * HBA_ABORTED command was aborted (by request)
930 * HBA_DATAOVR a data overrun was detected
931 * HBA_ARQFAIL Automatic Request Sense failed
932 *
933 * XS_ERR(xs) return current error state
934 * XS_NOERR(xs) there is no error currently set
935 * XS_INITERR(xs) initialize error state
936 *
886#define ISP_LOGTDEBUG0 0x200 /* log simple debug messages (target mode) */
887#define ISP_LOGTDEBUG1 0x400 /* log intermediate debug messages (target) */
888#define ISP_LOGTDEBUG2 0x800 /* log all debug messages (target) */
889
890/*
891 * Each Platform provides it's own isposinfo substructure of the ispsoftc
892 * defined above.
893 *

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

962 * HBA_ABORTED command was aborted (by request)
963 * HBA_DATAOVR a data overrun was detected
964 * HBA_ARQFAIL Automatic Request Sense failed
965 *
966 * XS_ERR(xs) return current error state
967 * XS_NOERR(xs) there is no error currently set
968 * XS_INITERR(xs) initialize error state
969 *
937 * XS_SAVE_SENSE(xs, sp) save sense data
970 * XS_SAVE_SENSE(xs, sp, len) save sense data
938 *
939 * XS_SET_STATE_STAT(isp, sp, xs) platform dependent interpreter of
940 * response queue entry status bits
941 *
942 *
943 * DEFAULT_IID(ispsoftc_t *) Default SCSI initiator ID
944 * DEFAULT_LOOPID(ispsoftc_t *) Default FC Loop ID
945 * DEFAULT_NODEWWN(ispsoftc_t *) Default Node WWN

--- 32 unchanged lines hidden ---
971 *
972 * XS_SET_STATE_STAT(isp, sp, xs) platform dependent interpreter of
973 * response queue entry status bits
974 *
975 *
976 * DEFAULT_IID(ispsoftc_t *) Default SCSI initiator ID
977 * DEFAULT_LOOPID(ispsoftc_t *) Default FC Loop ID
978 * DEFAULT_NODEWWN(ispsoftc_t *) Default Node WWN

--- 32 unchanged lines hidden ---