remove CONFIG_MTD_PARTITIONS references from lantiq 3.0 patches
[openwrt.git] / target / linux / generic / patches-2.6.37 / 053-solos-vccs_release.patch
1 commit c031235b395433350f25943b7580a5e343c7b7b2
2 Author: Philip A. Prindeville <philipp@redfish-solutions.com>
3 Date: Wed Mar 30 13:17:04 2011 +0000
4
5 atm/solos-pci: Don't flap VCs when carrier state changes
6
7 Don't flap VCs when carrier state changes; higher-level protocols
8 can detect loss of connectivity and act accordingly. This is more
9 consistent with how other network interfaces work.
10
11 We no longer use release_vccs() so we can delete it.
12
13 release_vccs() was duplicated from net/atm/common.c; make the
14 corresponding function exported, since other code duplicates it
15 and could leverage it if it were public.
16
17 Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>
18 Signed-off-by: David S. Miller <davem@davemloft.net>
19 ---
20 drivers/atm/solos-pci.c | 26 +-------------------------
21 include/linux/atmdev.h | 1 +
22 net/atm/common.c | 1 +
23 3 files changed, 3 insertions(+), 25 deletions(-)
24
25 --- a/drivers/atm/solos-pci.c
26 +++ b/drivers/atm/solos-pci.c
27 @@ -165,7 +165,6 @@ static uint32_t fpga_tx(struct solos_car
28 static irqreturn_t solos_irq(int irq, void *dev_id);
29 static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci);
30 static int list_vccs(int vci);
31 -static void release_vccs(struct atm_dev *dev);
32 static int atm_init(struct solos_card *, struct device *);
33 static void atm_remove(struct solos_card *);
34 static int send_command(struct solos_card *card, int dev, const char *buf, size_t size);
35 @@ -384,7 +383,6 @@ static int process_status(struct solos_c
36 /* Anything but 'Showtime' is down */
37 if (strcmp(state_str, "Showtime")) {
38 atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST);
39 - release_vccs(card->atmdev[port]);
40 dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str);
41 return 0;
42 }
43 @@ -830,28 +828,6 @@ static int list_vccs(int vci)
44 return num_found;
45 }
46
47 -static void release_vccs(struct atm_dev *dev)
48 -{
49 - int i;
50 -
51 - write_lock_irq(&vcc_sklist_lock);
52 - for (i = 0; i < VCC_HTABLE_SIZE; i++) {
53 - struct hlist_head *head = &vcc_hash[i];
54 - struct hlist_node *node, *tmp;
55 - struct sock *s;
56 - struct atm_vcc *vcc;
57 -
58 - sk_for_each_safe(s, node, tmp, head) {
59 - vcc = atm_sk(s);
60 - if (vcc->dev == dev) {
61 - vcc_release_async(vcc, -EPIPE);
62 - sk_del_node_init(s);
63 - }
64 - }
65 - }
66 - write_unlock_irq(&vcc_sklist_lock);
67 -}
68 -
69
70 static int popen(struct atm_vcc *vcc)
71 {
72 @@ -1269,7 +1245,7 @@ static int atm_init(struct solos_card *c
73 card->atmdev[i]->ci_range.vci_bits = 16;
74 card->atmdev[i]->dev_data = card;
75 card->atmdev[i]->phy_data = (void *)(unsigned long)i;
76 - atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_UNKNOWN);
77 + atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_FOUND);
78
79 skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
80 if (!skb) {
81 --- a/include/linux/atmdev.h
82 +++ b/include/linux/atmdev.h
83 @@ -443,6 +443,7 @@ void atm_dev_signal_change(struct atm_de
84
85 void vcc_insert_socket(struct sock *sk);
86
87 +void atm_dev_release_vccs(struct atm_dev *dev);
88
89 /*
90 * This is approximately the algorithm used by alloc_skb.
91 --- a/net/atm/common.c
92 +++ b/net/atm/common.c
93 @@ -252,6 +252,7 @@ void atm_dev_release_vccs(struct atm_dev
94 }
95 write_unlock_irq(&vcc_sklist_lock);
96 }
97 +EXPORT_SYMBOL(atm_dev_release_vccs);
98
99 static int adjust_tp(struct atm_trafprm *tp, unsigned char aal)
100 {
This page took 0.048428 seconds and 5 git commands to generate.