#define STAT_BUSMASK (STAT_MSG|STAT_CD|STAT_IO) #define STAT_DATAOUT (0) /* Data out */ #define STAT_DATAIN (STAT_IO) /* Data in */ #define STAT_COMMAND (STAT_CD) /* Command out */ #define STAT_STATUS (STAT_CD|STAT_IO) /* Status In */ #define STAT_MESGOUT (STAT_MSG|STAT_CD) /* Message out */ #define STAT_MESGIN (STAT_MSG|STAT_CD|STAT_IO) /* Message In */
/* bus ID for select / reselect */ #define REG_SDID (4) #define BUSID(target) ((target) & 7)
/* High transfer count (read/write) */ #define REG_CTCH (14) #define REG_STCH (14)
/* ID register (read only) */ #define REG_ID (14)
/* Data alignment */ #define REG_DAL (15)
typedefenum {
PHASE_IDLE, /* we're not planning on doing anything */
PHASE_SELECTION, /* selecting a device */
PHASE_SELSTEPS, /* selection with command steps */
PHASE_COMMAND, /* command sent */
PHASE_MESSAGESENT, /* selected, and we're sending cmd */
PHASE_DATAOUT, /* data out to device */
PHASE_DATAIN, /* data in from device */
PHASE_MSGIN, /* message in from device */
PHASE_MSGIN_DISCONNECT, /* disconnecting from bus */
PHASE_MSGOUT, /* after message out phase */
PHASE_MSGOUT_EXPECT, /* expecting message out */
PHASE_STATUS, /* status from device */
PHASE_DONE /* Command complete */
} phase_t;
typedefenum {
DMA_OUT, /* DMA from memory to chip */
DMA_IN /* DMA from chip to memory */
} fasdmadir_t;
typedefenum {
fasdma_none, /* No dma */
fasdma_pio, /* PIO mode */
fasdma_pseudo, /* Pseudo DMA */
fasdma_real_block, /* Real DMA, on block by block basis */
fasdma_real_all /* Real DMA, on request by request */
} fasdmatype_t;
/* driver information */ struct {
phase_t phase; /* current phase */ void __iomem *io_base; /* iomem base of FAS216 */ unsignedint io_shift; /* shift to adjust reg offsets by */ unsignedchar cfg[4]; /* configuration registers */ constchar *type; /* chip type */ unsignedint irq; /* interrupt */ int dma; /* dma channel */
struct scsi_pointer SCp; /* current commands data pointer */
MsgQueue_t msgs; /* message queue for connected device */
unsignedint async_stp; /* Async transfer STP value */ unsignedchar msgin_fifo; /* bytes in fifo at time of message in */ unsignedchar message[256]; /* last message received from device */
unsignedchar disconnectable:1; /* this command can be disconnected */ unsignedchar aborting:1; /* aborting command */
} scsi;
/* per-device info */ struct fas216_device { unsignedchar disconnect_ok:1; /* device can disconnect */ unsignedchar parity_enabled:1; /* parity checking enabled */ unsignedchar parity_check:1; /* need to check parity checking */ unsignedchar period; /* sync xfer period in (*4ns) */ unsignedchar stp; /* synchronous transfer period */ unsignedchar sof; /* synchronous offset register */ unsignedchar wide_xfer; /* currently negociated wide transfer */
neg_t sync_state; /* synchronous transfer mode */
neg_t wide_state; /* wide transfer mode */
} device[8]; unsignedlong busyluns[64/sizeof(unsignedlong)];/* array of bits indicating LUNs busy */
/* dma */ struct {
fasdmatype_t transfer_type; /* current type of DMA transfer */
fasdmatype_t (*setup) (struct Scsi_Host *host, struct scsi_pointer *SCp, fasdmadir_t direction, fasdmatype_t min_dma); void (*pseudo)(struct Scsi_Host *host, struct scsi_pointer *SCp, fasdmadir_t direction, int transfer); void (*stop) (struct Scsi_Host *host, struct scsi_pointer *SCp);
} dma;
/* miscellaneous */ int internal_done; /* flag to indicate request done */ struct scsi_eh_save ses; /* holds request sense restore info */ unsignedlong magic_end;
} FAS216_Info;
/* driver-private data per SCSI command. */ struct fas216_cmd_priv { /* * @scsi_pointer must be the first member. See also arm_scsi_pointer().
*/ struct scsi_pointer scsi_pointer; void (*scsi_done)(struct scsi_cmnd *cmd);
};
/* Function: int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt) * Purpose : queue a command for adapter to process. * Params : h - host adapter * : SCpnt - Command to queue * Returns : 0 - success, else error
*/ externint fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt);
/* Function: int fas216_noqueue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt) * Purpose : queue a command for adapter to process, and process it to completion. * Params : h - host adapter * : SCpnt - Command to queue * Returns : 0 - success, else error
*/ externint fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *);
/* Function: irqreturn_t fas216_intr (FAS216_Info *info) * Purpose : handle interrupts from the interface to progress a command * Params : info - interface to service
*/ extern irqreturn_t fas216_intr (FAS216_Info *info);
/* Function: int fas216_eh_abort(struct scsi_cmnd *SCpnt) * Purpose : abort this command * Params : SCpnt - command to abort * Returns : FAILED if unable to abort
*/ externint fas216_eh_abort(struct scsi_cmnd *SCpnt);
/* Function: int fas216_eh_device_reset(struct scsi_cmnd *SCpnt) * Purpose : Reset the device associated with this command * Params : SCpnt - command specifing device to reset * Returns : FAILED if unable to reset
*/ externint fas216_eh_device_reset(struct scsi_cmnd *SCpnt);
/* Function: int fas216_eh_bus_reset(struct scsi_cmnd *SCpnt) * Purpose : Reset the complete bus associated with this command * Params : SCpnt - command specifing bus to reset * Returns : FAILED if unable to reset
*/ externint fas216_eh_bus_reset(struct scsi_cmnd *SCpnt);
/* Function: int fas216_eh_host_reset(struct scsi_cmnd *SCpnt) * Purpose : Reset the host associated with this command * Params : SCpnt - command specifing host to reset * Returns : FAILED if unable to reset
*/ externint fas216_eh_host_reset(struct scsi_cmnd *SCpnt);
#endif/* FAS216_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.