diff options
author | Philip A. Prindeville <philipp@redfish-solutions.com> | 2011-03-30 09:17:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-30 19:53:38 -0400 |
commit | c031235b395433350f25943b7580a5e343c7b7b2 (patch) | |
tree | 2b00c05104439e9a8bbf6d521b649f2138945b80 /drivers | |
parent | 18b429e74eeafe42e947b1b0f9a760c7153a0b5c (diff) |
atm/solos-pci: Don't flap VCs when carrier state changes
Don't flap VCs when carrier state changes; higher-level protocols
can detect loss of connectivity and act accordingly. This is more
consistent with how other network interfaces work.
We no longer use release_vccs() so we can delete it.
release_vccs() was duplicated from net/atm/common.c; make the
corresponding function exported, since other code duplicates it
and could leverage it if it were public.
Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/solos-pci.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 968f022d141a..cd0ff66469b2 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -165,7 +165,6 @@ static uint32_t fpga_tx(struct solos_card *); | |||
165 | static irqreturn_t solos_irq(int irq, void *dev_id); | 165 | static irqreturn_t solos_irq(int irq, void *dev_id); |
166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); | 166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); |
167 | static int list_vccs(int vci); | 167 | static int list_vccs(int vci); |
168 | static void release_vccs(struct atm_dev *dev); | ||
169 | static int atm_init(struct solos_card *, struct device *); | 168 | static int atm_init(struct solos_card *, struct device *); |
170 | static void atm_remove(struct solos_card *); | 169 | static void atm_remove(struct solos_card *); |
171 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); | 170 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); |
@@ -384,7 +383,6 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
384 | /* Anything but 'Showtime' is down */ | 383 | /* Anything but 'Showtime' is down */ |
385 | if (strcmp(state_str, "Showtime")) { | 384 | if (strcmp(state_str, "Showtime")) { |
386 | atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST); | 385 | atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST); |
387 | release_vccs(card->atmdev[port]); | ||
388 | dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); | 386 | dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); |
389 | return 0; | 387 | return 0; |
390 | } | 388 | } |
@@ -830,28 +828,6 @@ static int list_vccs(int vci) | |||
830 | return num_found; | 828 | return num_found; |
831 | } | 829 | } |
832 | 830 | ||
833 | static void release_vccs(struct atm_dev *dev) | ||
834 | { | ||
835 | int i; | ||
836 | |||
837 | write_lock_irq(&vcc_sklist_lock); | ||
838 | for (i = 0; i < VCC_HTABLE_SIZE; i++) { | ||
839 | struct hlist_head *head = &vcc_hash[i]; | ||
840 | struct hlist_node *node, *tmp; | ||
841 | struct sock *s; | ||
842 | struct atm_vcc *vcc; | ||
843 | |||
844 | sk_for_each_safe(s, node, tmp, head) { | ||
845 | vcc = atm_sk(s); | ||
846 | if (vcc->dev == dev) { | ||
847 | vcc_release_async(vcc, -EPIPE); | ||
848 | sk_del_node_init(s); | ||
849 | } | ||
850 | } | ||
851 | } | ||
852 | write_unlock_irq(&vcc_sklist_lock); | ||
853 | } | ||
854 | |||
855 | 831 | ||
856 | static int popen(struct atm_vcc *vcc) | 832 | static int popen(struct atm_vcc *vcc) |
857 | { | 833 | { |
@@ -1269,7 +1245,7 @@ static int atm_init(struct solos_card *card, struct device *parent) | |||
1269 | card->atmdev[i]->ci_range.vci_bits = 16; | 1245 | card->atmdev[i]->ci_range.vci_bits = 16; |
1270 | card->atmdev[i]->dev_data = card; | 1246 | card->atmdev[i]->dev_data = card; |
1271 | card->atmdev[i]->phy_data = (void *)(unsigned long)i; | 1247 | card->atmdev[i]->phy_data = (void *)(unsigned long)i; |
1272 | atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_UNKNOWN); | 1248 | atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_FOUND); |
1273 | 1249 | ||
1274 | skb = alloc_skb(sizeof(*header), GFP_ATOMIC); | 1250 | skb = alloc_skb(sizeof(*header), GFP_ATOMIC); |
1275 | if (!skb) { | 1251 | if (!skb) { |