Deleted Added
full compact
ispmbox.h (151834) ispmbox.h (154704)
1/* $FreeBSD: head/sys/dev/isp/ispmbox.h 151834 2005-10-29 02:46:59Z mjacob $ */
1/* $FreeBSD: head/sys/dev/isp/ispmbox.h 154704 2006-01-23 06:23:37Z mjacob $ */
2/*-
3 * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters.
4 *
2/*-
3 * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters.
4 *
5 * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob
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
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice immediately at the beginning of the file, without modification,
13 * this list of conditions, and the following disclaimer.

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

155#define MBGSD_TWOGB 1
156#define MBGSD_AUTO 2
157
158
159#define ISP2100_SET_PCI_PARAM 0x00ff
160
161#define MBOX_BUSY 0x04
162
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
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice immediately at the beginning of the file, without modification,
13 * this list of conditions, and the following disclaimer.

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

155#define MBGSD_TWOGB 1
156#define MBGSD_AUTO 2
157
158
159#define ISP2100_SET_PCI_PARAM 0x00ff
160
161#define MBOX_BUSY 0x04
162
163typedef struct {
164 u_int16_t param[8];
165} mbreg_t;
166
167/*
168 * Mailbox Command Complete Status Codes
169 */
170#define MBOX_COMMAND_COMPLETE 0x4000
171#define MBOX_INVALID_COMMAND 0x4001
172#define MBOX_HOST_INTERFACE_ERROR 0x4002
173#define MBOX_TEST_FAILED 0x4003
174#define MBOX_COMMAND_ERROR 0x4005

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

346#define ISP_RQDSEG_A64 2
347
348/*
349 * A request packet can also be a marker packet.
350 */
351#define SYNC_DEVICE 0
352#define SYNC_TARGET 1
353#define SYNC_ALL 2
163/*
164 * Mailbox Command Complete Status Codes
165 */
166#define MBOX_COMMAND_COMPLETE 0x4000
167#define MBOX_INVALID_COMMAND 0x4001
168#define MBOX_HOST_INTERFACE_ERROR 0x4002
169#define MBOX_TEST_FAILED 0x4003
170#define MBOX_COMMAND_ERROR 0x4005

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

