Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
Bluetooth: Fix crash with incoming L2CAP connections
Bluetooth: Fix regression in L2CAP connection procedure
gianfar: rx parser
r6040: only disable RX interrupt if napi_schedule_prep is successful
net: remove NETIF_F_ALL_TX_OFFLOADS
net: sctp: fix checksum marking for outgoing packets

+47 -34
+3 -3
drivers/net/bonding/bond_main.c
··· 1428 1428 return features; 1429 1429 } 1430 1430 1431 - #define BOND_VLAN_FEATURES (NETIF_F_ALL_TX_OFFLOADS | \ 1432 - NETIF_F_SOFT_FEATURES | \ 1433 - NETIF_F_LRO) 1431 + #define BOND_VLAN_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | \ 1432 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ 1433 + NETIF_F_HIGHDMA | NETIF_F_LRO) 1434 1434 1435 1435 static void bond_compute_features(struct bonding *bond) 1436 1436 {
+19 -5
drivers/net/gianfar.c
··· 2289 2289 return 0; 2290 2290 } 2291 2291 2292 + /* Check if rx parser should be activated */ 2293 + void gfar_check_rx_parser_mode(struct gfar_private *priv) 2294 + { 2295 + struct gfar __iomem *regs; 2296 + u32 tempval; 2297 + 2298 + regs = priv->gfargrp[0].regs; 2299 + 2300 + tempval = gfar_read(&regs->rctrl); 2301 + /* If parse is no longer required, then disable parser */ 2302 + if (tempval & RCTRL_REQ_PARSER) 2303 + tempval |= RCTRL_PRSDEP_INIT; 2304 + else 2305 + tempval &= ~RCTRL_PRSDEP_INIT; 2306 + gfar_write(&regs->rctrl, tempval); 2307 + } 2308 + 2292 2309 2293 2310 /* Enables and disables VLAN insertion/extraction */ 2294 2311 static void gfar_vlan_rx_register(struct net_device *dev, ··· 2342 2325 /* Disable VLAN tag extraction */ 2343 2326 tempval = gfar_read(&regs->rctrl); 2344 2327 tempval &= ~RCTRL_VLEX; 2345 - /* If parse is no longer required, then disable parser */ 2346 - if (tempval & RCTRL_REQ_PARSER) 2347 - tempval |= RCTRL_PRSDEP_INIT; 2348 - else 2349 - tempval &= ~RCTRL_PRSDEP_INIT; 2350 2328 gfar_write(&regs->rctrl, tempval); 2329 + 2330 + gfar_check_rx_parser_mode(priv); 2351 2331 } 2352 2332 2353 2333 gfar_change_mtu(dev, dev->mtu);
+2 -1
drivers/net/gianfar.h
··· 274 274 #define RCTRL_PROM 0x00000008 275 275 #define RCTRL_EMEN 0x00000002 276 276 #define RCTRL_REQ_PARSER (RCTRL_VLEX | RCTRL_IPCSEN | \ 277 - RCTRL_TUCSEN) 277 + RCTRL_TUCSEN | RCTRL_FILREN) 278 278 #define RCTRL_CHECKSUMMING (RCTRL_IPCSEN | RCTRL_TUCSEN | \ 279 279 RCTRL_PRSDEP_INIT) 280 280 #define RCTRL_EXTHASH (RCTRL_GHTX) ··· 1156 1156 unsigned long tx_mask, unsigned long rx_mask); 1157 1157 void gfar_init_sysfs(struct net_device *dev); 1158 1158 int gfar_set_features(struct net_device *dev, u32 features); 1159 + extern void gfar_check_rx_parser_mode(struct gfar_private *priv); 1159 1160 1160 1161 extern const struct ethtool_ops gfar_ethtool_ops; 1161 1162
+5 -3
drivers/net/r6040.c
··· 677 677 if (status & RX_FIFO_FULL) 678 678 dev->stats.rx_fifo_errors++; 679 679 680 - /* Mask off RX interrupt */ 681 - misr &= ~RX_INTS; 682 - napi_schedule(&lp->napi); 680 + if (likely(napi_schedule_prep(&lp->napi))) { 681 + /* Mask off RX interrupt */ 682 + misr &= ~RX_INTS; 683 + __napi_schedule(&lp->napi); 684 + } 683 685 } 684 686 685 687 /* TX interrupt request */
-6
include/linux/netdevice.h
··· 1097 1097 #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \ 1098 1098 NETIF_F_FSO) 1099 1099 1100 - #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ 1101 - NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ 1102 - NETIF_F_HIGHDMA | \ 1103 - NETIF_F_SCTP_CSUM | \ 1104 - NETIF_F_ALL_FCOE) 1105 - 1106 1100 /* 1107 1101 * If one device supports one of these features, then enable them 1108 1102 * for all in netdev_increment_features.
+5 -1
net/8021q/vlan_dev.c
··· 528 528 (1<<__LINK_STATE_DORMANT))) | 529 529 (1<<__LINK_STATE_PRESENT); 530 530 531 - dev->hw_features = NETIF_F_ALL_TX_OFFLOADS; 531 + dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | 532 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | 533 + NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | 534 + NETIF_F_ALL_FCOE; 535 + 532 536 dev->features |= real_dev->vlan_features | NETIF_F_LLTX; 533 537 dev->gso_max_size = real_dev->gso_max_size; 534 538
+5 -4
net/bluetooth/l2cap_core.c
··· 620 620 struct sock *parent = bt_sk(sk)->parent; 621 621 rsp.result = cpu_to_le16(L2CAP_CR_PEND); 622 622 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND); 623 - parent->sk_data_ready(parent, 0); 623 + if (parent) 624 + parent->sk_data_ready(parent, 0); 624 625 625 626 } else { 626 627 sk->sk_state = BT_CONFIG; ··· 2324 2323 2325 2324 sk = chan->sk; 2326 2325 2327 - if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) || 2328 - (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) { 2326 + if (sk->sk_state != BT_CONFIG && sk->sk_state != BT_CONNECT2) { 2329 2327 struct l2cap_cmd_rej rej; 2330 2328 2331 2329 rej.reason = cpu_to_le16(0x0002); ··· 4010 4010 struct sock *parent = bt_sk(sk)->parent; 4011 4011 res = L2CAP_CR_PEND; 4012 4012 stat = L2CAP_CS_AUTHOR_PEND; 4013 - parent->sk_data_ready(parent, 0); 4013 + if (parent) 4014 + parent->sk_data_ready(parent, 0); 4014 4015 } else { 4015 4016 sk->sk_state = BT_CONFIG; 4016 4017 res = L2CAP_CR_SUCCESS;
+8 -11
net/sctp/output.c
··· 500 500 * Note: Adler-32 is no longer applicable, as has been replaced 501 501 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. 502 502 */ 503 - if (!sctp_checksum_disable && 504 - !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) { 505 - __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 503 + if (!sctp_checksum_disable) { 504 + if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) { 505 + __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 506 506 507 - /* 3) Put the resultant value into the checksum field in the 508 - * common header, and leave the rest of the bits unchanged. 509 - */ 510 - sh->checksum = sctp_end_cksum(crc32); 511 - } else { 512 - if (dst->dev->features & NETIF_F_SCTP_CSUM) { 507 + /* 3) Put the resultant value into the checksum field in the 508 + * common header, and leave the rest of the bits unchanged. 509 + */ 510 + sh->checksum = sctp_end_cksum(crc32); 511 + } else { 513 512 /* no need to seed pseudo checksum for SCTP */ 514 513 nskb->ip_summed = CHECKSUM_PARTIAL; 515 514 nskb->csum_start = (skb_transport_header(nskb) - 516 515 nskb->head); 517 516 nskb->csum_offset = offsetof(struct sctphdr, checksum); 518 - } else { 519 - nskb->ip_summed = CHECKSUM_UNNECESSARY; 520 517 } 521 518 } 522 519