fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / scsi / aic7xxx / aic79xx.h
index 1d11f7e..170a434 100644 (file)
@@ -53,14 +53,6 @@ struct ahd_platform_data;
 struct scb_platform_data;
 
 /****************************** Useful Macros *********************************/
-#ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
 #ifndef TRUE
 #define TRUE 1
 #endif
@@ -68,8 +60,6 @@ struct scb_platform_data;
 #define FALSE 0
 #endif
 
-#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(*array))
-
 #define ALL_CHANNELS '\0'
 #define ALL_TARGETS_MASK 0xFFFF
 #define INITIATOR_WILDCARD     (~0)
@@ -372,7 +362,7 @@ typedef enum {
        AHD_CURRENT_SENSING   = 0x40000,
        AHD_SCB_CONFIG_USED   = 0x80000,/* No SEEPROM but SCB had info. */
        AHD_HP_BOARD          = 0x100000,
-       AHD_RESET_POLL_ACTIVE = 0x200000,
+       AHD_BUS_RESET_ACTIVE  = 0x200000,
        AHD_UPDATE_PEND_CMDS  = 0x400000,
        AHD_RUNNING_QOUTFIFO  = 0x800000,
        AHD_HAD_FIRST_SEL     = 0x1000000
@@ -589,7 +579,7 @@ typedef enum {
        SCB_PACKETIZED          = 0x00800,
        SCB_EXPECT_PPR_BUSFREE  = 0x01000,
        SCB_PKT_SENSE           = 0x02000,
-       SCB_CMDPHASE_ABORT      = 0x04000,
+       SCB_EXTERNAL_RESET      = 0x04000,/* Device was reset externally */
        SCB_ON_COL_LIST         = 0x08000,
        SCB_SILENT              = 0x10000 /*
                                           * Be quiet about transmission type
@@ -974,8 +964,6 @@ int         ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
 
 int            ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
                                  u_int start_addr, u_int count);
-int            ahd_wait_seeprom(struct ahd_softc *ahd);
-int            ahd_verify_vpd_cksum(struct vpd_config *vpd);
 int            ahd_verify_cksum(struct seeprom_config *sc);
 int            ahd_acquire_seeprom(struct ahd_softc *ahd);
 void           ahd_release_seeprom(struct ahd_softc *ahd);
@@ -1322,8 +1310,6 @@ struct ahd_pci_identity {
        char                    *name;
        ahd_device_setup_t      *setup;
 };
-extern struct ahd_pci_identity ahd_pci_ident_table [];
-extern const u_int ahd_num_pci_devs;
 
 /***************************** VL/EISA Declarations ***************************/
 struct aic7770_identity {
@@ -1341,15 +1327,6 @@ extern const int ahd_num_aic7770_devs;
 /*************************** Function Declarations ****************************/
 /******************************************************************************/
 void                   ahd_reset_cmds_pending(struct ahd_softc *ahd);
-u_int                  ahd_find_busy_tcl(struct ahd_softc *ahd, u_int tcl);
-void                   ahd_busy_tcl(struct ahd_softc *ahd,
-                                    u_int tcl, u_int busyid);
-static __inline void   ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl);
-static __inline void
-ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
-{
-       ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL);
-}
 
 /***************************** PCI Front End *********************************/
 struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t);
@@ -1358,7 +1335,6 @@ int                         ahd_pci_config(struct ahd_softc *,
 int    ahd_pci_test_register_access(struct ahd_softc *);
 
 /************************** SCB and SCB queue management **********************/
-int            ahd_probe_scbs(struct ahd_softc *);
 void           ahd_qinfifo_requeue_tail(struct ahd_softc *ahd,
                                         struct scb *scb);
 int            ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
@@ -1376,33 +1352,20 @@ int                      ahd_parse_vpddata(struct ahd_softc *ahd,
 int                     ahd_parse_cfgdata(struct ahd_softc *ahd,
                                           struct seeprom_config *sc);
 void                    ahd_intr_enable(struct ahd_softc *ahd, int enable);
-void                    ahd_update_coalescing_values(struct ahd_softc *ahd,
-                                                     u_int timer,
-                                                     u_int maxcmds,
-                                                     u_int mincmds);
-void                    ahd_enable_coalescing(struct ahd_softc *ahd,
-                                              int enable);
 void                    ahd_pause_and_flushwork(struct ahd_softc *ahd);
 int                     ahd_suspend(struct ahd_softc *ahd); 
-int                     ahd_resume(struct ahd_softc *ahd);
 void                    ahd_set_unit(struct ahd_softc *, int);
 void                    ahd_set_name(struct ahd_softc *, char *);
 struct scb             *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
 void                    ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
-void                    ahd_alloc_scbs(struct ahd_softc *ahd);
 void                    ahd_free(struct ahd_softc *ahd);
 int                     ahd_reset(struct ahd_softc *ahd, int reinit);
-void                    ahd_shutdown(void *arg);
 int                     ahd_write_flexport(struct ahd_softc *ahd,
                                            u_int addr, u_int value);
 int                     ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
                                           uint8_t *value);
-int                     ahd_wait_flexport(struct ahd_softc *ahd);
 
 /*************************** Interrupt Services *******************************/
-void                   ahd_pci_intr(struct ahd_softc *ahd);
-void                   ahd_clear_intstat(struct ahd_softc *ahd);
-void                   ahd_flush_qoutfifo(struct ahd_softc *ahd);
 void                   ahd_run_qoutfifo(struct ahd_softc *ahd);
 #ifdef AHD_TARGET_MODE
 void                   ahd_run_tqinfifo(struct ahd_softc *ahd, int paused);
@@ -1411,7 +1374,6 @@ void                      ahd_handle_hwerrint(struct ahd_softc *ahd);
 void                   ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat);
 void                   ahd_handle_scsiint(struct ahd_softc *ahd,
                                           u_int intstat);
