RE: SKB tutorial, Blog, and NET TODO
Some suggestions on how to proceed on receive side: 1. support for distributing receive processing across multiple CPUs (using NIC hw queues). Multiple hw queues can be used to spread receive processing across CPUs; this will eliminate main cpu% as a bottleneck for 10GbE performance. Using a NIC that supports multiple hw queues and MSI-X, a network driver can do a decent job on distributing kernel part of receive traffic processing across CPUs - as long as it is not important which session lands on which cpu. This part doesn't require any changes outside of the driver. This scheme can be further improved upon, if the host tells the driver what CPU it wished to run a particular session on. With this information, the driver can steer a session to the same CPU that the scheduler runs the socket reads on, and achieve the best cache locality for both kernel and user level rx processing. So far, the best idea for doing this seems to be the one that Andi came up with - adding a new callback in the netdevice structure that is invoked every time a scheduler migrates socket reads to a different cpu. This would allow the driver to migrate the kernel part of rx processing to the same cpu that the read is running on. In addition to the cpu number, it will be beneficial to get priority for the socket as well. This is because NIC capacity for explicit session to cpu steering may not be unlimited. 2. LRO. This can be arguably left for now to the driver-only implementation, since the support needed from the stack - ability to accept fragmented skb that is bigger that MTU - is already there. The only other thing to consider may be forcing an ACK per LRO frame; not sure if this is worthwhile... 3. Additional support for multiple hw queues. In addition to distributing rx processing across multiple CPUs (#1 above), hw queues can be used for other things, like QoS for incoming traffic. In this case, separate queues for higher priority traffic will guarantee things like lower latency, better bandwidth, better DoS protection and more fine-tuned (per queue, not per NIC) interrupt moderation. This part needs more discussion. Possibly NAPI can make some changes to utilize the feature, and some common user-level configuration options (via do_ioctl) may be useful too. -Original Message- From: David S. Miller [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 12:20 PM To: [EMAIL PROTECTED] Cc: netdev@vger.kernel.org Subject: Re: SKB tutorial, Blog, and NET TODO From: Leonid Grossman [EMAIL PROTECTED] Date: Wed, 29 Jun 2005 14:11:13 -0700 - TSO support for IPv6 - USO (UDP TSO) support - support for multiple hardware queues/channels and TCP traffic steering; there are number of benefits in the ability to associate TCP flows with a particular hw queue/cpu/MSI (MSI-X), one of them is improving receive bottleneck for high-speed networks at 1500mtu - support for Large Receive Offload, mainly to the same end of reducing cpu utilization and solving 1500 mtu receive bottleneck I've added entries for this stuff, thanks for the suggestions. I've labelled the TCP flow assosciation and LRO stuff as Investigate .. because it is still unclear how exactly we should proceed here. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Netlink subscription/multicasting.
On Fri, Jul 29, 2005 at 02:45:32PM +0400, Evgeniy Polyakov wrote: Bcc: Evgeniy Polyakov [EMAIL PROTECTED] Subject: [RFC] Netlink subscription/multicasting. Reply-To: [EMAIL PROTECTED] Hello, developers. Here is some thoughts about netlink subscription/multicasting/group number. Hi Evgeniy. I told you that Patrick is working on this code (as part of a general netlink extension process), so you have now successfully wasted some time for code duplication. I really think we have more important things to do rather than all work on the same issue and then compete 'who will be fastest' So unless Patrick suggests that he is not working on this anymore, I would kindly ask you to be patient until he posts his code. Patrick? -- - Harald Welte [EMAIL PROTECTED] http://gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) pgpQbL0y9y5jv.pgp Description: PGP signature
[RFC PATCH] convert ebt_ulog to nfnetlink_log
Hi Bart, Dave, Patrick, attached is a patch that converts ebt_ulog to use the generic logging mechanism (and thus be able to use the nfnetlink_log backend). This patch breaks userspace compatibility, since the netlink message format of nfnetlink_log is different than the ebt_ulog one. I cannot decide whether that can be done, but at least in the past I had the feeling that nobody is really using ebt_ulog [yet], and thus it might be possible for those few users to directly use libnfnetlink_log (https://svn.netfilter.org/netfilter/trunk/libnfnetlink_log), especially considering that those uerspace apps already breaks since ebt_ulog now uses a different netlink family. How does it work? ebt_ulog.c calls nf_log_packet() which looks for a logging backend (nf_logger) for PF_BRIDGE. Userspace can attach nfnetlink_log to PF_BRIDGE by sending NFULNL_CFG_CMD_PF_BIND. libnfnetlink_log provides nfulnl_bind_pf() for that. The ebg_ulog group number is directly translated into a nfnetlink_log goup number. A userspace process can attach to a specific group by sending NFULNL_CFG_CMD_BIND (or better: calling nfulnl_bind_group() in libnfnetlink_log). If deleting all the old code is not feasible, I still suggest using the nf_log_packet() API (i.e. ebt_ulog calls nf_log_packet() but registers itself as default nf_logger for PF_BRIDGE). This way 'legacy' applications would work as long as some new nfnetlink_log app would register itself for PF_BRIDGE.I can prepare a patch, if it is needed. The same _should_ be done for regular LOG style logging of ebtables, much as ipt_LOG has been reworked by one of my recent patches. Please comment, Harald -- - Harald Welte [EMAIL PROTECTED] http://gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c @@ -3,28 +3,13 @@ * * Authors: * Bart De Schuymer [EMAIL PROTECTED] + * Harald Welte [EMAIL PROTECTED] * * November, 2004 * * Based on ipt_ULOG.c, which is * (C) 2000-2002 by Harald Welte [EMAIL PROTECTED] * - * This module accepts two parameters: - * - * nlbufsiz: - * The parameter specifies how big the buffer for each netlink multicast - * group is. e.g. If you say nlbufsiz=8192, up to eight kb of packets will - * get accumulated in the kernel until they are sent to userspace. It is - * NOT possible to allocate more than 128kB, and it is strongly discouraged, - * because atomically allocating 128kB inside the network rx softirq is not - * reliable. Please also keep in mind that this buffer size is allocated for - * each nlgroup you are using, so the total kernel memory usage increases - * by that factor. - * - * flushtimeout: - * Specify, after how many hundredths of a second the queue should be - * flushed even if it is not full yet. - * */ #include linux/module.h @@ -45,175 +30,22 @@ #define PRINTR(format, args...) do { if (net_ratelimit()) \ printk(format , ## args); } while (0) -static unsigned int nlbufsiz = 4096; -module_param(nlbufsiz, uint, 0600); -MODULE_PARM_DESC(nlbufsiz, netlink buffer size (number of bytes) - (defaults to 4096)); - -static unsigned int flushtimeout = 10; -module_param(flushtimeout, uint, 0600); -MODULE_PARM_DESC(flushtimeout, buffer flush timeout (hundredths ofa second) - (defaults to 10)); - -typedef struct { - unsigned int qlen; /* number of nlmsgs' in the skb */ - struct nlmsghdr *lastnlh; /* netlink header of last msg in skb */ - struct sk_buff *skb;/* the pre-allocated skb */ - struct timer_list timer;/* the timer function */ - spinlock_t lock;/* the per-queue lock */ -} ebt_ulog_buff_t; - -static ebt_ulog_buff_t ulog_buffers[EBT_ULOG_MAXNLGROUPS]; -static struct sock *ebtulognl; - -/* send one ulog_buff_t to userspace */ -static void ulog_send(unsigned int nlgroup) -{ - ebt_ulog_buff_t *ub = ulog_buffers[nlgroup]; - - if (timer_pending(ub-timer)) - del_timer(ub-timer); - - /* last nlmsg needs NLMSG_DONE */ - if (ub-qlen 1) - ub-lastnlh-nlmsg_type = NLMSG_DONE; - - NETLINK_CB(ub-skb).dst_groups = 1 nlgroup; - netlink_broadcast(ebtulognl, ub-skb, 0, 1 nlgroup, GFP_ATOMIC); - - ub-qlen = 0; - ub-skb = NULL; -} - -/* timer function to flush queue in flushtimeout time */ -static void ulog_timer(unsigned long data) -{ - spin_lock_bh(ulog_buffers[data].lock); - if (ulog_buffers[data].skb) - ulog_send(data); - spin_unlock_bh(ulog_buffers[data].lock); -} -
[PATCH] add new nfnetlink_log subsystem
Hi Dave! This (long-awaited) patch adds the generic nfnetlink-based userspace logging. nfnetlink_log can be used for any protocol family, and supports upt to 65535 logging groups (that could go to separate logging daemons, e.g.). The patch is incremental to my nf_log update in [EMAIL PROTECTED]. Please apply to net-2.6.14, thanks. -- - Harald Welte [EMAIL PROTECTED] http://gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) [NETFILTER] Add new nfnetlink_log userspace packet logging facility This is a generic (layer3 independent) version of what ipt_ULOG is already doing for IPv4 today. ipt_ULOG, ebt_ulog and finally also ip[6]t_LOG will be deprecated by this mechanism in the long term. Signed-off-by: Harald Welte [EMAIL PROTECTED] --- commit 66ad9b079da5c6a181506fba350aa33d26417431 tree 4b4bda3788bf34d1946ff0239100a4f235cfa120 parent 3770e25a01055bfa8bee52ed1db1f3a5141f author laforge [EMAIL PROTECTED] Sa, 30 Jul 2005 12:11:19 +0200 committer laforge [EMAIL PROTECTED] Sa, 30 Jul 2005 12:11:19 +0200 include/linux/netfilter/nfnetlink_log.h | 85 +++ net/netfilter/Kconfig | 11 net/netfilter/Makefile |1 net/netfilter/nfnetlink_log.c | 992 +++ 4 files changed, 1089 insertions(+), 0 deletions(-) diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h new file mode 100644 --- /dev/null +++ b/include/linux/netfilter/nfnetlink_log.h @@ -0,0 +1,85 @@ +#ifndef _NFNETLINK_LOG_H +#define _NFNETLINK_LOG_H + +/* This file describes the netlink messages (i.e. 'protocol packets'), + * and not any kind of function definitions. It is shared between kernel and + * userspace. Don't put kernel specific stuff in here */ + +#include linux/netfilter/nfnetlink.h + +enum nfulnl_msg_types { + NFULNL_MSG_PACKET, /* packet from kernel to userspace */ + NFULNL_MSG_CONFIG, /* connect to a particular queue */ + + NFULNL_MSG_MAX +}; + +struct nfulnl_msg_packet_hdr { + u_int16_t hw_protocol;/* hw protocol (network order) */ + u_int8_thook; /* netfilter hook */ + u_int8_t_pad; +} __attribute__ ((packed)); + +struct nfulnl_msg_packet_hw { + u_int16_t hw_addrlen; + u_int16_t _pad; + u_int8_thw_addr[8]; +} __attribute__ ((packed)); + +struct nfulnl_msg_packet_timestamp { + u_int64_t sec; + u_int64_t usec; +} __attribute__ ((packed)); + +#define NFULNL_PREFIXLEN 30 /* just like old log target */ + +enum nfulnl_attr_type { + NFULA_UNSPEC, + NFULA_PACKET_HDR, + NFULA_MARK, /* u_int32_t nfmark */ + NFULA_TIMESTAMP,/* nfulnl_msg_packet_timestamp */ + NFULA_IFINDEX_INDEV,/* u_int32_t ifindex */ + NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */ + NFULA_HWADDR, /* nfulnl_msg_packet_hw */ + NFULA_PAYLOAD, /* opaque data payload */ + NFULA_PREFIX, /* string prefix */ + NFULA_UID, /* user id of socket */ + + __NFULA_MAX +}; +#define NFULA_MAX (__NFULA_MAX - 1) + +enum nfulnl_msg_config_cmds { + NFULNL_CFG_CMD_NONE, + NFULNL_CFG_CMD_BIND, + NFULNL_CFG_CMD_UNBIND, + NFULNL_CFG_CMD_PF_BIND, + NFULNL_CFG_CMD_PF_UNBIND, +}; + +struct nfulnl_msg_config_cmd { + u_int8_tcommand;/* nfulnl_msg_config_cmds */ +} __attribute__ ((packed)); + +struct nfulnl_msg_config_mode { + u_int32_t copy_range; + u_int8_tcopy_mode; + u_int8_t_pad; +} __attribute__ ((packed)); + +enum nfulnl_attr_config { + NFULA_CFG_UNSPEC, + NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */ + NFULA_CFG_MODE, /* nfulnl_msg_config_mode */ + NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */ + NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */ + NFULA_CFG_QTHRESH, /* u_int32_t */ + __NFULA_CFG_MAX +}; +#define NFULA_CFG_MAX (__NFULA_CFG_MAX -1) + +#define NFULNL_COPY_NONE 0x00 +#define NFULNL_COPY_META 0x01 +#define NFULNL_COPY_PACKET 0x02 + +#endif /* _NFNETLINK_LOG_H */ diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -11,3 +11,14 @@ config NETFILTER_NETLINK_QUEUE If this option isenabled, the kernel will include support for queueing packets via NFNETLINK. +config NETFILTER_NETLINK_LOG + tristate Netfilter LOG over NFNETLINK interface + depends on NETFILTER_NETLINK +
[patch 2.6.13-rc4 1/15] sis190: resurrection
Raise the sis190 driver from the dead The driver handles the integrated network device found on SiS 965L chipset. It follows the classical (non-napi) interrupt-driven model and provides minimal ethtool support. The code comes from a heavy cleanup/rewrite of the original code which was removed from the kernel on 14/04/2004. Since the r8169 driver does not work too bad and there will probably be (at least) a few months of improvements/testing/fixing, I made the code as close as possible to the r8169 one. Pascal Chapperon [EMAIL PROTECTED] deserves some special credit for testing and bug-catching. Many thanks to Lars Vahlenberg as well. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/Kconfig~sis190-000 drivers/net/Kconfig --- a/drivers/net/Kconfig~sis190-0002005-07-30 00:19:17.480401160 +0200 +++ b/drivers/net/Kconfig 2005-07-30 00:19:17.526393703 +0200 @@ -1921,6 +1921,16 @@ config R8169_VLAN If in doubt, say Y. +config SIS190 + tristate SiS190 gigabit ethernet support + depends on PCI + select CRC32 + ---help--- +Say Y here if you have a SiS 190 PCI Gigabit Ethernet adapter. + +To compile this driver as a module, choose M here: the module +will be called sis190. This is recommended. + config SKGE tristate New SysKonnect GigaEthernet support (EXPERIMENTAL) depends on PCI EXPERIMENTAL diff -puN drivers/net/Makefile~sis190-000 drivers/net/Makefile --- a/drivers/net/Makefile~sis190-000 2005-07-30 00:19:17.495398728 +0200 +++ b/drivers/net/Makefile 2005-07-30 00:19:17.530393054 +0200 @@ -42,6 +42,7 @@ obj-$(CONFIG_EEPRO100) += eepro100.o obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_EPIC100) += epic100.o +obj-$(CONFIG_SIS190) += sis190.o obj-$(CONFIG_SIS900) += sis900.o obj-$(CONFIG_YELLOWFIN) += yellowfin.o obj-$(CONFIG_ACENIC) += acenic.o diff -puN /dev/null drivers/net/sis190.c --- /dev/null 2005-07-29 22:22:15.131960776 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:17.545390623 +0200 @@ -0,0 +1,1359 @@ +/* + sis190.c: Silicon Integrated Systems SiS190 ethernet driver + + Copyright (c) 2003 K.M. Liu [EMAIL PROTECTED] + Copyright (c) 2003, 2004 Jeff Garzik [EMAIL PROTECTED] + Copyright (c) 2003, 2004, 2005 Francois Romieu [EMAIL PROTECTED] + + Based on r8169.c, tg3.c, 8139cp.c, skge.c and probably even epic100.c. + + This software may be used and distributed according to the terms of + the GNU General Public License (GPL), incorporated herein by reference. + Drivers based on or derived from this code fall under the GPL and must + retain the authorship, copyright and license notice. This file is not + a complete program and may only be used when the entire operating + system is licensed under the GPL. + + See the file COPYING in this distribution for more information. + + */ + +#include linux/module.h +#include linux/moduleparam.h +#include linux/netdevice.h +#include linux/etherdevice.h +#include linux/ethtool.h +#include linux/pci.h +#include linux/mii.h +#include linux/delay.h +#include linux/crc32.h +#include linux/dma-mapping.h +#include asm/irq.h + +#define net_drv(p, arg...) if (netif_msg_drv(p)) \ + printk(arg) +#define net_probe(p, arg...) if (netif_msg_probe(p)) \ + printk(arg) +#define net_link(p, arg...)if (netif_msg_link(p)) \ + printk(arg) +#define net_intr(p, arg...)if (netif_msg_intr(p)) \ + printk(arg) +#define net_tx_err(p, arg...) if (netif_msg_tx_err(p)) \ + printk(arg) + +#ifdef CONFIG_SIS190_NAPI +#define NAPI_SUFFIX-NAPI +#else +#define NAPI_SUFFIX +#endif + +#define DRV_VERSION1.2 NAPI_SUFFIX +#define DRV_NAME sis190 +#define SIS190_DRIVER_NAME DRV_NAME Gigabit Ethernet driver DRV_VERSION +#define PFX DRV_NAME : + +#ifdef CONFIG_SIS190_NAPI +#define sis190_rx_skb netif_receive_skb +#define sis190_rx_quota(count, quota) min(count, quota) +#else +#define sis190_rx_skb netif_rx +#define sis190_rx_quota(count, quota) count +#endif + +#define MAC_ADDR_LEN 6 + +#define NUM_TX_DESC64 +#define NUM_RX_DESC64 +#define TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc)) +#define RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc)) +#define RX_BUF_SIZE1536 + +#define SIS190_REGS_SIZE 0x80 +#define SIS190_TX_TIMEOUT (6*HZ) +#define SIS190_PHY_TIMEOUT (10*HZ) +#define SIS190_MSG_DEFAULT (NETIF_MSG_DRV | NETIF_MSG_PROBE | \ +NETIF_MSG_LINK | NETIF_MSG_IFUP | \ +NETIF_MSG_IFDOWN) + +/* Enhanced PHY access register bit definitions */ +#define EhnMIIread 0x +#define
[patch 2.6.13-rc4 4/15] sis190: add MAINTAINER entry.
add MAINTAINER entry Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN MAINTAINERS~sis190-030 MAINTAINERS --- a/MAINTAINERS~sis190-0302005-07-30 00:19:20.813860702 +0200 +++ b/MAINTAINERS 2005-07-30 00:19:20.838856650 +0200 @@ -2080,6 +2080,12 @@ M: [EMAIL PROTECTED] W: http://www.simtec.co.uk/products/EB2410ITX/ S: Supported +SIS 190 ETHERNET DRIVER +P: Francois Romieu +M: [EMAIL PROTECTED] +L: netdev@vger.kernel.org +S: Maintained + SIS 5513 IDE CONTROLLER DRIVER P: Lionel Bouton M: [EMAIL PROTECTED] _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 5/15] sis190: merge some register related information from SiS driver.
Merge some register related information from SiS driver. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-040 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-040 2005-07-30 00:19:21.869689520 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:21.899684656 +0200 @@ -98,27 +98,36 @@ enum sis190_registers { TxControl = 0x00, TxDescStartAddr = 0x04, - TxNextDescAddr = 0x0c, // unused + rsv0= 0x08, // reserved + TxSts = 0x0c, // unused (Control/Status) RxControl = 0x10, RxDescStartAddr = 0x14, - RxNextDescAddr = 0x1c, // unused + rsv1= 0x18, // reserved + RxSts = 0x1c, // unused IntrStatus = 0x20, IntrMask= 0x24, IntrControl = 0x28, - IntrTimer = 0x2c, // unused - PMControl = 0x30, // unused + IntrTimer = 0x2c, // unused (Interupt Timer) + PMControl = 0x30, // unused (Power Mgmt Control/Status) + rsv2= 0x34, // reserved ROMControl = 0x38, ROMInterface= 0x3c, StationControl = 0x40, GMIIControl = 0x44, + GIoCR = 0x48, // unused (GMAC IO Compensation) + GIoCtrl = 0x4c, // unused (GMAC IO Control) TxMacControl= 0x50, + TxLimit = 0x54, // unused (Tx MAC Timer/TryLimit) + RGDelay = 0x58, // unused (RGMII Tx Internal Delay) + rsv3= 0x5c, // reserved RxMacControl= 0x60, RxMacAddr = 0x62, RxHashTable = 0x68, // Undocumented = 0x6c, - RxWakeOnLan = 0x70, - // Undocumented = 0x74, - RxMPSControl= 0x78, // unused + RxWolCtrl = 0x70, + RxWolData = 0x74, // unused (Rx WOL Data Access) + RxMPSControl= 0x78, // unused (Rx MPS Control) + rsv4= 0x7c, // reserved }; enum sis190_register_content { @@ -783,8 +792,8 @@ static void sis190_hw_start(struct net_d SIS_W16(RxMacControl, 0x02); SIS_W32(RxHashTable, 0x0); SIS_W32(0x6c, 0x0); - SIS_W32(RxWakeOnLan, 0x0); - SIS_W32(0x74, 0x0); + SIS_W32(RxWolCtrl, 0x0); + SIS_W32(RxWolData, 0x0); SIS_PCI_COMMIT(); @@ -1205,6 +1214,10 @@ static void sis190_tx_timeout(struct net if (tmp8 CmdTxEnb) SIS_W8(TxControl, tmp8 ~CmdTxEnb); + + net_tx_err(tp, KERN_INFO %s: Transmit timeout, status %08x %08x.\n, + dev-name, SIS_R32(TxControl), SIS_R32(TxSts)); + /* Disable interrupts by clearing the interrupt mask. */ SIS_W32(IntrMask, 0x); _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 2/15] sis190: netconsole support.
netconsole support. This stuff should be factored out of every driver. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-010 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-010 2005-07-30 00:19:18.700203392 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:18.720200150 +0200 @@ -629,6 +629,18 @@ out: return IRQ_RETVAL(handled); } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void sis190_netpoll(struct net_device *dev) +{ + struct sis190_private *tp = netdev_priv(dev); + struct pci_dev *pdev = tp-pci_dev; + + disable_irq(pdev-irq); + sis190_interrupt(pdev-irq, dev, NULL); + enable_irq(pdev-irq); +} +#endif + static void sis190_free_rx_skb(struct sis190_private *tp, struct sk_buff **sk_buff, struct RxDesc *desc) { @@ -1300,6 +1312,9 @@ static int __devinit sis190_init_one(str dev-tx_timeout = sis190_tx_timeout; dev-watchdog_timeo = SIS190_TX_TIMEOUT; dev-hard_start_xmit = sis190_start_xmit; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev-poll_controller = sis190_netpoll; +#endif dev-set_multicast_list = sis190_set_rx_mode; SET_ETHTOOL_OPS(dev, sis190_ethtool_ops); dev-irq = pdev-irq; _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 3/15] sis190: ethtool/mii support.
ethtool/mii support Bug: disabling autonegotiation and setting the link parameters at the same time does not provide the expected result. More investigation is needed. Note: past the initial probe/open time, the link is managed from user-space or accessed through sis190_phy_task, i.e. in a usermode context. Whence the very limited locking needs. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-020 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-020 2005-07-30 00:19:19.747033668 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:19.769030102 +0200 @@ -21,6 +21,7 @@ #include linux/module.h #include linux/moduleparam.h #include linux/netdevice.h +#include linux/rtnetlink.h #include linux/etherdevice.h #include linux/ethtool.h #include linux/pci.h @@ -230,6 +231,7 @@ struct sis190_private { struct work_struct phy_task; struct timer_list timer; u32 msg_enable; + struct mii_if_info mii_if; }; const static struct { @@ -308,6 +310,20 @@ static int mdio_read(void __iomem *ioadd return (u16) (SIS_R32(GMIIControl) EhnMIIdataShift); } +static void __mdio_write(struct net_device *dev, int phy_id, int reg, int val) +{ + struct sis190_private *tp = netdev_priv(dev); + + mdio_write(tp-mmio_addr, reg, val); +} + +static int __mdio_read(struct net_device *dev, int phy_id, int reg) +{ + struct sis190_private *tp = netdev_priv(dev); + + return mdio_read(tp-mmio_addr, reg); +} + static int sis190_read_eeprom(void __iomem *ioaddr, u32 reg) { unsigned int i; @@ -790,6 +806,8 @@ static void sis190_phy_task(void * data) void __iomem *ioaddr = tp-mmio_addr; u16 val; + rtnl_lock(); + val = mdio_read(ioaddr, MII_BMCR); if (val BMCR_RESET) { // FIXME: needlessly high ? -- FR 02/07/2005 @@ -843,6 +861,8 @@ static void sis190_phy_task(void * data) p-msg); netif_carrier_on(dev); } + + rtnl_unlock(); } static void sis190_phy_timer(unsigned long __opaque) @@ -1150,6 +1170,13 @@ static struct net_device * __devinit sis tp-pci_dev = pdev; tp-mmio_addr = ioaddr; + tp-mii_if.dev = dev; + tp-mii_if.mdio_read = __mdio_read; + tp-mii_if.mdio_write = __mdio_write; + // tp-mii_if.phy_id = XXX; + tp-mii_if.phy_id_mask = 0x1f; + tp-mii_if.reg_num_mask = 0x1f; + sis190_irq_mask_and_ack(ioaddr); sis190_soft_reset(ioaddr); @@ -1216,6 +1243,20 @@ static void sis190_set_speed_auto(struct BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET); } +static int sis190_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct sis190_private *tp = netdev_priv(dev); + + return mii_ethtool_gset(tp-mii_if, cmd); +} + +static int sis190_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct sis190_private *tp = netdev_priv(dev); + + return mii_ethtool_sset(tp-mii_if, cmd); +} + static void sis190_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -1245,6 +1286,13 @@ static void sis190_get_regs(struct net_d spin_unlock_irqrestore(tp-lock, flags); } +static int sis190_nway_reset(struct net_device *dev) +{ + struct sis190_private *tp = netdev_priv(dev); + + return mii_nway_restart(tp-mii_if); +} + static u32 sis190_get_msglevel(struct net_device *dev) { struct sis190_private *tp = netdev_priv(dev); @@ -1260,14 +1308,25 @@ static void sis190_set_msglevel(struct n } static struct ethtool_ops sis190_ethtool_ops = { + .get_settings = sis190_get_settings, + .set_settings = sis190_set_settings, .get_drvinfo= sis190_get_drvinfo, .get_regs_len = sis190_get_regs_len, .get_regs = sis190_get_regs, .get_link = ethtool_op_get_link, .get_msglevel = sis190_get_msglevel, .set_msglevel = sis190_set_msglevel, + .nway_reset = sis190_nway_reset, }; +static int sis190_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +{ + struct sis190_private *tp = netdev_priv(dev); + + return !netif_running(dev) ? -EINVAL : + generic_mii_ioctl(tp-mii_if, if_mii(ifr), cmd, NULL); +} + static int __devinit sis190_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -1308,6 +1367,7 @@ static int __devinit sis190_init_one(str dev-open = sis190_open; dev-stop = sis190_close; + dev-do_ioctl = sis190_ioctl; dev-get_stats = sis190_get_stats; dev-tx_timeout = sis190_tx_timeout; dev-watchdog_timeo = SIS190_TX_TIMEOUT; _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 12/15] sis190: dummy read is required by the status register
Add a dummy read before accessing the status register SiS driver suggests it. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-110 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-110 2005-07-30 00:19:29.392469845 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:29.413466441 +0200 @@ -383,6 +383,12 @@ static int __mdio_read(struct net_device return mdio_read(tp-mmio_addr, phy_id, reg); } +static u16 mdio_read_latched(void __iomem *ioaddr, int phy_id, int reg) +{ + mdio_read(ioaddr, phy_id, reg); + return mdio_read(ioaddr, phy_id, reg); +} + static u16 __devinit sis190_read_eeprom(void __iomem *ioaddr, u32 reg) { u16 data = 0x; @@ -881,7 +887,8 @@ static void sis190_phy_task(void * data) if (val BMCR_RESET) { // FIXME: needlessly high ? -- FR 02/07/2005 mod_timer(tp-timer, jiffies + HZ/10); - } else if (!(mdio_read(ioaddr, phy_id, MII_BMSR) BMSR_ANEGCOMPLETE)) { + } else if (!(mdio_read_latched(ioaddr, phy_id, MII_BMSR) +BMSR_ANEGCOMPLETE)) { net_link(tp, KERN_WARNING %s: PHY reset until link up.\n, dev-name); mdio_write(ioaddr, phy_id, MII_BMCR, val | BMCR_RESET); _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 13/15] sis190: new PHY detection code.
New PHY detection code. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-120 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-120 2005-07-30 00:19:30.442299636 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:30.466295745 +0200 @@ -43,6 +43,10 @@ #define net_tx_err(p, arg...) if (netif_msg_tx_err(p)) \ printk(arg) +#define PHY_MAX_ADDR 32 +#define PHY_ID_ANY 0x1f +#define MII_REG_ANY0x1f + #ifdef CONFIG_SIS190_NAPI #define NAPI_SUFFIX-NAPI #else @@ -295,6 +299,33 @@ struct sis190_private { struct timer_list timer; u32 msg_enable; struct mii_if_info mii_if; + struct list_head first_phy; +}; + +struct sis190_phy { + struct list_head list; + int phy_id; + u16 id[2]; + u16 status; + u8 type; +}; + +enum sis190_phy_type { + UNKNOWN = 0x00, + HOME= 0x01, + LAN = 0x02, + MIX = 0x03 +}; + +static struct mii_chip_info { +const char *name; +u16 id[2]; +unsigned int type; +} mii_chip_table[] = { + { Broadcom PHY BCM5461, { 0x0020, 0x60c0 }, LAN }, + { Agere PHY ET1101B,{ 0x0282, 0xf010 }, LAN }, + { Marvell PHY 88E, { 0x0141, 0x0cc0 }, LAN }, + { NULL, } }; const static struct { @@ -1174,6 +1205,177 @@ static struct net_device_stats *sis190_g return tp-stats; } +static void sis190_free_phy(struct list_head *first_phy) +{ + struct sis190_phy *cur, *next; + + list_for_each_entry_safe(cur, next, first_phy, list) { + kfree(cur); + } +} + +/** + * sis190_default_phy - Select default PHY for sis190 mac. + * @dev: the net device to probe for + * + * Select first detected PHY with link as default. + * If no one is link on, select PHY whose types is HOME as default. + * If HOME doesn't exist, select LAN. + */ +static u16 sis190_default_phy(struct net_device *dev) +{ + struct sis190_phy *phy, *phy_home, *phy_default, *phy_lan; + struct sis190_private *tp = netdev_priv(dev); + struct mii_if_info *mii_if = tp-mii_if; + void __iomem *ioaddr = tp-mmio_addr; + u16 status; + + phy_home = phy_default = phy_lan = NULL; + + list_for_each_entry(phy, tp-first_phy, list) { + status = mdio_read_latched(ioaddr, phy-phy_id, MII_BMSR); + + // Link ON Not select default PHY not ghost PHY. + if ((status BMSR_LSTATUS) + !phy_default + (phy-type != UNKNOWN)) { + phy_default = phy; + } else { + status = mdio_read(ioaddr, phy-phy_id, MII_BMCR); + mdio_write(ioaddr, phy-phy_id, MII_BMCR, + status | BMCR_ANENABLE | BMCR_ISOLATE); + if (phy-type == HOME) + phy_home = phy; + else if (phy-type == LAN) + phy_lan = phy; + } + } + + if (!phy_default) { + if (phy_home) + phy_default = phy_home; + else if (phy_lan) + phy_default = phy_lan; + else + phy_default = list_entry(tp-first_phy, +struct sis190_phy, list); + } + + if (mii_if-phy_id != phy_default-phy_id) { + mii_if-phy_id = phy_default-phy_id; + net_probe(tp, KERN_INFO + %s: Using transceiver at address %d as default.\n, + dev-name, mii_if-phy_id); + } + + status = mdio_read(ioaddr, mii_if-phy_id, MII_BMCR); + status = (~BMCR_ISOLATE); + + mdio_write(ioaddr, mii_if-phy_id, MII_BMCR, status); + status = mdio_read_latched(ioaddr, mii_if-phy_id, MII_BMSR); + + return status; +} + +static void sis190_init_phy(struct net_device *dev, struct sis190_private *tp, + struct sis190_phy *phy, unsigned int phy_id, + u16 mii_status) +{ + void __iomem *ioaddr = tp-mmio_addr; + struct mii_chip_info *p; + + INIT_LIST_HEAD(phy-list); + phy-status = mii_status; + phy-phy_id = phy_id; + + phy-id[0] = mdio_read(ioaddr, phy_id, MII_PHYSID1); + phy-id[1] = mdio_read(ioaddr, phy_id, MII_PHYSID2); + + for (p = mii_chip_table; p-type; p++) { + if ((p-id[0] == phy-id[0]) + (p-id[1] == (phy-id[1] 0xfff0))) { + break; + } + } + + if (p-id[1]) { + phy-type = (p-type == MIX) ? + ((mii_status (BMSR_100FULL | BMSR_100HALF)) ? + LAN : HOME) : p-type; + } else + phy-type = UNKNOWN; + +
[patch 2.6.13-rc4 14/15] sis190: PHY identifier for the K8S-MX motherboard.
Added PHY identifier for the Asus K8S-MX motherboard Note: the same ID appears in the sis900 driver. Signed-off-by: Lars Vahlenberg [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-130 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-130 2005-07-30 00:19:31.0 +0200 +++ b/drivers/net/sis190.c 2005-07-30 11:20:24.725745884 +0200 @@ -325,6 +325,7 @@ static struct mii_chip_info { { Broadcom PHY BCM5461, { 0x0020, 0x60c0 }, LAN }, { Agere PHY ET1101B,{ 0x0282, 0xf010 }, LAN }, { Marvell PHY 88E, { 0x0141, 0x0cc0 }, LAN }, + { Realtek PHY RTL8201, { 0x, 0x8200 }, LAN }, { NULL, } }; _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 10/15] sis190: add endian annotations.
Add endian annotations. Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-090 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-090 2005-07-30 00:19:27.289810751 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:27.310807347 +0200 @@ -191,17 +191,17 @@ enum sis190_register_content { }; struct TxDesc { - u32 PSize; - u32 status; - u32 addr; - u32 size; + __le32 PSize; + __le32 status; + __le32 addr; + __le32 size; }; struct RxDesc { - u32 PSize; - u32 status; - u32 addr; - u32 size; + __le32 PSize; + __le32 status; + __le32 addr; + __le32 size; }; enum _DescStatusBit { @@ -1322,7 +1322,7 @@ static int __devinit sis190_get_mac_addr /* Get MAC address from EEPROM */ for (i = 0; i MAC_ADDR_LEN / 2; i++) { - u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); + __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); ((u16 *)dev-dev_addr)[0] = le16_to_cpu(w); } _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.13-rc4 11/15] sis190: allow a non-hardcoded ID for the PHY.
Allow a non-hardcoded ID for the PHY This is the first step before the driver probes for the PHY address. Signed-off-by: Francois Romieu [EMAIL PROTECTED] diff -puN drivers/net/sis190.c~sis190-100 drivers/net/sis190.c --- a/drivers/net/sis190.c~sis190-100 2005-07-30 00:19:28.341640217 +0200 +++ b/drivers/net/sis190.c 2005-07-30 00:19:28.363636651 +0200 @@ -354,21 +354,17 @@ static void __mdio_cmd(void __iomem *ioa printk(KERN_ERR PFX PHY command failed !\n); } -static void mdio_write(void __iomem *ioaddr, int reg, int val) +static void mdio_write(void __iomem *ioaddr, int phy_id, int reg, int val) { - u32 pmd = 1; - __mdio_cmd(ioaddr, EhnMIIreq | EhnMIIwrite | - (((u32) reg) EhnMIIregShift) | (pmd EhnMIIpmdShift) | + (((u32) reg) EhnMIIregShift) | (phy_id EhnMIIpmdShift) | (((u32) val) EhnMIIdataShift)); } -static int mdio_read(void __iomem *ioaddr, int reg) +static int mdio_read(void __iomem *ioaddr, int phy_id, int reg) { - u32 pmd = 1; - __mdio_cmd(ioaddr, EhnMIIreq | EhnMIIread | - (((u32) reg) EhnMIIregShift) | (pmd EhnMIIpmdShift)); + (((u32) reg) EhnMIIregShift) | (phy_id EhnMIIpmdShift)); return (u16) (SIS_R32(GMIIControl) EhnMIIdataShift); } @@ -377,14 +373,14 @@ static void __mdio_write(struct net_devi { struct sis190_private *tp = netdev_priv(dev); - mdio_write(tp-mmio_addr, reg, val); + mdio_write(tp-mmio_addr, phy_id, reg, val); } static int __mdio_read(struct net_device *dev, int phy_id, int reg) { struct sis190_private *tp = netdev_priv(dev); - return mdio_read(tp-mmio_addr, reg); + return mdio_read(tp-mmio_addr, phy_id, reg); } static u16 __devinit sis190_read_eeprom(void __iomem *ioaddr, u32 reg) @@ -876,18 +872,19 @@ static void sis190_phy_task(void * data) struct net_device *dev = data; struct sis190_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp-mmio_addr; + int phy_id = tp-mii_if.phy_id; u16 val; rtnl_lock(); - val = mdio_read(ioaddr, MII_BMCR); + val = mdio_read(ioaddr, phy_id, MII_BMCR); if (val BMCR_RESET) { // FIXME: needlessly high ? -- FR 02/07/2005 mod_timer(tp-timer, jiffies + HZ/10); - } else if (!(mdio_read(ioaddr, MII_BMSR) BMSR_ANEGCOMPLETE)) { + } else if (!(mdio_read(ioaddr, phy_id, MII_BMSR) BMSR_ANEGCOMPLETE)) { net_link(tp, KERN_WARNING %s: PHY reset until link up.\n, dev-name); - mdio_write(ioaddr, MII_BMCR, val | BMCR_RESET); + mdio_write(ioaddr, phy_id, MII_BMCR, val | BMCR_RESET); mod_timer(tp-timer, jiffies + SIS190_PHY_TIMEOUT); } else { /* Rejoice ! */ @@ -917,10 +914,10 @@ static void sis190_phy_task(void * data) { 0, unknown, 0x } }, *p; - val = mdio_read(ioaddr, 0x1f); + val = mdio_read(ioaddr, phy_id, 0x1f); net_link(tp, KERN_INFO %s: mii ext = %04x.\n, dev-name, val); - val = mdio_read(ioaddr, MII_LPA); + val = mdio_read(ioaddr, phy_id, MII_LPA); net_link(tp, KERN_INFO %s: mii lpa = %04x.\n, dev-name, val); for (p = reg31; p-ctl; p++) { @@ -1250,7 +1247,7 @@ static struct net_device * __devinit sis tp-mii_if.dev = dev; tp-mii_if.mdio_read = __mdio_read; tp-mii_if.mdio_write = __mdio_write; - // tp-mii_if.phy_id = XXX; + tp-mii_if.phy_id = 1; tp-mii_if.phy_id_mask = 0x1f; tp-mii_if.reg_num_mask = 0x1f; @@ -1423,23 +1420,24 @@ static void sis190_set_speed_auto(struct { struct sis190_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp-mmio_addr; + int phy_id = tp-mii_if.phy_id; int val; net_link(tp, KERN_INFO %s: Enabling Auto-negotiation.\n, dev-name); - val = mdio_read(ioaddr, MII_ADVERTISE); + val = mdio_read(ioaddr, phy_id, MII_ADVERTISE); // Enable 10/100 Full/Half Mode, leave MII_ADVERTISE bit4:0 // unchanged. - mdio_write(ioaddr, MII_ADVERTISE, (val ADVERTISE_SLCT) | + mdio_write(ioaddr, phy_id, MII_ADVERTISE, (val ADVERTISE_SLCT) | ADVERTISE_100FULL | ADVERTISE_10FULL | ADVERTISE_100HALF | ADVERTISE_10HALF); // Enable 1000 Full Mode. - mdio_write(ioaddr, MII_CTRL1000, ADVERTISE_1000FULL); + mdio_write(ioaddr, phy_id, MII_CTRL1000, ADVERTISE_1000FULL); // Enable auto-negotiation and restart auto-negotiation. - mdio_write(ioaddr, MII_BMCR, + mdio_write(ioaddr, phy_id, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET); } _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message
Re: [RFC] Netlink subscription/multicasting.
On Sat, Jul 30, 2005 at 12:23:05PM +0200, Harald Welte ([EMAIL PROTECTED]) wrote: On Fri, Jul 29, 2005 at 02:45:32PM +0400, Evgeniy Polyakov wrote: Bcc: Evgeniy Polyakov [EMAIL PROTECTED] Subject: [RFC] Netlink subscription/multicasting. Reply-To: [EMAIL PROTECTED] Hello, developers. Here is some thoughts about netlink subscription/multicasting/group number. Hi Evgeniy. I told you that Patrick is working on this code (as part of a general netlink extension process), so you have now successfully wasted some time for code duplication. I really think we have more important things to do rather than all work on the same issue and then compete 'who will be fastest' So unless Patrick suggests that he is not working on this anymore, I would kindly ask you to be patient until he posts his code. Patrick? This was not even supposed to be 'who will be faster` - it is just an idea, I just wanted to bringe some attention to. Message was marked as request for comments, but not as patch for inclusion or something similar. As Patrik mentioned, it was not on the top of his TODO list, so some discussion about possible directions will not hurt any development process. -- - Harald Welte [EMAIL PROTECTED]http://gnumonks.org/ Privacy in residential applications is a desirable marketing option. (ETSI EN 300 175-7 Ch. A6) -- Evgeniy Polyakov - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Netlink subscription/multicasting.
Evgeniy Polyakov wrote: As Patrik mentioned, it was not on the top of his TODO list, so some discussion about possible directions will not hurt any development process. I'm still working on it, I hope to be able to post some code and some comments on your code tonight. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] MASQUERADE: inherit masq_index to slave connections
Hi Dave! This fixes a bug with MASQUERADE and nat helpers. The fix applies to both net-2.6.14 and Linus' current git tree. I'll send a 2.4.31 version of the patch directly to Marcelo (will Cc you). Please apply, thanks. -- - Harald Welte [EMAIL PROTECTED] http://netfilter.org/ Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed.-- Paul Vixie [NETFILTER] Inherit masq_index to slave connections masq_index is used for cleanup in case the interface address changes (such as a dialup ppp link with dynamic addreses). Without this patch, slave connections are not evicted in such a case, since they don't inherit masq_index. Signed-off-by: Harald Welte [EMAIL PROTECTED] --- commit bd4123d85f932f9bd60da9d2ed3523dc7b792075 tree a0218fc4d42630d33d99b4167f6dccf209cfd091 parent f00815c7d2b718eccbc3e7ec77592faff45e9ccc author laforge [EMAIL PROTECTED] Sa, 30 Jul 2005 15:35:35 +0200 committer laforge [EMAIL PROTECTED] Sa, 30 Jul 2005 15:35:35 +0200 net/ipv4/netfilter/ip_conntrack_core.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c @@ -726,6 +726,11 @@ init_conntrack(struct ip_conntrack_tuple #if CONFIG_IP_NF_CONNTRACK_MARK conntrack-mark = exp-master-mark; #endif +#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ +defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) + /* this is ugly, but there is no other place where to put it */ + conntrack-nat.masq_index = exp-master-nat.masq_index; +#endif nf_conntrack_get(conntrack-master-ct_general); CONNTRACK_STAT_INC(expect_new); } else { pgpeh1dvC3YZ8.pgp Description: PGP signature
[PATCH] MASQUERADE: inherit masq_index to slave connections
Hi Marcelo! Pleae apply the following trivial fix to your 2.4.x tree. I've already submitted a 2.6.x fix for this to davem. Thanks! -- - Harald Welte [EMAIL PROTECTED] http://netfilter.org/ Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed.-- Paul Vixie [NETFILTER] Inherit masq_index to slave connections masq_index is used for cleanup in case the interface address changes (such as a dialup ppp link with dynamic addreses). Without this patch, slave connections are not evicted in such a case, since they don't inherit masq_index. Signed-off-by: Harald Welte [EMAIL PROTECTED] Index: linux-2.4.31/net/ipv4/netfilter/ip_conntrack_core.c === --- linux-2.4.31.orig/net/ipv4/netfilter/ip_conntrack_core.c2005-04-04 03:42:20.0 +0200 +++ linux-2.4.31/net/ipv4/netfilter/ip_conntrack_core.c 2005-07-30 15:59:41.0 +0200 @@ -741,6 +741,11 @@ /* Welcome, Mr. Bond. We've been expecting you... */ __set_bit(IPS_EXPECTED_BIT, conntrack-status); conntrack-master = expected; +#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ +defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) + /* this is ugly, but there is no other place where to put it */ + conntrack-nat.masq_index = expected-expectant-nat.masq_index; +#endif expected-sibling = conntrack; LIST_DELETE(ip_conntrack_expect_list, expected); expected-expectant-expecting--; pgpAJWvBE7Kgi.pgp Description: PGP signature
[patch 02/12] hostap update
From: Adrian Bunk [EMAIL PROTECTED] EXPORT_SYMTAB does nothing. There's no need to define something if it doesn't have any effect. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap.c @@ -12,10 +12,6 @@ * more details. */ -#ifndef EXPORT_SYMTAB -#define EXPORT_SYMTAB -#endif - #include linux/config.h #include linux/version.h #include linux/module.h -- -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 00/12] hostap update
This set of patches updates Host AP driver in the ieee80211-wifi branch of the netdev-2.6 git tree with changes from my CVS repository and from additional contributed patches from the past couple of months. Please apply to the suitable branch(es) in netdev-2.6. -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 06/12] hostap update
Add MODULE_VERSION information for the Host AP kernel modules and update the version string to indicate which version of the external Host AP driver is included in the kernel tree. Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap.c @@ -37,6 +37,7 @@ MODULE_AUTHOR(Jouni Malinen); MODULE_DESCRIPTION(Host AP common routines); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); /* Old hostap_crypt module is now part of hostap module. */ #include hostap_crypt.c Index: netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_ccmp.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_crypt_ccmp.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_ccmp.c @@ -36,6 +36,7 @@ MODULE_AUTHOR(Jouni Malinen); MODULE_DESCRIPTION(Host AP crypt: CCMP); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); #define AES_BLOCK_LEN 16 Index: netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_tkip.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_crypt_tkip.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_tkip.c @@ -38,6 +38,7 @@ MODULE_AUTHOR(Jouni Malinen); MODULE_DESCRIPTION(Host AP crypt: TKIP); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); struct hostap_tkip_data { Index: netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_wep.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_crypt_wep.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_crypt_wep.c @@ -19,6 +19,7 @@ #include asm/string.h #include hostap_crypt.h +#include hostap_config.h #ifndef CONFIG_CRYPTO #error CONFIG_CRYPTO is required to build this module. @@ -30,6 +31,7 @@ MODULE_AUTHOR(Jouni Malinen); MODULE_DESCRIPTION(Host AP crypt: WEP); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); struct prism2_wep_data { Index: netdev-2.6/drivers/net/wireless/hostap/hostap_cs.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_cs.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_cs.c @@ -32,6 +32,7 @@ MODULE_DESCRIPTION(Support for Intersil cards (PC Card).); MODULE_SUPPORTED_DEVICE(Intersil Prism2-based WLAN cards (PC Card)); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); static int ignore_cis_vcc; Index: netdev-2.6/drivers/net/wireless/hostap/hostap_pci.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_pci.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_pci.c @@ -31,6 +31,7 @@ MODULE_DESCRIPTION(Support for Intersil PCI cards.); MODULE_SUPPORTED_DEVICE(Intersil Prism2.5-based WLAN PCI cards); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); /* FIX: do we need mb/wmb/rmb with memory operations? */ Index: netdev-2.6/drivers/net/wireless/hostap/hostap_plx.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_plx.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_plx.c @@ -34,6 +34,7 @@ MODULE_DESCRIPTION(Support for Intersil cards (PLX).); MODULE_SUPPORTED_DEVICE(Intersil Prism2-based WLAN cards (PLX)); MODULE_LICENSE(GPL); +MODULE_VERSION(PRISM2_VERSION); static int ignore_cis; Index: netdev-2.6/drivers/net/wireless/hostap/hostap_config.h === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_config.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_config.h @@ -1,7 +1,7 @@ #ifndef HOSTAP_CONFIG_H #define HOSTAP_CONFIG_H -#define PRISM2_VERSION CVS +#define PRISM2_VERSION 0.4.1-kernel /* In the previous versions of Host AP driver, support for user space version * of IEEE 802.11 management (hostapd) used to be disabled in the default -- -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 07/12] hostap update
Added support for setting channel mask for scan requests ('iwpriv wlan0 scan_channels 0x00ff' masks scans to use channels 1-8). Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap_common.h === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_common.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_common.h @@ -423,6 +423,7 @@ enum { PRISM2_PARAM_PRIVACY_INVOKED = 37, PRISM2_PARAM_TKIP_COUNTERMEASURES = 38, PRISM2_PARAM_DROP_UNENCRYPTED = 39, + PRISM2_PARAM_SCAN_CHANNEL_MASK = 40, }; enum { HOSTAP_ANTSEL_DO_NOT_TOUCH = 0, HOSTAP_ANTSEL_DIVERSITY = 1, Index: netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_hw.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c @@ -3374,6 +3374,7 @@ prism2_init_local_data(struct prism2_hel * cnfDbmAdjust, if available */ local-auth_algs = PRISM2_AUTH_OPEN | PRISM2_AUTH_SHARED_KEY; local-sram_type = -1; + local-scan_channel_mask = 0x; #if defined(PRISM2_PCI) defined(PRISM2_BUS_MASTER) local-bus_master_threshold_rx = GET_INT_PARM(bus_master_threshold_rx, card_idx); Index: netdev-2.6/drivers/net/wireless/hostap/hostap_ioctl.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_ioctl.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_ioctl.c @@ -1664,7 +1664,8 @@ static int prism2_request_hostscan(struc local = iface-local; memset(scan_req, 0, sizeof(scan_req)); - scan_req.channel_list = __constant_cpu_to_le16(local-channel_mask); + scan_req.channel_list = cpu_to_le16(local-channel_mask + local-scan_channel_mask); scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS); if (ssid) { if (ssid_len 32) @@ -1693,7 +1694,8 @@ static int prism2_request_scan(struct ne local = iface-local; memset(scan_req, 0, sizeof(scan_req)); - scan_req.channel_list = __constant_cpu_to_le16(local-channel_mask); + scan_req.channel_list = cpu_to_le16(local-channel_mask + local-scan_channel_mask); scan_req.txrate = __constant_cpu_to_le16(HFA384X_RATES_1MBPS); /* FIX: @@ -2338,6 +2340,10 @@ static const struct iw_priv_args prism2_ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, drop_unencrypte }, { PRISM2_PARAM_DROP_UNENCRYPTED, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, getdrop_unencry }, + { PRISM2_PARAM_SCAN_CHANNEL_MASK, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, scan_channels }, + { PRISM2_PARAM_SCAN_CHANNEL_MASK, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, getscan_channel }, }; @@ -2699,6 +2705,10 @@ static int prism2_ioctl_priv_prism2_para local-drop_unencrypted = value; break; + case PRISM2_PARAM_SCAN_CHANNEL_MASK: + local-scan_channel_mask = value; + break; + default: printk(KERN_DEBUG %s: prism2_param: unknown param %d\n, dev-name, param); @@ -2890,6 +2900,10 @@ static int prism2_ioctl_priv_get_prism2_ *param = local-drop_unencrypted; break; + case PRISM2_PARAM_SCAN_CHANNEL_MASK: + *param = local-scan_channel_mask; + break; + default: printk(KERN_DEBUG %s: get_prism2_param: unknown param %d\n, dev-name, *param); Index: netdev-2.6/drivers/net/wireless/hostap/hostap_wlan.h === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_wlan.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_wlan.h @@ -680,7 +680,8 @@ struct local_info { char essid[MAX_SSID_LEN + 1]; char name[MAX_NAME_LEN + 1]; int name_set; - u16 channel_mask; + u16 channel_mask; /* mask of allowed channels */ + u16 scan_channel_mask; /* mask of channels to be scanned */ struct comm_tallies_sums comm_tallies; struct net_device_stats stats; struct proc_dir_entry *proc; -- -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 10/12] hostap update
From: Brandon Enochs [EMAIL PROTECTED] line 129 of hostap_80211_rx.c should read: LWNG_SETVAL(mactime, 2, 0, 4, rx_stats-mac_time); not: LWNG_SETVAL(mactime, 2, 0, 0, rx_stats-mac_time); The length field is incorrect. Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_80211_rx.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c @@ -123,7 +123,7 @@ int prism2_rx_80211(struct net_device *d hdr-f.did = LWNG_CAP_DID_BASE | (i 12); \ hdr-f.status = s; hdr-f.len = l; hdr-f.data = d LWNG_SETVAL(hosttime, 1, 0, 4, jiffies); - LWNG_SETVAL(mactime, 2, 0, 0, rx_stats-mac_time); + LWNG_SETVAL(mactime, 2, 0, 4, rx_stats-mac_time); LWNG_SETVAL(channel, 3, 1 /* no value */, 4, 0); LWNG_SETVAL(rssi, 4, 1 /* no value */, 4, 0); LWNG_SETVAL(sq, 5, 1 /* no value */, 4, 0); -- -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 08/12] hostap update
Cleaned up scan result processing by converting struct hfa384x_scan_result into struct hfa384x_hostscan_result. This removes special cases from result processing since the results are only used in one, hostscan, format. Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap_info.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_info.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_info.c @@ -160,7 +160,7 @@ static void prism2_host_roaming(local_in { struct hfa384x_join_request req; struct net_device *dev = local-dev; - struct hfa384x_scan_result *selected, *entry; + struct hfa384x_hostscan_result *selected, *entry; int i; unsigned long flags; @@ -244,9 +244,10 @@ static void prism2_info_scanresults(loca int left) { u16 *pos; - int new_count; + int new_count, i; unsigned long flags; - struct hfa384x_scan_result *results, *prev; + struct hfa384x_scan_result *res; + struct hfa384x_hostscan_result *results, *prev; if (left 4) { printk(KERN_DEBUG %s: invalid scanresult info frame @@ -260,11 +261,18 @@ static void prism2_info_scanresults(loca left -= 4; new_count = left / sizeof(struct hfa384x_scan_result); - results = kmalloc(new_count * sizeof(struct hfa384x_scan_result), + results = kmalloc(new_count * sizeof(struct hfa384x_hostscan_result), GFP_ATOMIC); if (results == NULL) return; - memcpy(results, pos, new_count * sizeof(struct hfa384x_scan_result)); + + /* Convert to hostscan result format. */ + res = (struct hfa384x_scan_result *) pos; + for (i = 0; i new_count; i++) { + memcpy(results[i], res[i], + sizeof(struct hfa384x_scan_result)); + results[i].atim = 0; + } spin_lock_irqsave(local-lock, flags); local-last_scan_type = PRISM2_SCAN; @@ -335,9 +343,9 @@ static void prism2_info_hostscanresults( spin_lock_irqsave(local-lock, flags); local-last_scan_type = PRISM2_HOSTSCAN; - prev = local-last_hostscan_results; - local-last_hostscan_results = results; - local-last_hostscan_results_count = new_count; + prev = local-last_scan_results; + local-last_scan_results = results; + local-last_scan_results_count = new_count; spin_unlock_irqrestore(local-lock, flags); kfree(prev); Index: netdev-2.6/drivers/net/wireless/hostap/hostap_ioctl.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_ioctl.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_ioctl.c @@ -663,7 +663,7 @@ static int hostap_join_ap(struct net_dev struct hfa384x_join_request req; unsigned long flags; int i; - struct hfa384x_scan_result *entry; + struct hfa384x_hostscan_result *entry; iface = netdev_priv(dev); local = iface-local; @@ -1795,10 +1795,8 @@ static int prism2_ioctl_siwscan(struct n #ifndef PRISM2_NO_STATION_MODES static char * __prism2_translate_scan(local_info_t *local, - struct hfa384x_scan_result *scan, - struct hfa384x_hostscan_result *hscan, - int hostscan, - struct hostap_bss_info *bss, u8 *bssid, + struct hfa384x_hostscan_result *scan, + struct hostap_bss_info *bss, char *current_ev, char *end_buf) { int i, chan; @@ -1806,17 +1804,18 @@ static char * __prism2_translate_scan(lo char *current_val; u16 capabilities; u8 *pos; - u8 *ssid; + u8 *ssid, *bssid; size_t ssid_len; char *buf; if (bss) { ssid = bss-ssid; ssid_len = bss-ssid_len; + bssid = bss-bssid; } else { - ssid = hostscan ? hscan-ssid : scan-ssid; - ssid_len = le16_to_cpu(hostscan ? hscan-ssid_len : - scan-ssid_len); + ssid = scan-ssid; + ssid_len = le16_to_cpu(scan-ssid_len); + bssid = scan-bssid; } if (ssid_len 32) ssid_len = 32; @@ -1850,8 +1849,7 @@ static char * __prism2_translate_scan(lo if (bss) { capabilities = bss-capab_info; } else { - capabilities = le16_to_cpu(hostscan ? hscan-capability : - scan-capability); + capabilities = le16_to_cpu(scan-capability); } if (capabilities
Re: [patch 2.6.13-rc4 1/15] sis190: resurrection
Applied patches 1-15 to the new 'sis190' branch of netdev-2.6.git. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] PHY Abstraction Layer
applied to 'upstream' branch of netdev-2.6.git. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: skge: ignoring bogus sensor interrups
On Sat, 30 Jul 2005 01:46:13 +0100 Daniel Drake [EMAIL PROTECTED] wrote: Hi, its your favourite bug reporter again ;) A Gentoo user (on CC) has reported many of these messages appearing: skge ignoring bogus sensor interrups They appear so frequently that 3GB of logs are generated in 1 hour of usage. Try this: Index: skge-2.6/drivers/net/skge.c === --- skge-2.6.orig/drivers/net/skge.c2005-07-29 13:07:16.0 -0700 +++ skge-2.6/drivers/net/skge.c 2005-07-30 17:12:35.0 -0700 @@ -2670,18 +2670,6 @@ /* Timestamp (unused) overflow */ if (hwstatus IS_IRQ_TIST_OV) skge_write8(hw, GMAC_TI_ST_CTRL, GMT_ST_CLR_IRQ); - - if (hwstatus IS_IRQ_SENSOR) { - /* no sensors on 32-bit Yukon */ - if (!(skge_read16(hw, B0_CTST) CS_BUS_SLOT_SZ)) { - printk(KERN_ERR PFX ignoring bogus sensor interrups\n); - skge_write32(hw, B0_HWE_IMSK, -IS_ERR_MSK ~IS_IRQ_SENSOR); - } else - printk(KERN_WARNING PFX sensor interrupt\n); - } - - } if (hwstatus IS_RAM_RD_PAR) { @@ -2712,9 +2700,10 @@ skge_pci_clear(hw); + /* if error still set then just ignore it */ hwstatus = skge_read32(hw, B0_HWE_ISRC); if (hwstatus IS_IRQ_STAT) { - printk(KERN_WARNING PFX IRQ status %x: still set ignoring hardware errors\n, + pr_debug(IRQ status %x: still set ignoring hardware errors\n, hwstatus); hw-intr_mask = ~IS_HW_ERR; } @@ -2948,12 +2937,20 @@ else hw-ram_size = t8 * 4096; + hw-intr_mask = IS_HW_ERR | IS_EXT_REG; if (hw-chip_id == CHIP_ID_GENESIS) genesis_init(hw); else { /* switch power to VCC (WA for VAUX problem) */ skge_write8(hw, B0_POWER_CTRL, PC_VAUX_ENA | PC_VCC_ENA | PC_VAUX_OFF | PC_VCC_ON); + /* avoid boards with stuck Hardware error bits */ + if ((skge_read32(hw, B0_ISRC) IS_HW_ERR) + (skge_read32(hw, B0_HWE_ISRC) IS_IRQ_SENSOR)) { + printk(KERN_WARNING PFX stuck hardware sensor bit\n); + hw-intr_mask = ~IS_HW_ERR; + } + for (i = 0; i hw-ports; i++) { skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_CLR); @@ -2994,7 +2991,6 @@ skge_write32(hw, B2_IRQM_INI, skge_usecs2clk(hw, 100)); skge_write32(hw, B2_IRQM_CTRL, TIM_START); - hw-intr_mask = IS_HW_ERR | IS_EXT_REG; skge_write32(hw, B0_IMSK, hw-intr_mask); if (hw-chip_id != CHIP_ID_GENESIS) Index: skge-2.6/drivers/net/skge.h === --- skge-2.6.orig/drivers/net/skge.h2005-07-29 13:07:15.0 -0700 +++ skge-2.6/drivers/net/skge.h 2005-07-30 17:12:18.0 -0700 @@ -214,8 +214,6 @@ /* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */ enum { - IS_ERR_MSK = 0x3fff,/* All Error bits */ - IS_IRQ_TIST_OV = 113, /* Time Stamp Timer Overflow (YUKON only) */ IS_IRQ_SENSOR = 112, /* IRQ from Sensor (YUKON only) */ IS_IRQ_MST_ERR = 111, /* IRQ master error detected */ @@ -230,6 +228,12 @@ IS_M2_PAR_ERR = 12, /* MAC 2 Parity Error */ IS_R1_PAR_ERR = 11, /* Queue R1 Parity Error */ IS_R2_PAR_ERR = 10, /* Queue R2 Parity Error */ + + IS_ERR_MSK = IS_IRQ_MST_ERR | IS_IRQ_STAT + | IS_NO_STAT_M1 | IS_NO_STAT_M2 + | IS_RAM_RD_PAR | IS_RAM_WR_PAR + | IS_M1_PAR_ERR | IS_M2_PAR_ERR + | IS_R1_PAR_ERR | IS_R2_PAR_ERR, }; /* B2_TST_CTRL1 8 bit Test Control Register 1 */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [-mm patch] include/net/ieee80211.h must #include linux/wireless.h
On Wed, Jul 27, 2005 at 09:51:00PM +0200, Adrian Bunk wrote: gcc found an (although perhaps harmless) bug: CC net/ieee80211/ieee80211_crypt.o In file included from net/ieee80211/ieee80211_crypt.c:21: include/net/ieee80211.h:26:5: warning: WIRELESS_EXT is not defined +++ linux-2.6.13-rc3-mm1-full/include/net/ieee80211.h 2005-07-22 18:38:10.0 +0200 +#include linux/wireless.h #if WIRELESS_EXT 17 #define IW_QUAL_QUAL_INVALID 0x10 Wouldn't the proper fix be to just remove this backwards compatibility code since WIRELESS_EXT is actually 18 in this tree anyway.. Is there valid need to keep this header file compatible with older kernel versions? -- Jouni MalinenPGP id EFC895FA - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [-mm patch] include/net/ieee80211.h must #include linux/wireless.h
Jouni Malinen wrote: Wouldn't the proper fix be to just remove this backwards compatibility code since WIRELESS_EXT is actually 18 in this tree anyway.. Is there valid need to keep this header file compatible with older kernel versions? Nope. Ripping out such back-compat code would be quite acceptable. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: raw socket ICMP change buggy
From: Patrick McHardy [EMAIL PROTECTED] Date: Fri, 29 Jul 2005 16:27:02 +0200 I double-checked, but couldn't find any problems in this patch. Do these problems occur with IPv4 or IPv6? False alarm, it turns out it was likely due to some bogus change an x86_64 merge introduced into the -mm tree. Namely they were commenting out the local_irq_{enable,disable}() pair done in __do_softirq(), DOH! My comments about IPV6 raw handling still hold, however :) Yes, changing it to how ip_input handles should fix it. Here's a patch in case you didn't take care of it already. Signed-off-by: Patrick McHardy [EMAIL PROTECTED] Applied, thanks Patrick. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH ieee80211-wifi 1/2] hostap: Start using net/ieee80211.h
Preparations for starting to use net/ieee80211 instead of private IEEE 802.11 implementation. Include net/ieee80211.h and net/ieee80211_crypt.h into files that will be needed these in the future. Remove duplicate definitions from hostap_common.h and rename WLAN_FC_GET_{TYPE,STYPE} macros for now sinc net/ieee80211.h is using incompatible definitions. This will be resolved in the future by updating Host AP to use the versions that do not shift type/stype. Signed-off-by: Jouni Malinen [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/wireless/hostap/hostap.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap.c @@ -26,6 +26,8 @@ #include linux/rtnetlink.h #include linux/wireless.h #include net/iw_handler.h +#include net/ieee80211.h +#include net/ieee80211_crypt.h #include asm/uaccess.h #include hostap_wlan.h @@ -596,7 +598,7 @@ void hostap_dump_rx_header(const char *n fc = __le16_to_cpu(rx-frame_control); printk(KERN_DEBUGFC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x data_len=%d%s%s\n, - fc, WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc), + fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc), __le16_to_cpu(rx-duration_id), __le16_to_cpu(rx-seq_ctrl), __le16_to_cpu(rx-data_len), fc WLAN_FC_TODS ? [ToDS] : , @@ -625,7 +627,7 @@ void hostap_dump_tx_header(const char *n fc = __le16_to_cpu(tx-frame_control); printk(KERN_DEBUGFC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x data_len=%d%s%s\n, - fc, WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc), + fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc), __le16_to_cpu(tx-duration_id), __le16_to_cpu(tx-seq_ctrl), __le16_to_cpu(tx-data_len), fc WLAN_FC_TODS ? [ToDS] : , @@ -668,13 +670,13 @@ int hostap_80211_get_hdrlen(u16 fc) { int hdrlen = 24; - switch (WLAN_FC_GET_TYPE(fc)) { + switch (HOSTAP_FC_GET_TYPE(fc)) { case WLAN_FC_TYPE_DATA: if ((fc WLAN_FC_FROMDS) (fc WLAN_FC_TODS)) hdrlen = 30; /* Addr4 */ break; case WLAN_FC_TYPE_CTRL: - switch (WLAN_FC_GET_STYPE(fc)) { + switch (HOSTAP_FC_GET_STYPE(fc)) { case WLAN_FC_STYPE_CTS: case WLAN_FC_STYPE_ACK: hdrlen = 10; Index: netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_hw.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c @@ -48,9 +48,10 @@ #include linux/rtnetlink.h #include linux/wireless.h #include net/iw_handler.h +#include net/ieee80211.h +#include net/ieee80211_crypt.h #include asm/irq.h - #include hostap_80211.h #include hostap.h #include hostap_ap.h @@ -1890,7 +1891,7 @@ static int prism2_tx_80211(struct sk_buf hdr_len = 24; memcpy(txdesc.frame_control, skb-data, hdr_len); fc = le16_to_cpu(txdesc.frame_control); - if (WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA + if (HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA (fc WLAN_FC_FROMDS) (fc WLAN_FC_TODS) skb-len = 30) { /* Addr4 */ memcpy(txdesc.addr4, skb-data + hdr_len, ETH_ALEN); @@ -2521,10 +2522,10 @@ static void prism2_txexc(local_info_t *l PDEBUG(DEBUG_EXTRA,retry_count=%d tx_rate=%d fc=0x%04x (%s%s%s::%d%s%s)\n, txdesc.retry_count, txdesc.tx_rate, fc, - WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT ? Mgmt : , - WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_CTRL ? Ctrl : , - WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA ? Data : , - WLAN_FC_GET_STYPE(fc), + HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT ? Mgmt : , + HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_CTRL ? Ctrl : , + HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA ? Data : , + HOSTAP_FC_GET_STYPE(fc), fc WLAN_FC_TODS ? ToDS : , fc WLAN_FC_FROMDS ? FromDS : ); PDEBUG(DEBUG_EXTRA,A1= MACSTR A2= MACSTR A3= Index: netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c === --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_80211_rx.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c @@ -21,7 +21,7 @@ void hostap_dump_rx_80211(const char *na fc = le16_to_cpu(hdr-frame_control); printk(KERN_DEBUGFC=0x%04x (type=%d:%d)%s%s, - fc, WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc), + fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc), fc WLAN_FC_TODS ? [ToDS] : , fc
Re: [PATCH] add refcounting and /proc to nfnetlink_queue
From: Harald Welte [EMAIL PROTECTED] Date: Sat, 30 Jul 2005 12:32:26 +0200 [NETFILTER] Add refcounting and /proc/net/netfilter interface to nfnetlink_queue Signed-off-by: Harald Welte [EMAIL PROTECTED] Applied, thanks Harald. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH] convert ebt_ulog to nfnetlink_log
From: Harald Welte [EMAIL PROTECTED] Date: Sat, 30 Jul 2005 13:03:53 +0200 attached is a patch that converts ebt_ulog to use the generic logging mechanism (and thus be able to use the nfnetlink_log backend). This patch breaks userspace compatibility, since the netlink message format of nfnetlink_log is different than the ebt_ulog one. I cannot decide whether that can be done, but at least in the past I had the feeling that nobody is really using ebt_ulog [yet], and thus it might be possible for those few users to directly use libnfnetlink_log (https://svn.netfilter.org/netfilter/trunk/libnfnetlink_log), especially considering that those uerspace apps already breaks since ebt_ulog now uses a different netlink family. I like it, let me know when you'd like me to apply it. Please provide a clean changelog message and the necessary signed-off line when you do so. Thanks. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3][SOCK] Rename __tcp_v4_rehash to __sk_prot_rehash
From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo) Date: Thu, 28 Jul 2005 13:15:23 -0300 Please consider pulling from: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14-2.git All pulled, three comments: 1) Consider renaming sk_setup_caps() to __sk_setup_caps() since it must run with the socket locked. 2) The XXX bug in inet_sk_reselect_saddr() is pretty serious. Although it's been there for ages. Consider trying to take a stab at fixing this. :-) It's not easy, and it hasn't been fixed mostly because the locking is tricky. 3) Please flush your tree with git-prune-packets and git-prune-script. It has a lot of objects in it which are in the pack files now. I've made sure that net-2.6.14 is sane, so a fresh sync from there should get you going. Thanks. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3][SOCK] Rename __tcp_v4_rehash to __sk_prot_rehash
On 7/31/05, David S. Miller [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo) Date: Thu, 28 Jul 2005 13:15:23 -0300 Please consider pulling from: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14-2.git All pulled, three comments: Thanks! 1) Consider renaming sk_setup_caps() to __sk_setup_caps() since it must run with the socket locked. Will do 2) The XXX bug in inet_sk_reselect_saddr() is pretty serious. Although it's been there for ages. Consider trying to take a stab at fixing this. :-) It's not easy, and it hasn't been fixed mostly because the locking is tricky. Hey, most of this stuff is not easy at all, taking notes :) 3) Please flush your tree with git-prune-packets and git-prune-script. It has a lot of objects in it which are in the pack files now. I've made sure that net-2.6.14 is sane, so a fresh sync from there should get you going. Sure thing, I'm no jgarzik, still getting used to this git thingy Thanks. You're welcome - Arnaldo - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH ieee80211-wifi 0/2] hostap: Starting the merge with net/ieee80211
Applied both patches to 'ieee80211-wifi' branch. Your patch format was just fine, too. applymbox (in git/tools) slurped your patches correctly. NOTE: I don't want to push the updated branch to kernel.org just yet, in case Linus pulls [because we don't want to surprise him with unexpected changes]. However, as you would expect, all your future patches should be incremental to the ones you just sent. Thanks! Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.13-rc3-netdev 01/10] skge: silence mac data parity messages
applied patches 1-10 to 'upstream-fixes' branch of netdev-2.6.git - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH REPOST-AGAIN 2.6.13-rc2-git4] bonding: documentation update
applied to 'upstream-fixes' branch of netdev-2.6.git - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Use time_before in hamradio drivers
applied - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/1] drivers/net/pci-skeleton.c: MODULE_PARM - module_param
applied - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 2.6.13-rc1] [1/3] loopback: #ifdef the TSO code
applied patches 1-3 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html