You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andy P. <at...@us...> - 2002-04-09 12:57:31
|
Update of /cvsroot/linux-vax/kernel-2.4/fs/autofs4 In directory usw-pr-cvs1:/tmp/cvs-serv24187/autofs4 Modified Files: expire.c init.c inode.c Log Message: synch 2.4.15 commit 6 Index: expire.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/expire.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- expire.c 14 Jan 2001 16:40:50 -0000 1.1.1.1 +++ expire.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -66,19 +66,11 @@ non-busy mounts */ static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry) { - int ret = 0; - struct list_head *tmp; - - list_for_each(tmp, &dentry->d_vfsmnt) { - struct vfsmount *vfs = list_entry(tmp, struct vfsmount, - mnt_clash); - DPRINTK(("check_vfsmnt: mnt=%p, dentry=%p, tmp=%p, vfs=%p\n", - mnt, dentry, tmp, vfs)); - if (vfs->mnt_parent != mnt || /* don't care about busy-ness of other namespaces */ - !is_vfsmnt_tree_busy(vfs)) - ret++; - } + int ret = dentry->d_mounted; + struct vfsmount *vfs = lookup_mnt(mnt, dentry); + if (vfs && is_vfsmnt_tree_busy(vfs)) + ret--; DPRINTK(("check_vfsmnt: ret=%d\n", ret)); return ret; } @@ -98,8 +90,6 @@ top, count)); this_parent = top; - count--; /* top is passed in after being dgot */ - if (is_autofs4_dentry(top)) { count--; DPRINTK(("is_tree_busy: autofs; count=%d\n", count)); @@ -168,8 +158,6 @@ unsigned long timeout; struct dentry *root = sb->s_root; struct list_head *tmp; - struct dentry *d; - struct vfsmount *p; if (!sbi->exp_timeout || !root) return NULL; @@ -208,23 +196,17 @@ attempts if expire fails the first time */ ino->last_used = now; } - p = mntget(mnt); - d = dget_locked(dentry); - - if (!is_tree_busy(p, d)) { + if (!is_tree_busy(mnt, dentry)) { DPRINTK(("autofs_expire: returning %p %.*s\n", dentry, (int)dentry->d_name.len, dentry->d_name.name)); /* Start from here next time */ list_del(&root->d_subdirs); list_add(&root->d_subdirs, &dentry->d_child); + dget(dentry); spin_unlock(&dcache_lock); - dput(d); - mntput(p); return dentry; } - dput(d); - mntput(p); } spin_unlock(&dcache_lock); @@ -251,6 +233,7 @@ pkt.len = dentry->d_name.len; memcpy(pkt.name, dentry->d_name.name, pkt.len); pkt.name[pkt.len] = '\0'; + dput(dentry); if ( copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)) ) return -EFAULT; @@ -278,6 +261,7 @@ de_info->flags |= AUTOFS_INF_EXPIRING; ret = autofs4_wait(sbi, &dentry->d_name, NFY_EXPIRE); de_info->flags &= ~AUTOFS_INF_EXPIRING; + dput(dentry); } return ret; Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- init.c 14 Jan 2001 16:40:50 -0000 1.1.1.1 +++ init.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -28,3 +28,4 @@ module_init(init_autofs4_fs) module_exit(exit_autofs4_fs) +MODULE_LICENSE("GPL"); Index: inode.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/inode.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- inode.c 25 Feb 2001 23:14:48 -0000 1.1.1.2 +++ inode.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -315,8 +315,10 @@ inode->i_nlink = 2; inode->i_op = &autofs4_dir_inode_operations; inode->i_fop = &autofs4_dir_operations; - } else if (S_ISLNK(inf->mode)) + } else if (S_ISLNK(inf->mode)) { + inode->i_size = inf->size; inode->i_op = &autofs4_symlink_inode_operations; + } return inode; } |
From: Andy P. <at...@us...> - 2002-04-09 12:57:30
|
Update of /cvsroot/linux-vax/kernel-2.4/fs/autofs In directory usw-pr-cvs1:/tmp/cvs-serv24187/autofs Modified Files: autofs_i.h init.c inode.c root.c Log Message: synch 2.4.15 commit 6 Index: autofs_i.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs/autofs_i.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- autofs_i.h 25 Feb 2001 23:14:46 -0000 1.1.1.2 +++ autofs_i.h 9 Apr 2002 12:57:26 -0000 1.2 @@ -89,7 +89,8 @@ #define AUTOFS_FIRST_SYMLINK 2 #define AUTOFS_FIRST_DIR_INO (AUTOFS_FIRST_SYMLINK+AUTOFS_MAX_SYMLINKS) -#define AUTOFS_SYMLINK_BITMAP_LEN ((AUTOFS_MAX_SYMLINKS+31)/32) +#define AUTOFS_SYMLINK_BITMAP_LEN \ + ((AUTOFS_MAX_SYMLINKS+((sizeof(long)*1)-1))/(sizeof(long)*8)) #define AUTOFS_SBI_MAGIC 0x6d4a556d @@ -103,10 +104,10 @@ struct autofs_wait_queue *queues; /* Wait queue pointer */ struct autofs_dirhash dirhash; /* Root directory hash */ struct autofs_symlink symlink[AUTOFS_MAX_SYMLINKS]; - u32 symlink_bitmap[AUTOFS_SYMLINK_BITMAP_LEN]; + unsigned long symlink_bitmap[AUTOFS_SYMLINK_BITMAP_LEN]; }; -extern inline struct autofs_sb_info *autofs_sbi(struct super_block *sb) +static inline struct autofs_sb_info *autofs_sbi(struct super_block *sb) { return (struct autofs_sb_info *)(sb->u.generic_sbp); } Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs/init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- init.c 14 Jan 2001 16:29:28 -0000 1.1.1.1 +++ init.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -38,3 +38,4 @@ printk(")\n"); } #endif +MODULE_LICENSE("GPL"); Index: inode.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs/inode.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- inode.c 25 Feb 2001 23:14:46 -0000 1.1.1.2 +++ inode.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -132,7 +132,7 @@ sbi->oz_pgrp = current->pgrp; autofs_initialize_hash(&sbi->dirhash); sbi->queues = NULL; - memset(sbi->symlink_bitmap, 0, sizeof(u32)*AUTOFS_SYMLINK_BITMAP_LEN); + memset(sbi->symlink_bitmap, 0, sizeof(long)*AUTOFS_SYMLINK_BITMAP_LEN); sbi->next_dir_ino = AUTOFS_FIRST_DIR_INO; s->s_blocksize = 1024; s->s_blocksize_bits = 10; Index: root.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs/root.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- root.c 14 Jan 2001 16:29:31 -0000 1.1.1.1 +++ root.c 9 Apr 2002 12:57:26 -0000 1.2 @@ -422,12 +422,11 @@ static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, unsigned long *p) { - int rv; unsigned long ntimeout; - if ( (rv = get_user(ntimeout, p)) || - (rv = put_user(sbi->exp_timeout/HZ, p)) ) - return rv; + if (get_user(ntimeout, p) || + put_user(sbi->exp_timeout / HZ, p)) + return -EFAULT; if ( ntimeout > ULONG_MAX/HZ ) sbi->exp_timeout = 0; |
Update of /cvsroot/linux-vax/kernel-2.4/include/net/bluetooth In directory usw-pr-cvs1:/tmp/cvs-serv23075/net/bluetooth Added Files: bluetooth.h bluez.h hci.h hci_core.h hci_uart.h hci_usb.h hci_vhci.h l2cap.h l2cap_core.h Log Message: synch 2.4.15 commit 5 --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: bluetooth.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __BLUETOOTH_H #define __BLUETOOTH_H #include <asm/types.h> #include <asm/byteorder.h> #ifndef AF_BLUETOOTH #define AF_BLUETOOTH 31 #define PF_BLUETOOTH AF_BLUETOOTH #endif #define BTPROTO_L2CAP 0 #define BTPROTO_HCI 1 #define SOL_HCI 0 #define SOL_L2CAP 6 /* Connection and socket states */ enum { BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ BT_OPEN, BT_BOUND, BT_LISTEN, BT_CONNECT, BT_CONFIG, BT_DISCONN, BT_CLOSED }; /* Endianness conversions */ #define htobs(a) __cpu_to_le16(a) #define htobl(a) __cpu_to_le32(a) #define btohs(a) __le16_to_cpu(a) #define btohl(a) __le32_to_cpu(a) /* BD Address */ typedef struct { __u8 b[6]; } __attribute__((packed)) bdaddr_t; #define BDADDR_ANY ((bdaddr_t *)"\000\000\000\000\000") /* Copy, swap, convert BD Address */ static inline int bacmp(bdaddr_t *ba1, bdaddr_t *ba2) { return memcmp(ba1, ba2, sizeof(bdaddr_t)); } static inline void bacpy(bdaddr_t *dst, bdaddr_t *src) { memcpy(dst, src, sizeof(bdaddr_t)); } void baswap(bdaddr_t *dst, bdaddr_t *src); char *batostr(bdaddr_t *ba); bdaddr_t *strtoba(char *str); int bterr(__u16 code); #endif /* __BLUETOOTH_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: bluez.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __IF_BLUEZ_H #define __IF_BLUEZ_H #include <net/sock.h> #define BLUEZ_MAX_PROTO 2 /* Reserv for core and drivers use */ #define BLUEZ_SKB_RESERVE 8 #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif /* Debugging */ #ifdef BLUEZ_DEBUG #define HCI_CORE_DEBUG 1 #define HCI_SOCK_DEBUG 1 #define HCI_UART_DEBUG 1 #define HCI_USB_DEBUG 1 //#define HCI_DATA_DUMP 1 #define L2CAP_DEBUG 1 #endif /* BLUEZ_DEBUG */ extern void bluez_dump(char *pref, __u8 *buf, int count); #define INF(fmt, arg...) printk(KERN_INFO fmt "\n" , ## arg) #define DBG(fmt, arg...) printk(KERN_INFO __FUNCTION__ ": " fmt "\n" , ## arg) #define ERR(fmt, arg...) printk(KERN_ERR __FUNCTION__ ": " fmt "\n" , ## arg) #ifdef HCI_DATA_DUMP #define DMP(buf, len) bluez_dump(__FUNCTION__, buf, len) #else #define DMP(D...) #endif /* ----- Sockets ------ */ struct bluez_sock_list { struct sock *head; rwlock_t lock; }; extern int bluez_sock_register(int proto, struct net_proto_family *ops); extern int bluez_sock_unregister(int proto); extern void bluez_sock_link(struct bluez_sock_list *l, struct sock *s); extern void bluez_sock_unlink(struct bluez_sock_list *l, struct sock *s); /* ----- SKB helpers ----- */ struct bluez_skb_cb { int incomming; }; #define bluez_cb(skb) ((struct bluez_skb_cb *)(skb->cb)) static inline struct sk_buff *bluez_skb_alloc(unsigned int len, int how) { struct sk_buff *skb; if ((skb = alloc_skb(len + BLUEZ_SKB_RESERVE, how))) { skb_reserve(skb, BLUEZ_SKB_RESERVE); bluez_cb(skb)->incomming = 0; } return skb; } static inline struct sk_buff *bluez_skb_send_alloc(struct sock *sk, unsigned long len, int nb, int *err) { struct sk_buff *skb; if ((skb = sock_alloc_send_skb(sk, len + BLUEZ_SKB_RESERVE, nb, err))) { skb_reserve(skb, BLUEZ_SKB_RESERVE); bluez_cb(skb)->incomming = 0; } return skb; } static inline int skb_frags_no(struct sk_buff *skb) { register struct sk_buff *frag = skb_shinfo(skb)->frag_list; register int n = 1; for (; frag; frag=frag->next, n++); return n; } extern int hci_core_init(void); extern int hci_core_cleanup(void); extern int hci_sock_init(void); extern int hci_sock_cleanup(void); #endif /* __IF_BLUEZ_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: hci.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __HCI_H #define __HCI_H #include <asm/byteorder.h> #define HCI_MAX_DEV 8 #define HCI_MAX_FRAME_SIZE 2048 /* HCI dev events */ #define HCI_DEV_REG 1 #define HCI_DEV_UNREG 2 #define HCI_DEV_UP 3 #define HCI_DEV_DOWN 4 /* HCI device types */ #define HCI_UART 0 #define HCI_USB 1 #define HCI_VHCI 2 /* HCI device modes */ #define HCI_NORMAL 0x0001 #define HCI_RAW 0x0002 #define HCI_MODE_MASK (HCI_NORMAL | HCI_RAW) #define HCI_SOCK 0x1000 /* HCI device states */ #define HCI_INIT 0x0010 #define HCI_UP 0x0020 #define HCI_RUNNING 0x0040 /* HCI device flags */ #define HCI_PSCAN 0x0100 #define HCI_ISCAN 0x0200 #define HCI_AUTH 0x0400 /* HCI Ioctl defines */ #define HCIDEVUP _IOW('H', 201, int) #define HCIDEVDOWN _IOW('H', 202, int) #define HCIDEVRESET _IOW('H', 203, int) #define HCIRESETSTAT _IOW('H', 204, int) #define HCIGETINFO _IOR('H', 205, int) #define HCIGETDEVLIST _IOR('H', 206, int) #define HCISETRAW _IOW('H', 207, int) #define HCISETSCAN _IOW('H', 208, int) #define HCISETAUTH _IOW('H', 209, int) #define HCIINQUIRY _IOR('H', 210, int) #define HCISETPTYPE _IOW('H', 211, int) #define HCIGETCONNLIST _IOR('H', 212, int) #ifndef __NO_HCI_DEFS /* HCI Packet types */ #define HCI_COMMAND_PKT 0x01 #define HCI_ACLDATA_PKT 0x02 #define HCI_SCODATA_PKT 0x03 #define HCI_EVENT_PKT 0x04 #define HCI_UNKNOWN_PKT 0xff /* HCI Packet types */ #define HCI_DM1 0x0008 #define HCI_DM3 0x0400 #define HCI_DM5 0x4000 #define HCI_DH1 0x0010 #define HCI_DH3 0x0800 #define HCI_DH5 0x8000 /* ACL flags */ #define ACL_CONT 0x0001 #define ACL_START 0x0002 #define ACL_ACTIVE_BCAST 0x0010 #define ACL_PICO_BCAST 0x0020 /* Baseband links */ #define SCO_LINK 0x00 #define ACL_LINK 0x01 /* LMP features */ #define LMP_3SLOT 0x01 #define LMP_5SLOT 0x02 #define LMP_ENCRYPT 0x04 #define LMP_SOFFSET 0x08 #define LMP_TACCURACY 0x10 #define LMP_RSWITCH 0x20 #define LMP_HOLD 0x40 #define LMP_SNIF 0x80 #define LMP_PARK 0x01 #define LMP_RSSI 0x02 #define LMP_QUALITY 0x04 #define LMP_SCO 0x08 #define LMP_HV2 0x10 #define LMP_HV3 0x20 #define LMP_ULAW 0x40 #define LMP_ALAW 0x80 #define LMP_CVSD 0x01 #define LMP_PSCHEME 0x02 #define LMP_PCONTROL 0x04 /* ----- HCI Commands ----- */ /* OGF & OCF values */ /* Informational Parameters */ #define OGF_INFO_PARAM 0x04 #define OCF_READ_LOCAL_VERSION 0x0001 typedef struct { __u8 status; __u8 hci_ver; __u16 hci_rev; __u8 lmp_ver; __u16 man_name; __u16 lmp_sub; } __attribute__ ((packed)) read_local_version_rp; #define OCF_READ_LOCAL_FEATURES 0x0003 typedef struct { __u8 status; __u8 features[8]; } __attribute__ ((packed)) read_local_features_rp; #define OCF_READ_BUFFER_SIZE 0x0005 typedef struct { __u8 status; __u16 acl_mtu; __u8 sco_mtu; __u16 acl_max_pkt; __u16 sco_max_pkt; } __attribute__ ((packed)) read_buffer_size_rp; #define OCF_READ_BD_ADDR 0x0009 typedef struct { __u8 status; bdaddr_t bdaddr; } __attribute__ ((packed)) read_bd_addr_rp; /* Host Controller and Baseband */ #define OGF_HOST_CTL 0x03 #define OCF_RESET 0x0003 #define OCF_WRITE_AUTH_ENABLE 0x0020 #define AUTH_DISABLED 0x00 #define AUTH_ENABLED 0x01 #define OCF_WRITE_CA_TIMEOUT 0x0016 #define OCF_WRITE_PG_TIMEOUT 0x0018 #define OCF_WRITE_SCAN_ENABLE 0x001A #define SCANS_DISABLED 0x00 #define IS_ENA_PS_DIS 0x01 #define IS_DIS_PS_ENA 0x02 #define IS_ENA_PS_ENA 0x03 #define OCF_SET_EVENT_FLT 0x0005 typedef struct { __u8 flt_type; __u8 cond_type; __u8 condition[0]; } __attribute__ ((packed)) set_event_flt_cp; #define SET_EVENT_FLT_CP_SIZE 2 /* Filter types */ #define FLT_CLEAR_ALL 0x00 #define FLT_INQ_RESULT 0x01 #define FLT_CONN_SETUP 0x02 /* CONN_SETUP Condition types */ #define CONN_SETUP_ALLOW_ALL 0x00 #define CONN_SETUP_ALLOW_CLASS 0x01 #define CONN_SETUP_ALLOW_BDADDR 0x02 /* CONN_SETUP Conditions */ #define CONN_SETUP_AUTO_OFF 0x01 #define CONN_SETUP_AUTO_ON 0x02 #define OCF_CHANGE_LOCAL_NAME 0x0013 typedef struct { __u8 name[248]; } __attribute__ ((packed)) change_local_name_cp; #define CHANGE_LOCAL_NAME_CP_SIZE 248 #define OCF_READ_LOCAL_NAME 0x0014 typedef struct { __u8 status; __u8 name[248]; } __attribute__ ((packed)) read_local_name_rp; #define READ_LOCAL_NAME_RP_SIZE 249 #define OCF_READ_CLASS_OF_DEV 0x0023 typedef struct { __u8 status; __u8 dev_class[3]; } __attribute__ ((packed)) read_class_of_dev_rp; #define READ_CLASS_OF_DEV_RP_SIZE 4 #define OCF_WRITE_CLASS_OF_DEV 0x0024 typedef struct { __u8 dev_class[3]; } __attribute__ ((packed)) write_class_of_dev_cp; #define WRITE_CLASS_OF_DEV_CP_SIZE 3 /* Link Control */ #define OGF_LINK_CTL 0x01 #define OCF_CREATE_CONN 0x0005 typedef struct { bdaddr_t bdaddr; __u16 pkt_type; __u8 pscan_rep_mode; __u8 pscan_mode; __u16 clock_offset; __u8 role_switch; } __attribute__ ((packed)) create_conn_cp; #define CREATE_CONN_CP_SIZE 13 #define OCF_ACCEPT_CONN_REQ 0x0009 typedef struct { bdaddr_t bdaddr; __u8 role; } __attribute__ ((packed)) accept_conn_req_cp; #define ACCEPT_CONN_REQ_CP_SIZE 7 #define OCF_DISCONNECT 0x0006 typedef struct { __u16 handle; __u8 reason; } __attribute__ ((packed)) disconnect_cp; #define DISCONNECT_CP_SIZE 3 #define OCF_INQUIRY 0x0001 typedef struct { __u8 lap[3]; __u8 lenght; __u8 num_rsp; } __attribute__ ((packed)) inquiry_cp; #define INQUIRY_CP_SIZE 5 #define OGF_LINK_POLICY 0x02 /* Link Policy */ /* --------- HCI Events --------- */ #define EVT_INQUIRY_COMPLETE 0x01 #define EVT_INQUIRY_RESULT 0x02 typedef struct { bdaddr_t bdaddr; __u8 pscan_rep_mode; __u8 pscan_period_mode; __u8 pscan_mode; __u8 class[3]; __u16 clock_offset; } __attribute__ ((packed)) inquiry_info; #define INQUIRY_INFO_SIZE 14 #define EVT_CONN_COMPLETE 0x03 typedef struct { __u8 status; __u16 handle; bdaddr_t bdaddr; __u8 link_type; __u8 encr_mode; } __attribute__ ((packed)) evt_conn_complete; #define EVT_CONN_COMPLETE_SIZE 13 #define EVT_CONN_REQUEST 0x04 typedef struct { bdaddr_t bdaddr; __u8 dev_class[3]; __u8 link_type; } __attribute__ ((packed)) evt_conn_request; #define EVT_CONN_REQUEST_SIZE 10 #define EVT_DISCONN_COMPLETE 0x05 typedef struct { __u8 status; __u16 handle; __u8 reason; } __attribute__ ((packed)) evt_disconn_complete; #define EVT_DISCONN_COMPLETE_SIZE 4 #define EVT_CMD_COMPLETE 0x0e typedef struct { __u8 ncmd; __u16 opcode; } __attribute__ ((packed)) evt_cmd_complete; #define EVT_CMD_COMPLETE_SIZE 3 #define EVT_CMD_STATUS 0x0f typedef struct { __u8 status; __u8 ncmd; __u16 opcode; } __attribute__ ((packed)) evt_cmd_status; #define EVT_CMD_STATUS_SIZE 4 #define EVT_NUM_COMP_PKTS 0x13 typedef struct { __u8 num_hndl; /* variable lenght part */ } __attribute__ ((packed)) evt_num_comp_pkts; #define EVT_NUM_COMP_PKTS_SIZE 1 #define EVT_HCI_DEV_EVENT 0xfd typedef struct { __u16 event; __u16 param; } __attribute__ ((packed)) evt_hci_dev_event; #define EVT_HCI_DEV_EVENT_SIZE 4 /* -------- HCI Packet structures -------- */ #define HCI_TYPE_LEN 1 typedef struct { __u16 opcode; /* OCF & OGF */ __u8 plen; } __attribute__ ((packed)) hci_command_hdr; #define HCI_COMMAND_HDR_SIZE 3 typedef struct { __u8 evt; __u8 plen; } __attribute__ ((packed)) hci_event_hdr; #define HCI_EVENT_HDR_SIZE 2 typedef struct { __u16 handle; /* Handle & Flags(PB, BC) */ __u16 dlen; } __attribute__ ((packed)) hci_acl_hdr; #define HCI_ACL_HDR_SIZE 4 typedef struct { __u16 handle; __u8 dlen; } __attribute__ ((packed)) hci_sco_hdr; #define HCI_SCO_HDR_SIZE 3 /* Command opcode pack/unpack */ #define cmd_opcode_pack(ogf, ocf) (__u16)((ocf & 0x03ff)|(ogf << 10)) #define cmd_opcode_ogf(op) (op >> 10) #define cmd_opcode_ocf(op) (op & 0x03ff) /* ACL handle and flags pack/unpack */ #define acl_handle_pack(h, f) (__u16)((h & 0x0fff)|(f << 12)) #define acl_handle(h) (h & 0x0fff) #define acl_flags(h) (h >> 12) #endif /* _NO_HCI_DEFS */ /* HCI Socket options */ #define HCI_DATA_DIR 0x0001 #define HCI_FILTER 0x0002 /* HCI CMSG flags */ #define HCI_CMSG_DIR 0x0001 struct sockaddr_hci { sa_family_t hci_family; unsigned short hci_dev; }; #define HCI_DEV_NONE 0xffff struct hci_filter { __u32 type_mask; __u32 event_mask[2]; }; struct hci_dev_req { __u16 dev_id; __u32 dev_opt; }; struct hci_dev_list_req { __u16 dev_num; struct hci_dev_req dev_req[0]; /* hci_dev_req structures */ }; struct hci_inquiry_req { __u16 dev_id; __u16 flags; __u8 lap[3]; __u8 length; __u8 num_rsp; }; #define IREQ_CACHE_FLUSH 0x0001 struct hci_dev_stats { __u32 err_rx; __u32 err_tx; __u32 cmd_tx; __u32 evt_rx; __u32 acl_tx; __u32 acl_rx; __u32 sco_tx; __u32 sco_rx; __u32 byte_rx; __u32 byte_tx; }; struct hci_dev_info { __u16 dev_id; char name[8]; bdaddr_t bdaddr; __u32 flags; __u8 type; __u8 features[8]; __u32 pkt_type; __u16 acl_mtu; __u16 acl_max; __u16 sco_mtu; __u16 sco_max; struct hci_dev_stats stat; }; struct hci_conn_info { __u16 handle; bdaddr_t bdaddr; }; struct hci_conn_list_req { __u16 dev_id; __u16 conn_num; struct hci_conn_info conn_info[0]; }; #endif /* __HCI_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: hci_core.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __HCI_CORE_H #define __HCI_CORE_H #include <net/bluetooth/hci.h> /* HCI upper protocols */ #define HCI_MAX_PROTO 1 #define HCI_PROTO_L2CAP 0 #define HCI_INIT_TIMEOUT (HZ * 10) /* ----- Inquiry cache ----- */ #define INQUIRY_CACHE_AGE_MAX (HZ*5) // 5 seconds #define INQUIRY_ENTRY_AGE_MAX (HZ*60) // 60 seconds struct inquiry_entry { struct inquiry_entry *next; __u32 timestamp; inquiry_info info; }; struct inquiry_cache { spinlock_t lock; __u32 timestamp; struct inquiry_entry *list; }; static inline void inquiry_cache_init(struct inquiry_cache *cache) { spin_lock_init(&cache->lock); cache->list = NULL; } static inline void inquiry_cache_lock(struct inquiry_cache *cache) { spin_lock(&cache->lock); } static inline void inquiry_cache_unlock(struct inquiry_cache *cache) { spin_unlock(&cache->lock); } static inline void inquiry_cache_lock_bh(struct inquiry_cache *cache) { spin_lock_bh(&cache->lock); } static inline void inquiry_cache_unlock_bh(struct inquiry_cache *cache) { spin_unlock_bh(&cache->lock); } static inline long inquiry_cache_age(struct inquiry_cache *cache) { return jiffies - cache->timestamp; } static inline long inquiry_entry_age(struct inquiry_entry *e) { return jiffies - e->timestamp; } extern void inquiry_cache_flush(struct inquiry_cache *cache); struct hci_dev; /* ----- HCI Connections ----- */ struct hci_conn { struct list_head list; bdaddr_t dst; __u16 handle; __u8 type; unsigned int sent; struct hci_dev *hdev; void *l2cap_data; void *priv; struct sk_buff_head data_q; }; struct conn_hash { struct list_head list; spinlock_t lock; unsigned int num; }; static inline void conn_hash_init(struct conn_hash *h) { INIT_LIST_HEAD(&h->list); spin_lock_init(&h->lock); h->num = 0; } static inline void conn_hash_lock(struct conn_hash *h) { spin_lock(&h->lock); } static inline void conn_hash_unlock(struct conn_hash *h) { spin_unlock(&h->lock); } static inline void __conn_hash_add(struct conn_hash *h, __u16 handle, struct hci_conn *c) { list_add(&c->list, &h->list); h->num++; } static inline void conn_hash_add(struct conn_hash *h, __u16 handle, struct hci_conn *c) { conn_hash_lock(h); __conn_hash_add(h, handle, c); conn_hash_unlock(h); } static inline void __conn_hash_del(struct conn_hash *h, struct hci_conn *c) { list_del(&c->list); h->num--; } static inline void conn_hash_del(struct conn_hash *h, struct hci_conn *c) { conn_hash_lock(h); __conn_hash_del(h, c); conn_hash_unlock(h); } static inline struct hci_conn *__conn_hash_lookup(struct conn_hash *h, __u16 handle) { register struct list_head *p; register struct hci_conn *c; list_for_each(p, &h->list) { c = list_entry(p, struct hci_conn, list); if (c->handle == handle) return c; } return NULL; } static inline struct hci_conn *conn_hash_lookup(struct conn_hash *h, __u16 handle) { struct hci_conn *conn; conn_hash_lock(h); conn = __conn_hash_lookup(h, handle); conn_hash_unlock(h); return conn; } /* ----- HCI Devices ----- */ struct hci_dev { atomic_t refcnt; char name[8]; __u32 flags; __u16 id; __u8 type; bdaddr_t bdaddr; __u8 features[8]; __u16 pkt_type; atomic_t cmd_cnt; unsigned int acl_cnt; unsigned int sco_cnt; unsigned int acl_mtu; unsigned int sco_mtu; unsigned int acl_max; unsigned int sco_max; void *driver_data; void *l2cap_data; void *priv; struct tasklet_struct cmd_task; struct tasklet_struct rx_task; struct tasklet_struct tx_task; struct sk_buff_head rx_q; struct sk_buff_head raw_q; struct sk_buff_head cmd_q; struct sk_buff *sent_cmd; struct semaphore req_lock; wait_queue_head_t req_wait_q; __u32 req_status; __u32 req_result; struct inquiry_cache inq_cache; struct conn_hash conn_hash; struct hci_dev_stats stat; int (*open)(struct hci_dev *hdev); int (*close)(struct hci_dev *hdev); int (*flush)(struct hci_dev *hdev); int (*send)(struct sk_buff *skb); }; static inline void hci_dev_hold(struct hci_dev *hdev) { atomic_inc(&hdev->refcnt); } static inline void hci_dev_put(struct hci_dev *hdev) { atomic_dec(&hdev->refcnt); } extern struct hci_dev *hci_dev_get(int index); extern int hci_register_dev(struct hci_dev *hdev); extern int hci_unregister_dev(struct hci_dev *hdev); extern int hci_dev_open(__u16 dev); extern int hci_dev_close(__u16 dev); extern int hci_dev_reset(__u16 dev); extern int hci_dev_reset_stat(__u16 dev); extern int hci_dev_info(unsigned long arg); extern int hci_dev_list(unsigned long arg); extern int hci_dev_setscan(unsigned long arg); extern int hci_dev_setauth(unsigned long arg); extern int hci_dev_setptype(unsigned long arg); extern int hci_conn_list(unsigned long arg); extern int hci_inquiry(unsigned long arg); extern __u32 hci_dev_setmode(struct hci_dev *hdev, __u32 mode); extern __u32 hci_dev_getmode(struct hci_dev *hdev); extern int hci_recv_frame(struct sk_buff *skb); /* ----- LMP capabilities ----- */ #define lmp_rswitch_capable(dev) (dev->features[0] & LMP_RSWITCH) /* ----- HCI tasks ----- */ static inline void hci_sched_cmd(struct hci_dev *hdev) { tasklet_schedule(&hdev->cmd_task); } static inline void hci_sched_rx(struct hci_dev *hdev) { tasklet_schedule(&hdev->rx_task); } static inline void hci_sched_tx(struct hci_dev *hdev) { tasklet_schedule(&hdev->tx_task); } /* ----- HCI protocols ----- */ struct hci_proto { char *name; __u32 id; __u32 flags; void *priv; int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr); int (*connect_cfm) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 status, struct hci_conn *conn); int (*disconn_ind) (struct hci_conn *conn, __u8 reason); int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb , __u16 flags); int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb); }; extern int hci_register_proto(struct hci_proto *hproto); extern int hci_unregister_proto(struct hci_proto *hproto); extern int hci_register_notifier(struct notifier_block *nb); extern int hci_unregister_notifier(struct notifier_block *nb); extern int hci_connect(struct hci_dev * hdev, bdaddr_t * bdaddr); extern int hci_disconnect(struct hci_conn *conn, __u8 reason); extern int hci_send_cmd(struct hci_dev *hdev, __u16 ogf, __u16 ocf, __u32 plen, void * param); extern int hci_send_raw(struct sk_buff *skb); extern int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags); extern int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb); /* ----- HCI Sockets ----- */ extern void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb); /* HCI info for socket */ #define hci_pi(sk) ((struct hci_pinfo *) &sk->protinfo) struct hci_pinfo { struct hci_dev *hdev; struct hci_filter filter; __u32 cmsg_mask; }; /* ----- HCI requests ----- */ #define HCI_REQ_DONE 0 #define HCI_REQ_PEND 1 #define HCI_REQ_CANCELED 2 #endif /* __HCI_CORE_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: hci_uart.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef N_HCI #define N_HCI 15 #endif #ifdef __KERNEL__ #define tty2n_hci(tty) ((struct n_hci *)((tty)->disc_data)) #define n_hci2tty(n_hci) ((n_hci)->tty) struct n_hci { struct tty_struct *tty; struct hci_dev hdev; struct sk_buff_head txq; unsigned long tx_state; spinlock_t rx_lock; unsigned long rx_state; unsigned long rx_count; struct sk_buff *rx_skb; }; /* Transmit states */ #define TRANS_SENDING 1 #define TRANS_WAKEUP 2 /* Receiver States */ #define WAIT_PACKET_TYPE 0 #define WAIT_EVENT_HDR 1 #define WAIT_ACL_HDR 2 #define WAIT_SCO_HDR 3 #define WAIT_DATA 4 #endif /* __KERNEL__ */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: hci_usb.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifdef __KERNEL__ /* Class, SubClass, and Protocol codes that describe a Bluetooth device */ #define HCI_DEV_CLASS 0xe0 /* Wireless class */ #define HCI_DEV_SUBCLASS 0x01 /* RF subclass */ #define HCI_DEV_PROTOCOL 0x01 /* Bluetooth programming protocol */ #define HCI_CTRL_REQ 0x20 struct hci_usb { struct usb_device *udev; devrequest dev_req; struct urb *ctrl_urb; struct urb *intr_urb; struct urb *read_urb; struct urb *write_urb; __u8 *read_buf; __u8 *intr_buf; struct sk_buff *intr_skb; int intr_count; __u8 bulk_out_ep_addr; __u8 bulk_in_ep_addr; __u8 intr_in_ep_addr; __u8 intr_in_interval; struct hci_dev hdev; unsigned long tx_state; struct sk_buff_head tx_ctrl_q; struct sk_buff_head tx_write_q; }; /* Transmit states */ #define HCI_TX_CTRL 1 #define HCI_TX_WRITE 2 #endif /* __KERNEL__ */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: hci_vhci.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __HCI_VHCI_H #define __HCI_VHCI_H #ifdef __KERNEL__ struct hci_vhci_struct { struct hci_dev hdev; __u32 flags; wait_queue_head_t read_wait; struct sk_buff_head readq; struct fasync_struct *fasync; }; /* VHCI device flags */ #define VHCI_FASYNC 0x0010 #endif /* __KERNEL__ */ #define VHCI_DEV "/dev/vhci" #define VHCI_MINOR 250 #endif /* __HCI_VHCI_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: l2cap.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __L2CAP_H #define __L2CAP_H #include <asm/types.h> #include <asm/byteorder.h> /* L2CAP defaults */ #define L2CAP_DEFAULT_MTU 672 #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF #define L2CAP_CONN_TIMEOUT (HZ * 40) #define L2CAP_DISCONN_TIMEOUT (HZ * 2) #define L2CAP_CONN_IDLE_TIMEOUT (HZ * 60) /* L2CAP socket address */ struct sockaddr_l2 { sa_family_t l2_family; unsigned short l2_psm; bdaddr_t l2_bdaddr; }; /* set/get sockopt defines */ #define L2CAP_OPTIONS 0x01 struct l2cap_options { __u16 omtu; __u16 imtu; __u16 flush_to; __u32 token_rate; __u32 bucket_size; __u32 pick_band; __u32 latency; __u32 delay_var; }; #define L2CAP_CONNINFO 0x02 struct l2cap_conninfo { __u16 hci_handle; }; /* L2CAP command codes */ #define L2CAP_COMMAND_REJ 0x01 #define L2CAP_CONN_REQ 0x02 #define L2CAP_CONN_RSP 0x03 #define L2CAP_CONF_REQ 0x04 #define L2CAP_CONF_RSP 0x05 #define L2CAP_DISCONN_REQ 0x06 #define L2CAP_DISCONN_RSP 0x07 #define L2CAP_ECHO_REQ 0x08 #define L2CAP_ECHO_RSP 0x09 #define L2CAP_INFO_REQ 0x0a #define L2CAP_INFO_RSP 0x0b /* L2CAP structures */ typedef struct { __u16 len; __u16 cid; } __attribute__ ((packed)) l2cap_hdr; #define L2CAP_HDR_SIZE 4 typedef struct { __u8 code; __u8 ident; __u16 len; } __attribute__ ((packed)) l2cap_cmd_hdr; #define L2CAP_CMD_HDR_SIZE 4 typedef struct { __u16 reason; } __attribute__ ((packed)) l2cap_cmd_rej; #define L2CAP_CMD_REJ_SIZE 2 typedef struct { __u16 psm; __u16 scid; } __attribute__ ((packed)) l2cap_conn_req; #define L2CAP_CONN_REQ_SIZE 4 typedef struct { __u16 dcid; __u16 scid; __u16 result; __u16 status; } __attribute__ ((packed)) l2cap_conn_rsp; #define L2CAP_CONN_RSP_SIZE 8 #define L2CAP_CONN_SUCCESS 0x0000 #define L2CAP_CONN_PEND 0x0001 #define L2CAP_CONN_BAD_PSM 0x0002 #define L2CAP_CONN_SEC_BLOCK 0x0003 #define L2CAP_CONN_NO_MEM 0x0004 typedef struct { __u16 dcid; __u16 flags; __u8 data[0]; } __attribute__ ((packed)) l2cap_conf_req; #define L2CAP_CONF_REQ_SIZE 4 typedef struct { __u16 scid; __u16 flags; __u16 result; __u8 data[0]; } __attribute__ ((packed)) l2cap_conf_rsp; #define L2CAP_CONF_RSP_SIZE 6 #define L2CAP_CONF_SUCCESS 0x00 #define L2CAP_CONF_UNACCEPT 0x01 typedef struct { __u8 type; __u8 len; __u8 val[0]; } __attribute__ ((packed)) l2cap_conf_opt; #define L2CAP_CONF_OPT_SIZE 2 #define L2CAP_CONF_MTU 0x01 #define L2CAP_CONF_FLUSH_TO 0x02 #define L2CAP_CONF_QOS 0x03 typedef struct { __u16 dcid; __u16 scid; } __attribute__ ((packed)) l2cap_disconn_req; #define L2CAP_DISCONN_REQ_SIZE 4 typedef struct { __u16 dcid; __u16 scid; } __attribute__ ((packed)) l2cap_disconn_rsp; #define L2CAP_DISCONN_RSP_SIZE 4 #endif /* __L2CAP_H */ --- NEW FILE --- /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incorporated Written 2000,2001 by Maxim Krasnyansky <ma...@qu...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ /* * $Id: l2cap_core.h,v 1.1 2002/04/09 12:56:15 atp Exp $ */ #ifndef __L2CAP_CORE_H #define __L2CAP_CORE_H #ifdef __KERNEL__ /* ----- L2CAP interface ----- */ struct l2cap_iff { struct list_head list; struct hci_dev *hdev; bdaddr_t *bdaddr; __u16 mtu; spinlock_t lock; struct list_head conn_list; }; static inline void l2cap_iff_lock(struct l2cap_iff *iff) { spin_lock(&iff->lock); } static inline void l2cap_iff_unlock(struct l2cap_iff *iff) { spin_unlock(&iff->lock); } /* ----- L2CAP connections ----- */ struct l2cap_chan_list { struct sock *head; rwlock_t lock; long num; }; struct l2cap_conn { struct l2cap_iff *iff; struct list_head list; struct hci_conn *hconn; __u16 state; __u8 out; bdaddr_t src; bdaddr_t dst; spinlock_t lock; atomic_t refcnt; struct sk_buff *rx_skb; __u32 rx_len; __u8 rx_ident; __u8 tx_ident; struct l2cap_chan_list chan_list; struct timer_list timer; }; static inline void __l2cap_conn_link(struct l2cap_iff *iff, struct l2cap_conn *c) { list_add(&c->list, &iff->conn_list); } static inline void __l2cap_conn_unlink(struct l2cap_iff *iff, struct l2cap_conn *c) { list_del(&c->list); } /* ----- L2CAP channel and socket info ----- */ #define l2cap_pi(sk) ((struct l2cap_pinfo *) &sk->protinfo) struct l2cap_accept_q { struct sock *head; struct sock *tail; }; struct l2cap_pinfo { bdaddr_t src; bdaddr_t dst; __u16 psm; __u16 dcid; __u16 scid; __u32 flags; __u16 imtu; __u16 omtu; __u16 flush_to; __u8 conf_state; __u16 conf_mtu; __u8 ident; struct l2cap_conn *conn; struct sock *next_c; struct sock *prev_c; struct sock *parent; struct sock *next_q; struct sock *prev_q; struct l2cap_accept_q accept_q; }; #define CONF_REQ_SENT 0x01 #define CONF_INPUT_DONE 0x02 #define CONF_OUTPUT_DONE 0x04 extern struct bluez_sock_list l2cap_sk_list; extern struct list_head l2cap_iff_list; extern rwlock_t l2cap_rt_lock; extern void l2cap_register_proc(void); extern void l2cap_unregister_proc(void); #endif /* __KERNEL__ */ #endif /* __L2CAP_CORE_H */ |
From: Andy P. <at...@us...> - 2002-04-09 12:46:03
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/isdn/tpam In directory usw-pr-cvs1:/tmp/cvs-serv20509/drivers/isdn/tpam Log Message: Directory /cvsroot/linux-vax/kernel-2.4/drivers/isdn/tpam added to the repository |
From: Andy P. <at...@us...> - 2002-04-09 12:44:31
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/nfsd In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/nfsd Modified Files: nfsd.h nfsfh.h xdr.h xdr3.h Log Message: sync 2.4.15 commit 3 Index: nfsd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/nfsd/nfsd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- nfsd.h 14 Jan 2001 16:48:22 -0000 1.1.1.1 +++ nfsd.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -57,7 +57,7 @@ char dotonly; }; typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, - int, off_t, ino_t, unsigned int); + int, loff_t, ino_t, unsigned int); typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); /* @@ -81,7 +81,7 @@ int nfsd_lookup(struct svc_rqst *, struct svc_fh *, const char *, int, struct svc_fh *); int nfsd_setattr(struct svc_rqst *, struct svc_fh *, - struct iattr *); + struct iattr *, int, time_t); int nfsd_create(struct svc_rqst *, struct svc_fh *, char *name, int len, struct iattr *attrs, int type, dev_t rdev, struct svc_fh *res); @@ -143,6 +143,7 @@ #define nfserr_noent __constant_htonl(NFSERR_NOENT) #define nfserr_io __constant_htonl(NFSERR_IO) #define nfserr_nxio __constant_htonl(NFSERR_NXIO) +#define nfserr_eagain __constant_htonl(NFSERR_EAGAIN) #define nfserr_acces __constant_htonl(NFSERR_ACCES) #define nfserr_exist __constant_htonl(NFSERR_EXIST) #define nfserr_xdev __constant_htonl(NFSERR_XDEV) @@ -160,14 +161,20 @@ #define nfserr_dquot __constant_htonl(NFSERR_DQUOT) #define nfserr_stale __constant_htonl(NFSERR_STALE) #define nfserr_remote __constant_htonl(NFSERR_REMOTE) +#define nfserr_wflush __constant_htonl(NFSERR_WFLUSH) #define nfserr_badhandle __constant_htonl(NFSERR_BADHANDLE) -#define nfserr_notsync __constant_htonl(NFSERR_NOTSYNC) -#define nfserr_badcookie __constant_htonl(NFSERR_BADCOOKIE) +#define nfserr_notsync __constant_htonl(NFSERR_NOT_SYNC) +#define nfserr_badcookie __constant_htonl(NFSERR_BAD_COOKIE) #define nfserr_notsupp __constant_htonl(NFSERR_NOTSUPP) #define nfserr_toosmall __constant_htonl(NFSERR_TOOSMALL) #define nfserr_serverfault __constant_htonl(NFSERR_SERVERFAULT) #define nfserr_badtype __constant_htonl(NFSERR_BADTYPE) #define nfserr_jukebox __constant_htonl(NFSERR_JUKEBOX) + +/* error code for internal use - if a request fails due to + * kmalloc failure, it gets dropped. Client should resend eventually + */ +#define nfserr_dropit __constant_htonl(30000) /* Check for dir entries '.' and '..' */ #define isdotent(n, l) (l < 3 && n[0] == '.' && (l == 1 || n[1] == '.')) Index: nfsfh.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/nfsd/nfsfh.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- nfsfh.h 14 Jan 2001 16:48:21 -0000 1.1.1.1 +++ nfsfh.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -31,7 +31,7 @@ * ino/dev of the exported inode. */ struct nfs_fhbase_old { - struct dentry * fb_dentry; /* dentry cookie - always 0xfeebbaca */ + __u32 fb_dcookie; /* dentry cookie - always 0xfeebbaca */ __u32 fb_ino; /* our inode number */ __u32 fb_dirino; /* dir inode number, 0 for directories */ __u32 fb_dev; /* our device */ @@ -101,7 +101,7 @@ } fh_base; }; -#define ofh_dcookie fh_base.fh_old.fb_dentry +#define ofh_dcookie fh_base.fh_old.fb_dcookie #define ofh_ino fh_base.fh_old.fb_ino #define ofh_dirino fh_base.fh_old.fb_dirino #define ofh_dev fh_base.fh_old.fb_dev @@ -120,22 +120,22 @@ /* * Conversion macros for the filehandle fields. */ -extern inline __u32 kdev_t_to_u32(kdev_t dev) +static inline __u32 kdev_t_to_u32(kdev_t dev) { return (__u32) dev; } -extern inline kdev_t u32_to_kdev_t(__u32 udev) +static inline kdev_t u32_to_kdev_t(__u32 udev) { return (kdev_t) udev; } -extern inline __u32 ino_t_to_u32(ino_t ino) +static inline __u32 ino_t_to_u32(ino_t ino) { return (__u32) ino; } -extern inline ino_t u32_to_ino_t(__u32 uino) +static inline ino_t u32_to_ino_t(__u32 uino) { return (ino_t) uino; } @@ -199,7 +199,7 @@ * Function prototypes */ u32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int); -int fh_compose(struct svc_fh *, struct svc_export *, struct dentry *); +int fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *); int fh_update(struct svc_fh *); void fh_put(struct svc_fh *); Index: xdr.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/nfsd/xdr.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xdr.h 14 Jan 2001 16:48:23 -0000 1.1.1.1 +++ xdr.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -151,7 +151,7 @@ int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *); int nfssvc_encode_entry(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, unsigned int); + int namlen, loff_t offset, ino_t ino, unsigned int); int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); Index: xdr3.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/nfsd/xdr3.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xdr3.h 14 Jan 2001 16:48:24 -0000 1.1.1.1 +++ xdr3.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -292,10 +292,10 @@ int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *, struct nfsd3_fhandle_pair *); int nfs3svc_encode_entry(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, + int namlen, loff_t offset, ino_t ino, unsigned int); int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, + int namlen, loff_t offset, ino_t ino, unsigned int); |
From: Andy P. <at...@us...> - 2002-04-09 12:44:31
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/sunrpc Modified Files: auth.h clnt.h sched.h stats.h types.h xdr.h xprt.h Log Message: sync 2.4.15 commit 3 Index: auth.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/auth.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- auth.h 14 Jan 2001 16:48:27 -0000 1.1.1.1 +++ auth.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -14,6 +14,8 @@ #include <linux/config.h> #include <linux/sunrpc/sched.h> +#include <asm/atomic.h> + /* size of the nodename buffer */ #define UNX_MAXNODENAME 32 @@ -22,8 +24,10 @@ */ struct rpc_cred { struct rpc_cred * cr_next; /* linked list */ + struct rpc_auth * cr_auth; + struct rpc_credops * cr_ops; unsigned long cr_expire; /* when to gc */ - unsigned short cr_count; /* ref count */ + atomic_t cr_count; /* ref count */ unsigned short cr_flags; /* various flags */ #ifdef RPC_DEBUG unsigned long cr_magic; /* 0x0f4aa4f0 */ @@ -71,6 +75,9 @@ void (*destroy)(struct rpc_auth *); struct rpc_cred * (*crcreate)(int); +}; + +struct rpc_credops { void (*crdestroy)(struct rpc_cred *); int (*crmatch)(struct rpc_cred *, int); @@ -92,8 +99,7 @@ struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); struct rpc_cred * rpcauth_bindcred(struct rpc_task *); void rpcauth_holdcred(struct rpc_task *); -void rpcauth_releasecred(struct rpc_auth *, - struct rpc_cred *); +void put_rpccred(struct rpc_cred *); void rpcauth_unbindcred(struct rpc_task *); int rpcauth_matchcred(struct rpc_auth *, struct rpc_cred *, int); @@ -106,6 +112,13 @@ void rpcauth_free_credcache(struct rpc_auth *); void rpcauth_insert_credcache(struct rpc_auth *, struct rpc_cred *); + +static inline +struct rpc_cred * get_rpccred(struct rpc_cred *cred) +{ + atomic_inc(&cred->cr_count); + return cred; +} #endif /* __KERNEL__ */ #endif /* _LINUX_SUNRPC_AUTH_H */ Index: clnt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/clnt.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- clnt.h 14 Jan 2001 16:48:28 -0000 1.1.1.1 +++ clnt.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -130,7 +130,7 @@ } -extern __inline__ void +static __inline__ void rpc_set_timeout(struct rpc_clnt *clnt, unsigned int retr, unsigned long incr) { xprt_set_timeout(&clnt->cl_timeout, retr, incr); Index: sched.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/sched.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sched.h 14 Jan 2001 16:48:29 -0000 1.1.1.1 +++ sched.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -80,7 +80,7 @@ unsigned short tk_lock; /* Task lock counter */ unsigned char tk_active : 1,/* Task has been activated */ tk_wakeup : 1;/* Task waiting to wake up */ - unsigned int tk_runstate; /* Task run status */ + unsigned long tk_runstate; /* Task run status */ #ifdef RPC_DEBUG unsigned short tk_pid; /* debugging aid */ #endif @@ -180,13 +180,13 @@ void rpc_show_tasks(void); #endif -extern __inline__ void * +static __inline__ void * rpc_malloc(struct rpc_task *task, unsigned int size) { return rpc_allocate(task->tk_flags, size); } -extern __inline__ void +static __inline__ void rpc_exit(struct rpc_task *task, int status) { task->tk_status = status; @@ -194,7 +194,7 @@ } #ifdef RPC_DEBUG -extern __inline__ char * +static __inline__ char * rpc_qname(struct rpc_wait_queue *q) { return q->name? q->name : "unknown"; Index: stats.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/stats.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- stats.h 14 Jan 2001 16:48:28 -0000 1.1.1.1 +++ stats.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -59,13 +59,13 @@ #else -extern inline void svc_proc_unregister(const char *p) {} -extern inline struct proc_dir_entry*svc_proc_register(struct svc_stat *s) +static inline void svc_proc_unregister(const char *p) {} +static inline struct proc_dir_entry*svc_proc_register(struct svc_stat *s) { return NULL; } -extern inline int svc_proc_read(char *a, char **b, off_t c, int d, int *e, void *f) +static inline int svc_proc_read(char *a, char **b, off_t c, int d, int *e, void *f) { return 0; } Index: types.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/types.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- types.h 14 Jan 2001 16:48:31 -0000 1.1.1.1 +++ types.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -21,7 +21,7 @@ struct rpc_listitem * next; }; -extern __inline__ void +static __inline__ void __rpc_append_list(struct rpc_listitem **q, struct rpc_listitem *item) { struct rpc_listitem *next, *prev; @@ -37,14 +37,14 @@ } } -extern __inline__ void +static __inline__ void __rpc_insert_list(struct rpc_listitem **q, struct rpc_listitem *item) { __rpc_append_list(q, item); *q = item; } -extern __inline__ void +static __inline__ void __rpc_remove_list(struct rpc_listitem **q, struct rpc_listitem *item) { struct rpc_listitem *prev = item->prev, Index: xdr.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/xdr.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xdr.h 14 Jan 2001 16:48:31 -0000 1.1.1.1 +++ xdr.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -34,27 +34,27 @@ typedef int (*kxdrproc_t)(void *rqstp, u32 *data, void *obj); /* - * These variables contain pre-xdr'ed values for faster operation. - * FIXME: should be replaced by macros for big-endian machines. + * pre-xdr'ed macros. */ -extern u32 xdr_zero, xdr_one, xdr_two; -extern u32 rpc_success, - rpc_prog_unavail, - rpc_prog_mismatch, - rpc_proc_unavail, - rpc_garbage_args, - rpc_system_err; +#define xdr_zero __constant_htonl(0) +#define xdr_one __constant_htonl(1) +#define xdr_two __constant_htonl(2) -extern u32 rpc_auth_ok, - rpc_autherr_badcred, - rpc_autherr_rejectedcred, - rpc_autherr_badverf, - rpc_autherr_rejectedverf, - rpc_autherr_tooweak, - rpc_autherr_dropit; +#define rpc_success __constant_htonl(RPC_SUCCESS) +#define rpc_prog_unavail __constant_htonl(RPC_PROG_UNAVAIL) +#define rpc_prog_mismatch __constant_htonl(RPC_PROG_MISMATCH) +#define rpc_proc_unavail __constant_htonl(RPC_PROC_UNAVAIL) +#define rpc_garbage_args __constant_htonl(RPC_GARBAGE_ARGS) +#define rpc_system_err __constant_htonl(RPC_SYSTEM_ERR) + +#define rpc_auth_ok __constant_htonl(RPC_AUTH_OK) +#define rpc_autherr_badcred __constant_htonl(RPC_AUTH_BADCRED) +#define rpc_autherr_rejectedcred __constant_htonl(RPC_AUTH_REJECTEDCRED) +#define rpc_autherr_badverf __constant_htonl(RPC_AUTH_BADVERF) +#define rpc_autherr_rejectedverf __constant_htonl(RPC_AUTH_REJECTEDVERF) +#define rpc_autherr_tooweak __constant_htonl(RPC_AUTH_TOOWEAK) -void xdr_init(void); /* * Miscellaneous XDR helper functions @@ -62,6 +62,7 @@ u32 * xdr_encode_array(u32 *p, const char *s, unsigned int len); u32 * xdr_encode_string(u32 *p, const char *s); u32 * xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen); +u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); u32 * xdr_decode_netobj_fixed(u32 *p, void *obj, unsigned int len); Index: xprt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/sunrpc/xprt.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xprt.h 14 Jan 2001 16:48:32 -0000 1.1.1.1 +++ xprt.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -135,15 +135,13 @@ struct rpc_wait_queue sending; /* requests waiting to send */ struct rpc_wait_queue pending; /* requests in flight */ struct rpc_wait_queue backlog; /* waiting for slot */ - struct rpc_wait_queue reconn; /* waiting for reconnect */ struct rpc_rqst * free; /* free slots */ struct rpc_rqst slot[RPC_MAXREQS]; - unsigned int sockstate; /* Socket state */ + unsigned long sockstate; /* Socket state */ unsigned char shutdown : 1, /* being shut down */ nocong : 1, /* no congestion control */ stream : 1, /* TCP */ - tcp_more : 1, /* more record fragments */ - connecting : 1; /* being reconnected */ + tcp_more : 1; /* more record fragments */ /* * State of TCP reply receive stuff @@ -158,6 +156,8 @@ /* * Send stuff */ + spinlock_t sock_lock; /* lock socket info */ + spinlock_t xprt_lock; /* lock xprt info */ struct rpc_task * snd_task; /* Task blocked in send */ @@ -185,10 +185,9 @@ void xprt_release(struct rpc_task *); void xprt_reconnect(struct rpc_task *); int xprt_clear_backlog(struct rpc_xprt *); +int xprt_tcp_pending(void); void __rpciod_tcp_dispatcher(void); -extern struct list_head rpc_xprt_pending; - #define XPRT_WSPACE 0 #define XPRT_CONNECT 1 @@ -200,12 +199,6 @@ #define xprt_set_connected(xp) (set_bit(XPRT_CONNECT, &(xp)->sockstate)) #define xprt_test_and_set_connected(xp) (test_and_set_bit(XPRT_CONNECT, &(xp)->sockstate)) #define xprt_clear_connected(xp) (clear_bit(XPRT_CONNECT, &(xp)->sockstate)) - -static inline -int xprt_tcp_pending(void) -{ - return !list_empty(&rpc_xprt_pending); -} static inline void rpciod_tcp_dispatcher(void) |
From: Andy P. <at...@us...> - 2002-04-09 12:44:30
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/lockd In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/lockd Modified Files: lockd.h nlm.h xdr.h Log Message: sync 2.4.15 commit 3 Index: lockd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/lockd/lockd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- lockd.h 14 Jan 2001 16:48:26 -0000 1.1.1.1 +++ lockd.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -47,6 +47,7 @@ unsigned short h_authflavor; /* RPC authentication type */ unsigned short h_reclaiming : 1, h_inuse : 1, + h_killed : 1, h_monitored : 1; wait_queue_head_t h_gracewait; /* wait while reclaiming */ u32 h_state; /* pseudo-state counter */ @@ -120,7 +121,7 @@ #ifdef CONFIG_LOCKD_V4 extern struct svc_procedure nlmsvc_procedures4[]; #endif -extern unsigned long nlmsvc_grace_period; +extern int nlmsvc_grace_period; extern unsigned long nlmsvc_timeout; /* @@ -173,7 +174,7 @@ void nlmsvc_mark_resources(void); void nlmsvc_free_host_resources(struct nlm_host *); -extern __inline__ struct inode * +static __inline__ struct inode * nlmsvc_file_inode(struct nlm_file *file) { return file->f_file.f_dentry->d_inode; @@ -182,7 +183,7 @@ /* * Compare two host addresses (needs modifying for ipv6) */ -extern __inline__ int +static __inline__ int nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) { return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; @@ -192,7 +193,7 @@ * Compare two NLM locks. * When the second lock is of type F_UNLCK, this acts like a wildcard. */ -extern __inline__ int +static __inline__ int nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) { return fl1->fl_pid == fl2->fl_pid Index: nlm.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/lockd/nlm.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- nlm.h 14 Jan 2001 16:48:26 -0000 1.1.1.1 +++ nlm.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -49,10 +49,10 @@ #define NLMPROC_CANCEL_RES 13 #define NLMPROC_UNLOCK_RES 14 #define NLMPROC_GRANTED_RES 15 +#define NLMPROC_NSM_NOTIFY 16 /* statd callback */ #define NLMPROC_SHARE 20 #define NLMPROC_UNSHARE 21 #define NLMPROC_NM_LOCK 22 #define NLMPROC_FREE_ALL 23 -#define NLMPROC_NSM_NOTIFY 24 /* statd callback */ #endif /* LINUX_LOCKD_NLM_H */ Index: xdr.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/lockd/xdr.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xdr.h 14 Jan 2001 16:48:27 -0000 1.1.1.1 +++ xdr.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -26,6 +26,7 @@ /* Lock info passed via NLM */ struct nlm_lock { char * caller; + int len; /* length of "caller" */ struct nfs_fh fh; struct xdr_netobj oh; struct file_lock fl; @@ -82,7 +83,6 @@ */ #define NLMSVC_XDRSIZE sizeof(struct nlm_args) -void nlmxdr_init(void); int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); |
From: Andy P. <at...@us...> - 2002-04-09 12:44:30
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv6 In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/netfilter_ipv6 Modified Files: ip6_tables.h Log Message: sync 2.4.15 commit 3 Index: ip6_tables.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv6/ip6_tables.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip6_tables.h 14 Jan 2001 16:48:50 -0000 1.1.1.1 +++ ip6_tables.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -295,7 +295,7 @@ #define IP6T_ERROR_TARGET "ERROR" /* Helper functions */ -extern __inline__ struct ip6t_entry_target * +static __inline__ struct ip6t_entry_target * ip6t_get_target(struct ip6t_entry *e) { return (void *)e + e->target_offset; |
From: Andy P. <at...@us...> - 2002-04-09 12:44:30
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/mtd In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/mtd Modified Files: cfi.h compatmac.h doc2000.h flashchip.h ftl.h iflash.h jedec.h map.h mtd.h nand.h nand_ids.h nftl.h partitions.h pmc551.h Added Files: cfi_endian.h gen_probe.h nand_ecc.h Removed Files: mapped.h Log Message: sync 2.4.15 commit 3 --- NEW FILE --- /* * $Id: cfi_endian.h,v 1.1 2002/04/09 12:44:17 atp Exp $ * */ #include <asm/byteorder.h> #ifndef CONFIG_MTD_CFI_ADV_OPTIONS #define CFI_HOST_ENDIAN #else #ifdef CONFIG_MTD_CFI_NOSWAP #define CFI_HOST_ENDIAN #endif #ifdef CONFIG_MTD_CFI_LE_BYTE_SWAP #define CFI_LITTLE_ENDIAN #endif #ifdef CONFIG_MTD_CFI_BE_BYTE_SWAP #define CFI_BIG_ENDIAN #endif #endif #if defined(CFI_LITTLE_ENDIAN) #define cpu_to_cfi8(x) (x) #define cfi8_to_cpu(x) (x) #define cpu_to_cfi16(x) cpu_to_le16(x) #define cpu_to_cfi32(x) cpu_to_le32(x) #define cfi16_to_cpu(x) le16_to_cpu(x) #define cfi32_to_cpu(x) le32_to_cpu(x) #elif defined (CFI_BIG_ENDIAN) #define cpu_to_cfi8(x) (x) #define cfi8_to_cpu(x) (x) #define cpu_to_cfi16(x) cpu_to_be16(x) #define cpu_to_cfi32(x) cpu_to_be32(x) #define cfi16_to_cpu(x) be16_to_cpu(x) #define cfi32_to_cpu(x) be32_to_cpu(x) #elif defined (CFI_HOST_ENDIAN) #define cpu_to_cfi8(x) (x) #define cfi8_to_cpu(x) (x) #define cpu_to_cfi16(x) (x) #define cpu_to_cfi32(x) (x) #define cfi16_to_cpu(x) (x) #define cfi32_to_cpu(x) (x) #else #error No CFI endianness defined #endif --- NEW FILE --- /* * (C) 2001, 2001 Red Hat, Inc. * GPL'd * $Id: gen_probe.h,v 1.1 2002/04/09 12:44:17 atp Exp $ */ #ifndef __LINUX_MTD_GEN_PROBE_H__ #define __LINUX_MTD_GEN_PROBE_H__ #include <linux/mtd/flashchip.h> #include <linux/mtd/map.h> #include <linux/mtd/cfi.h> struct chip_probe { char *name; int (*probe_chip)(struct map_info *map, __u32 base, struct flchip *chips, struct cfi_private *cfi); }; struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp); #endif /* __LINUX_MTD_GEN_PROBE_H__ */ --- NEW FILE --- /* * drivers/mtd/nand_ecc.h * * Copyright (C) 2000 Steven J. Hill (sj...@co...) * * $Id: nand_ecc.h,v 1.1 2002/04/09 12:44:17 atp Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This file is the header for the ECC algorithm. */ /* * Creates non-inverted ECC code from line parity */ void nand_trans_result(u_char reg2, u_char reg3, u_char *ecc_code); /* * Calculate 3 byte ECC code for 256 byte block */ void nand_calculate_ecc (const u_char *dat, u_char *ecc_code); /* * Detect and correct a 1 bit error for 256 byte block */ int nand_correct_data (u_char *dat, u_char *read_ecc, u_char *calc_ecc); Index: cfi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/cfi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- cfi.h 14 Jan 2001 16:48:13 -0000 1.1.1.1 +++ cfi.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -7,8 +7,155 @@ #ifndef __MTD_CFI_H__ #define __MTD_CFI_H__ +#include <linux/config.h> +#include <linux/delay.h> #include <linux/types.h> +#include <linux/interrupt.h> #include <linux/mtd/flashchip.h> +#include <linux/mtd/cfi_endian.h> + +/* + * You can optimize the code size and performance by defining only + * the geometry(ies) available on your hardware. + * CFIDEV_INTERLEAVE_n, where represents the interleave (number of chips to fill the bus width) + * CFIDEV_BUSWIDTH_n, where n is the bus width in bytes (1, 2 or 4 bytes) + * + * By default, all (known) geometries are supported. + */ + +#ifndef CONFIG_MTD_CFI_GEOMETRY + +#define CFIDEV_INTERLEAVE_1 (1) +#define CFIDEV_INTERLEAVE_2 (2) +#define CFIDEV_INTERLEAVE_4 (4) + +#define CFIDEV_BUSWIDTH_1 (1) +#define CFIDEV_BUSWIDTH_2 (2) +#define CFIDEV_BUSWIDTH_4 (4) + +#else + +#ifdef CONFIG_MTD_CFI_I1 +#define CFIDEV_INTERLEAVE_1 (1) +#endif +#ifdef CONFIG_MTD_CFI_I2 +#define CFIDEV_INTERLEAVE_2 (2) +#endif +#ifdef CONFIG_MTD_CFI_I4 +#define CFIDEV_INTERLEAVE_4 (4) +#endif + +#ifdef CONFIG_MTD_CFI_B1 +#define CFIDEV_BUSWIDTH_1 (1) +#endif +#ifdef CONFIG_MTD_CFI_B2 +#define CFIDEV_BUSWIDTH_2 (2) +#endif +#ifdef CONFIG_MTD_CFI_B4 +#define CFIDEV_BUSWIDTH_4 (4) +#endif + +#endif + +/* + * The following macros are used to select the code to execute: + * cfi_buswidth_is_*() + * cfi_interleave_is_*() + * [where * is either 1, 2 or 4] + * Those macros should be used with 'if' statements. If only one of few + * geometry arrangements are selected, they expand to constants thus allowing + * the compiler (most of them being 0) to optimize away all the unneeded code, + * while still validating the syntax (which is not possible with embedded + * #if ... #endif constructs). + */ + +#ifdef CFIDEV_INTERLEAVE_1 +# ifdef CFIDEV_INTERLEAVE +# undef CFIDEV_INTERLEAVE +# define CFIDEV_INTERLEAVE (cfi->interleave) +# else +# define CFIDEV_INTERLEAVE CFIDEV_INTERLEAVE_1 +# endif +# define cfi_interleave_is_1() (CFIDEV_INTERLEAVE == CFIDEV_INTERLEAVE_1) +#else +# define cfi_interleave_is_1() (0) +#endif + +#ifdef CFIDEV_INTERLEAVE_2 +# ifdef CFIDEV_INTERLEAVE +# undef CFIDEV_INTERLEAVE +# define CFIDEV_INTERLEAVE (cfi->interleave) +# else +# define CFIDEV_INTERLEAVE CFIDEV_INTERLEAVE_2 +# endif +# define cfi_interleave_is_2() (CFIDEV_INTERLEAVE == CFIDEV_INTERLEAVE_2) +#else +# define cfi_interleave_is_2() (0) +#endif + +#ifdef CFIDEV_INTERLEAVE_4 +# ifdef CFIDEV_INTERLEAVE +# undef CFIDEV_INTERLEAVE +# define CFIDEV_INTERLEAVE (cfi->interleave) +# else +# define CFIDEV_INTERLEAVE CFIDEV_INTERLEAVE_4 +# endif +# define cfi_interleave_is_4() (CFIDEV_INTERLEAVE == CFIDEV_INTERLEAVE_4) +#else +# define cfi_interleave_is_4() (0) +#endif + +#ifndef CFIDEV_INTERLEAVE +#error You must define at least one interleave to support! +#endif + +#ifdef CFIDEV_BUSWIDTH_1 +# ifdef CFIDEV_BUSWIDTH +# undef CFIDEV_BUSWIDTH +# define CFIDEV_BUSWIDTH (map->buswidth) +# else +# define CFIDEV_BUSWIDTH CFIDEV_BUSWIDTH_1 +# endif +# define cfi_buswidth_is_1() (CFIDEV_BUSWIDTH == CFIDEV_BUSWIDTH_1) +#else +# define cfi_buswidth_is_1() (0) +#endif + +#ifdef CFIDEV_BUSWIDTH_2 +# ifdef CFIDEV_BUSWIDTH +# undef CFIDEV_BUSWIDTH +# define CFIDEV_BUSWIDTH (map->buswidth) +# else +# define CFIDEV_BUSWIDTH CFIDEV_BUSWIDTH_2 +# endif +# define cfi_buswidth_is_2() (CFIDEV_BUSWIDTH == CFIDEV_BUSWIDTH_2) +#else +# define cfi_buswidth_is_2() (0) +#endif + +#ifdef CFIDEV_BUSWIDTH_4 +# ifdef CFIDEV_BUSWIDTH +# undef CFIDEV_BUSWIDTH +# define CFIDEV_BUSWIDTH (map->buswidth) +# else +# define CFIDEV_BUSWIDTH CFIDEV_BUSWIDTH_4 +# endif +# define cfi_buswidth_is_4() (CFIDEV_BUSWIDTH == CFIDEV_BUSWIDTH_4) +#else +# define cfi_buswidth_is_4() (0) +#endif + +#ifndef CFIDEV_BUSWIDTH +#error You must define at least one bus width to support! +#endif + +/* NB: these values must represents the number of bytes needed to meet the + * device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes. + * These numbers are used in calculations. + */ +#define CFI_DEVICETYPE_X8 (8 / 8) +#define CFI_DEVICETYPE_X16 (16 / 8) +#define CFI_DEVICETYPE_X32 (32 / 8) /* NB: We keep these structures in memory in HOST byteorder, except * where individually noted. @@ -37,7 +184,7 @@ __u16 InterfaceDesc; __u16 MaxBufWriteSize; __u8 NumEraseRegions; - __u32 EraseRegionInfo[1]; /* Not host ordered */ + __u32 EraseRegionInfo[0]; /* Not host ordered */ } __attribute__((packed)); /* Extended Query Structure for both PRI and ALT */ @@ -82,20 +229,165 @@ #define P_ID_RESERVED 65535 +#define CFI_MODE_CFI 0 +#define CFI_MODE_JEDEC 1 + struct cfi_private { __u16 cmdset; void *cmdset_priv; int interleave; + int device_type; + int cfi_mode; /* Are we a JEDEC device pretending to be CFI? */ + int addr_unlock1; + int addr_unlock2; + int fast_prog; struct mtd_info *(*cmdset_setup)(struct map_info *); - struct cfi_ident cfiq; /* For now only one. We insist that all devs + struct cfi_ident *cfiq; /* For now only one. We insist that all devs must be of the same type. */ + int mfr, id; int numchips; unsigned long chipshift; /* Because they're of the same type */ const char *im_name; /* inter_module name for cmdset_setup */ struct flchip chips[0]; /* per-chip data structure for each chip */ - /* do not add extra fields after "chips" */ }; #define MAX_CFI_CHIPS 8 /* Entirely arbitrary to avoid realloc() */ + +/* + * Returns the command address according to the given geometry. + */ +static inline __u32 cfi_build_cmd_addr(__u32 cmd_ofs, int interleave, int type) +{ + return (cmd_ofs * type) * interleave; +} + +/* + * Transforms the CFI command for the given geometry (bus width & interleave. + */ +static inline __u32 cfi_build_cmd(u_char cmd, struct map_info *map, struct cfi_private *cfi) +{ + __u32 val = 0; + + if (cfi_buswidth_is_1()) { + /* 1 x8 device */ + val = cmd; + } else if (cfi_buswidth_is_2()) { + if (cfi_interleave_is_1()) { + /* 1 x16 device in x16 mode */ + val = cpu_to_cfi16(cmd); + } else if (cfi_interleave_is_2()) { + /* 2 (x8, x16 or x32) devices in x8 mode */ + val = cpu_to_cfi16((cmd << 8) | cmd); + } + } else if (cfi_buswidth_is_4()) { + if (cfi_interleave_is_1()) { + /* 1 x32 device in x32 mode */ + val = cpu_to_cfi32(cmd); + } else if (cfi_interleave_is_2()) { + /* 2 x16 device in x16 mode */ + val = cpu_to_cfi32((cmd << 16) | cmd); + } else if (cfi_interleave_is_4()) { + /* 4 (x8, x16 or x32) devices in x8 mode */ + val = (cmd << 16) | cmd; + val = cpu_to_cfi32((val << 8) | val); + } + } + return val; +} +#define CMD(x) cfi_build_cmd((x), map, cfi) + +/* + * Read a value according to the bus width. + */ + +static inline __u32 cfi_read(struct map_info *map, __u32 addr) +{ + if (cfi_buswidth_is_1()) { + return map->read8(map, addr); + } else if (cfi_buswidth_is_2()) { + return map->read16(map, addr); + } else if (cfi_buswidth_is_4()) { + return map->read32(map, addr); + } else { + return 0; + } +} + +/* + * Write a value according to the bus width. + */ + +static inline void cfi_write(struct map_info *map, __u32 val, __u32 addr) +{ + if (cfi_buswidth_is_1()) { + map->write8(map, val, addr); + } else if (cfi_buswidth_is_2()) { + map->write16(map, val, addr); + } else if (cfi_buswidth_is_4()) { + map->write32(map, val, addr); + } +} + +/* + * Sends a CFI command to a bank of flash for the given geometry. + * + * Returns the offset in flash where the command was written. + * If prev_val is non-null, it will be set to the value at the command address, + * before the command was written. + */ +static inline __u32 cfi_send_gen_cmd(u_char cmd, __u32 cmd_addr, __u32 base, + struct map_info *map, struct cfi_private *cfi, + int type, __u32 *prev_val) +{ + __u32 val; + __u32 addr = base + cfi_build_cmd_addr(cmd_addr, CFIDEV_INTERLEAVE, type); + + val = cfi_build_cmd(cmd, map, cfi); + + if (prev_val) + *prev_val = cfi_read(map, addr); + + cfi_write(map, val, addr); + + return addr - base; +} + +static inline __u8 cfi_read_query(struct map_info *map, __u32 addr) +{ + if (cfi_buswidth_is_1()) { + return map->read8(map, addr); + } else if (cfi_buswidth_is_2()) { + return cfi16_to_cpu(map->read16(map, addr)); + } else if (cfi_buswidth_is_4()) { + return cfi32_to_cpu(map->read32(map, addr)); + } else { + return 0; + } +} + +static inline void cfi_udelay(int us) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) + if (current->need_resched) { + unsigned long t = us * HZ / 1000000; + if (t < 1) + t = 1; + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(t); + } + else +#endif + udelay(us); +} +static inline void cfi_spin_lock(spinlock_t *mutex) +{ + spin_lock_bh(mutex); +} + +static inline void cfi_spin_unlock(spinlock_t *mutex) +{ + spin_unlock_bh(mutex); +} + #endif /* __MTD_CFI_H__ */ Index: compatmac.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/compatmac.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: doc2000.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/doc2000.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- doc2000.h 14 Jan 2001 16:48:15 -0000 1.1.1.1 +++ doc2000.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -43,18 +43,22 @@ * On PPC, it's mmap'd and 16-bit wide. * Others use readb/writeb */ -#if defined(__arm__) -#define ReadDOC_(adr, reg) ((unsigned char)(*(__u32 *)(((unsigned long)adr)+(reg<<2)))) -#define WriteDOC_(d, adr, reg) do{ *(__u32 *)(((unsigned long)adr)+(reg<<2)) = (__u32)d} while(0) +#if defined(__arm__) +#define ReadDOC_(adr, reg) ((unsigned char)(*(__u32 *)(((unsigned long)adr)+((reg)<<2)))) +#define WriteDOC_(d, adr, reg) do{ *(__u32 *)(((unsigned long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0) +#define DOC_IOREMAP_LEN 0x8000 #elif defined(__ppc__) -#define ReadDOC_(adr, reg) ((unsigned char)(*(__u16 *)(((unsigned long)adr)+(reg<<1)))) -#define WriteDOC_(d, adr, reg) do{ *(__u16 *)(((unsigned long)adr)+(reg<<1)) = (__u16)d} while(0) +#define ReadDOC_(adr, reg) ((unsigned char)(*(__u16 *)(((unsigned long)adr)+((reg)<<1)))) +#define WriteDOC_(d, adr, reg) do{ *(__u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0) +#define DOC_IOREMAP_LEN 0x4000 #else -#define ReadDOC_(adr, reg) readb(((unsigned long)adr) + reg) -#define WriteDOC_(d, adr, reg) writeb(d, ((unsigned long)adr) + reg) +#define ReadDOC_(adr, reg) readb(((unsigned long)adr) + (reg)) +#define WriteDOC_(d, adr, reg) writeb(d, ((unsigned long)adr) + (reg)) +#define DOC_IOREMAP_LEN 0x2000 + #endif -#if defined(__i386__) +#if defined(__i386__) || defined(__x86_64__) #define USE_MEMCPY #endif @@ -130,6 +134,7 @@ int numchips; struct Nand *chips; struct mtd_info *nextdoc; + struct semaphore lock; }; int doc_decode_ecc(unsigned char sector[512], unsigned char ecc1[6]); Index: flashchip.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/flashchip.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- flashchip.h 14 Jan 2001 16:48:15 -0000 1.1.1.1 +++ flashchip.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -25,12 +25,17 @@ FL_CFI_QUERY, FL_JEDEC_QUERY, FL_ERASING, + FL_ERASE_SUSPENDING, FL_ERASE_SUSPENDED, FL_WRITING, + FL_WRITING_TO_BUFFER, + FL_WRITE_SUSPENDING, FL_WRITE_SUSPENDED, FL_PM_SUSPENDED, FL_SYNCING, FL_UNLOADING, + FL_LOCKING, + FL_UNLOCKING, FL_UNKNOWN } flstate_t; Index: ftl.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/ftl.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- ftl.h 25 Feb 2001 23:14:50 -0000 1.1.1.2 +++ ftl.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -1,4 +1,7 @@ /* + * $Id$ + * + * Derived from (and probably identical to): * ftl.h 1.7 1999/10/25 20:23:17 * * The contents of this file are subject to the Mozilla Public License @@ -16,8 +19,8 @@ * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. * * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License version 2 (the "GPL"), in which - * case the provisions of the GPL are applicable instead of the + * terms of the GNU General Public License version 2 (the "GPL"), in + * which case the provisions of the GPL are applicable instead of the * above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use * your version of this file under the MPL, indicate your decision by Index: iflash.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/iflash.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- iflash.h 14 Jan 2001 16:48:15 -0000 1.1.1.1 +++ iflash.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -1,4 +1,4 @@ -/* iflash.h $revision$ $date$ (David Hinds) */ +/* $Id$ */ #ifndef __MTD_IFLASH_H__ #define __MTD_IFLASH_H__ Index: jedec.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/jedec.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- jedec.h 14 Jan 2001 16:48:16 -0000 1.1.1.1 +++ jedec.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -64,6 +64,4 @@ struct jedec_flash_chip chips[MAX_JEDEC_CHIPS]; }; -extern const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id); - #endif Index: map.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/map.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- map.h 25 Feb 2001 23:14:50 -0000 1.1.1.2 +++ map.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -53,47 +53,23 @@ unsigned long map_priv_1; unsigned long map_priv_2; void *fldrv_priv; - void (*fldrv_destroy)(struct mtd_info *); - const char *im_name; + struct mtd_chip_driver *fldrv; }; -#ifdef CONFIG_MODULES -/* - * Probe for the contents of a map device and make an MTD structure - * if anything is recognised. Doesn't register it because the calling - * map driver needs to set the 'module' field first. - */ -static inline struct mtd_info *do_map_probe(struct map_info *map, const char *funcname, const char *modname) -{ - struct mtd_info *(*probe_p)(struct map_info *); - struct mtd_info *mtd = NULL; - if ((probe_p = inter_module_get_request(modname, funcname))) - mtd = (*probe_p)(map); /* map->im_name is set by probe */ +struct mtd_chip_driver { + struct mtd_info *(*probe)(struct map_info *map); + void (*destroy)(struct mtd_info *); + struct module *module; + char *name; + struct list_head list; +}; - return mtd; -} +void register_mtd_chip_driver(struct mtd_chip_driver *); +void unregister_mtd_chip_driver(struct mtd_chip_driver *); +struct mtd_info *do_map_probe(char *name, struct map_info *map); -/* - * Commonly-used probe functions for different types of chip. - */ -#define do_cfi_probe(x) do_map_probe(x, "cfi_probe", "cfi_probe") -#define do_jedec_probe(x) do_map_probe(x, "jedec_probe", "jedec_probe") -#define do_ram_probe(x) do_map_probe(x, "map_ram_probe", "map_ram") -#define do_rom_probe(x) do_map_probe(x, "map_rom_probe", "map_rom") -#else - /* without module support, call probe function directly */ -extern struct mtd_info *cfi_probe(struct map_info *); -extern struct mtd_info *jedec_probe(struct map_info *); -extern struct mtd_info *map_ram_probe(struct map_info *); -extern struct mtd_info *map_rom_probe(struct map_info *); - -#define do_cfi_probe(x) cfi_probe(x) -#define do_jedec_probe(x) jedec_probe(x) -#define do_ram_probe(x) map_ram_probe(x) -#define do_rom_probe(x) map_rom_probe(x) -#endif /* * Destroy an MTD device which was created for a map device. @@ -103,8 +79,12 @@ { struct map_info *map = mtd->priv; - map->fldrv_destroy(mtd); - inter_module_put(map->im_name); + if (map->fldrv->destroy) + map->fldrv->destroy(mtd); +#ifdef CONFIG_MODULES + if (map->fldrv->module) + __MOD_DEC_USE_COUNT(map->fldrv->module); +#endif kfree(mtd); } Index: mtd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/mtd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- mtd.h 14 Jan 2001 16:48:17 -0000 1.1.1.1 +++ mtd.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -16,13 +16,13 @@ #endif /* __KERNEL__ */ struct erase_info_user { - unsigned long start; - unsigned long length; + u_int32_t start; + u_int32_t length; }; struct mtd_oob_buf { - loff_t start; - ssize_t length; + u_int32_t start; + u_int32_t length; unsigned char *ptr; }; @@ -68,13 +68,21 @@ struct mtd_info_user { u_char type; - u_long flags; - u_long size; // Total size of the MTD - u_long erasesize; - u_long oobblock; // Size of OOB blocks (e.g. 512) - u_long oobsize; // Amount of OOB data per block (e.g. 16) - u_long ecctype; - u_long eccsize; + u_int32_t flags; + u_int32_t size; // Total size of the MTD + u_int32_t erasesize; + u_int32_t oobblock; // Size of OOB blocks (e.g. 512) + u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) + u_int32_t ecctype; + u_int32_t eccsize; +}; + +struct region_info_user { + u_int32_t offset; /* At which this region starts, + * from the beginning of the MTD */ + u_int32_t erasesize; /* For this region */ + u_int32_t numblocks; /* Number of blocks in this region */ + u_int32_t regionindex; }; #define MEMGETINFO _IOR('M', 1, struct mtd_info_user) @@ -83,11 +91,14 @@ #define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) #define MEMLOCK _IOW('M', 5, struct erase_info_user) #define MEMUNLOCK _IOW('M', 6, struct erase_info_user) +#define MEMGETREGIONCOUNT _IOR('M', 7, int) +#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user) #ifndef __KERNEL__ typedef struct mtd_info_user mtd_info_t; typedef struct erase_info_user erase_info_t; +typedef struct region_info_user region_info_t; /* User-space ioctl definitions */ @@ -103,8 +114,8 @@ struct erase_info { struct mtd_info *mtd; - u_long addr; - u_long len; + u_int32_t addr; + u_int32_t len; u_long time; u_long retries; u_int dev; @@ -115,22 +126,40 @@ struct erase_info *next; }; +struct mtd_erase_region_info { + u_int32_t offset; /* At which this region starts, from the beginning of the MTD */ + u_int32_t erasesize; /* For this region */ + u_int32_t numblocks; /* Number of blocks of erasesize in this region */ +}; struct mtd_info { u_char type; - u_long flags; - u_long size; // Total size of the MTD - u_long erasesize; - u_long oobblock; // Size of OOB blocks (e.g. 512) - u_long oobsize; // Amount of OOB data per block (e.g. 16) - u_long ecctype; - u_long eccsize; + u_int32_t flags; + u_int32_t size; // Total size of the MTD + + /* "Major" erase size for the device. Naïve users may take this + * to be the only erase size available, or may use the more detailed + * information below if they desire + */ + u_int32_t erasesize; + + u_int32_t oobblock; // Size of OOB blocks (e.g. 512) + u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) + u_int32_t ecctype; + u_int32_t eccsize; // Kernel-only stuff starts here. char *name; int index; - u_long bank_size; + /* Data for variable erase regions. If numeraseregions is zero, + * it means that the whole device has erasesize as given above. + */ + int numeraseregions; + struct mtd_erase_region_info *eraseregions; + + /* This really shouldn't be here. It can go away in 2.5 */ + u_int32_t bank_size; struct module *module; int (*erase) (struct mtd_info *mtd, struct erase_info *instr); Index: nand.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/nand.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: nand_ids.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/nand_ids.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: nftl.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/nftl.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- nftl.h 14 Jan 2001 16:48:18 -0000 1.1.1.1 +++ nftl.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -115,6 +115,7 @@ #define MAX_NFTLS 16 #define MAX_SECTORS_PER_UNIT 32 +#define NFTL_PARTN_BITS 4 #endif /* __KERNEL__ */ Index: partitions.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/partitions.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- partitions.h 14 Jan 2001 16:48:20 -0000 1.1.1.1 +++ partitions.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -22,10 +22,11 @@ * * For each partition, these fields are available: * name: string that will be used to label the partition's MTD device. - * size: the partition size; if 0, the partition will extend to the end of the - * master MTD device. - * offset: absolute starting position within the master MTD device; if 0, - * partition will start where the previous one ended. + * size: the partition size; if defined as MTDPART_SIZ_FULL, the partition + * will extend to the end of the master MTD device. + * offset: absolute starting position within the master MTD device; if + * defined as MTDPART_OFS_APPEND, the partition will start where the + * previous one ended. * mask_flags: contains flags that have to be masked (removed) from the * master MTD flag set for the corresponding MTD partition. * For example, to force a read-only partition, simply adding @@ -37,10 +38,13 @@ struct mtd_partition { char *name; /* identifier string */ - u_long size; /* partition size */ - u_long offset; /* offset within the master MTD space */ - u_long mask_flags; /* master MTD flags to mask out for this partition */ + u_int32_t size; /* partition size */ + u_int32_t offset; /* offset within the master MTD space */ + u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ }; + +#define MTDPART_OFS_APPEND (-1) +#define MTDPART_SIZ_FULL (0) int add_mtd_partitions(struct mtd_info *, struct mtd_partition *, int); Index: pmc551.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/mtd/pmc551.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pmc551.h 14 Jan 2001 16:48:19 -0000 1.1.1.1 +++ pmc551.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -26,9 +26,9 @@ struct mypriv { struct pci_dev *dev; u_char *start; - u32 mem_map0_base_val; - u32 curr_mem_map0_val; - u32 aperture_size; + u32 base_map0; + u32 curr_map0; + u32 asize; struct mtd_info *nextpmc551; }; @@ -37,9 +37,10 @@ */ static int pmc551_erase(struct mtd_info *, struct erase_info *); static void pmc551_unpoint(struct mtd_info *, u_char *); +static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); -static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char -*); +static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); + /* * Define the PCI ID's if the kernel doesn't define them for us @@ -73,9 +74,6 @@ #define PMC551_DRAM_BLK_SET_COL_MUX(x,v) (((x) & ~0x00007000) | (((v) & 0x7) << 12)) #define PMC551_DRAM_BLK_SET_ROW_MUX(x,v) (((x) & ~0x00000f00) | (((v) & 0xf) << 8)) - -#define PMC551_ADDR_HIGH_MASK 0x3ff00000 -#define PMC551_ADDR_LOW_MASK 0x000fffff #endif /* __MTD_PMC551_H__ */ --- mapped.h DELETED --- |
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4 In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/netfilter_ipv4 Modified Files: ip_conntrack.h ip_conntrack_core.h ip_conntrack_ftp.h ip_conntrack_protocol.h ip_conntrack_tuple.h ip_nat.h ip_nat_helper.h ip_tables.h listhelp.h Added Files: ip_conntrack_icmp.h ip_conntrack_irc.h ipt_TCPMSS.h ipt_length.h ipt_tcpmss.h ipt_ttl.h Removed Files: ip_nat_ftp.h Log Message: sync 2.4.15 commit 3 --- NEW FILE --- #ifndef _IP_CONNTRACK_ICMP_H #define _IP_CONNTRACK_ICMP_H /* ICMP tracking. */ #include <asm/atomic.h> struct ip_ct_icmp { /* Optimization: when number in == number out, forget immediately. */ atomic_t count; }; #endif /* _IP_CONNTRACK_ICMP_H */ --- NEW FILE --- /* IRC extension for IP connection tracking. * (C) 2000 by Harald Welte <la...@gn...> * based on RR's ip_conntrack_ftp.h * * ip_conntrack_irc.h,v 1.6 2000/11/07 18:26:42 laforge Exp * * 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 _IP_CONNTRACK_IRC_H #define _IP_CONNTRACK_IRC_H #ifndef __KERNEL__ #error Only in kernel. #endif #include <linux/netfilter_ipv4/lockhelp.h> #define IP_CONNTR_IRC 2 struct dccproto { char* match; int matchlen; }; /* Protects irc part of conntracks */ DECLARE_LOCK_EXTERN(ip_irc_lock); /* We record seq number and length of irc ip/port text here: all in host order. */ struct ip_ct_irc { /* This tells NAT that this is an IRC connection */ int is_irc; /* sequence number where address part of DCC command begins */ u_int32_t seq; /* 0 means not found yet */ u_int32_t len; /* Port that was to be used */ u_int16_t port; }; #endif /* _IP_CONNTRACK_IRC_H */ --- NEW FILE --- #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*/ --- NEW FILE --- #ifndef _IPT_LENGTH_H #define _IPT_LENGTH_H struct ipt_length_info { u_int16_t min, max; u_int8_t invert; }; #endif /*_IPT_LENGTH_H*/ --- NEW FILE --- #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*/ --- NEW FILE --- /* IP tables module for matching the value of the TTL * (C) 2000 by Harald Welte <la...@gn...> */ #ifndef _IPT_TTL_H #define _IPT_TTL_H enum { IPT_TTL_EQ = 0, /* equals */ IPT_TTL_NE, /* not equals */ IPT_TTL_LT, /* less than */ IPT_TTL_GT, /* greater than */ }; struct ipt_ttl_info { u_int8_t mode; u_int8_t ttl; }; #endif Index: ip_conntrack.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_conntrack.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_conntrack.h 14 Jan 2001 16:48:41 -0000 1.1.1.1 +++ ip_conntrack.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -32,6 +32,7 @@ #include <linux/types.h> #include <linux/skbuff.h> #include <linux/netfilter_ipv4/ip_conntrack_tcp.h> +#include <linux/netfilter_ipv4/ip_conntrack_icmp.h> #ifdef CONFIG_NF_DEBUG #define IP_NF_ASSERT(x) \ @@ -56,12 +57,8 @@ IPS_SEEN_REPLY_BIT = 1, IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT), - /* Packet seen leaving box: bit 2 set. Can be set, not unset. */ - IPS_CONFIRMED_BIT = 2, - IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT), - /* Conntrack should never be early-expired. */ - IPS_ASSURED_BIT = 4, + IPS_ASSURED_BIT = 2, IPS_ASSURED = (1 << IPS_ASSURED_BIT), }; @@ -84,16 +81,15 @@ #include <linux/netfilter_ipv4/ip_nat.h> #endif -#if defined(CONFIG_IP_NF_FTP) || defined(CONFIG_IP_NF_FTP_MODULE) #include <linux/netfilter_ipv4/ip_conntrack_ftp.h> -#ifdef CONFIG_IP_NF_NAT_NEEDED -#include <linux/netfilter_ipv4/ip_nat_ftp.h> -#endif + +#if defined(CONFIG_IP_NF_IRC) || defined(CONFIG_IP_NF_IRC_MODULE) +#include <linux/netfilter_ipv4/ip_conntrack_irc.h> #endif struct ip_conntrack { - /* Usage count in here is 1 for destruct timer, 1 per skb, + /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, plus 1 for any connection(s) we are `master' for */ struct nf_conntrack ct_general; @@ -124,11 +120,13 @@ union { struct ip_ct_tcp tcp; + struct ip_ct_icmp icmp; } proto; union { -#if defined(CONFIG_IP_NF_FTP) || defined(CONFIG_IP_NF_FTP_MODULE) struct ip_ct_ftp ct_ftp_info; +#if defined(CONFIG_IP_NF_IRC) || defined(CONFIG_IP_NF_IRC_MODULE) + struct ip_ct_irc ct_irc_info; #endif } help; @@ -136,9 +134,7 @@ struct { struct ip_nat_info info; union { -#if defined(CONFIG_IP_NF_FTP) || defined(CONFIG_IP_NF_FTP_MODULE) - struct ip_nat_ftp_info ftp_info[IP_CT_DIR_MAX]; -#endif + /* insert nat helper private data here */ } help; #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) @@ -186,5 +182,13 @@ extern void ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data), void *data); + +/* It's confirmed if it is, or has been in the hash table. */ +static inline int is_confirmed(struct ip_conntrack *ct) +{ + return ct->tuplehash[IP_CT_DIR_ORIGINAL].list.next != NULL; +} + +extern unsigned int ip_conntrack_htable_size; #endif /* __KERNEL__ */ #endif /* _IP_CONNTRACK_H */ Index: ip_conntrack_core.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_conntrack_core.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_conntrack_core.h 14 Jan 2001 16:48:41 -0000 1.1.1.1 +++ ip_conntrack_core.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -33,10 +33,17 @@ ip_conntrack_find_get(const struct ip_conntrack_tuple *tuple, const struct ip_conntrack *ignored_conntrack); -/* Confirm a connection */ -void ip_conntrack_confirm(struct ip_conntrack *ct); +extern int __ip_conntrack_confirm(struct nf_ct_info *nfct); + +/* Confirm a connection: returns NF_DROP if packet must be dropped. */ +static inline int ip_conntrack_confirm(struct sk_buff *skb) +{ + if (skb->nfct + && !is_confirmed((struct ip_conntrack *)skb->nfct->master)) + return __ip_conntrack_confirm(skb->nfct); + return NF_ACCEPT; +} -extern unsigned int ip_conntrack_htable_size; extern struct list_head *ip_conntrack_hash; extern struct list_head expect_list; DECLARE_RWLOCK_EXTERN(ip_conntrack_lock); Index: ip_conntrack_ftp.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_conntrack_ftp.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_conntrack_ftp.h 14 Jan 2001 16:48:41 -0000 1.1.1.1 +++ ip_conntrack_ftp.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -14,9 +14,13 @@ enum ip_ct_ftp_type { /* PORT command from client */ - IP_CT_FTP_PORT = IP_CT_DIR_ORIGINAL, + IP_CT_FTP_PORT, /* PASV response from server */ - IP_CT_FTP_PASV = IP_CT_DIR_REPLY + IP_CT_FTP_PASV, + /* EPRT command from client */ + IP_CT_FTP_EPRT, + /* EPSV response from server */ + IP_CT_FTP_EPSV, }; /* We record seq number and length of ftp ip/port text here: all in Index: ip_conntrack_protocol.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_conntrack_protocol.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_conntrack_protocol.h 14 Jan 2001 16:48:41 -0000 1.1.1.1 +++ ip_conntrack_protocol.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -38,9 +38,9 @@ enum ip_conntrack_info ctinfo); /* Called when a new connection for this protocol found; - * returns timeout. If so, packet() called next. */ - unsigned long (*new)(struct ip_conntrack *conntrack, - struct iphdr *iph, size_t len); + * returns TRUE if it's OK. If so, packet() called next. */ + int (*new)(struct ip_conntrack *conntrack, struct iphdr *iph, + size_t len); /* Module (if any) which this is connected to. */ struct module *me; Index: ip_conntrack_tuple.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_conntrack_tuple.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_conntrack_tuple.h 14 Jan 2001 16:48:42 -0000 1.1.1.1 +++ ip_conntrack_tuple.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -82,14 +82,14 @@ IP_CT_DIR_MAX }; -extern inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->src.ip == t2->src.ip && t1->src.u.all == t2->src.u.all; } -extern inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->dst.ip == t2->dst.ip @@ -97,13 +97,13 @@ && t1->dst.protonum == t2->dst.protonum; } -extern inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2); } -extern inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, +static inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, const struct ip_conntrack_tuple *tuple, const struct ip_conntrack_tuple *mask) { Index: ip_nat.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_nat.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_nat.h 14 Jan 2001 16:48:42 -0000 1.1.1.1 +++ ip_nat.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -24,6 +24,15 @@ /* Used internally by get_unique_tuple(). */ #define IP_NAT_RANGE_FULL 4 +/* NAT sequence number modifications */ +struct ip_nat_seq { + /* position of the last TCP sequence number + * modification (if any) */ + u_int32_t correction_pos; + /* sequence number offset before and after last modification */ + int32_t offset_before, offset_after; +}; + /* Single range specification. */ struct ip_nat_range { @@ -98,6 +107,8 @@ /* Helper (NULL if none). */ struct ip_nat_helper *helper; + + struct ip_nat_seq seq[IP_CT_DIR_MAX]; }; /* Set up the info structure to map into this range. */ Index: ip_nat_helper.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_nat_helper.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_nat_helper.h 14 Jan 2001 16:48:43 -0000 1.1.1.1 +++ ip_nat_helper.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -25,6 +25,19 @@ const char *name; }; +extern struct list_head helpers; + extern int ip_nat_helper_register(struct ip_nat_helper *me); extern void ip_nat_helper_unregister(struct ip_nat_helper *me); +extern int ip_nat_mangle_tcp_packet(struct sk_buff **skb, + struct ip_conntrack *ct, + enum ip_conntrack_info ctinfo, + unsigned int match_offset, + unsigned int match_len, + char *rep_buffer, + unsigned int rep_len); +extern int ip_nat_seq_adjust(struct sk_buff *skb, + struct ip_conntrack *ct, + enum ip_conntrack_info ctinfo); +extern void ip_nat_delete_sack(struct sk_buff *skb, struct tcphdr *tcph); #endif Index: ip_tables.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/ip_tables.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip_tables.h 14 Jan 2001 16:48:45 -0000 1.1.1.1 +++ ip_tables.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -289,7 +289,7 @@ #define IPT_ERROR_TARGET "ERROR" /* Helper functions */ -extern __inline__ struct ipt_entry_target * +static __inline__ struct ipt_entry_target * ipt_get_target(struct ipt_entry *e) { return (void *)e + e->target_offset; @@ -300,14 +300,14 @@ ({ \ unsigned int __i; \ int __ret = 0; \ - struct ipt_entry_match *__m; \ + struct ipt_entry_match *__match; \ \ for (__i = sizeof(struct ipt_entry); \ __i < (e)->target_offset; \ - __i += __m->u.match_size) { \ - __m = (void *)(e) + __i; \ + __i += __match->u.match_size) { \ + __match = (void *)(e) + __i; \ \ - __ret = fn(__m , ## args); \ + __ret = fn(__match , ## args); \ if (__ret != 0) \ break; \ } \ @@ -319,12 +319,12 @@ ({ \ unsigned int __i; \ int __ret = 0; \ - struct ipt_entry *__e; \ + struct ipt_entry *__entry; \ \ - for (__i = 0; __i < (size); __i += __e->next_offset) { \ - __e = (void *)(entries) + __i; \ + for (__i = 0; __i < (size); __i += __entry->next_offset) { \ + __entry = (void *)(entries) + __i; \ \ - __ret = fn(__e , ## args); \ + __ret = fn(__entry , ## args); \ if (__ret != 0) \ break; \ } \ Index: listhelp.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/netfilter_ipv4/listhelp.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- listhelp.h 14 Jan 2001 16:48:48 -0000 1.1.1.1 +++ listhelp.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -39,11 +39,11 @@ (type)__i; \ }) -extern inline int +static inline int __list_cmp_same(const void *p1, const void *p2) { return p1 == p2; } /* Is this entry in the list? */ -extern inline int +static inline int list_inlist(struct list_head *head, const void *entry) { return LIST_FIND(head, __list_cmp_same, void *, entry) != NULL; @@ -64,7 +64,7 @@ #endif /* Append. */ -extern inline void +static inline void list_append(struct list_head *head, void *new) { ASSERT_WRITE_LOCK(head); @@ -72,7 +72,7 @@ } /* Prepend. */ -extern inline void +static inline void list_prepend(struct list_head *head, void *new) { ASSERT_WRITE_LOCK(head); @@ -92,13 +92,13 @@ /* If the field after the list_head is a nul-terminated string, you can use these functions. */ -extern inline int __list_cmp_name(const void *i, const char *name) +static inline int __list_cmp_name(const void *i, const char *name) { return strcmp(name, i+sizeof(struct list_head)) == 0; } /* Returns false if same name already in list, otherwise does insert. */ -extern inline int +static inline int list_named_insert(struct list_head *head, void *new) { if (LIST_FIND(head, __list_cmp_name, void *, --- ip_nat_ftp.h DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 12:44:29
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/raid In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/raid Modified Files: md.h md_compatible.h md_k.h md_u.h raid1.h raid5.h Added Files: multipath.h Log Message: sync 2.4.15 commit 3 --- NEW FILE --- #ifndef _MULTIPATH_H #define _MULTIPATH_H #include <linux/raid/md.h> struct multipath_info { int number; int raid_disk; kdev_t dev; /* * State bits: */ int operational; int spare; int used_slot; }; struct multipath_private_data { mddev_t *mddev; struct multipath_info multipaths[MD_SB_DISKS]; int nr_disks; int raid_disks; int working_disks; mdk_thread_t *thread; struct multipath_info *spare; md_spinlock_t device_lock; /* buffer pool */ /* buffer_heads that we have pre-allocated have b_pprev -> &freebh * and are linked into a stack using b_next * multipath_bh that are pre-allocated have MPBH_PreAlloc set. * All these variable are protected by device_lock */ struct multipath_bh *freer1; int freer1_blocked; int freer1_cnt; md_wait_queue_head_t wait_buffer; }; typedef struct multipath_private_data multipath_conf_t; /* * this is the only point in the RAID code where we violate * C type safety. mddev->private is an 'opaque' pointer. */ #define mddev_to_conf(mddev) ((multipath_conf_t *) mddev->private) /* * this is our 'private' 'collective' MULTIPATH buffer head. * it contains information about what kind of IO operations were started * for this MULTIPATH operation, and about their status: */ struct multipath_bh { atomic_t remaining; /* 'have we finished' count, * used from IRQ handlers */ int cmd; unsigned long state; mddev_t *mddev; struct buffer_head *master_bh; struct buffer_head bh_req; struct multipath_bh *next_mp; /* next for retry or in free list */ }; /* bits for multipath_bh.state */ #define MPBH_Uptodate 1 #define MPBH_SyncPhase 2 #define MPBH_PreAlloc 3 /* this was pre-allocated, add to free list */ #endif Index: md.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/md.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- md.h 14 Jan 2001 16:48:35 -0000 1.1.1.1 +++ md.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -36,6 +36,7 @@ #include <linux/locks.h> #include <linux/kernel_stat.h> #include <asm/io.h> +#include <linux/completion.h> #include <linux/raid/md_compatible.h> /* @@ -77,10 +78,9 @@ extern void md_sync_acct(kdev_t dev, unsigned long nr_sectors); extern void md_recover_arrays (void); extern int md_check_ordering (mddev_t *mddev); -extern struct gendisk * find_gendisk (kdev_t dev); extern int md_notify_reboot(struct notifier_block *this, unsigned long code, void *x); -extern int md_error (kdev_t mddev, kdev_t rdev); +extern int md_error (mddev_t *mddev, kdev_t rdev); extern int md_run_setup(void); extern void md_print_devices (void); Index: md_compatible.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/md_compatible.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- md_compatible.h 14 Jan 2001 16:48:38 -0000 1.1.1.1 +++ md_compatible.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -27,12 +27,14 @@ /* 000 */ #define md__get_free_pages(x,y) __get_free_pages(x,y) -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__) /* 001 */ -extern __inline__ int md_cpu_has_mmx(void) +static __inline__ int md_cpu_has_mmx(void) { return test_bit(X86_FEATURE_MMX, &boot_cpu_data.x86_capability); } +#else +#define md_cpu_has_mmx(x) (0) #endif /* 002 */ @@ -51,7 +53,7 @@ #define md_put_user put_user /* 007 */ -extern inline int md_capable_admin(void) +static inline int md_capable_admin(void) { return capable(CAP_SYS_ADMIN); } @@ -60,7 +62,7 @@ #define MD_FILE_TO_INODE(file) ((file)->f_dentry->d_inode) /* 009 */ -extern inline void md_flush_signals (void) +static inline void md_flush_signals (void) { spin_lock(¤t->sigmask_lock); flush_signals(current); @@ -68,7 +70,7 @@ } /* 010 */ -extern inline void md_init_signals (void) +static inline void md_init_signals (void) { current->exit_signal = SIGCHLD; siginitsetinv(¤t->blocked, sigmask(SIGKILL)); Index: md_k.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/md_k.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- md_k.h 14 Jan 2001 16:48:36 -0000 1.1.1.1 +++ md_k.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -17,17 +17,18 @@ #define MD_RESERVED 0UL #define LINEAR 1UL -#define STRIPED 2UL -#define RAID0 STRIPED +#define RAID0 2UL #define RAID1 3UL #define RAID5 4UL #define TRANSLUCENT 5UL #define HSM 6UL -#define MAX_PERSONALITY 7UL +#define MULTIPATH 7UL +#define MAX_PERSONALITY 8UL -extern inline int pers_to_level (int pers) +static inline int pers_to_level (int pers) { switch (pers) { + case MULTIPATH: return -4; case HSM: return -3; case TRANSLUCENT: return -2; case LINEAR: return -1; @@ -35,12 +36,14 @@ case RAID1: return 1; case RAID5: return 5; } - panic("pers_to_level()"); + BUG(); + return MD_RESERVED; } -extern inline int level_to_pers (int level) +static inline int level_to_pers (int level) { switch (level) { + case -4: return MULTIPATH; case -3: return HSM; case -2: return TRANSLUCENT; case -1: return LINEAR; @@ -72,7 +75,7 @@ extern dev_mapping_t mddev_map [MAX_MD_DEVS]; -extern inline mddev_t * kdev_to_mddev (kdev_t dev) +static inline mddev_t * kdev_to_mddev (kdev_t dev) { if (MAJOR(dev) != MD_MAJOR) BUG(); @@ -90,62 +93,62 @@ */ #define MD_READAHEAD MAX_READAHEAD -extern inline int disk_faulty(mdp_disk_t * d) +static inline int disk_faulty(mdp_disk_t * d) { return d->state & (1 << MD_DISK_FAULTY); } -extern inline int disk_active(mdp_disk_t * d) +static inline int disk_active(mdp_disk_t * d) { return d->state & (1 << MD_DISK_ACTIVE); } -extern inline int disk_sync(mdp_disk_t * d) +static inline int disk_sync(mdp_disk_t * d) { return d->state & (1 << MD_DISK_SYNC); } -extern inline int disk_spare(mdp_disk_t * d) +static inline int disk_spare(mdp_disk_t * d) { return !disk_sync(d) && !disk_active(d) && !disk_faulty(d); } -extern inline int disk_removed(mdp_disk_t * d) +static inline int disk_removed(mdp_disk_t * d) { return d->state & (1 << MD_DISK_REMOVED); } -extern inline void mark_disk_faulty(mdp_disk_t * d) +static inline void mark_disk_faulty(mdp_disk_t * d) { d->state |= (1 << MD_DISK_FAULTY); } -extern inline void mark_disk_active(mdp_disk_t * d) +static inline void mark_disk_active(mdp_disk_t * d) { d->state |= (1 << MD_DISK_ACTIVE); } -extern inline void mark_disk_sync(mdp_disk_t * d) +static inline void mark_disk_sync(mdp_disk_t * d) { d->state |= (1 << MD_DISK_SYNC); } -extern inline void mark_disk_spare(mdp_disk_t * d) +static inline void mark_disk_spare(mdp_disk_t * d) { d->state = 0; } -extern inline void mark_disk_removed(mdp_disk_t * d) +static inline void mark_disk_removed(mdp_disk_t * d) { d->state = (1 << MD_DISK_FAULTY) | (1 << MD_DISK_REMOVED); } -extern inline void mark_disk_inactive(mdp_disk_t * d) +static inline void mark_disk_inactive(mdp_disk_t * d) { d->state &= ~(1 << MD_DISK_ACTIVE); } -extern inline void mark_disk_nonsync(mdp_disk_t * d) +static inline void mark_disk_nonsync(mdp_disk_t * d) { d->state &= ~(1 << MD_DISK_SYNC); } @@ -170,6 +173,7 @@ mdp_super_t *sb; unsigned long sb_offset; + int alias_device; /* device alias to the same disk */ int faulty; /* if faulty do not issue IO requests */ int desc_nr; /* descriptor index in the superblock */ }; @@ -245,18 +249,19 @@ * number. This will have to change to dynamic allocation * once we start supporting partitioning of md devices. */ -extern inline int mdidx (mddev_t * mddev) +static inline int mdidx (mddev_t * mddev) { return mddev->__minor; } -extern inline kdev_t mddev_to_kdev(mddev_t * mddev) +static inline kdev_t mddev_to_kdev(mddev_t * mddev) { return MKDEV(MD_MAJOR, mdidx(mddev)); } extern mdk_rdev_t * find_rdev(mddev_t * mddev, kdev_t dev); extern mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr); +extern mdp_disk_t *get_spare(mddev_t *mddev); /* * iterates through some rdev ringlist. It's safe to remove the @@ -304,12 +309,12 @@ tmp = tmp->next, tmp->prev != &all_mddevs \ ; ) -extern inline int lock_mddev (mddev_t * mddev) +static inline int lock_mddev (mddev_t * mddev) { return down_interruptible(&mddev->reconfig_sem); } -extern inline void unlock_mddev (mddev_t * mddev) +static inline void unlock_mddev (mddev_t * mddev) { up(&mddev->reconfig_sem); } @@ -322,7 +327,7 @@ void *data; md_wait_queue_head_t wqueue; unsigned long flags; - struct semaphore *sem; + struct completion *event; struct task_struct *tsk; const char *name; } mdk_thread_t; @@ -363,6 +368,31 @@ if (condition) \ break; \ __wait_event_lock_irq(wq, condition, lock); \ +} while (0) + + +#define __wait_disk_event(wq, condition) \ +do { \ + wait_queue_t __wait; \ + init_waitqueue_entry(&__wait, current); \ + \ + add_wait_queue(&wq, &__wait); \ + for (;;) { \ + set_current_state(TASK_UNINTERRUPTIBLE); \ + if (condition) \ + break; \ + run_task_queue(&tq_disk); \ + schedule(); \ + } \ + current->state = TASK_RUNNING; \ + remove_wait_queue(&wq, &__wait); \ +} while (0) + +#define wait_disk_event(wq, condition) \ +do { \ + if (condition) \ + break; \ + __wait_disk_event(wq, condition); \ } while (0) #endif Index: md_u.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/md_u.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- md_u.h 25 Feb 2001 23:14:50 -0000 1.1.1.2 +++ md_u.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -35,6 +35,7 @@ #define PROTECT_ARRAY _IO (MD_MAJOR, 0x27) #define HOT_ADD_DISK _IO (MD_MAJOR, 0x28) #define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29) +#define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a) /* usage */ #define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t) Index: raid1.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/raid1.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- raid1.h 14 Jan 2001 16:48:39 -0000 1.1.1.1 +++ raid1.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -42,7 +42,10 @@ */ struct buffer_head *freebh; int freebh_cnt; /* how many are on the list */ + int freebh_blocked; struct raid1_bh *freer1; + int freer1_blocked; + int freer1_cnt; struct raid1_bh *freebuf; /* each bh_req has a page allocated */ md_wait_queue_head_t wait_buffer; Index: raid5.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/raid/raid5.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- raid5.h 25 Feb 2001 23:14:50 -0000 1.1.1.2 +++ raid5.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -132,6 +132,7 @@ struct buffer_head *bh_read[MD_SB_DISKS]; /* read request buffers of the MD device */ struct buffer_head *bh_write[MD_SB_DISKS]; /* write request buffers of the MD device */ struct buffer_head *bh_written[MD_SB_DISKS]; /* write request buffers of the MD device that have been scheduled for write */ + struct page *bh_page[MD_SB_DISKS]; /* saved bh_cache[n]->b_page when reading around the cache */ unsigned long sector; /* sector of this row */ int size; /* buffers size */ int pd_idx; /* parity disk index */ @@ -157,6 +158,32 @@ #define STRIPE_HANDLE 2 #define STRIPE_SYNCING 3 #define STRIPE_INSYNC 4 +#define STRIPE_PREREAD_ACTIVE 5 +#define STRIPE_DELAYED 6 + +/* + * Plugging: + * + * To improve write throughput, we need to delay the handling of some + * stripes until there has been a chance that several write requests + * for the one stripe have all been collected. + * In particular, any write request that would require pre-reading + * is put on a "delayed" queue until there are no stripes currently + * in a pre-read phase. Further, if the "delayed" queue is empty when + * a stripe is put on it then we "plug" the queue and do not process it + * until an unplg call is made. (the tq_disk list is run). + * + * When preread is initiated on a stripe, we set PREREAD_ACTIVE and add + * it to the count of prereading stripes. + * When write is initiated, or the stripe refcnt == 0 (just in case) we + * clear the PREREAD_ACTIVE flag and decrement the count + * Whenever the delayed queue is empty and the device is not plugged, we + * move any strips from delayed to handle and clear the DELAYED flag and set PREREAD_ACTIVE. + * In stripe_handle, if we find pre-reading is necessary, we do it if + * PREREAD_ACTIVE is set, else we set DELAYED which will send it to the delayed queue. + * HANDLE gets cleared if stripe_handle leave nothing locked. + */ + struct disk_info { kdev_t dev; @@ -181,14 +208,21 @@ int max_nr_stripes; struct list_head handle_list; /* stripes needing handling */ + struct list_head delayed_list; /* stripes that have plugged requests */ + atomic_t preread_active_stripes; /* stripes with scheduled io */ /* * Free stripes pool */ atomic_t active_stripes; struct list_head inactive_list; md_wait_queue_head_t wait_for_stripe; - + int inactive_blocked; /* release of inactive stripes blocked, + * waiting for 25% to be free + */ md_spinlock_t device_lock; + + int plugged; + struct tq_struct plug_tq; }; typedef struct raid5_private_data raid5_conf_t; |
From: Andy P. <at...@us...> - 2002-04-09 12:44:29
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/isdn In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/isdn Added Files: tpam.h Log Message: sync 2.4.15 commit 3 --- NEW FILE --- /* $Id: tpam.h,v 1.1 2002/04/09 12:44:17 atp Exp $ * * Turbo PAM ISDN driver for Linux. (Kernel Driver) * * Copyright 2001 Stelian Pop <ste...@fr...>, Alcôve * * For all support questions please contact: <su...@au...> * * 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; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef _TPAM_H_ #define _TPAM_H_ #include <linux/types.h> #include <linux/pci.h> /* IOCTL commands */ #define TPAM_CMD_DSPLOAD 0x0001 #define TPAM_CMD_DSPSAVE 0x0002 #define TPAM_CMD_DSPRUN 0x0003 #define TPAM_CMD_LOOPMODEON 0x0004 #define TPAM_CMD_LOOPMODEOFF 0x0005 /* addresses of debug information zones on board */ #define TPAM_TRAPAUDIT_REGISTER 0x005493e4 #define TPAM_NCOAUDIT_REGISTER 0x00500000 #define TPAM_MSGAUDIT_REGISTER 0x008E30F0 /* length of debug information zones on board */ #define TPAM_TRAPAUDIT_LENGTH 10000 #define TPAM_NCOAUDIT_LENGTH 300000 #define TPAM_NCOAUDIT_COUNT 30 #define TPAM_MSGAUDIT_LENGTH 60000 /* IOCTL load/save parameter */ typedef struct tpam_dsp_ioctl { __u32 address; /* address to load/save data */ __u32 data_len; /* size of data to be loaded/saved */ __u8 data[0]; /* data */ } tpam_dsp_ioctl; #endif /* _TPAM_H_ */ |
From: Andy P. <at...@us...> - 2002-04-09 12:44:27
|
Update of /cvsroot/linux-vax/kernel-2.4/include/linux/byteorder In directory usw-pr-cvs1:/tmp/cvs-serv17906/linux/byteorder Modified Files: swab.h swabb.h Log Message: sync 2.4.15 commit 3 Index: swab.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/byteorder/swab.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- swab.h 14 Jan 2001 16:48:34 -0000 1.1.1.1 +++ swab.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -128,34 +128,34 @@ #endif /* OPTIMIZE */ -extern __inline__ __const__ __u16 __fswab16(__u16 x) +static __inline__ __const__ __u16 __fswab16(__u16 x) { return __arch__swab16(x); } -extern __inline__ __u16 __swab16p(__u16 *x) +static __inline__ __u16 __swab16p(__u16 *x) { return __arch__swab16p(x); } -extern __inline__ void __swab16s(__u16 *addr) +static __inline__ void __swab16s(__u16 *addr) { __arch__swab16s(addr); } -extern __inline__ __const__ __u32 __fswab32(__u32 x) +static __inline__ __const__ __u32 __fswab32(__u32 x) { return __arch__swab32(x); } -extern __inline__ __u32 __swab32p(__u32 *x) +static __inline__ __u32 __swab32p(__u32 *x) { return __arch__swab32p(x); } -extern __inline__ void __swab32s(__u32 *addr) +static __inline__ void __swab32s(__u32 *addr) { __arch__swab32s(addr); } #ifdef __BYTEORDER_HAS_U64__ -extern __inline__ __const__ __u64 __fswab64(__u64 x) +static __inline__ __const__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; @@ -165,11 +165,11 @@ return __arch__swab64(x); # endif } -extern __inline__ __u64 __swab64p(__u64 *x) +static __inline__ __u64 __swab64p(__u64 *x) { return __arch__swab64p(x); } -extern __inline__ void __swab64s(__u64 *addr) +static __inline__ void __swab64s(__u64 *addr) { __arch__swab64s(addr); } Index: swabb.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/linux/byteorder/swabb.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- swabb.h 14 Jan 2001 16:48:34 -0000 1.1.1.1 +++ swabb.h 9 Apr 2002 12:44:17 -0000 1.2 @@ -92,29 +92,29 @@ #endif /* OPTIMIZE */ -extern __inline__ __const__ __u32 __fswahw32(__u32 x) +static __inline__ __const__ __u32 __fswahw32(__u32 x) { return __arch__swahw32(x); } -extern __inline__ __u32 __swahw32p(__u32 *x) +static __inline__ __u32 __swahw32p(__u32 *x) { return __arch__swahw32p(x); } -extern __inline__ void __swahw32s(__u32 *addr) +static __inline__ void __swahw32s(__u32 *addr) { __arch__swahw32s(addr); } -extern __inline__ __const__ __u32 __fswahb32(__u32 x) +static __inline__ __const__ __u32 __fswahb32(__u32 x) { return __arch__swahb32(x); } -extern __inline__ __u32 __swahb32p(__u32 *x) +static __inline__ __u32 __swahb32p(__u32 *x) { return __arch__swahb32p(x); } -extern __inline__ void __swahb32s(__u32 *addr) +static __inline__ void __swahb32s(__u32 *addr) { __arch__swahb32s(addr); } |
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0 In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/sn/sn0 Modified Files: addrs.h arch.h hub.h hubio.h hubmd.h hubni.h hubpi.h ip27.h sn0_fru.h Log Message: Synch to 2.4.15 commit 1 Index: addrs.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/addrs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- addrs.h 14 Jan 2001 17:05:23 -0000 1.1.1.1 +++ addrs.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: arch.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/arch.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- arch.h 14 Jan 2001 17:05:23 -0000 1.1.1.1 +++ arch.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: hub.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/hub.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hub.h 14 Jan 2001 17:05:23 -0000 1.1.1.1 +++ hub.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: hubio.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/hubio.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubio.h 14 Jan 2001 17:05:28 -0000 1.1.1.1 +++ hubio.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: hubmd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/hubmd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubmd.h 14 Jan 2001 17:05:31 -0000 1.1.1.1 +++ hubmd.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: hubni.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/hubni.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubni.h 14 Jan 2001 17:05:32 -0000 1.1.1.1 +++ hubni.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: hubpi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/hubpi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubpi.h 14 Jan 2001 17:05:35 -0000 1.1.1.1 +++ hubpi.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: ip27.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/ip27.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip27.h 14 Jan 2001 17:05:35 -0000 1.1.1.1 +++ ip27.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: sn0_fru.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/sn0/sn0_fru.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sn0_fru.h 14 Jan 2001 17:05:35 -0000 1.1.1.1 +++ sn0_fru.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. |
From: Andy P. <at...@us...> - 2002-04-09 12:34:23
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/xtalk In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/xtalk Modified Files: xtalk.h xwidget.h Log Message: Synch to 2.4.15 commit 1 Index: xtalk.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/xtalk/xtalk.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xtalk.h 14 Jan 2001 17:05:36 -0000 1.1.1.1 +++ xtalk.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: xwidget.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/xtalk/xwidget.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xwidget.h 14 Jan 2001 17:05:36 -0000 1.1.1.1 +++ xwidget.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. |
From: Andy P. <at...@us...> - 2002-04-09 12:34:23
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/pci In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/pci Modified Files: bridge.h Log Message: Synch to 2.4.15 commit 1 Index: bridge.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/pci/bridge.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- bridge.h 14 Jan 2001 17:05:01 -0000 1.1.1.1 +++ bridge.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -276,7 +275,7 @@ ds:2, /* Data size */ gbr:1, /* GBR enable */ vbpm:1, /* VBPM message */ - error:1, /* Error occured */ + error:1, /* Error occurred */ barr:1, /* Barrier op */ rsvd:8; } berr_st; @@ -828,11 +827,11 @@ #define BRIDGE_INTERNAL_ATES 128 -/* ======================================================================== - * Linux pci bus mappings to sn physical id's +/* + * Linux pci bus mappings to sn physical id's */ -unsigned char bus_to_wid[256]; /* widget id for linux pci bus */ -unsigned char bus_to_nid[256]; /* nasid for linux pci bus */ -unsigned char num_bridges; /* number of bridges in the system */ +extern unsigned char bus_to_wid[]; /* widget id for linux pci bus */ +extern unsigned char bus_to_nid[]; /* nasid for linux pci bus */ +extern unsigned char num_bridges; /* number of bridges in the system */ #endif /* _ASM_PCI_BRIDGE_H */ |
From: Andy P. <at...@us...> - 2002-04-09 12:34:23
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/sn Modified Files: arch.h gda.h klconfig.h launch.h nmi.h types.h Log Message: Synch to 2.4.15 commit 1 Index: arch.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/arch.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- arch.h 14 Jan 2001 17:05:09 -0000 1.1.1.1 +++ arch.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: gda.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/gda.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- gda.h 14 Jan 2001 17:05:09 -0000 1.1.1.1 +++ gda.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: klconfig.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/klconfig.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- klconfig.h 14 Jan 2001 17:05:14 -0000 1.1.1.1 +++ klconfig.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -936,6 +936,7 @@ extern klinfo_t *find_component(lboard_t *brd, klinfo_t *kli, unsigned char type); extern klinfo_t *find_first_component(lboard_t *brd, unsigned char type); extern klcpu_t *nasid_slice_to_cpuinfo(nasid_t, int); +extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); #if defined(CONFIG_SGI_IO) @@ -943,7 +944,6 @@ extern vertex_hdl_t nodevertex_xbow_peer_get(vertex_hdl_t node_vtx); extern lboard_t *find_gfxpipe(int pipenum); extern void setup_gfxpipe_link(vertex_hdl_t vhdl,int pipenum); -extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); extern lboard_t *find_lboard_module_class(lboard_t *start, moduleid_t mod, unsigned char brd_class); extern lboard_t *find_nic_lboard(lboard_t *, nic_t); Index: launch.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/launch.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- launch.h 14 Jan 2001 17:05:17 -0000 1.1.1.1 +++ launch.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: nmi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/nmi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: types.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sn/types.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- types.h 14 Jan 2001 17:05:16 -0000 1.1.1.1 +++ types.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -13,7 +12,6 @@ #include <linux/types.h> typedef unsigned long cpuid_t; -typedef unsigned long cpumask_t; typedef unsigned long cnodemask_t; typedef signed short nasid_t; /* node id in numa-as-id space */ typedef signed short cnodeid_t; /* node id in compact-id space */ |
From: Andy P. <at...@us...> - 2002-04-09 12:34:22
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/arc In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/arc Modified Files: hinv.h Log Message: Synch to 2.4.15 commit 1 Index: hinv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/arc/hinv.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hinv.h 14 Jan 2001 17:04:57 -0000 1.1.1.1 +++ hinv.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * ARCS hardware/memory inventory/configuration and system ID definitions. */ #ifndef _ASM_ARC_HINV_H |
From: Andy P. <at...@us...> - 2002-04-09 12:34:20
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-parisc In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-parisc Modified Files: ioctl.h linux_logo.h md.h namei.h pci.h pgalloc.h pgtable.h processor.h scatterlist.h semaphore.h socket.h termios.h Log Message: Synch to 2.4.15 commit 1 Index: ioctl.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/ioctl.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: linux_logo.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/linux_logo.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- linux_logo.h 14 Jan 2001 17:06:25 -0000 1.1.1.1 +++ linux_logo.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -23,26 +23,5 @@ #define linux_logo_banner "Linux/PA-RISC version " UTS_RELEASE -#define LINUX_LOGO_COLORS 214 - -#ifdef INCLUDE_LINUX_LOGO_DATA - -#define INCLUDE_LINUX_LOGOBW -#define INCLUDE_LINUX_LOGO16 - #include <linux/linux_logo.h> -#else - -/* prototypes only */ -extern unsigned char linux_logo_red[]; -extern unsigned char linux_logo_green[]; -extern unsigned char linux_logo_blue[]; -extern unsigned char linux_logo[]; -extern unsigned char linux_logo_bw[]; -extern unsigned char linux_logo16_red[]; -extern unsigned char linux_logo16_green[]; -extern unsigned char linux_logo16_blue[]; -extern unsigned char linux_logo16[]; - -#endif Index: md.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/md.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: namei.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/namei.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: pci.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/pci.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pci.h 14 Jan 2001 17:06:28 -0000 1.1.1.1 +++ pci.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -113,7 +113,7 @@ ** See Documentation/DMA-mapping.txt */ struct pci_dma_ops { - int (*dma_supported)(struct pci_dev *dev, dma_addr_t mask); + int (*dma_supported)(struct pci_dev *dev, u64 mask); void *(*alloc_consistent)(struct pci_dev *dev, size_t size, dma_addr_t *iova); void (*free_consistent)(struct pci_dev *dev, size_t size, void *vaddr, dma_addr_t iova); dma_addr_t (*map_single)(struct pci_dev *dev, void *addr, size_t size, int direction); @@ -211,5 +211,8 @@ #define PCIBIOS_MIN_IO 0x10 #define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */ + +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) #endif /* __ASM_PARISC_PCI_H */ Index: pgalloc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/pgalloc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pgalloc.h 14 Jan 2001 17:06:34 -0000 1.1.1.1 +++ pgalloc.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -372,7 +372,7 @@ #define pte_free(pte) free_pte_fast(pte) #define pmd_free(pmd) free_pmd_fast(pmd) #define pgd_free(pgd) free_pgd_fast(pgd) -#define pgd_alloc() get_pgd_fast() +#define pgd_alloc(mm) get_pgd_fast() extern void __bad_pmd(pmd_t *pmd); Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/pgtable.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pgtable.h 14 Jan 2001 17:06:36 -0000 1.1.1.1 +++ pgtable.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -334,4 +334,9 @@ #define io_remap_page_range remap_page_range +/* + * No page table caches to initialise + */ +#define pgtable_cache_init() do { } while (0) + #endif /* _PARISC_PAGE_H */ Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/processor.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- processor.h 14 Jan 2001 17:06:38 -0000 1.1.1.1 +++ processor.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -107,9 +107,6 @@ /* Thread struct flags. */ #define PARISC_KERNEL_DEATH (1UL << 31) /* see die_if_kernel()... */ -#define INIT_MMAP { &init_mm, 0, 0, NULL, PAGE_SHARED, \ - VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } - #define INIT_THREAD { { \ { 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, \ @@ -335,6 +332,8 @@ #define init_task (init_task_union.task) #define init_stack (init_task_union.stack) + +#define cpu_relax() do { } while (0) #endif /* __ASM_PARISC_PROCESSOR_H */ Index: scatterlist.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/scatterlist.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- scatterlist.h 14 Jan 2001 17:06:38 -0000 1.1.1.1 +++ scatterlist.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -3,8 +3,6 @@ struct scatterlist { char * address; /* Location data is to be transferred to */ - char * alt_address; /* Location of actual if address is a - * dma indirect buffer. NULL otherwise */ unsigned int length; /* an IOVA can be 64-bits on some PA-Risc platforms. */ Index: semaphore.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/semaphore.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- semaphore.h 14 Jan 2001 17:06:40 -0000 1.1.1.1 +++ semaphore.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -17,6 +17,7 @@ */ #include <linux/spinlock.h> +#include <linux/rwsem.h> #include <asm/system.h> #include <asm/atomic.h> @@ -133,169 +134,6 @@ #endif if (atomic_inc_return(&sem->count) <= 0) __up(sem); -} - -/* rw mutexes (should that be mutices? =) -- throw rw - * spinlocks and semaphores together, and this is what we - * end up with... - * - * The lock is initialized to BIAS. This way, a writer - * subtracts BIAS ands gets 0 for the case of an uncontended - * lock. Readers decrement by 1 and see a positive value - * when uncontended, negative if there are writers waiting - * (in which case it goes to sleep). - * - * The value 0x01000000 supports up to 128 processors and - * lots of processes. BIAS must be chosen such that subl'ing - * BIAS once per CPU will result in the long remaining - * negative. - * - * In terms of fairness, this should result in the lock - * flopping back and forth between readers and writers - * under heavy use. - * - * -ben - */ -struct rw_semaphore { - atomic_t count; - volatile unsigned char write_bias_granted; - volatile unsigned char read_bias_granted; - volatile unsigned char pad1; - volatile unsigned char pad2; - wait_queue_head_t wait; - wait_queue_head_t write_bias_wait; -#if WAITQUEUE_DEBUG - long __magic; - atomic_t readers; - atomic_t writers; -#endif -}; - -#if WAITQUEUE_DEBUG -#define __RWSEM_DEBUG_INIT , ATOMIC_INIT(0), ATOMIC_INIT(0) -#else -#define __RWSEM_DEBUG_INIT /* */ -#endif - -#define RW_LOCK_BIAS 0x01000000 - -#define __RWSEM_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, 0, 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \ - __SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT } - -#define __DECLARE_RWSEM_GENERIC(name,count) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name,count) - -#define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS) -#define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS-1) -#define DECLARE_RWSEM_WRITE_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,0) - -extern inline void init_rwsem(struct rw_semaphore *sem) -{ - atomic_set(&sem->count, RW_LOCK_BIAS); - sem->read_bias_granted = 0; - sem->write_bias_granted = 0; - init_waitqueue_head(&sem->wait); - init_waitqueue_head(&sem->write_bias_wait); -#if WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; - atomic_set(&sem->readers, 0); - atomic_set(&sem->writers, 0); -#endif -} - -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME -extern struct rw_semaphore *__build_read_lock(struct rw_semaphore *sem, const char *what); -extern struct rw_semaphore *__build_write_lock(struct rw_semaphore *sem, const char *what); -#endif - -/* we use FASTCALL convention for the helpers */ -extern struct rw_semaphore *FASTCALL(__down_read_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(__down_write_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(__rwsem_wake(struct rw_semaphore *sem)); - -extern inline void down_read(struct rw_semaphore *sem) -{ -#if WAITQUEUE_DEBUG - if (sem->__magic != (long)&sem->__magic) - BUG(); -#endif -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME - __build_read_lock(sem, "__down_read_failed"); -#endif -#if WAITQUEUE_DEBUG - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->writers)) - BUG(); - atomic_inc(&sem->readers); -#endif -} - -extern inline void down_write(struct rw_semaphore *sem) -{ -#if WAITQUEUE_DEBUG - if (sem->__magic != (long)&sem->__magic) - BUG(); -#endif -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME - __build_write_lock(sem, "__down_write_failed"); -#endif -#if WAITQUEUE_DEBUG - if (atomic_read(&sem->writers)) - BUG(); - if (atomic_read(&sem->readers)) - BUG(); - if (sem->read_bias_granted) - BUG(); - if (sem->write_bias_granted) - BUG(); - atomic_inc(&sem->writers); -#endif -} - -/* When a reader does a release, the only significant - * case is when there was a writer waiting, and we've - * bumped the count to 0: we must wake the writer up. - */ -extern inline void __up_read(struct rw_semaphore *sem) -{ -} - -/* releasing the writer is easy -- just release it and - * wake up any sleepers. - */ -extern inline void __up_write(struct rw_semaphore *sem) -{ -} - -extern inline void up_read(struct rw_semaphore *sem) -{ -#if WAITQUEUE_DEBUG - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->writers)) - BUG(); - atomic_dec(&sem->readers); -#endif - __up_read(sem); -} - -extern inline void up_write(struct rw_semaphore *sem) -{ -#if WAITQUEUE_DEBUG - if (sem->read_bias_granted) - BUG(); - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->readers)) - BUG(); - if (atomic_read(&sem->writers) != 1) - BUG(); - atomic_dec(&sem->writers); -#endif - __up_write(sem); } #endif /* _ASM_PARISC_SEMAPHORE_H */ Index: socket.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/socket.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- socket.h 25 Feb 2001 23:14:55 -0000 1.1.1.2 +++ socket.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -56,6 +56,7 @@ /* level. For writing rarp and */ /* other similar things on the */ /* user level. */ +#define SOCK_MAX (SOCK_PACKET+1) #endif #endif /* _ASM_SOCKET_H */ Index: termios.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-parisc/termios.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- termios.h 25 Feb 2001 23:14:55 -0000 1.1.1.2 +++ termios.h 9 Apr 2002 12:33:17 -0000 1.2 @@ -53,6 +53,7 @@ #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Da...@mv...> */ #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ +#define N_HCI 15 /* Bluetooth HCI UART */ #ifdef __KERNEL__ |
From: Andy P. <at...@us...> - 2002-04-09 12:34:20
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips64/sgi Modified Files: io.h sgi.h sgihpc.h sgimc.h sgint23.h Log Message: Synch to 2.4.15 commit 1 Index: io.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi/io.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- io.h 14 Jan 2001 17:05:01 -0000 1.1.1.1 +++ io.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: sgi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi/sgi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgi.h 14 Jan 2001 17:05:01 -0000 1.1.1.1 +++ sgi.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: sgihpc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi/sgihpc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgihpc.h 14 Jan 2001 17:05:04 -0000 1.1.1.1 +++ sgihpc.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -333,8 +332,6 @@ /* We need software copies of these because they are write only. */ extern unsigned int sgi_hpc_write1, sgi_hpc_write2; - -#define SGI_KEYBOARD_IRQ 20 struct hpc_keyb { #ifdef __MIPSEB__ Index: sgimc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi/sgimc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgimc.h 14 Jan 2001 17:05:05 -0000 1.1.1.1 +++ sgimc.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. Index: sgint23.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips64/sgi/sgint23.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgint23.h 14 Jan 2001 17:05:06 -0000 1.1.1.1 +++ sgint23.h 9 Apr 2002 12:33:16 -0000 1.2 @@ -170,7 +170,7 @@ #endif #define INT2_TCLEAR_T0CLR 0x1 /* Clear timer0 IRQ */ #define INT2_TCLEAR_T1CLR 0x2 /* Clear timer1 IRQ */ -/* I am guesing there are only two unused registers here +/* I am guessing there are only two unused registers here * but I could be wrong... - andrewb */ /* u32 _unused[3]; */ @@ -199,7 +199,6 @@ extern struct sgi_ioc_timers *ioc_timers; extern volatile unsigned char *ioc_tclear; -extern void sgint_init(void); extern void indy_timer_init(void); #endif /* _ASM_SGI_SGINT23_H */ |
From: Andy P. <at...@us...> - 2002-04-09 12:34:16
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips/baget In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips/baget Modified Files: baget.h vac.h vic.h Log Message: Synch to 2.4.15 commit 1 Index: baget.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/baget/baget.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: vac.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/baget/vac.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: vic.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/baget/vic.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips/dec Modified Files: interrupts.h ioasic_addrs.h kn02.h kn02xa.h kn03.h tcmodule.h Added Files: ioasic.h Log Message: Synch to 2.4.15 commit 1 --- NEW FILE --- /* * linux/asm-mips/dec/ioasic.h * * Copyright (C) 2000 Maciej W. Rozycki * * DEC I/O ASIC access operations. */ #ifndef __ASM_DEC_IOASIC_H #define __ASM_DEC_IOASIC_H extern volatile unsigned int *ioasic_base; extern inline void ioasic_write(unsigned int reg, unsigned int v) { ioasic_base[reg / 4] = v; } extern inline unsigned int ioasic_read(unsigned int reg) { return ioasic_base[reg / 4]; } #endif /* __ASM_DEC_IOASIC_H */ Index: interrupts.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/interrupts.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- interrupts.h 14 Jan 2001 16:50:53 -0000 1.1.1.1 +++ interrupts.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -36,7 +36,7 @@ #define NR_INTS 11 -#ifndef _LANGUAGE_ASSEMBLY +#ifndef __ASSEMBLY__ /* * Data structure to hide the differences between the DECstation Interrupts * @@ -50,6 +50,12 @@ unsigned int iemask; /* enabling interrupts in IRQ Controller */ } decint_t; +extern volatile unsigned int *isr; + /* address of the interrupt status register */ +extern volatile unsigned int *imr; + /* address of the interrupt mask register */ +extern decint_t dec_interrupt[NR_INTS]; + /* * Interrupt table structure to hide differences between different * systems such. @@ -68,10 +74,8 @@ extern void dec_intr_rtc(void); extern void kn02_io_int(void); -extern void kn02ba_io_int(void); +extern void kn02xa_io_int(void); extern void kn03_io_int(void); - -extern void intr_halt(void); extern void asic_intr_unimplemented(void); Index: ioasic_addrs.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/ioasic_addrs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ioasic_addrs.h 14 Jan 2001 16:50:54 -0000 1.1.1.1 +++ ioasic_addrs.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -17,25 +17,25 @@ #define CHUNK_SIZE 0x00040000 -#define SYSTEM_ROM 00*CHUNK_SIZE /* ??? */ -#define IOCTL 01*CHUNK_SIZE -#define ESAR 02*CHUNK_SIZE -#define LANCE 03*CHUNK_SIZE -#define SCC0 04*CHUNK_SIZE -#define VDAC_HI 05*CHUNK_SIZE /* maxine only */ -#define SCC1 06*CHUNK_SIZE -#define VDAC_LO 07*CHUNK_SIZE /* maxine only */ -#define TOY 08*CHUNK_SIZE -#define ISDN 09*CHUNK_SIZE /* maxine only */ -#define ERRADDR 09*CHUNK_SIZE /* 3maxplus only */ -#define CHKSYN 10*CHUNK_SIZE /* 3maxplus only */ -#define ACCESS_BUS 10*CHUNK_SIZE /* maxine only */ -#define MCR 11*CHUNK_SIZE /* 3maxplus only */ -#define FLOPPY 11*CHUNK_SIZE /* maxine only */ -#define SCSI 12*CHUNK_SIZE -#define FLOPPY_DMA 13*CHUNK_SIZE /* maxine only */ -#define SCSI_DMA 14*CHUNK_SIZE -#define RESERVED_4 15*CHUNK_SIZE +#define SYSTEM_ROM (0*CHUNK_SIZE) /* ??? */ +#define IOCTL (1*CHUNK_SIZE) +#define ESAR (2*CHUNK_SIZE) +#define LANCE (3*CHUNK_SIZE) +#define SCC0 (4*CHUNK_SIZE) +#define VDAC_HI (5*CHUNK_SIZE) /* maxine only */ +#define SCC1 (6*CHUNK_SIZE) +#define VDAC_LO (7*CHUNK_SIZE) /* maxine only */ +#define TOY (8*CHUNK_SIZE) +#define ISDN (9*CHUNK_SIZE) /* maxine only */ +#define ERRADDR (9*CHUNK_SIZE) /* 3maxplus only */ +#define CHKSYN (10*CHUNK_SIZE) /* 3maxplus only */ +#define ACCESS_BUS (10*CHUNK_SIZE) /* maxine only */ +#define MCR (11*CHUNK_SIZE) /* 3maxplus only */ +#define FLOPPY (11*CHUNK_SIZE) /* maxine only */ +#define SCSI (12*CHUNK_SIZE) +#define FLOPPY_DMA (13*CHUNK_SIZE) /* maxine only */ +#define SCSI_DMA (14*CHUNK_SIZE) +#define RESERVED_4 (15*CHUNK_SIZE) /* * Offsets for IOCTL registers (relative to (system_base + IOCTL)) @@ -56,6 +56,7 @@ #define SSR 0x100 /* System Support Register */ #define SIR 0x110 /* System Interrupt Register */ #define SIMR 0x120 /* System Interrupt Mask Register */ +#define FCTR 0x1e0 /* Free-Running Counter */ /* * Handle partial word SCSI DMA transfers Index: kn02.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/kn02.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- kn02.h 14 Jan 2001 16:50:55 -0000 1.1.1.1 +++ kn02.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -28,6 +28,8 @@ #define KN02_RTC_BASE KSEG1ADDR(0x1fe80000) #define KN02_DZ11_BASE KSEG1ADDR(0x1fe00000) +#define KN02_CSR_BNK32M (1<<10) /* 32M stride */ + /* * Interrupt enable Bits */ Index: kn02xa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/kn02xa.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- kn02xa.h 14 Jan 2001 16:50:55 -0000 1.1.1.1 +++ kn02xa.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -9,6 +9,7 @@ * * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions * are by curteousy of Chris Fraser. + * Copyright (C) 2000 Maciej W. Rozycki * * These are addresses which have to be known early in the boot process. * For other addresses refer to tc.h ioasic_addrs.h and friends. @@ -19,16 +20,12 @@ #include <asm/addrspace.h> /* - * Motherboard regs (kseg1 addresses) - */ -#define KN02XA_SSR_ADDR KSEG1ADDR(0x1c040100) /* system control & status reg */ -#define KN02XA_SIR_ADDR KSEG1ADDR(0x1c040110) /* system interrupt reg */ -#define KN02XA_SIRM_ADDR KSEG1ADDR(0x1c040120) /* system interrupt mask reg */ - -/* * Some port addresses... * FIXME: these addresses are incomplete and need tidying up! */ -#define KN02XA_RTC_BASE (KSEG1ADDR(0x1c000000 + 0x200000)) /* ASIC + SL8 */ +#define KN02XA_IOASIC_BASE KSEG1ADDR(0x1c040000) /* I/O ASIC */ +#define KN02XA_RTC_BASE KSEG1ADDR(0x1c200000) /* RTC */ + +#define KN02XA_IOASIC_REG(r) (KN02XA_IOASIC_BASE+(r)) #endif /* __ASM_MIPS_DEC_KN02XA_H */ Index: kn03.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/kn03.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- kn03.h 14 Jan 2001 16:50:55 -0000 1.1.1.1 +++ kn03.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -8,6 +8,7 @@ * * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions * are by curteousy of Chris Fraser. + * Copyright (C) 2000 Maciej W. Rozycki * * These are addresses which have to be known early in the boot process. * For other addresses refer to tc.h ioasic_addrs.h and friends. @@ -18,16 +19,16 @@ #include <asm/addrspace.h> /* - * Motherboard regs (kseg1 addresses) - */ -#define KN03_SSR_ADDR KSEG1ADDR(0x1f840100) /* system control & status reg */ -#define KN03_SIR_ADDR KSEG1ADDR(0x1f840110) /* system interrupt reg */ -#define KN03_SIRM_ADDR KSEG1ADDR(0x1f840120) /* system interrupt mask reg */ - -/* * Some port addresses... * FIXME: these addresses are incomplete and need tidying up! */ -#define KN03_RTC_BASE (KSEG1ADDR(0x1f800000 + 0x200000)) /* ASIC + SL8 */ +#define KN03_IOASIC_BASE KSEG1ADDR(0x1f840000) /* I/O ASIC */ +#define KN03_RTC_BASE KSEG1ADDR(0x1fa00000) /* RTC */ +#define KN03_MCR_BASE KSEG1ADDR(0x1fac0000) /* MCR */ + +#define KN03_MCR_BNK32M (1<<10) /* 32M stride */ +#define KN03_MCR_ECCEN (1<<13) /* ECC enabled */ + +#define KN03_IOASIC_REG(r) (KN03_IOASIC_BASE+(r)) #endif /* __ASM_MIPS_DEC_KN03_H */ Index: tcmodule.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/dec/tcmodule.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tcmodule.h 14 Jan 2001 16:50:56 -0000 1.1.1.1 +++ tcmodule.h 9 Apr 2002 12:33:14 -0000 1.2 @@ -15,21 +15,24 @@ * * Jan.1998 Harald Koerfgen */ +#ifndef __ASM_DEC_TCMOULE_H +#define __ASM_DEC_TCMOULE_H #define OLDCARD 0x3c0000 -#define ROM_WIDTH 0x3e0 -#define ROM_STRIDE 0x3e4 -#define ROM_SIZE 0x3e8 -#define SLOT_SIZE 0x3ec -#define PATTERN0 0x3f0 -#define PATTERN1 0x3f4 -#define PATTERN2 0x3f8 -#define PATTERN3 0x3fc -#define FIRM_VER 0x400 -#define VENDOR 0x420 -#define MODULE 0x440 -#define FIRM_TYPE 0x460 -#define FLAGS 0x470 +#define TC_ROM_WIDTH 0x3e0 +#define TC_ROM_STRIDE 0x3e4 +#define TC_ROM_SIZE 0x3e8 +#define TC_SLOT_SIZE 0x3ec +#define TC_PATTERN0 0x3f0 +#define TC_PATTERN1 0x3f4 +#define TC_PATTERN2 0x3f8 +#define TC_PATTERN3 0x3fc +#define TC_FIRM_VER 0x400 +#define TC_VENDOR 0x420 +#define TC_MODULE 0x440 +#define TC_FIRM_TYPE 0x460 +#define TC_FLAGS 0x470 +#define TC_ROM_OBJECTS 0x480 -#define ROM_OBJECTS 0x480 +#endif /* __ASM_DEC_TCMOULE_H */ |
From: Andy P. <at...@us...> - 2002-04-09 12:34:16
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-mips/sgi In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-mips/sgi Modified Files: sgi.h sgihpc.h sgimc.h sgint23.h Log Message: Synch to 2.4.15 commit 1 Index: sgi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/sgi/sgi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: sgihpc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/sgi/sgihpc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: sgimc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/sgi/sgimc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgimc.h 14 Jan 2001 16:50:50 -0000 1.1.1.1 +++ sgimc.h 9 Apr 2002 12:33:15 -0000 1.2 @@ -200,7 +200,7 @@ u32 _unused7; volatile u32 dmamode; /* DMA mode config bit settings */ u32 _unused8; - volatile u32 dmacount; /* Zoom and byte count for DMA */ + volatile u32 dmaccount; /* Zoom and byte count for DMA */ u32 _unused9; volatile u32 dmastart; /* Pedal to the metal. */ u32 _unused10; Index: sgint23.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-mips/sgi/sgint23.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sgint23.h 14 Jan 2001 16:50:51 -0000 1.1.1.1 +++ sgint23.h 9 Apr 2002 12:33:15 -0000 1.2 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * 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. @@ -7,6 +6,7 @@ * sgint23.h: Defines for the SGI INT2 and INT3 chipsets. * * Copyright (C) 1996 David S. Miller (dm...@en...) + * Copyright (C) 1997, 98, 1999, 2000 Ralf Baechle * Copyright (C) 1999 Andrew R. Baker (an...@ua...) - INT2 corrections */ #ifndef _ASM_SGI_SGINT23_H @@ -25,20 +25,8 @@ #define SGINT_HPCDMA 41 /* INDY has 11 HPCDMA irq _sources_ */ #define SGINT_END 52 /* End of 'spaces' */ -/* Individual interrupt definitions for the INDY and Indigo2 - */ - -#define SGI_WD93_0_IRQ SGINT_LOCAL0 + 1 /* 1st onboard WD93 */ -#define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ -#define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ - -#define SGI_PANEL_IRQ SGINT_LOCAL1 + 1 /* front panel */ - -#define SGI_EISA_IRQ SGINT_LOCAL2 + 3 /* EISA interrupts */ -#define SGI_KEYBOARD_IRQ SGINT_LOCAL2 + 4 /* keyboard */ -#define SGI_SERIAL_IRQ SGINT_LOCAL2 + 5 /* onboard serial */ - -/* Individual interrupt definitions for the INDY and Indigo2 +/* + * Individual interrupt definitions for the INDY and Indigo2 */ #define SGI_WD93_0_IRQ SGINT_LOCAL0 + 1 /* 1st onboard WD93 */ @@ -215,4 +203,4 @@ extern void sgint_init(void); extern void indy_timer_init(void); -#endif /* !(_ASM_SGINT23_H) */ +#endif /* _ASM_SGI_SGINT23_H */ |
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1 In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-ia64/sn/sn1 Modified Files: addrs.h arch.h bedrock.h hubdev.h hubio.h hubio_next.h hublb.h hublb_next.h hubmd.h hubmd_next.h hubni.h hubni_next.h hubpi.h hubpi_next.h hubxb.h hubxb_next.h ip27config.h kldir.h leds.h promlog.h router.h slotnum.h sn1.h uart16550.h Removed Files: war.h Log Message: Synch to 2.4.15 commit 1 Index: addrs.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/addrs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- addrs.h 14 Jan 2001 17:02:03 -0000 1.1.1.1 +++ addrs.h 9 Apr 2002 12:33:12 -0000 1.2 @@ -43,22 +43,19 @@ #if defined(_RUN_UNCACHED) #define CAC_BASE 0x9600000000000000 #else +#ifndef __ia64 #define CAC_BASE 0xa800000000000000 +#else +#define CAC_BASE 0xe000000000000000 +#endif #endif -#ifdef Colin -#define HSPEC_BASE 0x9000000000000000 -#define IO_BASE 0x9200000000000000 -#define MSPEC_BASE 0x9400000000000000 -#define UNCAC_BASE 0x9600000000000000 -#else #define HSPEC_BASE 0xc0000b0000000000 #define HSPEC_SWIZ_BASE 0xc000030000000000 #define IO_BASE 0xc0000a0000000000 #define IO_SWIZ_BASE 0xc000020000000000 #define MSPEC_BASE 0xc000000000000000 #define UNCAC_BASE 0xc000000000000000 -#endif #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) Index: arch.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/arch.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: bedrock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/bedrock.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- bedrock.h 14 Jan 2001 17:02:04 -0000 1.1.1.1 +++ bedrock.h 9 Apr 2002 12:33:12 -0000 1.2 @@ -11,6 +11,8 @@ #ifndef _ASM_SN_SN1_BEDROCK_H #define _ASM_SN_SN1_BEDROCK_H +#include <linux/config.h> + /* The secret password; used to release protection */ #define HUB_PASSWORD 0x53474972756c6573ull @@ -22,7 +24,6 @@ #define MAX_HUB_PATH 80 -#include <linux/config.h> #if defined(CONFIG_SGI_IP35) || defined(CONFIG_IA64_SGI_SN1) || defined(CONFIG_IA64_GENERIC) #include <asm/sn/arch.h> #include <asm/sn/sn1/addrs.h> Index: hubdev.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubdev.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubio.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubio.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubio_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubio_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubio_next.h 14 Jan 2001 17:02:30 -0000 1.1.1.1 +++ hubio_next.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -43,6 +43,8 @@ #define IIO_IOPRB_0 IIO_IPRB0 #define IIO_PRTE_0 IIO_IPRTE0 /* PIO Read address table entry 0 */ #define IIO_PRTE(_x) (IIO_PRTE_0 + (8 * (_x))) +#define IIO_NUM_IPRBS (9) +#define IIO_WIDPRTE(x) IIO_PRTE(((x) - 8)) /* widget ID to its PRTE num */ #define IIO_LLP_CSR_IS_UP 0x00002000 #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 @@ -192,6 +194,21 @@ #define HUBII_XBOW_CREDIT 3 #define HUBII_XBOW_REV2_CREDIT 4 +/* + * Number of credits that xtalk devices should use when communicating + * with a Bedrock (depth of Bedrock's queue). + */ +#define HUB_CREDIT 4 + +/* + * Some IIO_PRB fields + */ +#define IIO_PRB_MULTI_ERR (1LL << 63) +#define IIO_PRB_SPUR_RD (1LL << 51) +#define IIO_PRB_SPUR_WR (1LL << 50) +#define IIO_PRB_RD_TO (1LL << 49) +#define IIO_PRB_ERROR (1LL << 48) + /************************************************************************* Some of the IIO field masks and shifts are defined here. @@ -245,6 +262,29 @@ #define IBCT_ZFIL_MODE (0x1 << 0) /* + * IIO Incoming Error Packet Header (IIO_IIEPH1/IIO_IIEPH2) + */ +#define IIEPH1_VALID (1 << 44) +#define IIEPH1_OVERRUN (1 << 40) +#define IIEPH1_ERR_TYPE_SHFT 32 +#define IIEPH1_ERR_TYPE_MASK 0xf +#define IIEPH1_SOURCE_SHFT 20 +#define IIEPH1_SOURCE_MASK 11 +#define IIEPH1_SUPPL_SHFT 8 +#define IIEPH1_SUPPL_MASK 11 +#define IIEPH1_CMD_SHFT 0 +#define IIEPH1_CMD_MASK 7 + +#define IIEPH2_TAIL (1 << 40) +#define IIEPH2_ADDRESS_SHFT 0 +#define IIEPH2_ADDRESS_MASK 38 + +#define IIEPH1_ERR_SHORT_REQ 2 +#define IIEPH1_ERR_SHORT_REPLY 3 +#define IIEPH1_ERR_LONG_REQ 4 +#define IIEPH1_ERR_LONG_REPLY 5 + +/* * IO Error Clear register bit field definitions */ #define IECLR_PI1_FWD_INT (1 << 31) /* clear PI1_FORWARD_INT in iidsr */ @@ -363,6 +403,10 @@ /* A few more #defines for backwards compatibility */ #define iprb_t ii_iprb0_u_t #define iprb_regval ii_iprb0_regval +#define iprb_mult_err ii_iprb0_fld_s.i_mult_err +#define iprb_spur_rd ii_iprb0_fld_s.i_spur_rd +#define iprb_spur_wr ii_iprb0_fld_s.i_spur_wr +#define iprb_rd_to ii_iprb0_fld_s.i_rd_to #define iprb_ovflow ii_iprb0_fld_s.i_of_cnt #define iprb_error ii_iprb0_fld_s.i_error #define iprb_ff ii_iprb0_fld_s.i_f @@ -385,7 +429,6 @@ #define IO_PERF_SETS 32 -#ifdef BRINGUP #if __KERNEL__ #if _LANGUAGE_C /* XXX moved over from SN/SN0/hubio.h -- each should be checked for SN1 */ @@ -646,6 +689,11 @@ device_desc_t dev_desc, /* device descriptor */ devfs_handle_t owner_dev); /* owner of this interrupt */ +extern hub_intr_t +hub_intr_alloc_nothd(devfs_handle_t dev, /* which device */ + device_desc_t dev_desc, /* device descriptor */ + devfs_handle_t owner_dev); /* owner of this interrupt */ + extern void hub_intr_free(hub_intr_t intr_hdl); @@ -710,5 +758,4 @@ #endif /* _LANGUAGE_C */ #endif /* _KERNEL */ -#endif /* BRINGUP */ #endif /* _ASM_SN_SN1_HUBIO_NEXT_H */ Index: hublb.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hublb.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hublb_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hublb_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubmd.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubmd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubmd.h 14 Jan 2001 17:02:50 -0000 1.1.1.1 +++ hubmd.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -2140,7 +2140,7 @@ * corresponds to the valid bit, and bit 1 of each two-bit field * * corresponds to the overrun bit. * * The rule for the valid bit is that it gets set whenever that error * - * occurs, regardless of whether a higher priority error has occured. * + * occurs, regardless of whether a higher priority error has occurred. * * The rule for the overrun bit is that it gets set whenever we are * * unable to record the address information for this particular * * error, due to a previous error of the same or higher priority. * @@ -2221,7 +2221,7 @@ * corresponds to the valid bit, and bit 1 of each two-bit field * * corresponds to the overrun bit. * * The rule for the valid bit is that it gets set whenever that error * - * occurs, regardless of whether a higher priority error has occured. * + * occurs, regardless of whether a higher priority error has occurred. * * The rule for the overrun bit is that it gets set whenever we are * * unable to record the address information for this particular * * error, due to a previous error of the same or higher priority. * Index: hubmd_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubmd_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubmd_next.h 14 Jan 2001 17:02:54 -0000 1.1.1.1 +++ hubmd_next.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -648,7 +648,7 @@ #define MD_SDIR_MASK 0xffffffff /* When premium mode is on for probing but standard directory memory - is installed, the vaild directory bits depend on the phys. bank */ + is installed, the valid directory bits depend on the phys. bank */ #define MD_PDIR_PROBE_MASK(pb) 0xffffffffffffffff #define MD_SDIR_PROBE_MASK(pb) (0xffff0000ffff << ((pb) ? 16 : 0)) Index: hubni.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubni.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubni_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubni_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubpi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubpi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubpi_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubpi_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubpi_next.h 14 Jan 2001 17:03:25 -0000 1.1.1.1 +++ hubpi_next.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -274,7 +274,9 @@ * The following three macros define all possible error int pends. */ -#define PI_FATAL_ERR_CPU_A (PI_ERR_SYSAD_BAD_DATA_A | \ +#define PI_FATAL_ERR_CPU_A (PI_ERR_IRB_TIMEOUT_A | \ + PI_ERR_IRB_ERR_A | \ + PI_ERR_PKT_LEN_ERR_A | \ PI_ERR_SYSSTATE_TAG_A | \ PI_ERR_BAD_SPOOL_A | \ PI_ERR_SYSCMD_ADDR_A | \ @@ -283,17 +285,17 @@ PI_ERR_SYSAD_DATA_A | \ PI_ERR_SYSSTATE_A) -#define PI_MISC_ERR_CPU_A (PI_ERR_IRB_TIMEOUT_A | \ - PI_ERR_IRB_ERR_A | \ - PI_ERR_PKT_LEN_ERR_A | \ - PI_ERR_UE_CACHED_A | \ +#define PI_MISC_ERR_CPU_A (PI_ERR_UE_CACHED_A | \ + PI_ERR_SYSAD_BAD_DATA_A| \ PI_ERR_UNCAC_UNCORR_A | \ PI_ERR_WRB_WERR_A | \ PI_ERR_WRB_TERR_A | \ PI_ERR_SPUR_MSG_A | \ PI_ERR_SPOOL_CMP_A) -#define PI_FATAL_ERR_CPU_B (PI_ERR_SYSAD_BAD_DATA_B | \ +#define PI_FATAL_ERR_CPU_B (PI_ERR_IRB_TIMEOUT_B | \ + PI_ERR_IRB_ERR_B | \ + PI_ERR_PKT_LEN_ERR_B | \ PI_ERR_SYSSTATE_TAG_B | \ PI_ERR_BAD_SPOOL_B | \ PI_ERR_SYSCMD_ADDR_B | \ @@ -302,11 +304,9 @@ PI_ERR_SYSAD_DATA_B | \ PI_ERR_SYSSTATE_B) -#define PI_MISC_ERR_CPU_B (PI_ERR_IRB_TIMEOUT_B | \ - PI_ERR_IRB_ERR_B | \ - PI_ERR_PKT_LEN_ERR_B | \ - PI_ERR_UE_CACHED_B | \ - PI_ERR_UNCAC_UNCORR_B | \ +#define PI_MISC_ERR_CPU_B (PI_ERR_UE_CACHED_B | \ + PI_ERR_SYSAD_BAD_DATA_B| \ + PI_ERR_UNCAC_UNCORR_B | \ PI_ERR_WRB_WERR_B | \ PI_ERR_WRB_TERR_B | \ PI_ERR_SPUR_MSG_B | \ Index: hubxb.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubxb.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: hubxb_next.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/hubxb_next.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hubxb_next.h 14 Jan 2001 17:03:32 -0000 1.1.1.1 +++ hubxb_next.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -28,5 +28,6 @@ /* XB_PARMS fields */ #define XBP_RESET_DEFAULTS 0x0008000080000021LL +#define XBP_ACTIVE_DEFAULTS 0x00080000fffff021LL #endif /* _ASM_SN_SN1_HUBXB_NEXT_H */ Index: ip27config.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/ip27config.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ip27config.h 14 Jan 2001 17:03:35 -0000 1.1.1.1 +++ ip27config.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -188,6 +188,10 @@ #define IP27C_R10000_SCCD_MASK (7 << IP27C_R10000_SCCD_SHFT) #define IP27C_R10000_SCCD(_B) ((_B) << IP27C_R10000_SCCD_SHFT) +#define IP27C_R10000_DDR_SHFT 23 +#define IP27C_R10000_DDR_MASK (1 << IP27C_R10000_DDR_SHFT) +#define IP27C_R10000_DDR(_B) ((_B) << IP27C_R10000_DDR_SHFT) + #define IP27C_R10000_SCCT_SHFT 25 #define IP27C_R10000_SCCT_MASK (0xf << IP27C_R10000_SCCT_SHFT) #define IP27C_R10000_SCCT(_B) ((_B) << IP27C_R10000_SCCT_SHFT) @@ -375,6 +379,7 @@ IP27C_R10000_SCCE(0) + \ IP27C_R10000_ME(1) + \ IP27C_R10000_SCS(4) + \ + IP27C_R10000_DDR(1) + \ IP27C_R10000_SCCD(3) + \ IP27C_R10000_SCCT(0xa) + \ IP27C_R10000_ODSC(0) + \ @@ -503,12 +508,7 @@ * for building hex images (as required by start.s) */ #ifdef IP27_CONFIG_SN00_4MB_100_200_133 -#ifdef IRIX -/* Set PrcReqMax to 0 to reduce memory problems */ -#define BRINGUP_PRM_VAL 0 -#else #define BRINGUP_PRM_VAL 3 -#endif #define CONFIG_CPU_MODE \ (IP27C_R10000_KSEG0CA(5) + \ IP27C_R10000_DEVNUM(0) + \ @@ -593,6 +593,7 @@ IP27C_R10000_ME(1) + \ IP27C_R10000_SCS(4) + \ IP27C_R10000_SCCD(3) + \ + IP27C_R10000_DDR(1) + \ IP27C_R10000_SCCT(0xa) + \ IP27C_R10000_ODSC(0) + \ IP27C_R10000_ODSYS(1) + \ Index: kldir.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/kldir.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: leds.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/leds.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- leds.h 14 Jan 2001 17:03:36 -0000 1.1.1.1 +++ leds.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -25,7 +25,7 @@ long *ledp; int eid; - eid = hard_processor_sapicid() & 3; + eid = hard_smp_processor_id() & 3; ledp = (long*) (LED0 + (eid<<3)); *ledp = val; } Index: promlog.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/promlog.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: router.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/router.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- router.h 14 Jan 2001 17:03:40 -0000 1.1.1.1 +++ router.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -513,7 +513,7 @@ #ifdef DEBUG int64_t ri_deltatime; /* Time it took to sample */ #endif - lock_t ri_lock; /* Lock for access to router info */ + spinlock_t ri_lock; /* Lock for access to router info */ net_vec_t *ri_vecarray; /* Pointer to array of vectors */ struct lboard_s *ri_brd; /* Pointer to board structure */ char * ri_name; /* This board's hwg path */ @@ -566,6 +566,7 @@ #define NORMAL_ROUTER_NAME "normal_router" #define NULL_ROUTER_NAME "null_router" #define META_ROUTER_NAME "meta_router" +#define REPEATER_ROUTER_NAME "repeater_router" #define UNKNOWN_ROUTER_NAME "unknown_router" /* The following definitions are needed by the router traversing @@ -630,7 +631,7 @@ */ #define RRM_RESETOK(_L) (UINT64_CAST 1 << ((_L) - 1)) -#define RRM_RESETOK_ALL (UINT64_CAST 0x3f) +#define RRM_RESETOK_ALL ALL_PORTS /* * RR_META_TABLE(_x) and RR_LOCAL_TABLE(_x) mask and shift definitions Index: slotnum.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/slotnum.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- slotnum.h 14 Jan 2001 17:03:40 -0000 1.1.1.1 +++ slotnum.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -14,8 +14,7 @@ #define SLOTNUM_MAXLENGTH 16 /* - * This file attempts to define a slot number space across all slots - * a IP27 module. Here, we deal with the top level slots. + * This file attempts to define a slot number space across all slots. * * Node slots * Router slots @@ -24,16 +23,20 @@ * Other slots are children of their parent crosstalk slot: * PCI slots * VME slots + * + * The PCI class has been added since the XBridge ASIC on SN-MIPS + * has built-in PCI bridges (2). On IBricks, widget E & F serve + * PCI busses, and on PBricks all widgets serve as PCI busses + * with the use of the super-bridge mode of the XBridge ASIC. */ -// #include <slotnum.h> -// #ifdef NOTDEF /* moved to sys/slotnum.h */ #define SLOTNUM_NODE_CLASS 0x00 /* Node */ #define SLOTNUM_ROUTER_CLASS 0x10 /* Router */ #define SLOTNUM_XTALK_CLASS 0x20 /* Xtalk */ #define SLOTNUM_MIDPLANE_CLASS 0x30 /* Midplane */ #define SLOTNUM_XBOW_CLASS 0x40 /* Xbow */ #define SLOTNUM_KNODE_CLASS 0x50 /* Kego node */ +#define SLOTNUM_PCI_CLASS 0x60 /* PCI widgets on XBridge */ #define SLOTNUM_INVALID_CLASS 0xf0 /* Invalid */ #define SLOTNUM_CLASS_MASK 0xf0 @@ -41,7 +44,6 @@ #define SLOTNUM_GETCLASS(_sn) ((_sn) & SLOTNUM_CLASS_MASK) #define SLOTNUM_GETSLOT(_sn) ((_sn) & SLOTNUM_SLOT_MASK) -// #endif /* NOTDEF */ /* This determines module to pnode mapping. */ /* NODESLOTS_PER_MODULE has changed from 4 to 6 Index: sn1.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/sn1.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: uart16550.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/sn1/uart16550.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- uart16550.h 14 Jan 2001 17:03:42 -0000 1.1.1.1 +++ uart16550.h 9 Apr 2002 12:33:13 -0000 1.2 @@ -1,3 +1,16 @@ +/* $Id$ + * + * 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. + * + * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. + * Copyright (C) 2000 by Colin Ngam + */ + +#ifndef _ASM_SN_SN1_UART16550_H +#define _ASM_SN_SN1_UART16550_H + /* * Definitions for 16550 chip @@ -212,3 +225,4 @@ #define INC_RING_POINTER(x) \ ( ((x & 0xffe0) < 4064) ? (x += 32) : 0 ) +#endif /* _ASM_SN_SN1_UART16550_H */ --- war.h DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 12:34:10
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/ksys In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-ia64/sn/ksys Modified Files: elsc.h i2c.h l1.h Log Message: Synch to 2.4.15 commit 1 Index: elsc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/ksys/elsc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- elsc.h 14 Jan 2001 17:01:41 -0000 1.1.1.1 +++ elsc.h 9 Apr 2002 12:33:12 -0000 1.2 @@ -11,6 +11,7 @@ #define _ASM_SN_KSYS_ELSC_H #include <linux/config.h> + #if defined(CONFIG_IA64_SGI_SN1) || defined(CONFIG_IA64_GENERIC) #include <asm/sn/ksys/l1.h> #endif @@ -48,7 +49,7 @@ int elsc_msg_callback(elsc_t *e, void (*callback)(void *callback_data, char *msg), void *callback_data); -#if 0 +#ifdef LATER char *elsc_errmsg(int code); int elsc_nvram_write(elsc_t *e, int addr, char *buf, int len); @@ -68,7 +69,7 @@ */ int elsc_version(elsc_t *e, char *result); -#if 0 +#ifdef LATER int elsc_debug_set(elsc_t *e, u_char byte1, u_char byte2); int elsc_debug_get(elsc_t *e, u_char *byte1, u_char *byte2); #endif @@ -90,7 +91,7 @@ int elsc_unlock(elsc_t *e); int elsc_display_char(elsc_t *e, int led, int chr); int elsc_display_digit(elsc_t *e, int led, int num, int l_case); -#if 0 +#ifdef LATER int elsc_display_mesg(elsc_t *e, char *chr); /* 8-char input */ int elsc_password_set(elsc_t *e, char *password); /* 4-char input */ int elsc_password_get(elsc_t *e, char *password); /* 4-char output */ Index: i2c.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/ksys/i2c.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: l1.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-ia64/sn/ksys/l1.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- l1.h 14 Jan 2001 17:01:43 -0000 1.1.1.1 +++ l1.h 9 Apr 2002 12:33:12 -0000 1.2 @@ -80,11 +80,11 @@ * use == BRL1_SUBCH_FREE */ uint target; /* type, rack and slot of component to * which this subchannel is directed */ - int packet_arrived; /* true if packet arrived on + atomic_t packet_arrived; /* true if packet arrived on * this subchannel */ sc_cq_t * iqp; /* input queue for this subchannel */ sv_t arrive_sv; /* used to wait for a packet */ - lock_t data_lock; /* synchronize access to input queues and + spinlock_t data_lock; /* synchronize access to input queues and * other fields of the brl1_sch_s struct */ brl1_notif_t tx_notify; /* notify higher layer that transmission may * continue */ @@ -118,9 +118,7 @@ brl1_uartf_t putc_f; /* pointer to UART putc function */ brl1_uartf_t getc_f; /* pointer to UART getc function */ - lock_t send_lock; /* arbitrates send synchronization */ - lock_t recv_lock; /* arbitrates uart receive access */ - lock_t subch_lock; /* arbitrates subchannel allocation */ + spinlock_t subch_lock; /* arbitrates subchannel allocation */ cpuid_t intr_cpu; /* cpu that receives L1 interrupts */ u_char send_in_use; /* non-zero if send buffer contains an @@ -223,6 +221,7 @@ #define L1_RESP_REQC (-101) /* bad request code */ #define L1_RESP_NAVAIL (-104) /* requested data not available */ #define L1_RESP_ARGVAL (-105) /* arg value out of range */ +#define L1_RESP_INVAL (-107) /* requested data invalid */ /* L1 general requests */ @@ -239,16 +238,19 @@ #define L1_REQ_PORTSPEED 0x000a /* get ioport speed */ #define L1_REQ_CONS_SUBCH 0x1002 /* select this node's console - * subchannel */ + subchannel */ #define L1_REQ_CONS_NODE 0x1003 /* volunteer to be the master - * (console-hosting) node */ + (console-hosting) node */ #define L1_REQ_DISP1 0x1004 /* write line 1 of L1 display */ #define L1_REQ_DISP2 0x1005 /* write line 2 of L1 display */ #define L1_REQ_PARTITION_SET 0x1006 /* set partition id */ #define L1_REQ_EVENT_SUBCH 0x1007 /* set the subchannel for system controller event transmission */ -#define L1_REQ_RESET 0x2001 /* request a full system reset */ +#define L1_REQ_RESET 0x2000 /* request a full system reset */ +#define L1_REQ_PCI_UP 0x2001 /* power up pci slot or bus */ +#define L1_REQ_PCI_DOWN 0x2002 /* power down pci slot or bus */ +#define L1_REQ_PCI_RESET 0x2003 /* reset pci bus or slot */ /* L1 command interpreter requests */ @@ -325,18 +327,6 @@ void sc_init( l1sc_t *sc, nasid_t nasid, net_vec_t uart ); void sc_intr_enable( l1sc_t *sc ); -#if 0 -int sc_portspeed_get( l1sc_t *sc ); -#endif - -int l1_cons_poll( l1sc_t *sc ); -int l1_cons_getc( l1sc_t *sc ); -void l1_cons_init( l1sc_t *sc ); -int l1_cons_read( l1sc_t *sc, char *buf, int avail ); -int l1_cons_write( l1sc_t *sc, char *msg, int len, int wait ); -void l1_cons_tx_notif( l1sc_t *sc, brl1_notif_t func ); -void l1_cons_rx_notif( l1sc_t *sc, brl1_notif_t func ); - int _elscuart_putc( l1sc_t *sc, int c ); int _elscuart_getc( l1sc_t *sc ); int _elscuart_poll( l1sc_t *sc ); @@ -354,11 +344,7 @@ int elsc_display_line(l1sc_t *e, char *line, int lnum); extern l1sc_t *get_elsc( void ); -extern void set_elsc( l1sc_t *e ); - #define get_l1sc get_elsc -#define set_l1sc(e) set_elsc(e) - #define get_master_l1sc get_l1sc int router_module_get( nasid_t nasid, net_vec_t path ); |