summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atalk.h2
-rw-r--r--include/linux/awe_voice.h292
-rw-r--r--include/linux/binfmts.h2
-rw-r--r--include/linux/blk.h3
-rw-r--r--include/linux/blkdev.h5
-rw-r--r--include/linux/cyclades.h69
-rw-r--r--include/linux/dcache.h23
-rw-r--r--include/linux/fs.h83
-rw-r--r--include/linux/ftape-header-segment.h122
-rw-r--r--include/linux/ftape-vendors.h137
-rw-r--r--include/linux/ftape.h218
-rw-r--r--include/linux/head.h15
-rw-r--r--include/linux/icmp.h11
-rw-r--r--include/linux/if.h4
-rw-r--r--include/linux/if_arp.h4
-rw-r--r--include/linux/if_frad.h7
-rw-r--r--include/linux/if_packet.h37
-rw-r--r--include/linux/if_tr.h6
-rw-r--r--include/linux/in6.h7
-rw-r--r--include/linux/interrupt.h3
-rw-r--r--include/linux/ioport.h3
-rw-r--r--include/linux/ipv6_route.h8
-rw-r--r--include/linux/ipx.h14
-rw-r--r--include/linux/isdnif.h4
-rw-r--r--include/linux/iso_fs.h42
-rw-r--r--include/linux/iso_fs_sb.h43
-rw-r--r--include/linux/joystick.h108
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/kerneld.h1
-rw-r--r--include/linux/list.h47
-rw-r--r--include/linux/locks.h7
-rw-r--r--include/linux/major.h1
-rw-r--r--include/linux/md.h223
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/mm.h8
-rw-r--r--include/linux/module.h3
-rw-r--r--include/linux/msdos_fs.h58
-rw-r--r--include/linux/msdos_fs_i.h1
-rw-r--r--include/linux/msdos_fs_sb.h14
-rw-r--r--include/linux/mtio.h120
-rw-r--r--include/linux/nbd.h74
-rw-r--r--include/linux/ncp_fs.h128
-rw-r--r--include/linux/nfs.h8
-rw-r--r--include/linux/nfs_fs.h21
-rw-r--r--include/linux/nfsd/nfsfh.h61
-rw-r--r--include/linux/nfsd/stats.h5
-rw-r--r--include/linux/nls.h54
-rw-r--r--include/linux/pci.h81
-rw-r--r--include/linux/posix_types.h2
-rw-r--r--include/linux/ppp-comp.h34
-rw-r--r--include/linux/ppp_defs.h5
-rw-r--r--include/linux/prctl.h9
-rw-r--r--include/linux/proc_fs.h8
-rw-r--r--include/linux/qic117.h290
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/radio.h134
-rw-r--r--include/linux/raid1.h49
-rw-r--r--include/linux/raid5.h110
-rw-r--r--include/linux/rose.h2
-rw-r--r--include/linux/sched.h18
-rw-r--r--include/linux/serial.h107
-rw-r--r--include/linux/serialP.h119
-rw-r--r--include/linux/smb_fs.h173
-rw-r--r--include/linux/smb_fs_i.h5
-rw-r--r--include/linux/smb_fs_sb.h9
-rw-r--r--include/linux/smbno.h20
-rw-r--r--include/linux/soundcard.h28
-rw-r--r--include/linux/sunrpc/sched.h2
-rw-r--r--include/linux/sunrpc/types.h2
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/sysctl.h3
-rw-r--r--include/linux/sysv_fs.h2
-rw-r--r--include/linux/tty.h6
-rw-r--r--include/linux/tty_driver.h13
-rw-r--r--include/linux/tty_ldisc.h20
-rw-r--r--include/linux/videodev.h171
-rw-r--r--include/linux/wrapper.h2
-rw-r--r--include/linux/zftape.h87
78 files changed, 3021 insertions, 607 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index 051e03484..4981ed2eb 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -156,9 +156,9 @@ extern struct at_addr *atalk_find_dev_addr(struct device *dev);
extern struct device *atrtr_get_dev(struct at_addr *sa);
extern int aarp_send_ddp(struct device *dev,struct sk_buff *skb, struct at_addr *sa, void *hwaddr);
extern void aarp_send_probe(struct device *dev, struct at_addr *addr);
+extern void aarp_device_down(struct device *dev);
#ifdef MODULE
-extern void aarp_device_down(struct device *dev);
extern void aarp_cleanup_module(void);
#endif /* MODULE */
diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h
index cdfb0ff2e..aa1313131 100644
--- a/include/linux/awe_voice.h
+++ b/include/linux/awe_voice.h
@@ -3,7 +3,7 @@
*
* Voice information definitions for the low level driver for the
* AWE32/Sound Blaster 32 wave table synth.
- * version 0.3.1b; Jan. 21, 1997
+ * version 0.4.2c; Oct. 7, 1997
*
* Copyright (C) 1996,1997 Takashi Iwai
*
@@ -44,14 +44,19 @@ typedef struct awe_patch_info {
short device_no; /* synthesizer number */
unsigned short sf_id; /* file id (should be zero) */
- short sf_version; /* patch version (not referred) */
- long len; /* data length (without this header) */
-
- short type; /* following data type */
-#define AWE_LOAD_INFO 0
-#define AWE_LOAD_DATA 1
-#define AWE_APPEND_DATA 0x00
-#define AWE_REPLACE_DATA 0x80
+ short optarg; /* optional argument */
+ int len; /* data length (without this header) */
+
+ short type; /* patch operation type */
+#define AWE_LOAD_INFO 0 /* awe_voice_rec */
+#define AWE_LOAD_DATA 1 /* awe_sample_info */
+#define AWE_OPEN_PATCH 2 /* awe_open_parm */
+#define AWE_CLOSE_PATCH 3 /* none */
+#define AWE_UNLOAD_PATCH 4 /* none */
+#define AWE_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/
+#define AWE_MAP_PRESET 6 /* awe_voice_map */
+#define AWE_LOAD_CHORUS_FX 0x10 /* awe_chorus_fx_rec (optarg=mode) */
+#define AWE_LOAD_REVERB_FX 0x11 /* awe_reverb_fx_rec (optarg=mode) */
short reserved; /* word alignment data */
@@ -61,7 +66,35 @@ typedef struct awe_patch_info {
#endif
} awe_patch_info;
-#define AWE_PATCH_INFO_SIZE 16
+/*#define AWE_PATCH_INFO_SIZE 16*/
+#define AWE_PATCH_INFO_SIZE sizeof(awe_patch_info)
+
+
+/*----------------------------------------------------------------
+ * open patch
+ *----------------------------------------------------------------*/
+
+#define AWE_PATCH_NAME_LEN 32
+
+typedef struct _awe_open_parm {
+ unsigned short type; /* sample type */
+#define AWE_PAT_TYPE_MISC 0
+#define AWE_PAT_TYPE_GM 1
+#define AWE_PAT_TYPE_GS 2
+#define AWE_PAT_TYPE_MT32 3
+#define AWE_PAT_TYPE_XG 4
+#define AWE_PAT_TYPE_SFX 5
+#define AWE_PAT_TYPE_GUS 6
+#define AWE_PAT_TYPE_MAP 7
+
+#define AWE_PAT_LOCKED 0x100 /* lock the samples */
+
+ short reserved;
+ char name[AWE_PATCH_NAME_LEN];
+} awe_open_parm;
+
+/*#define AWE_OPEN_PARM_SIZE 28*/
+#define AWE_OPEN_PARM_SIZE sizeof(awe_open_parm)
/*----------------------------------------------------------------
@@ -100,8 +133,8 @@ typedef struct _awe_voice_parm {
typedef struct _awe_voice_info {
unsigned short sf_id; /* file id (should be zero) */
unsigned short sample; /* sample id */
- long start, end; /* sample offset correction */
- long loopstart, loopend; /* loop offset correction */
+ int start, end; /* sample offset correction */
+ int loopstart, loopend; /* loop offset correction */
short rate_offset; /* sample rate pitch offset */
unsigned short mode; /* sample mode */
#define AWE_MODE_ROMSOUND 0x8000
@@ -124,7 +157,8 @@ typedef struct _awe_voice_info {
short index; /* internal index (set by driver) */
} awe_voice_info;
-#define AWE_VOICE_INFO_SIZE 92
+/*#define AWE_VOICE_INFO_SIZE 92*/
+#define AWE_VOICE_INFO_SIZE sizeof(awe_voice_info)
/*----------------------------------------------------------------*/
@@ -134,24 +168,44 @@ typedef struct _awe_voice_info {
* from older versions.
* Use AWE_VOICE_REC_SIZE instead.
*/
+
+/* instrument info header: 4 bytes */
+typedef struct _awe_voice_rec_hdr {
+ unsigned char bank; /* midi bank number */
+ unsigned char instr; /* midi preset number */
+ char nvoices; /* number of voices */
+ char write_mode; /* write mode; normally 0 */
+#define AWE_WR_APPEND 0 /* append anyway */
+#define AWE_WR_EXCLUSIVE 1 /* skip if already exists */
+#define AWE_WR_REPLACE 2 /* replace if already exists */
+} awe_voice_rec_hdr;
+
+/*#define AWE_VOICE_REC_SIZE 4*/
+#define AWE_VOICE_REC_SIZE sizeof(awe_voice_rec_hdr)
+
+/* the standard patch structure for one sample */
+typedef struct _awe_voice_rec_patch {
+ awe_patch_info patch;
+ awe_voice_rec_hdr hdr;
+ awe_voice_info info;
+} awe_voice_rec_patch;
+
+
+/* obsolete data type */
#if defined(AWE_COMPAT_030) && AWE_COMPAT_030
#define AWE_INFOARRAY_SIZE 0
#else
#define AWE_INFOARRAY_SIZE 1
#endif
-/* instrument info header: 4 bytes */
typedef struct _awe_voice_rec {
unsigned char bank; /* midi bank number */
unsigned char instr; /* midi preset number */
short nvoices; /* number of voices */
-
/* voice information follows here */
awe_voice_info info[AWE_INFOARRAY_SIZE];
} awe_voice_rec;
-#define AWE_VOICE_REC_SIZE 4
-
/*----------------------------------------------------------------
* sample wave information
@@ -161,9 +215,9 @@ typedef struct _awe_voice_rec {
typedef struct awe_sample_info {
unsigned short sf_id; /* file id (should be zero) */
unsigned short sample; /* sample id */
- long start, end; /* start & end offset */
- long loopstart, loopend; /* loop start & end offset */
- long size; /* size (0 = ROM) */
+ int start, end; /* start & end offset */
+ int loopstart, loopend; /* loop start & end offset */
+ int size; /* size (0 = ROM) */
short checksum_flag; /* use check sum = 1 */
unsigned short mode_flags; /* mode flags */
#define AWE_SAMPLE_8BITS 1 /* wave data is 8bits */
@@ -174,36 +228,31 @@ typedef struct awe_sample_info {
#define AWE_SAMPLE_STEREO_LEFT 32 /* stereo left sound */
#define AWE_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */
#define AWE_SAMPLE_REVERSE_LOOP 128 /* reverse looping */
- unsigned long checksum; /* check sum */
+ unsigned int checksum; /* check sum */
#if defined(AWE_COMPAT_030) && AWE_COMPAT_030
unsigned short data[0]; /* sample data follows here */
#endif
} awe_sample_info;
-#define AWE_SAMPLE_INFO_SIZE 32
+/*#define AWE_SAMPLE_INFO_SIZE 32*/
+#define AWE_SAMPLE_INFO_SIZE sizeof(awe_sample_info)
/*----------------------------------------------------------------
- * awe hardware controls
+ * voice preset mapping
*----------------------------------------------------------------*/
-typedef struct _awe_mode_rec {
- int base_addr;
- long mem_size; /* word size */
- int max_voices, max_infos, max_samples;
- unsigned short current_sf_id;
- long free_mem; /* word offset */
- int free_info;
- int free_sample;
- short reverb_mode;
- short chorus_mode;
- unsigned short init_atten;
- short channel_mode;
- short gus_bank;
- short exclusive_sound;
- unsigned long drum_flags;
- int debug_mode;
-} awe_mode_rec;
+typedef struct awe_voice_map {
+ int map_bank, map_instr, map_key; /* key = -1 means all keys */
+ int src_bank, src_instr, src_key;
+} awe_voice_map;
+
+#define AWE_VOICE_MAP_SIZE sizeof(awe_voice_map)
+
+
+/*----------------------------------------------------------------
+ * awe hardware controls
+ *----------------------------------------------------------------*/
#define _AWE_DEBUG_MODE 0x00
#define _AWE_REVERB_MODE 0x01
@@ -214,56 +263,116 @@ typedef struct _awe_mode_rec {
#define _AWE_TERMINATE_CHANNEL 0x06
#define _AWE_TERMINATE_ALL 0x07
#define _AWE_INITIAL_VOLUME 0x08
-#define _AWE_SET_GUS_BANK 0x09
-#define _AWE_CHANNEL_MODE 0x0a /* v0.3 features */
-#define _AWE_DRUM_CHANNELS 0x0b /* v0.3 features */
-#define _AWE_EXCLUSIVE_SOUND 0x0c /* v0.3 features */
#define _AWE_INITIAL_ATTEN _AWE_INITIAL_VOLUME
+#define _AWE_RESET_CHANNEL 0x09
+#define _AWE_CHANNEL_MODE 0x0a
+#define _AWE_DRUM_CHANNELS 0x0b
+#define _AWE_MISC_MODE 0x0c
+#define _AWE_RELEASE_ALL 0x0d
#define _AWE_NOTEOFF_ALL 0x0e
-#define _AWE_GET_CURRENT_MODE 0x10 /* v0.3 features */
+#define _AWE_CHN_PRESSURE 0x0f
+/*#define _AWE_GET_CURRENT_MODE 0x10*/
+#define _AWE_EQUALIZER 0x11
+/*#define _AWE_GET_MISC_MODE 0x12*/
+/*#define _AWE_GET_FONTINFO 0x13*/
#define _AWE_MODE_FLAG 0x80
#define _AWE_COOKED_FLAG 0x40 /* not supported */
#define _AWE_MODE_VALUE_MASK 0x3F
-#define _AWE_CMD(chn, voice, cmd, p1, p2) \
-{_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_PRIVATE;\
- _seqbuf[_seqbufptr+1] = chn;\
- _seqbuf[_seqbufptr+2] = _AWE_MODE_FLAG|(cmd);\
- _seqbuf[_seqbufptr+3] = voice;\
- *(unsigned short*)&_seqbuf[_seqbufptr+4] = p1;\
- *(unsigned short*)&_seqbuf[_seqbufptr+6] = p2;\
+/*----------------------------------------------------------------*/
+
+#define _AWE_SET_CMD(p,dev,voice,cmd,p1,p2) \
+{((char*)(p))[0] = SEQ_PRIVATE;\
+ ((char*)(p))[1] = dev;\
+ ((char*)(p))[2] = _AWE_MODE_FLAG|(cmd);\
+ ((char*)(p))[3] = voice;\
+ ((unsigned short*)(p))[2] = p1;\
+ ((unsigned short*)(p))[3] = p2;}
+
+/* buffered access */
+#define _AWE_CMD(dev, voice, cmd, p1, p2) \
+{_SEQ_NEEDBUF(8);\
+ _AWE_SET_CMD(_seqbuf + _seqbufptr, dev, voice, cmd, p1, p2);\
_SEQ_ADVBUF(8);}
+/* direct access */
+#define _AWE_CMD_NOW(seqfd,dev,voice,cmd,p1,p2) \
+{struct seq_event_rec tmp;\
+ _AWE_SET_CMD(&tmp, dev, voice, cmd, p1, p2);\
+ ioctl(seqfd, SNDCTL_SEQ_OUTOFBAND, &tmp);}
+
+/*----------------------------------------------------------------*/
+
+/* set debugging mode */
#define AWE_DEBUG_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_DEBUG_MODE, p1, 0)
+/* set reverb mode; from 0 to 7 */
#define AWE_REVERB_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_REVERB_MODE, p1, 0)
+/* set chorus mode; from 0 to 7 */
#define AWE_CHORUS_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_CHORUS_MODE, p1, 0)
-#define AWE_REMOVE_LAST_SAMPLES(dev) _AWE_CMD(dev, 0, _AWE_REMOVE_LAST_SAMPLES, 0, 0)
-#define AWE_INITIALIZE_CHIP(dev) _AWE_CMD(dev, 0, _AWE_INITIALIZE_CHIP, 0, 0)
+
+/* reset channel */
+#define AWE_RESET_CHANNEL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 0, 0)
+#define AWE_RESET_CONTROL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 1, 0)
+
+/* send an effect to all layers */
#define AWE_SEND_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,type,value)
+#define AWE_ADD_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x80),value)
+#define AWE_UNSET_EFFECT(dev,voice,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x40),0)
+/* send an effect to a layer */
+#define AWE_SEND_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)),value)
+#define AWE_ADD_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x80),value)
+#define AWE_UNSET_LAYER_EFFECT(dev,voice,layer,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x40),0)
+
+/* terminate sound on the channel/voice */
#define AWE_TERMINATE_CHANNEL(dev,voice) _AWE_CMD(dev,voice,_AWE_TERMINATE_CHANNEL,0,0)
+/* terminate all sounds */
#define AWE_TERMINATE_ALL(dev) _AWE_CMD(dev, 0, _AWE_TERMINATE_ALL, 0, 0)
+/* release all sounds (w/o sustain effect) */
+#define AWE_RELEASE_ALL(dev) _AWE_CMD(dev, 0, _AWE_RELEASE_ALL, 0, 0)
+/* note off all sounds (w sustain effect) */
#define AWE_NOTEOFF_ALL(dev) _AWE_CMD(dev, 0, _AWE_NOTEOFF_ALL, 0, 0)
+
+/* set initial attenuation */
#define AWE_INITIAL_VOLUME(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 0)
#define AWE_INITIAL_ATTEN AWE_INITIAL_VOLUME
-#define AWE_SET_GUS_BANK(dev,bank) _AWE_CMD(dev, 0, _AWE_SET_GUS_BANK, bank, 0)
-#define AWE_SET_CHANNEL_MODE(dev,mode) _AWE_CMD(dev, 0, _AWE_CHANNEL_MODE, mode, 0)
-#define AWE_DRUM_CHANNELS(dev,channels) _AWE_CMD(dev, 0, _AWE_DRUM_CHANNELS, channels, 0)
-#define AWE_EXCLUSIVE_SOUND(dev,mode) _AWE_CMD(dev, 0, _AWE_EXCLUSIVE_SOUND, mode, 0)
+/* relative attenuation */
+#define AWE_SET_ATTEN(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 1)
-/* it must be direct access */
-#define AWE_GET_CURRENT_MODE(dev,addr) \
-{char tmpbuf[8];\
- tmpbuf[0] = SEQ_PRIVATE; tmpbuf[1] = dev;\
- tmpbuf[2] = _AWE_MODE_FLAG|_AWE_GET_CURRENT_MODE;\
- tmpbuf[3] = 0; *(awe_mode_rec**)(tmpbuf +4) = (awe_mode_rec*)(addr);\
- write(seqfd, tmpbuf, 8);}
+/* set channel playing mode; mode=0/1/2 */
+#define AWE_SET_CHANNEL_MODE(dev,mode) _AWE_CMD(dev, 0, _AWE_CHANNEL_MODE, mode, 0)
+#define AWE_PLAY_INDIRECT 0 /* indirect voice mode (default) */
+#define AWE_PLAY_MULTI 1 /* multi note voice mode */
+#define AWE_PLAY_DIRECT 2 /* direct single voice mode */
+#define AWE_PLAY_MULTI2 3 /* sequencer2 mode; used internally */
+
+/* set drum channel mask; channels is 32bit long value */
+#define AWE_DRUM_CHANNELS(dev,channels) _AWE_CMD(dev, 0, _AWE_DRUM_CHANNELS, ((channels) & 0xffff), ((channels) >> 16))
+
+/* set bass and treble control; values are from 0 to 11 */
+#define AWE_EQUALIZER(dev,bass,treble) _AWE_CMD(dev, 0, _AWE_EQUALIZER, bass, treble)
+
+/* remove last loaded samples */
+#define AWE_REMOVE_LAST_SAMPLES(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_REMOVE_LAST_SAMPLES, 0, 0)
+/* initialize emu8000 chip */
+#define AWE_INITIALIZE_CHIP(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_INITIALIZE_CHIP, 0, 0)
+
+/* set miscellaneous modes; meta command */
+#define AWE_MISC_MODE(dev,mode,value) _AWE_CMD(dev, 0, _AWE_MISC_MODE, mode, value)
+/* exclusive sound off; 1=off */
+#define AWE_EXCLUSIVE_SOUND(dev,mode) AWE_MISC_MODE(dev,AWE_MD_EXCLUSIVE_SOUND,mode)
+/* default GUS bank number */
+#define AWE_SET_GUS_BANK(dev,bank) AWE_MISC_MODE(dev,AWE_MD_GUS_BANK,bank)
+/* change panning position in realtime; 0=don't 1=do */
+#define AWE_REALTIME_PAN(dev,mode) AWE_MISC_MODE(dev,AWE_MD_REALTIME_PAN,mode)
/* extended pressure controls; not portable with other sound drivers */
#define AWE_KEY_PRESSURE(dev,ch,note,vel) SEQ_START_NOTE(dev,ch,(note)+128,vel)
-#define AWE_CHN_PRESSURE(dev,ch,vel) SEQ_START_NOTE(dev,(ch)+128,0,vel)
+#define AWE_CHN_PRESSURE(dev,ch,vel) _AWE_CMD(dev,ch,_AWE_CHN_PRESSURE,vel,0)
-/* reverb mode */
+/*----------------------------------------------------------------*/
+
+/* reverb mode parameters */
#define AWE_REVERB_ROOM1 0
#define AWE_REVERB_ROOM2 1
#define AWE_REVERB_ROOM3 2
@@ -272,8 +381,17 @@ typedef struct _awe_mode_rec {
#define AWE_REVERB_PLATE 5
#define AWE_REVERB_DELAY 6
#define AWE_REVERB_PANNINGDELAY 7
+#define AWE_REVERB_PREDEFINED 8
+/* user can define reverb modes up to 32 */
+#define AWE_REVERB_NUMBERS 32
+
+typedef struct awe_reverb_fx_rec {
+ unsigned short parms[28];
+} awe_reverb_fx_rec;
+
+/*----------------------------------------------------------------*/
-/* chorus mode */
+/* chorus mode parameters */
#define AWE_CHORUS_1 0
#define AWE_CHORUS_2 1
#define AWE_CHORUS_3 2
@@ -282,8 +400,42 @@ typedef struct _awe_mode_rec {
#define AWE_CHORUS_FLANGER 5
#define AWE_CHORUS_SHORTDELAY 6
#define AWE_CHORUS_SHORTDELAY2 7
+#define AWE_CHORUS_PREDEFINED 8
+/* user can define chorus modes up to 32 */
+#define AWE_CHORUS_NUMBERS 32
+
+typedef struct awe_chorus_fx_rec {
+ unsigned short feedback; /* feedback level (0xE600-0xE6FF) */
+ unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */
+ unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */
+ unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
+ unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */
+} awe_chorus_fx_rec;
+
+/*----------------------------------------------------------------*/
-/* effects */
+/* misc mode types */
+enum {
+/* 0*/ AWE_MD_EXCLUSIVE_OFF, /* obsolete */
+/* 1*/ AWE_MD_EXCLUSIVE_ON, /* obsolete */
+/* 2*/ AWE_MD_VERSION, /* read only */
+/* 3*/ AWE_MD_EXCLUSIVE_SOUND, /* ignored */
+/* 4*/ AWE_MD_REALTIME_PAN, /* 0/1: do realtime pan change (default=1) */
+/* 5*/ AWE_MD_GUS_BANK, /* bank number for GUS patches (default=0) */
+/* 6*/ AWE_MD_KEEP_EFFECT, /* 0/1: keep effect values, (default=0) */
+/* 7*/ AWE_MD_ZERO_ATTEN, /* attenuation of max volume (default=32) */
+/* 8*/ AWE_MD_CHN_PRIOR, /* 0/1: set MIDI channel priority mode (default=1) */
+/* 9*/ AWE_MD_MOD_SENSE, /* integer: modwheel sensitivity (def=18) */
+/*10*/ AWE_MD_DEF_PRESET, /* integer: default preset number (def=0) */
+/*11*/ AWE_MD_DEF_BANK, /* integer: default bank number (def=0) */
+/*12*/ AWE_MD_DEF_DRUM, /* integer: default drumset number (def=0) */
+/*13*/ AWE_MD_TOGGLE_DRUM_BANK, /* 0/1: toggle drum flag with bank# (def=0) */
+ AWE_MD_END,
+};
+
+/*----------------------------------------------------------------*/
+
+/* effect parameters */
enum {
/* modulation envelope parameters */
@@ -330,9 +482,9 @@ enum {
/*30*/ AWE_FX_COARSE_SAMPLE_START, /* SHORT: upper word offset */
/*31*/ AWE_FX_COARSE_LOOP_START, /* SHORT: upper word offset */
/*32*/ AWE_FX_COARSE_LOOP_END, /* SHORT: upper word offset */
+/*33*/ AWE_FX_ATTEN, /* BYTE: lo IFATN */
AWE_FX_END,
};
-
#endif /* AWE_VOICE_H */
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index adf4278e6..1174fc07d 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -59,7 +59,7 @@ extern int init_misc_binfmt(void);
extern int prepare_binprm(struct linux_binprm *);
extern void remove_arg_zero(struct linux_binprm *);
extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
-extern void flush_old_exec(struct linux_binprm * bprm);
+extern int flush_old_exec(struct linux_binprm * bprm);
extern unsigned long setup_arg_pages(unsigned long p, struct linux_binprm * bprm);
extern unsigned long copy_strings(int argc,char ** argv,unsigned long *page,
unsigned long p, int from_kmem);
diff --git a/include/linux/blk.h b/include/linux/blk.h
index 66ef4b47e..0625942de 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -461,8 +461,7 @@ static void end_request(int uptodate) {
if ((bh = req->bh) != NULL) {
req->bh = bh->b_reqnext;
bh->b_reqnext = NULL;
- mark_buffer_uptodate(bh, uptodate);
- unlock_buffer(bh);
+ bh->b_end_io(bh, uptodate);
if ((bh = req->bh) != NULL) {
req->current_nr_sectors = bh->b_size >> 9;
if (req->nr_sectors < req->current_nr_sectors) {
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index faae32756..9bad95386 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -55,9 +55,12 @@ extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
extern struct wait_queue * wait_for_request;
extern void resetup_one_dev(struct gendisk *dev, int drive);
extern void unplug_device(void * data);
+extern void make_request(int major,int rw, struct buffer_head * bh);
/* md needs this function to remap requests */
extern int md_map (int minor, kdev_t *rdev, unsigned long *rsector, unsigned long size);
+extern int md_make_request (int minor, int rw, struct buffer_head * bh);
+extern int md_error (kdev_t mddev, kdev_t rdev);
extern int * blk_size[MAX_BLKDEV];
@@ -65,4 +68,6 @@ extern int * blksize_size[MAX_BLKDEV];
extern int * hardsect_size[MAX_BLKDEV];
+extern int * max_readahead[MAX_BLKDEV];
+
#endif
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index ef9db064f..bddb67067 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -1,4 +1,4 @@
-/* $Revision: 2.0 $$Date: 1997/06/30 10:30:00 $
+/* $Revision: 2.1 $$Date: 1997/10/24 16:03:00 $
* linux/include/linux/cyclades.h
*
* This file is maintained by Marcio Saito <marcio@cyclades.com> and
@@ -6,6 +6,12 @@
*
* This file contains the general definitions for the cyclades.c driver
*$Log: cyclades.h,v $
+ *Revision 2.1 1997/10/24 16:03:00 ivan
+ *added rflow (which allows enabling the CD1400 special flow control
+ *feature) and rtsdtr_inv (which allows DTR/RTS pin inversion) to
+ *cyclades_port structure;
+ *added Alpha support
+ *
*Revision 2.0 1997/06/30 10:30:00 ivan
*added some new doorbell command constants related to IOCTLW and
*UART error signaling
@@ -51,6 +57,11 @@ struct cyclades_monitor {
#define CYSETTIMEOUT 0x435907
#define CYGETDEFTIMEOUT 0x435908
#define CYSETDEFTIMEOUT 0x435909
+#define CYSETRFLOW 0x43590a
+#define CYRESETRFLOW 0x43590b
+#define CYSETRTSDTR_INV 0x43590c
+#define CYRESETRTSDTR_INV 0x43590d
+#define CYZPOLLCYCLE 0x43590e
/*************** CYCLOM-Z ADDITIONS ***************/
@@ -61,6 +72,8 @@ struct cyclades_monitor {
#define CZ_BOOT_END (CZIOC|0xfd)
#define CZ_TEST (CZIOC|0xfe)
+#define CZ_DEF_POLL (HZ/25)
+
#define MAX_BOARD 4 /* Max number of boards */
#define MAX_PORT 128 /* Max number of ports per board */
#define MAX_DEV 256 /* Max number of ports total */
@@ -85,7 +98,12 @@ struct CYZ_BOOT_CTRL {
* architectures and compilers.
*/
+#if defined(__alpha__)
+typedef unsigned long ucdouble; /* 64 bits, unsigned */
+typedef unsigned int uclong; /* 32 bits, unsigned */
+#else
typedef unsigned long uclong; /* 32 bits, unsigned */
+#endif
typedef unsigned short ucshort; /* 16 bits, unsigned */
typedef unsigned char ucchar; /* 8 bits, unsigned */
@@ -96,7 +114,7 @@ typedef unsigned char ucchar; /* 8 bits, unsigned */
#define DP_WINDOW_SIZE (0x00080000) /* window size 512 Kb */
#define ZE_DP_WINDOW_SIZE (0x00100000) /* window size 1 Mb (Ze and
8Zo V.2 */
-#define CTRL_WINDOW_SIZE (0x00000100) /* runtime regs 256 bytes */
+#define CTRL_WINDOW_SIZE (0x00000080) /* runtime regs 128 bytes */
/*
* CUSTOM_REG - Cyclom-Z/PCI Custom Registers Set. The driver
@@ -194,6 +212,12 @@ struct RUNTIME_9060 {
#define ID_ADDRESS 0x00000180L /* signature/pointer address */
#define ZFIRM_ID 0x5557465AL /* ZFIRM/U signature */
#define ZFIRM_HLT 0x59505B5CL /* ZFIRM needs external power supply */
+#define ZFIRM_RST 0x56040674L /* RST signal (due to FW reset) */
+
+#define ZF_TINACT_DEF 1000 /* default inactivity timeout
+ (1000 ms) */
+#define ZF_TINACT ZF_TINACT_DEF
+
struct FIRM_ID {
uclong signature; /* ZFIRM/U signature */
uclong zfwctrl_addr; /* pointer to ZFW_CTRL structure */
@@ -334,7 +358,9 @@ struct CH_CTRL {
uclong rs_status; /* RS-232 inputs */
uclong flow_xon; /* xon char */
uclong flow_xoff; /* xoff char */
- uclong filler[3]; /* filler to align structures */
+ uclong hw_overflow; /* hw overflow counter */
+ uclong sw_overflow; /* sw overflow counter */
+ uclong comm_error; /* frame/parity error counter */
};
@@ -378,11 +404,11 @@ struct BOARD_CTRL {
/* host to FW commands */
uclong hcmd_channel; /* channel number */
- uclong *hcmd_param; /* pointer to parameters */
+ uclong hcmd_param; /* pointer to parameters */
/* FW to Host commands */
uclong fwcmd_channel; /* channel number */
- uclong *fwcmd_param; /* pointer to parameters */
+ uclong fwcmd_param; /* pointer to parameters */
/* filler so the structures are aligned */
uclong filler[7];
@@ -404,8 +430,22 @@ struct ZFW_CTRL {
+
#ifdef __KERNEL__
+/***************************************
+ * Memory access functions/macros *
+ * (required to support Alpha systems) *
+ ***************************************/
+
+#define cy_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();}
+#define cy_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();}
+#define cy_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();}
+
+#define cy_readb(port) readb(port)
+#define cy_readw(port) readw(port)
+#define cy_readl(port) readl(port)
+
/* Per card data structure */
struct cyclades_card {
@@ -415,6 +455,7 @@ struct cyclades_card {
int num_chips; /* 0 if card absent, 1 if Z/PCI, else Y */
int first_line; /* minor number of first channel on card */
int bus_index; /* address shift - 0 for ISA, 1 for PCI */
+ int inact_ctrl; /* FW Inactivity control - 0 disabled, 1 enabled */
};
struct cyclades_chip {
@@ -443,6 +484,8 @@ struct cyclades_port {
int cor1,cor2,cor3,cor4,cor5;
int tbpr,tco,rbpr,rco;
int baud;
+ int rflow;
+ int rtsdtr_inv;
int ignore_status_mask;
int close_delay;
int IER; /* Interrupt Enable Register */
@@ -482,10 +525,14 @@ struct cyclades_port {
-#define CyMaxChipsPerCard 8
+#define CyMAX_CHIPS_PER_CARD 8
+#define CyMAX_CHAR_FIFO 12
+#define CyPORTS_PER_CHIP 4
+
+#define CyISA_Ywin 0x2000
#define CyPCI_Ywin 0x4000
-#define CyPCI_Zctl 0x100
+#define CyPCI_Zctl CTRL_WINDOW_SIZE
#define CyPCI_Zwin 0x80000
#define CyPCI_Ze_win (2 * CyPCI_Zwin)
@@ -530,6 +577,9 @@ struct cyclades_port {
#define CyPPR (0x7E*2)
#define CyCLOCK_20_1MS (0x27)
#define CyCLOCK_25_1MS (0x31)
+#define CyCLOCK_25_5MS (0xf4)
+#define CyCLOCK_60_1MS (0x75)
+#define CyCLOCK_60_2MS (0xea)
/* Virtual Registers */
@@ -652,12 +702,7 @@ struct cyclades_port {
#define CyTBPR (0x72*2)
#define CyTCOR (0x76*2)
-/* max number of chars in the FIFO */
-
-#define CyMAX_CHAR_FIFO 12
-
/***************************************************************************/
#endif /* __KERNEL__ */
#endif /* _LINUX_CYCLADES_H */
-
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index ebdf22bfc..456596073 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -17,7 +17,8 @@
*/
struct qstr {
const unsigned char * name;
- unsigned int len, hash;
+ unsigned int len;
+ unsigned int hash;
};
/* Name hashing routines. Initial hash value */
@@ -38,6 +39,15 @@ static inline unsigned long end_name_hash(unsigned long hash)
return (unsigned int) hash;
}
+/* Compute the hash for a name string. */
+static inline unsigned int full_name_hash(const char * name, unsigned int len)
+{
+ unsigned long hash = init_name_hash();
+ while (len--)
+ hash = partial_name_hash(*name++, hash);
+ return end_name_hash(hash);
+}
+
struct dentry {
int d_count;
unsigned int d_flags;
@@ -47,10 +57,13 @@ struct dentry {
struct dentry * d_covers;
struct list_head d_hash; /* lookup hash list */
struct list_head d_lru; /* d_count = 0 LRU list */
+ struct list_head d_child; /* child of parent list */
+ struct list_head d_subdirs; /* our children */
struct qstr d_name;
unsigned long d_time; /* used by d_revalidate */
struct dentry_operations *d_op;
struct super_block * d_sb; /* The root of the dentry tree */
+ unsigned long d_reftime; /* last time referenced */
};
struct dentry_operations {
@@ -104,10 +117,18 @@ extern void d_delete(struct dentry *);
/* allocate/de-allocate */
extern struct dentry * d_alloc(struct dentry * parent, const struct qstr *name);
extern void prune_dcache(int);
+extern void shrink_dcache_sb(struct super_block *);
+extern void shrink_dcache_parent(struct dentry *);
extern int d_invalidate(struct dentry *);
#define shrink_dcache() prune_dcache(0)
+/* dcache memory management */
+extern int select_dcache(int, int);
+extern void shrink_dcache_memory(void);
+extern void check_dcache_memory(void);
+extern void free_inode_memory(int); /* defined in fs/inode.c */
+
/* only used at mount-time */
extern struct dentry * d_alloc_root(struct inode * root_inode, struct dentry * old_root);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index fb47b00da..7f93af7fa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -42,9 +42,10 @@
/* And dynamically-tunable limits and defaults: */
extern int max_inodes;
-extern int max_files, nr_files;
+extern int max_files, nr_files, nr_free_files;
#define NR_INODE 4096 /* this should be bigger than NR_FILE */
#define NR_FILE 1024 /* this can well be larger on a larger system */
+#define NR_RESERVED_FILES 10 /* reserved for root */
#define MAY_EXEC 1
#define MAY_WRITE 2
@@ -163,7 +164,6 @@ typedef char buffer_block[BLOCK_SIZE];
#define BH_Touched 4 /* 1 if the buffer has been touched (aging) */
#define BH_Has_aged 5 /* 1 if the buffer has been aged (aging) */
#define BH_Protected 6 /* 1 if the buffer is protected */
-#define BH_FreeOnIO 7 /* 1 to discard the buffer_head after IO */
/*
* Try to keep the most commonly used fields in single cache lines (16
@@ -201,8 +201,18 @@ struct buffer_head {
struct buffer_head ** b_pprev; /* doubly linked list of hash-queue */
struct buffer_head * b_prev_free; /* doubly linked list of buffers */
struct buffer_head * b_reqnext; /* request queue */
+
+ /*
+ * I/O completion
+ */
+ void (*b_end_io)(struct buffer_head *bh, int uptodate);
+ void *b_dev_id;
};
+typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
+void init_buffer(struct buffer_head *bh, kdev_t dev, int block,
+ bh_end_io_t *handler, void *dev_id);
+
static inline int buffer_uptodate(struct buffer_head * bh)
{
return test_bit(BH_Uptodate, &bh->b_state);
@@ -439,8 +449,8 @@ extern void posix_unblock_lock(struct file_lock *);
extern int locks_mandatory_locked(struct inode *inode);
extern int locks_mandatory_area(int read_write, struct inode *inode,
- struct file *filp, unsigned int offset,
- unsigned int count);
+ struct file *filp, loff_t offset,
+ size_t count);
extern inline int locks_verify_locked(struct inode *inode)
{
@@ -452,9 +462,10 @@ extern inline int locks_verify_locked(struct inode *inode)
return (locks_mandatory_locked(inode));
return (0);
}
+
extern inline int locks_verify_area(int read_write, struct inode *inode,
- struct file *filp, unsigned int offset,
- unsigned int count)
+ struct file *filp, loff_t offset,
+ size_t count)
{
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
@@ -536,9 +547,9 @@ struct super_block {
typedef int (*filldir_t)(void *, const char *, int, off_t, ino_t);
struct file_operations {
- long long (*llseek) (struct file *, long long, int);
- long (*read) (struct inode *, struct file *, char *, unsigned long);
- long (*write) (struct inode *, struct file *, const char *, unsigned long);
+ loff_t (*llseek) (struct file *, loff_t, int);
+ ssize_t (*read) (struct file *, char *, size_t, loff_t *);
+ ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
int (*readdir) (struct file *, void *, filldir_t);
unsigned int (*poll) (struct file *, poll_table *);
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
@@ -632,6 +643,10 @@ extern struct inode_operations chrdev_inode_operations;
extern void init_fifo(struct inode * inode);
extern struct inode_operations fifo_inode_operations;
+/* Invalid inode operations -- fs/bad_inode.c */
+extern void make_bad_inode(struct inode * inode);
+extern int is_bad_inode(struct inode * inode);
+
extern struct file_operations connecting_fifo_fops;
extern struct file_operations read_fifo_fops;
extern struct file_operations write_fifo_fops;
@@ -642,9 +657,8 @@ extern struct file_operations rdwr_pipe_fops;
extern struct file_system_type *get_fs_type(const char *name);
-extern int fs_may_mount(kdev_t dev);
-extern int fs_may_umount(struct super_block *, struct dentry * root);
extern int fs_may_remount_ro(struct super_block *);
+extern int fs_may_mount(kdev_t dev);
extern struct file *inuse_filps;
extern struct super_block super_blocks[NR_SUPER];
@@ -744,32 +758,24 @@ extern inline void vfs_unlock(void)
#endif
}
-/* Not to be used by ordinary vfs users */
-extern void _get_inode(struct inode * inode);
-extern void iput(struct inode * inode);
-
-extern struct inode * iget(struct super_block * sb, unsigned long nr);
-extern void clear_inode(struct inode * inode);
+extern void iput(struct inode *);
+extern struct inode * iget(struct super_block *, unsigned long);
+extern void clear_inode(struct inode *);
extern struct inode * get_empty_inode(void);
-/* Please prefer to use this function in future, instead of using
- * a get_empty_inode()/insert_inode_hash() combination.
- * It allows for better checking and less race conditions.
- */
-extern struct inode * get_empty_inode_hashed(dev_t i_dev, unsigned long i_ino);
-
extern void insert_inode_hash(struct inode *);
extern int get_unused_fd(void);
extern void put_unused_fd(int);
extern struct file * get_empty_filp(void);
-extern int close_fp(struct file *filp);
-extern struct buffer_head * get_hash_table(kdev_t dev, int block, int size);
-extern struct buffer_head * getblk(kdev_t dev, int block, int size);
-extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]);
-extern void ll_rw_page(int rw, kdev_t dev, unsigned long nr, char * buffer);
-extern void ll_rw_swap_file(int rw, kdev_t dev, unsigned int *b, int nb, char *buffer);
-extern int is_read_only(kdev_t dev);
-extern void __brelse(struct buffer_head *buf);
+extern int close_fp(struct file *);
+extern struct buffer_head * get_hash_table(kdev_t, int, int);
+extern struct buffer_head * getblk(kdev_t, int, int);
+extern struct buffer_head *efind_buffer(kdev_t dev, int block, int size);
+extern void ll_rw_block(int, int, struct buffer_head * bh[]);
+extern void ll_rw_page(int, kdev_t, unsigned long, char *);
+extern void ll_rw_swap_file(int, kdev_t, unsigned int *, int, char *);
+extern int is_read_only(kdev_t);
+extern void __brelse(struct buffer_head *);
extern inline void brelse(struct buffer_head *buf)
{
if (buf)
@@ -791,8 +797,8 @@ extern int brw_page(int, struct page *, kdev_t, int [], int, int);
extern int generic_readpage(struct inode *, struct page *);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
-extern long generic_file_read(struct inode *, struct file *, char *, unsigned long);
-extern long generic_file_write(struct inode *, struct file *, const char *, unsigned long);
+extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
+extern ssize_t generic_file_write(struct file *, const char*, size_t, loff_t*);
extern struct super_block *get_super(kdev_t dev);
extern void put_super(kdev_t dev);
@@ -808,19 +814,16 @@ extern kdev_t real_root_dev;
extern int change_root(kdev_t new_root_dev,const char *put_old);
#endif
-extern long char_read(struct inode *, struct file *, char *, unsigned long);
-extern long block_read(struct inode *, struct file *, char *, unsigned long);
+extern ssize_t char_read(struct file *, char *, size_t, loff_t *);
+extern ssize_t block_read(struct file *, char *, size_t, loff_t *);
extern int read_ahead[];
-extern long char_write(struct inode *, struct file *, const char *, unsigned long);
-extern long block_write(struct inode *, struct file *, const char *, unsigned long);
+extern ssize_t char_write(struct file *, const char *, size_t, loff_t *);
+extern ssize_t block_write(struct file *, const char *, size_t, loff_t *);
extern int block_fsync(struct file *, struct dentry *dir);
extern int file_fsync(struct file *, struct dentry *dir);
-extern void dcache_add(struct inode *, const char *, int, unsigned long);
-extern int dcache_lookup(struct inode *, const char *, int, unsigned long *);
-
extern int inode_change_ok(struct inode *, struct iattr *);
extern void inode_setattr(struct inode *, struct iattr *);
extern int notify_change(struct inode * inode, struct iattr * attr);
diff --git a/include/linux/ftape-header-segment.h b/include/linux/ftape-header-segment.h
new file mode 100644
index 000000000..4732218f0
--- /dev/null
+++ b/include/linux/ftape-header-segment.h
@@ -0,0 +1,122 @@
+#ifndef _FTAPE_HEADER_SEGMENT_H
+#define _FTAPE_HEADER_SEGMENT_H
+
+/*
+ * Copyright (C) 1996-1997 Claus-Justus Heine.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ *
+ * $Source: /homes/cvs/ftape-stacked/include/linux/ftape-header-segment.h,v $
+ * $Revision: 1.2 $
+ * $Date: 1997/10/05 19:19:28 $
+ *
+ * This file defines some offsets into the header segment of a
+ * floppy tape cartridge. For use with the QIC-40/80/3010/3020
+ * floppy-tape driver "ftape" for Linux.
+ */
+
+#define FT_SIGNATURE 0 /* must be 0xaa55aa55 */
+#define FT_FMT_CODE 4
+#define FT_REV_LEVEL 5 /* only for QIC-80 since. Rev. L (== 0x0c) */
+#define FT_HSEG_1 6 /* first header segment, except for format code 6 */
+#define FT_HSEG_2 8 /* second header segment, except for format code 6 */
+#define FT_FRST_SEG 10 /* first data segment, except for format code 6 */
+#define FT_LAST_SEG 12 /* last data segment, except for format code 6 */
+#define FT_FMT_DATE 14 /* date and time of most recent format, see below */
+#define FT_WR_DATE 18 /* date and time of most recent write or format */
+#define FT_SPT 24 /* segments per track */
+#define FT_TPC 26 /* tracks per cartridge */
+#define FT_FHM 27 /* floppy drive head (maximum of it) */
+#define FT_FTM 28 /* floppy track max. */
+#define FT_FSM 29 /* floppy sector max. (128) */
+#define FT_LABEL 30 /* floppy tape label */
+#define FT_LABEL_DATE 74 /* date and time the tape label was written */
+#define FT_LABEL_SZ (FT_LABEL_DATE - FT_LABEL)
+#define FT_CMAP_START 78 /* starting segment of compression map */
+#define FT_FMT_ERROR 128 /* must be set to 0xff if remainder gets lost during
+ * tape format
+ */
+#define FT_SEG_CNT 130 /* number of seg. written, formatted or verified
+ * through lifetime of tape (why not read?)
+ */
+#define FT_INIT_DATE 138 /* date and time of initial tape format */
+#define FT_FMT_CNT 142 /* number of times tape has been formatted */
+#define FT_FSL_CNT 144 /* number of segments in failed sector log */
+#define FT_MK_CODE 146 /* id string of tape manufacturer */
+#define FT_LOT_CODE 190 /* tape manufacturer lot code */
+#define FT_6_HSEG_1 234 /* first header segment for format code 6 */
+#define FT_6_HSEG_2 238 /* second header segment for format code 6 */
+#define FT_6_FRST_SEG 242 /* first data segment for format code 6 */
+#define FT_6_LAST_SEG 246 /* last data segment for format code 6 */
+
+#define FT_FSL 256
+#define FT_HEADER_END 256 /* space beyond this point:
+ * format codes 2, 3 and 5:
+ * - failed sector log until byte 2047
+ * - bad sector map in the reamining part of segment
+ * format codes 4 and 6:
+ * - bad sector map starts hear
+ */
+
+
+/* value to be stored at the FT_SIGNATURE offset
+ */
+#define FT_HSEG_MAGIC 0xaa55aa55
+#define FT_D2G_MAGIC 0x82288228 /* Ditto 2GB */
+
+/* data and time encoding: */
+#define FT_YEAR_SHIFT 25
+#define FT_YEAR_MASK 0xfe000000
+#define FT_YEAR_0 1970
+#define FT_YEAR_MAX 127
+#define FT_YEAR(year) ((((year)-FT_YEAR_0)<<FT_YEAR_SHIFT)&FT_YEAR_MASK)
+
+#define FT_TIME_SHIFT 0
+#define FT_TIME_MASK 0x01FFFFFF
+#define FT_TIME_MAX 0x01ea6dff /* last second of a year */
+#define FT_TIME(mo,d,h,m,s) \
+ ((((s)+60*((m)+60*((h)+24*((d)+31*(mo))))) & FT_TIME_MASK))
+
+#define FT_TIME_STAMP(y,mo,d,h,m,s) (FT_YEAR(y) | FT_TIME(mo,d,h,m,s))
+
+/* values for the format code field */
+typedef enum {
+ fmt_normal = 2, /* QIC-80 post Rev. B 205Ft or 307Ft tape */
+ fmt_1100ft = 3, /* QIC-80 post Rev. B 1100Ft tape */
+ fmt_var = 4, /* QIC-80 post Rev. B variabel length format */
+ fmt_425ft = 5, /* QIC-80 post Rev. B 425Ft tape */
+ fmt_big = 6 /* QIC-3010/3020 variable length tape with more
+ * than 2^16 segments per tape
+ */
+} ft_format_type;
+
+/* definitions for the failed sector log */
+#define FT_FSL_SIZE (2 * FT_SECTOR_SIZE - FT_HEADER_END)
+#define FT_FSL_MAX_ENTRIES (FT_FSL_SIZE/sizeof(__u32))
+
+typedef struct ft_fsl_entry {
+ __u16 segment;
+ __u16 date;
+} __attribute__ ((packed)) ft_fsl_entry;
+
+
+/* date encoding for the failed sector log
+ * month: 1..12, day: 1..31, year: 1970..2097
+ */
+#define FT_FSL_TIME_STAMP(y,m,d) \
+ (((((y) - FT_YEAR_0)<<9)&0xfe00) | (((m)<<5)&0x01e0) | ((d)&0x001f))
+
+#endif /* _FTAPE_HEADER_SEGMENT_H */
diff --git a/include/linux/ftape-vendors.h b/include/linux/ftape-vendors.h
new file mode 100644
index 000000000..ec1a81f05
--- /dev/null
+++ b/include/linux/ftape-vendors.h
@@ -0,0 +1,137 @@
+#ifndef _FTAPE_VENDORS_H
+#define _FTAPE_VENDORS_H
+
+/*
+ * Copyright (C) 1993-1996 Bas Laarhoven,
+ * (C) 1996-1997 Claus-Justus Heine.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ *
+ * $Source: /homes/cvs/ftape-stacked/include/linux/ftape-vendors.h,v $
+ * $Revision: 1.6 $
+ * $Date: 1997/10/09 15:38:11 $
+ *
+ * This file contains the supported drive types with their
+ * QIC-117 spec. vendor code and drive dependent configuration
+ * information.
+ */
+
+typedef enum {
+ unknown_wake_up = 0,
+ no_wake_up,
+ wake_up_colorado,
+ wake_up_mountain,
+ wake_up_insight,
+} wake_up_types;
+
+typedef struct {
+ wake_up_types wake_up; /* see wake_up_types */
+ char *name; /* Text describing the drive */
+} wakeup_method;
+
+/* Note: order of entries in WAKEUP_METHODS must be so that a variable
+ * of type wake_up_types can be used as an index in the array.
+ */
+#define WAKEUP_METHODS { \
+ { unknown_wake_up, "Unknown" }, \
+ { no_wake_up, "None" }, \
+ { wake_up_colorado, "Colorado" }, \
+ { wake_up_mountain, "Mountain" }, \
+ { wake_up_insight, "Motor-on" }, \
+}
+
+typedef struct {
+ unsigned int vendor_id; /* vendor id from drive */
+ int speed; /* maximum tape transport speed (ips) */
+ wake_up_types wake_up; /* see wake_up_types */
+ char *name; /* Text describing the drive */
+} vendor_struct;
+
+#define UNKNOWN_VENDOR (-1)
+
+#define QIC117_VENDORS { \
+/* see _vendor_struct */ \
+ { 0x00000, 82, wake_up_colorado, "Colorado DJ-10 (old)" }, \
+ { 0x00047, 90, wake_up_colorado, "Colorado DJ-10/DJ-20" }, \
+ { 0x011c2, 84, wake_up_colorado, "Colorado 700" }, \
+ { 0x011c3, 90, wake_up_colorado, "Colorado 1400" }, \
+ { 0x011c4, 84, wake_up_colorado, "Colorado DJ-10/DJ-20 (new)" }, \
+ { 0x011c5, 84, wake_up_colorado, "HP Colorado T1000" }, \
+ { 0x011c6, 90, wake_up_colorado, "HP Colorado T3000" }, \
+ { 0x00005, 45, wake_up_mountain, "Archive 5580i" }, \
+ { 0x10005, 50, wake_up_insight, "Insight 80Mb, Irwin 80SX" }, \
+ { 0x00140, 74, wake_up_mountain, "Archive S.Hornet [Identity/Escom]" }, \
+ { 0x00146, 72, wake_up_mountain, "Archive 31250Q [Escom]" }, \
+ { 0x0014a, 100, wake_up_mountain, "Archive XL9250i [Conner/Escom]" }, \
+ { 0x0014c, 98, wake_up_mountain, "Conner C250MQT" }, \
+ { 0x0014e, 80, wake_up_mountain, "Conner C250MQ" }, \
+ { 0x00150, 80, wake_up_mountain, "Conner TSM420R/TST800R" }, \
+ { 0x00152, 80, wake_up_mountain, "Conner TSM850R" }, \
+ { 0x00156, 80, wake_up_mountain, "Conner TSM850R/1700R/TST3200R" }, \
+ { 0x00180, 0, wake_up_mountain, "Summit SE 150" }, \
+ { 0x00181, 85, wake_up_mountain, "Summit SE 250, Mountain FS8000" }, \
+ { 0x001c1, 82, no_wake_up, "Wangtek 3040F" }, \
+ { 0x001c8, 64, no_wake_up, "Wangtek 3080F" }, \
+ { 0x001c8, 64, wake_up_colorado, "Wangtek 3080F" }, \
+ { 0x001ca, 67, no_wake_up, "Wangtek 3080F (new)" }, \
+ { 0x001cc, 77, wake_up_colorado, "Wangtek 3200 / Teac 700" }, \
+ { 0x001cd, 75, wake_up_colorado, "Reveal TB1400" }, \
+ { 0x00380, 85, wake_up_colorado, "Exabyte Eagle-96" }, \
+ { 0x00381, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \
+ { 0x00382, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \
+ { 0x003ce, 77, wake_up_colorado, "Teac 800" }, \
+ { 0x003cf, 0, wake_up_colorado, "Teac FT3010TR" }, \
+ { 0x08880, 64, no_wake_up, "Iomega 250, Ditto 800" }, \
+ { 0x08880, 64, wake_up_colorado, "Iomega 250, Ditto 800" }, \
+ { 0x08880, 64, wake_up_insight, "Iomega 250, Ditto 800" }, \
+ { 0x08881, 80, wake_up_colorado, "Iomega 700" }, \
+ { 0x08882, 80, wake_up_colorado, "Iomega 3200" }, \
+ { 0x08883, 80, wake_up_colorado, "Iomega DITTO 2GB" }, \
+ { 0x00021, 70, no_wake_up, "AIWA CT-803" }, \
+ { 0x004c0, 80, no_wake_up, "AIWA TD-S1600" }, \
+ { 0x00021, 0, wake_up_mountain, "COREtape QIC80" }, \
+ { 0x00441, 0, wake_up_mountain, "ComByte DoublePlay" }, \
+ { 0x00481, 127, wake_up_mountain, "PERTEC MyTape 800" }, \
+ { 0x00483, 130, wake_up_mountain, "PERTEC MyTape 3200" }, \
+ { UNKNOWN_VENDOR, 0, no_wake_up, "unknown" } \
+}
+
+#define QIC117_MAKE_CODES { \
+ { 0, "Unassigned" }, \
+ { 1, "Alloy Computer Products" }, \
+ { 2, "3M" }, \
+ { 3, "Tandberg Data" }, \
+ { 4, "Colorado" }, \
+ { 5, "Archive/Conner" }, \
+ { 6, "Mountain/Summit Memory Systems" }, \
+ { 7, "Wangtek/Rexon/Tecmar" }, \
+ { 8, "Sony" }, \
+ { 9, "Cipher Data Products" }, \
+ { 10, "Irwin Magnetic Systems" }, \
+ { 11, "Braemar" }, \
+ { 12, "Verbatim" }, \
+ { 13, "Core International" }, \
+ { 14, "Exabyte" }, \
+ { 15, "Teac" }, \
+ { 16, "Gigatek" }, \
+ { 17, "ComByte" }, \
+ { 18, "PERTEC Memories" }, \
+ { 19, "Aiwa" }, \
+ { 71, "Colorado" }, \
+ { 546, "Iomega Inc" }, \
+}
+
+#endif /* _FTAPE_VENDORS_H */
diff --git a/include/linux/ftape.h b/include/linux/ftape.h
index 0ce7a1c4b..36ade3437 100644
--- a/include/linux/ftape.h
+++ b/include/linux/ftape.h
@@ -2,69 +2,211 @@
#define _FTAPE_H
/*
- * Copyright (C) 1994-1995 Bas Laarhoven.
+ * Copyright (C) 1994-1996 Bas Laarhoven,
+ * (C) 1996-1997 Claus-Justus Heine.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
- $Source: /home/bas/distr/ftape-2.03b/RCS/ftape.h,v $
- $Author: bas $
- *
- $Revision: 1.18 $
- $Date: 1995/05/06 16:11:53 $
- $State: Beta $
+ * $Source: /homes/cvs/ftape-stacked/include/linux/ftape.h,v $
+ * $Revision: 1.17.6.4 $
+ * $Date: 1997/11/25 01:52:54 $
*
* This file contains global definitions, typedefs and macro's
- * for the QIC-40/80 floppy-tape driver for Linux.
+ * for the QIC-40/80/3010/3020 floppy-tape driver for Linux.
*/
+#define FTAPE_VERSION "ftape v3.04d 25/11/97"
+
+/* this makes the Kernel version numbers readable */
+#define KERNEL_VER(major,minor,sublvl) (((major)<<16)+((minor)<<8)+(sublvl))
+
+#ifdef __KERNEL__
#include <linux/sched.h>
#include <linux/mm.h>
+#endif
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/config.h>
+#if LINUX_VERSION_CODE <= KERNEL_VER(1,2,13)
+typedef daddr_t __kernel_daddr_t; /* needed for mtio.h */
+#endif
+#include <linux/mtio.h>
+
+#define FT_SECTOR(x) (x+1) /* sector offset into real sector */
+#define FT_SECTOR_SIZE 1024
+#define FT_SECTORS_PER_SEGMENT 32
+#define FT_ECC_SECTORS 3
+#define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE)
+#define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE)
+
+/*
+ * bits of the minor device number that define drive selection
+ * methods. Could be used one day to access multiple tape
+ * drives on the same controller.
+ */
+#define FTAPE_SEL_A 0
+#define FTAPE_SEL_B 1
+#define FTAPE_SEL_C 2
+#define FTAPE_SEL_D 3
+#define FTAPE_SEL_MASK 3
+#define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK)
+#define FTAPE_NO_REWIND 4 /* mask for minor nr */
-#define SECTOR(x) (x+1) /* sector offset into real sector */
-#define SECTOR_SIZE (1024)
-#define SECTORS_PER_SEGMENT (32)
-#define BUFF_SIZE (SECTORS_PER_SEGMENT * SECTOR_SIZE)
-#define FTAPE_UNIT (ftape_unit & 3)
-#define RQM_DELAY (12)
-#define MILLISECOND (1)
-#define SECOND (1000)
-#define FOREVER (-1)
+/* the following two may be reported when MTIOCGET is requested ... */
+typedef union {
+ struct {
+ __u8 error;
+ __u8 command;
+ } error;
+ long space;
+} ft_drive_error;
+typedef union {
+ struct {
+ __u8 drive_status;
+ __u8 drive_config;
+ __u8 tape_status;
+ } status;
+ long space;
+} ft_drive_status;
+
+#ifdef __KERNEL__
+
+#define FT_RQM_DELAY 12
+#define FT_MILLISECOND 1
+#define FT_SECOND 1000
+#define FT_FOREVER -1
#ifndef HZ
-# error "HZ undefined."
+#error "HZ undefined."
#endif
-#define MSPT (SECOND / HZ) /* milliseconds per tick */
+#define FT_USPT (1000000/HZ) /* microseconds per tick */
/* This defines the number of retries that the driver will allow
* before giving up (and letting a higher level handle the error).
*/
#ifdef TESTING
-# define SOFT_RETRIES 1 /* number of low level retries */
-# define RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
+#define FT_SOFT_RETRIES 1 /* number of low level retries */
+#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
#else
-# define SOFT_RETRIES 6 /* number of low level retries (triple) */
-# define RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
+#define FT_SOFT_RETRIES 6 /* number of low level retries (triple) */
+#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
+#endif
+
+#ifndef THE_FTAPE_MAINTAINER
+#define THE_FTAPE_MAINTAINER "the ftape maintainer"
+#endif
+
+/* Initialize missing configuration parameters.
+ */
+#ifndef CONFIG_FT_NR_BUFFERS
+# define CONFIG_FT_NR_BUFFERS 3
+#endif
+#ifndef CONFIG_FT_FDC_THR
+# define CONFIG_FT_FDC_THR 8
#endif
+#ifndef CONFIG_FT_FDC_MAX_RATE
+# define CONFIG_FT_FDC_MAX_RATE 2000
+#endif
+#ifndef CONFIG_FT_FDC_BASE
+# define CONFIG_FT_FDC_BASE 0
+#endif
+#ifndef CONFIG_FT_FDC_IRQ
+# define CONFIG_FT_FDC_IRQ 0
+#endif
+#ifndef CONFIG_FT_FDC_DMA
+# define CONFIG_FT_FDC_DMA 0
+#endif
+
+/* Turn some booleans into numbers.
+ */
+#ifdef CONFIG_FT_PROBE_FC10
+# undef CONFIG_FT_PROBE_FC10
+# define CONFIG_FT_PROBE_FC10 1
+#else
+# define CONFIG_FT_PROBE_FC10 0
+#endif
+#ifdef CONFIG_FT_MACH2
+# undef CONFIG_FT_MACH2
+# define CONFIG_FT_MACH2 1
+#else
+# define CONFIG_FT_MACH2 0
+#endif
+
+/* Insert default settings
+ */
+#if CONFIG_FT_PROBE_FC10 == 1
+# if CONFIG_FT_FDC_BASE == 0
+# undef CONFIG_FT_FDC_BASE
+# define CONFIG_FT_FDC_BASE 0x180
+# endif
+# if CONFIG_FT_FDC_IRQ == 0
+# undef CONFIG_FT_FDC_IRQ
+# define CONFIG_FT_FDC_IRQ 9
+# endif
+# if CONFIG_FT_FDC_DMA == 0
+# undef CONFIG_FT_FDC_DMA
+# define CONFIG_FT_FDC_DMA 3
+# endif
+#elif CONIFG_FT_MACH2 == 1 /* CONFIG_FT_PROBE_FC10 == 1 */
+# if CONFIG_FT_FDC_BASE == 0
+# undef CONFIG_FT_FDC_BASE
+# define CONFIG_FT_FDC_BASE 0x1E0
+# endif
+# if CONFIG_FT_FDC_IRQ == 0
+# undef CONFIG_FT_FDC_IRQ
+# define CONFIG_FT_FDC_IRQ 6
+# endif
+# if CONFIG_FT_FDC_DMA == 0
+# undef CONFIG_FT_FDC_DMA
+# define CONFIG_FT_FDC_DMA 2
+# endif
+#elif CONFIG_FT_ALT_FDC == 1 /* CONFIG_FT_MACH2 */
+# if CONFIG_FT_FDC_BASE == 0
+# undef CONFIG_FT_FDC_BASE
+# define CONFIG_FT_FDC_BASE 0x370
+# endif
+# if CONFIG_FT_FDC_IRQ == 0
+# undef CONFIG_FT_FDC_IRQ
+# define CONFIG_FT_FDC_IRQ 6
+# endif
+# if CONFIG_FT_FDC_DMA == 0
+# undef CONFIG_FT_FDC_DMA
+# define CONFIG_FT_FDC_DMA 2
+# endif
+#else /* CONFIG_FT_ALT_FDC */
+# if CONFIG_FT_FDC_BASE == 0
+# undef CONFIG_FT_FDC_BASE
+# define CONFIG_FT_FDC_BASE 0x3f0
+# endif
+# if CONFIG_FT_FDC_IRQ == 0
+# undef CONFIG_FT_FDC_IRQ
+# define CONFIG_FT_FDC_IRQ 6
+# endif
+# if CONFIG_FT_FDC_DMA == 0
+# undef CONFIG_FT_FDC_DMA
+# define CONFIG_FT_FDC_DMA 2
+# endif
+#endif /* standard FDC */
+
/* some useful macro's
*/
#define ABS(a) ((a) < 0 ? -(a) : (a))
-#define NR_ITEMS(x) (sizeof(x)/ sizeof(*x))
-
-typedef unsigned char byte;
+#define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x))
extern int ftape_init(void);
-#endif
+#endif /* __KERNEL__ */
+#endif
diff --git a/include/linux/head.h b/include/linux/head.h
index 3829b1c36..e4e99b31d 100644
--- a/include/linux/head.h
+++ b/include/linux/head.h
@@ -1,11 +1,20 @@
#ifndef _LINUX_HEAD_H
#define _LINUX_HEAD_H
-typedef struct desc_struct {
+struct desc_struct {
unsigned long a,b;
-} desc_table[256];
+};
-extern desc_table idt,gdt;
+extern struct desc_struct idt_table[],gdt_table[];
+extern struct desc_struct *idt, *gdt;
+
+struct Xgt_desc_struct {
+ unsigned short size;
+ unsigned long address __attribute__((packed));
+};
+
+#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
+#define gdt_descr (*(struct Xgt_desc_struct *)((char *)&gdt - 2))
#define GDT_NUL 0
#define GDT_CODE 1
diff --git a/include/linux/icmp.h b/include/linux/icmp.h
index 9e5dd8899..fb4ed8b9a 100644
--- a/include/linux/icmp.h
+++ b/include/linux/icmp.h
@@ -88,4 +88,15 @@ struct icmp_err {
};
#endif
+/*
+ * constants for (set|get)sockopt
+ */
+
+#define ICMP_FILTER 1
+
+struct icmp_filter {
+ __u32 data;
+};
+
+
#endif /* _LINUX_ICMP_H */
diff --git a/include/linux/if.h b/include/linux/if.h
index 09c066cb3..bd98fb029 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -39,6 +39,8 @@
#define IFF_MULTICAST 0x1000 /* Supports multicast */
+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ALLMULTI)
+
#define IFF_PORTSEL 0x2000 /* can set media type */
#define IFF_AUTOMEDIA 0x4000 /* auto media select active */
@@ -129,6 +131,7 @@ struct ifreq
#define ifr_slave ifr_ifru.ifru_slave /* slave device */
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */
+#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */
/*
* Structure used in SIOCGIFCONF request.
@@ -149,4 +152,5 @@ struct ifconf
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
+
#endif /* _LINUX_IF_H */
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index c93764cb7..e63cb85a6 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -60,6 +60,10 @@
#define ARPHRD_BIF 775 /* AP1000 BIF */
#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */
#define ARPHRD_IPDDP 777 /* IP over DDP tunneller */
+#define ARPHRD_IPGRE 778 /* GRE over IP */
+#define ARPHRD_PIMREG 779 /* PIMSM register interface */
+#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */
+#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */
/* ARP protocol opcodes. */
#define ARPOP_REQUEST 1 /* ARP request */
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 6dcbed815..4f1a1e2f3 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -24,8 +24,11 @@
#ifndef _FRAD_H_
#define _FRAD_H_
+#include <linux/config.h>
#include <linux/if.h>
+#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
+
/* Structures and constants associated with the DLCI device driver */
struct dlci_add
@@ -189,6 +192,10 @@ struct frad_local
int register_frad(const char *name);
int unregister_frad(const char *name);
+int (*dlci_ioctl_hook)(unsigned int, void *);
+
#endif __KERNEL__
+#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
+
#endif
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index 5f6d3e9d5..0ac234125 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -8,4 +8,41 @@ struct sockaddr_pkt
unsigned short spkt_protocol;
};
+struct sockaddr_ll
+{
+ unsigned short sll_family;
+ unsigned short sll_protocol;
+ int sll_ifindex;
+ unsigned short sll_hatype;
+ unsigned char sll_pkttype;
+ unsigned char sll_halen;
+ unsigned char sll_addr[8];
+};
+
+/* Packet types */
+
+#define PACKET_HOST 0 /* To us */
+#define PACKET_BROADCAST 1 /* To all */
+#define PACKET_MULTICAST 2 /* To group */
+#define PACKET_OTHERHOST 3 /* To someone else */
+#define PACKET_OUTGOING 4 /* Originated by us */
+#define PACKET_NDISC 17 /* Outgoing NDISC packet*/
+
+/* Packet socket options */
+
+#define PACKET_ADD_MEMBERSHIP 1
+#define PACKET_DROP_MEMBERSHIP 2
+
+struct packet_mreq
+{
+ int mr_ifindex;
+ unsigned short mr_type;
+ unsigned short mr_alen;
+ unsigned char mr_address[8];
+};
+
+#define PACKET_MR_MULTICAST 0
+#define PACKET_MR_PROMISC 1
+#define PACKET_MR_ALLMULTI 2
+
#endif
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h
index bfbf72525..5d07fcab7 100644
--- a/include/linux/if_tr.h
+++ b/include/linux/if_tr.h
@@ -34,12 +34,6 @@
#endif
-/* These are some defined Ethernet Protocol ID's. */
-/* FIXME: should use the definitions in if_ether.h!!! */
-#define ETH_P_IP 0x0800 /* Internet Protocol packet */
-#define ETH_P_ARP 0x0806 /* Address Resolution packet */
-#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
-
/* LLC and SNAP constants */
#define EXTENDED_SAP 0xAA
#define UI_CMD 0x03
diff --git a/include/linux/in6.h b/include/linux/in6.h
index 0996e2d58..0ebec6ba3 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -21,6 +21,7 @@
#ifndef _LINUX_IN6_H
#define _LINUX_IN6_H
+#include <linux/types.h>
/*
* IPv6 address structure
@@ -105,8 +106,10 @@ struct ipv6_mreq {
#define IPV6_ADDRFORM 1
#define IPV6_PKTINFO 2
-#define IPV6_RXHOPOPTS 3
-#define IPV6_RXDSTOPTS 4
+#define IPV6_RXHOPOPTS 3 /* obsolete name */
+#define IPV6_RXDSTOPTS 4 /* obsolete name */
+#define IPV6_HOPOPTS IPV6_RXHOPOPTS /* new name */
+#define IPV6_DSTOPTS IPV6_RXDSTOPTS /* new name */
#define IPV6_RXSRCRT 5
#define IPV6_PKTOPTIONS 6
#define IPV6_CHECKSUM 7
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 7c8bbd9d0..4c71abf5d 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -39,7 +39,8 @@ enum {
IMMEDIATE_BH,
KEYBOARD_BH,
CYCLADES_BH,
- CM206_BH
+ CM206_BH,
+ JS_BH
};
#include <asm/hardirq.h>
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 838eb5300..b5eef44dd 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -29,8 +29,7 @@ extern unsigned long occupy_region(unsigned long base, unsigned long end,
#endif
#define HAVE_AUTOIRQ
-extern void *irq2dev_map[16]; /* Use only if you own the IRQ. */
-extern int autoirq_setup(int waittime);
+extern void autoirq_setup(int waittime);
extern int autoirq_report(int waittime);
#endif /* _LINUX_PORTIO_H */
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h
index 97e63e362..d53b16080 100644
--- a/include/linux/ipv6_route.h
+++ b/include/linux/ipv6_route.h
@@ -25,6 +25,8 @@
#define RTF_FLOW 0x02000000 /* flow significant route */
#define RTF_POLICY 0x04000000 /* policy route */
+#define RTF_LOCAL 0x80000000
+
struct in6_rtmsg {
struct in6_addr rtmsg_dst;
struct in6_addr rtmsg_src;
@@ -38,4 +40,10 @@ struct in6_rtmsg {
int rtmsg_ifindex;
};
+#define RTMSG_NEWDEVICE 0x11
+#define RTMSG_DELDEVICE 0x12
+#define RTMSG_NEWROUTE 0x21
+#define RTMSG_DELROUTE 0x22
+#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed */
+
#endif
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index 43ff8b36b..9cf48e4d0 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -7,8 +7,8 @@
struct sockaddr_ipx
{
- sa_family_t sipx_family;
- __u16 sipx_port;
+ sa_family_t sipx_family;
+ __u16 sipx_port;
__u32 sipx_network;
unsigned char sipx_node[IPX_NODE_LEN];
__u8 sipx_type;
@@ -26,14 +26,14 @@ struct sockaddr_ipx
typedef struct ipx_route_definition
{
- unsigned long ipx_network;
- unsigned long ipx_router_network;
+ __u32 ipx_network;
+ __u32 ipx_router_network;
unsigned char ipx_router_node[IPX_NODE_LEN];
} ipx_route_definition;
typedef struct ipx_interface_definition
{
- unsigned long ipx_network;
+ __u32 ipx_network;
unsigned char ipx_device[16];
unsigned char ipx_dlink_type;
#define IPX_FRAME_NONE 0
@@ -61,8 +61,8 @@ typedef struct ipx_config_data
struct ipx_route_def
{
- unsigned long ipx_network;
- unsigned long ipx_router_network;
+ __u32 ipx_network;
+ __u32 ipx_router_network;
#define IPX_ROUTE_NO_ROUTER 0
unsigned char ipx_router_node[IPX_NODE_LEN];
unsigned char ipx_device[16];
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h
index 5b1f18a88..a3f6773a4 100644
--- a/include/linux/isdnif.h
+++ b/include/linux/isdnif.h
@@ -390,9 +390,9 @@ static inline unsigned long copy_to_user(void *to, const void *from, unsigned lo
#include <asm/uaccess.h>
#define GET_USER get_user
#define PUT_USER put_user
-#define RWTYPE long
+#define RWTYPE ssize_t
#define LSTYPE long long
-#define RWARG unsigned long
+#define RWARG size_t
#define LSARG long long
#endif
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 011edfe6f..a8a3cbece 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -19,6 +19,7 @@ struct iso_volume_descriptor {
/* volume descriptor types */
#define ISO_VD_PRIMARY 1
+#define ISO_VD_SUPPLEMENTARY 2
#define ISO_VD_END 255
#define ISO_STANDARD_ID "CD001"
@@ -59,6 +60,43 @@ struct iso_primary_descriptor {
char unused5 [ISODCL (1396, 2048)];
};
+/* Almost the same as the primary descriptor but two fields are specified */
+struct iso_supplementary_descriptor {
+ char type [ISODCL ( 1, 1)]; /* 711 */
+ char id [ISODCL ( 2, 6)];
+ char version [ISODCL ( 7, 7)]; /* 711 */
+ char flags [ISODCL ( 8, 8)]; /* 853 */
+ char system_id [ISODCL ( 9, 40)]; /* achars */
+ char volume_id [ISODCL ( 41, 72)]; /* dchars */
+ char unused2 [ISODCL ( 73, 80)];
+ char volume_space_size [ISODCL ( 81, 88)]; /* 733 */
+ char escape [ISODCL ( 89, 120)]; /* 856 */
+ char volume_set_size [ISODCL (121, 124)]; /* 723 */
+ char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
+ char logical_block_size [ISODCL (129, 132)]; /* 723 */
+ char path_table_size [ISODCL (133, 140)]; /* 733 */
+ char type_l_path_table [ISODCL (141, 144)]; /* 731 */
+ char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */
+ char type_m_path_table [ISODCL (149, 152)]; /* 732 */
+ char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */
+ char root_directory_record [ISODCL (157, 190)]; /* 9.1 */
+ char volume_set_id [ISODCL (191, 318)]; /* dchars */
+ char publisher_id [ISODCL (319, 446)]; /* achars */
+ char preparer_id [ISODCL (447, 574)]; /* achars */
+ char application_id [ISODCL (575, 702)]; /* achars */
+ char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */
+ char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */
+ char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */
+ char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */
+ char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */
+ char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */
+ char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */
+ char file_structure_version [ISODCL (882, 882)]; /* 711 */
+ char unused4 [ISODCL (883, 883)];
+ char application_data [ISODCL (884, 1395)];
+ char unused5 [ISODCL (1396, 2048)];
+};
+
#define HS_STANDARD_ID "CDROM"
@@ -142,11 +180,13 @@ extern int isonum_733(char *);
extern int iso_date(char *, int);
extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *);
-extern int get_rock_ridge_filename(struct iso_directory_record *, char ** name, int * len, struct inode *);
+extern int get_rock_ridge_filename(struct iso_directory_record *, char *, struct inode *);
extern char * get_rock_ridge_symlink(struct inode *);
extern int find_rock_ridge_relocation(struct iso_directory_record *, struct inode *);
+int get_joliet_filename(struct iso_directory_record *, struct inode *, unsigned char *);
+
/* The stuff that follows may be totally unneeded. I have not checked to see
which prototypes we are still using. */
diff --git a/include/linux/iso_fs_sb.h b/include/linux/iso_fs_sb.h
index 25ebdb8ab..35bd29203 100644
--- a/include/linux/iso_fs_sb.h
+++ b/include/linux/iso_fs_sb.h
@@ -5,26 +5,29 @@
* iso9660 super-block data in memory
*/
struct isofs_sb_info {
- unsigned long s_ninodes;
- unsigned long s_nzones;
- unsigned long s_firstdatazone;
- unsigned long s_log_zone_size;
- unsigned long s_max_size;
-
- unsigned char s_high_sierra; /* A simple flag */
- unsigned char s_mapping;
- unsigned char s_conversion;
- unsigned char s_rock;
- unsigned char s_name_check; /* r = relaxed, s = strict */
- unsigned char s_cruft; /* Broken disks with high
- byte of length containing
- junk */
- unsigned char s_unhide;
- unsigned char s_nosuid;
- unsigned char s_nodev;
- mode_t s_mode;
- gid_t s_gid;
- uid_t s_uid;
+ unsigned long s_ninodes;
+ unsigned long s_nzones;
+ unsigned long s_firstdatazone;
+ unsigned long s_log_zone_size;
+ unsigned long s_max_size;
+
+ unsigned char s_high_sierra; /* A simple flag */
+ unsigned char s_mapping;
+ unsigned char s_conversion;
+ unsigned char s_rock;
+ unsigned char s_joliet_level;
+ unsigned char s_utf8;
+ unsigned char s_name_check; /* r = relaxed, s = strict */
+ unsigned char s_cruft; /* Broken disks with high
+ byte of length containing
+ junk */
+ unsigned char s_unhide;
+ unsigned char s_nosuid;
+ unsigned char s_nodev;
+ mode_t s_mode;
+ gid_t s_gid;
+ uid_t s_uid;
+ struct nls_table *s_nls_iocharset; /* Native language support table */
};
#endif
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index a9a56273d..05d0bbab8 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -1,61 +1,81 @@
#ifndef _LINUX_JOYSTICK_H
#define _LINUX_JOYSTICK_H
-#define JS_RETURN sizeof(struct js_status) /*number of bytes returned by js_read*/
-#define JS_TRUE 1
-#define JS_FALSE 0
-#define JS_PORT 0x201 /*io port for joystick operations*/
-#define JS_DEF_TIMEOUT 0x1300 /*default timeout value for js_read()*/
-#define JS_DEF_CORR 0 /*default correction factor*/
-#define JS_DEF_TIMELIMIT 10L /*default data valid time =10 jiffies == 100ms*/
-#define JS_X_0 0x01 /*bit mask for x-axis js0*/
-#define JS_Y_0 0x02 /*bit mask for y-axis js0*/
-#define JS_X_1 0x04 /*bit mask for x-axis js1*/
-#define JS_Y_1 0x08 /*bit mask for y-axis js1*/
-#define JS_MAX 2 /*Max number of joysticks*/
-#define PIT_MODE 0x43 /*io port for timer 0*/
-#define PIT_COUNTER_0 0x40 /*io port for timer 0*/
-#define JSIOCSCAL 0x01 /*ioctl cmd to set joystick correction factor*/
-#define JSIOCGCAL 0x02 /*ioctl cmd to get joystick correction factor*/
-#define JSIOCSTIMEOUT 0x03 /*ioctl cmd to set maximum number of iterations
- to wait for a timeout*/
-#define JSIOCGTIMEOUT 0x04 /*as above, to get*/
-#define JSIOCSTIMELIMIT 0x05 /*set data retention time*/
-#define JSIOCGTIMELIMIT 0x06 /*get data retention time*/
-#define JSIOCGCONFIG 0x07 /*get the whole js_data[minor] struct*/
-#define JSIOCSCONFIG 0x08 /*set the whole js_data[minor] struct
- except js_busy!*/
+/*
+ * $Id: joystick.h,v 1.2 1997/10/31 19:11:57 mj Exp $
+ *
+ * Copyright (C) 1997 Vojtech Pavlik
+ */
+
+#include <linux/ioctl.h>
+#include <asm/types.h>
/*
- * This union is used for the ioctl to set the scaling factor and to
- * return the current values for a joystick. 'buttons' is ignored on
- * the ioctl call
+ * Version
*/
-struct js_status
-{
- int buttons;
- int x;
- int y;
+#define JS_VERSION 0x00010006L /* 1.0.6 BCD */
+
+/*
+ * IOCTL commands for joystick driver
+ */
+
+#define JSIOCGVERSION _IOR('j', 0x01, __u32) /* get driver version */
+
+#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */
+#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */
+
+#define JSIOCSCORR _IOW('j', 0x21, struct js_corr[4]) /* set correction values */
+#define JSIOCGCORR _IOR('j', 0x22, struct js_corr[4]) /* get correction values */
+
+/*
+ * Types and constants for get/set correction
+ */
+
+#define JS_CORR_NONE 0x00 /* returns raw values */
+#define JS_CORR_BROKEN 0x01 /* broken line */
+
+struct js_corr {
+ __s32 coef[8];
+ __u16 prec;
+ __u16 type;
+};
+
+/*
+ * Types and constants for reading from /dev/js
+ */
+
+#define JS_EVENT_BUTTON 0x01 /* button pressed/released */
+#define JS_EVENT_AXIS 0x02 /* joystick moved */
+#define JS_EVENT_INIT 0x80 /* initial state of device */
+
+struct js_event {
+ __u32 time; /* time when event happened in miliseconds since open */
+ __u16 value; /* new value */
+ __u8 type; /* type of event, see above */
+ __u8 number; /* axis/button number */
};
/*
- * This struct is used for misc data about the joystick
+ * Backward (version 0.x) compatibility definitions
*/
-struct js_config
-{
- int js_timeout; /*timeout*/
- int busy; /*joystick is in use*/
- long js_expiretime; /*Time when stick after which stick must be re-read*/
- long js_timelimit; /*Max time before data is invalid*/
- struct js_status js_save; /*last read data*/
- struct js_status js_corr; /*correction factor*/
+#define JS_RETURN sizeof(struct JS_DATA_TYPE)
+#define JS_TRUE 1
+#define JS_FALSE 0
+#define JS_X_0 0x01 /* bit mask for x-axis js0 */
+#define JS_Y_0 0x02 /* bit mask for y-axis js0 */
+#define JS_X_1 0x04 /* bit mask for x-axis js1 */
+#define JS_Y_1 0x08 /* bit mask for y-axis js1 */
+#define JS_MAX 2 /* max number of joysticks */
+
+struct JS_DATA_TYPE {
+ int buttons; /* immediate button state */
+ int x; /* immediate x axis value */
+ int y; /* immediate y axis value */
};
-#define LATCH (1193180L/HZ) /*initial timer 0 value*/
-#define DELTA_TIME(X,Y) ((X)-(Y)+(((X)>=(Y))?0:LATCH))
-extern int joystick_init(void);
+extern int js_init(void);
#endif /* _LINUX_JOYSTICK_H */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c6f2497fd..956b0f310 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -33,6 +33,12 @@
# define ATTRIB_NORET __attribute__((noreturn))
# define NORET_AND noreturn,
+#ifdef __i386__
+#define FASTCALL(x) x __attribute__((regparm(3)))
+#else
+#define FASTCALL(x) x
+#endif
+
extern void math_error(void);
NORET_TYPE void panic(const char * fmt, ...)
__attribute__ ((NORET_AND format (printf, 1, 2)));
diff --git a/include/linux/kerneld.h b/include/linux/kerneld.h
index 5418b60d5..641f231ee 100644
--- a/include/linux/kerneld.h
+++ b/include/linux/kerneld.h
@@ -8,6 +8,7 @@
#define KERNELD_CANCEL_RELEASE_MODULE 5 /* "rmmod" */
#define KERNELD_REQUEST_ROUTE 6 /* from net/ipv4/route.c */
#define KERNELD_BLANKER 7 /* from drivers/char/console.c */
+#define KERNELD_PNP 8 /* from drivers/pnp/kerneld.c */
#define KERNELD_ARP 256 /* from net/ipv4/arp.c */
/*
diff --git a/include/linux/list.h b/include/linux/list.h
index 84a0ecef6..00b879310 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -3,7 +3,14 @@
/*
* Simple doubly linked list implementation.
+ *
+ * Some of the internal functions ("__xxx") are useful when
+ * manipulating whole lists rather than single entries, as
+ * sometimes we already know the next/prev entries and we can
+ * generate better code by using them directly rather than
+ * using the generic single-entry routines.
*/
+
struct list_head {
struct list_head *next, *prev;
};
@@ -15,24 +22,48 @@ struct list_head {
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
-static inline void list_add(struct list_head *new, struct list_head *head)
+/*
+ * Insert a new entry between two known consecutive entries.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+static inline void __list_add(struct list_head * new,
+ struct list_head * prev,
+ struct list_head * next)
{
- struct list_head *next = head->next;
next->prev = new;
new->next = next;
- new->prev = head;
- head->next = new;
+ new->prev = prev;
+ prev->next = new;
}
-static inline void list_del(struct list_head *entry)
+/*
+ * Insert a new entry after the specified head..
+ */
+static inline void list_add(struct list_head *new, struct list_head *head)
+{
+ __list_add(new, head, head->next);
+}
+
+/*
+ * Delete a list entry by making the prev/next entries
+ * point to each other.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+ */
+static inline void __list_del(struct list_head * prev, struct list_head * next)
{
- struct list_head *next, *prev;
- next = entry->next;
- prev = entry->prev;
next->prev = prev;
prev->next = next;
}
+static inline void list_del(struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+}
+
static inline int list_empty(struct list_head *head)
{
return head->next == head;
diff --git a/include/linux/locks.h b/include/linux/locks.h
index 9e32ef883..2094a4d19 100644
--- a/include/linux/locks.h
+++ b/include/linux/locks.h
@@ -26,8 +26,11 @@ extern inline void lock_buffer(struct buffer_head * bh)
__wait_on_buffer(bh);
}
-void unlock_buffer(struct buffer_head *);
-
+extern inline void unlock_buffer(struct buffer_head *bh)
+{
+ clear_bit(BH_Lock, &bh->b_state);
+ wake_up(&bh->b_wait);
+}
/*
* super-block locking. Again, interrupts may only unlock
diff --git a/include/linux/major.h b/include/linux/major.h
index 9daaad805..c561163e6 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -69,6 +69,7 @@
#define Z2RAM_MAJOR 37
#define APBLOCK_MAJOR 38 /* AP1000 Block device */
#define DDV_MAJOR 39 /* AP1000 DDV block device */
+#define NBD_MAJOR 43 /* Network block device */
#define RISCOM8_NORMAL_MAJOR 48
#define RISCOM8_CALLOUT_MAJOR 49
#define MKISS_MAJOR 55
diff --git a/include/linux/md.h b/include/linux/md.h
index 2777a7191..cb0d899e2 100644
--- a/include/linux/md.h
+++ b/include/linux/md.h
@@ -1,4 +1,3 @@
-
/*
md.h : Multiple Devices driver for Linux
Copyright (C) 1994-96 Marc ZYNGIER
@@ -19,10 +18,19 @@
#define _MD_H
#include <linux/major.h>
-#include <linux/mm.h>
#include <linux/ioctl.h>
+#include <linux/types.h>
+
+/*
+ * Different major versions are not compatible.
+ * Different minor versions are only downward compatible.
+ * Different patchlevel versions are downward and upward compatible.
+ */
+#define MD_MAJOR_VERSION 0
+#define MD_MINOR_VERSION 36
+#define MD_PATCHLEVEL_VERSION 6
-#define MD_VERSION "0.35"
+#define MD_DEFAULT_DISK_READAHEAD (256 * 1024)
/* ioctls */
#define REGISTER_DEV _IO (MD_MAJOR, 1)
@@ -42,9 +50,9 @@
#define FAULT_SHIFT 8
#define PERSONALITY_SHIFT 16
-#define FACTOR_MASK 0xFFUL
-#define FAULT_MASK 0xFF00UL
-#define PERSONALITY_MASK 0xFF0000UL
+#define FACTOR_MASK 0x000000FFUL
+#define FAULT_MASK 0x0000FF00UL
+#define PERSONALITY_MASK 0x00FF0000UL
#define MD_RESERVED 0 /* Not used by now */
#define LINEAR (1UL << PERSONALITY_SHIFT)
@@ -54,15 +62,159 @@
#define RAID5 (4UL << PERSONALITY_SHIFT)
#define MAX_PERSONALITY 5
+/*
+ * MD superblock.
+ *
+ * The MD superblock maintains some statistics on each MD configuration.
+ * Each real device in the MD set contains it near the end of the device.
+ * Some of the ideas are copied from the ext2fs implementation.
+ *
+ * We currently use 4096 bytes as follows:
+ *
+ * word offset function
+ *
+ * 0 - 31 Constant generic MD device information.
+ * 32 - 63 Generic state information.
+ * 64 - 127 Personality specific information.
+ * 128 - 511 12 32-words descriptors of the disks in the raid set.
+ * 512 - 911 Reserved.
+ * 912 - 1023 Disk specific descriptor.
+ */
+
+/*
+ * If x is the real device size in bytes, we return an apparent size of:
+ *
+ * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
+ *
+ * and place the 4kB superblock at offset y.
+ */
+#define MD_RESERVED_BYTES (64 * 1024)
+#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
+#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
+
+#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
+#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
+
+#define MD_SB_BYTES 4096
+#define MD_SB_WORDS (MD_SB_BYTES / 4)
+#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
+#define MD_SB_SECTORS (MD_SB_BYTES / 512)
+
+/*
+ * The following are counted in 32-bit words
+ */
+#define MD_SB_GENERIC_OFFSET 0
+#define MD_SB_PERSONALITY_OFFSET 64
+#define MD_SB_DISKS_OFFSET 128
+#define MD_SB_DESCRIPTOR_OFFSET 992
+
+#define MD_SB_GENERIC_CONSTANT_WORDS 32
+#define MD_SB_GENERIC_STATE_WORDS 32
+#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
+#define MD_SB_PERSONALITY_WORDS 64
+#define MD_SB_DISKS_WORDS 384
+#define MD_SB_DESCRIPTOR_WORDS 32
+#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
+#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
+#define MD_SB_DISKS (MD_SB_DISKS_WORDS / MD_SB_DESCRIPTOR_WORDS)
+
+/*
+ * Device "operational" state bits
+ */
+#define MD_FAULTY_DEVICE 0 /* Device is faulty / operational */
+#define MD_ACTIVE_DEVICE 1 /* Device is a part or the raid set / spare disk */
+#define MD_SYNC_DEVICE 2 /* Device is in sync with the raid set */
+
+typedef struct md_device_descriptor_s {
+ __u32 number; /* 0 Device number in the entire set */
+ __u32 major; /* 1 Device major number */
+ __u32 minor; /* 2 Device minor number */
+ __u32 raid_disk; /* 3 The role of the device in the raid set */
+ __u32 state; /* 4 Operational state */
+ __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
+} md_descriptor_t;
+
+#define MD_SB_MAGIC 0xa92b4efc
+
+/*
+ * Superblock state bits
+ */
+#define MD_SB_CLEAN 0
+#define MD_SB_ERRORS 1
+
+typedef struct md_superblock_s {
+
+ /*
+ * Constant generic information
+ */
+ __u32 md_magic; /* 0 MD identifier */
+ __u32 major_version; /* 1 major version to which the set conforms */
+ __u32 minor_version; /* 2 minor version to which the set conforms */
+ __u32 patch_version; /* 3 patchlevel version to which the set conforms */
+ __u32 gvalid_words; /* 4 Number of non-reserved words in this section */
+ __u32 set_magic; /* 5 Raid set identifier */
+ __u32 ctime; /* 6 Creation time */
+ __u32 level; /* 7 Raid personality (mirroring, raid5, ...) */
+ __u32 size; /* 8 Apparent size of each individual disk, in kB */
+ __u32 nr_disks; /* 9 Number of total disks in the raid set */
+ __u32 raid_disks; /* 10 Number of disks in a fully functional raid set */
+ __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 11];
+
+ /*
+ * Generic state information
+ */
+ __u32 utime; /* 0 Superblock update time */
+ __u32 state; /* 1 State bits (clean, ...) */
+ __u32 active_disks; /* 2 Number of currently active disks (some non-faulty disks might not be in sync) */
+ __u32 working_disks; /* 3 Number of working disks */
+ __u32 failed_disks; /* 4 Number of failed disks */
+ __u32 spare_disks; /* 5 Number of spare disks */
+ __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 6];
+
+ /*
+ * Personality information
+ */
+ __u32 parity_algorithm;
+ __u32 chunk_size;
+ __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 2];
+
+ /*
+ * Disks information
+ */
+ md_descriptor_t disks[MD_SB_DISKS];
+
+ /*
+ * Reserved
+ */
+ __u32 reserved[MD_SB_RESERVED_WORDS];
+
+ /*
+ * Active descriptor
+ */
+ md_descriptor_t descriptor;
+} md_superblock_t;
+
#ifdef __KERNEL__
-#include <linux/types.h>
+#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
+/*
+ * Kernel-based reconstruction is mostly working, but still requires
+ * some additional work.
+ */
+#define SUPPORT_RECONSTRUCTION 0
+
#define MAX_REAL 8 /* Max number of physical dev per md dev */
#define MAX_MD_DEV 4 /* Max number of md dev */
+#if SUPPORT_RECONSTRUCTION
+#define MAX_MD_THREADS (MAX_MD_DEV * 3) /* Max number of kernel threads */
+#else
+#define MAX_MD_THREADS (MAX_MD_DEV) /* Max number of kernel threads */
+#endif /* SUPPORT_RECONSTRUCTION */
+
#define FACTOR(a) ((a)->repartition & FACTOR_MASK)
#define MAX_FAULT(a) (((a)->repartition & FAULT_MASK)>>8)
#define PERSONALITY(a) ((a)->repartition & PERSONALITY_MASK)
@@ -76,40 +228,75 @@ struct real_dev
int offset; /* Real device offset (in blocks) in md dev
(only used in linear mode) */
struct inode *inode; /* Lock inode */
+ md_superblock_t *sb;
+ u32 sb_offset;
};
struct md_dev;
+#define SPARE_INACTIVE 0
+#define SPARE_WRITE 1
+#define SPARE_ACTIVE 2
+
struct md_personality
{
char *name;
- int (*map)(struct md_dev *md_dev, kdev_t *rdev,
- unsigned long *rsector, unsigned long size);
- int (*run)(int minor, struct md_dev *md_dev);
- int (*stop)(int minor, struct md_dev *md_dev);
- int (*status)(char *page, int minor, struct md_dev *md_dev);
+ int (*map)(struct md_dev *mddev, kdev_t *rdev,
+ unsigned long *rsector, unsigned long size);
+ int (*make_request)(struct md_dev *mddev, int rw, struct buffer_head * bh);
+ void (*end_request)(struct buffer_head * bh, int uptodate);
+ int (*run)(int minor, struct md_dev *mddev);
+ int (*stop)(int minor, struct md_dev *mddev);
+ int (*status)(char *page, int minor, struct md_dev *mddev);
int (*ioctl)(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
int max_invalid_dev;
+ int (*error_handler)(struct md_dev *mddev, kdev_t dev);
+
+/*
+ * Some personalities (RAID-1, RAID-5) can get disks hot-added and
+ * hot-removed. Hot removal is different from failure. (failure marks
+ * a disk inactive, but the disk is still part of the array)
+ */
+ int (*hot_add_disk) (struct md_dev *mddev, kdev_t dev);
+ int (*hot_remove_disk) (struct md_dev *mddev, kdev_t dev);
+ int (*mark_spare) (struct md_dev *mddev, md_descriptor_t *descriptor, int state);
};
struct md_dev
{
- struct real_dev devices[MAX_REAL];
- struct md_personality *pers;
- int repartition;
- int busy;
- int nb_dev;
- void *private;
+ struct real_dev devices[MAX_REAL];
+ struct md_personality *pers;
+ md_superblock_t *sb;
+ int sb_dirty;
+ int repartition;
+ int busy;
+ int nb_dev;
+ void *private;
};
+struct md_thread {
+ void (*run) (void *data);
+ void *data;
+ struct wait_queue *wqueue;
+ __u32 flags;
+};
+
+#define THREAD_WAKEUP 0
+
extern struct md_dev md_dev[MAX_MD_DEV];
extern int md_size[MAX_MD_DEV];
+extern int md_maxreadahead[MAX_MD_DEV];
extern char *partition_name (kdev_t dev);
extern int register_md_personality (int p_num, struct md_personality *p);
extern int unregister_md_personality (int p_num);
+extern struct md_thread *md_register_thread (void (*run) (void *data), void *data);
+extern void md_unregister_thread (struct md_thread *thread);
+extern void md_wakeup_thread(struct md_thread *thread);
+extern int md_update_sb (int minor);
+extern int md_do_sync(struct md_dev *mddev);
#endif __KERNEL__
#endif _MD_H
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index cafe21d5d..3bdb48348 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -12,6 +12,7 @@
#define RTC_MINOR 135
#define SUN_OPENPROM_MINOR 139
#define NVRAM_MINOR 144
+#define RADIO_MINOR 152
#define MISC_DYNAMIC_MINOR 255
#define SGI_GRAPHICS_MINOR 146
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 483596c29..276c27960 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -241,7 +241,7 @@ extern mem_map_t * mem_map;
*/
#define __get_free_page(priority) __get_free_pages((priority),0,0)
#define __get_dma_pages(priority, order) __get_free_pages((priority),(order),1)
-extern unsigned long __get_free_pages(int priority, unsigned long gfporder, int dma);
+extern unsigned long FASTCALL(__get_free_pages(int priority, unsigned long gfporder, int dma));
extern inline unsigned long get_free_page(int priority)
{
@@ -256,8 +256,8 @@ extern inline unsigned long get_free_page(int priority)
/* memory.c & swap.c*/
#define free_page(addr) free_pages((addr),0)
-extern void free_pages(unsigned long addr, unsigned long order);
-extern void __free_page(struct page *);
+extern void FASTCALL(free_pages(unsigned long addr, unsigned long order));
+extern void FASTCALL(__free_page(struct page *));
extern void show_free_areas(void);
extern unsigned long put_dirty_page(struct task_struct * tsk,unsigned long page,
@@ -296,6 +296,8 @@ extern unsigned long get_unmapped_area(unsigned long, unsigned long);
extern unsigned long page_unuse(unsigned long);
extern int shrink_mmap(int, int);
extern void truncate_inode_pages(struct inode *, unsigned long);
+extern unsigned long get_cached_page(struct inode *, unsigned long, int);
+extern void put_cached_page(unsigned long);
#define GFP_BUFFER 0x00
#define GFP_ATOMIC 0x01
diff --git a/include/linux/module.h b/include/linux/module.h
index 48fc78e60..483aea5dc 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -130,6 +130,9 @@ struct module_info
#define __MODULE_STRING_1(x) #x
#define __MODULE_STRING(x) __MODULE_STRING_1(x)
+/* Find a symbol exported by the kernel or another module */
+extern unsigned long get_module_symbol(char *, char *);
+
#if defined(MODULE) && !defined(__GENKSYMS__)
/* Embedded module documentation macros. */
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 08ab3506a..de0e47ab2 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -73,7 +73,9 @@
#define EOF_FAT12 0xFF8 /* standard EOF */
#define EOF_FAT16 0xFFF8
-#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 16 ? 0xFFF8 : 0xFF8)
+#define EOF_FAT32 0xFFFFFF8
+#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
+ MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
/*
* Inode flags
@@ -83,8 +85,8 @@
/*
* ioctl commands
*/
-#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, long)
-#define VFAT_IOCTL_READDIR_SHORT _IOW('r', 2, long)
+#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
+#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2])
/*
* Conversion from and to little-endian byte order. (no-op on i386/i486)
@@ -98,7 +100,7 @@
#define CT_LE_W(v) cpu_to_le16(v)
#define CT_LE_L(v) cpu_to_le32(v)
-struct msdos_boot_sector {
+struct fat_boot_sector {
__s8 ignored[3]; /* Boot strap short or near jump */
__s8 system_id[8]; /* Name - can be used to special case
partition manager volumes */
@@ -114,6 +116,24 @@ struct msdos_boot_sector {
__u16 heads; /* number of heads */
__u32 hidden; /* hidden sectors (unused) */
__u32 total_sect; /* number of sectors (if sectors == 0) */
+
+ /* The following fields are only used by FAT32 */
+ __u32 fat32_length; /* sectors/FAT */
+ __u16 flags; /* bit 8: fat mirroring, low 4: active fat */
+ __u8 version[2]; /* major, minor filesystem version */
+ __u32 root_cluster; /* first cluster in root directory */
+ __u16 info_sector; /* filesystem info sector */
+ __u16 backup_boot; /* backup boot sector */
+ __u16 reserved2[6]; /* Unused */
+};
+
+struct fat_boot_fsinfo {
+ __u32 reserved1; /* Nothing as far as I can tell */
+ __u32 signature; /* 0x61417272L */
+ __u32 free_clusters; /* Free cluster count. -1 if unknown */
+ __u32 next_cluster; /* Most recently allocated cluster.
+ * Unused under Linux. */
+ __u32 reserved2[4];
};
struct msdos_dir_entry {
@@ -124,7 +144,7 @@ struct msdos_dir_entry {
__u16 ctime; /* Creation time */
__u16 cdate; /* Creation date */
__u16 adate; /* Last access date */
- __u8 unused[2];
+ __u16 starthi; /* High 16 bits of cluster in FAT32 */
__u16 time,date,start;/* time, date and first cluster */
__u32 size; /* file size (in bytes) */
};
@@ -137,7 +157,7 @@ struct msdos_dir_slot {
__u8 reserved; /* always 0 */
__u8 alias_checksum; /* checksum for 8.3 alias */
__u8 name5_10[12]; /* 6 more characters in name */
- __u8 start[2]; /* starting cluster number */
+ __u16 start; /* starting cluster number, 0 in long slots */
__u8 name11_12[4]; /* last 2 characters in name */
};
@@ -190,6 +210,7 @@ extern int fat_scan(struct inode *dir,const char *name,struct buffer_head **res_
struct msdos_dir_entry **res_de,int *ino,char scantype);
extern int fat_parent_ino(struct inode *dir,int locked);
extern int fat_subdirs(struct inode *dir);
+void fat_clusters_flush(struct super_block *sb);
/* fat.c */
extern int fat_access(struct super_block *sb,int nr,int new_value);
@@ -227,8 +248,8 @@ extern int fat_dir_ioctl(struct inode * inode, struct file * filp,
/* file.c */
extern struct inode_operations fat_file_inode_operations;
extern struct inode_operations fat_file_inode_operations_1024;
-extern long fat_file_read(struct inode *, struct file *, char *, unsigned long);
-extern long fat_file_write(struct inode *, struct file *, const char *, unsigned long);
+extern ssize_t fat_file_read(struct file *, char *, size_t, loff_t *);
+extern ssize_t fat_file_write(struct file *, const char *, size_t, loff_t *);
extern void fat_truncate(struct inode *inode);
/* mmap.c */
@@ -257,12 +278,30 @@ extern int msdos_unlink_umsdos(struct inode *dir,struct dentry *dentry);
extern int msdos_rename(struct inode *old_dir,struct dentry *old_dentry,
struct inode *new_dir,struct dentry *new_dentry);
+/* nls.c */
+extern int init_fat_nls(void);
+extern struct fat_nls_table *fat_load_nls(int codepage);
+
+/* tables.c */
+extern unsigned char fat_uni2esc[];
+extern unsigned char fat_esc2uni[];
+
/* fatfs_syms.c */
extern int init_fat_fs(void);
+extern void cleanup_fat_fs(void);
+
+/* nls.c */
+extern int fat_register_nls(struct fat_nls_table * fmt);
+extern int fat_unregister_nls(struct fat_nls_table * fmt);
+extern struct fat_nls_table *fat_find_nls(int codepage);
+extern struct fat_nls_table *fat_load_nls(int codepage);
+extern void fat_unload_nls(int codepage);
+extern int init_fat_nls(void);
/* vfat/namei.c - these are for dmsdos */
extern int vfat_create(struct inode *dir,struct dentry *dentry,int mode);
extern int vfat_unlink(struct inode *dir,struct dentry *dentry);
+extern int vfat_unlink_uvfat(struct inode *dir,struct dentry *dentry);
extern int vfat_mkdir(struct inode *dir,struct dentry *dentry,int mode);
extern int vfat_rmdir(struct inode *dir,struct dentry *dentry);
extern int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
@@ -273,6 +312,9 @@ extern struct super_block *vfat_read_super(struct super_block *sb,void *data,
extern void vfat_read_inode(struct inode *inode);
extern int vfat_lookup(struct inode *dir,struct dentry *);
+/* vfat/vfatfs_syms.c */
+extern struct file_system_type vfat_fs_type;
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/msdos_fs_i.h b/include/linux/msdos_fs_i.h
index cc9d9ac85..530930e53 100644
--- a/include/linux/msdos_fs_i.h
+++ b/include/linux/msdos_fs_i.h
@@ -26,6 +26,7 @@ struct msdos_inode_info {
*/
struct pipe_inode_info reserved;
int i_start; /* first cluster or 0 */
+ int i_logstart; /* logical first cluster */
int i_attrs; /* unused attribute bits */
int i_busy; /* file is either deleted but still open, or
inconsistent (mkdir) */
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 4cc224838..fe584a85b 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -9,6 +9,8 @@ struct fat_mount_options {
uid_t fs_uid;
gid_t fs_gid;
unsigned short fs_umask;
+ unsigned short codepage; /* Codepage for shortname conversions */
+ char *iocharset; /* Charset used for filename input/display */
unsigned char name_check; /* r = relaxed, n = normal, s = strict */
unsigned char conversion; /* b = binary, t = text, a = auto */
unsigned quiet:1, /* set = fake successful chmods and chowns */
@@ -16,12 +18,18 @@ struct fat_mount_options {
sys_immutable:1, /* set = system files are immutable */
dotsOK:1, /* set = hidden and system files are named '.filename' */
isvfat:1, /* 0=no vfat long filename support, 1=vfat support */
+ utf8:1, /* Use of UTF8 character set (Default) */
unicode_xlate:1, /* create escape sequences for unhandled Unicode */
posixfs:1, /* Allow names like makefile and Makefile to coexist */
numtail:1, /* Does first alias have a numeric '~1' type tail? */
- atari:1; /* Use Atari GEMDOS variation of MS-DOS fs */
+ atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */
+ fat32:1; /* Is this a FAT32 partition? */
};
+struct vfat_unicode {
+ unsigned char uni1;
+ unsigned char uni2;
+};
struct msdos_sb_info {
unsigned short cluster_size; /* sectors/cluster */
@@ -30,11 +38,15 @@ struct msdos_sb_info {
unsigned short dir_start,dir_entries; /* root dir start & entries */
unsigned short data_start; /* first data sector */
unsigned long clusters; /* number of clusters */
+ unsigned long root_cluster; /* first cluster of the root directory */
+ unsigned long fsinfo_offset; /* FAT32 fsinfo offset from start of disk */
struct wait_queue *fat_wait;
int fat_lock;
int prev_free; /* previously returned free cluster number */
int free_clusters; /* -1 if undefined */
struct fat_mount_options options;
+ struct nls_table *nls_disk; /* Codepage used on disk */
+ struct nls_table *nls_io; /* Charset used for input and display */
};
#endif
diff --git a/include/linux/mtio.h b/include/linux/mtio.h
index d2c4d70e8..b91b74164 100644
--- a/include/linux/mtio.h
+++ b/include/linux/mtio.h
@@ -1,11 +1,16 @@
/*
* linux/mtio.h header file for Linux. Written by H. Bergman
+ *
+ * Modified for special ioctls provided by zftape in September 1997
+ * by C.-J. Heine.
*/
#ifndef _LINUX_MTIO_H
#define _LINUX_MTIO_H
+#include <linux/types.h>
#include <linux/ioctl.h>
+#include <linux/qic117.h>
/*
* Structures and definitions for mag tape io control commands
@@ -104,7 +109,7 @@ struct mtget {
#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */
/* QIC-40/80/3010/3020 ftape supported drives.
- * 20bit vendor ID + 0x800000 (see vendors.h in ftape distribution)
+ * 20bit vendor ID + 0x800000 (see ftape-vendors.h)
*/
#define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */
#define MT_ISFTAPE_FLAG 0x800000
@@ -170,6 +175,109 @@ struct mtconfiginfo {
char reserved[10];
};
+/* structure for MTIOCVOLINFO, query information about the volume
+ * currently positioned at (zftape)
+ */
+struct mtvolinfo {
+ unsigned int mt_volno; /* vol-number */
+ unsigned int mt_blksz; /* blocksize used when recording */
+ unsigned int mt_rawsize; /* raw tape space consumed, in kb */
+ unsigned int mt_size; /* volume size after decompression, in kb */
+ unsigned int mt_cmpr:1; /* this volume has been compressed */
+};
+
+/* raw access to a floppy drive, read and write an arbitrary segment.
+ * For ftape/zftape to support formatting etc.
+ */
+#define MT_FT_RD_SINGLE 0
+#define MT_FT_RD_AHEAD 1
+#define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */
+#define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */
+#define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */
+#define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */
+
+struct mtftseg
+{
+ unsigned mt_segno; /* the segment to read or write */
+ unsigned mt_mode; /* modes for read/write (sync/async etc.) */
+ int mt_result; /* result of r/w request, not of the ioctl */
+ void *mt_data; /* User space buffer: must be 29kb */
+};
+
+/* get tape capacity (ftape/zftape)
+ */
+struct mttapesize {
+ unsigned long mt_capacity; /* entire, uncompressed capacity
+ * of a cartridge
+ */
+ unsigned long mt_used; /* what has been used so far, raw
+ * uncompressed amount
+ */
+};
+
+/* possible values of the ftfmt_op field
+ */
+#define FTFMT_SET_PARMS 1 /* set software parms */
+#define FTFMT_GET_PARMS 2 /* get software parms */
+#define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */
+#define FTFMT_STATUS 4 /* monitor formatting a tape track */
+#define FTFMT_VERIFY 5 /* verify the given segment */
+
+struct ftfmtparms {
+ unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
+ unsigned char ft_fmtcode; /* Refer to the QIC specs */
+ unsigned char ft_fhm; /* floppy head max */
+ unsigned char ft_ftm; /* floppy track max */
+ unsigned short ft_spt; /* segments per track */
+ unsigned short ft_tpc; /* tracks per cartridge */
+};
+
+struct ftfmttrack {
+ unsigned int ft_track; /* track to format */
+ unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */
+};
+
+struct ftfmtstatus {
+ unsigned int ft_segment; /* segment currently being formatted */
+};
+
+struct ftfmtverify {
+ unsigned int ft_segment; /* segment to verify */
+ unsigned long ft_bsm; /* bsm as result of VERIFY cmd */
+};
+
+struct mtftformat {
+ unsigned int fmt_op; /* operation to perform */
+ union fmt_arg {
+ struct ftfmtparms fmt_parms; /* format parameters */
+ struct ftfmttrack fmt_track; /* ctrl while formatting */
+ struct ftfmtstatus fmt_status;
+ struct ftfmtverify fmt_verify; /* for verifying */
+ } fmt_arg;
+};
+
+struct mtftcmd {
+ unsigned int ft_wait_before; /* timeout to wait for drive to get ready
+ * before command is sent. Milliseconds
+ */
+ qic117_cmd_t ft_cmd; /* command to send */
+ unsigned char ft_parm_cnt; /* zero: no parm is sent. */
+ unsigned char ft_parms[3]; /* parameter(s) to send to
+ * the drive. The parms are nibbles
+ * driver sends cmd + 2 step pulses */
+ unsigned int ft_result_bits; /* if non zero, number of bits
+ * returned by the tape drive
+ */
+ unsigned int ft_result; /* the result returned by the tape drive*/
+ unsigned int ft_wait_after; /* timeout to wait for drive to get ready
+ * after command is sent. 0: don't wait */
+ int ft_status; /* status returned by ready wait
+ * undefined if timeout was 0.
+ */
+ int ft_error; /* error code if error status was set by
+ * command
+ */
+};
/* mag tape io control commands */
#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
@@ -182,6 +290,16 @@ struct mtconfiginfo {
#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */
#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */
+/* the next six are used by the floppy ftape drivers and its frontends
+ * sorry, but MTIOCTOP commands are write only.
+ */
+#define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */
+#define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */
+#define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */
+#define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/
+#define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */
+#define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */
+
/* Generic Mag Tape (device independent) status macros for examining
* mt_gstat -- HP-UX compatible.
* There is room for more generic status bits here, but I don't
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
new file mode 100644
index 000000000..d2d613c50
--- /dev/null
+++ b/include/linux/nbd.h
@@ -0,0 +1,74 @@
+#ifndef LINUX_NBD_H
+#define LINUX_NBD_H
+
+#include <linux/ioctl.h>
+#include <asm/types.h>
+
+#define NBD_SET_SOCK _IO( 0xab, 0 )
+#define NBD_SET_BLKSIZE _IO( 0xab, 1 )
+#define NBD_SET_SIZE _IO( 0xab, 2 )
+#define NBD_DO_IT _IO( 0xab, 3 )
+#define NBD_CLEAR_SOCK _IO( 0xab, 4 )
+#define NBD_CLEAR_QUE _IO( 0xab, 5 )
+#define NBD_PRINT_DEBUG _IO( 0xab, 6 )
+
+#ifdef MAJOR_NR
+
+#include <linux/locks.h>
+
+#define LOCAL_END_REQUEST
+
+#include <linux/blk.h>
+
+#ifdef PARANOIA
+extern int requests_in;
+extern int requests_out;
+#endif
+
+static void
+nbd_end_request(struct request *req)
+{
+#ifdef PARANOIA
+ requests_out++;
+#endif
+ if (end_that_request_first( req, !req->errors, "nbd" ))
+ return;
+ end_that_request_last( req );
+}
+
+#define MAX_NBD 128
+#endif
+
+struct nbd_device {
+ int refcnt;
+ int flags;
+ int harderror; /* Code of hard error */
+#define NBD_READ_ONLY 0x0001
+#define NBD_WRITE_NOCHK 0x0002
+ struct socket * sock;
+ struct file * file; /* If == NULL, device is not ready, yet */
+ int magic; /* FIXME: not if debugging is off */
+ struct request *head; /* Requests are added here... */
+ struct request *tail;
+};
+
+/* This now IS in some kind of include file... */
+
+#define NBD_REQUEST_MAGIC 0x12560953
+#define NBD_REPLY_MAGIC 0x96744668
+#define LO_MAGIC 0x68797548
+
+struct nbd_request {
+ __u32 magic;
+ __u32 from;
+ __u32 len;
+ char handle[8];
+ __u32 type; /* == READ || == WRITE */
+};
+
+struct nbd_reply {
+ __u32 magic;
+ char handle[8]; /* handle you got from request */
+ __u32 error; /* 0 = ok, else error */
+};
+#endif
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 7fb97f9d5..7b09f94a9 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -55,6 +55,20 @@ struct ncp_fs_info {
#ifdef __KERNEL__
+#undef NCPFS_PARANOIA
+#define DEBUG_NCP 0
+#if DEBUG_NCP > 0
+#define DPRINTK(format, args...) printk(format , ## args)
+#else
+#define DPRINTK(format, args...)
+#endif
+
+#if DEBUG_NCP > 1
+#define DDPRINTK(format, args...) printk(format , ## args)
+#else
+#define DDPRINTK(format, args...)
+#endif
+
/* The readdir cache size controls how many directory entries are
* cached.
*/
@@ -62,16 +76,40 @@ struct ncp_fs_info {
#define NCP_MAX_RPC_TIMEOUT (6*HZ)
+/*
+ * This is the ncpfs part of the inode structure. This must contain
+ * all the information we need to work with an inode after creation.
+ * (Move to ncp_fs_i.h once it stabilizes, and add a union in fs.h)
+ */
+struct ncpfs_i {
+ __u32 dirEntNum __attribute__((packed));
+ __u32 DosDirNum __attribute__((packed));
+ __u32 volNumber __attribute__((packed));
+ int opened;
+ int access;
+ __u32 server_file_handle __attribute__((packed));
+ __u8 open_create_action __attribute__((packed));
+ __u8 file_handle[6] __attribute__((packed));
+};
+
+/*
+ * This is an extension of the nw_file_info structure with
+ * the additional information we need to create an inode.
+ */
+struct ncpfs_inode_info {
+ ino_t ino; /* dummy inode number */
+ struct nw_file_info nw_info;
+};
+
/* Guess, what 0x564c is :-) */
#define NCP_SUPER_MAGIC 0x564c
#define NCP_SBP(sb) ((struct ncp_server *)((sb)->u.generic_sbp))
-#define NCP_INOP(inode) ((struct ncp_inode_info *)((inode)->u.generic_ip))
#define NCP_SERVER(inode) NCP_SBP((inode)->i_sb)
-#define NCP_FINFO(inode) (&(NCP_INOP(inode)->finfo))
-#define NCP_ISTRUCT(inode) (&(NCP_FINFO(inode)->i))
+/* We don't have an ncpfs union yet, so use smbfs ... */
+#define NCP_FINFO(inode) ((struct ncpfs_i *)&((inode)->u.smbfs_i))
#ifdef DEBUG_NCP_MALLOC
@@ -101,46 +139,23 @@ static inline void ncp_kfree_s(void *obj, int size)
#endif /* DEBUG_NCP_MALLOC */
-#if DEBUG_NCP > 0
-#define DPRINTK(format, args...) printk(format , ## args)
-#else
-#define DPRINTK(format, args...)
-#endif
-
-#if DEBUG_NCP > 1
-#define DDPRINTK(format, args...) printk(format , ## args)
-#else
-#define DDPRINTK(format, args...)
-#endif
-
-
-/* linux/fs/ncpfs/file.c */
-extern struct inode_operations ncp_file_inode_operations;
-int ncp_make_open(struct inode *i, int right);
+/* linux/fs/ncpfs/inode.c */
+struct super_block *ncp_read_super(struct super_block *, void *, int);
+struct inode *ncp_iget(struct super_block *, struct ncpfs_inode_info *);
+void ncp_update_inode(struct inode *, struct nw_file_info *);
+extern int init_ncp_fs(void);
/* linux/fs/ncpfs/dir.c */
extern struct inode_operations ncp_dir_inode_operations;
-void ncp_free_inode_info(struct ncp_inode_info *i);
-void ncp_free_all_inodes(struct ncp_server *server);
-void ncp_init_root(struct ncp_server *server);
-int ncp_conn_logged_in(struct ncp_server *server);
+int ncp_conn_logged_in(struct ncp_server *);
void ncp_init_dir_cache(void);
-void ncp_invalid_dir_cache(struct inode *ino);
-struct ncp_inode_info *ncp_find_inode(struct inode *inode);
-ino_t ncp_info_ino(struct ncp_server *server, struct ncp_inode_info *info);
+void ncp_invalid_dir_cache(struct inode *);
void ncp_free_dir_cache(void);
int ncp_date_dos2unix(__u16 time, __u16 date);
void ncp_date_unix2dos(int unix_date, __u16 * time, __u16 * date);
-
/* linux/fs/ncpfs/ioctl.c */
-int ncp_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg);
-
-/* linux/fs/ncpfs/inode.c */
-struct super_block *ncp_read_super(struct super_block *sb,
- void *raw_data, int silent);
-extern int init_ncp_fs(void);
+int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
/* linux/fs/ncpfs/sock.c */
int ncp_request(struct ncp_server *server, int function);
@@ -149,8 +164,51 @@ int ncp_disconnect(struct ncp_server *server);
void ncp_lock_server(struct ncp_server *server);
void ncp_unlock_server(struct ncp_server *server);
+/* linux/fs/ncpfs/file.c */
+extern struct inode_operations ncp_file_inode_operations;
+int ncp_make_open(struct inode *, int);
+
/* linux/fs/ncpfs/mmap.c */
-int ncp_mmap(struct file *file, struct vm_area_struct *vma);
+int ncp_mmap(struct file *, struct vm_area_struct *);
+
+/* linux/fs/ncpfs/ncplib_kernel.c */
+int ncp_make_closed(struct inode *);
+
+static inline void str_upper(char *name)
+{
+ while (*name) {
+ if (*name >= 'a' && *name <= 'z') {
+ *name -= ('a' - 'A');
+ }
+ name++;
+ }
+}
+
+static inline void str_lower(char *name)
+{
+ while (*name) {
+ if (*name >= 'A' && *name <= 'Z') {
+ *name += ('a' - 'A');
+ }
+ name++;
+ }
+}
+
+static inline int ncp_namespace(struct inode *inode)
+{
+ struct ncp_server *server = NCP_SERVER(inode);
+ return server->name_space[NCP_FINFO(inode)->volNumber];
+}
+
+static inline int ncp_preserve_case(struct inode *i)
+{
+ return (ncp_namespace(i) == NW_NS_OS2);
+}
+
+static inline int ncp_case_sensitive(struct inode *i)
+{
+ return 0;
+}
#endif /* __KERNEL__ */
diff --git a/include/linux/nfs.h b/include/linux/nfs.h
index ea58d7b81..c8ea8ffdf 100644
--- a/include/linux/nfs.h
+++ b/include/linux/nfs.h
@@ -129,14 +129,6 @@ struct nfs_sattr {
struct nfs_time mtime;
};
-struct nfs_entry {
- __u32 fileid;
- char * name;
- unsigned int length:31,
- eof:1;
- __u32 cookie;
-};
-
struct nfs_fsinfo {
__u32 tsize;
__u32 bsize;
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 9591046ca..e233695c0 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -125,7 +125,7 @@ extern int nfs_proc_mkdir(struct nfs_server *server, struct nfs_fh *dir,
extern int nfs_proc_rmdir(struct nfs_server *server, struct nfs_fh *dir,
const char *name);
extern int nfs_proc_readdir(struct nfs_server *server, struct nfs_fh *fhandle,
- u32 cookie, unsigned int size, struct nfs_entry *entry);
+ u32 cookie, unsigned int size, __u32 *entry);
extern int nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *res);
@@ -133,12 +133,11 @@ extern int nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
/*
* linux/fs/nfs/inode.c
*/
-extern struct super_block *nfs_read_super(struct super_block *sb,
- void *data,int);
+extern struct super_block *nfs_read_super(struct super_block *, void *, int);
extern int init_nfs_fs(void);
-extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
- struct nfs_fattr *fattr);
-extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr);
+extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *,
+ struct nfs_fattr *);
+extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
extern int nfs_revalidate(struct inode *);
extern int _nfs_revalidate_inode(struct nfs_server *, struct inode *);
@@ -151,9 +150,9 @@ extern struct inode_operations nfs_file_inode_operations;
* linux/fs/nfs/dir.c
*/
extern struct inode_operations nfs_dir_inode_operations;
-extern void nfs_sillyrename_cleanup(struct inode *);
extern void nfs_free_dircache(void);
extern void nfs_invalidate_dircache(struct inode *);
+extern void nfs_invalidate_dircache_sb(struct super_block *);
/*
* linux/fs/nfs/symlink.c
@@ -161,12 +160,6 @@ extern void nfs_invalidate_dircache(struct inode *);
extern struct inode_operations nfs_symlink_inode_operations;
/*
- * linux/fs/nfs/mmap.c
- */
-extern int nfs_mmap(struct inode *inode, struct file *file,
- struct vm_area_struct * vma);
-
-/*
* linux/fs/nfs/locks.c
*/
extern int nfs_lock(struct file *file, int cmd, struct file_lock *fl);
@@ -176,7 +169,7 @@ extern int nfs_lock(struct file *file, int cmd, struct file_lock *fl);
*/
extern int nfs_writepage(struct inode *, struct page *);
extern int nfs_check_error(struct inode *);
-extern int nfs_flush_dirty_pages(struct inode *, off_t, off_t);
+extern int nfs_flush_dirty_pages(struct inode *, pid_t, off_t, off_t);
extern int nfs_truncate_dirty_pages(struct inode *, unsigned long);
extern void nfs_invalidate_pages(struct inode *);
extern int nfs_updatepage(struct inode *, struct page *, const char *,
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 4d089f946..f0577b05d 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -27,12 +27,12 @@
* ino/dev of the exported inode.
*/
struct nfs_fhbase {
- struct dentry *fb_dentry;
- struct dentry *fb_dparent;
- unsigned int fb_dhash;
- unsigned int fb_dlen;
- ino_t fb_xino;
+ struct dentry * fb_dentry; /* dentry cookie */
+ ino_t fb_ino; /* our inode number */
+ ino_t fb_dirino; /* dir inode number */
+ dev_t fb_dev; /* our device */
dev_t fb_xdev;
+ ino_t fb_xino;
};
#define NFS_FH_PADDING (NFS_FHSIZE - sizeof(struct nfs_fhbase))
@@ -41,13 +41,12 @@ struct knfs_fh {
__u8 fh_cookie[NFS_FH_PADDING];
};
-#define fh_dentry fh_base.fb_dentry
-#define fh_dparent fh_base.fb_dparent
-#define fh_dhash fh_base.fb_dhash
-#define fh_dlen fh_base.fb_dlen
-#define fh_xino fh_base.fb_xino
+#define fh_dcookie fh_base.fb_dentry
+#define fh_ino fh_base.fb_ino
+#define fh_dirino fh_base.fb_dirino
+#define fh_dev fh_base.fb_dev
#define fh_xdev fh_base.fb_xdev
-
+#define fh_xino fh_base.fb_xino
#ifdef __KERNEL__
@@ -57,6 +56,7 @@ struct knfs_fh {
*/
typedef struct svc_fh {
struct knfs_fh fh_handle; /* FH data */
+ struct dentry * fh_dentry; /* validated dentry */
struct svc_export * fh_export; /* export pointer */
size_t fh_pre_size; /* size before operation */
time_t fh_pre_mtime; /* mtime before oper */
@@ -69,17 +69,28 @@ typedef struct svc_fh {
/*
* Shorthand for dprintk()'s
*/
-#define SVCFH_DENTRY(f) ((f)->fh_handle.fh_dentry)
+#define SVCFH_DENTRY(f) ((f)->fh_dentry)
/*
* Function prototypes
*/
-u32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
-void fh_compose(struct svc_fh *, struct svc_export *, struct dentry *);
+u32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
+void fh_compose(struct svc_fh *, struct svc_export *, struct dentry *);
+void fh_update(struct svc_fh *);
+void fh_put(struct svc_fh *);
+void nfsd_fh_flush(dev_t);
+void nfsd_fh_init(void);
+void nfsd_fh_free(void);
static __inline__ struct svc_fh *
fh_copy(struct svc_fh *dst, struct svc_fh *src)
{
+ if (src->fh_dverified) {
+ struct dentry *dentry = src->fh_dentry;
+ printk("fh_copy: copying %s/%s, already verified!\n",
+ dentry->d_parent->d_name.name, dentry->d_name.name);
+ }
+
*dst = *src;
return dst;
}
@@ -97,7 +108,7 @@ fh_init(struct svc_fh *fhp)
static inline void
fh_lock(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_handle.fh_dentry->d_inode;
+ struct inode *inode = fhp->fh_dentry->d_inode;
/*
dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n",
@@ -117,7 +128,7 @@ fh_lock(struct svc_fh *fhp)
static inline void
fh_unlock(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_handle.fh_dentry->d_inode;
+ struct inode *inode = fhp->fh_dentry->d_inode;
if (fhp->fh_locked) {
if (!fhp->fh_post_version)
@@ -130,17 +141,7 @@ fh_unlock(struct svc_fh *fhp)
/*
* Release an inode
*/
-#ifndef NFSD_DEBUG
-static inline void
-fh_put(struct svc_fh *fhp)
-{
- if (fhp->fh_dverified) {
- fh_unlock(fhp);
- dput(fhp->fh_handle.fh_dentry);
- fhp->fh_dverified = 0;
- }
-}
-#else
+#if 0
#define fh_put(fhp) __fh_put(fhp, __FILE__, __LINE__)
static inline void
@@ -151,7 +152,7 @@ __fh_put(struct svc_fh *fhp, char *file, int line)
if (!fhp->fh_dverified)
return;
- dentry = fhp->fh_handle.fh_dentry;
+ dentry = fhp->fh_dentry;
if (!dentry->d_count) {
printk("nfsd: trying to free free dentry in %s:%d\n"
" file %s/%s\n",
@@ -159,14 +160,12 @@ __fh_put(struct svc_fh *fhp, char *file, int line)
dentry->d_parent->d_name.name, dentry->d_name.name);
} else {
fh_unlock(fhp);
- dput(dentry);
fhp->fh_dverified = 0;
+ dput(dentry);
}
}
#endif
-
-
#endif /* __KERNEL__ */
#endif /* NFSD_FH_H */
diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h
index ab4bd68c0..4ce3f06cd 100644
--- a/include/linux/nfsd/stats.h
+++ b/include/linux/nfsd/stats.h
@@ -13,6 +13,11 @@ struct nfsd_stats {
unsigned int rchits; /* repcache hits */
unsigned int rcmisses; /* repcache hits */
unsigned int rcnocache; /* uncached reqs */
+ unsigned int fh_cached; /* dentry cached */
+ unsigned int fh_valid; /* dentry validated */
+ unsigned int fh_fixup; /* dentry fixup validated */
+ unsigned int fh_lookup; /* new lookup required */
+ unsigned int fh_stale; /* FH stale error */
};
#ifdef __KERNEL__
diff --git a/include/linux/nls.h b/include/linux/nls.h
new file mode 100644
index 000000000..73f83633d
--- /dev/null
+++ b/include/linux/nls.h
@@ -0,0 +1,54 @@
+struct nls_unicode {
+ unsigned char uni1;
+ unsigned char uni2;
+};
+
+struct nls_table {
+ char *charset;
+ unsigned char **page_uni2charset;
+ struct nls_unicode *charset2uni;
+
+ void (*inc_use_count) (void);
+ void (*dec_use_count) (void);
+ struct nls_table *next;
+};
+
+/* nls.c */
+extern int init_nls(void);
+extern int register_nls(struct nls_table *);
+extern int unregister_nls(struct nls_table *);
+extern struct nls_table *find_nls(char *);
+extern struct nls_table *load_nls(char *);
+extern void unload_nls(struct nls_table *);
+extern struct nls_table *load_nls_default(void);
+
+extern int utf8_mbtowc(__u16 *, const __u8 *, int);
+extern int utf8_mbstowcs(__u16 *, const __u8 *, int);
+extern int utf8_wctomb(__u8 *, __u16, int);
+extern int utf8_wcstombs(__u8 *, const __u16 *, int);
+
+extern int init_nls_iso8859_1(void);
+extern int init_nls_iso8859_2(void);
+extern int init_nls_iso8859_3(void);
+extern int init_nls_iso8859_4(void);
+extern int init_nls_iso8859_5(void);
+extern int init_nls_iso8859_6(void);
+extern int init_nls_iso8859_7(void);
+extern int init_nls_iso8859_8(void);
+extern int init_nls_iso8859_9(void);
+extern int init_nls_cp437(void);
+extern int init_nls_cp737(void);
+extern int init_nls_cp775(void);
+extern int init_nls_cp850(void);
+extern int init_nls_cp852(void);
+extern int init_nls_cp855(void);
+extern int init_nls_cp857(void);
+extern int init_nls_cp860(void);
+extern int init_nls_cp861(void);
+extern int init_nls_cp862(void);
+extern int init_nls_cp863(void);
+extern int init_nls_cp864(void);
+extern int init_nls_cp865(void);
+extern int init_nls_cp866(void);
+extern int init_nls_cp869(void);
+extern int init_nls_cp874(void);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b370041ba..b1f401847 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -221,10 +221,15 @@
*/
#define PCI_VENDOR_ID_COMPAQ 0x0e11
#define PCI_DEVICE_ID_COMPAQ_1280 0x3033
-#define PCI_DEVICE_ID_COMPAQ_NETELL100 0xae32
-#define PCI_DEVICE_ID_COMPAQ_NETELL10 0xae34
-#define PCI_DEVICE_ID_COMPAQ_NETFLEX3 0xae35
+#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10
+#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32
+#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35
+#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40
+#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43
+#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011
#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150
#define PCI_VENDOR_ID_NCR 0x1000
#define PCI_DEVICE_ID_NCR_53C810 0x0001
@@ -241,7 +246,9 @@
#define PCI_DEVICE_ID_ATI_68800 0x4158
#define PCI_DEVICE_ID_ATI_215CT222 0x4354
#define PCI_DEVICE_ID_ATI_210888CX 0x4358
+#define PCI_DEVICE_ID_ATI_215GP 0x4750
#define PCI_DEVICE_ID_ATI_215GT 0x4754
+#define PCI_DEVICE_ID_ATI_215GTB 0x4755
#define PCI_DEVICE_ID_ATI_210888GX 0x4758
#define PCI_DEVICE_ID_ATI_264VT 0x5654
@@ -334,6 +341,8 @@
#define PCI_VENDOR_ID_MIRO 0x1031
#define PCI_DEVICE_ID_MIRO_36050 0x5601
+#define PCI_VENDOR_ID_NEC 0x1033
+
#define PCI_VENDOR_ID_FD 0x1036
#define PCI_DEVICE_ID_FD_36C70 0x0000
@@ -395,13 +404,9 @@
#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
#define PCI_VENDOR_ID_PROMISE 0x105a
+#define PCI_DEVICE_ID_PROMISE_IDE_UDMA 0x4d33
#define PCI_DEVICE_ID_PROMISE_5300 0x5300
-#define PCI_VENDOR_ID_APPLE 0x106b
-#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
-#define PCI_DEVICE_ID_APPLE_GC 0x0002
-#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
-
#define PCI_VENDOR_ID_N9 0x105d
#define PCI_DEVICE_ID_N9_I128 0x2309
#define PCI_DEVICE_ID_N9_I128_2 0x2339
@@ -420,6 +425,14 @@
#define PCI_VENDOR_ID_X 0x1061
#define PCI_DEVICE_ID_X_AGX016 0x0001
+#define PCI_VENDOR_ID_PICOP 0x1066
+#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001
+
+#define PCI_VENDOR_ID_APPLE 0x106b
+#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
+#define PCI_DEVICE_ID_APPLE_GC 0x0002
+#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
+
#define PCI_VENDOR_ID_NEXGEN 0x1074
#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78
@@ -459,7 +472,7 @@
#define PCI_DEVICE_ID_VISION_QD8580 0x0002
#define PCI_VENDOR_ID_BROOKTREE 0x109e
-#define PCI_DEVICE_ID_BT848 0x0350 /* 0x350 = 848 */
+#define PCI_DEVICE_ID_BROOKTREE_848 0x0350
#define PCI_VENDOR_ID_SIERRA 0x10a8
#define PCI_DEVICE_ID_SIERRA_STB 0x0000
@@ -485,6 +498,7 @@
#define PCI_DEVICE_ID_3COM_3C905TX 0x9050
#define PCI_VENDOR_ID_SMC 0x10b8
+#define PCI_DEVICE_ID_SMC_EPIC100 0x0005
#define PCI_VENDOR_ID_AL 0x10b9
#define PCI_DEVICE_ID_AL_M1445 0x1445
@@ -494,13 +508,20 @@
#define PCI_DEVICE_ID_AL_M1489 0x1489
#define PCI_DEVICE_ID_AL_M1511 0x1511
#define PCI_DEVICE_ID_AL_M1513 0x1513
+#define PCI_DEVICE_ID_AL_M1521 0x1521
+#define PCI_DEVICE_ID_AL_M1523 0x1523
+#define PCI_DEVICE_ID_AL_M1531 0x1531
+#define PCI_DEVICE_ID_AL_M1533 0x1533
#define PCI_DEVICE_ID_AL_M4803 0x5215
+#define PCI_DEVICE_ID_AL_M5219 0x5219
+#define PCI_DEVICE_ID_AL_M5229 0x5229
#define PCI_VENDOR_ID_MITSUBISHI 0x10ba
#define PCI_VENDOR_ID_NEOMAGIC 0x10c8
#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001
#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002
+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003
#define PCI_VENDOR_ID_ASP 0x10cd
#define PCI_DEVICE_ID_ASP_ABP940 0x1200
@@ -543,9 +564,13 @@
#define PCI_DEVICE_ID_VIA_82C586_1 0x0571
#define PCI_DEVICE_ID_VIA_82C576 0x0576
#define PCI_DEVICE_ID_VIA_82C585 0x0585
-#define PCI_DEVICE_ID_VIA_82C586 0x0586
+#define PCI_DEVICE_ID_VIA_82C586_0 0x0586
+#define PCI_DEVICE_ID_VIA_82C595 0x0595
#define PCI_DEVICE_ID_VIA_82C926 0x0926
#define PCI_DEVICE_ID_VIA_82C416 0x1571
+#define PCI_DEVICE_ID_VIA_82C595_97 0x1595
+#define PCI_DEVICE_ID_VIA_82C586_2 0x3038
+#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
#define PCI_VENDOR_ID_VORTEX 0x1119
#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000
@@ -562,6 +587,24 @@
#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b
#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c
#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d
+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100
+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101
+#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102
+#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103
+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104
+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105
+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110
+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111
+#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112
+#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113
+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114
+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115
+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120
+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121
+#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122
+#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123
+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124
+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125
#define PCI_VENDOR_ID_EF 0x111a
#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000
@@ -583,6 +626,7 @@
#define PCI_VENDOR_ID_ALLIANCE 0x1142
#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210
#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422
+#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424
#define PCI_VENDOR_ID_VMIC 0x114a
#define PCI_DEVICE_ID_VMIC_VME 0x7587
@@ -628,6 +672,7 @@
#define PCI_DEVICE_ID_ZORAN_36120 0x6120
#define PCI_VENDOR_ID_COMPEX 0x11f6
+#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401
#define PCI_VENDOR_ID_RP 0x11fe
@@ -655,6 +700,15 @@
#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120
#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130
+#define PCI_VENDOR_ID_ENSONIQ 0x1274
+#define PCI_DEVICE_ID_ENSONIQ_AUDIOPCI 0x5000
+
+#define PCI_VENDOR_ID_PICTUREL 0x12c5
+#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081
+
+#define PCI_VENDOR_ID_NVIDIA 0x12d2
+#define PCI_DEVICE_ID_NVIDIA_RIVA128 0x0018
+
#define PCI_VENDOR_ID_SYMPHONY 0x1c1c
#define PCI_DEVICE_ID_SYMPHONY_101 0x0001
@@ -671,7 +725,11 @@
#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064
#define PCI_DEVICE_ID_AVANCE_2302 0x2302
+#define PCI_VENDOR_ID_NETVIN 0x4a14
+#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000
+
#define PCI_VENDOR_ID_S3 0x5333
+#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551
#define PCI_DEVICE_ID_S3_ViRGE 0x5631
#define PCI_DEVICE_ID_S3_TRIO 0x8811
#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812
@@ -687,6 +745,7 @@
#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901
#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902
#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01
+#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10
#define PCI_VENDOR_ID_INTEL 0x8086
#define PCI_DEVICE_ID_INTEL_82375 0x0482
@@ -717,7 +776,7 @@
#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
#define PCI_DEVICE_ID_INTEL_P6 0x84c4
-#define PCI_DEVICE_ID_INTEL_P6_2 0x84c5
+#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
#define PCI_VENDOR_ID_KTI 0x8e2e
#define PCI_DEVICE_ID_KTI_ET32P2 0x3000
diff --git a/include/linux/posix_types.h b/include/linux/posix_types.h
index f0ccb3bb9..338160e48 100644
--- a/include/linux/posix_types.h
+++ b/include/linux/posix_types.h
@@ -41,7 +41,7 @@
#undef __FDMASK
#define __FDMASK(d) (1UL << ((d) % __NFDBITS))
-typedef struct fd_set {
+typedef struct {
unsigned long fds_bits [__FDSET_LONGS];
} __kernel_fd_set;
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h
index 8bc478d6e..3bb4337d1 100644
--- a/include/linux/ppp-comp.h
+++ b/include/linux/ppp-comp.h
@@ -28,7 +28,7 @@
*/
/*
- * ==FILEVERSION 960302==
+ * ==FILEVERSION 970501==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -50,16 +50,16 @@
#ifndef DO_BSD_COMPRESS
#define DO_BSD_COMPRESS 1 /* by default, include BSD-Compress */
#endif
-
+#ifndef DO_DEFLATE
+#define DO_DEFLATE 1 /* by default, include Deflate */
+#endif
#define DO_PREDICTOR_1 0
#define DO_PREDICTOR_2 0
-#define DO_DEFLATE 0
/*
* Structure giving methods for compression/decompression.
*/
-#ifdef PACKETPTR
struct compressor {
int compress_proto; /* CCP compression protocol number */
@@ -107,18 +107,20 @@ struct compressor {
/* Return decompression statistics */
void (*decomp_stat) (void *state, struct compstat *stats);
};
-#endif /* PACKETPTR */
/*
- * Return values for decompress routine.
- * We need to make these distinctions so that we can disable certain
+ * The return value from decompress routine is the length of the
+ * decompressed packet if successful, otherwise DECOMP_ERROR
+ * or DECOMP_FATALERROR if an error occurred.
+ *
+ * We need to make this distinction so that we can disable certain
* useful functionality, namely sending a CCP reset-request as a result
* of an error detected after decompression. This is to avoid infringing
* a patent held by Motorola.
* Don't you just lurve software patents.
*/
-#define DECOMP_OK 0 /* everything went OK */
+#define DECOMP_OK 0 /* no error occured */
#define DECOMP_ERROR 1 /* error detected before decomp. */
#define DECOMP_FATALERROR 2 /* error detected after decomp. */
@@ -169,14 +171,9 @@ struct compressor {
#define BSD_MAX_BITS 15 /* largest code size supported */
/*
- * Definitions for other, as yet unsupported, compression methods.
+ * Definitions for Deflate.
*/
-#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
-#define CILEN_PREDICTOR_1 2 /* length of its config option */
-#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
-#define CILEN_PREDICTOR_2 2 /* length of its config option */
-
#define CI_DEFLATE 24 /* config option for Deflate */
#define CILEN_DEFLATE 4 /* length of its config option */
@@ -189,4 +186,13 @@ struct compressor {
+ DEFLATE_METHOD_VAL)
#define DEFLATE_CHK_SEQUENCE 0
+/*
+ * Definitions for other, as yet unsupported, compression methods.
+ */
+
+#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
+#define CILEN_PREDICTOR_1 2 /* length of its config option */
+#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
+#define CILEN_PREDICTOR_2 2 /* length of its config option */
+
#endif /* _NET_PPP_COMP_H */
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index 1b20ab9e1..bb2d14c6e 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -28,7 +28,7 @@
*/
/*
- * ==FILEVERSION 960302==
+ * ==FILEVERSION 970607==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -66,18 +66,21 @@
* Protocol field values.
*/
#define PPP_IP 0x21 /* Internet Protocol */
+#define PPP_AT 0x29 /* AppleTalk Protocol */
#define PPP_IPX 0x2b /* IPX protocol */
#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
#define PPP_COMP 0xfd /* compressed packet */
#define PPP_IPCP 0x8021 /* IP Control Protocol */
+#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
#define PPP_IPXCP 0x802b /* IPX Control Protocol */
#define PPP_CCP 0x80fd /* Compression Control Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_PAP 0xc023 /* Password Authentication Protocol */
#define PPP_LQR 0xc025 /* Link Quality Report protocol */
#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
+#define PPP_CBCP 0xc029 /* Callback Control Protocol */
/*
* Values for FCS calculations.
diff --git a/include/linux/prctl.h b/include/linux/prctl.h
new file mode 100644
index 000000000..f08f3c36e
--- /dev/null
+++ b/include/linux/prctl.h
@@ -0,0 +1,9 @@
+#ifndef _LINUX_PRCTL_H
+#define _LINUX_PRCTL_H
+
+/* Values to pass as first argument to prctl() */
+
+#define PR_SET_PDEATHSIG 1 /* Second arg is a signal */
+
+
+#endif /* _LINUX_PRCTL_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index e7b84f348..dc0d41d9e 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -147,6 +147,9 @@ enum net_directory_inos {
enum scsi_directory_inos {
PROC_SCSI_SCSI = 256,
PROC_SCSI_ADVANSYS,
+ PROC_SCSI_PCI2000,
+ PROC_SCSI_PCI2220I,
+ PROC_SCSI_PSI240I,
PROC_SCSI_EATA,
PROC_SCSI_EATA_PIO,
PROC_SCSI_AHA152X,
@@ -156,6 +159,7 @@ enum scsi_directory_inos {
PROC_SCSI_BUSLOGIC,
PROC_SCSI_U14_34F,
PROC_SCSI_FDOMAIN,
+ PROC_SCSI_GDTH,
PROC_SCSI_GENERIC_NCR5380,
PROC_SCSI_IN2000,
PROC_SCSI_PAS16,
@@ -238,13 +242,15 @@ struct proc_dir_entry {
unsigned long size;
struct inode_operations * ops;
int (*get_info)(char *, char **, off_t, int, int);
- void (*fill_inode)(struct inode *);
+ void (*fill_inode)(struct inode *, int);
struct proc_dir_entry *next, *parent, *subdir;
void *data;
int (*read_proc)(char *page, char **start, off_t off,
int count, int *eof, void *data);
int (*write_proc)(struct file *file, const char *buffer,
unsigned long count, void *data);
+ unsigned int count; /* use count */
+ int deleted; /* delete flag */
};
extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
diff --git a/include/linux/qic117.h b/include/linux/qic117.h
new file mode 100644
index 000000000..07b537e5d
--- /dev/null
+++ b/include/linux/qic117.h
@@ -0,0 +1,290 @@
+#ifndef _QIC117_H
+#define _QIC117_H
+
+/*
+ * Copyright (C) 1993-1996 Bas Laarhoven,
+ * (C) 1997 Claus-Justus Heine.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ *
+ * $Source: /homes/cvs/ftape-stacked/include/linux/qic117.h,v $
+ * $Revision: 1.2 $
+ * $Date: 1997/10/05 19:19:32 $
+ *
+ * This file contains QIC-117 spec. related definitions for the
+ * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
+ *
+ * These data were taken from the Quarter-Inch Cartridge
+ * Drive Standards, Inc. document titled:
+ * `Common Command Set Interface Specification for Flexible
+ * Disk Controller Based Minicartridge Tape Drives'
+ * document QIC-117 Revision J, 28 Aug 96.
+ * For more information, contact:
+ * Quarter-Inch Cartridge Drive Standards, Inc.
+ * 311 East Carrillo Street
+ * Santa Barbara, California 93101
+ * Telephone (805) 963-3853
+ * Fax (805) 962-1541
+ * WWW http://www.qic.org
+ *
+ * Current QIC standard revisions (of interest) are:
+ * QIC-40-MC, Rev. M, 2 Sep 92.
+ * QIC-80-MC, Rev. N, 20 Mar 96.
+ * QIC-80-MC, Rev. K, 15 Dec 94.
+ * QIC-113, Rev. G, 15 Jun 95.
+ * QIC-117, Rev. J, 28 Aug 96.
+ * QIC-122, Rev. B, 6 Mar 91.
+ * QIC-130, Rev. C, 2 Sep 92.
+ * QIC-3010-MC, Rev. F, 14 Jun 95.
+ * QIC-3020-MC, Rev. G, 31 Aug 95.
+ * QIC-CRF3, Rev. B, 15 Jun 95.
+ * */
+
+/*
+ * QIC-117 common command set rev. J.
+ * These commands are sent to the tape unit
+ * as number of pulses over the step line.
+ */
+
+typedef enum {
+ QIC_NO_COMMAND = 0,
+ QIC_RESET = 1,
+ QIC_REPORT_NEXT_BIT = 2,
+ QIC_PAUSE = 3,
+ QIC_MICRO_STEP_PAUSE = 4,
+ QIC_ALTERNATE_TIMEOUT = 5,
+ QIC_REPORT_DRIVE_STATUS = 6,
+ QIC_REPORT_ERROR_CODE = 7,
+ QIC_REPORT_DRIVE_CONFIGURATION = 8,
+ QIC_REPORT_ROM_VERSION = 9,
+ QIC_LOGICAL_FORWARD = 10,
+ QIC_PHYSICAL_REVERSE = 11,
+ QIC_PHYSICAL_FORWARD = 12,
+ QIC_SEEK_HEAD_TO_TRACK = 13,
+ QIC_SEEK_LOAD_POINT = 14,
+ QIC_ENTER_FORMAT_MODE = 15,
+ QIC_WRITE_REFERENCE_BURST = 16,
+ QIC_ENTER_VERIFY_MODE = 17,
+ QIC_STOP_TAPE = 18,
+/* commands 19-20: reserved */
+ QIC_MICRO_STEP_HEAD_UP = 21,
+ QIC_MICRO_STEP_HEAD_DOWN = 22,
+ QIC_SOFT_SELECT = 23,
+ QIC_SOFT_DESELECT = 24,
+ QIC_SKIP_REVERSE = 25,
+ QIC_SKIP_FORWARD = 26,
+ QIC_SELECT_RATE = 27,
+/* command 27, in ccs2: Select Rate or Format */
+ QIC_ENTER_DIAGNOSTIC_1 = 28,
+ QIC_ENTER_DIAGNOSTIC_2 = 29,
+ QIC_ENTER_PRIMARY_MODE = 30,
+/* command 31: vendor unique */
+ QIC_REPORT_VENDOR_ID = 32,
+ QIC_REPORT_TAPE_STATUS = 33,
+ QIC_SKIP_EXTENDED_REVERSE = 34,
+ QIC_SKIP_EXTENDED_FORWARD = 35,
+ QIC_CALIBRATE_TAPE_LENGTH = 36,
+ QIC_REPORT_FORMAT_SEGMENTS = 37,
+ QIC_SET_FORMAT_SEGMENTS = 38,
+/* commands 39-45: reserved */
+ QIC_PHANTOM_SELECT = 46,
+ QIC_PHANTOM_DESELECT = 47
+} qic117_cmd_t;
+
+typedef enum {
+ discretional = 0, required, ccs1, ccs2
+} qic_compatibility;
+
+typedef enum {
+ unused, mode, motion, report
+} command_types;
+
+struct qic117_command_table {
+ char *name;
+ __u8 mask;
+ __u8 state;
+ __u8 cmd_type;
+ __u8 non_intr;
+ __u8 level;
+};
+
+#define QIC117_COMMANDS {\
+/* command mask state cmd_type */\
+/* | name | | | non_intr */\
+/* | | | | | | level */\
+/* 0*/ {NULL, 0x00, 0x00, mode, 0, discretional},\
+/* 1*/ {"soft reset", 0x00, 0x00, motion, 1, required},\
+/* 2*/ {"report next bit", 0x00, 0x00, report, 0, required},\
+/* 3*/ {"pause", 0x36, 0x24, motion, 1, required},\
+/* 4*/ {"micro step pause", 0x36, 0x24, motion, 1, required},\
+/* 5*/ {"alternate command timeout", 0x00, 0x00, mode, 0, required},\
+/* 6*/ {"report drive status", 0x00, 0x00, report, 0, required},\
+/* 7*/ {"report error code", 0x01, 0x01, report, 0, required},\
+/* 8*/ {"report drive configuration",0x00, 0x00, report, 0, required},\
+/* 9*/ {"report rom version", 0x00, 0x00, report, 0, required},\
+/*10*/ {"logical forward", 0x37, 0x25, motion, 0, required},\
+/*11*/ {"physical reverse", 0x17, 0x05, motion, 0, required},\
+/*12*/ {"physical forward", 0x17, 0x05, motion, 0, required},\
+/*13*/ {"seek head to track", 0x37, 0x25, motion, 0, required},\
+/*14*/ {"seek load point", 0x17, 0x05, motion, 1, required},\
+/*15*/ {"enter format mode", 0x1f, 0x05, mode, 0, required},\
+/*16*/ {"write reference burst", 0x1f, 0x05, motion, 1, required},\
+/*17*/ {"enter verify mode", 0x37, 0x25, mode, 0, required},\
+/*18*/ {"stop tape", 0x00, 0x00, motion, 1, required},\
+/*19*/ {"reserved (19)", 0x00, 0x00, unused, 0, discretional},\
+/*20*/ {"reserved (20)", 0x00, 0x00, unused, 0, discretional},\
+/*21*/ {"micro step head up", 0x02, 0x00, motion, 0, required},\
+/*22*/ {"micro step head down", 0x02, 0x00, motion, 0, required},\
+/*23*/ {"soft select", 0x00, 0x00, mode, 0, discretional},\
+/*24*/ {"soft deselect", 0x00, 0x00, mode, 0, discretional},\
+/*25*/ {"skip segments reverse", 0x36, 0x24, motion, 1, required},\
+/*26*/ {"skip segments forward", 0x36, 0x24, motion, 1, required},\
+/*27*/ {"select rate or format", 0x03, 0x01, mode, 0, required /* [ccs2] */},\
+/*28*/ {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional},\
+/*29*/ {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional},\
+/*30*/ {"enter primary mode", 0x00, 0x00, mode, 0, required},\
+/*31*/ {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional},\
+/*32*/ {"report vendor id", 0x00, 0x00, report, 0, required},\
+/*33*/ {"report tape status", 0x04, 0x04, report, 0, ccs1},\
+/*34*/ {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1},\
+/*35*/ {"skip extended forward", 0x36, 0x24, motion, 1, ccs1},\
+/*36*/ {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2},\
+/*37*/ {"report format segments", 0x17, 0x05, report, 0, ccs2},\
+/*38*/ {"set format segments", 0x17, 0x05, mode, 0, ccs2},\
+/*39*/ {"reserved (39)", 0x00, 0x00, unused, 0, discretional},\
+/*40*/ {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional},\
+/*41*/ {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional},\
+/*42*/ {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional},\
+/*43*/ {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional},\
+/*44*/ {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional},\
+/*45*/ {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional},\
+/*46*/ {"phantom select", 0x00, 0x00, mode, 0, discretional},\
+/*47*/ {"phantom deselect", 0x00, 0x00, mode, 0, discretional},\
+}
+
+/*
+ * Status bits returned by QIC_REPORT_DRIVE_STATUS
+ */
+
+#define QIC_STATUS_READY 0x01 /* Drive is ready or idle. */
+#define QIC_STATUS_ERROR 0x02 /* Error detected, must read
+ error code to clear this */
+#define QIC_STATUS_CARTRIDGE_PRESENT 0x04 /* Tape is present */
+#define QIC_STATUS_WRITE_PROTECT 0x08 /* Tape is write protected */
+#define QIC_STATUS_NEW_CARTRIDGE 0x10 /* New cartridge inserted, must
+ read error status to clear. */
+#define QIC_STATUS_REFERENCED 0x20 /* Cartridge appears to have been
+ formatted. */
+#define QIC_STATUS_AT_BOT 0x40 /* Cartridge is at physical
+ beginning of tape. */
+#define QIC_STATUS_AT_EOT 0x80 /* Cartridge is at physical end
+ of tape. */
+/*
+ * Status bits returned by QIC_REPORT_DRIVE_CONFIGURATION
+ */
+
+#define QIC_CONFIG_RATE_MASK 0x18
+#define QIC_CONFIG_RATE_SHIFT 3
+#define QIC_CONFIG_RATE_250 0
+#define QIC_CONFIG_RATE_500 2
+#define QIC_CONFIG_RATE_1000 3
+#define QIC_CONFIG_RATE_2000 1
+#define QIC_CONFIG_RATE_4000 0 /* since QIC-117 Rev. J */
+
+#define QIC_CONFIG_LONG 0x40 /* Extra Length Tape Detected */
+#define QIC_CONFIG_80 0x80 /* QIC-80 detected. */
+
+/*
+ * Status bits returned by QIC_REPORT_TAPE_STATUS
+ */
+
+#define QIC_TAPE_STD_MASK 0x0f
+#define QIC_TAPE_QIC40 0x01
+#define QIC_TAPE_QIC80 0x02
+#define QIC_TAPE_QIC3020 0x03
+#define QIC_TAPE_QIC3010 0x04
+
+#define QIC_TAPE_LEN_MASK 0x70
+#define QIC_TAPE_205FT 0x10
+#define QIC_TAPE_307FT 0x20
+#define QIC_TAPE_VARIABLE 0x30
+#define QIC_TAPE_1100FT 0x40
+#define QIC_TAPE_FLEX 0x60
+
+#define QIC_TAPE_WIDE 0x80
+
+/* Define a value (in feet) slightly higher than
+ * the possible maximum tape length.
+ */
+#define QIC_TOP_TAPE_LEN 1500
+
+/*
+ * Errors: List of error codes, and their severity.
+ */
+
+typedef struct {
+ char *message; /* Text describing the error. */
+ unsigned int fatal:1; /* Non-zero if the error is fatal. */
+} ftape_error;
+
+#define QIC117_ERRORS {\
+ /* 0*/ { "No error", 0, },\
+ /* 1*/ { "Command Received while Drive Not Ready", 0, },\
+ /* 2*/ { "Cartridge Not Present or Removed", 1, },\
+ /* 3*/ { "Motor Speed Error (not within 1%)", 1, },\
+ /* 4*/ { "Motor Speed Fault (jammed, or gross speed error", 1, },\
+ /* 5*/ { "Cartridge Write Protected", 1, },\
+ /* 6*/ { "Undefined or Reserved Command Code", 1, },\
+ /* 7*/ { "Illegal Track Address Specified for Seek", 1, },\
+ /* 8*/ { "Illegal Command in Report Subcontext", 0, },\
+ /* 9*/ { "Illegal Entry into a Diagnostic Mode", 1, },\
+ /*10*/ { "Broken Tape Detected (based on hole sensor)", 1, },\
+ /*11*/ { "Warning--Read Gain Setting Error", 1, },\
+ /*12*/ { "Command Received While Error Status Pending (obs)", 1, },\
+ /*13*/ { "Command Received While New Cartridge Pending", 1, },\
+ /*14*/ { "Command Illegal or Undefined in Primary Mode", 1, },\
+ /*15*/ { "Command Illegal or Undefined in Format Mode", 1, },\
+ /*16*/ { "Command Illegal or Undefined in Verify Mode", 1, },\
+ /*17*/ { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },\
+ /*18*/ { "Logical EOT Before All Segments generated", 1, },\
+ /*19*/ { "Command Illegal When Cartridge Not Referenced", 1, },\
+ /*20*/ { "Self-Diagnostic Failed (cannot be cleared)", 1, },\
+ /*21*/ { "Warning EEPROM Not Initialized, Defaults Set", 1, },\
+ /*22*/ { "EEPROM Corrupted or Hardware Failure", 1, },\
+ /*23*/ { "Motion Time-out Error", 1, },\
+ /*24*/ { "Data Segment Too Long -- Logical Forward or Pause", 1, },\
+ /*25*/ { "Transmit Overrun (obs)", 1, },\
+ /*26*/ { "Power On Reset Occurred", 0, },\
+ /*27*/ { "Software Reset Occurred", 0, },\
+ /*28*/ { "Diagnostic Mode 1 Error", 1, },\
+ /*29*/ { "Diagnostic Mode 2 Error", 1, },\
+ /*30*/ { "Command Received During Non-Interruptible Process", 1, },\
+ /*31*/ { "Rate or Format Selection Error", 1, },\
+ /*32*/ { "Illegal Command While in High Speed Mode", 1, },\
+ /*33*/ { "Illegal Seek Segment Value", 1, },\
+ /*34*/ { "Invalid Media", 1, },\
+ /*35*/ { "Head Positioning Failure", 1, },\
+ /*36*/ { "Write Reference Burst Failure", 1, },\
+ /*37*/ { "Prom Code Missing", 1, },\
+ /*38*/ { "Invalid Format", 1, },\
+ /*39*/ { "EOT/BOT System Failure", 1, },\
+ /*40*/ { "Prom A Checksum Error", 1, },\
+ /*41*/ { "Drive Wakeup Reset Occurred", 1, },\
+ /*42*/ { "Prom B Checksum Error", 1, },\
+ /*43*/ { "Illegal Entry into Format Mode", 1, },\
+}
+
+#endif /* _QIC117_H */
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 5eebb8a7b..4c4de4eca 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -132,7 +132,7 @@ struct dqblk {
#define dq_btime dq_dqb.dqb_btime
#define dq_itime dq_dqb.dqb_itime
-#define dqoff(UID) ((off_t)((UID) * sizeof (struct dqblk)))
+#define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk)))
struct dqstats {
__u32 lookups;
diff --git a/include/linux/radio.h b/include/linux/radio.h
new file mode 100644
index 000000000..5d6a88537
--- /dev/null
+++ b/include/linux/radio.h
@@ -0,0 +1,134 @@
+/*
+ * linux/radio.h
+ *
+ * Include for radio card support under linux
+ * Another pointless suid-binary removal utility... :-)
+ */
+
+#ifndef _LINUX_RADIO_H
+#define _LINUX_RADIO_H
+
+#include <linux/ioctl.h>
+
+/*
+ * Constants
+ */
+/* Various types of Radio card... */
+/* (NB. I've made this a bit-field. It might make the difference one day.) */
+#define RADIO_TYPE_UNSUP 0x0000
+#define RADIO_TYPE_RTRACK 0x0001 /* AIMSlab RadioTrack (RadioReveal) card -- basic, to say the least */
+#define RADIO_TYPE_WINRADIO 0x0002 /* Dunno, but made by someone */
+#define RADIO_TYPE_TYPHOON 0x0004 /* It exists... */
+
+/* waveband types */
+#define RADIO_PROTOCOL_AM 0x0010 /* AM "protocol" */
+#define RADIO_PROTOCOL_FM 0x0020 /* FM "protocol" */
+#define RADIO_PROTOCOL_SSB 0x0040 /* SSB */
+/* and no doubt some other stuff, too (Brian?) */
+
+
+/* the following are _very_ inaccurate; essentially, all that
+ * they do is provide a "name" for client programs
+ */
+#define RADIO_BAND_UNKNOWN 0x0000 /* other */
+#define RADIO_BAND_AM_SW 0x0100 /* short wave (?) */
+#define RADIO_BAND_AM_MW 0x0200 /* medium wave (540 - 1600) */
+#define RADIO_BAND_AM_LW 0x0400 /* long wave (150 - 270) */
+#define RADIO_BAND_FM_STD 0x1000 /* "standard" FM band (i.e. 88 - 108 or so) */
+
+
+/* Since floating-point stuff is illegal in the kernel, we use these
+ * pairs of macros to convert to, and from userland floats
+ * (I hope these are general enough!)
+ */
+/* Remember to make sure that all of these are integral... */
+/* Also remember to pass sensible things in here (MHz for FM, kHz for AM) */
+#define RADIO_FM_RES 100 /* 0.01 MHZ */
+#define RADIO_FM_FRTOINT(fl) ((int)(((float)(fl))*RADIO_FM_RES))
+#define RADIO_FM_INTTOFR(fr) ((float)(((int)(fr))/RADIO_FM_RES))
+
+/* Old RadioTrack definitions
+#define RADIO_FM_FRTOINT(fl) ((int)(((float)(fl)-88.0)*40)+0xf6c)
+#define RADIO_FM_INTTOFR(fr) ((float)(((fr)-0xf6c)/40)+88.0)
+*/
+
+#define RADIO_AM_RES 1 /* 1 kHz */
+#define RADIO_AM_FRTOINT(fl) ((int)(((float)(fl))*RADIO_AM_RES))
+#define RADIO_AM_INTTOFR(fr) ((float)(((int)(fr))/RADIO_AM_RES))
+
+
+/*
+ * Structures
+ */
+/* query structures */
+struct radio_cap {
+ int dev_num; /* device index */
+ int type; /* device type (see above) */
+ int num_bwidths; /* number of "bandwidths" supported */
+ int volmin, volmax; /* min/max in steps of one */
+};
+
+struct radio_band {
+ int dev_num; /* device index (IN) */
+ int index; /* "bandwidth" index (IN) */
+ int proto; /* protocol (AM, FM, SSB, etc) (OUT) */
+ int types; /* see RADIO_BAND_* above */
+ int freqmin,freqmax; /* encoded according to the macros above */
+ int strmin,strmax; /* min/max signal strength (steps of 1) */
+};
+
+/* Previously, this was in four separate structures:
+ * radio_vol, radio_freq, radio_band and radio_sigstr,
+ * That was foolish, but now it's not so obvious what's going on.
+ * Be careful.
+ */
+
+struct radio_ctl {
+ int dev_num; /* device index (IN) */
+ int value; /* volume, frequency, band, sigstr */
+};
+
+
+/*
+ * ioctl numbers
+ */
+/* You have _how_ many radio devices? =) */
+#define RADIO_NUMDEVS _IOR(0x8c, 0x00, int)
+#define RADIO_GETCAPS _IOR(0x8c, 0x01, struct radio_cap)
+#define RADIO_GETBNDCAP _IOR(0x8c, 0x02, struct radio_band)
+
+#define RADIO_SETVOL _IOW(0x8c, 0x10, struct radio_ctl)
+#define RADIO_GETVOL _IOR(0x8c, 0x11, struct radio_ctl)
+#define RADIO_SETBAND _IOW(0x8c, 0x12, struct radio_ctl)
+#define RADIO_GETBAND _IOR(0x8c, 0x13, struct radio_ctl)
+#define RADIO_SETFREQ _IOW(0x8c, 0x14, struct radio_ctl)
+#define RADIO_GETFREQ _IOR(0x8c, 0x15, struct radio_ctl)
+
+#define RADIO_GETSIGSTR _IOR(0x8c, 0x30, struct radio_ctl)
+
+/* kernel specific stuff... */
+#ifdef __KERNEL__
+/* Try to keep the number of function pointers to a minimum.
+ * Devices are responsible for updating, or otherwise, the
+ * variables here, not the outside wrapper.
+ */
+struct radio_device;
+
+int radio_add_device(struct radio_device *newdev);
+
+struct radio_device {
+ struct radio_cap *cap;
+ struct radio_band *bands; /* pointer to array of radio_bands */
+ int (*setvol)(struct radio_device*,int);
+ int curvol;
+ int (*setband)(struct radio_device*,int);
+ int curband;
+ int (*setfreq)(struct radio_device*,int);
+ int curfreq;
+ int (*getsigstr)(struct radio_device*);
+ struct radio_device *next;
+ void *misc; /* device internal storage... (eg i/o addresses, etc */
+};
+#endif /* __KERNEL__ */
+
+#endif /* _LINUX_RADIO_H */
diff --git a/include/linux/raid1.h b/include/linux/raid1.h
new file mode 100644
index 000000000..2f4e525b8
--- /dev/null
+++ b/include/linux/raid1.h
@@ -0,0 +1,49 @@
+#ifndef _RAID1_H
+#define _RAID1_H
+
+#include <linux/md.h>
+
+struct mirror_info {
+ int number;
+ int raid_disk;
+ kdev_t dev;
+ int next;
+ int sect_limit;
+
+ /*
+ * State bits:
+ */
+ int operational;
+ int write_only;
+ int spare;
+};
+
+struct raid1_data {
+ struct md_dev *mddev;
+ struct mirror_info mirrors[MD_SB_DISKS]; /* RAID1 devices, 2 to MD_SB_DISKS */
+ int raid_disks;
+ int working_disks; /* Number of working disks */
+ int last_used;
+ unsigned long next_sect;
+ int sect_count;
+ int resync_running;
+};
+
+/*
+ * this is our 'private' 'collective' RAID1 buffer head.
+ * it contains information about what kind of IO operations were started
+ * for this RAID5 operation, and about their status:
+ */
+
+struct raid1_bh {
+ unsigned int remaining;
+ unsigned int state;
+ int cmd;
+ struct md_dev *mddev;
+ struct buffer_head *master_bh;
+ struct buffer_head *mirror_bh [MD_SB_DISKS];
+ struct buffer_head bh_req;
+ struct buffer_head *next_retry;
+};
+
+#endif
diff --git a/include/linux/raid5.h b/include/linux/raid5.h
new file mode 100644
index 000000000..214f49de1
--- /dev/null
+++ b/include/linux/raid5.h
@@ -0,0 +1,110 @@
+#ifndef _RAID5_H
+#define _RAID5_H
+
+#ifdef __KERNEL__
+#include <linux/md.h>
+#include <asm/atomic.h>
+
+struct disk_info {
+ kdev_t dev;
+ int operational;
+ int number;
+ int raid_disk;
+ int write_only;
+ int spare;
+};
+
+struct stripe_head {
+ struct stripe_head *hash_next, **hash_pprev; /* hash pointers */
+ struct stripe_head *free_next; /* pool of free sh's */
+ struct buffer_head *buffer_pool; /* pool of free buffers */
+ struct buffer_head *bh_pool; /* pool of free bh's */
+ struct raid5_data *raid_conf;
+ struct buffer_head *bh_old[MD_SB_DISKS]; /* disk image */
+ struct buffer_head *bh_new[MD_SB_DISKS]; /* buffers of the MD device (present in buffer cache) */
+ struct buffer_head *bh_copy[MD_SB_DISKS]; /* copy on write of bh_new (bh_new can change from under us) */
+ struct buffer_head *bh_req[MD_SB_DISKS]; /* copy of bh_new (only the buffer heads), queued to the lower levels */
+ int cmd_new[MD_SB_DISKS]; /* READ/WRITE for new */
+ int new[MD_SB_DISKS]; /* buffer added since the last handle_stripe() */
+ unsigned long sector; /* sector of this row */
+ int size; /* buffers size */
+ int pd_idx; /* parity disk index */
+ int nr_pending; /* nr of pending cmds */
+ __u32 state; /* state flags */
+ int cmd; /* stripe cmd */
+ int count; /* nr of waiters */
+ int write_method; /* reconstruct-write / read-modify-write */
+ int phase; /* PHASE_BEGIN, ..., PHASE_COMPLETE */
+ struct wait_queue *wait; /* processes waiting for this stripe */
+};
+
+/*
+ * Phase
+ */
+#define PHASE_BEGIN 0
+#define PHASE_READ_OLD 1
+#define PHASE_WRITE 2
+#define PHASE_READ 3
+#define PHASE_COMPLETE 4
+
+/*
+ * Write method
+ */
+#define METHOD_NONE 0
+#define RECONSTRUCT_WRITE 1
+#define READ_MODIFY_WRITE 2
+
+/*
+ * Stripe state
+ */
+#define STRIPE_LOCKED 0
+#define STRIPE_ERROR 1
+
+/*
+ * Stripe commands
+ */
+#define STRIPE_NONE 0
+#define STRIPE_WRITE 1
+#define STRIPE_READ 2
+
+struct raid5_data {
+ struct stripe_head **stripe_hashtbl;
+ struct md_dev *mddev;
+ struct md_thread *thread, *resync_thread;
+ struct disk_info disks[MD_SB_DISKS];
+ struct disk_info *spare;
+ int buffer_size;
+ int chunk_size, level, algorithm;
+ int raid_disks, working_disks, failed_disks;
+ int sector_count;
+ unsigned long next_sector;
+ atomic_t nr_handle;
+ struct stripe_head *next_free_stripe;
+ int nr_stripes;
+ int resync_parity;
+ int max_nr_stripes;
+ int clock;
+ int nr_hashed_stripes;
+ int nr_locked_stripes;
+ int nr_pending_stripes;
+ int nr_cached_stripes;
+
+ /*
+ * Free stripes pool
+ */
+ int nr_free_sh;
+ struct stripe_head *free_sh_list;
+ struct wait_queue *wait_for_stripe;
+};
+
+#endif
+
+/*
+ * Our supported algorithms
+ */
+#define ALGORITHM_LEFT_ASYMMETRIC 0
+#define ALGORITHM_RIGHT_ASYMMETRIC 1
+#define ALGORITHM_LEFT_SYMMETRIC 2
+#define ALGORITHM_RIGHT_SYMMETRIC 3
+
+#endif
diff --git a/include/linux/rose.h b/include/linux/rose.h
index cd82c95c3..61abbc0d3 100644
--- a/include/linux/rose.h
+++ b/include/linux/rose.h
@@ -21,8 +21,10 @@
#define SIOCRSGCAUSE (SIOCPROTOPRIVATE+0)
#define SIOCRSSCAUSE (SIOCPROTOPRIVATE+1)
#define SIOCRSL2CALL (SIOCPROTOPRIVATE+2)
+#define SIOCRSSL2CALL (SIOCPROTOPRIVATE+2)
#define SIOCRSACCEPT (SIOCPROTOPRIVATE+3)
#define SIOCRSCLRRT (SIOCPROTOPRIVATE+4)
+#define SIOCRSGL2CALL (SIOCPROTOPRIVATE+5)
#define ROSE_DTE_ORIGINATED 0x00
#define ROSE_NUMBER_BUSY 0x01
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 16f024490..71411900b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -191,6 +191,7 @@ struct task_struct {
struct task_struct *next_task, *prev_task;
struct task_struct *next_run, *prev_run;
int exit_code, exit_signal;
+ int pdeath_signal; /* The signal sent when the parent dies */
/* ??? */
unsigned long personality;
int dumpable:1;
@@ -312,7 +313,7 @@ struct task_struct {
/* exec domain */&default_exec_domain, \
/* binfmt */ NULL, \
/* schedlink */ &init_task,&init_task, &init_task, &init_task, \
-/* ec,brk... */ 0,0,0,0,0, \
+/* ec,brk... */ 0,0,0,0,0,0, \
/* pid etc.. */ 0,0,0,0,0, \
/* suppl grps*/ 0, {0,}, \
/* proc links*/ &init_task,&init_task,NULL,NULL,NULL, \
@@ -438,11 +439,11 @@ extern int securelevel; /* system security level */
#define CURRENT_TIME (xtime.tv_sec)
-extern void sleep_on(struct wait_queue ** p);
-extern void interruptible_sleep_on(struct wait_queue ** p);
-extern void wake_up(struct wait_queue ** p);
-extern void wake_up_interruptible(struct wait_queue ** p);
-extern void wake_up_process(struct task_struct * tsk);
+extern void FASTCALL(sleep_on(struct wait_queue ** p));
+extern void FASTCALL(interruptible_sleep_on(struct wait_queue ** p));
+extern void FASTCALL(wake_up(struct wait_queue ** p));
+extern void FASTCALL(wake_up_interruptible(struct wait_queue ** p));
+extern void FASTCALL(wake_up_process(struct task_struct * tsk));
extern void notify_parent(struct task_struct * tsk, int signal);
extern void release(struct task_struct * p);
@@ -450,6 +451,11 @@ extern void force_sig(unsigned long sig,struct task_struct * p);
extern int send_sig(unsigned long sig,struct task_struct * p,int priv);
extern int in_group_p(gid_t grp);
+extern inline int signal_pending(struct task_struct *p)
+{
+ return (p->signal &~ p->blocked) != 0;
+}
+
extern int request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long flags,
diff --git a/include/linux/serial.h b/include/linux/serial.h
index f03f33dd5..e2d8b76f3 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -132,113 +132,6 @@ struct serial_icounter_struct {
#ifdef __KERNEL__
-/*
- * This is our internal structure for each serial port's state.
- *
- * Many fields are paralleled by the structure used by the serial_struct
- * structure.
- *
- * For definitions of the flags field, see tty.h
- */
-
-#include <linux/termios.h>
-#include <linux/tqueue.h>
-
-/*
- * Counters of the input lines (CTS, DSR, RI, CD) interrupts
- */
-struct async_icount {
- __u32 cts, dsr, rng, dcd, tx, rx;
- __u32 frame, parity, overrun, brk;
- __u32 buf_overrun;
-};
-
-struct serial_state {
- int magic;
- int baud_base;
- int port;
- int irq;
- int flags;
- int hub6;
- int type;
- int line;
- int xmit_fifo_size;
- int custom_divisor;
- int count;
- unsigned short close_delay;
- unsigned short closing_wait; /* time to wait before closing */
- struct async_icount icount;
- struct termios normal_termios;
- struct termios callout_termios;
- struct async_struct *info;
-};
-
-struct async_struct {
- int magic;
- int port;
- int hub6;
- int flags;
- int xmit_fifo_size;
- struct serial_state *state;
- struct tty_struct *tty;
- int read_status_mask;
- int ignore_status_mask;
- int timeout;
- int quot;
- int x_char; /* xon/xoff character */
- int close_delay;
- unsigned short closing_wait;
- unsigned short closing_wait2;
- int IER; /* Interrupt Enable Register */
- int MCR; /* Modem control register */
- unsigned long event;
- unsigned long last_active;
- int line;
- int blocked_open; /* # of blocked opens */
- long session; /* Session of opening process */
- long pgrp; /* pgrp of opening process */
- unsigned char *xmit_buf;
- int xmit_head;
- int xmit_tail;
- int xmit_cnt;
- struct tq_struct tqueue;
- struct tq_struct tqueue_hangup;
- struct wait_queue *open_wait;
- struct wait_queue *close_wait;
- struct wait_queue *delta_msr_wait;
- struct async_struct *next_port; /* For the linked list */
- struct async_struct *prev_port;
-};
-
-#define SERIAL_MAGIC 0x5301
-#define SSTATE_MAGIC 0x5302
-
-/*
- * The size of the serial xmit buffer is 1 page, or 4096 bytes
- */
-#define SERIAL_XMIT_SIZE 4096
-
-/*
- * Events are used to schedule things to happen at timer-interrupt
- * time, instead of at rs interrupt time.
- */
-#define RS_EVENT_WRITE_WAKEUP 0
-
-/*
- * Multiport serial configuration structure --- internal structure
- */
-struct rs_multiport_struct {
- int port1;
- unsigned char mask1, match1;
- int port2;
- unsigned char mask2, match2;
- int port3;
- unsigned char mask3, match3;
- int port4;
- unsigned char mask4, match4;
- int port_monitor;
-};
-
/* Export to allow PCMCIA to use this - Dave Hinds */
extern int register_serial(struct serial_struct *req);
extern void unregister_serial(int line);
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
new file mode 100644
index 000000000..6bf0746ee
--- /dev/null
+++ b/include/linux/serialP.h
@@ -0,0 +1,119 @@
+/*
+ * Private header file for the (dumb) serial driver
+ *
+ * Copyright (C) 1997 by Theodore Ts'o.
+ *
+ * Redistribution of this file is permitted under the terms of the GNU
+ * Public License (GPL)
+ */
+
+#ifndef _LINUX_SERIALP_H
+#define _LINUX_SERIALP_H
+
+/*
+ * This is our internal structure for each serial port's state.
+ *
+ * Many fields are paralleled by the structure used by the serial_struct
+ * structure.
+ *
+ * For definitions of the flags field, see tty.h
+ */
+
+#include <linux/termios.h>
+#include <linux/tqueue.h>
+
+/*
+ * Counters of the input lines (CTS, DSR, RI, CD) interrupts
+ */
+struct async_icount {
+ __u32 cts, dsr, rng, dcd, tx, rx;
+ __u32 frame, parity, overrun, brk;
+ __u32 buf_overrun;
+};
+
+struct serial_state {
+ int magic;
+ int baud_base;
+ int port;
+ int irq;
+ int flags;
+ int hub6;
+ int type;
+ int line;
+ int xmit_fifo_size;
+ int custom_divisor;
+ int count;
+ unsigned short close_delay;
+ unsigned short closing_wait; /* time to wait before closing */
+ struct async_icount icount;
+ struct termios normal_termios;
+ struct termios callout_termios;
+ struct async_struct *info;
+};
+
+struct async_struct {
+ int magic;
+ int port;
+ int hub6;
+ int flags;
+ int xmit_fifo_size;
+ struct serial_state *state;
+ struct tty_struct *tty;
+ int read_status_mask;
+ int ignore_status_mask;
+ int timeout;
+ int quot;
+ int x_char; /* xon/xoff character */
+ int close_delay;
+ unsigned short closing_wait;
+ unsigned short closing_wait2;
+ int IER; /* Interrupt Enable Register */
+ int MCR; /* Modem control register */
+ unsigned long event;
+ unsigned long last_active;
+ int line;
+ int blocked_open; /* # of blocked opens */
+ long session; /* Session of opening process */
+ long pgrp; /* pgrp of opening process */
+ unsigned char *xmit_buf;
+ int xmit_head;
+ int xmit_tail;
+ int xmit_cnt;
+ struct tq_struct tqueue;
+ struct wait_queue *open_wait;
+ struct wait_queue *close_wait;
+ struct wait_queue *delta_msr_wait;
+ struct async_struct *next_port; /* For the linked list */
+ struct async_struct *prev_port;
+};
+
+#define SERIAL_MAGIC 0x5301
+#define SSTATE_MAGIC 0x5302
+
+/*
+ * The size of the serial xmit buffer is 1 page, or 4096 bytes
+ */
+#define SERIAL_XMIT_SIZE 4096
+
+/*
+ * Events are used to schedule things to happen at timer-interrupt
+ * time, instead of at rs interrupt time.
+ */
+#define RS_EVENT_WRITE_WAKEUP 0
+
+/*
+ * Multiport serial configuration structure --- internal structure
+ */
+struct rs_multiport_struct {
+ int port1;
+ unsigned char mask1, match1;
+ int port2;
+ unsigned char mask2, match2;
+ int port3;
+ unsigned char mask3, match3;
+ int port4;
+ unsigned char mask4, match4;
+ int port_monitor;
+};
+
+#endif /* _LINUX_SERIAL_H */
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index e3e9ea98a..d34e9d77d 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -9,6 +9,7 @@
#ifndef _LINUX_SMB_FS_H
#define _LINUX_SMB_FS_H
+#include <linux/dirent.h>
#include <linux/smb.h>
/*
@@ -64,82 +65,85 @@ smb_vfree(void *obj)
#endif /* DEBUG_SMB_MALLOC */
-struct smb_sb_info;
+/*
+ * Flags for the in-memory inode
+ */
+#define SMB_F_CACHEVALID 0x01 /* directory cache valid */
+#define SMB_F_LOCALWRITE 0x02 /* file modified locally */
+
+/*
+ * Bug fix flags
+ */
+#define SMB_FIX_WIN95 0x0001 /* Win 95 server */
+#define SMB_FIX_OLDATTR 0x0002 /* Use core getattr (Win 95 speedup) */
+
+/* linux/fs/smbfs/mmap.c */
+int smb_mmap(struct file *, struct vm_area_struct *);
/* linux/fs/smbfs/file.c */
extern struct inode_operations smb_file_inode_operations;
/* linux/fs/smbfs/dir.c */
extern struct inode_operations smb_dir_inode_operations;
-struct smb_inode_info *smb_find_inode(struct smb_sb_info *server, ino_t ino);
-void smb_free_inode_info(struct smb_inode_info *i);
-void smb_free_all_inodes(struct smb_sb_info *server);
-void smb_init_root(struct smb_sb_info *server);
-int smb_stat_root(struct smb_sb_info *server);
-void smb_init_dir_cache(void);
-void smb_invalid_dir_cache(struct inode *);
-void smb_free_dir_cache(void);
+void smb_renew_times(struct dentry *);
/* linux/fs/smbfs/ioctl.c */
-int smb_ioctl (struct inode * inode, struct file * filp,
- unsigned int cmd, unsigned long arg);
+int smb_ioctl (struct inode *, struct file *, unsigned int, unsigned long);
/* linux/fs/smbfs/inode.c */
-struct super_block *smb_read_super(struct super_block *sb,
- void *raw_data, int silent);
-extern int init_smb_fs(void);
-void smb_invalidate_inodes(struct smb_sb_info *server);
-int smb_revalidate_inode(struct inode *i);
-int smb_refresh_inode(struct inode *i);
-int smb_notify_change(struct inode *inode, struct iattr *attr);
-void smb_invalidate_connection(struct smb_sb_info *server);
-int smb_conn_is_valid(struct smb_sb_info *server);
-unsigned long smb_invent_inos(unsigned long n);
+struct super_block *smb_read_super(struct super_block *, void *, int);
+void smb_get_inode_attr(struct inode *, struct smb_fattr *);
+void smb_invalidate_inodes(struct smb_sb_info *);
+int smb_revalidate_inode(struct inode *);
+int smb_refresh_inode(struct inode *);
+int smb_notify_change(struct inode *, struct iattr *);
+unsigned long smb_invent_inos(unsigned long);
struct inode *smb_iget(struct super_block *, struct smb_fattr *);
/* linux/fs/smbfs/proc.c */
-__u32 smb_len(unsigned char *packet);
-__u8 *smb_encode_smb_length(__u8 *p, __u32 len);
-__u8 *smb_setup_header(struct smb_sb_info *server, __u8 command,
- __u16 wct, __u16 bcc);
-int smb_offerconn(struct smb_sb_info *server);
-int smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt);
+__u32 smb_len(unsigned char *);
+__u8 *smb_encode_smb_length(__u8 *, __u32);
+__u8 *smb_setup_header(struct smb_sb_info *, __u8, __u16, __u16);
+int smb_get_rsize(struct smb_sb_info *);
+int smb_get_wsize(struct smb_sb_info *);
+int smb_offerconn(struct smb_sb_info *);
+int smb_newconn(struct smb_sb_info *, struct smb_conn_opt *);
int smb_close(struct inode *);
+void smb_close_dentry(struct dentry *);
+int smb_close_fileid(struct dentry *, __u16);
int smb_open(struct dentry *, int);
-static inline int
-smb_is_open(struct inode *i)
-{
- return (i->u.smbfs_i.open == SMB_SERVER(i)->generation);
-}
-
-int smb_proc_read(struct inode *, off_t, long, char *);
+int smb_proc_read(struct inode *, off_t, int, char *);
int smb_proc_write(struct inode *, off_t, int, const char *);
-int smb_proc_create(struct dentry *, struct qstr *, __u16, time_t);
+int smb_proc_create(struct dentry *, struct qstr *, __u16, time_t, __u16 *);
int smb_proc_mv(struct dentry *, struct qstr *, struct dentry *, struct qstr *);
int smb_proc_mkdir(struct dentry *, struct qstr *);
int smb_proc_rmdir(struct dentry *, struct qstr *);
int smb_proc_unlink(struct dentry *dir, struct qstr *);
-int smb_proc_readdir(struct dentry *dir, int fpos, int cache_size, struct smb_dirent *entry);
-int smb_proc_getattr(struct dentry *dir, struct qstr *name,
- struct smb_fattr *entry);
-int smb_proc_setattr(struct smb_sb_info *server,
- struct dentry *dir,
- struct smb_fattr *new_finfo);
-int smb_proc_dskattr(struct super_block *sb, struct statfs *attr);
-int smb_proc_reconnect(struct smb_sb_info *server);
-int smb_proc_connect(struct smb_sb_info *server);
-int smb_proc_disconnect(struct smb_sb_info *server);
-int smb_proc_trunc(struct smb_sb_info *server, __u16 fid, __u32 length);
-void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *);
+int smb_proc_readdir(struct dentry *, int, void *);
+int smb_proc_getattr(struct dentry *, struct qstr *, struct smb_fattr *);
+int smb_proc_setattr(struct smb_sb_info *, struct dentry *, struct smb_fattr *);
+int smb_proc_dskattr(struct super_block *, struct statfs *);
+int smb_proc_reconnect(struct smb_sb_info *);
+int smb_proc_connect(struct smb_sb_info *);
+int smb_proc_disconnect(struct smb_sb_info *);
+int smb_proc_trunc(struct smb_sb_info *, __u16, __u32);
+void smb_init_root_dirent(struct smb_sb_info *, struct smb_fattr *);
+
+static inline int
+smb_is_open(struct inode *i)
+{
+ return (i->u.smbfs_i.open == SMB_SERVER(i)->generation);
+}
/* linux/fs/smbfs/sock.c */
+int smb_round_length(int);
+int smb_valid_socket(struct inode *);
+void smb_close_socket(struct smb_sb_info *);
int smb_release(struct smb_sb_info *server);
int smb_connect(struct smb_sb_info *server);
int smb_request(struct smb_sb_info *server);
-int smb_request_read_raw(struct smb_sb_info *server,
- unsigned char *target, int max_len);
-int smb_request_write_raw(struct smb_sb_info *server,
- unsigned const char *source, int length);
+int smb_request_read_raw(struct smb_sb_info *, unsigned char *, int);
+int smb_request_write_raw(struct smb_sb_info *, unsigned const char *, int);
int smb_catch_keepalive(struct smb_sb_info *server);
int smb_dont_catch_keepalive(struct smb_sb_info *server);
int smb_trans2_request(struct smb_sb_info *server, __u16 trans2_command,
@@ -148,8 +152,71 @@ int smb_trans2_request(struct smb_sb_info *server, __u16 trans2_command,
int *lrdata, unsigned char **rdata,
int *lrparam, unsigned char **rparam);
-/* linux/fs/smbfs/mmap.c */
-int smb_mmap(struct file * file, struct vm_area_struct * vma);
+/* fs/smbfs/cache.c */
+
+/*
+ * The cache index describes the pages mapped starting
+ * at offset PAGE_SIZE. We keep only a minimal amount
+ * of information here.
+ */
+struct cache_index {
+ unsigned short num_entries;
+ unsigned short space;
+ struct cache_block * block;
+};
+
+#define NINDEX (PAGE_SIZE-64)/sizeof(struct cache_index)
+/*
+ * The cache head is mapped as the page at offset 0.
+ */
+struct cache_head {
+ int valid;
+ int status; /* error code or 0 */
+ int entries; /* total entries */
+ int pages; /* number of data pages */
+ int idx; /* index of current data page */
+ struct cache_index index[NINDEX];
+};
+
+/*
+ * An array of cache_entry structures holds information
+ * for each object in the cache_block.
+ */
+struct cache_entry {
+ ino_t ino;
+ unsigned short namelen;
+ unsigned short offset;
+};
+
+/*
+ * The cache blocks hold the actual data. The entry table grows up
+ * while the names grow down, and we have space until they meet.
+ */
+struct cache_block {
+ union {
+ struct cache_entry table[1];
+ char names[PAGE_SIZE];
+ } cb_data;
+};
+
+/*
+ * To return an entry, we can pass a reference to the
+ * name instead of having to copy it.
+ */
+struct cache_dirent {
+ ino_t ino;
+ unsigned long pos;
+ int len;
+ char * name;
+};
+
+struct cache_head * smb_get_dircache(struct dentry *);
+void smb_init_dircache(struct cache_head *);
+void smb_free_dircache(struct cache_head *);
+int smb_refill_dircache(struct cache_head *, struct dentry *);
+void smb_add_to_cache(struct cache_head *, struct cache_dirent *, off_t);
+int smb_find_in_cache(struct cache_head *, off_t, struct cache_dirent *);
+void smb_invalid_dir_cache(struct inode *);
#endif /* __KERNEL__ */
diff --git a/include/linux/smb_fs_i.h b/include/linux/smb_fs_i.h
index 73ea69a89..71e57ea6a 100644
--- a/include/linux/smb_fs_i.h
+++ b/include/linux/smb_fs_i.h
@@ -22,11 +22,14 @@ struct smb_inode_info {
* (open == generation).
*/
unsigned int open;
- void * dentry; /* The dentry we were opened with */
__u16 fileid; /* What id to handle a file with? */
__u16 attr; /* Attribute fields, DOS value */
__u16 access; /* Access bits. */
+ __u16 cache_valid; /* dircache valid? */
+ unsigned long oldmtime; /* last time refreshed */
+ unsigned long closed; /* timestamp when closed */
+ void * dentry; /* The dentry we were opened with */
};
#endif
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h
index 72b805e60..4e277ad3c 100644
--- a/include/linux/smb_fs_sb.h
+++ b/include/linux/smb_fs_sb.h
@@ -13,13 +13,17 @@
#include <linux/types.h>
#include <linux/smb.h>
-#include <linux/smb_mount.h>
+
+/* Get the server for the specified dentry */
+#define server_from_dentry(dentry) &dentry->d_sb->u.smbfs_sb
+#define SB_of(server) ((struct super_block *) ((char *)(server) - \
+ (unsigned long)(&((struct super_block *)0)->u.smbfs_sb)))
struct smb_sb_info {
enum smb_conn_state state;
struct file * sock_file;
- struct smb_mount_data m;
+ struct smb_mount_data *mnt;
/* Connections are counted. Each time a new socket arrives,
* generation is incremented.
@@ -29,6 +33,7 @@ struct smb_sb_info {
struct smb_conn_opt opt;
struct semaphore sem;
+ struct wait_queue * wait;
__u32 packet_size;
unsigned char * packet;
diff --git a/include/linux/smbno.h b/include/linux/smbno.h
index a1443646b..0f25e0265 100644
--- a/include/linux/smbno.h
+++ b/include/linux/smbno.h
@@ -2,12 +2,12 @@
#define _SMBNO_H_
/* these define the attribute byte as seen by DOS */
-#define aRONLY (1L<<0)
-#define aHIDDEN (1L<<1)
-#define aSYSTEM (1L<<2)
-#define aVOLID (1L<<3)
-#define aDIR (1L<<4)
-#define aARCH (1L<<5)
+#define aRONLY (1L<<0)
+#define aHIDDEN (1L<<1)
+#define aSYSTEM (1L<<2)
+#define aVOLID (1L<<3)
+#define aDIR (1L<<4)
+#define aARCH (1L<<5)
/* error classes */
#define SUCCESS 0 /* The request was successful. */
@@ -101,6 +101,14 @@
#define ERRsharebufexc 36 /* share buffer exceeded */
#define ERRdiskfull 39
+/*
+ * Access modes when opening a file
+ */
+#define SMB_ACCMASK 0x0003
+#define SMB_O_RDONLY 0x0000
+#define SMB_O_WRONLY 0x0001
+#define SMB_O_RDWR 0x0002
+
/* offsets into message for common items */
#define smb_com 8
#define smb_rcls 9
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h
index 1626ea917..bfd28359e 100644
--- a/include/linux/soundcard.h
+++ b/include/linux/soundcard.h
@@ -33,7 +33,7 @@
* Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of
* the currently active driver.
*/
-#define SOUND_VERSION 0x030800
+#define SOUND_VERSION 0x030802
#define OPEN_SOUND_SYSTEM
/* In Linux we need to be prepared for cross compiling */
@@ -127,7 +127,7 @@
#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
-#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use. */
+#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */
#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
@@ -697,7 +697,7 @@ typedef struct copr_msg {
* the devices supported by the particular mixer.
*/
-#define SOUND_MIXER_NRDEVICES 17
+#define SOUND_MIXER_NRDEVICES 25
#define SOUND_MIXER_VOLUME 0
#define SOUND_MIXER_BASS 1
#define SOUND_MIXER_TREBLE 2
@@ -721,6 +721,14 @@ typedef struct copr_msg {
#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */
#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */
#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */
+#define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */
+#define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */
+#define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */
+#define SOUND_MIXER_PHONEIN 20 /* Phone input */
+#define SOUND_MIXER_PHONEOUT 21 /* Phone output */
+#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */
+#define SOUND_MIXER_RADIO 23 /* Radio in */
+#define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */
/* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */
/* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */
@@ -741,11 +749,13 @@ typedef struct copr_msg {
#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \
"Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \
- "Line1", "Line2", "Line3"}
+ "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \
+ "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \
"mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \
- "line1", "line2", "line3"}
+ "line1", "line2", "line3", "dig1", "dig2", "dig3", \
+ "phin", "phout", "video", "radio", "monitor"}
/* Device bitmask identifiers */
@@ -775,6 +785,14 @@ typedef struct copr_msg {
#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
+#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
+#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
+#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
+#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
+#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
+#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
+#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
+#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
/* Obsolete macros */
#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index 759da3c70..715abce2d 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -143,7 +143,7 @@ void rpc_del_timer(struct rpc_task *);
void rpc_delay(struct rpc_task *, unsigned long);
void * rpc_allocate(unsigned int flags, unsigned int);
void rpc_free(void *);
-void rpciod_up(void);
+int rpciod_up(void);
void rpciod_down(void);
extern __inline__ void *
diff --git a/include/linux/sunrpc/types.h b/include/linux/sunrpc/types.h
index 3183a3109..467445e06 100644
--- a/include/linux/sunrpc/types.h
+++ b/include/linux/sunrpc/types.h
@@ -70,6 +70,6 @@ __rpc_remove_list(struct rpc_listitem **q, struct rpc_listitem *item)
/*
* Shorthands
*/
-#define signalled() (current->signal & ~current->blocked)
+#define signalled() (signal_pending(current))
#endif /* _LINUX_SUNRPC_TYPES_H_ */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 7faaccf75..d0873952a 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -73,7 +73,7 @@ extern unsigned int nr_swapfiles;
extern struct swap_info_struct swap_info[];
void si_swapinfo(struct sysinfo *);
unsigned long get_swap_page(void);
-extern void swap_free(unsigned long);
+extern void FASTCALL(swap_free(unsigned long));
/*
* vm_ops not present page codes for shared memory.
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 1e18516d7..587aaa847 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -69,7 +69,8 @@ enum
KERN_CTLALTDEL, /* int: allow ctl-alt-del to reboot */
KERN_PRINTK, /* sturct: control printk logging parameters */
KERN_NAMETRANS, /* Name translation */
- KERN_STATINODE
+ KERN_STATINODE,
+ KERN_DENTRY /* dentry statistics */
};
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index 93e4400ce..eb443b269 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -385,7 +385,7 @@ extern int sysv_bmap(struct inode *,int);
extern struct buffer_head * sysv_getblk(struct inode *, unsigned int, int);
extern struct buffer_head * sysv_file_bread(struct inode *, int, int);
-extern long sysv_file_read(struct inode *, struct file *, char *, unsigned long);
+extern ssize_t sysv_file_read(struct file *, char *, size_t, loff_t *);
extern void sysv_truncate(struct inode *);
extern void sysv_put_super(struct super_block *);
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 0052d0510..78a59c0a5 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -21,6 +21,7 @@
#include <linux/tqueue.h>
#include <linux/tty_driver.h>
#include <linux/tty_ldisc.h>
+#include <linux/serialP.h>
#include <asm/system.h>
@@ -229,14 +230,17 @@ struct tty_struct {
int count;
struct winsize winsize;
unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1;
+ unsigned char low_latency:1;
unsigned char ctrl_status;
struct tty_struct *link;
struct fasync_struct *fasync;
struct tty_flip_buffer flip;
int max_flip_cnt;
+ int alt_speed; /* For magic substitution of 38400 bps */
struct wait_queue *write_wait;
struct wait_queue *read_wait;
+ struct tq_struct tq_hangup;
void *disc_data;
void *driver_data;
@@ -335,6 +339,8 @@ extern void tty_unhangup(struct file *filp);
extern int tty_hung_up_p(struct file * filp);
extern void do_SAK(struct tty_struct *tty);
extern void disassociate_ctty(int priv);
+extern void tty_flip_buffer_push(struct tty_struct *tty);
+extern int tty_get_baud_rate(struct tty_struct *tty);
/* n_tty.c */
extern struct tty_ldisc tty_ldisc_N_TTY;
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index a2313af6a..65853d701 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -92,6 +92,18 @@
* This routine notifies the tty driver that it should hangup the
* tty device.
*
+ * void (*break_ctl)(struct tty_stuct *tty, int state);
+ *
+ * This optional routine requests the tty driver to turn on or
+ * off BREAK status on the RS-232 port. If state is -1,
+ * then the BREAK status should be turned on; if state is 0, then
+ * BREAK should be turned off.
+ *
+ * If this routine is implemented, the high-level tty driver will
+ * handle the following ioctls: TCSBRK, TCSBRKP, TIOCSBRK,
+ * TIOCCBRK. Otherwise, these ioctls will be passed down to the
+ * driver to handle.
+ *
* void (*wait_until_sent)(struct tty_struct *tty, int timeout);
*
* This routine waits until the device has written out all of the
@@ -148,6 +160,7 @@ struct tty_driver {
void (*stop)(struct tty_struct *tty);
void (*start)(struct tty_struct *tty);
void (*hangup)(struct tty_struct *tty);
+ void (*break_ctl)(struct tty_struct *tty, int state);
void (*flush_buffer)(struct tty_struct *tty);
void (*set_ldisc)(struct tty_struct *tty);
void (*wait_until_sent)(struct tty_struct *tty, int timeout);
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index bc8e912ca..f5f329607 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -25,22 +25,22 @@
* buffers of any input characters it may have queued to be
* delivered to the user mode process.
*
- * int (*chars_in_buffer)(struct tty_struct *tty);
+ * ssize_t (*chars_in_buffer)(struct tty_struct *tty);
*
* This function returns the number of input characters the line
* iscpline may have queued up to be delivered to the user mode
* process.
*
- * int (*read)(struct tty_struct * tty, struct file * file,
- * unsigned char * buf, unsigned int nr);
+ * ssize_t (*read)(struct tty_struct * tty, struct file * file,
+ * unsigned char * buf, size_t nr);
*
* This function is called when the user requests to read from
* the tty. The line discpline will return whatever characters
* it has buffered up for the user. If this function is not
* defined, the user will receive an EIO error.
*
- * int (*write)(struct tty_struct * tty, struct file * file,
- * const unsigned char * buf, unsigned int nr);
+ * ssize_t (*write)(struct tty_struct * tty, struct file * file,
+ * const unsigned char * buf, size_t nr);
*
* This function is called when the user requests to write to the
* tty. The line discpline will deliver the characters to the
@@ -111,11 +111,11 @@ struct tty_ldisc {
int (*open)(struct tty_struct *);
void (*close)(struct tty_struct *);
void (*flush_buffer)(struct tty_struct *tty);
- int (*chars_in_buffer)(struct tty_struct *tty);
- int (*read)(struct tty_struct * tty, struct file * file,
- unsigned char * buf, unsigned int nr);
- int (*write)(struct tty_struct * tty, struct file * file,
- const unsigned char * buf, unsigned int nr);
+ ssize_t (*chars_in_buffer)(struct tty_struct *tty);
+ ssize_t (*read)(struct tty_struct * tty, struct file * file,
+ unsigned char * buf, size_t nr);
+ ssize_t (*write)(struct tty_struct * tty, struct file * file,
+ const unsigned char * buf, size_t nr);
int (*ioctl)(struct tty_struct * tty, struct file * file,
unsigned int cmd, unsigned long arg);
void (*set_termios)(struct tty_struct *tty, struct termios * old);
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
new file mode 100644
index 000000000..4cf4d241f
--- /dev/null
+++ b/include/linux/videodev.h
@@ -0,0 +1,171 @@
+#ifndef __LINUX_VIDEODEV_H
+#define __LINUX_VIDEODEV_H
+
+#ifdef __KERNEL__
+
+struct video_device
+{
+ char name[32];
+ int type;
+ int hardware;
+
+ int (*open)(struct video_device *, int mode);
+ void (*close)(struct video_device *);
+ long (*read)(struct video_device *, char *, unsigned long, int noblock);
+ /* Do we need a write method ? */
+ long (*write)(struct video_device *, const char *, unsigned long, int noblock);
+ int (*ioctl)(struct video_device *, unsigned int , void *);
+ int (*mmap)(struct video_device *, const char *, unsigned long);
+ int (*initialize)(struct video_device *);
+ void *private;
+ int busy;
+ int minor;
+};
+
+extern int videodev_init(void);
+#define VIDEO_MAJOR 81
+extern int video_register_device(struct video_device *);
+extern void video_unregister_device(struct video_device *);
+#endif
+
+
+#define VID_TYPE_CAPTURE 1 /* Can capture */
+#define VID_TYPE_TUNER 2 /* Can tune */
+#define VID_TYPE_TELETEXT 4 /* Does teletext */
+#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
+#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
+#define VID_TYPE_CLIPPING 32 /* Can clip */
+#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
+#define VID_TYPE_SCALES 128 /* Scalable */
+#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
+
+
+struct video_capability
+{
+ char name[32];
+ int type;
+ int channels; /* Num channels */
+ int audios; /* Num audio devices */
+ int maxwidth; /* Supported width */
+ int maxheight; /* And height */
+ int minwidth; /* Supported width */
+ int minheight; /* And height */
+};
+
+
+struct video_channel
+{
+ int channel;
+ char name[32];
+ int tuners;
+ __u32 flags;
+#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
+#define VIDEO_VC_AUDIO 2 /* Channel has audio */
+ __u16 type;
+#define VIDEO_TYPE_TV 1
+#define VIDEO_TYPE_CAMERA 2
+};
+
+struct video_tuner
+{
+ int tuner;
+ char name[32];
+ ulong rangelow, rangehigh; /* Tuner range */
+ __u32 flags;
+#define VIDEO_TUNER_PAL 1
+#define VIDEO_TUNER_NTSC 2
+#define VIDEO_TUNER_SECAM 4
+ __u16 mode; /* PAL/NTSC/SECAM/OTHER */
+#define VIDEO_MODE_PAL 0
+#define VIDEO_MODE_NTSC 1
+#define VIDEO_MODE_SECAM 2
+#define VIDEO_MODE_AUTO 3
+};
+
+struct video_picture
+{
+ __u16 brightness;
+ __u16 hue;
+ __u16 colour;
+ __u16 contrast;
+ __u16 whiteness; /* Black and white only */
+ __u16 depth; /* Capture depth */
+ __u16 palette; /* Palette in use */
+#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
+#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
+#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
+#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
+#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
+#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
+};
+
+struct video_audio
+{
+ int audio; /* Audio channel */
+ __u16 volume; /* If settable */
+ __u16 bass, treble;
+ __u32 flags;
+#define VIDEO_AUDIO_MUTE 1
+#define VIDEO_AUDIO_MUTABLE 2
+#define VIDEO_AUDIO_VOLUME 4
+#define VIDEO_AUDIO_BASS 8
+#define VIDEO_AUDIO_TREBLE 16
+};
+
+struct video_clip
+{
+ __s32 x,y;
+ __s32 width, height;
+ struct video_clip *next; /* For user use/driver use only */
+};
+
+struct video_window
+{
+ __u32 x,y;
+ __u32 width,height;
+ __u32 chromakey;
+ __u32 flags;
+ struct video_clip *clips; /* Set only */
+ int clipcount;
+#define VIDEO_WINDOW_INTERLACE 1
+};
+
+struct video_buffer
+{
+ void *base;
+ int height,width;
+ int depth;
+ int bytesperline;
+};
+
+
+struct video_key
+{
+ __u8 key[8];
+ __u32 flags;
+};
+
+#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
+#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
+#define VIDIOCSCHAN _IOW('v',3,int) /* Set channel */
+#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
+#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
+#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
+#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
+#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
+#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */
+#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
+#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
+#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
+#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
+#define VIDIOCGFREQ _IOR('v',15, unsigned long) /* Set tuner */
+#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
+#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
+#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
+
+
+#define VID_HARDWARE_BT848 1
+#define VID_HARDWARE_QCAM_BW 2
+#define VID_HARDWARE_PMS 3
+
+#endif
diff --git a/include/linux/wrapper.h b/include/linux/wrapper.h
index 2d6d4719f..d8a73117b 100644
--- a/include/linux/wrapper.h
+++ b/include/linux/wrapper.h
@@ -8,7 +8,7 @@
#define file_operation_handle file_operations
#define connect_wrapper(x) 0
-#define current_got_fatal_signal() (current->signal & ~current->blocked)
+#define current_got_fatal_signal() (signal_pending(current))
#define current_set_timeout(val) current->timeout = val
#define module_interruptible_sleep_on interruptible_sleep_on
diff --git a/include/linux/zftape.h b/include/linux/zftape.h
new file mode 100644
index 000000000..ec5d2ffe0
--- /dev/null
+++ b/include/linux/zftape.h
@@ -0,0 +1,87 @@
+#ifndef _ZFTAPE_H
+#define _ZFTAPE_H
+
+/*
+ * Copyright (C) 1996, 1997 Claus-Justus Heine.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ *
+ * $Source: /homes/cvs/ftape-stacked/include/linux/zftape.h,v $
+ * $Revision: 1.12 $
+ * $Date: 1997/10/21 11:02:37 $
+ *
+ * Special ioctl and other global info for the zftape VFS
+ * interface for the QIC-40/80/3010/3020 floppy-tape driver for
+ * Linux.
+ */
+
+#define ZFTAPE_VERSION "zftape for " FTAPE_VERSION
+
+#include <linux/ftape.h>
+
+#define ZFTAPE_LABEL "Ftape - The Linux Floppy Tape Project!"
+
+/* Bits of the minor device number that control the operation mode */
+#define ZFT_Q80_MODE (1 << 3)
+#define ZFT_ZIP_MODE (1 << 4)
+#define ZFT_RAW_MODE (1 << 5)
+#define ZFT_MINOR_OP_MASK (ZFT_Q80_MODE | \
+ ZFT_ZIP_MODE | \
+ ZFT_RAW_MODE)
+#define ZFT_MINOR_MASK (FTAPE_SEL_MASK | \
+ ZFT_MINOR_OP_MASK | \
+ FTAPE_NO_REWIND)
+
+#ifdef ZFT_OBSOLETE
+struct mtblksz {
+ unsigned int mt_blksz;
+};
+#define MTIOC_ZFTAPE_GETBLKSZ _IOR('m', 104, struct mtblksz)
+#endif
+
+#ifdef __KERNEL__
+
+extern int zft_init(void);
+
+extern inline __s64 zft_div_blksz(__s64 value, __u32 blk_sz)
+{
+ if (blk_sz == 1) {
+ return value;
+ } else {
+ return (__s64)(((__u32)(value >> 10) + (blk_sz >> 10) - 1)
+ / (blk_sz >> 10));
+ }
+}
+
+extern inline __s64 zft_mul_blksz(__s64 value, __u32 blk_sz)
+{
+ if (blk_sz == 1) {
+ return value;
+ } else {
+ /* if blk_sz != 1, then it is a multiple of 1024. In
+ * this case, `value' will also fit into 32 bits.
+ *
+ * Actually, this limits the capacity to 42
+ * bits. This is (2^32)*1024, roughly a thousand
+ * times 2GB, or 3 Terabytes. Hopefully this is enough
+ */
+ return(__s64)(((__u32)(value)*(blk_sz>>10))<<10);
+ }
+}
+
+#endif
+
+#endif