-void                   ahd_clear_critical_section(struct ahd_softc *ahd);
 
 /***************************** Error Recovery *********************************/
 typedef enum {
@@ -1428,23 +1390,9 @@ int                      ahd_search_disc_list(struct ahd_softc *ahd, int target,
                                             char channel, int lun, u_int tag,
                                             int stop_on_first, int remove,
                                             int save_state);
-void                   ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
 int                    ahd_reset_channel(struct ahd_softc *ahd, char channel,
                                          int initiate_reset);
-int                    ahd_abort_scbs(struct ahd_softc *ahd, int target,
-                                      char channel, int lun, u_int tag,
-                                      role_t role, uint32_t status);
-void                   ahd_restart(struct ahd_softc *ahd);
-void                   ahd_clear_fifo(struct ahd_softc *ahd, u_int fifo);
-void                   ahd_handle_scb_status(struct ahd_softc *ahd,
-                                             struct scb *scb);
-void                   ahd_handle_scsi_status(struct ahd_softc *ahd,
-                                              struct scb *scb);
-void                   ahd_calc_residual(struct ahd_softc *ahd,
-                                         struct scb *scb);
 /*************************** Utility Functions ********************************/
-struct ahd_phase_table_entry*
-                       ahd_lookup_phase_entry(int phase);
 void                   ahd_compile_devinfo(struct ahd_devinfo *devinfo,
                                            u_int our_id, u_int target,
                                            u_int lun, char channel,
@@ -1452,14 +1400,6 @@ void                     ahd_compile_devinfo(struct ahd_devinfo *devinfo,
 /************************** Transfer Negotiation ******************************/
 void                   ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
                                          u_int *ppr_options, u_int maxsync);
-void                   ahd_validate_offset(struct ahd_softc *ahd,
-                                           struct ahd_initiator_tinfo *tinfo,
-                                           u_int period, u_int *offset,
-                                           int wide, role_t role);
-void                   ahd_validate_width(struct ahd_softc *ahd,
-                                          struct ahd_initiator_tinfo *tinfo,
-                                          u_int *bus_width,
-                                          role_t role);
 /*
  * Negotiation types.  These are used to qualify if we should renegotiate
  * even if our goal and current transport parameters are identical.
@@ -1488,10 +1428,6 @@ typedef enum {
        AHD_QUEUE_TAGGED
 } ahd_queue_alg;
 
-void                   ahd_set_tags(struct ahd_softc *ahd,
-                                    struct ahd_devinfo *devinfo,
-                                    ahd_queue_alg alg);
-
 /**************************** Target Mode *************************************/
 #ifdef AHD_TARGET_MODE
 void           ahd_send_lstate_events(struct ahd_softc *,
@@ -1529,10 +1465,8 @@ extern uint32_t ahd_debug;
 #define AHD_SHOW_INT_COALESCING        0x10000
 #define AHD_DEBUG_SEQUENCER    0x20000
 #endif
-void                   ahd_print_scb(struct scb *scb);
 void                   ahd_print_devinfo(struct ahd_softc *ahd,
                                          struct ahd_devinfo *devinfo);
-void                   ahd_dump_sglist(struct scb *scb);
 void                   ahd_dump_card_state(struct ahd_softc *ahd);
 int                    ahd_print_register(ahd_reg_parse_entry_t *table,
                                           u_int num_entries,
@@ -1541,5 +1475,4 @@ int                       ahd_print_register(ahd_reg_parse_entry_t *table,
                                           u_int value,
                                           u_int *cur_column,
                                           u_int wrap_point);
-void                   ahd_dump_scbs(struct ahd_softc *ahd);
 #endif /* _AIC79XX_H_ */