diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:10:08 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:10:08 -0800 |
| commit | 170233272f5a2045a5f8fb37b980197e420c4a76 (patch) | |
| tree | 8d172e05cc294621ff28894bf52ac37d521c42c3 /include/linux | |
| parent | 740d9a78d59dc1c6584bc43bb1a64671f390c12c (diff) | |
v2.4.6 -> v2.4.6.1
- merge with Alan (irda, s390, mips64, chris, sk98lin, mips/mm)
- rth: fix alpha RTC calibration
- Paul Mackerras: fix PPC typo
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/apm_bios.h | 3 | ||||
| -rw-r--r-- | include/linux/hdreg.h | 20 | ||||
| -rw-r--r-- | include/linux/ibmtr.h | 200 |
3 files changed, 79 insertions, 144 deletions
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h index 3a66b2d4ffb8..22fa68ec907b 100644 --- a/include/linux/apm_bios.h +++ b/include/linux/apm_bios.h @@ -52,6 +52,9 @@ struct apm_info { struct apm_bios_info bios; unsigned short connection_version; int get_power_status_broken; + int allow_ints; + int realmode_power_off; + int disabled; }; /* diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 8e449d0cb680..97289e19fbf0 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -98,6 +98,7 @@ #define SMART_IMMEDIATE_OFFLINE 0xd4 #define SMART_READ_LOG_SECTOR 0xd5 #define SMART_WRITE_LOG_SECTOR 0xd6 +#define SMART_WRITE_THRESHOLDS 0xd7 #define SMART_ENABLE 0xd8 #define SMART_DISABLE 0xd9 #define SMART_STATUS 0xda @@ -159,6 +160,7 @@ #define ABRT_ERR 0x04 /* Command aborted */ #define MCR_ERR 0x08 /* media change request */ #define ID_ERR 0x10 /* ID field not found */ +#define MC_ERR 0x20 /* media changed */ #define ECC_ERR 0x40 /* Uncorrectable ECC error */ #define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ #define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */ @@ -174,6 +176,7 @@ struct hd_geometry { #define HDIO_GETGEO 0x0301 /* get device geometry */ #define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ #define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ +#define HDIO_GET_QDMA 0x0305 /* get use-qdma flag */ #define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ #define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ #define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ @@ -181,9 +184,13 @@ struct hd_geometry { #define HDIO_GET_DMA 0x030b /* get use-dma flag */ #define HDIO_GET_NICE 0x030c /* get nice flags */ #define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ +#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ +#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ +#define HDIO_GET_BUSSTATE 0x031a /* get the bus state of the hwif */ +#define HDIO_TRISTATE_HWIF 0x031b /* OBSOLETE - use SET_BUSSTATE */ #define HDIO_DRIVE_RESET 0x031c /* execute a device reset */ -#define HDIO_TRISTATE_HWIF 0x031d /* execute a channel tristate */ +#define HDIO_DRIVE_TASKFILE 0x031d /* execute raw taskfile */ #define HDIO_DRIVE_TASK 0x031e /* execute task and special drive command */ #define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ @@ -200,6 +207,17 @@ struct hd_geometry { #define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */ #define HDIO_SET_NICE 0x0329 /* set nice flags */ #define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */ +#define HDIO_SET_WCACHE 0x032b /* change write cache enable-disable */ +#define HDIO_SET_ACOUSTIC 0x032c /* change acoustic behavior */ +#define HDIO_SET_BUSSTATE 0x032d /* set the bus state of the hwif */ +#define HDIO_SET_QDMA 0x032e /* change use-qdma flag */ + +/* bus states */ +enum { + BUSSTATE_OFF = 0, + BUSSTATE_ON, + BUSSTATE_TRISTATE +}; /* BIG GEOMETRY */ struct hd_big_geometry { diff --git a/include/linux/ibmtr.h b/include/linux/ibmtr.h index 69fbe085a8d6..094d40af864d 100644 --- a/include/linux/ibmtr.h +++ b/include/linux/ibmtr.h @@ -6,26 +6,22 @@ /* ported to the Alpha architecture 02/20/96 (just used the HZ macro) */ -#define TR_RETRY_INTERVAL (5*HZ) /* 500 on PC = 5 s */ -#define TR_RESET_INTERVAL (HZ/20) /* 5 on PC = 50 ms */ -#define TR_BUSY_INTERVAL (HZ/5) /* 5 on PC = 200 ms */ -#define TR_SPIN_INTERVAL (3*HZ) /* 3 seconds before init timeout */ -#define TR_RETRIES 6 /* number of open retries */ +#define TR_RETRY_INTERVAL (30*HZ) /* 500 on PC = 5 s */ +#define TR_RST_TIME (HZ/20) /* 5 on PC = 50 ms */ +#define TR_BUSY_INTERVAL (HZ/5) /* 5 on PC = 200 ms */ +#define TR_SPIN_INTERVAL (3*HZ) /* 3 seconds before init timeout */ #define TR_ISA 1 #define TR_MCA 2 #define TR_ISAPNP 3 #define NOTOK 0 -#define TOKDEBUG 1 #define IBMTR_SHARED_RAM_SIZE 0x10000 #define IBMTR_IO_EXTENT 4 -#define IBMTR_MAX_ADAPTERS 2 +#define IBMTR_MAX_ADAPTERS 4 #define CHANNEL_ID 0X1F30 #define AIP 0X1F00 -#define AIPCHKSUM1 0X1F60 -#define AIPCHKSUM2 0X1FF0 #define AIPADAPTYPE 0X1FA0 #define AIPDATARATE 0X1FA2 #define AIPEARLYTOKEN 0X1FA4 @@ -35,22 +31,17 @@ #define AIP16MBDHB 0X1FAC #define AIPFID 0X1FBA -/* Note, 0xA20 == 0x220 since motherboard decodes 10 bits. I left everything - the way my documentation had it, ie: 0x0A20. */ -#define ADAPTINTCNTRL 0x02f0 /* Adapter interrupt control */ #define ADAPTRESET 0x1 /* Control Adapter reset (add to base) */ #define ADAPTRESETREL 0x2 /* Release Adapter from reset ( """) */ #define ADAPTINTREL 0x3 /* Adapter interrupt release */ -#define MMIOStartLocP 0x0a20 /* Primary adapter's starting MMIO area */ -#define MMIOStartLocA 0x0a24 /* Alternate adapter's starting MMIO area */ - #define GLOBAL_INT_ENABLE 0x02f0 /* MMIO bits 0-4 select register */ -#define RRR_EVEN 0x00 /* Shared RAM relocation registers - even and odd */ +#define RRR_EVEN 0x00 /* Shared RAM relocation registers - even and odd */ /* Used to set the starting address of shared RAM */ -/* Bits 1 through 7 of this register map to bits 13 through 19 of the shared RAM address.*/ +/* Bits 1 through 7 of this register map to bits 13 through 19 of the shared + RAM address.*/ /* ie: 0x02 sets RAM address to ...ato! issy su wazzoo !! GODZILLA!!! */ #define RRR_ODD 0x01 /* Bits 2 and 3 of this register can be read to determine shared RAM size */ @@ -59,28 +50,26 @@ #define WRBR_ODD 0x03 #define WWOR_EVEN 0x04 /* Write window open registers - even and odd */ #define WWOR_ODD 0x05 -#define WWCR_EVEN 0x06 /* Write window close registers - even and odd */ +#define WWCR_EVEN 0x06 /* Write window close registers - even and odd */ #define WWCR_ODD 0x07 /* Interrupt status registers - PC system - even and odd */ #define ISRP_EVEN 0x08 -#define TCR_INT 0x10 /* Bit 4 - Timer interrupt. The TVR_EVEN timer has +#define TCR_INT 0x10 /* Bit 4 - Timer interrupt. The TVR_EVEN timer has expired. */ -#define ERR_INT 0x08 /* Bit 3 - Error interrupt. The adapter has had an - internal error. */ +#define ERR_INT 0x08 /* Bit 3 - Error interrupt. The adapter has had an + internal error. */ #define ACCESS_INT 0x04 /* Bit 2 - Access interrupt. You have attempted to - write to an invalid area of shared RAM or an invalid - register within the MMIO. */ -/* In addition, the following bits within ISRP_EVEN can be turned on or off by you */ -/* to control the interrupt processing: */ -#define INT_IRQ 0x80 /* Bit 7 - If 0 the adapter will issue a CHCK, if 1 and - IRQ. This should normally be set (by you) to 1. */ + write to an invalid area of shared RAM + or an invalid register within the MMIO. */ +/* In addition, the following bits within ISRP_EVEN can be turned on or off */ +/* by you to control the interrupt processing: */ #define INT_ENABLE 0x40 /* Bit 6 - Interrupt enable. If 0, no interrupts will - occur. If 1, interrupts will occur normally. - Normally set to 1. */ -/* Bit 0 - Primary or alternate adapter. Set to zero if this adapter is the primary adapter,*/ -/* 1 if this adapter is the alternate adapter. */ + occur. If 1, interrupts will occur normally. + Normally set to 1. */ +/* Bit 0 - Primary or alternate adapter. Set to zero if this adapter is the + primary adapter, 1 if this adapter is the alternate adapter. */ #define ISRP_ODD 0x09 @@ -92,21 +81,21 @@ an SRB request and set the return code within the SRB. */ #define ASB_FREE_INT 0x10 /* Bit 4 - ASB free. The adapter has read the ASB - and this area can be safely reused. This interrupt - is only used if your application has set the ASB - free request bit in ISRA_ODD or if an error was - detected in your response. */ + and this area can be safely reused. This interrupt + is only used if your application has set the ASB + free request bit in ISRA_ODD or if an error was + detected in your response. */ #define ARB_CMD_INT 0x08 /* Bit 3 - ARB command. The adapter has given you a - command for action. The command is located in the - ARB area of shared memory. */ + command for action. The command is located in the + ARB area of shared memory. */ #define SSB_RESP_INT 0x04 /* Bit 2 - SSB response. The adapter has posted a - response to your SRB (the response is located in - the SSB area of shared memory). */ + response to your SRB (the response is located in + the SSB area of shared memory). */ /* Bit 1 - Bridge frame forward complete. */ -#define ISRA_EVEN 0x0A /* Interrupt status registers - adapter - even and odd */ +#define ISRA_EVEN 0x0A /*Interrupt status registers - adapter - even and odd */ /* Bit 7 - Internal parity error (on adapter's internal bus) */ /* Bit 6 - Timer interrupt pending */ /* Bit 5 - Access interrupt (attempt by adapter to access illegal address) */ @@ -114,21 +103,21 @@ /* Bit 3 - Adapter processor check status */ /* Bit 2 - Reserved */ /* Bit 1 - Adapter hardware interrupt mask (prevents internal interrupts) */ -/* Bit 0 - Adapter software interrupt mask (prevents internal software interrupts) */ +/* Bit 0 - Adapter software interrupt mask (prevents internal software ints) */ #define ISRA_ODD 0x0B -#define CMD_IN_SRB 0x20 /* Bit 5 - Indicates that you have placed a new +#define CMD_IN_SRB 0x20 /* Bit 5 - Indicates that you have placed a new command in the SRB and are ready for the adapter to process the command. */ #define RESP_IN_ASB 0x10 /* Bit 4 - Indicates that you have placed a response - (an ASB) in the shared RAM which is available for - the adapter's use. */ -/* Bit 3 - Indicates that you are ready to put an SRB in the shared RAM, but that a previous */ -/* command is still pending. The adapter will then interrupt you when the previous */ -/* command is completed */ -/* Bit 2 - Indicates that you are ready to put an ASB in the shared RAM, but that a previous */ -/* ASB is still pending. The adapter will then interrupt you when the previous ASB */ -/* is copied. */ + (an ASB) in the shared RAM which is available for + the adapter's use. */ +/* Bit 3 - Indicates that you are ready to put an SRB in the shared RAM, but + that a previous command is still pending. The adapter will then + interrupt you when the previous command is completed */ +/* Bit 2 - Indicates that you are ready to put an ASB in the shared RAM, but + that a previous ASB is still pending. The adapter will then interrupt + you when the previous ASB is copied. */ #define ARB_FREE 0x2 #define SSB_FREE 0x1 @@ -138,7 +127,7 @@ #define TVR_ODD 0x0F #define SRPR_EVEN 0x18 /* Shared RAM paging registers - even and odd */ #define SRPR_ENABLE_PAGING 0xc0 -#define SRPR_ODD 0x19 /* Not used. */ +#define SRPR_ODD 0x19 /* Not used. */ #define TOKREAD 0x60 #define TOKOR 0x40 #define TOKAND 0x20 @@ -153,7 +142,8 @@ /* MMIO bits 7-8 select area of interest.. see below */ /* 00 selects attachment control area. */ /* 01 is reserved. */ -/* 10 selects adapter identification area A containing the adapter encoded address. */ +/* 10 selects adapter identification area A containing the adapter encoded + address. */ /* 11 selects the adapter identification area B containing test patterns. */ #define PCCHANNELID 5049434F3631313039393020 @@ -165,18 +155,18 @@ #define ACA_RW 0x00 #ifdef ENABLE_PAGING -#define SET_PAGE(x) (isa_writeb((x), \ - ti->mmio + ACA_OFFSET + ACA_RW + SRPR_EVEN)) +#define SET_PAGE(x) (writeb((x), ti->mmio + ACA_OFFSET+ ACA_RW + SRPR_EVEN)) #else #define SET_PAGE(x) #endif -typedef enum { IN_PROGRESS, SUCCESS, FAILURE, CLOSED } open_state; - /* do_tok_int possible values */ #define FIRST_INT 1 #define NOT_FIRST 2 +typedef enum { CLOSED, OPEN } open_state; +//staic const char *printstate[] = { "CLOSED","OPEN"}; + struct tok_info { unsigned char irq; __u32 mmio; @@ -186,6 +176,7 @@ struct tok_info { unsigned char token_release; unsigned char avail_shared_ram; unsigned char shared_ram_paging; + unsigned char turbo; unsigned short dhb_size4mb; unsigned short rbuf_len4; unsigned short rbuf_cnt4; @@ -196,14 +187,13 @@ struct tok_info { unsigned short maxmtu16; /* Additions by David Morris */ unsigned char do_tok_int; - wait_queue_head_t wait_for_tok_int; wait_queue_head_t wait_for_reset; unsigned char sram_base; /* Additions by Peter De Schrijver */ unsigned char page_mask; /* mask to select RAM page to Map*/ unsigned char mapped_ram_size; /* size of RAM page */ - __u32 sram; /* Shared memory base address */ - __u32 init_srb; /* Initial System Request Block address */ + __u32 sram_virt; /* Shared memory base address */ + __u32 init_srb; /* Initial System Request Block address */ __u32 srb; /* System Request Block address */ __u32 ssb; /* System Status Block address */ __u32 arb; /* Adapter Request Block address */ @@ -217,14 +207,15 @@ struct tok_info { unsigned short global_int_enable; struct sk_buff *current_skb; struct net_device_stats tr_stats; - unsigned char auto_ringspeedsave; - open_state open_status; + unsigned char auto_speedsave; + open_state open_status, sap_status; + enum {MANUAL, AUTOMATIC} open_mode; + enum {FAIL, RESTART, REOPEN} open_action; + enum {NO, YES} open_failure; unsigned char readlog_pending; unsigned short adapter_int_enable; /* Adapter-specific int enable */ struct timer_list tr_timer; unsigned char ring_speed; - __u32 func_addr; - unsigned int retry_count; spinlock_t lock; /* SMP protection */ }; @@ -311,18 +302,6 @@ struct dir_open_adapter { unsigned char product_id[18]; }; -struct srb_open_response { - unsigned char command; - unsigned char reserved1; - unsigned char ret_code; - unsigned char reserved2[3]; - __u16 error_code; - __u16 asb_addr; - __u16 srb_addr; - __u16 arb_addr; - __u16 ssb_addr; -}; - struct dlc_open_sap { unsigned char command; unsigned char reserved1; @@ -353,49 +332,6 @@ struct srb_xmit { __u16 station_id; }; -struct srb_interrupt { - unsigned char command; - unsigned char cmd_corr; - unsigned char ret_code; -}; - -struct srb_read_log { - unsigned char command; - unsigned char reserved1; - unsigned char ret_code; - unsigned char reserved2; - unsigned char line_errors; - unsigned char internal_errors; - unsigned char burst_errors; - unsigned char A_C_errors; - unsigned char abort_delimiters; - unsigned char reserved3; - unsigned char lost_frames; - unsigned char recv_congest_count; - unsigned char frame_copied_errors; - unsigned char frequency_errors; - unsigned char token_errors; -}; - -struct asb_xmit_resp { - unsigned char command; - unsigned char cmd_corr; - unsigned char ret_code; - unsigned char reserved; - __u16 station_id; - __u16 frame_length; - unsigned char hdr_length; - unsigned char rsap_value; -}; - -struct arb_xmit_req { - unsigned char command; - unsigned char cmd_corr; - unsigned char reserved1[2]; - __u16 station_id; - __u16 dhb_address; -}; - struct arb_rec_req { unsigned char command; unsigned char reserved1[3]; @@ -417,36 +353,14 @@ struct asb_rec { }; struct rec_buf { - /* unsigned char reserved1[2]; */ + unsigned char reserved1[2]; __u16 buf_ptr; unsigned char reserved2; + unsigned char receive_fs; __u16 buf_len; unsigned char data[0]; }; -struct arb_dlc_status { - unsigned char command; - unsigned char reserved1[3]; - __u16 station_id; - __u16 status; - unsigned char frmr_data[5]; - unsigned char access_prio; - unsigned char rem_addr[TR_ALEN]; - unsigned char rsap_value; -}; - -struct arb_ring_stat_change { - unsigned char command; - unsigned char reserved1[5]; - __u16 ring_status; -}; - -struct srb_close_adapter { - unsigned char command; - unsigned char reserved1; - unsigned char ret_code; -}; - struct srb_set_funct_addr { unsigned char command; unsigned char reserved1; @@ -455,4 +369,4 @@ struct srb_set_funct_addr { unsigned char funct_address[4]; }; -#endif /* __LINUX_IBMTR_H__ */ +#endif |
