Merge libata upstream (which includes C/H/S support) include irq-pio branch.
Merge branch 'upstream'
This commit is contained in:
commit
0fbbbf2bde
424 changed files with 15643 additions and 5301 deletions
|
|
@ -43,6 +43,40 @@ struct kioctx;
|
|||
#define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags)
|
||||
#define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags)
|
||||
|
||||
/* is there a better place to document function pointer methods? */
|
||||
/**
|
||||
* ki_retry - iocb forward progress callback
|
||||
* @kiocb: The kiocb struct to advance by performing an operation.
|
||||
*
|
||||
* This callback is called when the AIO core wants a given AIO operation
|
||||
* to make forward progress. The kiocb argument describes the operation
|
||||
* that is to be performed. As the operation proceeds, perhaps partially,
|
||||
* ki_retry is expected to update the kiocb with progress made. Typically
|
||||
* ki_retry is set in the AIO core and it itself calls file_operations
|
||||
* helpers.
|
||||
*
|
||||
* ki_retry's return value determines when the AIO operation is completed
|
||||
* and an event is generated in the AIO event ring. Except the special
|
||||
* return values described below, the value that is returned from ki_retry
|
||||
* is transferred directly into the completion ring as the operation's
|
||||
* resulting status. Once this has happened ki_retry *MUST NOT* reference
|
||||
* the kiocb pointer again.
|
||||
*
|
||||
* If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete()
|
||||
* will be called on the kiocb pointer in the future. The AIO core will
|
||||
* not ask the method again -- ki_retry must ensure forward progress.
|
||||
* aio_complete() must be called once and only once in the future, multiple
|
||||
* calls may result in undefined behaviour.
|
||||
*
|
||||
* If ki_retry returns -EIOCBRETRY it has made a promise that kick_iocb()
|
||||
* will be called on the kiocb pointer in the future. This may happen
|
||||
* through generic helpers that associate kiocb->ki_wait with a wait
|
||||
* queue head that ki_retry uses via current->io_wait. It can also happen
|
||||
* with custom tracking and manual calls to kick_iocb(), though that is
|
||||
* discouraged. In either case, kick_iocb() must be called once and only
|
||||
* once. ki_retry must ensure forward progress, the AIO core will wait
|
||||
* indefinitely for kick_iocb() to be called.
|
||||
*/
|
||||
struct kiocb {
|
||||
struct list_head ki_run_list;
|
||||
long ki_flags;
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ enum {
|
|||
ATA_CMD_PACKET = 0xA0,
|
||||
ATA_CMD_VERIFY = 0x40,
|
||||
ATA_CMD_VERIFY_EXT = 0x42,
|
||||
ATA_CMD_INIT_DEV_PARAMS = 0x91,
|
||||
|
||||
/* SETFEATURES stuff */
|
||||
SETFEATURES_XFER = 0x03,
|
||||
|
|
@ -146,14 +147,14 @@ enum {
|
|||
XFER_MW_DMA_2 = 0x22,
|
||||
XFER_MW_DMA_1 = 0x21,
|
||||
XFER_MW_DMA_0 = 0x20,
|
||||
XFER_SW_DMA_2 = 0x12,
|
||||
XFER_SW_DMA_1 = 0x11,
|
||||
XFER_SW_DMA_0 = 0x10,
|
||||
XFER_PIO_4 = 0x0C,
|
||||
XFER_PIO_3 = 0x0B,
|
||||
XFER_PIO_2 = 0x0A,
|
||||
XFER_PIO_1 = 0x09,
|
||||
XFER_PIO_0 = 0x08,
|
||||
XFER_SW_DMA_2 = 0x12,
|
||||
XFER_SW_DMA_1 = 0x11,
|
||||
XFER_SW_DMA_0 = 0x10,
|
||||
XFER_PIO_SLOW = 0x00,
|
||||
|
||||
/* ATAPI stuff */
|
||||
|
|
@ -181,7 +182,8 @@ enum {
|
|||
ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */
|
||||
ATA_TFLAG_DEVICE = (1 << 2), /* enable r/w to device reg */
|
||||
ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */
|
||||
ATA_TFLAG_POLLING = (1 << 4), /* set nIEN to 1 and use polling */
|
||||
ATA_TFLAG_LBA = (1 << 4), /* enable LBA */
|
||||
ATA_TFLAG_POLLING = (1 << 5), /* set nIEN to 1 and use polling */
|
||||
};
|
||||
|
||||
enum ata_tf_protocols {
|
||||
|
|
@ -253,6 +255,18 @@ struct ata_taskfile {
|
|||
|
||||
#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
|
||||
|
||||
static inline int ata_id_current_chs_valid(u16 *id)
|
||||
{
|
||||
/* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
|
||||
has not been issued to the device then the values of
|
||||
id[54] to id[56] are vendor specific. */
|
||||
return (id[53] & 0x01) && /* Current translation valid */
|
||||
id[54] && /* cylinders in current translation */
|
||||
id[55] && /* heads in current translation */
|
||||
id[55] <= 16 &&
|
||||
id[56]; /* sectors in current translation */
|
||||
}
|
||||
|
||||
static inline int atapi_cdb_len(u16 *dev_id)
|
||||
{
|
||||
u16 tmp = dev_id[0] & 0x3;
|
||||
|
|
|
|||
|
|
@ -104,12 +104,19 @@ struct cn_queue_dev {
|
|||
struct sock *nls;
|
||||
};
|
||||
|
||||
struct cn_callback {
|
||||
struct cn_callback_id {
|
||||
unsigned char name[CN_CBQ_NAMELEN];
|
||||
|
||||
struct cb_id id;
|
||||
};
|
||||
|
||||
struct cn_callback_data {
|
||||
void (*destruct_data) (void *);
|
||||
void *ddata;
|
||||
|
||||
void *callback_priv;
|
||||
void (*callback) (void *);
|
||||
void *priv;
|
||||
|
||||
void *free;
|
||||
};
|
||||
|
||||
struct cn_callback_entry {
|
||||
|
|
@ -118,8 +125,8 @@ struct cn_callback_entry {
|
|||
struct work_struct work;
|
||||
struct cn_queue_dev *pdev;
|
||||
|
||||
void (*destruct_data) (void *);
|
||||
void *ddata;
|
||||
struct cn_callback_id id;
|
||||
struct cn_callback_data data;
|
||||
|
||||
int seq, group;
|
||||
struct sock *nls;
|
||||
|
|
@ -144,7 +151,7 @@ int cn_add_callback(struct cb_id *, char *, void (*callback) (void *));
|
|||
void cn_del_callback(struct cb_id *);
|
||||
int cn_netlink_send(struct cn_msg *, u32, int);
|
||||
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb);
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *));
|
||||
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
|
||||
|
||||
struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *);
|
||||
|
|
@ -152,6 +159,8 @@ void cn_queue_free_dev(struct cn_queue_dev *dev);
|
|||
|
||||
int cn_cb_equal(struct cb_id *, struct cb_id *);
|
||||
|
||||
void cn_queue_wrapper(void *data);
|
||||
|
||||
extern int cn_already_initialized;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
|
|||
return (struct ethhdr *)skb->mac.raw;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
extern struct ctl_table ether_table[];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_IF_ETHER_H */
|
||||
|
|
|
|||
|
|
@ -42,11 +42,14 @@ struct keyring_list {
|
|||
/*
|
||||
* check to see whether permission is granted to use a key in the desired way
|
||||
*/
|
||||
static inline int key_permission(const struct key *key, key_perm_t perm)
|
||||
static inline int key_permission(const key_ref_t key_ref, key_perm_t perm)
|
||||
{
|
||||
struct key *key = key_ref_to_ptr(key_ref);
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == current->fsuid)
|
||||
if (is_key_possessed(key_ref))
|
||||
kperm = key->perm >> 24;
|
||||
else if (key->uid == current->fsuid)
|
||||
kperm = key->perm >> 16;
|
||||
else if (key->gid != -1 &&
|
||||
key->perm & KEY_GRP_ALL &&
|
||||
|
|
@ -65,11 +68,14 @@ static inline int key_permission(const struct key *key, key_perm_t perm)
|
|||
* check to see whether permission is granted to use a key in at least one of
|
||||
* the desired ways
|
||||
*/
|
||||
static inline int key_any_permission(const struct key *key, key_perm_t perm)
|
||||
static inline int key_any_permission(const key_ref_t key_ref, key_perm_t perm)
|
||||
{
|
||||
struct key *key = key_ref_to_ptr(key_ref);
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == current->fsuid)
|
||||
if (is_key_possessed(key_ref))
|
||||
kperm = key->perm >> 24;
|
||||
else if (key->uid == current->fsuid)
|
||||
kperm = key->perm >> 16;
|
||||
else if (key->gid != -1 &&
|
||||
key->perm & KEY_GRP_ALL &&
|
||||
|
|
@ -94,13 +100,17 @@ static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline int key_task_permission(const struct key *key,
|
||||
static inline int key_task_permission(const key_ref_t key_ref,
|
||||
struct task_struct *context,
|
||||
key_perm_t perm)
|
||||
{
|
||||
struct key *key = key_ref_to_ptr(key_ref);
|
||||
key_perm_t kperm;
|
||||
|
||||
if (key->uid == context->fsuid) {
|
||||
if (is_key_possessed(key_ref)) {
|
||||
kperm = key->perm >> 24;
|
||||
}
|
||||
else if (key->uid == context->fsuid) {
|
||||
kperm = key->perm >> 16;
|
||||
}
|
||||
else if (key->gid != -1 &&
|
||||
|
|
@ -121,9 +131,9 @@ static inline int key_task_permission(const struct key *key,
|
|||
|
||||
}
|
||||
|
||||
extern struct key *lookup_user_key(struct task_struct *context,
|
||||
key_serial_t id, int create, int partial,
|
||||
key_perm_t perm);
|
||||
extern key_ref_t lookup_user_key(struct task_struct *context,
|
||||
key_serial_t id, int create, int partial,
|
||||
key_perm_t perm);
|
||||
|
||||
extern long join_session_keyring(const char *name);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,11 +35,18 @@ struct key;
|
|||
|
||||
#undef KEY_DEBUGGING
|
||||
|
||||
#define KEY_USR_VIEW 0x00010000 /* user can view a key's attributes */
|
||||
#define KEY_USR_READ 0x00020000 /* user can read key payload / view keyring */
|
||||
#define KEY_USR_WRITE 0x00040000 /* user can update key payload / add link to keyring */
|
||||
#define KEY_USR_SEARCH 0x00080000 /* user can find a key in search / search a keyring */
|
||||
#define KEY_USR_LINK 0x00100000 /* user can create a link to a key/keyring */
|
||||
#define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
|
||||
#define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
|
||||
#define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
|
||||
#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
|
||||
#define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
|
||||
#define KEY_POS_ALL 0x1f000000
|
||||
|
||||
#define KEY_USR_VIEW 0x00010000 /* user permissions... */
|
||||
#define KEY_USR_READ 0x00020000
|
||||
#define KEY_USR_WRITE 0x00040000
|
||||
#define KEY_USR_SEARCH 0x00080000
|
||||
#define KEY_USR_LINK 0x00100000
|
||||
#define KEY_USR_ALL 0x001f0000
|
||||
|
||||
#define KEY_GRP_VIEW 0x00000100 /* group permissions... */
|
||||
|
|
@ -65,6 +72,38 @@ struct key_owner;
|
|||
struct keyring_list;
|
||||
struct keyring_name;
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* key reference with possession attribute handling
|
||||
*
|
||||
* NOTE! key_ref_t is a typedef'd pointer to a type that is not actually
|
||||
* defined. This is because we abuse the bottom bit of the reference to carry a
|
||||
* flag to indicate whether the calling process possesses that key in one of
|
||||
* its keyrings.
|
||||
*
|
||||
* the key_ref_t has been made a separate type so that the compiler can reject
|
||||
* attempts to dereference it without proper conversion.
|
||||
*
|
||||
* the three functions are used to assemble and disassemble references
|
||||
*/
|
||||
typedef struct __key_reference_with_attributes *key_ref_t;
|
||||
|
||||
static inline key_ref_t make_key_ref(const struct key *key,
|
||||
unsigned long possession)
|
||||
{
|
||||
return (key_ref_t) ((unsigned long) key | possession);
|
||||
}
|
||||
|
||||
static inline struct key *key_ref_to_ptr(const key_ref_t key_ref)
|
||||
{
|
||||
return (struct key *) ((unsigned long) key_ref & ~1UL);
|
||||
}
|
||||
|
||||
static inline unsigned long is_key_possessed(const key_ref_t key_ref)
|
||||
{
|
||||
return (unsigned long) key_ref & 1UL;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* authentication token / access credential / keyring
|
||||
|
|
@ -215,20 +254,25 @@ static inline struct key *key_get(struct key *key)
|
|||
return key;
|
||||
}
|
||||
|
||||
static inline void key_ref_put(key_ref_t key_ref)
|
||||
{
|
||||
key_put(key_ref_to_ptr(key_ref));
|
||||
}
|
||||
|
||||
extern struct key *request_key(struct key_type *type,
|
||||
const char *description,
|
||||
const char *callout_info);
|
||||
|
||||
extern int key_validate(struct key *key);
|
||||
|
||||
extern struct key *key_create_or_update(struct key *keyring,
|
||||
const char *type,
|
||||
const char *description,
|
||||
const void *payload,
|
||||
size_t plen,
|
||||
int not_in_quota);
|
||||
extern key_ref_t key_create_or_update(key_ref_t keyring,
|
||||
const char *type,
|
||||
const char *description,
|
||||
const void *payload,
|
||||
size_t plen,
|
||||
int not_in_quota);
|
||||
|
||||
extern int key_update(struct key *key,
|
||||
extern int key_update(key_ref_t key,
|
||||
const void *payload,
|
||||
size_t plen);
|
||||
|
||||
|
|
@ -243,9 +287,9 @@ extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
|
|||
|
||||
extern int keyring_clear(struct key *keyring);
|
||||
|
||||
extern struct key *keyring_search(struct key *keyring,
|
||||
struct key_type *type,
|
||||
const char *description);
|
||||
extern key_ref_t keyring_search(key_ref_t keyring,
|
||||
struct key_type *type,
|
||||
const char *description);
|
||||
|
||||
extern int keyring_add_key(struct key *keyring,
|
||||
struct key *key);
|
||||
|
|
@ -285,6 +329,10 @@ extern void key_init(void);
|
|||
#define key_serial(k) 0
|
||||
#define key_get(k) ({ NULL; })
|
||||
#define key_put(k) do { } while(0)
|
||||
#define key_ref_put(k) do { } while(0)
|
||||
#define make_key_ref(k) ({ NULL; })
|
||||
#define key_ref_to_ptr(k) ({ NULL; })
|
||||
#define is_key_possessed(k) 0
|
||||
#define alloc_uid_keyring(u) 0
|
||||
#define switch_uid_keyring(u) do { } while(0)
|
||||
#define __install_session_keyring(t, k) ({ NULL; })
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ enum {
|
|||
ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
|
||||
ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
|
||||
ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
|
||||
ATA_DFLAG_CDB_INTR = (1 << 3), /* device asserts INTRQ when ready for CDB */
|
||||
ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */
|
||||
ATA_DFLAG_CDB_INTR = (1 << 4), /* device asserts INTRQ when ready for CDB */
|
||||
|
||||
ATA_DEV_UNKNOWN = 0, /* unknown device */
|
||||
ATA_DEV_ATA = 1, /* ATA device */
|
||||
|
|
@ -285,6 +286,11 @@ struct ata_device {
|
|||
u8 xfer_protocol; /* taskfile xfer protocol */
|
||||
u8 read_cmd; /* opcode to use on read */
|
||||
u8 write_cmd; /* opcode to use on write */
|
||||
|
||||
/* for CHS addressing */
|
||||
u16 cylinders; /* Number of cylinders */
|
||||
u16 heads; /* Number of heads */
|
||||
u16 sectors; /* Number of sectors per track */
|
||||
};
|
||||
|
||||
struct ata_port {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ struct of_device_id
|
|||
char name[32];
|
||||
char type[32];
|
||||
char compatible[128];
|
||||
#if __KERNEL__
|
||||
#ifdef __KERNEL__
|
||||
void *data;
|
||||
#else
|
||||
kernel_ulong_t data;
|
||||
|
|
@ -209,10 +209,11 @@ struct pcmcia_device_id {
|
|||
/* for real multi-function devices */
|
||||
__u8 function;
|
||||
|
||||
/* for pseude multi-function devices */
|
||||
/* for pseudo multi-function devices */
|
||||
__u8 device_no;
|
||||
|
||||
__u32 prod_id_hash[4];
|
||||
__u32 prod_id_hash[4]
|
||||
__attribute__((aligned(sizeof(__u32))));
|
||||
|
||||
/* not matched against in kernelspace*/
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
|||
|
|
@ -265,6 +265,8 @@ struct net_device
|
|||
* the interface.
|
||||
*/
|
||||
char name[IFNAMSIZ];
|
||||
/* device name hash chain */
|
||||
struct hlist_node name_hlist;
|
||||
|
||||
/*
|
||||
* I/O specific fields
|
||||
|
|
@ -292,6 +294,21 @@ struct net_device
|
|||
|
||||
/* ------- Fields preinitialized in Space.c finish here ------- */
|
||||
|
||||
/* Net device features */
|
||||
unsigned long features;
|
||||
#define NETIF_F_SG 1 /* Scatter/gather IO. */
|
||||
#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
|
||||
#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
|
||||
#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
|
||||
#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
|
||||
#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */
|
||||
#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
|
||||
#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
|
||||
#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */
|
||||
#define NETIF_F_LLTX 4096 /* LockLess TX */
|
||||
|
||||
struct net_device *next_sched;
|
||||
|
||||
/* Interface index. Unique device identifier */
|
||||
|
|
@ -316,9 +333,6 @@ struct net_device
|
|||
* will (read: may be cleaned up at will).
|
||||
*/
|
||||
|
||||
/* These may be needed for future network-power-down code. */
|
||||
unsigned long trans_start; /* Time (in jiffies) of last Tx */
|
||||
unsigned long last_rx; /* Time of last Rx */
|
||||
|
||||
unsigned short flags; /* interface flags (a la BSD) */
|
||||
unsigned short gflags;
|
||||
|
|
@ -328,15 +342,12 @@ struct net_device
|
|||
unsigned mtu; /* interface MTU value */
|
||||
unsigned short type; /* interface hardware type */
|
||||
unsigned short hard_header_len; /* hardware hdr length */
|
||||
void *priv; /* pointer to private data */
|
||||
|
||||
struct net_device *master; /* Pointer to master device of a group,
|
||||
* which this device is member of.
|
||||
*/
|
||||
|
||||
/* Interface address info. */
|
||||
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
|
||||
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */
|
||||
unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */
|
||||
unsigned char addr_len; /* hardware address length */
|
||||
unsigned short dev_id; /* for shared network cards */
|
||||
|
|
@ -346,8 +357,6 @@ struct net_device
|
|||
int promiscuity;
|
||||
int allmulti;
|
||||
|
||||
int watchdog_timeo;
|
||||
struct timer_list watchdog_timer;
|
||||
|
||||
/* Protocol specific pointers */
|
||||
|
||||
|
|
@ -358,32 +367,62 @@ struct net_device
|
|||
void *ec_ptr; /* Econet specific data */
|
||||
void *ax25_ptr; /* AX.25 specific data */
|
||||
|
||||
struct list_head poll_list; /* Link to poll list */
|
||||
/*
|
||||
* Cache line mostly used on receive path (including eth_type_trans())
|
||||
*/
|
||||
struct list_head poll_list ____cacheline_aligned_in_smp;
|
||||
/* Link to poll list */
|
||||
|
||||
int (*poll) (struct net_device *dev, int *quota);
|
||||
int quota;
|
||||
int weight;
|
||||
unsigned long last_rx; /* Time of last Rx */
|
||||
/* Interface address info used in eth_type_trans() */
|
||||
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast
|
||||
because most packets are unicast) */
|
||||
|
||||
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
|
||||
|
||||
/*
|
||||
* Cache line mostly used on queue transmit path (qdisc)
|
||||
*/
|
||||
/* device queue lock */
|
||||
spinlock_t queue_lock ____cacheline_aligned_in_smp;
|
||||
struct Qdisc *qdisc;
|
||||
struct Qdisc *qdisc_sleeping;
|
||||
struct Qdisc *qdisc_ingress;
|
||||
struct list_head qdisc_list;
|
||||
unsigned long tx_queue_len; /* Max frames per queue allowed */
|
||||
|
||||
/* ingress path synchronizer */
|
||||
spinlock_t ingress_lock;
|
||||
struct Qdisc *qdisc_ingress;
|
||||
|
||||
/*
|
||||
* One part is mostly used on xmit path (device)
|
||||
*/
|
||||
/* hard_start_xmit synchronizer */
|
||||
spinlock_t xmit_lock;
|
||||
spinlock_t xmit_lock ____cacheline_aligned_in_smp;
|
||||
/* cpu id of processor entered to hard_start_xmit or -1,
|
||||
if nobody entered there.
|
||||
*/
|
||||
int xmit_lock_owner;
|
||||
/* device queue lock */
|
||||
spinlock_t queue_lock;
|
||||
void *priv; /* pointer to private data */
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
/* These may be needed for future network-power-down code. */
|
||||
unsigned long trans_start; /* Time (in jiffies) of last Tx */
|
||||
|
||||
int watchdog_timeo; /* used by dev_watchdog() */
|
||||
struct timer_list watchdog_timer;
|
||||
|
||||
/*
|
||||
* refcnt is a very hot point, so align it on SMP
|
||||
*/
|
||||
/* Number of references to this device */
|
||||
atomic_t refcnt;
|
||||
atomic_t refcnt ____cacheline_aligned_in_smp;
|
||||
|
||||
/* delayed register/unregister */
|
||||
struct list_head todo_list;
|
||||
/* device name hash chain */
|
||||
struct hlist_node name_hlist;
|
||||
/* device index hash chain */
|
||||
struct hlist_node index_hlist;
|
||||
|
||||
|
|
@ -396,21 +435,6 @@ struct net_device
|
|||
NETREG_RELEASED, /* called free_netdev */
|
||||
} reg_state;
|
||||
|
||||
/* Net device features */
|
||||
unsigned long features;
|
||||
#define NETIF_F_SG 1 /* Scatter/gather IO. */
|
||||
#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
|
||||
#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
|
||||
#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
|
||||
#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
|
||||
#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */
|
||||
#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
|
||||
#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
|
||||
#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
|
||||
#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */
|
||||
#define NETIF_F_LLTX 4096 /* LockLess TX */
|
||||
|
||||
/* Called after device is detached from network. */
|
||||
void (*uninit)(struct net_device *dev);
|
||||
/* Called after last user reference disappears. */
|
||||
|
|
@ -419,10 +443,7 @@ struct net_device
|
|||
/* Pointers to interface service routines. */
|
||||
int (*open)(struct net_device *dev);
|
||||
int (*stop)(struct net_device *dev);
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
#define HAVE_NETDEV_POLL
|
||||
int (*poll) (struct net_device *dev, int *quota);
|
||||
int (*hard_header) (struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
unsigned short type,
|
||||
|
|
|
|||
|
|
@ -5,16 +5,14 @@
|
|||
|
||||
/* This header used to share core functionality between the standalone
|
||||
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
||||
extern int ip_nat_init(void);
|
||||
extern void ip_nat_cleanup(void);
|
||||
|
||||
extern unsigned int nat_packet(struct ip_conntrack *ct,
|
||||
extern unsigned int ip_nat_packet(struct ip_conntrack *ct,
|
||||
enum ip_conntrack_info conntrackinfo,
|
||||
unsigned int hooknum,
|
||||
struct sk_buff **pskb);
|
||||
|
||||
extern int icmp_reply_translation(struct sk_buff **pskb,
|
||||
struct ip_conntrack *ct,
|
||||
enum ip_nat_manip_type manip,
|
||||
enum ip_conntrack_dir dir);
|
||||
extern int ip_nat_icmp_reply_translation(struct sk_buff **pskb,
|
||||
struct ip_conntrack *ct,
|
||||
enum ip_nat_manip_type manip,
|
||||
enum ip_conntrack_dir dir);
|
||||
#endif /* _IP_NAT_CORE_H */
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@
|
|||
#define PCI_DEVICE_ID_NS_87560_USB 0x0012
|
||||
#define PCI_DEVICE_ID_NS_83815 0x0020
|
||||
#define PCI_DEVICE_ID_NS_83820 0x0022
|
||||
#define PCI_DEVICE_ID_NS_SATURN 0x0035
|
||||
#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500
|
||||
#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501
|
||||
#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502
|
||||
|
|
@ -769,6 +770,8 @@
|
|||
#define PCI_DEVICE_ID_TI_TVP4010 0x3d04
|
||||
#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
|
||||
#define PCI_DEVICE_ID_TI_4450 0x8011
|
||||
#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
|
||||
#define PCI_DEVICE_ID_TI_X515 0x8036
|
||||
#define PCI_DEVICE_ID_TI_1130 0xac12
|
||||
#define PCI_DEVICE_ID_TI_1031 0xac13
|
||||
#define PCI_DEVICE_ID_TI_1131 0xac15
|
||||
|
|
@ -785,12 +788,17 @@
|
|||
#define PCI_DEVICE_ID_TI_4451 0xac42
|
||||
#define PCI_DEVICE_ID_TI_4510 0xac44
|
||||
#define PCI_DEVICE_ID_TI_4520 0xac46
|
||||
#define PCI_DEVICE_ID_TI_7510 0xac47
|
||||
#define PCI_DEVICE_ID_TI_7610 0xac48
|
||||
#define PCI_DEVICE_ID_TI_7410 0xac49
|
||||
#define PCI_DEVICE_ID_TI_1410 0xac50
|
||||
#define PCI_DEVICE_ID_TI_1420 0xac51
|
||||
#define PCI_DEVICE_ID_TI_1451A 0xac52
|
||||
#define PCI_DEVICE_ID_TI_1620 0xac54
|
||||
#define PCI_DEVICE_ID_TI_1520 0xac55
|
||||
#define PCI_DEVICE_ID_TI_1510 0xac56
|
||||
#define PCI_DEVICE_ID_TI_X620 0xac8d
|
||||
#define PCI_DEVICE_ID_TI_X420 0xac8e
|
||||
|
||||
#define PCI_VENDOR_ID_SONY 0x104d
|
||||
#define PCI_DEVICE_ID_SONY_CXD3222 0x8039
|
||||
|
|
@ -976,6 +984,7 @@
|
|||
#define PCI_DEVICE_ID_SUN_SABRE 0xa000
|
||||
#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
|
||||
#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801
|
||||
#define PCI_DEVICE_ID_SUN_CASSINI 0xabba
|
||||
|
||||
#define PCI_VENDOR_ID_CMD 0x1095
|
||||
#define PCI_DEVICE_ID_CMD_640 0x0640
|
||||
|
|
@ -2187,7 +2196,12 @@
|
|||
#define PCI_DEVICE_ID_ENE_1211 0x1211
|
||||
#define PCI_DEVICE_ID_ENE_1225 0x1225
|
||||
#define PCI_DEVICE_ID_ENE_1410 0x1410
|
||||
#define PCI_DEVICE_ID_ENE_710 0x1411
|
||||
#define PCI_DEVICE_ID_ENE_712 0x1412
|
||||
#define PCI_DEVICE_ID_ENE_1420 0x1420
|
||||
#define PCI_DEVICE_ID_ENE_720 0x1421
|
||||
#define PCI_DEVICE_ID_ENE_722 0x1422
|
||||
|
||||
#define PCI_VENDOR_ID_CHELSIO 0x1425
|
||||
|
||||
#define PCI_VENDOR_ID_MIPS 0x153f
|
||||
|
|
|
|||
|
|
@ -107,13 +107,25 @@ extern unsigned long nr_iowait(void);
|
|||
|
||||
#include <asm/processor.h>
|
||||
|
||||
/*
|
||||
* Task state bitmask. NOTE! These bits are also
|
||||
* encoded in fs/proc/array.c: get_task_state().
|
||||
*
|
||||
* We have two separate sets of flags: task->state
|
||||
* is about runnability, while task->exit_state are
|
||||
* about the task exiting. Confusing, but this way
|
||||
* modifying one set can't modify the other one by
|
||||
* mistake.
|
||||
*/
|
||||
#define TASK_RUNNING 0
|
||||
#define TASK_INTERRUPTIBLE 1
|
||||
#define TASK_UNINTERRUPTIBLE 2
|
||||
#define TASK_STOPPED 4
|
||||
#define TASK_TRACED 8
|
||||
/* in tsk->exit_state */
|
||||
#define EXIT_ZOMBIE 16
|
||||
#define EXIT_DEAD 32
|
||||
/* in tsk->state again */
|
||||
#define TASK_NONINTERACTIVE 64
|
||||
|
||||
#define __set_task_state(tsk, state_value) \
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ enum
|
|||
NET_TR=14,
|
||||
NET_DECNET=15,
|
||||
NET_ECONET=16,
|
||||
NET_SCTP=17,
|
||||
NET_SCTP=17,
|
||||
NET_LLC=18,
|
||||
};
|
||||
|
||||
/* /proc/sys/kernel/random */
|
||||
|
|
@ -522,6 +523,29 @@ enum {
|
|||
NET_IPX_FORWARDING=2
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc */
|
||||
enum {
|
||||
NET_LLC2=1,
|
||||
NET_LLC_STATION=2,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/llc2 */
|
||||
enum {
|
||||
NET_LLC2_TIMEOUT=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/station */
|
||||
enum {
|
||||
NET_LLC_STATION_ACK_TIMEOUT=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/llc/llc2/timeout */
|
||||
enum {
|
||||
NET_LLC2_ACK_TIMEOUT=1,
|
||||
NET_LLC2_P_TIMEOUT=2,
|
||||
NET_LLC2_REJ_TIMEOUT=3,
|
||||
NET_LLC2_BUSY_TIMEOUT=4,
|
||||
};
|
||||
|
||||
/* /proc/sys/net/appletalk */
|
||||
enum {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue