0001
0002
0003
0004
0005
0006
0007 #ifndef _NSP32_H
0008 #define _NSP32_H
0009
0010
0011
0012
0013
0014
0015 #define PCI_VENDOR_ID_IODATA 0x10fc
0016 #define PCI_VENDOR_ID_WORKBIT 0x1145
0017
0018 #define PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II 0x0005
0019 #define PCI_DEVICE_ID_NINJASCSI_32BI_KME 0xf007
0020 #define PCI_DEVICE_ID_NINJASCSI_32BI_WBT 0x8007
0021 #define PCI_DEVICE_ID_WORKBIT_STANDARD 0xf010
0022 #define PCI_DEVICE_ID_WORKBIT_DUALEDGE 0xf011
0023 #define PCI_DEVICE_ID_NINJASCSI_32BI_LOGITEC 0xf012
0024 #define PCI_DEVICE_ID_NINJASCSI_32BIB_LOGITEC 0xf013
0025 #define PCI_DEVICE_ID_NINJASCSI_32UDE_MELCO 0xf015
0026 #define PCI_DEVICE_ID_NINJASCSI_32UDE_MELCO_II 0x8009
0027
0028
0029
0030
0031 enum {
0032 MODEL_IODATA = 0,
0033 MODEL_KME = 1,
0034 MODEL_WORKBIT = 2,
0035 MODEL_LOGITEC = 3,
0036 MODEL_PCI_WORKBIT = 4,
0037 MODEL_PCI_LOGITEC = 5,
0038 MODEL_PCI_MELCO = 6,
0039 };
0040
0041 static char * nsp32_model[] = {
0042 "I-O DATA CBSC-II CardBus card",
0043 "KME SCSI CardBus card",
0044 "Workbit duo SCSI CardBus card",
0045 "Logitec CardBus card with external ROM",
0046 "Workbit / I-O DATA PCI card",
0047 "Logitec PCI card with external ROM",
0048 "Melco CardBus/PCI card with external ROM",
0049 };
0050
0051
0052
0053
0054
0055 #define EXTENDED_SDTR_LEN 0x03
0056
0057
0058 typedef u32 u32_le;
0059 typedef u16 u16_le;
0060
0061
0062
0063
0064 #ifndef TRUE
0065 # define TRUE 1
0066 #endif
0067 #ifndef FALSE
0068 # define FALSE 0
0069 #endif
0070 #define ASSERT 1
0071 #define NEGATE 0
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 #define IRQ_CONTROL 0x00
0082 #define IRQ_STATUS 0x00
0083 # define IRQSTATUS_LATCHED_MSG BIT(0)
0084 # define IRQSTATUS_LATCHED_IO BIT(1)
0085 # define IRQSTATUS_LATCHED_CD BIT(2)
0086 # define IRQSTATUS_LATCHED_BUS_FREE BIT(3)
0087 # define IRQSTATUS_RESELECT_OCCUER BIT(4)
0088 # define IRQSTATUS_PHASE_CHANGE_IRQ BIT(5)
0089 # define IRQSTATUS_SCSIRESET_IRQ BIT(6)
0090 # define IRQSTATUS_TIMER_IRQ BIT(7)
0091 # define IRQSTATUS_FIFO_SHLD_IRQ BIT(8)
0092 # define IRQSTATUS_PCI_IRQ BIT(9)
0093 # define IRQSTATUS_BMCNTERR_IRQ BIT(10)
0094 # define IRQSTATUS_AUTOSCSI_IRQ BIT(11)
0095 # define PCI_IRQ_MASK BIT(12)
0096 # define TIMER_IRQ_MASK BIT(13)
0097 # define FIFO_IRQ_MASK BIT(14)
0098 # define SCSI_IRQ_MASK BIT(15)
0099 # define IRQ_CONTROL_ALL_IRQ_MASK (PCI_IRQ_MASK | \
0100 TIMER_IRQ_MASK | \
0101 FIFO_IRQ_MASK | \
0102 SCSI_IRQ_MASK )
0103 # define IRQSTATUS_ANY_IRQ (IRQSTATUS_RESELECT_OCCUER | \
0104 IRQSTATUS_PHASE_CHANGE_IRQ | \
0105 IRQSTATUS_SCSIRESET_IRQ | \
0106 IRQSTATUS_TIMER_IRQ | \
0107 IRQSTATUS_FIFO_SHLD_IRQ | \
0108 IRQSTATUS_PCI_IRQ | \
0109 IRQSTATUS_BMCNTERR_IRQ | \
0110 IRQSTATUS_AUTOSCSI_IRQ )
0111
0112 #define TRANSFER_CONTROL 0x02
0113 #define TRANSFER_STATUS 0x02
0114 # define CB_MMIO_MODE BIT(0)
0115 # define CB_IO_MODE BIT(1)
0116 # define BM_TEST BIT(2)
0117 # define BM_TEST_DIR BIT(3)
0118 # define DUAL_EDGE_ENABLE BIT(4)
0119 # define NO_TRANSFER_TO_HOST BIT(5)
0120 # define TRANSFER_GO BIT(7)
0121 # define BLIEND_MODE BIT(8)
0122 # define BM_START BIT(9)
0123 # define ADVANCED_BM_WRITE BIT(10)
0124 # define BM_SINGLE_MODE BIT(11)
0125 # define FIFO_TRUE_FULL BIT(12)
0126 # define FIFO_TRUE_EMPTY BIT(13)
0127 # define ALL_COUNTER_CLR BIT(14)
0128 # define FIFOTEST BIT(15)
0129
0130 #define INDEX_REG 0x04
0131
0132 #define TIMER_SET 0x06
0133 # define TIMER_CNT_MASK (0xff)
0134 # define TIMER_STOP BIT(8)
0135
0136 #define DATA_REG_LOW 0x08
0137 #define DATA_REG_HI 0x0a
0138
0139 #define FIFO_REST_CNT 0x0c
0140 # define FIFO_REST_MASK 0x1ff
0141 # define FIFO_EMPTY_SHLD_FLAG BIT(14)
0142 # define FIFO_FULL_SHLD_FLAG BIT(15)
0143
0144 #define SREQ_SMPL_RATE 0x0f
0145 # define SREQSMPLRATE_RATE0 BIT(0)
0146 # define SREQSMPLRATE_RATE1 BIT(1)
0147 # define SAMPLING_ENABLE BIT(2)
0148 # define SMPL_40M (0)
0149 # define SMPL_20M (SREQSMPLRATE_RATE0)
0150 # define SMPL_10M (SREQSMPLRATE_RATE1)
0151
0152 #define SCSI_BUS_CONTROL 0x10
0153 # define BUSCTL_SEL BIT(0)
0154 # define BUSCTL_RST BIT(1)
0155 # define BUSCTL_DATAOUT_ENB BIT(2)
0156 # define BUSCTL_ATN BIT(3)
0157 # define BUSCTL_ACK BIT(4)
0158 # define BUSCTL_BSY BIT(5)
0159 # define AUTODIRECTION BIT(6)
0160 # define ACKENB BIT(7)
0161
0162 #define CLR_COUNTER 0x12
0163 # define ACK_COUNTER_CLR BIT(0)
0164 # define SREQ_COUNTER_CLR BIT(1)
0165 # define FIFO_HOST_POINTER_CLR BIT(2)
0166 # define FIFO_REST_COUNT_CLR BIT(3)
0167 # define BM_COUNTER_CLR BIT(4)
0168 # define SAVED_ACK_CLR BIT(5)
0169 # define CLRCOUNTER_ALLMASK (ACK_COUNTER_CLR | \
0170 SREQ_COUNTER_CLR | \
0171 FIFO_HOST_POINTER_CLR | \
0172 FIFO_REST_COUNT_CLR | \
0173 BM_COUNTER_CLR | \
0174 SAVED_ACK_CLR )
0175
0176 #define SCSI_BUS_MONITOR 0x12
0177 # define BUSMON_MSG BIT(0)
0178 # define BUSMON_IO BIT(1)
0179 # define BUSMON_CD BIT(2)
0180 # define BUSMON_BSY BIT(3)
0181 # define BUSMON_ACK BIT(4)
0182 # define BUSMON_REQ BIT(5)
0183 # define BUSMON_SEL BIT(6)
0184 # define BUSMON_ATN BIT(7)
0185
0186 #define COMMAND_DATA 0x14
0187
0188 #define PARITY_CONTROL 0x16
0189 # define PARITY_CHECK_ENABLE BIT(0)
0190 # define PARITY_ERROR_CLEAR BIT(1)
0191 #define PARITY_STATUS 0x16
0192
0193 # define PARITY_ERROR_NORMAL BIT(1)
0194 # define PARITY_ERROR_LSB BIT(1)
0195 # define PARITY_ERROR_MSB BIT(2)
0196
0197 #define RESELECT_ID 0x18
0198
0199 #define COMMAND_CONTROL 0x18
0200 # define CLEAR_CDB_FIFO_POINTER BIT(0)
0201 # define AUTO_COMMAND_PHASE BIT(1)
0202 # define AUTOSCSI_START BIT(2)
0203 # define AUTOSCSI_RESTART BIT(3)
0204 # define AUTO_PARAMETER BIT(4)
0205 # define AUTO_ATN BIT(5)
0206 # define AUTO_MSGIN_00_OR_04 BIT(6)
0207 # define AUTO_MSGIN_02 BIT(7)
0208 # define AUTO_MSGIN_03 BIT(8)
0209
0210 #define SET_ARBIT 0x1a
0211 # define ARBIT_GO BIT(0)
0212 # define ARBIT_CLEAR BIT(1)
0213
0214 #define ARBIT_STATUS 0x1a
0215
0216 # define ARBIT_WIN BIT(1)
0217 # define ARBIT_FAIL BIT(2)
0218 # define AUTO_PARAMETER_VALID BIT(3)
0219 # define SGT_VALID BIT(4)
0220
0221 #define SYNC_REG 0x1c
0222
0223 #define ACK_WIDTH 0x1d
0224
0225 #define SCSI_DATA_WITH_ACK 0x20
0226 #define SCSI_OUT_LATCH_TARGET_ID 0x22
0227 #define SCSI_DATA_IN 0x22
0228
0229 #define SCAM_CONTROL 0x24
0230 #define SCAM_STATUS 0x24
0231 # define SCAM_MSG BIT(0)
0232 # define SCAM_IO BIT(1)
0233 # define SCAM_CD BIT(2)
0234 # define SCAM_BSY BIT(3)
0235 # define SCAM_SEL BIT(4)
0236 # define SCAM_XFEROK BIT(5)
0237
0238 #define SCAM_DATA 0x26
0239 # define SD0 BIT(0)
0240 # define SD1 BIT(1)
0241 # define SD2 BIT(2)
0242 # define SD3 BIT(3)
0243 # define SD4 BIT(4)
0244 # define SD5 BIT(5)
0245 # define SD6 BIT(6)
0246 # define SD7 BIT(7)
0247
0248 #define SACK_CNT 0x28
0249 #define SREQ_CNT 0x2c
0250
0251 #define FIFO_DATA_LOW 0x30
0252 #define FIFO_DATA_HIGH 0x32
0253 #define BM_START_ADR 0x34
0254
0255 #define BM_CNT 0x38
0256 # define BM_COUNT_MASK 0x0001ffffUL
0257 # define SGTEND BIT(31)
0258
0259 #define SGT_ADR 0x3c
0260 #define WAIT_REG 0x40
0261
0262 #define SCSI_EXECUTE_PHASE 0x40
0263 # define COMMAND_PHASE BIT(0)
0264 # define DATA_IN_PHASE BIT(1)
0265 # define DATA_OUT_PHASE BIT(2)
0266 # define MSGOUT_PHASE BIT(3)
0267 # define STATUS_PHASE BIT(4)
0268 # define ILLEGAL_PHASE BIT(5)
0269 # define BUS_FREE_OCCUER BIT(6)
0270 # define MSG_IN_OCCUER BIT(7)
0271 # define MSG_OUT_OCCUER BIT(8)
0272 # define SELECTION_TIMEOUT BIT(9)
0273 # define MSGIN_00_VALID BIT(10)
0274 # define MSGIN_02_VALID BIT(11)
0275 # define MSGIN_03_VALID BIT(12)
0276 # define MSGIN_04_VALID BIT(13)
0277 # define AUTOSCSI_BUSY BIT(15)
0278
0279 #define SCSI_CSB_IN 0x42
0280
0281 #define SCSI_MSG_OUT 0x44
0282 # define MSGOUT_COUNT_MASK (BIT(0)|BIT(1))
0283 # define MV_VALID BIT(7)
0284
0285 #define SEL_TIME_OUT 0x48
0286 #define SAVED_SACK_CNT 0x4c
0287
0288 #define HTOSDATADELAY 0x50
0289 #define STOHDATADELAY 0x54
0290 #define ACKSUMCHECKRD 0x58
0291 #define REQSUMCHECKRD 0x5c
0292
0293
0294
0295
0296
0297
0298 #define CLOCK_DIV 0x00
0299 # define CLOCK_2 BIT(0)
0300 # define CLOCK_4 BIT(1)
0301 # define PCICLK BIT(7)
0302
0303 #define TERM_PWR_CONTROL 0x01
0304 # define BPWR BIT(0)
0305 # define SENSE BIT(1)
0306
0307 #define EXT_PORT_DDR 0x02
0308 #define EXT_PORT 0x03
0309 # define LED_ON (0)
0310 # define LED_OFF BIT(0)
0311
0312 #define IRQ_SELECT 0x04
0313 # define IRQSELECT_RESELECT_IRQ BIT(0)
0314 # define IRQSELECT_PHASE_CHANGE_IRQ BIT(1)
0315 # define IRQSELECT_SCSIRESET_IRQ BIT(2)
0316 # define IRQSELECT_TIMER_IRQ BIT(3)
0317 # define IRQSELECT_FIFO_SHLD_IRQ BIT(4)
0318 # define IRQSELECT_TARGET_ABORT_IRQ BIT(5)
0319 # define IRQSELECT_MASTER_ABORT_IRQ BIT(6)
0320 # define IRQSELECT_SERR_IRQ BIT(7)
0321 # define IRQSELECT_PERR_IRQ BIT(8)
0322 # define IRQSELECT_BMCNTERR_IRQ BIT(9)
0323 # define IRQSELECT_AUTO_SCSI_SEQ_IRQ BIT(10)
0324
0325 #define OLD_SCSI_PHASE 0x05
0326 # define OLD_MSG BIT(0)
0327 # define OLD_IO BIT(1)
0328 # define OLD_CD BIT(2)
0329 # define OLD_BUSY BIT(3)
0330
0331 #define FIFO_FULL_SHLD_COUNT 0x06
0332 #define FIFO_EMPTY_SHLD_COUNT 0x07
0333
0334 #define EXP_ROM_CONTROL 0x08
0335 # define ROM_WRITE_ENB BIT(0)
0336 # define IO_ACCESS_ENB BIT(1)
0337 # define ROM_ADR_CLEAR BIT(2)
0338
0339 #define EXP_ROM_ADR 0x09
0340
0341 #define EXP_ROM_DATA 0x0a
0342
0343 #define CHIP_MODE 0x0b
0344 # define OEM0 BIT(1)
0345 # define OEM1 BIT(2)
0346 # define OPTB BIT(3)
0347 # define OPTC BIT(4)
0348 # define OPTD BIT(5)
0349 # define OPTE BIT(6)
0350 # define OPTF BIT(7)
0351
0352 #define MISC_WR 0x0c
0353 #define MISC_RD 0x0c
0354 # define SCSI_DIRECTION_DETECTOR_SELECT BIT(0)
0355 # define SCSI2_HOST_DIRECTION_VALID BIT(1)
0356 # define HOST2_SCSI_DIRECTION_VALID BIT(2)
0357 # define DELAYED_BMSTART BIT(3)
0358 # define MASTER_TERMINATION_SELECT BIT(4)
0359 # define BMREQ_NEGATE_TIMING_SEL BIT(5)
0360 # define AUTOSEL_TIMING_SEL BIT(6)
0361 # define MISC_MABORT_MASK BIT(7)
0362 # define BMSTOP_CHANGE2_NONDATA_PHASE BIT(8)
0363
0364 #define BM_CYCLE 0x0d
0365 # define BM_CYCLE0 BIT(0)
0366 # define BM_CYCLE1 BIT(1)
0367 # define BM_FRAME_ASSERT_TIMING BIT(2)
0368 # define BM_IRDY_ASSERT_TIMING BIT(3)
0369 # define BM_SINGLE_BUS_MASTER BIT(4)
0370 # define MEMRD_CMD0 BIT(5)
0371 # define SGT_AUTO_PARA_MEMED_CMD BIT(6)
0372 # define MEMRD_CMD1 BIT(7)
0373
0374
0375 #define SREQ_EDGH 0x0e
0376 # define SREQ_EDGH_SELECT BIT(0)
0377
0378 #define UP_CNT 0x0f
0379 # define REQCNT_UP BIT(0)
0380 # define ACKCNT_UP BIT(1)
0381 # define BMADR_UP BIT(4)
0382 # define BMCNT_UP BIT(5)
0383 # define SGT_CNT_UP BIT(7)
0384
0385 #define CFG_CMD_STR 0x10
0386 #define CFG_LATE_CACHE 0x11
0387 #define CFG_BASE_ADR_1 0x12
0388 #define CFG_BASE_ADR_2 0x13
0389 #define CFG_INLINE 0x14
0390
0391 #define SERIAL_ROM_CTL 0x15
0392 # define SCL BIT(0)
0393 # define ENA BIT(1)
0394 # define SDA BIT(2)
0395
0396 #define FIFO_HST_POINTER 0x16
0397 #define SREQ_DELAY 0x17
0398 #define SACK_DELAY 0x18
0399 #define SREQ_NOISE_CANCEL 0x19
0400 #define SDP_NOISE_CANCEL 0x1a
0401 #define DELAY_TEST 0x1b
0402 #define SD0_NOISE_CANCEL 0x20
0403 #define SD1_NOISE_CANCEL 0x21
0404 #define SD2_NOISE_CANCEL 0x22
0405 #define SD3_NOISE_CANCEL 0x23
0406 #define SD4_NOISE_CANCEL 0x24
0407 #define SD5_NOISE_CANCEL 0x25
0408 #define SD6_NOISE_CANCEL 0x26
0409 #define SD7_NOISE_CANCEL 0x27
0410
0411
0412
0413
0414
0415 #define BUSMON_BUS_FREE 0
0416 #define BUSMON_COMMAND ( BUSMON_BSY | BUSMON_CD | BUSMON_REQ )
0417 #define BUSMON_MESSAGE_IN ( BUSMON_BSY | BUSMON_MSG | BUSMON_IO | BUSMON_CD | BUSMON_REQ )
0418 #define BUSMON_MESSAGE_OUT ( BUSMON_BSY | BUSMON_MSG | BUSMON_CD | BUSMON_REQ )
0419 #define BUSMON_DATA_IN ( BUSMON_BSY | BUSMON_IO | BUSMON_REQ )
0420 #define BUSMON_DATA_OUT ( BUSMON_BSY | BUSMON_REQ )
0421 #define BUSMON_STATUS ( BUSMON_BSY | BUSMON_IO | BUSMON_CD | BUSMON_REQ )
0422 #define BUSMON_RESELECT ( BUSMON_IO | BUSMON_SEL)
0423 #define BUSMON_PHASE_MASK ( BUSMON_MSG | BUSMON_IO | BUSMON_CD | BUSMON_SEL)
0424
0425 #define BUSPHASE_COMMAND ( BUSMON_COMMAND & BUSMON_PHASE_MASK )
0426 #define BUSPHASE_MESSAGE_IN ( BUSMON_MESSAGE_IN & BUSMON_PHASE_MASK )
0427 #define BUSPHASE_MESSAGE_OUT ( BUSMON_MESSAGE_OUT & BUSMON_PHASE_MASK )
0428 #define BUSPHASE_DATA_IN ( BUSMON_DATA_IN & BUSMON_PHASE_MASK )
0429 #define BUSPHASE_DATA_OUT ( BUSMON_DATA_OUT & BUSMON_PHASE_MASK )
0430 #define BUSPHASE_STATUS ( BUSMON_STATUS & BUSMON_PHASE_MASK )
0431 #define BUSPHASE_SELECT ( BUSMON_SEL | BUSMON_IO )
0432
0433
0434
0435
0436
0437 #define NSP32_SG_SIZE SG_ALL
0438
0439 typedef struct _nsp32_sgtable {
0440
0441 u32_le addr;
0442 u32_le len;
0443 } __attribute__ ((packed)) nsp32_sgtable;
0444
0445 typedef struct _nsp32_sglun {
0446 nsp32_sgtable sgt[NSP32_SG_SIZE+1];
0447 } __attribute__ ((packed)) nsp32_sglun;
0448 #define NSP32_SG_TABLE_SIZE (sizeof(nsp32_sgtable) * NSP32_SG_SIZE * MAX_TARGET * MAX_LUN)
0449
0450
0451
0452 typedef struct _nsp32_autoparam {
0453 u8 cdb[4 * 0x10];
0454 u32_le msgout;
0455 u8 syncreg;
0456 u8 ackwidth;
0457 u8 target_id;
0458 u8 sample_reg;
0459 u16_le command_control;
0460 u16_le transfer_control;
0461 u32_le sgt_pointer;
0462 u32_le dummy[2];
0463 } __attribute__ ((packed)) nsp32_autoparam;
0464
0465
0466
0467
0468
0469 #define MSGOUTBUF_MAX 20
0470 #define MSGINBUF_MAX 20
0471
0472
0473 #define NSP32_TRANSFER_BUSMASTER BIT(0)
0474 #define NSP32_TRANSFER_MMIO BIT(1)
0475 #define NSP32_TRANSFER_PIO BIT(2)
0476
0477
0478
0479
0480
0481
0482
0483
0484 #define DISCPRIV_OK BIT(0)
0485 #define MSGIN03 BIT(1)
0486
0487 typedef struct _nsp32_lunt {
0488 struct scsi_cmnd *SCpnt;
0489 unsigned long save_datp;
0490 int msgin03;
0491 unsigned int sg_num;
0492 int cur_entry;
0493 nsp32_sglun *sglun;
0494 dma_addr_t sglun_paddr;
0495 } nsp32_lunt;
0496
0497
0498
0499
0500
0501 #define NSP32_HOST_SCSIID 7
0502 #define MAX_TARGET 8
0503 #define MAX_LUN 8
0504
0505
0506 typedef struct _nsp32_sync_table {
0507 unsigned char period_num;
0508 unsigned char ackwidth;
0509 unsigned char start_period;
0510 unsigned char end_period;
0511 unsigned char sample_rate;
0512 } nsp32_sync_table;
0513
0514
0515
0516
0517
0518
0519 #define SDTR_INITIATOR BIT(0)
0520 #define SDTR_TARGET BIT(1)
0521 #define SDTR_DONE BIT(2)
0522
0523
0524 #define FAST5M 0x32
0525 #define FAST10M 0x19
0526 #define ULTRA20M 0x0c
0527
0528
0529 #define ASYNC_OFFSET 0
0530 #define SYNC_OFFSET 0xf
0531
0532
0533
0534
0535 #define TO_SYNCREG(period, offset) (((period) & 0x0f) << 4 | ((offset) & 0x0f))
0536
0537 struct nsp32_cmd_priv {
0538 enum sam_status status;
0539 };
0540
0541 static inline struct nsp32_cmd_priv *nsp32_priv(struct scsi_cmnd *cmd)
0542 {
0543 return scsi_cmd_priv(cmd);
0544 }
0545
0546 typedef struct _nsp32_target {
0547 unsigned char syncreg;
0548 unsigned char ackwidth;
0549 unsigned char period;
0550 unsigned char offset;
0551 int sync_flag;
0552 int limit_entry;
0553
0554 unsigned char sample_reg;
0555 } nsp32_target;
0556
0557 typedef struct _nsp32_hw_data {
0558 int IrqNumber;
0559 int BaseAddress;
0560 int NumAddress;
0561 void __iomem *MmioAddress;
0562 #define NSP32_MMIO_OFFSET 0x0800
0563 unsigned long MmioLength;
0564
0565 struct scsi_cmnd *CurrentSC;
0566
0567 struct pci_dev *Pci;
0568 const struct pci_device_id *pci_devid;
0569 struct Scsi_Host *Host;
0570 spinlock_t Lock;
0571
0572 char info_str[100];
0573
0574
0575 nsp32_sglun *sg_list;
0576 dma_addr_t sg_paddr;
0577 nsp32_autoparam *autoparam;
0578 dma_addr_t auto_paddr;
0579 int cur_entry;
0580
0581
0582 nsp32_lunt *cur_lunt;
0583 nsp32_lunt lunt[MAX_TARGET][MAX_LUN];
0584
0585 nsp32_target *cur_target;
0586 nsp32_target target[MAX_TARGET];
0587 int cur_id;
0588 int cur_lun;
0589
0590
0591 int trans_method;
0592 int resettime;
0593 int clock;
0594 nsp32_sync_table *synct;
0595 int syncnum;
0596
0597
0598 unsigned char msgoutbuf[MSGOUTBUF_MAX];
0599 char msgout_len;
0600 unsigned char msginbuf [MSGINBUF_MAX];
0601 char msgin_len;
0602
0603 } nsp32_hw_data;
0604
0605
0606
0607
0608 #define RESET_HOLD_TIME 10000
0609
0610 #define SEL_TIMEOUT_TIME 10000
0611
0612 #define ARBIT_TIMEOUT_TIME 100
0613 #define REQSACK_TIMEOUT_TIME 10000
0614
0615
0616 #endif
0617