diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-23 21:41:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-23 21:41:51 -0500 |
commit | 94f5a00d7c37ef8a3f85f8ea29903d4bf2291664 (patch) | |
tree | c25b765601b7b96049736bee8cb4b4da9e751d52 | |
parent | eab99d9b97d136ddfd66af66e0536a58195b3040 (diff) | |
parent | b334349eb4c8562fd60bc8a8bd5ba6b42f22b8ac (diff) |
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:
sis190: scheduling while atomic error
sis190: mdio operation failure is not correctly detected
sis190: remove duplicate INIT_WORK
sis190: add cmos ram access code for the SiS19x/968 chipset pair
[INET]: Fix truesize setting in ip_append_data
[NETNS]: Re-export init_net via EXPORT_SYMBOL.
iwlwifi: fix possible read attempt on ucode that is not available
[IPV4]: Add missing skb->truesize increment in ip_append_page().
[TULIP] DMFE: Fix SROM parsing regression.
[BLUETOOTH]: Move children of connection device to NULL before connection down.
-rw-r--r-- | drivers/net/sis190.c | 21 | ||||
-rw-r--r-- | drivers/net/tulip/dmfe.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 5 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 17 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 3 | ||||
-rw-r--r-- | net/core/net_namespace.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 6 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 4 |
9 files changed, 49 insertions, 20 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 7eab072ae792..b570402f7fed 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -372,7 +372,7 @@ static void __mdio_cmd(void __iomem *ioaddr, u32 ctl) | |||
372 | msleep(1); | 372 | msleep(1); |
373 | } | 373 | } |
374 | 374 | ||
375 | if (i > 999) | 375 | if (i > 99) |
376 | printk(KERN_ERR PFX "PHY command failed !\n"); | 376 | printk(KERN_ERR PFX "PHY command failed !\n"); |
377 | } | 377 | } |
378 | 378 | ||
@@ -847,10 +847,8 @@ static void sis190_soft_reset(void __iomem *ioaddr) | |||
847 | { | 847 | { |
848 | SIS_W32(IntrControl, 0x8000); | 848 | SIS_W32(IntrControl, 0x8000); |
849 | SIS_PCI_COMMIT(); | 849 | SIS_PCI_COMMIT(); |
850 | msleep(1); | ||
851 | SIS_W32(IntrControl, 0x0); | 850 | SIS_W32(IntrControl, 0x0); |
852 | sis190_asic_down(ioaddr); | 851 | sis190_asic_down(ioaddr); |
853 | msleep(1); | ||
854 | } | 852 | } |
855 | 853 | ||
856 | static void sis190_hw_start(struct net_device *dev) | 854 | static void sis190_hw_start(struct net_device *dev) |
@@ -1041,8 +1039,6 @@ static int sis190_open(struct net_device *dev) | |||
1041 | if (rc < 0) | 1039 | if (rc < 0) |
1042 | goto err_free_rx_1; | 1040 | goto err_free_rx_1; |
1043 | 1041 | ||
1044 | INIT_WORK(&tp->phy_task, sis190_phy_task); | ||
1045 | |||
1046 | sis190_request_timer(dev); | 1042 | sis190_request_timer(dev); |
1047 | 1043 | ||
1048 | rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev); | 1044 | rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev); |
@@ -1549,28 +1545,31 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, | |||
1549 | } | 1545 | } |
1550 | 1546 | ||
1551 | /** | 1547 | /** |
1552 | * sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model | 1548 | * sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model |
1553 | * @pdev: PCI device | 1549 | * @pdev: PCI device |
1554 | * @dev: network device to get address for | 1550 | * @dev: network device to get address for |
1555 | * | 1551 | * |
1556 | * SiS965 model, use APC CMOS RAM to store MAC address. | 1552 | * SiS96x model, use APC CMOS RAM to store MAC address. |
1557 | * APC CMOS RAM is accessed through ISA bridge. | 1553 | * APC CMOS RAM is accessed through ISA bridge. |
1558 | * MAC address is read into @net_dev->dev_addr. | 1554 | * MAC address is read into @net_dev->dev_addr. |
1559 | */ | 1555 | */ |
1560 | static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, | 1556 | static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, |
1561 | struct net_device *dev) | 1557 | struct net_device *dev) |
1562 | { | 1558 | { |
1559 | static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 }; | ||
1563 | struct sis190_private *tp = netdev_priv(dev); | 1560 | struct sis190_private *tp = netdev_priv(dev); |
1564 | struct pci_dev *isa_bridge; | 1561 | struct pci_dev *isa_bridge; |
1565 | u8 reg, tmp8; | 1562 | u8 reg, tmp8; |
1566 | int i; | 1563 | unsigned int i; |
1567 | 1564 | ||
1568 | net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n", | 1565 | net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n", |
1569 | pci_name(pdev)); | 1566 | pci_name(pdev)); |
1570 | 1567 | ||
1571 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL); | 1568 | for (i = 0; i < ARRAY_SIZE(ids); i++) { |
1572 | if (!isa_bridge) | 1569 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL); |
1573 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL); | 1570 | if (isa_bridge) |
1571 | break; | ||
1572 | } | ||
1574 | 1573 | ||
1575 | if (!isa_bridge) { | 1574 | if (!isa_bridge) { |
1576 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", | 1575 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index b4891caeae5a..656200472fa1 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -1909,7 +1909,7 @@ static void dmfe_parse_srom(struct dmfe_board_info * db) | |||
1909 | if ( ( (int) srom[18] & 0xff) == SROM_V41_CODE) { | 1909 | if ( ( (int) srom[18] & 0xff) == SROM_V41_CODE) { |
1910 | /* SROM V4.01 */ | 1910 | /* SROM V4.01 */ |
1911 | /* Get NIC support media mode */ | 1911 | /* Get NIC support media mode */ |
1912 | db->NIC_capability = le16_to_cpup((__le16 *)srom + 34/2); | 1912 | db->NIC_capability = le16_to_cpup((__le16 *) (srom + 34)); |
1913 | db->PHY_reg4 = 0; | 1913 | db->PHY_reg4 = 0; |
1914 | for (tmp_reg = 1; tmp_reg < 0x10; tmp_reg <<= 1) { | 1914 | for (tmp_reg = 1; tmp_reg < 0x10; tmp_reg <<= 1) { |
1915 | switch( db->NIC_capability & tmp_reg ) { | 1915 | switch( db->NIC_capability & tmp_reg ) { |
@@ -1921,8 +1921,8 @@ static void dmfe_parse_srom(struct dmfe_board_info * db) | |||
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | /* Media Mode Force or not check */ | 1923 | /* Media Mode Force or not check */ |
1924 | dmfe_mode = le32_to_cpup((__le32 *)srom + 34/4) & | 1924 | dmfe_mode = (le32_to_cpup((__le32 *) (srom + 34)) & |
1925 | le32_to_cpup((__le32 *)srom + 36/4); | 1925 | le32_to_cpup((__le32 *) (srom + 36))); |
1926 | switch(dmfe_mode) { | 1926 | switch(dmfe_mode) { |
1927 | case 0x4: dmfe_media_mode = DMFE_100MHF; break; /* 100MHF */ | 1927 | case 0x4: dmfe_media_mode = DMFE_100MHF; break; /* 100MHF */ |
1928 | case 0x2: dmfe_media_mode = DMFE_10MFD; break; /* 10MFD */ | 1928 | case 0x2: dmfe_media_mode = DMFE_10MFD; break; /* 10MFD */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 1a6b0e0edf6f..0b3ec7e4d93b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6342,6 +6342,11 @@ static int __iwl_up(struct iwl_priv *priv) | |||
6342 | return 0; | 6342 | return 0; |
6343 | } | 6343 | } |
6344 | 6344 | ||
6345 | if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { | ||
6346 | IWL_ERROR("ucode not available for device bringup\n"); | ||
6347 | return -EIO; | ||
6348 | } | ||
6349 | |||
6345 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 6350 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
6346 | 6351 | ||
6347 | rc = iwl_hw_nic_init(priv); | 6352 | rc = iwl_hw_nic_init(priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 6cd57c220631..15a45f471710 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -6698,6 +6698,11 @@ static int __iwl_up(struct iwl_priv *priv) | |||
6698 | return 0; | 6698 | return 0; |
6699 | } | 6699 | } |
6700 | 6700 | ||
6701 | if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { | ||
6702 | IWL_ERROR("ucode not available for device bringup\n"); | ||
6703 | return -EIO; | ||
6704 | } | ||
6705 | |||
6701 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 6706 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
6702 | 6707 | ||
6703 | rc = iwl_hw_nic_init(priv); | 6708 | rc = iwl_hw_nic_init(priv); |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index cad510309dcf..17f7fb720553 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -316,9 +316,26 @@ void hci_conn_add_sysfs(struct hci_conn *conn) | |||
316 | schedule_work(&conn->work); | 316 | schedule_work(&conn->work); |
317 | } | 317 | } |
318 | 318 | ||
319 | static int __match_tty(struct device *dev, void *data) | ||
320 | { | ||
321 | /* The rfcomm tty device will possibly retain even when conn | ||
322 | * is down, and sysfs doesn't support move zombie device, | ||
323 | * so we should move the device before conn device is destroyed. | ||
324 | * Due to the only child device of hci_conn dev is rfcomm | ||
325 | * tty_dev, here just return 1 | ||
326 | */ | ||
327 | return 1; | ||
328 | } | ||
329 | |||
319 | static void del_conn(struct work_struct *work) | 330 | static void del_conn(struct work_struct *work) |
320 | { | 331 | { |
332 | struct device *dev; | ||
321 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | 333 | struct hci_conn *conn = container_of(work, struct hci_conn, work); |
334 | |||
335 | while (dev = device_find_child(&conn->dev, NULL, __match_tty)) { | ||
336 | device_move(dev, NULL); | ||
337 | put_device(dev); | ||
338 | } | ||
322 | device_del(&conn->dev); | 339 | device_del(&conn->dev); |
323 | put_device(&conn->dev); | 340 | put_device(&conn->dev); |
324 | } | 341 | } |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index a6a758dd1f7d..788c70321858 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -696,7 +696,8 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp) | |||
696 | BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc, dev->opened); | 696 | BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc, dev->opened); |
697 | 697 | ||
698 | if (--dev->opened == 0) { | 698 | if (--dev->opened == 0) { |
699 | device_move(dev->tty_dev, NULL); | 699 | if (dev->tty_dev->parent) |
700 | device_move(dev->tty_dev, NULL); | ||
700 | 701 | ||
701 | /* Close DLC and dettach TTY */ | 702 | /* Close DLC and dettach TTY */ |
702 | rfcomm_dlc_close(dev->dlc, 0); | 703 | rfcomm_dlc_close(dev->dlc, 0); |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 383252b50411..ec936ae92458 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -18,7 +18,7 @@ static DEFINE_MUTEX(net_mutex); | |||
18 | LIST_HEAD(net_namespace_list); | 18 | LIST_HEAD(net_namespace_list); |
19 | 19 | ||
20 | struct net init_net; | 20 | struct net init_net; |
21 | EXPORT_SYMBOL_GPL(init_net); | 21 | EXPORT_SYMBOL(init_net); |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * setup_net runs the initializers for the network namespace object. | 24 | * setup_net runs the initializers for the network namespace object. |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index fd99fbd685ea..bc9e57550e86 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -1016,8 +1016,6 @@ alloc_new_skb: | |||
1016 | 1016 | ||
1017 | skb_fill_page_desc(skb, i, page, 0, 0); | 1017 | skb_fill_page_desc(skb, i, page, 0, 0); |
1018 | frag = &skb_shinfo(skb)->frags[i]; | 1018 | frag = &skb_shinfo(skb)->frags[i]; |
1019 | skb->truesize += PAGE_SIZE; | ||
1020 | atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc); | ||
1021 | } else { | 1019 | } else { |
1022 | err = -EMSGSIZE; | 1020 | err = -EMSGSIZE; |
1023 | goto error; | 1021 | goto error; |
@@ -1030,6 +1028,8 @@ alloc_new_skb: | |||
1030 | frag->size += copy; | 1028 | frag->size += copy; |
1031 | skb->len += copy; | 1029 | skb->len += copy; |
1032 | skb->data_len += copy; | 1030 | skb->data_len += copy; |
1031 | skb->truesize += copy; | ||
1032 | atomic_add(copy, &sk->sk_wmem_alloc); | ||
1033 | } | 1033 | } |
1034 | offset += copy; | 1034 | offset += copy; |
1035 | length -= copy; | 1035 | length -= copy; |
@@ -1172,6 +1172,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, | |||
1172 | 1172 | ||
1173 | skb->len += len; | 1173 | skb->len += len; |
1174 | skb->data_len += len; | 1174 | skb->data_len += len; |
1175 | skb->truesize += len; | ||
1176 | atomic_add(len, &sk->sk_wmem_alloc); | ||
1175 | offset += len; | 1177 | offset += len; |
1176 | size -= len; | 1178 | size -= len; |
1177 | } | 1179 | } |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 6338a9c1aa14..3bef30e4a23d 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1316,8 +1316,6 @@ alloc_new_skb: | |||
1316 | 1316 | ||
1317 | skb_fill_page_desc(skb, i, page, 0, 0); | 1317 | skb_fill_page_desc(skb, i, page, 0, 0); |
1318 | frag = &skb_shinfo(skb)->frags[i]; | 1318 | frag = &skb_shinfo(skb)->frags[i]; |
1319 | skb->truesize += PAGE_SIZE; | ||
1320 | atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc); | ||
1321 | } else { | 1319 | } else { |
1322 | err = -EMSGSIZE; | 1320 | err = -EMSGSIZE; |
1323 | goto error; | 1321 | goto error; |
@@ -1330,6 +1328,8 @@ alloc_new_skb: | |||
1330 | frag->size += copy; | 1328 | frag->size += copy; |
1331 | skb->len += copy; | 1329 | skb->len += copy; |
1332 | skb->data_len += copy; | 1330 | skb->data_len += copy; |
1331 | skb->truesize += copy; | ||
1332 | atomic_add(copy, &sk->sk_wmem_alloc); | ||
1333 | } | 1333 | } |
1334 | offset += copy; | 1334 | offset += copy; |
1335 | length -= copy; | 1335 | length -= copy; |