Drop the bus reset hold delay back down to 25us. The 250us

value slipped in from a debugging session.

Add AHC_LSCBS_ENABLED and AHC_SCB_CONFIG_USED ahc_flags which
allow for some code to move to the core.

Remove extern for ahc_syncrates[].  The OSMs no longer need
direct access to this array.

Add serial eeprom field to the ahc softc.

Prototype ahc_search_untagged_queues() and ahc_print_register().

Convert to AHC_SHOW_XXX debug option format.
This commit is contained in:
gibbs 2002-08-31 06:42:10 +00:00
parent ad3fe4a4aa
commit 2acc1e7147

View File

@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#40 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#51 $
*
* $FreeBSD$
*/
@ -171,7 +171,7 @@ struct seeprom_descriptor;
#define AHC_TMODE_CMDS 256
/* Reset line assertion time in us */
#define AHC_BUSRESET_DELAY 250
#define AHC_BUSRESET_DELAY 25
/******************* Chip Characteristics/Operating Settings *****************/
/*
@ -351,9 +351,11 @@ typedef enum {
*/
AHC_BIOS_ENABLED = 0x80000,
AHC_ALL_INTERRUPTS = 0x100000,
AHC_PAGESCBS = 0x400000, /* Enable SCB paging */
AHC_EDGE_INTERRUPT = 0x800000, /* Device uses edge triggered ints */
AHC_39BIT_ADDRESSING = 0x1000000 /* Use 39 bit addressing scheme. */
AHC_PAGESCBS = 0x400000, /* Enable SCB paging */
AHC_EDGE_INTERRUPT = 0x800000, /* Device uses edge triggered ints */
AHC_39BIT_ADDRESSING = 0x1000000, /* Use 39 bit addressing scheme. */
AHC_LSCBS_ENABLED = 0x2000000, /* 64Byte SCBs enabled */
AHC_SCB_CONFIG_USED = 0x4000000 /* No SEEPROM but SCB2 had info. */
} ahc_flag;
/************************* Hardware SCB Definition ***************************/
@ -714,11 +716,6 @@ struct ahc_syncrate {
char *rate;
};
/*
* The synchronouse transfer rate table.
*/
extern struct ahc_syncrate ahc_syncrates[];
/*
* Indexes into our table of syncronous transfer rates.
*/
@ -942,6 +939,7 @@ struct ahc_softc {
ahc_feature features;
ahc_bug bugs;
ahc_flag flags;
struct seeprom_config *seep_config;
/* Values to store in the SEQCTL register for pause and unpause */
uint8_t unpause;
@ -1149,6 +1147,11 @@ int ahc_search_qinfifo(struct ahc_softc *ahc, int target,
char channel, int lun, u_int tag,
role_t role, uint32_t status,
ahc_search_action action);
int ahc_search_untagged_queues(struct ahc_softc *ahc,
ahc_io_ctx_t ctx,
int target, char channel,
int lun, uint32_t status,
ahc_search_action action);
int ahc_search_disc_list(struct ahc_softc *ahc, int target,
char channel, int lun, u_int tag,
int stop_on_first, int remove,
@ -1224,12 +1227,28 @@ cam_status ahc_find_tmode_devs(struct ahc_softc *ahc,
#endif
/******************************* Debug ***************************************/
#ifdef AHC_DEBUG
extern int ahc_debug;
#define AHC_SHOWMISC 0x1
#define AHC_SHOWSENSE 0x2
extern uint32_t ahc_debug;
#define AHC_SHOW_MISC 0x0001
#define AHC_SHOW_SENSE 0x0002
#define AHC_DUMP_SEEPROM 0x0004
#define AHC_SHOW_TERMCTL 0x0008
#define AHC_SHOW_MEMORY 0x0010
#define AHC_SHOW_MESSAGES 0x0020
#define AHC_SHOW_SELTO 0x0080
#define AHC_SHOW_QFULL 0x0200
#define AHC_SHOW_QUEUE 0x0400
#define AHC_SHOW_TQIN 0x0800
#define AHC_DEBUG_SEQUENCER 0x1000
#endif
void ahc_print_scb(struct scb *scb);
void ahc_dump_card_state(struct ahc_softc *ahc);
int ahc_print_register(ahc_reg_parse_entry_t *table,
u_int num_entries,
const char *name,
u_int address,
u_int value,
u_int *cur_column,
u_int wrap_point);
/******************************* SEEPROM *************************************/
int ahc_acquire_seeprom(struct ahc_softc *ahc,
struct seeprom_descriptor *sd);