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

Configure Feed

Select the types of activity you want to include in your feed.

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:
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup
e1000: add missing length check to e1000 receive routine
forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
Bluetooth: Remove useless flush_work() causing lockdep warnings

+33 -16
+3 -2
drivers/net/e1000/e1000_main.c
··· 4027 4027 PCI_DMA_FROMDEVICE); 4028 4028 4029 4029 length = le16_to_cpu(rx_desc->length); 4030 - 4031 - if (unlikely(!(status & E1000_RXD_STAT_EOP))) { 4030 + /* !EOP means multiple descriptors were used to store a single 4031 + * packet, also make sure the frame isn't just CRC only */ 4032 + if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) { 4032 4033 /* All receives must fit into a single buffer */ 4033 4034 E1000_DBG("%s: Receive packet consumed multiple" 4034 4035 " buffers\n", netdev->name);
+13 -2
drivers/net/forcedeth.c
··· 897 897 }; 898 898 static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; 899 899 900 + /* 901 + * Power down phy when interface is down (persists through reboot; 902 + * older Linux and other OSes may not power it up again) 903 + */ 904 + static int phy_power_down = 0; 905 + 900 906 static inline struct fe_priv *get_nvpriv(struct net_device *dev) 901 907 { 902 908 return netdev_priv(dev); ··· 1491 1485 1492 1486 /* restart auto negotiation, power down phy */ 1493 1487 mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); 1494 - mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE | BMCR_PDOWN); 1488 + mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); 1489 + if (phy_power_down) { 1490 + mii_control |= BMCR_PDOWN; 1491 + } 1495 1492 if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { 1496 1493 return PHY_ERROR; 1497 1494 } ··· 5522 5513 5523 5514 nv_drain_rxtx(dev); 5524 5515 5525 - if (np->wolenabled) { 5516 + if (np->wolenabled || !phy_power_down) { 5526 5517 writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); 5527 5518 nv_start_rx(dev); 5528 5519 } else { ··· 6376 6367 MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); 6377 6368 module_param(phy_cross, int, 0); 6378 6369 MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); 6370 + module_param(phy_power_down, int, 0); 6371 + MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or leave phy powered up (0)."); 6379 6372 6380 6373 MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); 6381 6374 MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver");
-6
net/bluetooth/hci_sysfs.c
··· 90 90 struct hci_conn *conn = container_of(work, struct hci_conn, work_add); 91 91 struct hci_dev *hdev = conn->hdev; 92 92 93 - /* ensure previous del is complete */ 94 - flush_work(&conn->work_del); 95 - 96 93 dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); 97 94 98 95 if (device_add(&conn->dev) < 0) { ··· 114 117 { 115 118 struct hci_conn *conn = container_of(work, struct hci_conn, work_del); 116 119 struct hci_dev *hdev = conn->hdev; 117 - 118 - /* ensure previous add is complete */ 119 - flush_work(&conn->work_add); 120 120 121 121 if (!device_is_registered(&conn->dev)) 122 122 return;
+17 -6
net/sched/cls_api.c
··· 135 135 unsigned long cl; 136 136 unsigned long fh; 137 137 int err; 138 + int tp_created = 0; 138 139 139 140 if (net != &init_net) 140 141 return -EINVAL; ··· 267 266 goto errout; 268 267 } 269 268 270 - spin_lock_bh(root_lock); 271 - tp->next = *back; 272 - *back = tp; 273 - spin_unlock_bh(root_lock); 269 + tp_created = 1; 274 270 275 271 } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) 276 272 goto errout; ··· 294 296 switch (n->nlmsg_type) { 295 297 case RTM_NEWTFILTER: 296 298 err = -EEXIST; 297 - if (n->nlmsg_flags & NLM_F_EXCL) 299 + if (n->nlmsg_flags & NLM_F_EXCL) { 300 + if (tp_created) 301 + tcf_destroy(tp); 298 302 goto errout; 303 + } 299 304 break; 300 305 case RTM_DELTFILTER: 301 306 err = tp->ops->delete(tp, fh); ··· 315 314 } 316 315 317 316 err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh); 318 - if (err == 0) 317 + if (err == 0) { 318 + if (tp_created) { 319 + spin_lock_bh(root_lock); 320 + tp->next = *back; 321 + *back = tp; 322 + spin_unlock_bh(root_lock); 323 + } 319 324 tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); 325 + } else { 326 + if (tp_created) 327 + tcf_destroy(tp); 328 + } 320 329 321 330 errout: 322 331 if (cl)