Lines Matching +full:timeout +full:- +full:active +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2021 Gerhard Engleder <gerhard@engleder-embedded.com> */
16 "Enable timeout (offline)",
26 iowrite8(TSNEP_GC_ENABLE_TIMEOUT, adapter->addr + TSNEP_GC); in enable_gc_timeout()
27 if (!(ioread32(adapter->addr + TSNEP_GC) & TSNEP_GC_TIMEOUT_ACTIVE)) in enable_gc_timeout()
35 if (ioread32(adapter->addr + TSNEP_GC) & TSNEP_GC_TIMEOUT_SIGNAL) in gc_timeout_signaled()
43 iowrite8(TSNEP_GC_ENABLE_TIMEOUT, adapter->addr + TSNEP_GC); in ack_gc_timeout()
44 if (ioread32(adapter->addr + TSNEP_GC) & in ack_gc_timeout()
53 u8 active; in enable_gc() local
57 active = TSNEP_GC_ACTIVE_A; in enable_gc()
60 active = TSNEP_GC_ACTIVE_B; in enable_gc()
63 iowrite8(enable, adapter->addr + TSNEP_GC); in enable_gc()
64 if (!(ioread32(adapter->addr + TSNEP_GC) & active)) in enable_gc()
72 iowrite8(TSNEP_GC_DISABLE, adapter->addr + TSNEP_GC); in disable_gc()
73 if (ioread32(adapter->addr + TSNEP_GC) & in disable_gc()
94 /* for start time after timeout, the timeout can guarantee, that enable in gc_delayed_enable()
97 time = ioread32(adapter->addr + ECM_SYSTEM_TIME_LOW); in gc_delayed_enable()
99 iowrite32(time, adapter->addr + TSNEP_GC_TIME); in gc_delayed_enable()
107 /* timeout must have blocked enable */ in gc_delayed_enable()
110 } else if ((after - before) < TSNEP_GC_TIMEOUT * 14 / 16) { in gc_delayed_enable()
111 /* timeout must not have blocked enable */ in gc_delayed_enable()
136 iowrite32(0x80000001, adapter->addr + TSNEP_GCL_A + 0); in tsnep_test_gc_enable()
137 iowrite32(100000, adapter->addr + TSNEP_GCL_A + 4); in tsnep_test_gc_enable()
144 iowrite32(0x80000001, adapter->addr + TSNEP_GCL_B + 0); in tsnep_test_gc_enable()
145 iowrite32(100000, adapter->addr + TSNEP_GCL_B + 4); in tsnep_test_gc_enable()
156 struct tc_taprio_qopt_offload *qopt, s64 ms) in delay_base_time() argument
159 u64 base_time = ktime_to_ns(qopt->base_time); in delay_base_time()
163 system_time += ms * 1000000; in delay_base_time()
164 n = div64_u64(system_time - base_time, qopt->cycle_time); in delay_base_time()
166 qopt->base_time = ktime_add_ns(qopt->base_time, in delay_base_time()
167 (n + 1) * qopt->cycle_time); in delay_base_time()
178 time_high = ioread32(adapter->addr + ECM_SYSTEM_TIME_HIGH); in get_gate_state()
179 *gc_time = ioread32(adapter->addr + TSNEP_GC_TIME); in get_gate_state()
181 time_low = ioread32(adapter->addr + ECM_SYSTEM_TIME_LOW); in get_gate_state()
182 *gc = ioread32(adapter->addr + TSNEP_GC); in get_gate_state()
185 *gc_time = ioread32(adapter->addr + TSNEP_GC_TIME); in get_gate_state()
187 time_high = ioread32(adapter->addr + ECM_SYSTEM_TIME_HIGH); in get_gate_state()
196 u64 n = div64_u64(system_time - gcl->base_time, gcl->cycle_time); in get_operation()
197 u64 cycle_start = gcl->base_time + gcl->cycle_time * n; in get_operation()
201 for (i = 0; i < gcl->count; i++) { in get_operation()
202 *next += gcl->operation[i].interval; in get_operation()
224 curr = &adapter->gcl[0]; in check_gate()
225 prev = &adapter->gcl[1]; in check_gate()
227 curr = &adapter->gcl[1]; in check_gate()
228 prev = &adapter->gcl[0]; in check_gate()
232 if (curr->start_time <= system_time) { in check_gate()
233 /* GCL is already active */ in check_gate()
237 gate_open = curr->operation[index].properties & TSNEP_GCL_MASK; in check_gate()
238 if (index == curr->count - 1) in check_gate()
243 curr->operation[index].properties & TSNEP_GCL_MASK; in check_gate()
244 } else if (curr->change) { in check_gate()
245 /* operation of previous GCL is active */ in check_gate()
251 next_time = curr->start_time; in check_gate()
252 start_before = prev->base_time; in check_gate()
253 n = div64_u64(curr->start_time - start_before, in check_gate()
254 prev->cycle_time); in check_gate()
255 start_before += n * prev->cycle_time; in check_gate()
256 if (curr->start_time == start_before) in check_gate()
257 start_before -= prev->cycle_time; in check_gate()
258 if (((start_before + prev->cycle_time_extension) >= in check_gate()
259 curr->start_time) && in check_gate()
260 (curr->start_time - prev->cycle_time_extension <= in check_gate()
263 index = prev->count - 1; in check_gate()
265 gate_open = prev->operation[index].properties & TSNEP_GCL_MASK; in check_gate()
267 curr->operation[0].properties & TSNEP_GCL_MASK; in check_gate()
270 next_time = curr->start_time; in check_gate()
272 next_gate_open = curr->operation[0].properties & TSNEP_GCL_MASK; in check_gate()
276 dev_err(&adapter->pdev->dev, "gate control time 0x%x!=0x%llx\n", in check_gate()
281 dev_err(&adapter->pdev->dev, in check_gate()
289 dev_err(&adapter->pdev->dev, in check_gate()
299 static bool check_gate_duration(struct tsnep_adapter *adapter, s64 ms) in check_gate_duration() argument
306 } while (ktime_ms_delta(ktime_get(), start) < ms); in check_gate_duration()
312 struct tc_taprio_qopt_offload *qopt, s64 ms) in enable_check_taprio() argument
316 retval = tsnep_tc_setup(adapter->netdev, TC_SETUP_QDISC_TAPRIO, qopt); in enable_check_taprio()
320 if (!check_gate_duration(adapter, ms)) in enable_check_taprio()
333 retval = tsnep_tc_setup(adapter->netdev, TC_SETUP_QDISC_TAPRIO, &qopt); in disable_taprio()
341 struct tc_taprio_qopt_offload *qopt, s64 ms) in run_taprio() argument
343 if (!enable_check_taprio(adapter, qopt, ms)) in run_taprio()
361 qopt->entries[i].command = TC_TAPRIO_CMD_SET_GATES; in tsnep_test_taprio()
363 qopt->cmd = TAPRIO_CMD_REPLACE; in tsnep_test_taprio()
364 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio()
365 qopt->cycle_time = 1500000; in tsnep_test_taprio()
366 qopt->cycle_time_extension = 0; in tsnep_test_taprio()
367 qopt->entries[0].gate_mask = 0x02; in tsnep_test_taprio()
368 qopt->entries[0].interval = 200000; in tsnep_test_taprio()
369 qopt->entries[1].gate_mask = 0x03; in tsnep_test_taprio()
370 qopt->entries[1].interval = 800000; in tsnep_test_taprio()
371 qopt->entries[2].gate_mask = 0x07; in tsnep_test_taprio()
372 qopt->entries[2].interval = 240000; in tsnep_test_taprio()
373 qopt->entries[3].gate_mask = 0x01; in tsnep_test_taprio()
374 qopt->entries[3].interval = 80000; in tsnep_test_taprio()
375 qopt->entries[4].gate_mask = 0x04; in tsnep_test_taprio()
376 qopt->entries[4].interval = 70000; in tsnep_test_taprio()
377 qopt->entries[5].gate_mask = 0x06; in tsnep_test_taprio()
378 qopt->entries[5].interval = 60000; in tsnep_test_taprio()
379 qopt->entries[6].gate_mask = 0x0F; in tsnep_test_taprio()
380 qopt->entries[6].interval = 50000; in tsnep_test_taprio()
381 qopt->num_entries = 7; in tsnep_test_taprio()
385 qopt->cmd = TAPRIO_CMD_REPLACE; in tsnep_test_taprio()
386 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio()
387 qopt->cycle_time = 411854; in tsnep_test_taprio()
388 qopt->cycle_time_extension = 0; in tsnep_test_taprio()
389 qopt->entries[0].gate_mask = 0x17; in tsnep_test_taprio()
390 qopt->entries[0].interval = 23842; in tsnep_test_taprio()
391 qopt->entries[1].gate_mask = 0x16; in tsnep_test_taprio()
392 qopt->entries[1].interval = 13482; in tsnep_test_taprio()
393 qopt->entries[2].gate_mask = 0x15; in tsnep_test_taprio()
394 qopt->entries[2].interval = 49428; in tsnep_test_taprio()
395 qopt->entries[3].gate_mask = 0x14; in tsnep_test_taprio()
396 qopt->entries[3].interval = 38189; in tsnep_test_taprio()
397 qopt->entries[4].gate_mask = 0x13; in tsnep_test_taprio()
398 qopt->entries[4].interval = 92321; in tsnep_test_taprio()
399 qopt->entries[5].gate_mask = 0x12; in tsnep_test_taprio()
400 qopt->entries[5].interval = 71239; in tsnep_test_taprio()
401 qopt->entries[6].gate_mask = 0x11; in tsnep_test_taprio()
402 qopt->entries[6].interval = 69932; in tsnep_test_taprio()
403 qopt->entries[7].gate_mask = 0x10; in tsnep_test_taprio()
404 qopt->entries[7].interval = 53421; in tsnep_test_taprio()
405 qopt->num_entries = 8; in tsnep_test_taprio()
409 qopt->cmd = TAPRIO_CMD_REPLACE; in tsnep_test_taprio()
410 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio()
412 qopt->cycle_time = 125000; in tsnep_test_taprio()
413 qopt->cycle_time_extension = 0; in tsnep_test_taprio()
414 qopt->entries[0].gate_mask = 0x27; in tsnep_test_taprio()
415 qopt->entries[0].interval = 15000; in tsnep_test_taprio()
416 qopt->entries[1].gate_mask = 0x26; in tsnep_test_taprio()
417 qopt->entries[1].interval = 15000; in tsnep_test_taprio()
418 qopt->entries[2].gate_mask = 0x25; in tsnep_test_taprio()
419 qopt->entries[2].interval = 12500; in tsnep_test_taprio()
420 qopt->entries[3].gate_mask = 0x24; in tsnep_test_taprio()
421 qopt->entries[3].interval = 17500; in tsnep_test_taprio()
422 qopt->entries[4].gate_mask = 0x23; in tsnep_test_taprio()
423 qopt->entries[4].interval = 10000; in tsnep_test_taprio()
424 qopt->entries[5].gate_mask = 0x22; in tsnep_test_taprio()
425 qopt->entries[5].interval = 11000; in tsnep_test_taprio()
426 qopt->entries[6].gate_mask = 0x21; in tsnep_test_taprio()
427 qopt->entries[6].interval = 9000; in tsnep_test_taprio()
428 qopt->entries[7].gate_mask = 0x20; in tsnep_test_taprio()
429 qopt->entries[7].interval = 10000; in tsnep_test_taprio()
430 qopt->entries[8].gate_mask = 0x20; in tsnep_test_taprio()
431 qopt->entries[8].interval = 12500; in tsnep_test_taprio()
432 qopt->entries[9].gate_mask = 0x20; in tsnep_test_taprio()
433 qopt->entries[9].interval = 12500; in tsnep_test_taprio()
434 qopt->num_entries = 10; in tsnep_test_taprio()
458 qopt->entries[i].command = TC_TAPRIO_CMD_SET_GATES; in tsnep_test_taprio_change()
460 qopt->cmd = TAPRIO_CMD_REPLACE; in tsnep_test_taprio_change()
461 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
462 qopt->cycle_time = 100000; in tsnep_test_taprio_change()
463 qopt->cycle_time_extension = 0; in tsnep_test_taprio_change()
464 qopt->entries[0].gate_mask = 0x30; in tsnep_test_taprio_change()
465 qopt->entries[0].interval = 20000; in tsnep_test_taprio_change()
466 qopt->entries[1].gate_mask = 0x31; in tsnep_test_taprio_change()
467 qopt->entries[1].interval = 80000; in tsnep_test_taprio_change()
468 qopt->num_entries = 2; in tsnep_test_taprio_change()
480 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
481 qopt->entries[0].gate_mask = 0x42; in tsnep_test_taprio_change()
482 qopt->entries[1].gate_mask = 0x43; in tsnep_test_taprio_change()
486 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
487 qopt->entries[0].gate_mask = 0x54; in tsnep_test_taprio_change()
488 qopt->entries[0].interval = 33333; in tsnep_test_taprio_change()
489 qopt->entries[1].gate_mask = 0x55; in tsnep_test_taprio_change()
490 qopt->entries[1].interval = 66667; in tsnep_test_taprio_change()
494 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
495 qopt->entries[0].gate_mask = 0x66; in tsnep_test_taprio_change()
496 qopt->entries[0].interval = 50000; in tsnep_test_taprio_change()
497 qopt->entries[1].gate_mask = 0x67; in tsnep_test_taprio_change()
498 qopt->entries[1].interval = 25000; in tsnep_test_taprio_change()
499 qopt->entries[2].gate_mask = 0x68; in tsnep_test_taprio_change()
500 qopt->entries[2].interval = 25000; in tsnep_test_taprio_change()
501 qopt->num_entries = 3; in tsnep_test_taprio_change()
507 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
508 qopt->cycle_time = 200000; in tsnep_test_taprio_change()
509 qopt->entries[0].gate_mask = 0x79; in tsnep_test_taprio_change()
510 qopt->entries[0].interval = 50000; in tsnep_test_taprio_change()
511 qopt->entries[1].gate_mask = 0x7A; in tsnep_test_taprio_change()
512 qopt->entries[1].interval = 150000; in tsnep_test_taprio_change()
513 qopt->num_entries = 2; in tsnep_test_taprio_change()
517 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
518 qopt->cycle_time = 1000000; in tsnep_test_taprio_change()
519 qopt->entries[0].gate_mask = 0x7B; in tsnep_test_taprio_change()
520 qopt->entries[0].interval = 125000; in tsnep_test_taprio_change()
521 qopt->entries[1].gate_mask = 0x7C; in tsnep_test_taprio_change()
522 qopt->entries[1].interval = 250000; in tsnep_test_taprio_change()
523 qopt->entries[2].gate_mask = 0x7D; in tsnep_test_taprio_change()
524 qopt->entries[2].interval = 375000; in tsnep_test_taprio_change()
525 qopt->entries[3].gate_mask = 0x7E; in tsnep_test_taprio_change()
526 qopt->entries[3].interval = 250000; in tsnep_test_taprio_change()
527 qopt->num_entries = 4; in tsnep_test_taprio_change()
533 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
534 qopt->cycle_time = 333333; in tsnep_test_taprio_change()
535 qopt->entries[0].gate_mask = 0x8F; in tsnep_test_taprio_change()
536 qopt->entries[0].interval = 166666; in tsnep_test_taprio_change()
537 qopt->entries[1].gate_mask = 0x80; in tsnep_test_taprio_change()
538 qopt->entries[1].interval = 166667; in tsnep_test_taprio_change()
539 qopt->num_entries = 2; in tsnep_test_taprio_change()
543 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
544 qopt->cycle_time = 62500; in tsnep_test_taprio_change()
545 qopt->entries[0].gate_mask = 0x81; in tsnep_test_taprio_change()
546 qopt->entries[0].interval = 31250; in tsnep_test_taprio_change()
547 qopt->entries[1].gate_mask = 0x82; in tsnep_test_taprio_change()
548 qopt->entries[1].interval = 15625; in tsnep_test_taprio_change()
549 qopt->entries[2].gate_mask = 0x83; in tsnep_test_taprio_change()
550 qopt->entries[2].interval = 15625; in tsnep_test_taprio_change()
551 qopt->num_entries = 3; in tsnep_test_taprio_change()
557 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
558 qopt->cycle_time = 400000; in tsnep_test_taprio_change()
559 qopt->entries[0].gate_mask = 0x84; in tsnep_test_taprio_change()
560 qopt->entries[0].interval = 100000; in tsnep_test_taprio_change()
561 qopt->entries[1].gate_mask = 0x85; in tsnep_test_taprio_change()
562 qopt->entries[1].interval = 100000; in tsnep_test_taprio_change()
563 qopt->entries[2].gate_mask = 0x86; in tsnep_test_taprio_change()
564 qopt->entries[2].interval = 100000; in tsnep_test_taprio_change()
565 qopt->entries[3].gate_mask = 0x87; in tsnep_test_taprio_change()
566 qopt->entries[3].interval = 100000; in tsnep_test_taprio_change()
567 qopt->num_entries = 4; in tsnep_test_taprio_change()
571 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_change()
572 qopt->cycle_time = 1700000; in tsnep_test_taprio_change()
573 qopt->entries[0].gate_mask = 0x88; in tsnep_test_taprio_change()
574 qopt->entries[0].interval = 200000; in tsnep_test_taprio_change()
575 qopt->entries[1].gate_mask = 0x89; in tsnep_test_taprio_change()
576 qopt->entries[1].interval = 300000; in tsnep_test_taprio_change()
577 qopt->entries[2].gate_mask = 0x8A; in tsnep_test_taprio_change()
578 qopt->entries[2].interval = 600000; in tsnep_test_taprio_change()
579 qopt->entries[3].gate_mask = 0x8B; in tsnep_test_taprio_change()
580 qopt->entries[3].interval = 100000; in tsnep_test_taprio_change()
581 qopt->entries[4].gate_mask = 0x8C; in tsnep_test_taprio_change()
582 qopt->entries[4].interval = 500000; in tsnep_test_taprio_change()
583 qopt->num_entries = 5; in tsnep_test_taprio_change()
611 qopt->entries[i].command = TC_TAPRIO_CMD_SET_GATES; in tsnep_test_taprio_extension()
613 qopt->cmd = TAPRIO_CMD_REPLACE; in tsnep_test_taprio_extension()
614 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
615 qopt->cycle_time = 100000; in tsnep_test_taprio_extension()
616 qopt->cycle_time_extension = 50000; in tsnep_test_taprio_extension()
617 qopt->entries[0].gate_mask = 0x90; in tsnep_test_taprio_extension()
618 qopt->entries[0].interval = 20000; in tsnep_test_taprio_extension()
619 qopt->entries[1].gate_mask = 0x91; in tsnep_test_taprio_extension()
620 qopt->entries[1].interval = 80000; in tsnep_test_taprio_extension()
621 qopt->num_entries = 2; in tsnep_test_taprio_extension()
626 qopt->base_time = ktime_set(0, 50000); in tsnep_test_taprio_extension()
627 qopt->entries[0].gate_mask = 0x92; in tsnep_test_taprio_extension()
628 qopt->entries[0].interval = 33000; in tsnep_test_taprio_extension()
629 qopt->entries[1].gate_mask = 0x93; in tsnep_test_taprio_extension()
630 qopt->entries[1].interval = 67000; in tsnep_test_taprio_extension()
631 qopt->num_entries = 2; in tsnep_test_taprio_extension()
637 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
638 qopt->cycle_time = 1000000; in tsnep_test_taprio_extension()
639 qopt->cycle_time_extension = 700000; in tsnep_test_taprio_extension()
640 qopt->entries[0].gate_mask = 0x94; in tsnep_test_taprio_extension()
641 qopt->entries[0].interval = 400000; in tsnep_test_taprio_extension()
642 qopt->entries[1].gate_mask = 0x95; in tsnep_test_taprio_extension()
643 qopt->entries[1].interval = 600000; in tsnep_test_taprio_extension()
644 qopt->num_entries = 2; in tsnep_test_taprio_extension()
648 qopt->base_time = ktime_set(0, 700000); in tsnep_test_taprio_extension()
649 qopt->cycle_time = 2000000; in tsnep_test_taprio_extension()
650 qopt->cycle_time_extension = 1900000; in tsnep_test_taprio_extension()
651 qopt->entries[0].gate_mask = 0x96; in tsnep_test_taprio_extension()
652 qopt->entries[0].interval = 400000; in tsnep_test_taprio_extension()
653 qopt->entries[1].gate_mask = 0x97; in tsnep_test_taprio_extension()
654 qopt->entries[1].interval = 1600000; in tsnep_test_taprio_extension()
655 qopt->num_entries = 2; in tsnep_test_taprio_extension()
661 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
662 qopt->cycle_time = 1500000; in tsnep_test_taprio_extension()
663 qopt->cycle_time_extension = 700000; in tsnep_test_taprio_extension()
664 qopt->entries[0].gate_mask = 0x98; in tsnep_test_taprio_extension()
665 qopt->entries[0].interval = 400000; in tsnep_test_taprio_extension()
666 qopt->entries[1].gate_mask = 0x99; in tsnep_test_taprio_extension()
667 qopt->entries[1].interval = 600000; in tsnep_test_taprio_extension()
668 qopt->entries[2].gate_mask = 0x9A; in tsnep_test_taprio_extension()
669 qopt->entries[2].interval = 500000; in tsnep_test_taprio_extension()
670 qopt->num_entries = 3; in tsnep_test_taprio_extension()
674 qopt->base_time = ktime_set(0, 100000); in tsnep_test_taprio_extension()
675 qopt->cycle_time = 500000; in tsnep_test_taprio_extension()
676 qopt->cycle_time_extension = 300000; in tsnep_test_taprio_extension()
677 qopt->entries[0].gate_mask = 0x9B; in tsnep_test_taprio_extension()
678 qopt->entries[0].interval = 150000; in tsnep_test_taprio_extension()
679 qopt->entries[1].gate_mask = 0x9C; in tsnep_test_taprio_extension()
680 qopt->entries[1].interval = 350000; in tsnep_test_taprio_extension()
681 qopt->num_entries = 2; in tsnep_test_taprio_extension()
687 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
688 qopt->cycle_time = 1000000; in tsnep_test_taprio_extension()
689 qopt->cycle_time_extension = 700000; in tsnep_test_taprio_extension()
690 qopt->entries[0].gate_mask = 0xAD; in tsnep_test_taprio_extension()
691 qopt->entries[0].interval = 400000; in tsnep_test_taprio_extension()
692 qopt->entries[1].gate_mask = 0xAE; in tsnep_test_taprio_extension()
693 qopt->entries[1].interval = 300000; in tsnep_test_taprio_extension()
694 qopt->entries[2].gate_mask = 0xAF; in tsnep_test_taprio_extension()
695 qopt->entries[2].interval = 300000; in tsnep_test_taprio_extension()
696 qopt->num_entries = 3; in tsnep_test_taprio_extension()
699 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
700 qopt->cycle_time = 400000; in tsnep_test_taprio_extension()
701 qopt->cycle_time_extension = 100000; in tsnep_test_taprio_extension()
702 qopt->entries[0].gate_mask = 0xA0; in tsnep_test_taprio_extension()
703 qopt->entries[0].interval = 200000; in tsnep_test_taprio_extension()
704 qopt->entries[1].gate_mask = 0xA1; in tsnep_test_taprio_extension()
705 qopt->entries[1].interval = 200000; in tsnep_test_taprio_extension()
706 qopt->num_entries = 2; in tsnep_test_taprio_extension()
710 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
711 qopt->cycle_time = 500000; in tsnep_test_taprio_extension()
712 qopt->cycle_time_extension = 499999; in tsnep_test_taprio_extension()
713 qopt->entries[0].gate_mask = 0xB2; in tsnep_test_taprio_extension()
714 qopt->entries[0].interval = 100000; in tsnep_test_taprio_extension()
715 qopt->entries[1].gate_mask = 0xB3; in tsnep_test_taprio_extension()
716 qopt->entries[1].interval = 100000; in tsnep_test_taprio_extension()
717 qopt->entries[2].gate_mask = 0xB4; in tsnep_test_taprio_extension()
718 qopt->entries[2].interval = 100000; in tsnep_test_taprio_extension()
719 qopt->entries[3].gate_mask = 0xB5; in tsnep_test_taprio_extension()
720 qopt->entries[3].interval = 200000; in tsnep_test_taprio_extension()
721 qopt->num_entries = 4; in tsnep_test_taprio_extension()
725 qopt->base_time = ktime_set(0, 0); in tsnep_test_taprio_extension()
726 qopt->cycle_time = 6000000; in tsnep_test_taprio_extension()
727 qopt->cycle_time_extension = 5999999; in tsnep_test_taprio_extension()
728 qopt->entries[0].gate_mask = 0xC6; in tsnep_test_taprio_extension()
729 qopt->entries[0].interval = 1000000; in tsnep_test_taprio_extension()
730 qopt->entries[1].gate_mask = 0xC7; in tsnep_test_taprio_extension()
731 qopt->entries[1].interval = 1000000; in tsnep_test_taprio_extension()
732 qopt->entries[2].gate_mask = 0xC8; in tsnep_test_taprio_extension()
733 qopt->entries[2].interval = 1000000; in tsnep_test_taprio_extension()
734 qopt->entries[3].gate_mask = 0xC9; in tsnep_test_taprio_extension()
735 qopt->entries[3].interval = 1500000; in tsnep_test_taprio_extension()
736 qopt->entries[4].gate_mask = 0xCA; in tsnep_test_taprio_extension()
737 qopt->entries[4].interval = 1500000; in tsnep_test_taprio_extension()
738 qopt->num_entries = 5; in tsnep_test_taprio_extension()
772 eth_test->len = TSNEP_TEST_COUNT; in tsnep_ethtool_self_test()
774 if (eth_test->flags != ETH_TEST_FL_OFFLINE) { in tsnep_ethtool_self_test()
787 eth_test->flags |= ETH_TEST_FL_FAILED; in tsnep_ethtool_self_test()
794 eth_test->flags |= ETH_TEST_FL_FAILED; in tsnep_ethtool_self_test()
801 eth_test->flags |= ETH_TEST_FL_FAILED; in tsnep_ethtool_self_test()
808 eth_test->flags |= ETH_TEST_FL_FAILED; in tsnep_ethtool_self_test()