xref: /openbmc/linux/Documentation/networking/device_drivers/atm/cxacru.rst (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1*9633a0e9SJakub Kicinski.. SPDX-License-Identifier: GPL-2.0
2*9633a0e9SJakub Kicinski
3*9633a0e9SJakub Kicinski========================
4*9633a0e9SJakub KicinskiATM cxacru device driver
5*9633a0e9SJakub Kicinski========================
6*9633a0e9SJakub Kicinski
7*9633a0e9SJakub KicinskiFirmware is required for this device: http://accessrunner.sourceforge.net/
8*9633a0e9SJakub Kicinski
9*9633a0e9SJakub KicinskiWhile it is capable of managing/maintaining the ADSL connection without the
10*9633a0e9SJakub Kicinskimodule loaded, the device will sometimes stop responding after unloading the
11*9633a0e9SJakub Kicinskidriver and it is necessary to unplug/remove power to the device to fix this.
12*9633a0e9SJakub Kicinski
13*9633a0e9SJakub KicinskiNote: support for cxacru-cf.bin has been removed. It was not loaded correctly
14*9633a0e9SJakub Kicinskiso it had no effect on the device configuration. Fixing it could have stopped
15*9633a0e9SJakub Kicinskiexisting devices working when an invalid configuration is supplied.
16*9633a0e9SJakub Kicinski
17*9633a0e9SJakub KicinskiThere is a script cxacru-cf.py to convert an existing file to the sysfs form.
18*9633a0e9SJakub Kicinski
19*9633a0e9SJakub KicinskiDetected devices will appear as ATM devices named "cxacru". In /sys/class/atm/
20*9633a0e9SJakub Kicinskithese are directories named cxacruN where N is the device number. A symlink
21*9633a0e9SJakub Kicinskinamed device points to the USB interface device's directory which contains
22*9633a0e9SJakub Kicinskiseveral sysfs attribute files for retrieving device statistics:
23*9633a0e9SJakub Kicinski
24*9633a0e9SJakub Kicinski* adsl_controller_version
25*9633a0e9SJakub Kicinski
26*9633a0e9SJakub Kicinski* adsl_headend
27*9633a0e9SJakub Kicinski* adsl_headend_environment
28*9633a0e9SJakub Kicinski
29*9633a0e9SJakub Kicinski	- Information about the remote headend.
30*9633a0e9SJakub Kicinski
31*9633a0e9SJakub Kicinski* adsl_config
32*9633a0e9SJakub Kicinski
33*9633a0e9SJakub Kicinski	- Configuration writing interface.
34*9633a0e9SJakub Kicinski	- Write parameters in hexadecimal format <index>=<value>,
35*9633a0e9SJakub Kicinski	  separated by whitespace, e.g.:
36*9633a0e9SJakub Kicinski
37*9633a0e9SJakub Kicinski		"1=0 a=5"
38*9633a0e9SJakub Kicinski
39*9633a0e9SJakub Kicinski	- Up to 7 parameters at a time will be sent and the modem will restart
40*9633a0e9SJakub Kicinski	  the ADSL connection when any value is set. These are logged for future
41*9633a0e9SJakub Kicinski	  reference.
42*9633a0e9SJakub Kicinski
43*9633a0e9SJakub Kicinski* downstream_attenuation (dB)
44*9633a0e9SJakub Kicinski* downstream_bits_per_frame
45*9633a0e9SJakub Kicinski* downstream_rate (kbps)
46*9633a0e9SJakub Kicinski* downstream_snr_margin (dB)
47*9633a0e9SJakub Kicinski
48*9633a0e9SJakub Kicinski	- Downstream stats.
49*9633a0e9SJakub Kicinski
50*9633a0e9SJakub Kicinski* upstream_attenuation (dB)
51*9633a0e9SJakub Kicinski* upstream_bits_per_frame
52*9633a0e9SJakub Kicinski* upstream_rate (kbps)
53*9633a0e9SJakub Kicinski* upstream_snr_margin (dB)
54*9633a0e9SJakub Kicinski* transmitter_power (dBm/Hz)
55*9633a0e9SJakub Kicinski
56*9633a0e9SJakub Kicinski	- Upstream stats.
57*9633a0e9SJakub Kicinski
58*9633a0e9SJakub Kicinski* downstream_crc_errors
59*9633a0e9SJakub Kicinski* downstream_fec_errors
60*9633a0e9SJakub Kicinski* downstream_hec_errors
61*9633a0e9SJakub Kicinski* upstream_crc_errors
62*9633a0e9SJakub Kicinski* upstream_fec_errors
63*9633a0e9SJakub Kicinski* upstream_hec_errors
64*9633a0e9SJakub Kicinski
65*9633a0e9SJakub Kicinski	- Error counts.
66*9633a0e9SJakub Kicinski
67*9633a0e9SJakub Kicinski* line_startable
68*9633a0e9SJakub Kicinski
69*9633a0e9SJakub Kicinski	- Indicates that ADSL support on the device
70*9633a0e9SJakub Kicinski	  is/can be enabled, see adsl_start.
71*9633a0e9SJakub Kicinski
72*9633a0e9SJakub Kicinski* line_status
73*9633a0e9SJakub Kicinski
74*9633a0e9SJakub Kicinski	 - "initialising"
75*9633a0e9SJakub Kicinski	 - "down"
76*9633a0e9SJakub Kicinski	 - "attempting to activate"
77*9633a0e9SJakub Kicinski	 - "training"
78*9633a0e9SJakub Kicinski	 - "channel analysis"
79*9633a0e9SJakub Kicinski	 - "exchange"
80*9633a0e9SJakub Kicinski	 - "waiting"
81*9633a0e9SJakub Kicinski	 - "up"
82*9633a0e9SJakub Kicinski
83*9633a0e9SJakub Kicinski	Changes between "down" and "attempting to activate"
84*9633a0e9SJakub Kicinski	if there is no signal.
85*9633a0e9SJakub Kicinski
86*9633a0e9SJakub Kicinski* link_status
87*9633a0e9SJakub Kicinski
88*9633a0e9SJakub Kicinski	 - "not connected"
89*9633a0e9SJakub Kicinski	 - "connected"
90*9633a0e9SJakub Kicinski	 - "lost"
91*9633a0e9SJakub Kicinski
92*9633a0e9SJakub Kicinski* mac_address
93*9633a0e9SJakub Kicinski
94*9633a0e9SJakub Kicinski* modulation
95*9633a0e9SJakub Kicinski
96*9633a0e9SJakub Kicinski	 - "" (when not connected)
97*9633a0e9SJakub Kicinski	 - "ANSI T1.413"
98*9633a0e9SJakub Kicinski	 - "ITU-T G.992.1 (G.DMT)"
99*9633a0e9SJakub Kicinski	 - "ITU-T G.992.2 (G.LITE)"
100*9633a0e9SJakub Kicinski
101*9633a0e9SJakub Kicinski* startup_attempts
102*9633a0e9SJakub Kicinski
103*9633a0e9SJakub Kicinski	- Count of total attempts to initialise ADSL.
104*9633a0e9SJakub Kicinski
105*9633a0e9SJakub KicinskiTo enable/disable ADSL, the following can be written to the adsl_state file:
106*9633a0e9SJakub Kicinski
107*9633a0e9SJakub Kicinski	 - "start"
108*9633a0e9SJakub Kicinski	 - "stop
109*9633a0e9SJakub Kicinski	 - "restart" (stops, waits 1.5s, then starts)
110*9633a0e9SJakub Kicinski	 - "poll" (used to resume status polling if it was disabled due to failure)
111*9633a0e9SJakub Kicinski
112*9633a0e9SJakub KicinskiChanges in adsl/line state are reported via kernel log messages::
113*9633a0e9SJakub Kicinski
114*9633a0e9SJakub Kicinski	[4942145.150704] ATM dev 0: ADSL state: running
115*9633a0e9SJakub Kicinski	[4942243.663766] ATM dev 0: ADSL line: down
116*9633a0e9SJakub Kicinski	[4942249.665075] ATM dev 0: ADSL line: attempting to activate
117*9633a0e9SJakub Kicinski	[4942253.654954] ATM dev 0: ADSL line: training
118*9633a0e9SJakub Kicinski	[4942255.666387] ATM dev 0: ADSL line: channel analysis
119*9633a0e9SJakub Kicinski	[4942259.656262] ATM dev 0: ADSL line: exchange
120*9633a0e9SJakub Kicinski	[2635357.696901] ATM dev 0: ADSL line: up (8128 kb/s down | 832 kb/s up)
121