summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
commit9e30c3705aed9fbec4c3304570e4d6e707856bcb (patch)
treeb19e6acb5a67af31a4e7742e05c2166dc3f1444c /include
parent72919904796333a20c6a5d5c380091b42e407aa9 (diff)
Merge with Linux 2.3.22.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/pgtable.h2
-rw-r--r--include/asm-alpha/processor.h2
-rw-r--r--include/asm-mips64/bcache.h10
-rw-r--r--include/asm-mips64/paccess.h4
-rw-r--r--include/asm-ppc/keyboard.h29
-rw-r--r--include/asm-ppc/uaccess.h21
-rw-r--r--include/linux/adb.h95
-rw-r--r--include/linux/adb_mouse.h23
-rw-r--r--include/linux/capability.h5
-rw-r--r--include/linux/cuda.h36
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/iobuf.h2
-rw-r--r--include/linux/lp.h22
-rw-r--r--include/linux/parport.h4
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/pci_ids.h7
-rw-r--r--include/linux/pmu.h135
-rw-r--r--include/linux/ppp_channel.h5
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/sunrpc/xprt.h15
-rw-r--r--include/linux/wanrouter.h1
21 files changed, 394 insertions, 33 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index 004924b93..cc59d36df 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -622,6 +622,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#define kern_addr_valid(addr) (1)
#define io_remap_page_range(start, busaddr, size, prot) \
- remap_page_range(start, virt_to_phys(ioremap(busaddr)), size, prot)
+ remap_page_range(start, virt_to_phys(__ioremap(busaddr)), size, prot)
#endif /* _ALPHA_PGTABLE_H */
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
index 0c5163433..92654cd83 100644
--- a/include/asm-alpha/processor.h
+++ b/include/asm-alpha/processor.h
@@ -114,6 +114,8 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
/* Do necessary setup to start up a newly executed thread. */
extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
+struct task_struct;
+
/* Free all resources held by a thread. */
extern void release_thread(struct task_struct *);
diff --git a/include/asm-mips64/bcache.h b/include/asm-mips64/bcache.h
index 0df4edb7d..4ab0fca19 100644
--- a/include/asm-mips64/bcache.h
+++ b/include/asm-mips64/bcache.h
@@ -28,22 +28,22 @@ extern void sni_pcimt_sc_init(void);
extern struct bcache_ops *bcops;
-void inline bc_enable(void)
+extern inline void bc_enable(void)
{
bcops->bc_enable();
}
-void inline bc_disable(void)
+extern inline void bc_disable(void)
{
- bcops->bc_disble();
+ bcops->bc_disable();
}
-void bc_wback_inv(unsigned long page, unsigned long size)
+extern inline void bc_wback_inv(unsigned long page, unsigned long size)
{
bcops->bc_wback_inv(page, size);
}
-void bc_inv(unsigned long page, unsigned long size)
+extern inline void bc_inv(unsigned long page, unsigned long size)
{
bcops->bc_inv(page, size);
}
diff --git a/include/asm-mips64/paccess.h b/include/asm-mips64/paccess.h
index 0b97674cf..115da0cf2 100644
--- a/include/asm-mips64/paccess.h
+++ b/include/asm-mips64/paccess.h
@@ -19,8 +19,8 @@
#define put_dbe(x,ptr) __put_dbe((x),(ptr),sizeof(*(ptr)))
#define get_dbe(x,ptr) __get_dbe((x),(ptr),sizeof(*(ptr)))
-struct __large_struct { unsigned long buf[100]; };
-#define __m(x) (*(struct __large_struct *)(x))
+struct __large_pstruct { unsigned long buf[100]; };
+#define __m(x) (*(struct __large_pstruct *)(x))
#define __get_dbe(x,ptr,size) ({ \
long __gu_err; \
diff --git a/include/asm-ppc/keyboard.h b/include/asm-ppc/keyboard.h
index 01f470377..27ca7c887 100644
--- a/include/asm-ppc/keyboard.h
+++ b/include/asm-ppc/keyboard.h
@@ -19,6 +19,10 @@
#include <linux/adb.h>
#include <asm/machdep.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <asm/io.h>
+
#define KEYBOARD_IRQ 1
#define DISABLE_KBD_DURING_INTERRUPTS 0
#define INIT_KBD
@@ -72,6 +76,31 @@ static inline void kbd_init_hw(void)
extern unsigned long SYSRQ_KEY;
+/* resource allocation */
+#define kbd_request_region()
+#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
+ "keyboard", NULL)
+
+/* How to access the keyboard macros on this platform. */
+#define kbd_read_input() inb(KBD_DATA_REG)
+#define kbd_read_status() inb(KBD_STATUS_REG)
+#define kbd_write_output(val) outb(val, KBD_DATA_REG)
+#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
+
+/* Some stoneage hardware needs delays after some operations. */
+#define kbd_pause() do { } while(0)
+
+/*
+ * Machine specific bits for the PS/2 driver
+ */
+
+#define AUX_IRQ 12
+
+#define aux_request_irq(hand, dev_id) \
+ request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
+
+#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
+
#endif /* __KERNEL__ */
#endif /* __ASMPPC_KEYBOARD_H */
diff --git a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h
index b8afd599b..c2a9c91e5 100644
--- a/include/asm-ppc/uaccess.h
+++ b/include/asm-ppc/uaccess.h
@@ -259,7 +259,26 @@ strncpy_from_user(char *dst, const char *src, long count)
* Return 0 for error
*/
-extern long strlen_user(const char *);
+extern int __strnlen_user(const char *str, long len, unsigned long top);
+
+/*
+ * Returns the length of the string at str (including the null byte),
+ * or 0 if we hit a page we can't access,
+ * or something > len if we didn't find a null byte.
+ *
+ * The `top' parameter to __strnlen_user is to make sure that
+ * we can never overflow from the user area into kernel space.
+ */
+extern __inline__ int strnlen_user(const char *str, long len)
+{
+ unsigned long top = __kernel_ok? ~0UL: TASK_SIZE - 1;
+
+ if ((unsigned long)str > top)
+ return 0;
+ return __strnlen_user(str, len, top);
+}
+
+#define strlen_user(str) strnlen_user((str), 0x7ffffffe)
#endif /* __ASSEMBLY__ */
diff --git a/include/linux/adb.h b/include/linux/adb.h
new file mode 100644
index 000000000..639a6535d
--- /dev/null
+++ b/include/linux/adb.h
@@ -0,0 +1,95 @@
+/*
+ * Definitions for ADB (Apple Desktop Bus) support.
+ */
+#ifndef __ADB_H
+#define __ADB_H
+
+/* ADB commands */
+#define ADB_BUSRESET 0
+#define ADB_FLUSH(id) (0x01 | ((id) << 4))
+#define ADB_WRITEREG(id, reg) (0x08 | (reg) | ((id) << 4))
+#define ADB_READREG(id, reg) (0x0C | (reg) | ((id) << 4))
+
+/* ADB default device IDs (upper 4 bits of ADB command byte) */
+#define ADB_DONGLE 1 /* "software execution control" devices */
+#define ADB_KEYBOARD 2
+#define ADB_MOUSE 3
+#define ADB_TABLET 4
+#define ADB_MODEM 5
+#define ADB_MISC 7 /* maybe a monitor */
+
+#define ADB_RET_OK 0
+#define ADB_RET_TIMEOUT 3
+
+/* The kind of ADB request. The controller may emulate some
+ or all of those CUDA/PMU packet kinds */
+#define ADB_PACKET 0
+#define CUDA_PACKET 1
+#define ERROR_PACKET 2
+#define TIMER_PACKET 3
+#define POWER_PACKET 4
+#define MACIIC_PACKET 5
+#define PMU_PACKET 6
+
+#ifdef __KERNEL__
+
+struct adb_request {
+ unsigned char data[32];
+ int nbytes;
+ unsigned char reply[32];
+ int reply_len;
+ unsigned char reply_expected;
+ unsigned char sent;
+ unsigned char complete;
+ void (*done)(struct adb_request *);
+ void *arg;
+ struct adb_request *next;
+};
+
+struct adb_ids {
+ int nids;
+ unsigned char id[16];
+};
+
+/* Structure which encapsulates a low-level ADB driver */
+
+struct adb_driver {
+ char name[16];
+ int (*probe)(void);
+ int (*init)(void);
+ int (*send_request)(struct adb_request *req, int sync);
+ /*int (*write)(struct adb_request *req);*/
+ int (*autopoll)(int devs);
+ void (*poll)(void);
+ int (*reset_bus)(void);
+};
+
+/* Values for adb_request flags */
+#define ADBREQ_REPLY 1 /* expect reply */
+#define ADBREQ_SYNC 2 /* poll until done */
+#define ADBREQ_NOSEND 4 /* build the request, but don't send it */
+
+/* Messages sent thru the client_list notifier. You should NOT stop
+ the operation, at least not with this version */
+enum adb_message {
+ ADB_MSG_POWERDOWN, /* Currently called before sleep only */
+ ADB_MSG_PRE_RESET, /* Called before resetting the bus */
+ ADB_MSG_POST_RESET /* Called after resetting the bus (re-do init & register) */
+};
+extern struct adb_driver *adb_controller;
+extern struct notifier_block *adb_client_list;
+
+int adb_request(struct adb_request *req, void (*done)(struct adb_request *),
+ int flags, int nbytes, ...);
+int adb_register(int default_id,int handler_id,struct adb_ids *ids,
+ void (*handler)(unsigned char *, int, struct pt_regs *, int));
+void adb_poll(void);
+void adb_input(unsigned char *, int, struct pt_regs *, int);
+int adb_reset_bus(void);
+
+int adb_try_handler_change(int address, int new_id);
+int adb_get_infos(int address, int *original_address, int *handler_id);
+
+#endif /* __KERNEL__ */
+
+#endif /* __ADB_H */
diff --git a/include/linux/adb_mouse.h b/include/linux/adb_mouse.h
new file mode 100644
index 000000000..879178043
--- /dev/null
+++ b/include/linux/adb_mouse.h
@@ -0,0 +1,23 @@
+#ifndef _LINUX_ADB_MOUSE_H
+#define _LINUX_ADB_MOUSE_H
+
+/*
+ * linux/include/linux/mac_mouse.h
+ * header file for Macintosh ADB mouse driver
+ * 27-10-97 Michael Schmitz
+ * copied from:
+ * header file for Atari Mouse driver
+ * by Robert de Vries (robert@and.nl) on 19Jul93
+ */
+
+struct mouse_status {
+ char buttons;
+ short dx;
+ short dy;
+ int ready;
+ int active;
+ struct wait_queue *wait;
+ struct fasync_struct *fasyncptr;
+};
+
+#endif
diff --git a/include/linux/capability.h b/include/linux/capability.h
index fd3c97ac3..c73053d95 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -193,7 +193,6 @@ typedef __u32 kernel_cap_t;
/* Allow configuration of the secure attention key */
/* Allow administration of the random device */
-/* Allow device administration (mknod)*/
/* Allow examination and configuration of disk quotas */
/* Allow configuring the kernel's syslog (printk behaviour) */
/* Allow setting the domainname */
@@ -266,6 +265,10 @@ typedef __u32 kernel_cap_t;
#define CAP_SYS_TTY_CONFIG 26
+/* Allow the privileged aspects of mknod() */
+
+#define CAP_MKNOD 27
+
#ifdef __KERNEL__
/*
* Bounding set
diff --git a/include/linux/cuda.h b/include/linux/cuda.h
new file mode 100644
index 000000000..049448cc9
--- /dev/null
+++ b/include/linux/cuda.h
@@ -0,0 +1,36 @@
+/*
+ * Definitions for talking to the CUDA. The CUDA is a microcontroller
+ * which controls the ADB, system power, RTC, and various other things.
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ */
+
+/* CUDA commands (2nd byte) */
+#define CUDA_WARM_START 0
+#define CUDA_AUTOPOLL 1
+#define CUDA_GET_6805_ADDR 2
+#define CUDA_GET_TIME 3
+#define CUDA_GET_PRAM 7
+#define CUDA_SET_6805_ADDR 8
+#define CUDA_SET_TIME 9
+#define CUDA_POWERDOWN 0xa
+#define CUDA_POWERUP_TIME 0xb
+#define CUDA_SET_PRAM 0xc
+#define CUDA_MS_RESET 0xd
+#define CUDA_SEND_DFAC 0xe
+#define CUDA_RESET_SYSTEM 0x11
+#define CUDA_SET_IPL 0x12
+#define CUDA_SET_AUTO_RATE 0x14
+#define CUDA_GET_AUTO_RATE 0x16
+#define CUDA_SET_DEVICE_LIST 0x19
+#define CUDA_GET_DEVICE_LIST 0x1a
+#define CUDA_GET_SET_IIC 0x22
+
+#ifdef __KERNEL__
+
+void find_via_cuda(void);
+extern int cuda_request(struct adb_request *req,
+ void (*done)(struct adb_request *), int nbytes, ...);
+extern void cuda_poll(void);
+
+#endif /* __KERNEL */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d1ee10406..6d88414ea 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -916,7 +916,7 @@ extern unsigned int get_hardblocksize(kdev_t);
extern struct buffer_head * bread(kdev_t, int, int);
extern struct buffer_head * breada(kdev_t, int, int, unsigned int, unsigned int);
-extern int brw_page(int, struct page *, kdev_t, int [], int, int);
+extern int brw_page(int, struct page *, kdev_t, int [], int);
typedef int (*writepage_t)(struct file *, struct page *, unsigned long, unsigned long, const char *);
diff --git a/include/linux/iobuf.h b/include/linux/iobuf.h
index c5cb78aff..9418888f2 100644
--- a/include/linux/iobuf.h
+++ b/include/linux/iobuf.h
@@ -75,6 +75,6 @@ void kiobuf_wait_for_io(struct kiobuf *);
/* fs/buffer.c */
int brw_kiovec(int rw, int nr, struct kiobuf *iovec[],
- kdev_t dev, unsigned long b[], int size, int bmap);
+ kdev_t dev, unsigned long b[], int size);
#endif /* __LINUX_IOBUF_H */
diff --git a/include/linux/lp.h b/include/linux/lp.h
index bd03fdc8d..a02c3fff1 100644
--- a/include/linux/lp.h
+++ b/include/linux/lp.h
@@ -5,6 +5,7 @@
* usr/include/linux/lp.h c.1991-1992 James Wiegand
* many modifications copyright (C) 1992 Michael K. Johnson
* Interrupt support added 1993 Nigel Gamble
+ * Removed 8255 status defines from inside __KERNEL__ Marcelo Tosatti
*/
/*
@@ -28,6 +29,17 @@
#define LP_HAVE_PORT_BIT 12 /* (0x1000) Port is claimed. */
#define LP_PORT_BUSY (1<<13) /* Reading or writing. */
+/*
+ * bit defines for 8255 status port
+ * base + 1
+ * accessed with LP_S(minor), which gets the byte...
+ */
+#define LP_PBUSY 0x80 /* inverted input, active high */
+#define LP_PACK 0x40 /* unchanged input, active low */
+#define LP_POUTPA 0x20 /* unchanged input, active high */
+#define LP_PSELECD 0x10 /* unchanged input, active high */
+#define LP_PERRORP 0x08 /* unchanged input, active low */
+
/* timeout for each character. This is relative to bus cycles -- it
* is the count in a busy loop. THIS IS THE VALUE TO CHANGE if you
* have extremely slow printing, or if the machine seems to slow down
@@ -143,16 +155,6 @@ struct lp_struct {
* gets inverted, but it is also active low.
*/
-/*
- * bit defines for 8255 status port
- * base + 1
- * accessed with LP_S(minor), which gets the byte...
- */
-#define LP_PBUSY 0x80 /* inverted input, active high */
-#define LP_PACK 0x40 /* unchanged input, active low */
-#define LP_POUTPA 0x20 /* unchanged input, active high */
-#define LP_PSELECD 0x10 /* unchanged input, active high */
-#define LP_PERRORP 0x08 /* unchanged input, active low */
/*
* defines for 8255 control port
diff --git a/include/linux/parport.h b/include/linux/parport.h
index f1c6cb5af..b663548f6 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -71,6 +71,10 @@ typedef enum {
#define IEEE1284_MODE_EPPSL (1<<11) /* EPP 1.7 */
#define IEEE1284_MODE_EPPSWE (1<<12) /* Software-emulated */
#define IEEE1284_DEVICEID (1<<2) /* This is a flag */
+#define IEEE1284_EXT_LINK (1<<14) /* This flag causes the
+ * extensibility link to
+ * be requested, using
+ * bits 0-6. */
/* For the benefit of parport_read/write, you can use these with
* parport_negotiate to use address operations. They have no effect
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a52799997..2fe52c2b4 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -553,5 +553,10 @@ extern struct pci_fixup pcibios_fixups[];
void pci_fixup_device(int pass, struct pci_dev *dev);
+extern int pci_pci_problems;
+#define PCIPCI_FAIL 1
+#define PCIPCI_TRITON 2
+#define PCIPCI_NATOMA 4
+
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 94b391282..98a32ffb7 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -560,6 +560,9 @@
#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512
#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531
+#define PCI_VENDOR_ID_TCONRAD 0x10da
+#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508
+
#define PCI_VENDOR_ID_CERN 0x10dc
#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001
#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002
@@ -1073,8 +1076,8 @@
#define PCI_VENDOR_ID_HOLTEK 0x9412
#define PCI_DEVICE_ID_HOLTEK_6565 0x6565
-#define PCI_VENDOR_ID_EXSYS 0xd84d
-#define PCI_DEVICE_ID_EXSYS_4014 0x4014
+#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
+#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014
#define PCI_VENDOR_ID_TIGERJET 0xe159
#define PCI_DEVICE_ID_TIGERJET_300 0x0001
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
new file mode 100644
index 000000000..907b58c2d
--- /dev/null
+++ b/include/linux/pmu.h
@@ -0,0 +1,135 @@
+/*
+ * Definitions for talking to the PMU. The PMU is a microcontroller
+ * which controls battery charging and system power on PowerBook 3400
+ * and 2400 models as well as the RTC and various other things.
+ *
+ * Copyright (C) 1998 Paul Mackerras.
+ */
+
+#include <linux/config.h>
+/*
+ * PMU commands
+ */
+#define PMU_POWER_CTRL 0x11 /* control power of some devices */
+#define PMU_ADB_CMD 0x20 /* send ADB packet */
+#define PMU_ADB_POLL_OFF 0x21 /* disable ADB auto-poll */
+#define PMU_WRITE_NVRAM 0x33 /* write non-volatile RAM */
+#define PMU_READ_NVRAM 0x3b /* read non-volatile RAM */
+#define PMU_SET_RTC 0x30 /* set real-time clock */
+#define PMU_READ_RTC 0x38 /* read real-time clock */
+#define PMU_SET_VOLBUTTON 0x40 /* set volume up/down position */
+#define PMU_BACKLIGHT_BRIGHT 0x41 /* set backlight brightness */
+#define PMU_GET_VOLBUTTON 0x48 /* get volume up/down position */
+#define PMU_PCEJECT 0x4c /* eject PC-card from slot */
+#define PMU_BATTERY_STATE 0x6b /* report battery state etc. */
+#define PMU_SET_INTR_MASK 0x70 /* set PMU interrupt mask */
+#define PMU_INT_ACK 0x78 /* read interrupt bits */
+#define PMU_SHUTDOWN 0x7e /* turn power off */
+#define PMU_SLEEP 0x7f /* put CPU to sleep */
+#define PMU_RESET 0xd0 /* reset CPU */
+#define PMU_GET_BRIGHTBUTTON 0xd9 /* report brightness up/down pos */
+#define PMU_GET_COVER 0xdc /* report cover open/closed */
+
+/* Bits to use with the PMU_POWER_CTRL command */
+#define PMU_POW_ON 0x80 /* OR this to power ON the device */
+#define PMU_POW_OFF 0x00 /* leave bit 7 to 0 to power it OFF */
+#define PMU_POW_BACKLIGHT 0x01 /* backlight power */
+#define PMU_POW_IRLED 0x04 /* IR led power (on wallstreet) */
+
+/* Bits in PMU interrupt and interrupt mask bytes */
+#define PMU_INT_ADB_AUTO 0x04 /* ADB autopoll, when PMU_INT_ADB */
+#define PMU_INT_PCEJECT 0x04 /* PC-card eject buttons */
+#define PMU_INT_SNDBRT 0x08 /* sound/brightness up/down buttons */
+#define PMU_INT_ADB 0x10 /* ADB autopoll or reply data */
+#define PMU_INT_BATTERY 0x20
+#define PMU_INT_WAKEUP 0x40
+#define PMU_INT_TICK 0x80 /* 1-second tick interrupt */
+
+/* Kind of PMU (model) */
+enum {
+ PMU_UNKNOWN,
+ PMU_OHARE_BASED, /* 2400, 3400, 3500 (old G3 powerbook) */
+ PMU_HEATHROW_BASED, /* PowerBook G3 series */
+ PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */
+};
+
+/*
+ * Ioctl commands for the /dev/pmu device
+ */
+#include <linux/ioctl.h>
+
+/* no param */
+#define PMU_IOC_SLEEP _IO('B', 0)
+/* out param: u32* backlight value: 0 to 31 */
+#define PMU_IOC_GET_BACKLIGHT _IOR('B', 1, sizeof(__u32*))
+/* in param: u32 backlight value: 0 to 31 */
+#define PMU_IOC_SET_BACKLIGHT _IOW('B', 2, sizeof(__u32))
+/* out param: u32* backlight value: 0 to 31 */
+#define PMU_IOC_GET_MODEL _IOR('B', 3, sizeof(__u32*))
+
+#ifdef __KERNEL__
+
+int find_via_pmu(void);
+int via_pmu_init(void);
+
+int pmu_request(struct adb_request *req,
+ void (*done)(struct adb_request *), int nbytes, ...);
+void pmu_poll(void);
+
+void pmu_enable_backlight(int on);
+void pmu_set_brightness(int level);
+
+void pmu_enable_irled(int on);
+
+void pmu_restart(void);
+void pmu_shutdown(void);
+
+int pmu_present(void);
+int pmu_get_model(void);
+
+#ifdef CONFIG_PMAC_PBOOK
+/*
+ * Stuff for putting the powerbook to sleep and waking it again.
+ *
+ */
+#include <linux/list.h>
+
+struct pmu_sleep_notifier
+{
+ int (*notifier_call)(struct pmu_sleep_notifier *self, int when);
+ int priority;
+ struct list_head list;
+};
+
+/* Code values for calling sleep/wakeup handlers
+ *
+ * Note: If a sleep request got cancelled, all drivers will get
+ * the PBOOK_SLEEP_REJECT, even those who didn't get the PBOOK_SLEEP_REQUEST.
+ */
+#define PBOOK_SLEEP_REQUEST 1
+#define PBOOK_SLEEP_NOW 2
+#define PBOOK_SLEEP_REJECT 3
+#define PBOOK_WAKE 4
+
+/* Result codes returned by the notifiers */
+#define PBOOK_SLEEP_OK 0
+#define PBOOK_SLEEP_REFUSE -1
+
+/* priority levels in notifiers */
+#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */
+#define SLEEP_LEVEL_SOUND 90 /* Sound driver */
+#define SLEEP_LEVEL_MEDIABAY 80 /* Media bay driver */
+#define SLEEP_LEVEL_BLOCK 70 /* IDE, SCSI */
+#define SLEEP_LEVEL_NET 60 /* bmac */
+#define SLEEP_LEVEL_ADB 50 /* ADB */
+#define SLEEP_LEVEL_MISC 30 /* Anything */
+#define SLEEP_LEVEL_LAST 0 /* Anything */
+
+/* special register notifier functions */
+int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
+int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier);
+
+#endif /* CONFIG_PMAC_PBOOK */
+
+
+#endif /* __KERNEL */
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h
index d3b2e1a15..c68290358 100644
--- a/include/linux/ppp_channel.h
+++ b/include/linux/ppp_channel.h
@@ -14,10 +14,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * ==FILEVERSION 990717==
+ * ==FILEVERSION 990909==
*/
-/* $Id$ */
+/* $Id: ppp_channel.h,v 1.2 1999/09/15 11:21:53 paulus Exp $ */
#include <linux/list.h>
#include <linux/skbuff.h>
@@ -37,6 +37,7 @@ struct ppp_channel {
int xmit_qlen; /* length of transmit queue (bytes) */
int speed; /* transfer rate (bytes/second) */
int latency; /* overhead time in milliseconds */
+ int hdrlen; /* amount of headroom channel needs */
struct list_head list; /* link in list of channels per unit */
void *ppp; /* opaque to channel */
};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1ad6ea2b3..b568a7b7b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -701,6 +701,8 @@ extern void exit_fs(struct task_struct *);
extern void exit_files(struct task_struct *);
extern void exit_sighand(struct task_struct *);
+extern void daemonize(void);
+
extern int do_execve(char *, char **, char **, struct pt_regs *);
extern int do_fork(unsigned long, unsigned long, struct pt_regs *);
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index d72dba85b..5e01407fc 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -17,7 +17,7 @@
/*
* Maximum number of iov's we use.
*/
-#define MAX_IOVEC 8
+#define MAX_IOVEC 10
/*
* The transport code maintains an estimate on the maximum number of out-
@@ -44,7 +44,7 @@
#define RPC_MAXCWND (RPC_MAXCONG * RPC_CWNDSCALE)
#define RPC_INITCWND RPC_CWNDSCALE
#define RPCXPRT_CONGESTED(xprt) \
- ((xprt)->cong >= ((xprt)->nocong? RPC_MAXCWND : (xprt)->cwnd))
+ ((xprt)->cong >= (xprt)->cwnd)
/* Default timeout values */
#define RPC_MAX_UDP_TIMEOUT (6*HZ)
@@ -124,10 +124,8 @@ struct rpc_rqst {
struct rpc_xprt {
struct rpc_xprt * link; /* list of all clients */
struct rpc_xprt * rx_pending; /* receive pending list */
- struct rpc_xprt * tx_pending; /* transmit pending list */
int rx_pending_flag;/* are we on the rcv pending list ? */
- int tx_pending_flag;/* are we on the xmit pending list ? */
struct file * file; /* VFS layer */
struct socket * sock; /* BSD socket layer */
@@ -170,16 +168,16 @@ struct rpc_xprt {
u32 tcp_copied; /* copied to request */
/*
- * TCP send stuff
+ * Send stuff
*/
- struct rpc_iov snd_buf; /* send buffer */
struct rpc_task * snd_task; /* Task blocked in send */
- u32 snd_sent; /* Bytes we have sent */
void (*old_data_ready)(struct sock *, int);
void (*old_state_change)(struct sock *);
void (*old_write_space)(struct sock *);
+
+ wait_queue_head_t cong_wait;
};
#define tcp_reclen tcp_recm.header[0]
#define tcp_xid tcp_recm.header[1]
@@ -202,6 +200,9 @@ void xprt_receive(struct rpc_task *);
int xprt_adjust_timeout(struct rpc_timeout *);
void xprt_release(struct rpc_task *);
void xprt_reconnect(struct rpc_task *);
+int xprt_clear_backlog(struct rpc_xprt *);
+
+int xprt_tcp_pending(void);
#endif /* __KERNEL__*/
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
index a9fc91a35..993579d8c 100644
--- a/include/linux/wanrouter.h
+++ b/include/linux/wanrouter.h
@@ -305,6 +305,7 @@ typedef struct wanif_conf
char mc; /* Multicast on or off */
char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */
unsigned char port; /* board port */
+ unsigned char protocol; /* prococol used in this channel (TCPOX25 or X25) */
int reserved[8]; /* reserved for future extensions */
} wanif_conf_t;