summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 14:56:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 14:56:19 -0500
commit5bbcc0f595fadb4cac0eddc4401035ec0bd95b09 (patch)
tree3b65e490cc36a6c6fecac1fa24d9e0ac9ced4455 /drivers/atm
parent892204e06cb9e89fbc4b299a678f9ca358e97cac (diff)
parent50895b9de1d3e0258e015e8e55128d835d9a9f19 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Highlights: 1) Maintain the TCP retransmit queue using an rbtree, with 1GB windows at 100Gb this really has become necessary. From Eric Dumazet. 2) Multi-program support for cgroup+bpf, from Alexei Starovoitov. 3) Perform broadcast flooding in hardware in mv88e6xxx, from Andrew Lunn. 4) Add meter action support to openvswitch, from Andy Zhou. 5) Add a data meta pointer for BPF accessible packets, from Daniel Borkmann. 6) Namespace-ify almost all TCP sysctl knobs, from Eric Dumazet. 7) Turn on Broadcom Tags in b53 driver, from Florian Fainelli. 8) More work to move the RTNL mutex down, from Florian Westphal. 9) Add 'bpftool' utility, to help with bpf program introspection. From Jakub Kicinski. 10) Add new 'cpumap' type for XDP_REDIRECT action, from Jesper Dangaard Brouer. 11) Support 'blocks' of transformations in the packet scheduler which can span multiple network devices, from Jiri Pirko. 12) TC flower offload support in cxgb4, from Kumar Sanghvi. 13) Priority based stream scheduler for SCTP, from Marcelo Ricardo Leitner. 14) Thunderbolt networking driver, from Amir Levy and Mika Westerberg. 15) Add RED qdisc offloadability, and use it in mlxsw driver. From Nogah Frankel. 16) eBPF based device controller for cgroup v2, from Roman Gushchin. 17) Add some fundamental tracepoints for TCP, from Song Liu. 18) Remove garbage collection from ipv6 route layer, this is a significant accomplishment. From Wei Wang. 19) Add multicast route offload support to mlxsw, from Yotam Gigi" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2177 commits) tcp: highest_sack fix geneve: fix fill_info when link down bpf: fix lockdep splat net: cdc_ncm: GetNtbFormat endian fix openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start netem: remove unnecessary 64 bit modulus netem: use 64 bit divide by rate tcp: Namespace-ify sysctl_tcp_default_congestion_control net: Protect iterations over net::fib_notifier_ops in fib_seq_sum() ipv6: set all.accept_dad to 0 by default uapi: fix linux/tls.h userspace compilation error usbnet: ipheth: prevent TX queue timeouts when device not ready vhost_net: conditionally enable tx polling uapi: fix linux/rxrpc.h userspace compilation errors net: stmmac: fix LPI transitioning for dwmac4 atm: horizon: Fix irq release error net-sysfs: trigger netlink notification on ifalias change via sysfs openvswitch: Using kfree_rcu() to simplify the code openvswitch: Make local function ovs_nsh_key_attr_size() static openvswitch: Fix return value check in ovs_meter_cmd_features() ...
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/fore200e.c8
-rw-r--r--drivers/atm/horizon.c2
-rw-r--r--drivers/atm/idt77105.c2
-rw-r--r--drivers/atm/idt77252.c21
-rw-r--r--drivers/atm/idt77252.h3
-rw-r--r--drivers/atm/iphase.c6
-rw-r--r--drivers/atm/suni.c10
7 files changed, 31 insertions, 21 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f8b7e86907cc..126855e6cb7d 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -358,26 +358,33 @@ fore200e_shutdown(struct fore200e* fore200e)
358 case FORE200E_STATE_COMPLETE: 358 case FORE200E_STATE_COMPLETE:
359 kfree(fore200e->stats); 359 kfree(fore200e->stats);
360 360
361 /* fall through */
361 case FORE200E_STATE_IRQ: 362 case FORE200E_STATE_IRQ:
362 free_irq(fore200e->irq, fore200e->atm_dev); 363 free_irq(fore200e->irq, fore200e->atm_dev);
363 364
365 /* fall through */
364 case FORE200E_STATE_ALLOC_BUF: 366 case FORE200E_STATE_ALLOC_BUF:
365 fore200e_free_rx_buf(fore200e); 367 fore200e_free_rx_buf(fore200e);
366 368
369 /* fall through */
367 case FORE200E_STATE_INIT_BSQ: 370 case FORE200E_STATE_INIT_BSQ:
368 fore200e_uninit_bs_queue(fore200e); 371 fore200e_uninit_bs_queue(fore200e);
369 372
373 /* fall through */
370 case FORE200E_STATE_INIT_RXQ: 374 case FORE200E_STATE_INIT_RXQ:
371 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_rxq.status); 375 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_rxq.status);
372 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_rxq.rpd); 376 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_rxq.rpd);
373 377
378 /* fall through */
374 case FORE200E_STATE_INIT_TXQ: 379 case FORE200E_STATE_INIT_TXQ:
375 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_txq.status); 380 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_txq.status);
376 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_txq.tpd); 381 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_txq.tpd);
377 382
383 /* fall through */
378 case FORE200E_STATE_INIT_CMDQ: 384 case FORE200E_STATE_INIT_CMDQ:
379 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_cmdq.status); 385 fore200e->bus->dma_chunk_free(fore200e, &fore200e->host_cmdq.status);
380 386
387 /* fall through */
381 case FORE200E_STATE_INITIALIZE: 388 case FORE200E_STATE_INITIALIZE:
382 /* nothing to do for that state */ 389 /* nothing to do for that state */
383 390
@@ -390,6 +397,7 @@ fore200e_shutdown(struct fore200e* fore200e)
390 case FORE200E_STATE_MAP: 397 case FORE200E_STATE_MAP:
391 fore200e->bus->unmap(fore200e); 398 fore200e->bus->unmap(fore200e);
392 399
400 /* fall through */
393 case FORE200E_STATE_CONFIGURE: 401 case FORE200E_STATE_CONFIGURE:
394 /* nothing to do for that state */ 402 /* nothing to do for that state */
395 403
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 7e76b35f422c..e121b8485731 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -2803,7 +2803,7 @@ out:
2803 return err; 2803 return err;
2804 2804
2805out_free_irq: 2805out_free_irq:
2806 free_irq(dev->irq, dev); 2806 free_irq(irq, dev);
2807out_free: 2807out_free:
2808 kfree(dev); 2808 kfree(dev);
2809out_release: 2809out_release:
diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c
index 57af9fd198e4..909744eb7bab 100644
--- a/drivers/atm/idt77105.c
+++ b/drivers/atm/idt77105.c
@@ -306,11 +306,9 @@ static int idt77105_start(struct atm_dev *dev)
306 if (start_timer) { 306 if (start_timer) {
307 start_timer = 0; 307 start_timer = 0;
308 308
309 setup_timer(&stats_timer, idt77105_stats_timer_func, 0UL);
310 stats_timer.expires = jiffies+IDT77105_STATS_TIMER_PERIOD; 309 stats_timer.expires = jiffies+IDT77105_STATS_TIMER_PERIOD;
311 add_timer(&stats_timer); 310 add_timer(&stats_timer);
312 311
313 setup_timer(&restart_timer, idt77105_restart_timer_func, 0UL);
314 restart_timer.expires = jiffies+IDT77105_RESTART_TIMER_PERIOD; 312 restart_timer.expires = jiffies+IDT77105_RESTART_TIMER_PERIOD;
315 add_timer(&restart_timer); 313 add_timer(&restart_timer);
316 } 314 }
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 47f3c4ae0594..0e3b9c44c808 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -2073,21 +2073,19 @@ idt77252_rate_logindex(struct idt77252_dev *card, int pcr)
2073} 2073}
2074 2074
2075static void 2075static void
2076idt77252_est_timer(unsigned long data) 2076idt77252_est_timer(struct timer_list *t)
2077{ 2077{
2078 struct vc_map *vc = (struct vc_map *)data; 2078 struct rate_estimator *est = from_timer(est, t, timer);
2079 struct vc_map *vc = est->vc;
2079 struct idt77252_dev *card = vc->card; 2080 struct idt77252_dev *card = vc->card;
2080 struct rate_estimator *est;
2081 unsigned long flags; 2081 unsigned long flags;
2082 u32 rate, cps; 2082 u32 rate, cps;
2083 u64 ncells; 2083 u64 ncells;
2084 u8 lacr; 2084 u8 lacr;
2085 2085
2086 spin_lock_irqsave(&vc->lock, flags); 2086 spin_lock_irqsave(&vc->lock, flags);
2087 est = vc->estimator; 2087 if (!vc->estimator)
2088 if (!est)
2089 goto out; 2088 goto out;
2090
2091 ncells = est->cells; 2089 ncells = est->cells;
2092 2090
2093 rate = ((u32)(ncells - est->last_cells)) << (7 - est->interval); 2091 rate = ((u32)(ncells - est->last_cells)) << (7 - est->interval);
@@ -2126,10 +2124,11 @@ idt77252_init_est(struct vc_map *vc, int pcr)
2126 est->maxcps = pcr < 0 ? -pcr : pcr; 2124 est->maxcps = pcr < 0 ? -pcr : pcr;
2127 est->cps = est->maxcps; 2125 est->cps = est->maxcps;
2128 est->avcps = est->cps << 5; 2126 est->avcps = est->cps << 5;
2127 est->vc = vc;
2129 2128
2130 est->interval = 2; /* XXX: make this configurable */ 2129 est->interval = 2; /* XXX: make this configurable */
2131 est->ewma_log = 2; /* XXX: make this configurable */ 2130 est->ewma_log = 2; /* XXX: make this configurable */
2132 setup_timer(&est->timer, idt77252_est_timer, (unsigned long)vc); 2131 timer_setup(&est->timer, idt77252_est_timer, 0);
2133 mod_timer(&est->timer, jiffies + ((HZ / 4) << est->interval)); 2132 mod_timer(&est->timer, jiffies + ((HZ / 4) << est->interval));
2134 2133
2135 return est; 2134 return est;
@@ -2209,16 +2208,20 @@ static int
2209idt77252_init_ubr(struct idt77252_dev *card, struct vc_map *vc, 2208idt77252_init_ubr(struct idt77252_dev *card, struct vc_map *vc,
2210 struct atm_vcc *vcc, struct atm_qos *qos) 2209 struct atm_vcc *vcc, struct atm_qos *qos)
2211{ 2210{
2211 struct rate_estimator *est = NULL;
2212 unsigned long flags; 2212 unsigned long flags;
2213 int tcr; 2213 int tcr;
2214 2214
2215 spin_lock_irqsave(&vc->lock, flags); 2215 spin_lock_irqsave(&vc->lock, flags);
2216 if (vc->estimator) { 2216 if (vc->estimator) {
2217 del_timer(&vc->estimator->timer); 2217 est = vc->estimator;
2218 kfree(vc->estimator);
2219 vc->estimator = NULL; 2218 vc->estimator = NULL;
2220 } 2219 }
2221 spin_unlock_irqrestore(&vc->lock, flags); 2220 spin_unlock_irqrestore(&vc->lock, flags);
2221 if (est) {
2222 del_timer_sync(&est->timer);
2223 kfree(est);
2224 }
2222 2225
2223 tcr = atm_pcr_goal(&qos->txtp); 2226 tcr = atm_pcr_goal(&qos->txtp);
2224 if (tcr == 0) 2227 if (tcr == 0)
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h
index 3a82cc23a053..9339197d701c 100644
--- a/drivers/atm/idt77252.h
+++ b/drivers/atm/idt77252.h
@@ -184,6 +184,8 @@ struct aal1 {
184 unsigned char sequence; 184 unsigned char sequence;
185}; 185};
186 186
187struct vc_map;
188
187struct rate_estimator { 189struct rate_estimator {
188 struct timer_list timer; 190 struct timer_list timer;
189 unsigned int interval; 191 unsigned int interval;
@@ -193,6 +195,7 @@ struct rate_estimator {
193 long avcps; 195 long avcps;
194 u32 cps; 196 u32 cps;
195 u32 maxcps; 197 u32 maxcps;
198 struct vc_map *vc;
196}; 199};
197 200
198struct vc_map { 201struct vc_map {
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index ad6b582c268e..12f646760b68 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -880,7 +880,7 @@ static void ia_phy_write(struct iadev_priv *iadev,
880 880
881static void ia_suni_pm7345_init_ds3(struct iadev_priv *iadev) 881static void ia_suni_pm7345_init_ds3(struct iadev_priv *iadev)
882{ 882{
883 static const struct ia_reg suni_ds3_init [] = { 883 static const struct ia_reg suni_ds3_init[] = {
884 { SUNI_DS3_FRM_INTR_ENBL, 0x17 }, 884 { SUNI_DS3_FRM_INTR_ENBL, 0x17 },
885 { SUNI_DS3_FRM_CFG, 0x01 }, 885 { SUNI_DS3_FRM_CFG, 0x01 },
886 { SUNI_DS3_TRAN_CFG, 0x01 }, 886 { SUNI_DS3_TRAN_CFG, 0x01 },
@@ -898,7 +898,7 @@ static void ia_suni_pm7345_init_ds3(struct iadev_priv *iadev)
898 898
899static void ia_suni_pm7345_init_e3(struct iadev_priv *iadev) 899static void ia_suni_pm7345_init_e3(struct iadev_priv *iadev)
900{ 900{
901 static const struct ia_reg suni_e3_init [] = { 901 static const struct ia_reg suni_e3_init[] = {
902 { SUNI_E3_FRM_FRAM_OPTIONS, 0x04 }, 902 { SUNI_E3_FRM_FRAM_OPTIONS, 0x04 },
903 { SUNI_E3_FRM_MAINT_OPTIONS, 0x20 }, 903 { SUNI_E3_FRM_MAINT_OPTIONS, 0x20 },
904 { SUNI_E3_FRM_FRAM_INTR_ENBL, 0x1d }, 904 { SUNI_E3_FRM_FRAM_INTR_ENBL, 0x1d },
@@ -918,7 +918,7 @@ static void ia_suni_pm7345_init_e3(struct iadev_priv *iadev)
918 918
919static void ia_suni_pm7345_init(struct iadev_priv *iadev) 919static void ia_suni_pm7345_init(struct iadev_priv *iadev)
920{ 920{
921 static const struct ia_reg suni_init [] = { 921 static const struct ia_reg suni_init[] = {
922 /* Enable RSOP loss of signal interrupt. */ 922 /* Enable RSOP loss of signal interrupt. */
923 { SUNI_INTR_ENBL, 0x28 }, 923 { SUNI_INTR_ENBL, 0x28 },
924 /* Clear error counters. */ 924 /* Clear error counters. */
diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c
index b0363149b2fd..b8825f2d79e0 100644
--- a/drivers/atm/suni.c
+++ b/drivers/atm/suni.c
@@ -53,7 +53,7 @@ static DEFINE_SPINLOCK(sunis_lock);
53 if (atomic_read(&stats->s) < 0) atomic_set(&stats->s,INT_MAX); 53 if (atomic_read(&stats->s) < 0) atomic_set(&stats->s,INT_MAX);
54 54
55 55
56static void suni_hz(unsigned long from_timer) 56static void suni_hz(struct timer_list *timer)
57{ 57{
58 struct suni_priv *walk; 58 struct suni_priv *walk;
59 struct atm_dev *dev; 59 struct atm_dev *dev;
@@ -85,7 +85,7 @@ static void suni_hz(unsigned long from_timer)
85 ((GET(TACP_TCC) & 0xff) << 8) | 85 ((GET(TACP_TCC) & 0xff) << 8) |
86 ((GET(TACP_TCCM) & 7) << 16)); 86 ((GET(TACP_TCCM) & 7) << 16));
87 } 87 }
88 if (from_timer) mod_timer(&poll_timer,jiffies+HZ); 88 if (timer) mod_timer(&poll_timer,jiffies+HZ);
89} 89}
90 90
91 91
@@ -322,13 +322,11 @@ static int suni_start(struct atm_dev *dev)
322 printk(KERN_WARNING "%s(itf %d): no signal\n",dev->type, 322 printk(KERN_WARNING "%s(itf %d): no signal\n",dev->type,
323 dev->number); 323 dev->number);
324 PRIV(dev)->loop_mode = ATM_LM_NONE; 324 PRIV(dev)->loop_mode = ATM_LM_NONE;
325 suni_hz(0); /* clear SUNI counters */ 325 suni_hz(NULL); /* clear SUNI counters */
326 (void) fetch_stats(dev,NULL,1); /* clear kernel counters */ 326 (void) fetch_stats(dev,NULL,1); /* clear kernel counters */
327 if (first) { 327 if (first) {
328 init_timer(&poll_timer); 328 timer_setup(&poll_timer, suni_hz, 0);
329 poll_timer.expires = jiffies+HZ; 329 poll_timer.expires = jiffies+HZ;
330 poll_timer.function = suni_hz;
331 poll_timer.data = 1;
332#if 0 330#if 0
333printk(KERN_DEBUG "[u] p=0x%lx,n=0x%lx\n",(unsigned long) poll_timer.list.prev, 331printk(KERN_DEBUG "[u] p=0x%lx,n=0x%lx\n",(unsigned long) poll_timer.list.prev,
334 (unsigned long) poll_timer.list.next); 332 (unsigned long) poll_timer.list.next);