Commit 5d54cb1
igb: conditionalize I2C bit banging on external thermal sensor support
Commit a97f878 ("igb: unbreak I2C bit-banging on i350") introduced
code to change I2C settings to bit banging unconditionally.
However, this patch introduced a regression: On an Intel S2600CWR
Server Board with three NICs:
- 1x dual-port copper
Intel I350 Gigabit Network Connection [8086:1521] (rev 01)
fw 1.63, 0x80000dda
- 2x quad-port SFP+ with copper SFP Avago ABCU-5700RZ
Intel I350 Gigabit Fiber Network Connection [8086:1522] (rev 01)
fw 1.52.0
the SFP NICs no longer get link at all. Reverting commit a97f878
or switching to the Intel out-of-tree driver both fix the problem.
Per the igb out-of-tree driver, I2C bit banging on i350 depends on
support for an external thermal sensor (ETS). However, commit
a97f878 added bit banging unconditionally. Additionally, the
out-of-tree driver always calls init_thermal_sensor_thresh on probe,
while our driver only calls init_thermal_sensor_thresh only in
igb_reset(), and only if an ETS is present, ignoring the internal
thermal sensor. The affected SFPs don't provide an ETS. Per Intel,
the behaviour is a result of i350 firmware requirements.
This patch fixes the problem by aligning the behaviour to the
out-of-tree driver:
- split igb_init_i2c() into two functions:
- igb_init_i2c() only performs the basic I2C initialization.
- igb_set_i2c_bb() makes sure that E1000_CTRL_I2C_ENA is set
and enables bit-banging.
- igb_probe() only calls igb_set_i2c_bb() if an ETS is present.
- igb_probe() calls init_thermal_sensor_thresh() unconditionally.
- igb_reset() aligns its behaviour to igb_probe(), i. e., call
igb_set_i2c_bb() if an ETS is present and call
init_thermal_sensor_thresh() unconditionally.
Fixes: a97f878 ("igb: unbreak I2C bit-banging on i350")
Tested-by: Mateusz Palczewski <[email protected]>
Co-developed-by: Jamie Bainbridge <[email protected]>
Signed-off-by: Jamie Bainbridge <[email protected]>
Signed-off-by: Corinna Vinschen <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent dee4bf7 commit 5d54cb1
1 file changed
+32
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
2259 | 2283 | | |
2260 | 2284 | | |
2261 | 2285 | | |
| |||
2400 | 2424 | | |
2401 | 2425 | | |
2402 | 2426 | | |
2403 | | - | |
| 2427 | + | |
| 2428 | + | |
2404 | 2429 | | |
2405 | 2430 | | |
2406 | 2431 | | |
| |||
3117 | 3142 | | |
3118 | 3143 | | |
3119 | 3144 | | |
3120 | | - | |
3121 | 3145 | | |
3122 | | - | |
3123 | 3146 | | |
3124 | 3147 | | |
3125 | 3148 | | |
3126 | 3149 | | |
3127 | 3150 | | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | | - | |
3133 | | - | |
3134 | | - | |
3135 | 3151 | | |
3136 | 3152 | | |
3137 | 3153 | | |
| |||
3521 | 3537 | | |
3522 | 3538 | | |
3523 | 3539 | | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
3524 | 3546 | | |
3525 | 3547 | | |
3526 | 3548 | | |
| |||
0 commit comments