summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /include/linux
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/802_11.h2
-rw-r--r--include/linux/b1lli.h7
-rw-r--r--include/linux/blkdev.h2
-rw-r--r--include/linux/cdrom.h4
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/elf.h2
-rw-r--r--include/linux/etherdevice.h21
-rw-r--r--include/linux/ethtool.h14
-rw-r--r--include/linux/fcdevice.h5
-rw-r--r--include/linux/fddidevice.h3
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/fs_struct.h2
-rw-r--r--include/linux/genhd.h5
-rw-r--r--include/linux/hdlc.h336
-rw-r--r--include/linux/hippidevice.h4
-rw-r--r--include/linux/hysdn_if.h7
-rw-r--r--include/linux/i2c.h4
-rw-r--r--include/linux/if_arp.h4
-rw-r--r--include/linux/if_bonding.h2
-rw-r--r--include/linux/if_eql.h2
-rw-r--r--include/linux/if_frad.h4
-rw-r--r--include/linux/init.h20
-rw-r--r--include/linux/isdn_ppp.h2
-rw-r--r--include/linux/loop.h40
-rw-r--r--include/linux/mm.h21
-rw-r--r--include/linux/mmzone.h19
-rw-r--r--include/linux/n_r3964.h2
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/netfilter_ipv4/ipt_TCPMSS.h10
-rw-r--r--include/linux/netfilter_ipv4/ipt_tcpmss.h9
-rw-r--r--include/linux/openpic.h367
-rw-r--r--include/linux/pagemap.h6
-rw-r--r--include/linux/pci.h4
-rw-r--r--include/linux/pci_ids.h12
-rw-r--r--include/linux/pg.h2
-rw-r--r--include/linux/sched.h14
-rw-r--r--include/linux/serial.h3
-rw-r--r--include/linux/serialP.h1
-rw-r--r--include/linux/serial_reg.h4
-rw-r--r--include/linux/synclink.h2
-rw-r--r--include/linux/sysctl.h4
-rw-r--r--include/linux/tqueue.h19
-rw-r--r--include/linux/trdevice.h5
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/usb.h6
-rw-r--r--include/linux/videodev.h3
46 files changed, 597 insertions, 426 deletions
diff --git a/include/linux/802_11.h b/include/linux/802_11.h
index cff47601a..bd5196c24 100644
--- a/include/linux/802_11.h
+++ b/include/linux/802_11.h
@@ -188,4 +188,4 @@ struct ieee_802_11_frame_subtype_class {
}
-#endif \ No newline at end of file
+#endif
diff --git a/include/linux/b1lli.h b/include/linux/b1lli.h
index 72cae4d27..bfc15aa75 100644
--- a/include/linux/b1lli.h
+++ b/include/linux/b1lli.h
@@ -1,11 +1,14 @@
/*
- * $Id: b1lli.h,v 1.8 1999/07/01 15:26:54 calle Exp $
+ * $Id: b1lli.h,v 1.8.8.1 2001/03/15 09:58:30 kai Exp $
*
* ISDN lowlevel-module for AVM B1-card.
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1lli.h,v $
+ * Revision 1.8.8.1 2001/03/15 09:58:30 kai
+ * spelling fix
+ *
* Revision 1.8 1999/07/01 15:26:54 calle
* complete new version (I love it):
* + new hardware independed "capi_driver" interface that will make it easy to:
@@ -129,7 +132,7 @@ typedef struct avmb1_extcarddef {
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
-#define AVMB1_REMOVECARD 6 /* remove a card (usefull for T1) */
+#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */
#define AVMB1_REGISTERCARD_IS_OBSOLETE
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 01cd38a83..849e71f0f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -180,7 +180,7 @@ extern int * max_segments[MAX_BLKDEV];
extern atomic_t queued_sectors;
#define MAX_SEGMENTS 128
-#define MAX_SECTORS (MAX_SEGMENTS*8)
+#define MAX_SECTORS 255
#define PageAlignSize(size) (((size) + PAGE_SIZE -1) & PAGE_MASK)
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 7d59238dd..c18ddfd39 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -524,10 +524,12 @@ struct dvd_layer {
__u32 end_sector_l0;
};
+#define DVD_LAYERS 4
+
struct dvd_physical {
__u8 type;
__u8 layer_num;
- struct dvd_layer layer[4];
+ struct dvd_layer layer[DVD_LAYERS];
};
struct dvd_copyright {
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 74f377c06..e32a11742 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -217,7 +217,7 @@ extern void d_move(struct dentry *, struct dentry *);
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
/* validate "insecure" dentry pointer */
-extern int d_validate(struct dentry *, struct dentry *, unsigned int, unsigned int);
+extern int d_validate(struct dentry *, struct dentry *);
extern char * __d_path(struct dentry *, struct vfsmount *, struct dentry *,
struct vfsmount *, char *, int);
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 34d8e93ae..b27c2d43c 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -299,7 +299,7 @@ typedef struct {
#define HWCAP_SPARC_SWAP 4
#define HWCAP_SPARC_MULDIV 8
#define HWCAP_SPARC_V9 16
-
+#define HWCAP_SPARC_ULTRA3 32
/*
* 68k ELF relocation types
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 97c505282..6c72b8d59 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -38,13 +38,30 @@ extern int eth_header_cache(struct neighbour *neigh,
struct hh_cache *hh);
extern int eth_header_parse(struct sk_buff *skb,
unsigned char *haddr);
-extern struct net_device * init_etherdev(struct net_device *, int);
+extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *alloc_etherdev(int sizeof_priv);
-static __inline__ void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
+static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
{
memcpy (dest->data, src, len);
}
+/**
+ * is_valid_ether_addr - Determine if the given Ethernet address is valid
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
+ * a multicast address, and is not FF:FF:FF:FF:FF:FF.
+ *
+ * Return true if the address is valid.
+ */
+static inline int is_valid_ether_addr( u8 *addr )
+{
+ const char zaddr[6] = {0,};
+
+ return !(addr[0]&1) && memcmp( addr, zaddr, 6);
+}
+
#endif
#endif /* _LINUX_ETHERDEVICE_H */
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 384171b3f..c1106729d 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -24,10 +24,22 @@ struct ethtool_cmd {
u32 reserved[4];
};
+/* these strings are set to whatever the driver author decides... */
+struct ethtool_drvinfo {
+ u32 cmd;
+ char driver[32]; /* driver short name, "tulip", "eepro100" */
+ char version[32]; /* driver version string */
+ char fw_version[32]; /* firmware version string, if applicable */
+ char bus_info[32]; /* Bus info for this interface. For PCI
+ * devices, use pci_dev->slot_name. */
+ char reserved1[32];
+ char reserved2[32];
+};
/* CMDs currently supported */
-#define ETHTOOL_GSET 0x00000001 /* Get settings, non-privileged. */
+#define ETHTOOL_GSET 0x00000001 /* Get settings. */
#define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */
+#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/linux/fcdevice.h b/include/linux/fcdevice.h
index c63d03bc1..25687bb17 100644
--- a/include/linux/fcdevice.h
+++ b/include/linux/fcdevice.h
@@ -33,7 +33,10 @@ extern int fc_header(struct sk_buff *skb, struct net_device *dev,
extern int fc_rebuild_header(struct sk_buff *skb);
//extern unsigned short fc_type_trans(struct sk_buff *skb, struct net_device *dev);
-extern struct net_device * init_fcdev(struct net_device *, int);
+extern struct net_device *init_fcdev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *alloc_fcdev(int sizeof_priv);
+extern int register_fcdev(struct net_device *dev);
+extern void unregister_fcdev(struct net_device *dev);
#endif
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h
index 79f92ff17..83815ec9f 100644
--- a/include/linux/fddidevice.h
+++ b/include/linux/fddidevice.h
@@ -34,7 +34,8 @@ extern int fddi_header(struct sk_buff *skb,
extern int fddi_rebuild_header(struct sk_buff *skb);
extern unsigned short fddi_type_trans(struct sk_buff *skb,
struct net_device *dev);
-extern struct net_device * init_fddidev(struct net_device *, int);
+extern struct net_device *init_fddidev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *alloc_fddidev(int sizeof_priv);
#endif
#endif /* _LINUX_FDDIDEVICE_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a5f4cddaf..41c148392 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -244,7 +244,7 @@ struct buffer_head {
struct buffer_head *b_reqnext; /* request queue */
struct buffer_head **b_pprev; /* doubly linked list of hash-queue */
- char * b_data; /* pointer to data block (512 byte) */
+ char * b_data; /* pointer to data block */
struct page *b_page; /* the page this bh is mapped to */
void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
void *b_private; /* reserved for b_end_io */
@@ -381,6 +381,7 @@ struct address_space {
struct vm_area_struct *i_mmap; /* list of private mappings */
struct vm_area_struct *i_mmap_shared; /* list of shared mappings */
spinlock_t i_shared_lock; /* and spinlock protecting it */
+ int gfp_mask; /* how to allocate the pages */
};
struct block_device {
@@ -504,6 +505,8 @@ extern spinlock_t files_lock;
extern int init_private_file(struct file *, struct dentry *, int);
+#define MAX_NON_LFS ((1UL<<31) - 1)
+
#define FL_POSIX 1
#define FL_FLOCK 2
#define FL_BROKEN 4 /* broken flock() emulation */
@@ -651,6 +654,7 @@ struct super_block {
unsigned char s_blocksize_bits;
unsigned char s_lock;
unsigned char s_dirt;
+ unsigned long long s_maxbytes; /* Max file size */
struct file_system_type *s_type;
struct super_operations *s_op;
struct dquot_operations *dq_op;
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index 3d2df3cf4..3d6451977 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -13,7 +13,7 @@ struct fs_struct {
#define INIT_FS { \
ATOMIC_INIT(1), \
RW_LOCK_UNLOCKED, \
- 0022, \
+ 0000, \
NULL, NULL, NULL, NULL, NULL, NULL \
}
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 6cfe0bbb7..eaa63807a 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -223,6 +223,11 @@ struct unixware_disklabel {
#endif /* CONFIG_UNIXWARE_DISKLABEL */
+#ifdef CONFIG_MINIX_SUBPARTITION
+# define MINIX_PARTITION 0x81 /* Minix Partition ID */
+# define MINIX_NR_SUBPARTITIONS 4
+#endif /* CONFIG_MINIX_SUBPARTITION */
+
#ifdef __KERNEL__
extern struct gendisk *gendisk_head; /* linked list of disks */
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
new file mode 100644
index 000000000..b9cc125a4
--- /dev/null
+++ b/include/linux/hdlc.h
@@ -0,0 +1,336 @@
+/*
+ * Generic HDLC support routines for Linux
+ *
+ * Copyright (C) 1999, 2000 Krzysztof Halasa <khc@pm.waw.pl>
+ *
+ * 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 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __HDLC_H
+#define __HDLC_H
+
+/* Ioctls - to be changed */
+#define HDLCGSLOTMAP (0x89F4) /* E1/T1 slot bitmap */
+#define HDLCGCLOCK (0x89F5) /* clock sources */
+#define HDLCGCLOCKRATE (0x89F6) /* clock rate */
+#define HDLCGMODE (0x89F7) /* internal to hdlc.c - protocol used */
+#define HDLCGLINE (0x89F8) /* physical interface */
+#define HDLCSSLOTMAP (0x89F9)
+#define HDLCSCLOCK (0x89FA)
+#define HDLCSCLOCKRATE (0x89FB)
+#define HDLCSMODE (0x89FC) /* internal to hdlc.c - select protocol */
+#define HDLCPVC (0x89FD) /* internal to hdlc.c - create/delete PVC */
+#define HDLCSLINE (0x89FE)
+#define HDLCRUN (0x89FF) /* Download firmware and run board */
+
+/* Modes */
+#define MODE_NONE 0x00000000 /* Not initialized */
+#define MODE_DCE 0x00000080 /* DCE */
+#define MODE_HDLC 0x00000100 /* Raw HDLC frames */
+#define MODE_CISCO 0x00000200
+#define MODE_PPP 0x00000400
+#define MODE_FR 0x00000800 /* Any LMI */
+#define MODE_FR_ANSI 0x00000801
+#define MODE_FR_CCITT 0x00000802
+#define MODE_X25 0x00001000
+#define MODE_MASK 0x0000FF00
+#define MODE_SOFT 0x80000000 /* Driver modes, using hardware HDLC */
+
+/* Lines */
+#define LINE_DEFAULT 0x00000000
+#define LINE_V35 0x00000001
+#define LINE_RS232 0x00000002
+#define LINE_X21 0x00000003
+#define LINE_T1 0x00000004
+#define LINE_E1 0x00000005
+#define LINE_MASK 0x000000FF
+#define LINE_LOOPBACK 0x80000000 /* On-card loopback */
+
+#define CLOCK_EXT 0 /* External TX and RX clock - DTE */
+#define CLOCK_INT 1 /* Internal TX and RX clock - DCE */
+#define CLOCK_TXINT 2 /* Internal TX and external RX clock */
+#define CLOCK_TXFROMRX 3 /* TX clock derived from external RX clock */
+
+
+#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
+#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10) /* max 10 bytes for FR */
+
+#ifdef __KERNEL__
+
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <net/syncppp.h>
+
+#define MAXLEN_LMISTAT 20 /* max size of status enquiry frame */
+
+#define LINK_STATE_RELIABLE 0x01
+#define LINK_STATE_REQUEST 0x02 /* full stat sent (DCE) / req pending (DTE) */
+#define LINK_STATE_CHANGED 0x04 /* change in PVCs state, send full report */
+#define LINK_STATE_FULLREP_SENT 0x08 /* full report sent */
+
+#define PVC_STATE_NEW 0x01
+#define PVC_STATE_ACTIVE 0x02
+#define PVC_STATE_FECN 0x08 /* FECN condition */
+#define PVC_STATE_BECN 0x10 /* BECN condition */
+
+
+#define FR_UI 0x03
+#define FR_PAD 0x00
+
+#define NLPID_IP 0xCC
+#define NLPID_IPV6 0x8E
+#define NLPID_SNAP 0x80
+#define NLPID_PAD 0x00
+#define NLPID_Q933 0x08
+
+
+#define LMI_DLCI 0 /* LMI DLCI */
+#define LMI_PROTO 0x08
+#define LMI_CALLREF 0x00 /* Call Reference */
+#define LMI_ANSI_LOCKSHIFT 0x95 /* ANSI lockshift */
+#define LMI_REPTYPE 1 /* report type */
+#define LMI_CCITT_REPTYPE 0x51
+#define LMI_ALIVE 3 /* keep alive */
+#define LMI_CCITT_ALIVE 0x53
+#define LMI_PVCSTAT 7 /* pvc status */
+#define LMI_CCITT_PVCSTAT 0x57
+#define LMI_FULLREP 0 /* full report */
+#define LMI_INTEGRITY 1 /* link integrity report */
+#define LMI_SINGLE 2 /* single pvc report */
+#define LMI_STATUS_ENQUIRY 0x75
+#define LMI_STATUS 0x7D /* reply */
+
+#define LMI_REPT_LEN 1 /* report type element length */
+#define LMI_INTEG_LEN 2 /* link integrity element length */
+
+#define LMI_LENGTH 13 /* standard LMI frame length */
+#define LMI_ANSI_LENGTH 14
+
+
+
+typedef struct {
+ unsigned ea1 : 1;
+ unsigned cr : 1;
+ unsigned dlcih: 6;
+
+ unsigned ea2 : 1;
+ unsigned de : 1;
+ unsigned becn : 1;
+ unsigned fecn : 1;
+ unsigned dlcil: 4;
+}__attribute__ ((packed)) fr_hdr;
+
+
+
+typedef struct { /* Used in Cisco and PPP mode */
+ u8 address;
+ u8 control;
+ u16 protocol;
+}__attribute__ ((packed)) hdlc_header;
+
+
+
+typedef struct {
+ u32 type; /* code */
+ u32 par1;
+ u32 par2;
+ u16 rel; /* reliability */
+ u32 time;
+}__attribute__ ((packed)) cisco_packet;
+#define CISCO_PACKET_LEN 18
+#define CISCO_BIG_PACKET_LEN 20
+
+
+
+typedef struct pvc_device_struct {
+ struct net_device netdev; /* PVC net device - must be first */
+ struct net_device_stats stats;
+ struct hdlc_device_struct *master;
+ struct pvc_device_struct *next;
+
+ u8 state;
+ u8 newstate;
+}pvc_device;
+
+
+
+typedef struct {
+ u32 last_errors; /* last errors bit list */
+ int last_poll; /* ! */
+ u8 T391; /* ! link integrity verification polling timer */
+ u8 T392; /* ! polling verification timer */
+ u8 N391; /* full status polling counter */
+ u8 N392; /* error threshold */
+ u8 N393; /* monitored events count */
+ u8 N391cnt;
+
+ u8 state; /* ! */
+ u32 txseq; /* ! TX sequence number - Cisco uses 4 bytes */
+ u32 rxseq; /* ! RX sequence number */
+}fr_lmi; /* ! means used in Cisco HDLC as well */
+
+
+typedef struct hdlc_device_struct {
+ /* to be initialized by hardware driver: */
+ struct net_device netdev; /* master net device - must be first */
+ struct net_device_stats stats;
+
+ struct ppp_device pppdev;
+ struct ppp_device *syncppp_ptr;
+
+ /* set_mode may be NULL if HDLC-only board */
+ int (*set_mode)(struct hdlc_device_struct *hdlc, int mode);
+ int (*open)(struct hdlc_device_struct *hdlc);
+ void (*close)(struct hdlc_device_struct *hdlc);
+ int (*xmit)(struct hdlc_device_struct *hdlc, struct sk_buff *skb);
+ int (*ioctl)(struct hdlc_device_struct *hdlc, struct ifreq *ifr,
+ int cmd);
+
+ /* Only in "hardware" FR modes etc. - may be NULL */
+ int (*create_pvc)(pvc_device *pvc);
+ void (*destroy_pvc)(pvc_device *pvc);
+ int (*open_pvc)(pvc_device *pvc);
+ void (*close_pvc)(pvc_device *pvc);
+
+ /* for hdlc.c internal use only */
+ pvc_device *first_pvc;
+ u16 pvc_count;
+ int mode;
+
+ struct timer_list timer;
+ fr_lmi lmi;
+}hdlc_device;
+
+
+int register_hdlc_device(hdlc_device *hdlc);
+void unregister_hdlc_device(hdlc_device *hdlc);
+void hdlc_netif_rx(hdlc_device *hdlc, struct sk_buff *skb);
+
+
+extern __inline__ struct net_device* hdlc_to_dev(hdlc_device *hdlc)
+{
+ return &hdlc->netdev;
+}
+
+
+extern __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev)
+{
+ return (hdlc_device*)dev;
+}
+
+
+extern __inline__ struct net_device* pvc_to_dev(pvc_device *pvc)
+{
+ return &pvc->netdev;
+}
+
+
+extern __inline__ pvc_device* dev_to_pvc(struct net_device *dev)
+{
+ return (pvc_device*)dev;
+}
+
+
+extern __inline__ const char *hdlc_to_name(hdlc_device *hdlc)
+{
+ return hdlc_to_dev(hdlc)->name;
+}
+
+
+extern __inline__ const char *pvc_to_name(pvc_device *pvc)
+{
+ return pvc_to_dev(pvc)->name;
+}
+
+
+extern __inline__ u16 status_to_dlci(hdlc_device *hdlc, u8 *status, u8 *state)
+{
+ *state &= ~(PVC_STATE_ACTIVE | PVC_STATE_NEW);
+ if (status[2] & 0x08)
+ *state |= PVC_STATE_NEW;
+ else if (status[2] & 0x02)
+ *state |= PVC_STATE_ACTIVE;
+
+ return ((status[0] & 0x3F)<<4) | ((status[1] & 0x78)>>3);
+}
+
+
+extern __inline__ void dlci_to_status(hdlc_device *hdlc, u16 dlci, u8 *status,
+ u8 state)
+{
+ status[0] = (dlci>>4) & 0x3F;
+ status[1] = ((dlci<<3) & 0x78) | 0x80;
+ status[2] = 0x80;
+
+ if (state & PVC_STATE_NEW)
+ status[2] |= 0x08;
+ else if (state & PVC_STATE_ACTIVE)
+ status[2] |= 0x02;
+}
+
+
+
+extern __inline__ u16 netdev_dlci(struct net_device *dev)
+{
+ return ntohs(*(u16*)dev->dev_addr);
+}
+
+
+
+extern __inline__ u16 q922_to_dlci(u8 *hdr)
+{
+ return ((hdr[0] & 0xFC)<<2) | ((hdr[1] & 0xF0)>>4);
+}
+
+
+
+extern __inline__ void dlci_to_q922(u8 *hdr, u16 dlci)
+{
+ hdr[0] = (dlci>>2) & 0xFC;
+ hdr[1] = ((dlci<<4) & 0xF0) | 0x01;
+}
+
+
+
+extern __inline__ int mode_is(hdlc_device *hdlc, int mask)
+{
+ return (hdlc->mode & mask) == mask;
+}
+
+
+
+extern __inline__ pvc_device* find_pvc(hdlc_device *hdlc, u16 dlci)
+{
+ pvc_device *pvc=hdlc->first_pvc;
+
+ while (pvc) {
+ if (netdev_dlci(&pvc->netdev) == dlci)
+ return pvc;
+ pvc=pvc->next;
+ }
+
+ return NULL;
+}
+
+
+
+extern __inline__ void debug_frame(const struct sk_buff *skb)
+{
+ int i;
+
+ for (i=0; i<skb->len; i++) {
+ if (i == 100) {
+ printk("...\n");
+ return;
+ }
+ printk(" %02X", skb->data[i]);
+ }
+ printk("\n");
+}
+
+
+#endif /* __KERNEL */
+#endif /* __HDLC_H */
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h
index 7e57075f8..70524a3a9 100644
--- a/include/linux/hippidevice.h
+++ b/include/linux/hippidevice.h
@@ -51,7 +51,9 @@ extern int hippi_header_parse(struct sk_buff *skb, unsigned char *haddr);
extern void hippi_net_init(void);
void hippi_setup(struct net_device *dev);
-extern struct net_device *init_hippi_dev(struct net_device *, int);
+extern struct net_device *init_hippi_dev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *alloc_hippi_dev(int sizeof_priv);
+extern int register_hipdev(struct net_device *dev);
extern void unregister_hipdev(struct net_device *dev);
#endif
diff --git a/include/linux/hysdn_if.h b/include/linux/hysdn_if.h
index 68cc72078..6c4bb8701 100644
--- a/include/linux/hysdn_if.h
+++ b/include/linux/hysdn_if.h
@@ -1,4 +1,4 @@
-/* $Id: hysdn_if.h,v 1.1 2000/02/10 19:47:50 werner Exp $
+/* $Id: hysdn_if.h,v 1.1.8.1 2001/03/13 16:17:10 kai Exp $
* Linux driver for HYSDN cards, ioctl definitions shared by hynetmgr and driver.
* written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: hysdn_if.h,v $
+ * Revision 1.1.8.1 2001/03/13 16:17:10 kai
+ * spelling fixes from 2.4.3-pre
+ *
* Revision 1.1 2000/02/10 19:47:50 werner
*
* Initial release
@@ -30,7 +33,7 @@
/****************/
/* error values */
/****************/
-#define ERR_NONE 0 /* no error occured */
+#define ERR_NONE 0 /* no error occurred */
#define ERR_ALREADY_BOOT 1000 /* we are already booting */
#define EPOF_BAD_MAGIC 1001 /* bad magic in POF header */
#define ERR_BOARD_DPRAM 1002 /* board DPRAM failed */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 4a9eb86c8..546c573a4 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -454,7 +454,7 @@ union i2c_smbus_data {
* corresponding header files.
*/
/* -> bit-adapter specific ioctls */
-#define I2C_RETRIES 0x0701 /* number times a device adress should */
+#define I2C_RETRIES 0x0701 /* number times a device address should */
/* be polled when not acknowledging */
#define I2C_TIMEOUT 0x0702 /* set timeout - call with int */
@@ -471,7 +471,7 @@ union i2c_smbus_data {
#define I2C_FUNCS 0x0705 /* Get the adapter functionality */
#define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/
#if 0
-#define I2C_ACK_TEST 0x0710 /* See if a slave is at a specific adress */
+#define I2C_ACK_TEST 0x0710 /* See if a slave is at a specific address */
#endif
#define I2C_SMBUS 0x0720 /* SMBus-level access */
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index a1f424cff..396dbb550 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -50,9 +50,11 @@
#define ARPHRD_X25 271 /* CCITT X.25 */
#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
#define ARPHRD_PPP 512
-#define ARPHRD_HDLC 513 /* (Cisco) HDLC */
+#define ARPHRD_CISCO 513 /* Cisco HDLC */
+#define ARPHRD_HDLC ARPHRD_CISCO
#define ARPHRD_LAPB 516 /* LAPB */
#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */
+#define ARPHRD_RAWHDLC 518 /* Raw HDLC */
#define ARPHRD_TUNNEL 768 /* IPIP tunnel */
#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h
index d077aeb57..791127363 100644
--- a/include/linux/if_bonding.h
+++ b/include/linux/if_bonding.h
@@ -9,7 +9,7 @@
* (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
*
* This software may be used and distributed according to the terms
- * of the GNU Public License, incorporated herein by reference.
+ * of the GNU General Public License, incorporated herein by reference.
*
*/
diff --git a/include/linux/if_eql.h b/include/linux/if_eql.h
index 8cc5867e2..112a3df19 100644
--- a/include/linux/if_eql.h
+++ b/include/linux/if_eql.h
@@ -6,7 +6,7 @@
*
*
* This software may be used and distributed according to the terms
- * of the GNU Public License, incorporated herein by reference.
+ * of the GNU General Public License, incorporated herein by reference.
*
* The author may be reached as simon@ncm.com, or C/O
* NCM
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 3765c740f..e691fdccc 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -192,9 +192,9 @@ struct frad_local
int register_frad(const char *name);
int unregister_frad(const char *name);
-int (*dlci_ioctl_hook)(unsigned int, void *);
+extern int (*dlci_ioctl_hook)(unsigned int, void *);
-#endif __KERNEL__
+#endif /* __KERNEL__ */
#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
diff --git a/include/linux/init.h b/include/linux/init.h
index 8ffe2aeef..a94d2376c 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -86,7 +86,27 @@ extern struct kernel_param __setup_start, __setup_end;
#define __FINIT .previous
#define __INITDATA .section ".data.init","aw"
+/**
+ * module_init() - driver initialization entry point
+ * @x: function to be run at kernel boot time or module insertion
+ *
+ * module_init() will add the driver initialization routine in
+ * the "__initcall.int" code segment if the driver is checked as
+ * "y" or static, or else it will wrap the driver initialization
+ * routine with init_module() which is used by insmod and
+ * modprobe when the driver is used as a module.
+ */
#define module_init(x) __initcall(x);
+
+/**
+ * module_exit() - driver exit entry point
+ * @x: function to be run when driver is removed
+ *
+ * module_exit() will wrap the driver clean-up code
+ * with cleanup_module() when used with rmmod when
+ * the driver is a module. If the driver is statically
+ * compiled into the kernel, module_exit() has no effect.
+ */
#define module_exit(x) __exitcall(x);
#else
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h
index 732daa453..2564aa1ff 100644
--- a/include/linux/isdn_ppp.h
+++ b/include/linux/isdn_ppp.h
@@ -76,7 +76,7 @@ struct isdn_ppp_comp_data {
*
* We use this same struct for the reset entry of the compressor to commu-
* nicate to its caller how to deal with sending of a Reset Ack. In this
- * case, expra is not used, but other options still apply (supressing
+ * case, expra is not used, but other options still apply (suppressing
* sending with rsend, appending arbitrary data, etc).
*/
diff --git a/include/linux/loop.h b/include/linux/loop.h
index d276911c0..983cb6a3d 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -9,17 +9,23 @@
* Written by Theodore Ts'o, 3/29/93.
*
* Copyright 1993 by Theodore Ts'o. Redistribution of this file is
- * permitted under the GNU Public License.
+ * permitted under the GNU General Public License.
*/
#define LO_NAME_SIZE 64
#define LO_KEY_SIZE 32
#ifdef __KERNEL__
-
+
+/* Possible states of device */
+enum {
+ Lo_unbound,
+ Lo_bound,
+ Lo_rundown,
+};
+
struct loop_device {
int lo_number;
- struct dentry *lo_dentry;
int lo_refcnt;
kdev_t lo_device;
int lo_offset;
@@ -39,19 +45,38 @@ struct loop_device {
struct file * lo_backing_file;
void *key_data;
char key_reserved[48]; /* for use by the filter modules */
+
+ int old_gfp_mask;
+
+ spinlock_t lo_lock;
+ struct buffer_head *lo_bh;
+ struct buffer_head *lo_bhtail;
+ int lo_state;
+ struct semaphore lo_sem;
+ struct semaphore lo_ctl_mutex;
+ struct semaphore lo_bh_mutex;
+ atomic_t lo_pending;
};
typedef int (* transfer_proc_t)(struct loop_device *, int cmd,
char *raw_buf, char *loop_buf, int size,
int real_block);
+extern inline int lo_do_transfer(struct loop_device *lo, int cmd, char *rbuf,
+ char *lbuf, int size, int rblock)
+{
+ if (!lo->transfer)
+ return 0;
+
+ return lo->transfer(lo, cmd, rbuf, lbuf, size, rblock);
+}
#endif /* __KERNEL__ */
/*
* Loop flags
*/
-#define LO_FLAGS_DO_BMAP 0x00000001
-#define LO_FLAGS_READ_ONLY 0x00000002
+#define LO_FLAGS_DO_BMAP 1
+#define LO_FLAGS_READ_ONLY 2
/*
* Note that this structure gets the wrong offsets when directly used
@@ -102,9 +127,8 @@ struct loop_info {
/* Support for loadable transfer modules */
struct loop_func_table {
int number; /* filter type */
- int (*transfer)(struct loop_device *lo, int cmd,
- char *raw_buf, char *loop_buf, int size,
- int real_block);
+ int (*transfer)(struct loop_device *lo, int cmd, char *raw_buf,
+ char *loop_buf, int size, int real_block);
int (*init)(struct loop_device *, struct loop_info *);
/* release is called from loop_unregister_transfer or clr_fd */
int (*release)(struct loop_device *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f6c7cc6e2..86bc813ad 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -395,12 +395,26 @@ extern int remap_page_range(unsigned long from, unsigned long to, unsigned long
extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t prot);
extern void vmtruncate(struct inode * inode, loff_t offset);
+extern pmd_t *FASTCALL(__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address));
+extern pte_t *FASTCALL(pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address));
extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access);
extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int len);
extern int ptrace_writedata(struct task_struct *tsk, char * src, unsigned long dst, int len);
+/*
+ * On a two-level page table, this ends up being trivial. Thus the
+ * inlining and the symmetry break with pte_alloc() that does all
+ * of this out-of-line.
+ */
+static inline pmd_t *pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+{
+ if (!pgd_present(*pgd))
+ return __pmd_alloc(mm, pgd, address);
+ return pmd_offset(pgd, address);
+}
+
extern int pgt_cache_water[2];
extern int check_pgt_cache(void);
@@ -481,11 +495,6 @@ extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int);
#define GFP_DMA __GFP_DMA
-/* Flag - indicates that the buffer can be taken from high memory which is not
- permanently mapped by the kernel */
-
-#define GFP_HIGHMEM __GFP_HIGHMEM
-
/* vma is the first one with address < vma->vm_end,
* and even address < vma->vm_start. Have to extend vma. */
static inline int expand_stack(struct vm_area_struct * vma, unsigned long address)
@@ -497,11 +506,13 @@ static inline int expand_stack(struct vm_area_struct * vma, unsigned long addres
if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur)
return -ENOMEM;
+ spin_lock(&vma->vm_mm->page_table_lock);
vma->vm_start = address;
vma->vm_pgoff -= grow;
vma->vm_mm->total_vm += grow;
if (vma->vm_flags & VM_LOCKED)
vma->vm_mm->locked_vm += grow;
+ spin_unlock(&vma->vm_mm->page_table_lock);
return 0;
}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index c14decdfc..7e4e9f98e 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -21,6 +21,14 @@ typedef struct free_area_struct {
struct pglist_data;
+/*
+ * On machines where it is needed (eg PCs) we divide physical memory
+ * into multiple physical zones. On a PC we have 3 zones:
+ *
+ * ZONE_DMA < 16 MB ISA DMA capable memory
+ * ZONE_NORMAL 16-896 MB direct mapped by the kernel
+ * ZONE_HIGHMEM > 896 MB only page cache and user processes
+ */
typedef struct zone_struct {
/*
* Commonly accessed fields:
@@ -75,6 +83,17 @@ typedef struct zonelist_struct {
#define NR_GFPINDEX 0x100
+/*
+ * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
+ * (mostly NUMA machines?) to denote a higher-level memory zone than the
+ * zone_struct denotes.
+ *
+ * On NUMA machines, each NUMA node would have a pg_data_t to describe
+ * it's memory layout.
+ *
+ * XXX: we need to move the global memory statistics (active_list, ...)
+ * into the pg_data_t to properly support NUMA.
+ */
struct bootmem_data;
typedef struct pglist_data {
zone_t node_zones[MAX_NR_ZONES];
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h
index 419774655..0b015c238 100644
--- a/include/linux/n_r3964.h
+++ b/include/linux/n_r3964.h
@@ -7,7 +7,7 @@
* http://www.pap-philips.de
* -----------------------------------------------------------
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*
* Author:
* L. Haag
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 462091674..011caf23d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -41,6 +41,9 @@
struct divert_blk;
+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
+ functions are available. */
+
#define NET_XMIT_SUCCESS 0
#define NET_XMIT_DROP 1 /* skb dropped */
#define NET_XMIT_CN 2 /* congestion notification */
@@ -630,14 +633,9 @@ extern void fddi_setup(struct net_device *dev);
extern void tr_setup(struct net_device *dev);
extern void fc_setup(struct net_device *dev);
extern void fc_freedev(struct net_device *dev);
-extern int ether_config(struct net_device *dev, struct ifmap *map);
/* Support for loadable net-drivers */
extern int register_netdev(struct net_device *dev);
extern void unregister_netdev(struct net_device *dev);
-extern int register_trdev(struct net_device *dev);
-extern void unregister_trdev(struct net_device *dev);
-extern int register_fcdev(struct net_device *dev);
-extern void unregister_fcdev(struct net_device *dev);
/* Functions used for multicast support */
extern void dev_mc_upload(struct net_device *dev);
extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
diff --git a/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 100644
index 000000000..aadb39580
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1,10 @@
+#ifndef _IPT_TCPMSS_H
+#define _IPT_TCPMSS_H
+
+struct ipt_tcpmss_info {
+ u_int16_t mss;
+};
+
+#define IPT_TCPMSS_CLAMP_PMTU 0xffff
+
+#endif /*_IPT_TCPMSS_H*/
diff --git a/include/linux/netfilter_ipv4/ipt_tcpmss.h b/include/linux/netfilter_ipv4/ipt_tcpmss.h
new file mode 100644
index 000000000..e2b14397f
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_tcpmss.h
@@ -0,0 +1,9 @@
+#ifndef _IPT_TCPMSS_MATCH_H
+#define _IPT_TCPMSS_MATCH_H
+
+struct ipt_tcpmss_match_info {
+ u_int16_t mss_min, mss_max;
+ u_int8_t invert;
+};
+
+#endif /*_IPT_TCPMSS_MATCH_H*/
diff --git a/include/linux/openpic.h b/include/linux/openpic.h
deleted file mode 100644
index b4a9ecab1..000000000
--- a/include/linux/openpic.h
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * linux/openpic.h -- OpenPIC definitions
- *
- * Copyright (C) 1997 Geert Uytterhoeven
- *
- * This file is based on the following documentation:
- *
- * The Open Programmable Interrupt Controller (PIC)
- * Register Interface Specification Revision 1.2
- *
- * Issue Date: October 1995
- *
- * Issued jointly by Advanced Micro Devices and Cyrix Corporation
- *
- * AMD is a registered trademark of Advanced Micro Devices, Inc.
- * Copyright (C) 1995, Advanced Micro Devices, Inc. and Cyrix, Inc.
- * All Rights Reserved.
- *
- * To receive a copy of this documentation, send an email to openpic@amd.com.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-#ifndef _LINUX_OPENPIC_H
-#define _LINUX_OPENPIC_H
-
-#if !defined(__powerpc__) && !defined(__i386__)
-#error Unsupported OpenPIC platform
-#endif
-
-
-#ifdef __KERNEL__
-
- /*
- * OpenPIC supports up to 2048 interrupt sources and up to 32 processors
- */
-
-#define OPENPIC_MAX_SOURCES 2048
-#define OPENPIC_MAX_PROCESSORS 32
-
-#define OPENPIC_NUM_TIMERS 4
-#define OPENPIC_NUM_IPI 4
-#define OPENPIC_NUM_PRI 16
-#define OPENPIC_NUM_VECTORS 256
-
-
- /*
- * Vector numbers
- */
-
-#define OPENPIC_VEC_SOURCE 16 /* and up */
-#define OPENPIC_VEC_TIMER 64 /* and up */
-#define OPENPIC_VEC_IPI 72 /* and up */
-#define OPENPIC_VEC_SPURIOUS 127
-
-
- /*
- * OpenPIC Registers are 32 bits and aligned on 128 bit boundaries
- */
-
-typedef struct _OpenPIC_Reg {
- u_int Reg; /* Little endian! */
- char Pad[0xc];
-} OpenPIC_Reg;
-
-
- /*
- * Per Processor Registers
- */
-
-typedef struct _OpenPIC_Processor {
- /*
- * Private Shadow Registers (for SLiC backwards compatibility)
- */
- u_int IPI0_Dispatch_Shadow; /* Write Only */
- char Pad1[0x4];
- u_int IPI0_Vector_Priority_Shadow; /* Read/Write */
- char Pad2[0x34];
- /*
- * Interprocessor Interrupt Command Ports
- */
- OpenPIC_Reg _IPI_Dispatch[OPENPIC_NUM_IPI]; /* Write Only */
- /*
- * Current Task Priority Register
- */
- OpenPIC_Reg _Current_Task_Priority; /* Read/Write */
-#ifndef __powerpc__
- /*
- * Who Am I Register
- */
- OpenPIC_Reg _Who_Am_I; /* Read Only */
-#else
- char Pad3[0x10];
-#endif
-#ifndef __i386__
- /*
- * Interrupt Acknowledge Register
- */
- OpenPIC_Reg _Interrupt_Acknowledge; /* Read Only */
-#else
- char Pad4[0x10];
-#endif
- /*
- * End of Interrupt (EOI) Register
- */
- OpenPIC_Reg _EOI; /* Read/Write */
- char Pad5[0xf40];
-} OpenPIC_Processor;
-
-
- /*
- * Timer Registers
- */
-
-typedef struct _OpenPIC_Timer {
- OpenPIC_Reg _Current_Count; /* Read Only */
- OpenPIC_Reg _Base_Count; /* Read/Write */
- OpenPIC_Reg _Vector_Priority; /* Read/Write */
- OpenPIC_Reg _Destination; /* Read/Write */
-} OpenPIC_Timer;
-
-
- /*
- * Global Registers
- */
-
-typedef struct _OpenPIC_Global {
- /*
- * Feature Reporting Registers
- */
- OpenPIC_Reg _Feature_Reporting0; /* Read Only */
- OpenPIC_Reg _Feature_Reporting1; /* Future Expansion */
- /*
- * Global Configuration Registers
- */
- OpenPIC_Reg _Global_Configuration0; /* Read/Write */
- OpenPIC_Reg _Global_Configuration1; /* Future Expansion */
- /*
- * Vendor Specific Registers
- */
- OpenPIC_Reg _Vendor_Specific[4];
- /*
- * Vendor Identification Register
- */
- OpenPIC_Reg _Vendor_Identification; /* Read Only */
- /*
- * Processor Initialization Register
- */
- OpenPIC_Reg _Processor_Initialization; /* Read/Write */
- /*
- * IPI Vector/Priority Registers
- */
- OpenPIC_Reg _IPI_Vector_Priority[OPENPIC_NUM_IPI]; /* Read/Write */
- /*
- * Spurious Vector Register
- */
- OpenPIC_Reg _Spurious_Vector; /* Read/Write */
- /*
- * Global Timer Registers
- */
- OpenPIC_Reg _Timer_Frequency; /* Read/Write */
- OpenPIC_Timer Timer[OPENPIC_NUM_TIMERS];
- char Pad1[0xee00];
-} OpenPIC_Global;
-
-
- /*
- * Interrupt Source Registers
- */
-
-typedef struct _OpenPIC_Source {
- OpenPIC_Reg _Vector_Priority; /* Read/Write */
- OpenPIC_Reg _Destination; /* Read/Write */
-} OpenPIC_Source;
-
-
- /*
- * OpenPIC Register Map
- */
-
-struct OpenPIC {
-#ifndef __powerpc__
- /*
- * Per Processor Registers --- Private Access
- */
- OpenPIC_Processor Private;
-#else
- char Pad1[0x1000];
-#endif
- /*
- * Global Registers
- */
- OpenPIC_Global Global;
- /*
- * Interrupt Source Configuration Registers
- */
- OpenPIC_Source Source[OPENPIC_MAX_SOURCES];
- /*
- * Per Processor Registers
- */
- OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
-};
-
-extern volatile struct OpenPIC *OpenPIC;
-extern u_int OpenPIC_NumInitSenses;
-extern u_char *OpenPIC_InitSenses;
-
-
- /*
- * Current Task Priority Register
- */
-
-#define OPENPIC_CURRENT_TASK_PRIORITY_MASK 0x0000000f
-
- /*
- * Who Am I Register
- */
-
-#define OPENPIC_WHO_AM_I_ID_MASK 0x0000001f
-
- /*
- * Feature Reporting Register 0
- */
-
-#define OPENPIC_FEATURE_LAST_SOURCE_MASK 0x07ff0000
-#define OPENPIC_FEATURE_LAST_SOURCE_SHIFT 16
-#define OPENPIC_FEATURE_LAST_PROCESSOR_MASK 0x00001f00
-#define OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT 8
-#define OPENPIC_FEATURE_VERSION_MASK 0x000000ff
-
- /*
- * Global Configuration Register 0
- */
-
-#define OPENPIC_CONFIG_RESET 0x80000000
-#define OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE 0x20000000
-#define OPENPIC_CONFIG_BASE_MASK 0x000fffff
-
- /*
- * Vendor Identification Register
- */
-
-#define OPENPIC_VENDOR_ID_STEPPING_MASK 0x00ff0000
-#define OPENPIC_VENDOR_ID_STEPPING_SHIFT 16
-#define OPENPIC_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00
-#define OPENPIC_VENDOR_ID_DEVICE_ID_SHIFT 8
-#define OPENPIC_VENDOR_ID_VENDOR_ID_MASK 0x000000ff
-
- /*
- * Vector/Priority Registers
- */
-
-#define OPENPIC_MASK 0x80000000
-#define OPENPIC_ACTIVITY 0x40000000 /* Read Only */
-#define OPENPIC_PRIORITY_MASK 0x000f0000
-#define OPENPIC_PRIORITY_SHIFT 16
-#define OPENPIC_VECTOR_MASK 0x000000ff
-
-
- /*
- * Interrupt Source Registers
- */
-
-#define OPENPIC_POLARITY_POSITIVE 0x00800000
-#define OPENPIC_POLARITY_NEGATIVE 0x00000000
-#define OPENPIC_POLARITY_MASK 0x00800000
-#define OPENPIC_SENSE_LEVEL 0x00400000
-#define OPENPIC_SENSE_EDGE 0x00000000
-#define OPENPIC_SENSE_MASK 0x00400000
-
-
- /*
- * Timer Registers
- */
-
-#define OPENPIC_COUNT_MASK 0x7fffffff
-#define OPENPIC_TIMER_TOGGLE 0x80000000
-#define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000
-
-
- /*
- * Aliases to make life simpler
- */
-
-/* Per Processor Registers */
-#define IPI_Dispatch(i) _IPI_Dispatch[i].Reg
-#define Current_Task_Priority _Current_Task_Priority.Reg
-#ifndef __powerpc__
-#define Who_Am_I _Who_Am_I.Reg
-#endif
-#ifndef __i386__
-#define Interrupt_Acknowledge _Interrupt_Acknowledge.Reg
-#endif
-#define EOI _EOI.Reg
-
-/* Global Registers */
-#define Feature_Reporting0 _Feature_Reporting0.Reg
-#define Feature_Reporting1 _Feature_Reporting1.Reg
-#define Global_Configuration0 _Global_Configuration0.Reg
-#define Global_Configuration1 _Global_Configuration1.Reg
-#define Vendor_Specific(i) _Vendor_Specific[i].Reg
-#define Vendor_Identification _Vendor_Identification.Reg
-#define Processor_Initialization _Processor_Initialization.Reg
-#define IPI_Vector_Priority(i) _IPI_Vector_Priority[i].Reg
-#define Spurious_Vector _Spurious_Vector.Reg
-#define Timer_Frequency _Timer_Frequency.Reg
-
-/* Timer Registers */
-#define Current_Count _Current_Count.Reg
-#define Base_Count _Base_Count.Reg
-#define Vector_Priority _Vector_Priority.Reg
-#define Destination _Destination.Reg
-
-/* Interrupt Source Registers */
-#define Vector_Priority _Vector_Priority.Reg
-#define Destination _Destination.Reg
-
- /*
- * OpenPIC Operations
- */
-
-/* Global Operations */
-extern void openpic_init(int);
-extern void openpic_reset(void);
-extern void openpic_enable_8259_pass_through(void);
-extern void openpic_disable_8259_pass_through(void);
-#ifndef __i386__
-extern u_int openpic_irq(u_int cpu);
-#endif
-#ifndef __powerpc__
-extern void openpic_eoi(void);
-extern u_int openpic_get_priority(void);
-extern void openpic_set_priority(u_int pri);
-#else
-extern void openpic_eoi(u_int cpu);
-extern u_int openpic_get_priority(u_int cpu);
-extern void openpic_set_priority(u_int cpu, u_int pri);
-#endif
-extern u_int openpic_get_spurious(void);
-extern void openpic_set_spurious(u_int vector);
-extern void openpic_init_processor(u_int cpumask);
-
-/* Interprocessor Interrupts */
-extern void openpic_initipi(u_int ipi, u_int pri, u_int vector);
-#ifndef __powerpc__
-extern void openpic_cause_IPI(u_int ipi, u_int cpumask);
-#else
-extern void openpic_cause_IPI(u_int cpu, u_int ipi, u_int cpumask);
-#endif
-
-/* Timer Interrupts */
-extern void openpic_inittimer(u_int timer, u_int pri, u_int vector);
-extern void openpic_maptimer(u_int timer, u_int cpumask);
-
-/* Interrupt Sources */
-extern void openpic_enable_irq(u_int irq);
-extern void openpic_disable_irq(u_int irq);
-extern void openpic_initirq(u_int irq, u_int pri, u_int vector, int polarity,
- int is_level);
-extern void openpic_mapirq(u_int irq, u_int cpumask);
-extern void openpic_set_sense(u_int irq, int sense);
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_OPENPIC_H */
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index cf2ea8584..d780e183d 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -29,10 +29,14 @@
#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
#define page_cache_get(x) get_page(x)
-#define page_cache_alloc() alloc_pages(GFP_HIGHUSER, 0)
#define page_cache_free(x) __free_page(x)
#define page_cache_release(x) __free_page(x)
+static inline struct page *page_cache_alloc(struct address_space *x)
+{
+ return alloc_pages(x->gfp_mask, 0);
+}
+
/*
* From a kernel address, get the "struct page *"
*/
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 205abe61e..6545dd7fc 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -527,6 +527,7 @@ int pci_write_config_dword(struct pci_dev *dev, int where, u32 val);
int pci_enable_device(struct pci_dev *dev);
void pci_set_master(struct pci_dev *dev);
+int pci_set_dma_mask(struct pci_dev *dev, dma_addr_t mask);
int pci_set_power_state(struct pci_dev *dev, int state);
int pci_assign_resource(struct pci_dev *dev, int i);
@@ -539,6 +540,9 @@ void pdev_sort_resources(struct pci_dev *, struct resource_list *, u32);
unsigned long pci_bridge_check_io(struct pci_dev *);
void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
int (*)(struct pci_dev *, u8, u8));
+#define HAVE_PCI_REQ_REGIONS
+int pci_request_regions(struct pci_dev *, char *);
+void pci_release_regions(struct pci_dev *);
/* New-style probing supporting hot-pluggable devices */
int pci_register_driver(struct pci_driver *);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9bac118e3..80a6092c2 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -510,7 +510,10 @@
#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
#define PCI_DEVICE_ID_APPLE_GC 0x0002
#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
-#define PCI_DEVICE_ID_APPLE_UNINORTH 0x0020
+#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018
+#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021
#define PCI_VENDOR_ID_YAMAHA 0x1073
#define PCI_DEVICE_ID_YAMAHA_724 0x0004
@@ -564,9 +567,16 @@
#define PCI_VENDOR_ID_SUN 0x108e
#define PCI_DEVICE_ID_SUN_EBUS 0x1000
#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001
+#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100
+#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101
+#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102
+#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103
+#define PCI_DEVICE_ID_SUN_GEM 0x2bad
#define PCI_DEVICE_ID_SUN_SIMBA 0x5000
#define PCI_DEVICE_ID_SUN_PBM 0x8000
+#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001
#define PCI_DEVICE_ID_SUN_SABRE 0xa000
+#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
#define PCI_VENDOR_ID_CMD 0x1095
#define PCI_DEVICE_ID_CMD_640 0x0640
diff --git a/include/linux/pg.h b/include/linux/pg.h
index c752a97ca..db994bb0c 100644
--- a/include/linux/pg.h
+++ b/include/linux/pg.h
@@ -1,5 +1,5 @@
/* pg.h (c) 1998 Grant R. Guenther <grant@torque.net>
- Under the terms of the GNU public license
+ Under the terms of the GNU General Public License
pg.h defines the user interface to the generic ATAPI packet
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 68c48ae0c..d3e038472 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -167,7 +167,7 @@ extern int current_is_keventd(void);
*/
struct files_struct {
atomic_t count;
- rwlock_t file_lock;
+ rwlock_t file_lock; /* Protects all the below members. Nests inside tsk->alloc_lock */
int max_fds;
int max_fdset;
int next_fd;
@@ -208,10 +208,13 @@ struct mm_struct {
atomic_t mm_users; /* How many users with user space? */
atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
int map_count; /* number of VMAs */
- struct semaphore mmap_sem;
- spinlock_t page_table_lock;
+ struct rw_semaphore mmap_sem;
+ spinlock_t page_table_lock; /* Protects task page tables and mm->rss */
- struct list_head mmlist; /* List of all active mm's */
+ struct list_head mmlist; /* List of all active mm's. These are globally strung
+ * together off init_mm.mmlist, and are protected
+ * by mmlist_lock
+ */
unsigned long start_code, end_code, start_data, end_data;
unsigned long start_brk, brk, start_stack;
@@ -236,7 +239,7 @@ extern int mmlist_nr;
mm_users: ATOMIC_INIT(2), \
mm_count: ATOMIC_INIT(1), \
map_count: 1, \
- mmap_sem: __MUTEX_INITIALIZER(name.mmap_sem), \
+ mmap_sem: __RWSEM_INITIALIZER(name.mmap_sem, RW_LOCK_BIAS), \
page_table_lock: SPIN_LOCK_UNLOCKED, \
mmlist: LIST_HEAD_INIT(name.mmlist), \
}
@@ -859,6 +862,7 @@ static inline void unhash_process(struct task_struct *p)
write_unlock_irq(&tasklist_lock);
}
+/* Protects ->fs, ->files, ->mm, and synchronises with wait4(). Nests inside tasklist_lock */
static inline void task_lock(struct task_struct *p)
{
spin_lock(&p->alloc_lock);
diff --git a/include/linux/serial.h b/include/linux/serial.h
index b5ed862a9..d03c78ba4 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -139,7 +139,7 @@ struct serial_uart_config {
#define ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */
#define ASYNC_SHARE_IRQ 0x01000000 /* for multifunction cards
--- no longer used */
-#define ASYNC_NO_FLOW 0x00800000 /* No flow control serial console */
+#define ASYNC_CONS_FLOW 0x00800000 /* flow control for console */
#define ASYNC_INTERNAL_FLAGS 0xFF800000 /* Internal flags */
@@ -180,5 +180,6 @@ extern void unregister_serial(int line);
/* Allow complicated architectures to specify rs_table[] at run time */
extern int early_serial_setup(struct serial_struct *req);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SERIAL_H */
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
index 1545e60e1..0b81eb8f2 100644
--- a/include/linux/serialP.h
+++ b/include/linux/serialP.h
@@ -52,6 +52,7 @@ struct serial_state {
struct termios callout_termios;
int io_type;
struct async_struct *info;
+ struct pci_dev *dev;
};
struct async_struct {
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 09feb9501..be42ec4fa 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -156,8 +156,8 @@
* These register definitions are for the 16C950
*/
#define UART_ASR 0x01 /* Additional Status Register */
-#define UART_RFL 0x03 /* Transmitter FIFO level */
-#define UART_TFL 0x04 /* Receiver FIFO level */
+#define UART_RFL 0x03 /* Receiver FIFO level */
+#define UART_TFL 0x04 /* Transmitter FIFO level */
#define UART_ICR 0x05 /* Index Control Register */
/* The 16950 ICR registers */
diff --git a/include/linux/synclink.h b/include/linux/synclink.h
index a733c79f4..75254a954 100644
--- a/include/linux/synclink.h
+++ b/include/linux/synclink.h
@@ -6,7 +6,7 @@
* Copyright (C) 1998-2000 by Microgate Corporation
*
* Redistribution of this file is permitted under
- * the terms of the GNU Public License (GPL)
+ * the terms of the GNU General Public License (GPL)
*/
#ifndef _SYNCLINK_H_
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 07f2c83e9..cbfaafbfe 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -378,6 +378,10 @@ enum {
};
/* /proc/sys/net/ipx */
+enum {
+ NET_IPX_PPROP_BROADCASTING=1,
+ NET_IPX_FORWARDING=2
+};
/* /proc/sys/net/appletalk */
diff --git a/include/linux/tqueue.h b/include/linux/tqueue.h
index 65adeb9b7..4a730f0ad 100644
--- a/include/linux/tqueue.h
+++ b/include/linux/tqueue.h
@@ -42,6 +42,25 @@ struct tq_struct {
void *data; /* argument to function */
};
+/*
+ * Emit code to initialise a tq_struct's routine and data pointers
+ */
+#define PREPARE_TQUEUE(_tq, _routine, _data) \
+ do { \
+ (_tq)->routine = _routine; \
+ (_tq)->data = _data; \
+ } while (0)
+
+/*
+ * Emit code to initialise all of a tq_struct
+ */
+#define INIT_TQUEUE(_tq, _routine, _data) \
+ do { \
+ INIT_LIST_HEAD(&(_tq)->list); \
+ (_tq)->sync = 0; \
+ PREPARE_TQUEUE((_tq), (_routine), (_data)); \
+ } while (0)
+
typedef struct list_head task_queue;
#define DECLARE_TASK_QUEUE(q) LIST_HEAD(q)
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h
index a70f27946..f91119ab0 100644
--- a/include/linux/trdevice.h
+++ b/include/linux/trdevice.h
@@ -33,7 +33,10 @@ extern int tr_header(struct sk_buff *skb, struct net_device *dev,
void *saddr, unsigned len);
extern int tr_rebuild_header(struct sk_buff *skb);
extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev);
-extern struct net_device * init_trdev(struct net_device *, int);
+extern struct net_device *init_trdev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *alloc_trdev(int sizeof_priv);
+extern int register_trdev(struct net_device *dev);
+extern void unregister_trdev(struct net_device *dev);
#endif
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 057cb57a6..b396b93b2 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -307,6 +307,8 @@ struct tty_struct {
struct semaphore atomic_read;
struct semaphore atomic_write;
spinlock_t read_lock;
+ /* If the tty has a pending do_SAK, queue it here - akpm */
+ struct tq_struct SAK_tq;
};
/* tty magic number */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5ca846eb1..227d6048e 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -555,12 +555,18 @@ struct usb_operations {
int (*unlink_urb) (struct urb* purb);
};
+#define DEVNUM_ROUND_ROBIN /***** OPTION *****/
+
/*
* Allocated per bus we have
*/
struct usb_bus {
int busnum; /* Bus number (in order of reg) */
+#ifdef DEVNUM_ROUND_ROBIN
+ int devnum_next; /* Next open device number in round-robin allocation */
+#endif /* DEVNUM_ROUND_ROBIN */
+
struct usb_devmap devmap; /* Device map */
struct usb_operations *op; /* Operations (specific to the HC) */
struct usb_device *root_hub; /* Root hub */
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 7a73db598..d10f7a5c0 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -6,13 +6,12 @@
#ifdef __KERNEL__
-#if LINUX_VERSION_CODE >= 0x020100
#include <linux/poll.h>
-#endif
#include <linux/devfs_fs_kernel.h>
struct video_device
{
+ struct module *owner;
char name[32];
int type;
int hardware;