Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  tcp: Revert 'process defer accept as established' changes.
  ipv6: Fix duplicate initialization of rawv6_prot.destroy
  bnx2x: Updating the Maintainer
  net: Eliminate flush_scheduled_work() calls while RTNL is held.
  drivers/net/r6040.c: correct bad use of round_jiffies()
  fec_mpc52xx: MPC52xx_MESSAGES_DEFAULT: 2nd NETIF_MSG_IFDOWN => IFUP
  ipg: fix receivemode IPG_RM_RECEIVEMULTICAST{,HASH} in ipg_nic_set_multicast_list()
  netfilter: nf_conntrack: fix ctnetlink related crash in nf_nat_setup_info()
  netfilter: Make nflog quiet when no one listen in userspace.
  ipv6: Fail with appropriate error code when setting not-applicable sockopt.
  ipv6: Check IPV6_MULTICAST_LOOP option value.
  ipv6: Check the hop limit setting in ancillary data.
  ipv6 route: Fix route lifetime in netlink message.
  ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
  dccp: Bug in initial acknowledgment number assignment
  dccp ccid-3: X truncated due to type conversion
  dccp ccid-3: TFRC reverse-lookup Bug-Fix
  dccp ccid-2: Bug-Fix - Ack Vectors need to be ignored on request sockets
  dccp: Fix sparse warnings
  dccp ccid-3: Bug-Fix - Zero RTT is possible
  • Loading branch information
torvalds committed Jun 13, 2008
2 parents d36e311 + ec0a196 commit 5155857
Show file tree
Hide file tree
Showing 40 changed files with 130 additions and 228 deletions.
4 changes: 2 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@ L: netdev@vger.kernel.org
S: Supported

BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
P: Eliezer Tamir
M: eliezert@broadcom.com
P: Eilon Greenstein
M: eilong@broadcom.com
L: netdev@vger.kernel.org
S: Supported

Expand Down
9 changes: 1 addition & 8 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5724,14 +5724,12 @@ bnx2_reset_task(struct work_struct *work)
if (!netif_running(bp->dev))
return;

bp->in_reset_task = 1;
bnx2_netif_stop(bp);

bnx2_init_nic(bp);

atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);
bp->in_reset_task = 0;
}

static void
Expand Down Expand Up @@ -5907,12 +5905,7 @@ bnx2_close(struct net_device *dev)
struct bnx2 *bp = netdev_priv(dev);
u32 reset_code;

/* Calling flush_scheduled_work() may deadlock because
* linkwatch_event() may be on the workqueue and it will try to get
* the rtnl_lock which we are holding.
*/
while (bp->in_reset_task)
msleep(1);
cancel_work_sync(&bp->reset_task);

bnx2_disable_int_sync(bp);
bnx2_napi_disable(bp);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6656,7 +6656,6 @@ struct bnx2 {
int current_interval;
struct timer_list timer;
struct work_struct reset_task;
int in_reset_task;

/* Used to synchronize phy accesses. */
spinlock_t phy_lock;
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/bnx2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Written by: Eliezer Tamir <eliezert@broadcom.com>
* Maintained by: Eilon Greenstein <eilong@broadcom.com>
* Written by: Eliezer Tamir
* Based on code from Michael Chan's bnx2 driver
* UDP CSUM errata workaround by Arik Gendelman
* Slowpath rework by Vladislav Zolotarov
Expand Down Expand Up @@ -74,7 +75,7 @@ static char version[] __devinitdata =
"Broadcom NetXtreme II 5771X 10Gigabit Ethernet Driver "
DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";

MODULE_AUTHOR("Eliezer Tamir <eliezert@broadcom.com>");
MODULE_AUTHOR("Eliezer Tamir");
MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710 Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Written by: Eliezer Tamir <eliezert@broadcom.com>
* Maintained by: Eilon Greenstein <eilong@broadcom.com>
* Written by: Eliezer Tamir
* Based on code from Michael Chan's bnx2 driver
*/

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/bnx2x_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Written by: Eliezer Tamir <eliezert@broadcom.com>
* Maintained by: Eilon Greenstein <eilong@broadcom.com>
* Written by: Eliezer Tamir
*/

#ifndef BNX2X_INIT_H
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,8 @@ static int ehea_stop(struct net_device *dev)
if (netif_msg_ifdown(port))
ehea_info("disabling port %s", dev->name);

flush_scheduled_work();
cancel_work_sync(&port->reset_task);

mutex_lock(&port->port_lock);
netif_stop_queue(dev);
port_napi_disable(port);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0);
MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe");

#define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \
NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFDOWN )
NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP)
static int debug = -1; /* the above default */
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "debugging messages level");
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/hamradio/baycom_epp.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ static int epp_close(struct net_device *dev)
unsigned char tmp[1];

