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: (60 commits) [NIU]: Bump driver version and release date. [NIU]: Fix BMAC alternate MAC address indexing. net: fix kernel-doc warnings in header files [IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route. [IPV6]: dst_entry leak in ip4ip6_err. (resend) bluetooth: do not move child device other than rfcomm bluetooth: put hci dev after del conn [NET]: Elminate spurious print_mac() calls. [BLUETOOTH] hci_sysfs.c: Kill build warning. [NET]: Remove MAC_FMT net/8021q/vlan_dev.c: Use print_mac. [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer(). [BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros [IPV6]: Fix hardcoded removing of old module code [NETLABEL]: Move some initialization code into __init section. [NETLABEL]: Shrink the genl-ops registration code. [AX25] ax25_out: check skb for NULL in ax25_kick() [TCP]: Fix tcp_v4_send_synack() comment [IPV4]: fix alignment of IP-Config output Documentation: fix tcp.txt ...
This commit is contained in:
@@ -260,7 +260,6 @@ int hci_conn_del(struct hci_conn *conn)
|
||||
tasklet_enable(&hdev->tx_task);
|
||||
skb_queue_purge(&conn->data_q);
|
||||
hci_conn_del_sysfs(conn);
|
||||
hci_dev_put(hdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
/* Bluetooth HCI core. */
|
||||
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kmod.h>
|
||||
|
||||
@@ -1321,7 +1322,7 @@ static inline void hci_sched_acl(struct hci_dev *hdev)
|
||||
if (!test_bit(HCI_RAW, &hdev->flags)) {
|
||||
/* ACL tx timeout must be longer than maximum
|
||||
* link supervision timeout (40.9 seconds) */
|
||||
if (!hdev->acl_cnt && (jiffies - hdev->acl_last_tx) > (HZ * 45))
|
||||
if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx + HZ * 45))
|
||||
hci_acl_tx_to(hdev);
|
||||
}
|
||||
|
||||
@@ -1543,7 +1544,7 @@ static void hci_cmd_task(unsigned long arg)
|
||||
|
||||
BT_DBG("%s cmd %d", hdev->name, atomic_read(&hdev->cmd_cnt));
|
||||
|
||||
if (!atomic_read(&hdev->cmd_cnt) && (jiffies - hdev->cmd_last_tx) > HZ) {
|
||||
if (!atomic_read(&hdev->cmd_cnt) && time_after(jiffies, hdev->cmd_last_tx + HZ)) {
|
||||
BT_ERR("%s command tx timeout", hdev->name);
|
||||
atomic_set(&hdev->cmd_cnt, 1);
|
||||
}
|
||||
|
@@ -320,28 +320,34 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
|
||||
queue_work(btaddconn, &conn->work);
|
||||
}
|
||||
|
||||
/*
|
||||
* The rfcomm tty device will possibly retain even when conn
|
||||
* is down, and sysfs doesn't support move zombie device,
|
||||
* so we should move the device before conn device is destroyed.
|
||||
*/
|
||||
static int __match_tty(struct device *dev, void *data)
|
||||
{
|
||||
/* The rfcomm tty device will possibly retain even when conn
|
||||
* is down, and sysfs doesn't support move zombie device,
|
||||
* so we should move the device before conn device is destroyed.
|
||||
* Due to the only child device of hci_conn dev is rfcomm
|
||||
* tty_dev, here just return 1
|
||||
*/
|
||||
return 1;
|
||||
return !strncmp(dev->bus_id, "rfcomm", 6);
|
||||
}
|
||||
|
||||
static void del_conn(struct work_struct *work)
|
||||
{
|
||||
struct device *dev;
|
||||
struct hci_conn *conn = container_of(work, struct hci_conn, work);
|
||||
struct hci_dev *hdev = conn->hdev;
|
||||
|
||||
while (dev = device_find_child(&conn->dev, NULL, __match_tty)) {
|
||||
while (1) {
|
||||
struct device *dev;
|
||||
|
||||
dev = device_find_child(&conn->dev, NULL, __match_tty);
|
||||
if (!dev)
|
||||
break;
|
||||
device_move(dev, NULL);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
device_del(&conn->dev);
|
||||
put_device(&conn->dev);
|
||||
hci_dev_put(hdev);
|
||||
}
|
||||
|
||||
void hci_conn_del_sysfs(struct hci_conn *conn)
|
||||
|
Reference in New Issue
Block a user