diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-29 11:56:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-29 11:56:47 -0400 |
commit | eb693d2994eb762b2201aead31066265ab0be20b (patch) | |
tree | 424e1e7f3d272d0fd5888435176b386594ce121f /include | |
parent | 6dec3cf5cdb600f39b9eac3349f6bf50eab87731 (diff) | |
parent | 01d40f28b125e0a9aa0ec24642be67fc4c5dfaff (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_ether.h | 2 | ||||
-rw-r--r-- | include/linux/netdevice.h | 89 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 |
3 files changed, 59 insertions, 34 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index fc2d4c8225aa..d21c305c6c64 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
111 | return (struct ethhdr *)skb->mac.raw; | 111 | return (struct ethhdr *)skb->mac.raw; |
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_SYSCTL | ||
114 | extern struct ctl_table ether_table[]; | 115 | extern struct ctl_table ether_table[]; |
115 | #endif | 116 | #endif |
117 | #endif | ||
116 | 118 | ||
117 | #endif /* _LINUX_IF_ETHER_H */ | 119 | #endif /* _LINUX_IF_ETHER_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c717907896d..368e4c825ff1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -265,6 +265,8 @@ struct net_device | |||
265 | * the interface. | 265 | * the interface. |
266 | */ | 266 | */ |
267 | char name[IFNAMSIZ]; | 267 | char name[IFNAMSIZ]; |
268 | /* device name hash chain */ | ||
269 | struct hlist_node name_hlist; | ||
268 | 270 | ||
269 | /* | 271 | /* |
270 | * I/O specific fields | 272 | * I/O specific fields |
@@ -292,6 +294,21 @@ struct net_device | |||
292 | 294 | ||
293 | /* ------- Fields preinitialized in Space.c finish here ------- */ | 295 | /* ------- Fields preinitialized in Space.c finish here ------- */ |
294 | 296 | ||
297 | /* Net device features */ | ||
298 | unsigned long features; | ||
299 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
300 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
301 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
302 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
303 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
304 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
305 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
306 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
307 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
308 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
309 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
310 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
311 | |||
295 | struct net_device *next_sched; | 312 | struct net_device *next_sched; |
296 | 313 | ||
297 | /* Interface index. Unique device identifier */ | 314 | /* Interface index. Unique device identifier */ |
@@ -316,9 +333,6 @@ struct net_device | |||
316 | * will (read: may be cleaned up at will). | 333 | * will (read: may be cleaned up at will). |
317 | */ | 334 | */ |
318 | 335 | ||
319 | /* These may be needed for future network-power-down code. */ | ||
320 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
321 | unsigned long last_rx; /* Time of last Rx */ | ||
322 | 336 | ||
323 | unsigned short flags; /* interface flags (a la BSD) */ | 337 | unsigned short flags; /* interface flags (a la BSD) */ |
324 | unsigned short gflags; | 338 | unsigned short gflags; |
@@ -328,15 +342,12 @@ struct net_device | |||
328 | unsigned mtu; /* interface MTU value */ | 342 | unsigned mtu; /* interface MTU value */ |
329 | unsigned short type; /* interface hardware type */ | 343 | unsigned short type; /* interface hardware type */ |
330 | unsigned short hard_header_len; /* hardware hdr length */ | 344 | unsigned short hard_header_len; /* hardware hdr length */ |
331 | void *priv; /* pointer to private data */ | ||
332 | 345 | ||
333 | struct net_device *master; /* Pointer to master device of a group, | 346 | struct net_device *master; /* Pointer to master device of a group, |
334 | * which this device is member of. | 347 | * which this device is member of. |
335 | */ | 348 | */ |
336 | 349 | ||
337 | /* Interface address info. */ | 350 | /* Interface address info. */ |
338 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
339 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */ | ||
340 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ | 351 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ |
341 | unsigned char addr_len; /* hardware address length */ | 352 | unsigned char addr_len; /* hardware address length */ |
342 | unsigned short dev_id; /* for shared network cards */ | 353 | unsigned short dev_id; /* for shared network cards */ |
@@ -346,8 +357,6 @@ struct net_device | |||
346 | int promiscuity; | 357 | int promiscuity; |
347 | int allmulti; | 358 | int allmulti; |
348 | 359 | ||
349 | int watchdog_timeo; | ||
350 | struct timer_list watchdog_timer; | ||
351 | 360 | ||
352 | /* Protocol specific pointers */ | 361 | /* Protocol specific pointers */ |
353 | 362 | ||
@@ -358,32 +367,62 @@ struct net_device | |||
358 | void *ec_ptr; /* Econet specific data */ | 367 | void *ec_ptr; /* Econet specific data */ |
359 | void *ax25_ptr; /* AX.25 specific data */ | 368 | void *ax25_ptr; /* AX.25 specific data */ |
360 | 369 | ||
361 | struct list_head poll_list; /* Link to poll list */ | 370 | /* |
371 | * Cache line mostly used on receive path (including eth_type_trans()) | ||
372 | */ | ||
373 | struct list_head poll_list ____cacheline_aligned_in_smp; | ||
374 | /* Link to poll list */ | ||
375 | |||
376 | int (*poll) (struct net_device *dev, int *quota); | ||
362 | int quota; | 377 | int quota; |
363 | int weight; | 378 | int weight; |
379 | unsigned long last_rx; /* Time of last Rx */ | ||
380 | /* Interface address info used in eth_type_trans() */ | ||
381 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | ||
382 | because most packets are unicast) */ | ||
383 | |||
384 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
364 | 385 | ||
386 | /* | ||
387 | * Cache line mostly used on queue transmit path (qdisc) | ||
388 | */ | ||
389 | /* device queue lock */ | ||
390 | spinlock_t queue_lock ____cacheline_aligned_in_smp; | ||
365 | struct Qdisc *qdisc; | 391 | struct Qdisc *qdisc; |
366 | struct Qdisc *qdisc_sleeping; | 392 | struct Qdisc *qdisc_sleeping; |
367 | struct Qdisc *qdisc_ingress; | ||
368 | struct list_head qdisc_list; | 393 | struct list_head qdisc_list; |
369 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 394 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
370 | 395 | ||
371 | /* ingress path synchronizer */ | 396 | /* ingress path synchronizer */ |
372 | spinlock_t ingress_lock; | 397 | spinlock_t ingress_lock; |
398 | struct Qdisc *qdisc_ingress; | ||
399 | |||
400 | /* | ||
401 | * One part is mostly used on xmit path (device) | ||
402 | */ | ||
373 | /* hard_start_xmit synchronizer */ | 403 | /* hard_start_xmit synchronizer */ |
374 | spinlock_t xmit_lock; | 404 | spinlock_t xmit_lock ____cacheline_aligned_in_smp; |
375 | /* cpu id of processor entered to hard_start_xmit or -1, | 405 | /* cpu id of processor entered to hard_start_xmit or -1, |
376 | if nobody entered there. | 406 | if nobody entered there. |
377 | */ | 407 | */ |
378 | int xmit_lock_owner; | 408 | int xmit_lock_owner; |
379 | /* device queue lock */ | 409 | void *priv; /* pointer to private data */ |
380 | spinlock_t queue_lock; | 410 | int (*hard_start_xmit) (struct sk_buff *skb, |
411 | struct net_device *dev); | ||
412 | /* These may be needed for future network-power-down code. */ | ||
413 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
414 | |||
415 | int watchdog_timeo; /* used by dev_watchdog() */ | ||
416 | struct timer_list watchdog_timer; | ||
417 | |||
418 | /* | ||
419 | * refcnt is a very hot point, so align it on SMP | ||
420 | */ | ||
381 | /* Number of references to this device */ | 421 | /* Number of references to this device */ |
382 | atomic_t refcnt; | 422 | atomic_t refcnt ____cacheline_aligned_in_smp; |
423 | |||
383 | /* delayed register/unregister */ | 424 | /* delayed register/unregister */ |
384 | struct list_head todo_list; | 425 | struct list_head todo_list; |
385 | /* device name hash chain */ | ||
386 | struct hlist_node name_hlist; | ||
387 | /* device index hash chain */ | 426 | /* device index hash chain */ |
388 | struct hlist_node index_hlist; | 427 | struct hlist_node index_hlist; |
389 | 428 | ||
@@ -396,21 +435,6 @@ struct net_device | |||
396 | NETREG_RELEASED, /* called free_netdev */ | 435 | NETREG_RELEASED, /* called free_netdev */ |
397 | } reg_state; | 436 | } reg_state; |
398 | 437 | ||
399 | /* Net device features */ | ||
400 | unsigned long features; | ||
401 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
402 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
403 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
404 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
405 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
406 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
407 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
408 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
409 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
410 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
411 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
412 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
413 | |||
414 | /* Called after device is detached from network. */ | 438 | /* Called after device is detached from network. */ |
415 | void (*uninit)(struct net_device *dev); | 439 | void (*uninit)(struct net_device *dev); |
416 | /* Called after last user reference disappears. */ | 440 | /* Called after last user reference disappears. */ |
@@ -419,10 +443,7 @@ struct net_device | |||
419 | /* Pointers to interface service routines. */ | 443 | /* Pointers to interface service routines. */ |
420 | int (*open)(struct net_device *dev); | 444 | int (*open)(struct net_device *dev); |
421 | int (*stop)(struct net_device *dev); | 445 | int (*stop)(struct net_device *dev); |
422 | int (*hard_start_xmit) (struct sk_buff *skb, | ||
423 | struct net_device *dev); | ||
424 | #define HAVE_NETDEV_POLL | 446 | #define HAVE_NETDEV_POLL |
425 | int (*poll) (struct net_device *dev, int *quota); | ||
426 | int (*hard_header) (struct sk_buff *skb, | 447 | int (*hard_header) (struct sk_buff *skb, |
427 | struct net_device *dev, | 448 | struct net_device *dev, |
428 | unsigned short type, | 449 | unsigned short type, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 68f11ac1a314..eb36fd293b41 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -392,6 +392,7 @@ | |||
392 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 | 392 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 |
393 | #define PCI_DEVICE_ID_NS_83815 0x0020 | 393 | #define PCI_DEVICE_ID_NS_83815 0x0020 |
394 | #define PCI_DEVICE_ID_NS_83820 0x0022 | 394 | #define PCI_DEVICE_ID_NS_83820 0x0022 |
395 | #define PCI_DEVICE_ID_NS_SATURN 0x0035 | ||
395 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 | 396 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 |
396 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 | 397 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 |
397 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 | 398 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 |
@@ -983,6 +984,7 @@ | |||
983 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 | 984 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 |
984 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 | 985 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 |
985 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 | 986 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 |
987 | #define PCI_DEVICE_ID_SUN_CASSINI 0xabba | ||
986 | 988 | ||
987 | #define PCI_VENDOR_ID_CMD 0x1095 | 989 | #define PCI_VENDOR_ID_CMD 0x1095 |
988 | #define PCI_DEVICE_ID_CMD_640 0x0640 | 990 | #define PCI_DEVICE_ID_CMD_640 0x0640 |