bc->work_running = 0;
flush_scheduled_work();
cancel_delayed_work_sync(&bc->run_work);
bc->stat = EPP_DCDBIT;
tmp[0] = 0;
pp->ops->epp_write_addr(pp, tmp, 1, 0);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ static void ipg_nic_set_multicast_list(struct net_device *dev)
/* NIC to be configured in promiscuous mode. */
receivemode = IPG_RM_RECEIVEALLFRAMES;
} else if ((dev->flags & IFF_ALLMULTI) ||
(dev->flags & IFF_MULTICAST &
((dev->flags & IFF_MULTICAST) &&
(dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) {
/* NIC to be configured to receive all multicast
* frames. */
receivemode |= IPG_RM_RECEIVEMULTICAST;
} else if (dev->flags & IFF_MULTICAST & (dev->mc_count > 0)) {
} else if ((dev->flags & IFF_MULTICAST) && (dev->mc_count > 0)) {
/* NIC to be configured to receive selected
* multicast addresses. */
receivemode |= IPG_RM_RECEIVEMULTICASTHASH;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ static void r6040_timer(unsigned long data)
}

/* Timer active again */
mod_timer(&lp->timer, jiffies + round_jiffies(HZ));
mod_timer(&lp->timer, round_jiffies(jiffies + HZ));
}

/* Read/set MAC address routines */
Expand Down
24 changes: 5 additions & 19 deletions drivers/net/smc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ struct smc911x_local {

/* work queue */
struct work_struct phy_configure;
int work_pending;

int tx_throttle;
spinlock_t lock;
Expand Down Expand Up @@ -960,11 +959,11 @@ static void smc911x_phy_configure(struct work_struct *work)
* We should not be called if phy_type is zero.
*/
if (lp->phy_type == 0)
goto smc911x_phy_configure_exit_nolock;
return;

if (smc911x_phy_reset(dev, phyaddr)) {
printk("%s: PHY reset timed out\n", dev->name);
goto smc911x_phy_configure_exit_nolock;
return;
}
spin_lock_irqsave(&lp->lock, flags);

Expand Down Expand Up @@ -1033,8 +1032,6 @@ static void smc911x_phy_configure(struct work_struct *work)

smc911x_phy_configure_exit:
spin_unlock_irqrestore(&lp->lock, flags);
smc911x_phy_configure_exit_nolock:
lp->work_pending = 0;
}

/*
Expand Down Expand Up @@ -1356,11 +1353,8 @@ static void smc911x_timeout(struct net_device *dev)
* smc911x_phy_configure() calls msleep() which calls schedule_timeout()
* which calls schedule(). Hence we use a work queue.
*/
if (lp->phy_type != 0) {
if (schedule_work(&lp->phy_configure)) {
lp->work_pending = 1;
}
}
if (lp->phy_type != 0)
schedule_work(&lp->phy_configure);

/* We can accept TX packets again */
dev->trans_start = jiffies;
Expand Down Expand Up @@ -1531,16 +1525,8 @@ static int smc911x_close(struct net_device *dev)
if (lp->phy_type != 0) {
/* We need to ensure that no calls to
* smc911x_phy_configure are pending.
* flush_scheduled_work() cannot be called because we
* are running with the netlink semaphore held (from
* devinet_ioctl()) and the pending work queue
* contains linkwatch_event() (scheduled by
* netif_carrier_off() above). linkwatch_event() also
* wants the netlink semaphore.
*/
while (lp->work_pending)
schedule();
cancel_work_sync(&lp->phy_configure);
smc911x_phy_powerdown(dev, lp->mii.phy_id);
}

Expand Down
17 changes: 3 additions & 14 deletions drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,15 +1016,8 @@ static void smc_phy_powerdown(struct net_device *dev)

/* We need to ensure that no calls to smc_phy_configure are
pending.
flush_scheduled_work() cannot be called because we are
running with the netlink semaphore held (from
devinet_ioctl()) and the pending work queue contains
linkwatch_event() (scheduled by netif_carrier_off()
above). linkwatch_event() also wants the netlink semaphore.
*/
while(lp->work_pending)
yield();
cancel_work_sync(&lp->phy_configure);

bmcr = smc_phy_read(dev, phy, MII_BMCR);
smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN);
Expand Down Expand Up @@ -1161,7 +1154,6 @@ static void smc_phy_configure(struct work_struct *work)
smc_phy_configure_exit:
SMC_SELECT_BANK(lp, 2);
spin_unlock_irq(&lp->lock);
lp->work_pending = 0;
}

/*
Expand Down Expand Up @@ -1389,11 +1381,8 @@ static void smc_timeout(struct net_device *dev)
* smc_phy_configure() calls msleep() which calls schedule_timeout()
* which calls schedule(). Hence we use a work queue.
*/
if (lp->phy_type != 0) {
if (schedule_work(&lp->phy_configure)) {
lp->work_pending = 1;
}
}
if (lp->phy_type != 0)
schedule_work(&lp->phy_configure);

/* We can accept TX packets again */
dev->trans_start = jiffies;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ static void tulip_down (struct net_device *dev)
void __iomem *ioaddr = tp->base_addr;
unsigned long flags;

flush_scheduled_work();
cancel_work_sync(&tp->media_work);

#ifdef CONFIG_TULIP_NAPI
napi_disable(&tp->napi);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/usb/kaweth.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ static void kaweth_kill_urbs(struct kaweth_device *kaweth)
usb_kill_urb(kaweth->rx_urb);
usb_kill_urb(kaweth->tx_urb);