342#define ISP_RQDSEG_A64 2
343
344/*
345 * A request packet can also be a marker packet.
346 */
347#define SYNC_DEVICE 0
348#define SYNC_TARGET 1
349#define SYNC_ALL 2
350#define SYNC_LIP 3
354
355#define ISP_RQDSEG_T2 3
356typedef struct {
357 isphdr_t req_header;
358 u_int32_t req_handle;
359 u_int8_t req_lun_trn;
360 u_int8_t req_target;
361 u_int16_t req_scclun;
362 u_int16_t req_flags;
363 u_int16_t _res2;
364 u_int16_t req_time;
365 u_int16_t req_seg_count;
366 u_int8_t req_cdb[16];
367 u_int32_t req_totalcnt;
368 ispds_t req_dataseg[ISP_RQDSEG_T2];
369} ispreqt2_t;
370
351
352#define ISP_RQDSEG_T2 3
353typedef struct {
354 isphdr_t req_header;
355 u_int32_t req_handle;
356 u_int8_t req_lun_trn;
357 u_int8_t req_target;
358 u_int16_t req_scclun;
359 u_int16_t req_flags;
360 u_int16_t _res2;
361 u_int16_t req_time;
362 u_int16_t req_seg_count;
363 u_int8_t req_cdb[16];
364 u_int32_t req_totalcnt;
365 ispds_t req_dataseg[ISP_RQDSEG_T2];
366} ispreqt2_t;
367
368typedef struct {
369 isphdr_t req_header;
370 u_int32_t req_handle;
371 u_int16_t req_target;
372 u_int16_t req_scclun;
373 u_int16_t req_flags;
374 u_int16_t _res2;
375 u_int16_t req_time;
376 u_int16_t req_seg_count;
377 u_int8_t req_cdb[16];
378 u_int32_t req_totalcnt;
379 ispds_t req_dataseg[ISP_RQDSEG_T2];
380} ispreqt2e_t;
381
371#define ISP_RQDSEG_T3 2
372typedef struct {
373 isphdr_t req_header;
374 u_int32_t req_handle;
375 u_int8_t req_lun_trn;
376 u_int8_t req_target;
377 u_int16_t req_scclun;
378 u_int16_t req_flags;
379 u_int16_t _res2;
380 u_int16_t req_time;
381 u_int16_t req_seg_count;
382 u_int8_t req_cdb[16];
383 u_int32_t req_totalcnt;
384 ispds64_t req_dataseg[ISP_RQDSEG_T3];
385} ispreqt3_t;
386
382#define ISP_RQDSEG_T3 2
383typedef struct {
384 isphdr_t req_header;
385 u_int32_t req_handle;
386 u_int8_t req_lun_trn;
387 u_int8_t req_target;
388 u_int16_t req_scclun;
389 u_int16_t req_flags;
390 u_int16_t _res2;
391 u_int16_t req_time;
392 u_int16_t req_seg_count;
393 u_int8_t req_cdb[16];
394 u_int32_t req_totalcnt;
395 ispds64_t req_dataseg[ISP_RQDSEG_T3];
396} ispreqt3_t;
397
398typedef struct {
399 isphdr_t req_header;
400 u_int32_t req_handle;
401 u_int16_t req_target;
402 u_int16_t req_scclun;
403 u_int16_t req_flags;
404 u_int16_t _res2;
405 u_int16_t req_time;
406 u_int16_t req_seg_count;
407 u_int8_t req_cdb[16];
408 u_int32_t req_totalcnt;
409 ispds64_t req_dataseg[ISP_RQDSEG_T3];
410} ispreqt3e_t;
411
387/* req_flag values */
388#define REQFLAG_NODISCON 0x0001
389#define REQFLAG_HTAG 0x0002
390#define REQFLAG_OTAG 0x0004
391#define REQFLAG_STAG 0x0008
392#define REQFLAG_TARGET_RTN 0x0010
393
394#define REQFLAG_NODATA 0x0000

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

564 * About Firmware returns an 'attribute' word in mailbox 6.
565 */
566#define ISP_FW_ATTR_TMODE 0x01
567#define ISP_FW_ATTR_SCCLUN 0x02
568#define ISP_FW_ATTR_FABRIC 0x04
569#define ISP_FW_ATTR_CLASS2 0x08
570#define ISP_FW_ATTR_FCTAPE 0x10
571#define ISP_FW_ATTR_IP 0x20
412/* req_flag values */
413#define REQFLAG_NODISCON 0x0001
414#define REQFLAG_HTAG 0x0002
415#define REQFLAG_OTAG 0x0004
416#define REQFLAG_STAG 0x0008
417#define REQFLAG_TARGET_RTN 0x0010
418
419#define REQFLAG_NODATA 0x0000

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

589 * About Firmware returns an 'attribute' word in mailbox 6.
590 */
591#define ISP_FW_ATTR_TMODE 0x01
592#define ISP_FW_ATTR_SCCLUN 0x02
593#define ISP_FW_ATTR_FABRIC 0x04
594#define ISP_FW_ATTR_CLASS2 0x08
595#define ISP_FW_ATTR_FCTAPE 0x10
596#define ISP_FW_ATTR_IP 0x20
597#define ISP_FW_ATTR_VI 0x40
598#define ISP_FW_ATTR_VI_SOLARIS 0x80
599#define ISP_FW_ATTR_2KLOGINS 0x100 /* XXX: just a guess */
572
600
601#define IS_2KLOGIN(isp) \
602 (IS_FC(isp) && (FCPARAM(isp)->isp_fwattr & ISP_FW_ATTR_2KLOGINS))
603
573/*
574 * Reduced Interrupt Operation Response Queue Entreis
575 */
576
577typedef struct {
578 isphdr_t req_header;
579 u_int32_t req_handles[15];
580} isp_rio1_t;

--- 369 unchanged lines hidden ---
604/*
605 * Reduced Interrupt Operation Response Queue Entreis
606 */
607
608typedef struct {
609 isphdr_t req_header;
610 u_int32_t req_handles[15];
611} isp_rio1_t;

--- 369 unchanged lines hidden ---