summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/arcdevice.h6
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/blkdev.h31
-rw-r--r--include/linux/ethtool.h2
-rw-r--r--include/linux/hdlc.h151
-rw-r--r--include/linux/netfilter_bridge/ebt_stp.h46
-rw-r--r--include/linux/pfkeyv2.h4
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/xfrm.h4
9 files changed, 107 insertions, 140 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index a8672f0ddeb6..66c7495e1834 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -291,12 +291,13 @@ struct arcnet_local {
/* hardware-specific functions */
struct {
+ struct module *owner;
void (*command) (struct net_device * dev, int cmd);
int (*status) (struct net_device * dev);
void (*intmask) (struct net_device * dev, int mask);
bool (*reset) (struct net_device * dev, bool really_reset);
- void (*open_close) (struct net_device * dev, bool open);
- void (*open_close_ll) (struct net_device * dev, bool open);
+ void (*open) (struct net_device * dev);
+ void (*close) (struct net_device * dev);
void (*copy_to_card) (struct net_device * dev, int bufnum, int offset,
void *buf, int count);
@@ -312,7 +313,6 @@ struct arcnet_local {
#define ACOMMAND(x) (lp->hw.command(dev, (x)))
#define ASTATUS() (lp->hw.status(dev))
#define AINTMASK(x) (lp->hw.intmask(dev, (x)))
-#define ARCOPEN(x) (lp->hw.open_close(dev, (x)))
diff --git a/include/linux/bio.h b/include/linux/bio.h
index d3f47b1b0f6a..6ad6d20d3778 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -119,10 +119,12 @@ struct bio {
* bit 0 -- read (not set) or write (set)
* bit 1 -- rw-ahead when set
* bit 2 -- barrier
+ * bit 3 -- fail fast, don't want low level driver retries
*/
#define BIO_RW 0
#define BIO_RW_AHEAD 1
#define BIO_RW_BARRIER 2
+#define BIO_RW_FAILFAST 3
/*
* various member access, note that bio_data should of course not be used
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d951995038e5..fa14b066b2bb 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -165,25 +165,25 @@ struct request {
* first three bits match BIO_RW* bits, important
*/
enum rq_flag_bits {
- __REQ_RW, /* not set, read. set, write */
- __REQ_RW_AHEAD, /* READA */
+ __REQ_RW, /* not set, read. set, write */
+ __REQ_FAILFAST, /* no low level driver retries */
__REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
__REQ_HARDBARRIER, /* may not be passed by drive either */
- __REQ_CMD, /* is a regular fs rw request */
- __REQ_NOMERGE, /* don't touch this for merging */
- __REQ_STARTED, /* drive already may have started this one */
- __REQ_DONTPREP, /* don't call prep for this one */
- __REQ_QUEUED, /* uses queueing */
+ __REQ_CMD, /* is a regular fs rw request */
+ __REQ_NOMERGE, /* don't touch this for merging */
+ __REQ_STARTED, /* drive already may have started this one */
+ __REQ_DONTPREP, /* don't call prep for this one */
+ __REQ_QUEUED, /* uses queueing */
/*
* for ATA/ATAPI devices
*/
- __REQ_PC, /* packet command (special) */
- __REQ_BLOCK_PC, /* queued down pc from block layer */
- __REQ_SENSE, /* sense retrival */
+ __REQ_PC, /* packet command (special) */
+ __REQ_BLOCK_PC, /* queued down pc from block layer */
+ __REQ_SENSE, /* sense retrival */
- __REQ_FAILED, /* set if the request failed */
- __REQ_QUIET, /* don't worry about errors */
- __REQ_SPECIAL, /* driver suplied command */
+ __REQ_FAILED, /* set if the request failed */
+ __REQ_QUIET, /* don't worry about errors */
+ __REQ_SPECIAL, /* driver suplied command */
__REQ_DRIVE_CMD,
__REQ_DRIVE_TASK,
__REQ_DRIVE_TASKFILE,
@@ -191,11 +191,11 @@ enum rq_flag_bits {
__REQ_PM_SUSPEND, /* suspend request */
__REQ_PM_RESUME, /* resume request */
__REQ_PM_SHUTDOWN, /* shutdown request */
- __REQ_NR_BITS, /* stops here */
+ __REQ_NR_BITS, /* stops here */
};
#define REQ_RW (1 << __REQ_RW)
-#define REQ_RW_AHEAD (1 << __REQ_RW_AHEAD)
+#define REQ_FAILFAST (1 << __REQ_FAILFAST)
#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
#define REQ_CMD (1 << __REQ_CMD)
@@ -364,6 +364,7 @@ struct request_queue
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
+#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
#define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
#define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 55a3278ae951..f82118e5a618 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -281,6 +281,8 @@ struct ethtool_stats {
#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
+#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
+#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index 6b89e9c85f9b..94c967d945e7 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -42,6 +42,9 @@
#define LMI_ANSI 2 /* ANSI Annex D */
#define LMI_CCITT 3 /* ITU-T Annex A */
+#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
+#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
+
#ifdef __KERNEL__
@@ -50,78 +53,6 @@
#include <net/syncppp.h>
#include <linux/hdlc/ioctl.h>
-#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
-#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
-
-#define MAXLEN_LMISTAT 20 /* max size of status enquiry frame */
-
-#define PVC_STATE_NEW 0x01
-#define PVC_STATE_ACTIVE 0x02
-#define PVC_STATE_FECN 0x08 /* FECN condition */
-#define PVC_STATE_BECN 0x10 /* BECN condition */
-
-
-#define FR_UI 0x03
-#define FR_PAD 0x00
-
-#define NLPID_IP 0xCC
-#define NLPID_IPV6 0x8E
-#define NLPID_SNAP 0x80
-#define NLPID_PAD 0x00
-#define NLPID_Q933 0x08
-
-
-#define LMI_DLCI 0 /* LMI DLCI */
-#define LMI_PROTO 0x08
-#define LMI_CALLREF 0x00 /* Call Reference */
-#define LMI_ANSI_LOCKSHIFT 0x95 /* ANSI lockshift */
-#define LMI_REPTYPE 1 /* report type */
-#define LMI_CCITT_REPTYPE 0x51
-#define LMI_ALIVE 3 /* keep alive */
-#define LMI_CCITT_ALIVE 0x53
-#define LMI_PVCSTAT 7 /* pvc status */
-#define LMI_CCITT_PVCSTAT 0x57
-#define LMI_FULLREP 0 /* full report */
-#define LMI_INTEGRITY 1 /* link integrity report */
-#define LMI_SINGLE 2 /* single pvc report */
-#define LMI_STATUS_ENQUIRY 0x75
-#define LMI_STATUS 0x7D /* reply */
-
-#define LMI_REPT_LEN 1 /* report type element length */
-#define LMI_INTEG_LEN 2 /* link integrity element length */
-
-#define LMI_LENGTH 13 /* standard LMI frame length */
-#define LMI_ANSI_LENGTH 14
-
-
-
-typedef struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- unsigned ea1 : 1;
- unsigned cr : 1;
- unsigned dlcih: 6;
-
- unsigned ea2 : 1;
- unsigned de : 1;
- unsigned becn : 1;
- unsigned fecn : 1;
- unsigned dlcil: 4;
-#elif defined (__BIG_ENDIAN_BITFIELD)
- unsigned dlcih: 6;
- unsigned cr : 1;
- unsigned ea1 : 1;
-
- unsigned dlcil: 4;
- unsigned fecn : 1;
- unsigned becn : 1;
- unsigned de : 1;
- unsigned ea2 : 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-}__attribute__ ((packed)) fr_hdr;
-
-
typedef struct { /* Used in Cisco and PPP mode */
u8 address;
@@ -177,14 +108,25 @@ typedef struct hdlc_device_struct {
/* Things below are for HDLC layer internal use only */
- int (*ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
- int (*open)(struct hdlc_device_struct *hdlc);
- void (*stop)(struct hdlc_device_struct *hdlc);
- void (*proto_detach)(struct hdlc_device_struct *hdlc);
- void (*netif_rx)(struct sk_buff *skb);
- unsigned short (*type_trans)(struct sk_buff *skb,
- struct net_device *dev);
- int proto; /* IF_PROTO_HDLC/CISCO/FR/etc. */
+ struct {
+ int (*open)(struct hdlc_device_struct *hdlc);
+ void (*close)(struct hdlc_device_struct *hdlc);
+
+ /* if open & DCD */
+ void (*start)(struct hdlc_device_struct *hdlc);
+ /* if open & !DCD */
+ void (*stop)(struct hdlc_device_struct *hdlc);
+
+ void (*detach)(struct hdlc_device_struct *hdlc);
+ void (*netif_rx)(struct sk_buff *skb);
+ unsigned short (*type_trans)(struct sk_buff *skb,
+ struct net_device *dev);
+ int id; /* IF_PROTO_HDLC/CISCO/FR/etc. */
+ }proto;
+
+ int carrier;
+ int open;
+ spinlock_t state_lock;
union {
struct {
@@ -271,26 +213,11 @@ static __inline__ const char *hdlc_to_name(hdlc_device *hdlc)
}
-static __inline__ u16 q922_to_dlci(u8 *hdr)
-{
- return ((hdr[0] & 0xFC) << 2) | ((hdr[1] & 0xF0) >> 4);
-}
-
-
-
-static __inline__ void dlci_to_q922(u8 *hdr, u16 dlci)
-{
- hdr[0] = (dlci >> 2) & 0xFC;
- hdr[1] = ((dlci << 4) & 0xF0) | 0x01;
-}
-
-
-
static __inline__ void debug_frame(const struct sk_buff *skb)
{
int i;
- for (i=0; i<skb->len; i++) {
+ for (i=0; i < skb->len; i++) {
if (i == 100) {
printk("...\n");
return;
@@ -301,33 +228,19 @@ static __inline__ void debug_frame(const struct sk_buff *skb)
}
-
/* Must be called by hardware driver when HDLC device is being opened */
-static __inline__ int hdlc_open(hdlc_device *hdlc)
-{
- if (hdlc->proto == -1)
- return -ENOSYS; /* no protocol attached */
-
- if (hdlc->open)
- return hdlc->open(hdlc);
- return 0;
-}
-
-
+int hdlc_open(hdlc_device *hdlc);
/* Must be called by hardware driver when HDLC device is being closed */
-static __inline__ void hdlc_close(hdlc_device *hdlc)
-{
- if (hdlc->stop)
- hdlc->stop(hdlc);
-}
-
+void hdlc_close(hdlc_device *hdlc);
+/* Called by hardware driver when DCD line level changes */
+void hdlc_set_carrier(int on, hdlc_device *hdlc);
/* May be used by hardware driver to gain control over HDLC device */
static __inline__ void hdlc_proto_detach(hdlc_device *hdlc)
{
- if (hdlc->proto_detach)
- hdlc->proto_detach(hdlc);
- hdlc->proto_detach = NULL;
+ if (hdlc->proto.detach)
+ hdlc->proto.detach(hdlc);
+ hdlc->proto.detach = NULL;
}
@@ -335,8 +248,8 @@ static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb,
struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(skb->dev);
- if (hdlc->type_trans)
- return hdlc->type_trans(skb, dev);
+ if (hdlc->proto.type_trans)
+ return hdlc->proto.type_trans(skb, dev);
else
return __constant_htons(ETH_P_HDLC);
}
diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h
new file mode 100644
index 000000000000..e5fd67850f4d
--- /dev/null
+++ b/include/linux/netfilter_bridge/ebt_stp.h
@@ -0,0 +1,46 @@
+#ifndef __LINUX_BRIDGE_EBT_STP_H
+#define __LINUX_BRIDGE_EBT_STP_H
+
+#define EBT_STP_TYPE 0x0001
+
+#define EBT_STP_FLAGS 0x0002
+#define EBT_STP_ROOTPRIO 0x0004
+#define EBT_STP_ROOTADDR 0x0008
+#define EBT_STP_ROOTCOST 0x0010
+#define EBT_STP_SENDERPRIO 0x0020
+#define EBT_STP_SENDERADDR 0x0040
+#define EBT_STP_PORT 0x0080
+#define EBT_STP_MSGAGE 0x0100
+#define EBT_STP_MAXAGE 0x0200
+#define EBT_STP_HELLOTIME 0x0400
+#define EBT_STP_FWDD 0x0800
+
+#define EBT_STP_MASK 0x0fff
+#define EBT_STP_CONFIG_MASK 0x0ffe
+
+#define EBT_STP_MATCH "stp"
+
+struct ebt_stp_config_info
+{
+ uint8_t flags;
+ uint16_t root_priol, root_priou;
+ char root_addr[6], root_addrmsk[6];
+ uint32_t root_costl, root_costu;
+ uint16_t sender_priol, sender_priou;
+ char sender_addr[6], sender_addrmsk[6];
+ uint16_t portl, portu;
+ uint16_t msg_agel, msg_ageu;
+ uint16_t max_agel, max_ageu;
+ uint16_t hello_timel, hello_timeu;
+ uint16_t forward_delayl, forward_delayu;
+};
+
+struct ebt_stp_info
+{
+ uint8_t type;
+ struct ebt_stp_config_info config;
+ uint16_t bitmask;
+ uint16_t invflags;
+};
+
+#endif
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
index cf3a2f162239..fbfa0f52fdc9 100644
--- a/include/linux/pfkeyv2.h
+++ b/include/linux/pfkeyv2.h
@@ -190,7 +190,9 @@ struct sadb_x_ipsecrequest {
uint16_t sadb_x_ipsecrequest_proto;
uint8_t sadb_x_ipsecrequest_mode;
uint8_t sadb_x_ipsecrequest_level;
- uint16_t sadb_x_ipsecrequest_reqid;
+ uint16_t sadb_x_ipsecrequest_reserved1;
+ uint32_t sadb_x_ipsecrequest_reqid;
+ uint32_t sadb_x_ipsecrequest_reserved2;
} __attribute__((packed));
/* sizeof(struct sadb_x_ipsecrequest) == 16 */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index bf740af246c0..b20db4e5fbfa 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -487,6 +487,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
+#define PF_READAHEAD 0x00400000 /* I am doing read-ahead */
#ifdef CONFIG_SMP
extern int set_cpus_allowed(task_t *p, unsigned long new_mask);
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index d660c5f97c58..64ea125f3562 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -126,7 +126,7 @@ enum
struct xfrm_user_tmpl {
struct xfrm_id id;
xfrm_address_t saddr;
- __u16 reqid;
+ __u32 reqid;
__u8 mode;
__u8 share;
__u8 optional;
@@ -162,8 +162,8 @@ struct xfrm_usersa_info {
struct xfrm_lifetime_cur curlft;
struct xfrm_stats stats;
__u32 seq;
+ __u32 reqid;
__u16 family;
- __u16 reqid;
__u8 mode; /* 0=transport,1=tunnel */
__u8 replay_window;
};