flush_scheduled_work();
cancel_delayed_work_sync(&kaweth->lowmem_work);

/* a scheduled work may have resubmitted,
we hit them again */
Expand Down
8 changes: 7 additions & 1 deletion drivers/net/wireless/hostap/hostap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,13 @@ static int prism2_close(struct net_device *dev)
netif_device_detach(dev);
}

flush_scheduled_work();
cancel_work_sync(&local->reset_queue);
cancel_work_sync(&local->set_multicast_list_queue);
cancel_work_sync(&local->set_tim_queue);
#ifndef PRISM2_NO_STATION_MODES
cancel_work_sync(&local->info_queue);
#endif
cancel_work_sync(&local->comms_qual_update);

module_put(local->hw_module);

Expand Down
7 changes: 0 additions & 7 deletions include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
return (struct tcp_request_sock *)req;
}

struct tcp_deferred_accept_info {
struct sock *listen_sk;
struct request_sock *request;
};

struct tcp_sock {
/* inet_connection_sock has to be the first member of tcp_sock */
struct inet_connection_sock inet_conn;
Expand Down Expand Up @@ -379,8 +374,6 @@ struct tcp_sock {
unsigned int keepalive_intvl; /* time interval between keep alive probes */
int linger2;

struct tcp_deferred_accept_info defer_tcp_accept;

unsigned long last_synq_overflow;

u32 tso_deferred;
Expand Down
4 changes: 2 additions & 2 deletions include/net/request_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ struct request_sock_queue {
struct request_sock *rskq_accept_head;
struct request_sock *rskq_accept_tail;
rwlock_t syn_wait_lock;
u16 rskq_defer_accept;
/* 2 bytes hole, try to pack */
u8 rskq_defer_accept;
/* 3 bytes hole, try to pack */
struct listen_sock *listen_opt;
};

Expand Down
1 change: 0 additions & 1 deletion include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
#define MAX_TCP_KEEPINTVL 32767
#define MAX_TCP_KEEPCNT 127
#define MAX_TCP_SYNCNT 127
#define MAX_TCP_ACCEPT_DEFERRED 65535

#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */

Expand Down
29 changes: 2 additions & 27 deletions net/dccp/ackvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,

while (1) {
const u8 len = dccp_ackvec_len(av, index);
const u8 state = dccp_ackvec_state(av, index);
const u8 av_state = dccp_ackvec_state(av, index);
/*
* valid packets not yet in av_buf have a reserved
* entry, with a len equal to 0.
*/
if (state == DCCP_ACKVEC_STATE_NOT_RECEIVED &&
if (av_state == DCCP_ACKVEC_STATE_NOT_RECEIVED &&
len == 0 && delta == 0) { /* Found our
reserved seat! */
dccp_pr_debug("Found %llu reserved seat!\n",
Expand Down Expand Up @@ -325,31 +325,6 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
return -EILSEQ;
}

#ifdef CONFIG_IP_DCCP_DEBUG
void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len)
{
dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len,
(unsigned long long)ackno);

while (len--) {
const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6;
const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK;

dccp_pr_debug_cat("%d,%d|", state, rl);
++vector;
}

dccp_pr_debug_cat("\n");
}

void dccp_ackvec_print(const struct dccp_ackvec *av)
{
dccp_ackvector_print(av->av_buf_ackno,
av->av_buf + av->av_buf_head,
av->av_vec_len);
}
#endif

static void dccp_ackvec_throw_record(struct dccp_ackvec *av,
struct dccp_ackvec_record *avr)
{
Expand Down
14 changes: 10 additions & 4 deletions net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp)
} else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld)
- (s64)hctx->ccid3hctx_rtt >= 0) {

hctx->ccid3hctx_x =
max(min(2 * hctx->ccid3hctx_x, min_rate),
hctx->ccid3hctx_x = min(2 * hctx->ccid3hctx_x, min_rate);
hctx->ccid3hctx_x = max(hctx->ccid3hctx_x,
scaled_div(((__u64)hctx->ccid3hctx_s) << 6,
hctx->ccid3hctx_rtt));
hctx->ccid3hctx_t_ld = now;
Expand Down Expand Up @@ -329,8 +329,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
hctx->ccid3hctx_t_ld = now;
} else {
/* Sender does not have RTT sample: X_pps = 1 pkt/sec */
hctx->ccid3hctx_x = hctx->ccid3hctx_s;
/*
* Sender does not have RTT sample:
* - set fallback RTT (RFC 4340, 3.4) since a RTT value
* is needed in several parts (e.g. window counter);
* - set sending rate X_pps = 1pps as per RFC 3448, 4.2.
*/
hctx->ccid3hctx_rtt = DCCP_FALLBACK_RTT;
hctx->ccid3hctx_x = hctx->ccid3hctx_s;
hctx->ccid3hctx_x <<= 6;
}
ccid3_update_send_interval(hctx);
Expand Down
Loading

0 comments on commit 5155857

Please sign in to comment.