ispreg.h (139749) | ispreg.h (154704) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/ispreg.h 139749 2005-01-06 01:43:34Z imp $ */ | 1/* $FreeBSD: head/sys/dev/isp/ispreg.h 154704 2006-01-23 06:23:37Z mjacob $ */ |
2/*- 3 * Machine Independent (well, as best as possible) register 4 * definitions for Qlogic ISP SCSI adapters. 5 * | 2/*- 3 * Machine Independent (well, as best as possible) register 4 * definitions for Qlogic ISP SCSI adapters. 5 * |
6 * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob | 6 * Copyright (c) 1997-2006 by Matthew Jacob |
7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice immediately at the beginning of the file, without modification, 14 * this list of conditions, and the following disclaimer. --- 351 unchanged lines hidden (view full) --- 366#define OUTMAILBOX1 (MBOX_BLOCK+0x2) 367#define OUTMAILBOX2 (MBOX_BLOCK+0x4) 368#define OUTMAILBOX3 (MBOX_BLOCK+0x6) 369#define OUTMAILBOX4 (MBOX_BLOCK+0x8) 370#define OUTMAILBOX5 (MBOX_BLOCK+0xA) 371#define OUTMAILBOX6 (MBOX_BLOCK+0xC) 372#define OUTMAILBOX7 (MBOX_BLOCK+0xE) 373 | 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice immediately at the beginning of the file, without modification, 14 * this list of conditions, and the following disclaimer. --- 351 unchanged lines hidden (view full) --- 366#define OUTMAILBOX1 (MBOX_BLOCK+0x2) 367#define OUTMAILBOX2 (MBOX_BLOCK+0x4) 368#define OUTMAILBOX3 (MBOX_BLOCK+0x6) 369#define OUTMAILBOX4 (MBOX_BLOCK+0x8) 370#define OUTMAILBOX5 (MBOX_BLOCK+0xA) 371#define OUTMAILBOX6 (MBOX_BLOCK+0xC) 372#define OUTMAILBOX7 (MBOX_BLOCK+0xE) 373 |
374/* 375 * Strictly speaking, it's 376 * SCSI && 2100 : 8 MBOX registers 377 * 2200: 24 MBOX registers 378 * 2300: 32 MBOX registers 379 */ |
|
374#define MBOX_OFF(n) (MBOX_BLOCK + ((n) << 1)) 375#define NMBOX(isp) \ 376 (((((isp)->isp_type & ISP_HA_SCSI) >= ISP_HA_SCSI_1040A) || \ | 380#define MBOX_OFF(n) (MBOX_BLOCK + ((n) << 1)) 381#define NMBOX(isp) \ 382 (((((isp)->isp_type & ISP_HA_SCSI) >= ISP_HA_SCSI_1040A) || \ |
377 ((isp)->isp_type & ISP_HA_FC))? 8 : 6) | 383 ((isp)->isp_type & ISP_HA_FC))? 12 : 6) |
378#define NMBOX_BMASK(isp) \ 379 (((((isp)->isp_type & ISP_HA_SCSI) >= ISP_HA_SCSI_1040A) || \ | 384#define NMBOX_BMASK(isp) \ 385 (((((isp)->isp_type & ISP_HA_SCSI) >= ISP_HA_SCSI_1040A) || \ |
380 ((isp)->isp_type & ISP_HA_FC))? 0xff : 0x3f) | 386 ((isp)->isp_type & ISP_HA_FC))? 0xfff : 0x3f) |
381 | 387 |
382#define MAX_MAILBOX 8 | 388#define MAX_MAILBOX(isp) ((IS_FC(isp))? 12 : 8) 389#define MAILBOX_STORAGE 12 390typedef struct { 391 u_int16_t param[MAILBOX_STORAGE]; 392 u_int16_t ibits, obits; 393} mbreg_t; |
383 384/* 385 * Fibre Protocol Module and Frame Buffer Register Offsets/Definitions (2X00). 386 * NB: The RISC processor must be paused and the appropriate register 387 * bank selected via BIU2100_CSR bits. 388 */ 389 390#define FPM_DIAG_CONFIG (BIU_BLOCK + 0x96) --- 621 unchanged lines hidden --- | 394 395/* 396 * Fibre Protocol Module and Frame Buffer Register Offsets/Definitions (2X00). 397 * NB: The RISC processor must be paused and the appropriate register 398 * bank selected via BIU2100_CSR bits. 399 */ 400 401#define FPM_DIAG_CONFIG (BIU_BLOCK + 0x96) --- 621 unchanged lines hidden --- |