<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/ethernet/intel/igb, branch v4.5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC</title>
<updated>2015-12-15T21:49:58+00:00</updated>
<author>
<name>Tom Herbert</name>
<email>tom@herbertland.com</email>
</author>
<published>2015-12-14T19:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=53692b1de419c1b59106909c7f6b4dd3dbc768ac'/>
<id>53692b1de419c1b59106909c7f6b4dd3dbc768ac</id>
<content type='text'>
The SCTP checksum is really a CRC and is very different from the
standards 1's complement checksum that serves as the checksum
for IP protocols. This offload interface is also very different.
Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these
differences. The term CSUM should be reserved in the stack to refer
to the standard 1's complement IP checksum.

Signed-off-by: Tom Herbert &lt;tom@herbertland.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SCTP checksum is really a CRC and is very different from the
standards 1's complement checksum that serves as the checksum
for IP protocols. This offload interface is also very different.
Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these
differences. The term CSUM should be reserved in the stack to refer
to the standard 1's complement IP checksum.

Signed-off-by: Tom Herbert &lt;tom@herbertland.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: Explicitly label self-test result indices</title>
<updated>2015-12-15T00:07:21+00:00</updated>
<author>
<name>Joe Schultz</name>
<email>jschultz@xes-inc.com</email>
</author>
<published>2015-11-03T18:37:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d602de05934c1d3022b153ff879e81f65df2a7b6'/>
<id>d602de05934c1d3022b153ff879e81f65df2a7b6</id>
<content type='text'>
Previously, the ethtool self-test gstrings/data arrays were accessed via
hardcoded indices, which made the code difficult to follow. This patch
replaces the hardcoded values with enum-based labels.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the ethtool self-test gstrings/data arrays were accessed via
hardcoded indices, which made the code difficult to follow. This patch
replaces the hardcoded values with enum-based labels.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: Improve cable length function for I210, etc.</title>
<updated>2015-12-15T00:04:05+00:00</updated>
<author>
<name>Joe Schultz</name>
<email>jschultz@xes-inc.com</email>
</author>
<published>2015-11-03T18:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3627f8f1d137f6487e51ff1199a54a087a2a6446'/>
<id>3627f8f1d137f6487e51ff1199a54a087a2a6446</id>
<content type='text'>
Previously, the PHY-specific code to get the cable length for the
I210 internal and related PHYs was reporting the cable length of a
single pair and reporting it as the min, max, and total cable length.
Update it so that all four pairs are checked so the true min, max,
and average cable lengths are reported.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the PHY-specific code to get the cable length for the
I210 internal and related PHYs was reporting the cable length of a
single pair and reporting it as the min, max, and total cable length.
Update it so that all four pairs are checked so the true min, max,
and average cable lengths are reported.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: Don't add PHY address to PCDL address</title>
<updated>2015-12-14T23:58:59+00:00</updated>
<author>
<name>Aaron Sierra</name>
<email>asierra@xes-inc.com</email>
</author>
<published>2015-11-03T18:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=06b0dd64923b5598a52de4c889a116c49493bf97'/>
<id>06b0dd64923b5598a52de4c889a116c49493bf97</id>
<content type='text'>
There is no reason to add the PHY address into the PCDL register address.

Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no reason to add the PHY address into the PCDL register address.

Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: Remove GS40G specific defines/functions</title>
<updated>2015-12-14T18:20:06+00:00</updated>
<author>
<name>Aaron Sierra</name>
<email>asierra@xes-inc.com</email>
</author>
<published>2015-11-03T18:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a3cdead8b408351fa1e3079b220fa331480ffbc'/>
<id>2a3cdead8b408351fa1e3079b220fa331480ffbc</id>
<content type='text'>
The I210 internal PHY can be accessed just as well with the access
functions shared by 82580, I350, and I354 devices. A side effect of
relying on the common functions, is that I210 cable length support
is folded back into the common case which effectively reverts the
following commit:

    commit 59f301046b276f87483b3afa3201a4273def06a9
    Author: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
    Date:   Wed Oct 10 04:42:59 2012 +0000

    igb: Update get cable length function for i210/i211

Cc: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The I210 internal PHY can be accessed just as well with the access
functions shared by 82580, I350, and I354 devices. A side effect of
relying on the common functions, is that I210 cable length support
is folded back into the common case which effectively reverts the
following commit:

    commit 59f301046b276f87483b3afa3201a4273def06a9
    Author: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
    Date:   Wed Oct 10 04:42:59 2012 +0000

    igb: Update get cable length function for i210/i211

Cc: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: improve handling of disconnected adapters</title>
<updated>2015-12-13T07:51:26+00:00</updated>
<author>
<name>Jarod Wilson</name>
<email>jarod@redhat.com</email>
</author>
<published>2015-10-19T15:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b06a6909555ffb0140733cc4420222604140b27'/>
<id>7b06a6909555ffb0140733cc4420222604140b27</id>
<content type='text'>
Clean up array_rd32 so that it uses igb_rd32 the same as rd32, per the
suggestion of Alexander Duyck, and use io_addr in more places, so that
we don't have the need to call E1000_REMOVED (which simply looks for a
null hw_addr) nearly as much.

Signed-off-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Acked-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up array_rd32 so that it uses igb_rd32 the same as rd32, per the
suggestion of Alexander Duyck, and use io_addr in more places, so that
we don't have the need to call E1000_REMOVED (which simply looks for a
null hw_addr) nearly as much.

Signed-off-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Acked-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: fix NULL derefs due to skipped SR-IOV enabling</title>
<updated>2015-12-13T07:19:37+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2015-10-19T10:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be06998f96ecb93938ad2cce46c4289bf7cf45bc'/>
<id>be06998f96ecb93938ad2cce46c4289bf7cf45bc</id>
<content type='text'>
The combined effect of commits 6423fc3416 ("igb: do not re-init SR-IOV
during probe") and ceee3450b3 ("igb: make sure SR-IOV init uses the
right number of queues") causes VFs no longer getting set up, leading
to NULL pointer dereferences due to the adapter's -&gt;vf_data being NULL
while -&gt;vfs_allocated_count is non-zero. The first commit not only
neglected the side effect of igb_sriov_reinit() that the second commit
tried to account for, but also that of setting IGB_FLAG_HAS_MSIX,
without which igb_enable_sriov() is effectively a no-op. Calling
igb_{,re}set_interrupt_capability() as done here seems to address this,
but I'm not sure whether this is better than sinply reverting the other
two commits.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The combined effect of commits 6423fc3416 ("igb: do not re-init SR-IOV
during probe") and ceee3450b3 ("igb: make sure SR-IOV init uses the
right number of queues") causes VFs no longer getting set up, leading
to NULL pointer dereferences due to the adapter's -&gt;vf_data being NULL
while -&gt;vfs_allocated_count is non-zero. The first commit not only
neglected the side effect of igb_sriov_reinit() that the second commit
tried to account for, but also that of setting IGB_FLAG_HAS_MSIX,
without which igb_enable_sriov() is effectively a no-op. Calling
igb_{,re}set_interrupt_capability() as done here seems to address this,
but I'm not sure whether this is better than sinply reverting the other
two commits.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: use the correct i210 register for EEMNGCTL</title>
<updated>2015-12-13T07:10:05+00:00</updated>
<author>
<name>Todd Fujinaka</name>
<email>todd.fujinaka@intel.com</email>
</author>
<published>2015-09-18T22:43:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=08c991297582114a6e1220f913eec91789c4eac6'/>
<id>08c991297582114a6e1220f913eec91789c4eac6</id>
<content type='text'>
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.

Reported-by: Roman Hodek &lt;roman.aud@siemens.com&gt;
Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.

Reported-by: Roman Hodek &lt;roman.aud@siemens.com&gt;
Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: don't unmap NULL hw_addr</title>
<updated>2015-12-13T07:09:54+00:00</updated>
<author>
<name>Jarod Wilson</name>
<email>jarod@redhat.com</email>
</author>
<published>2015-09-10T19:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=73bf8048d7c86a20a59d427e55deb1a778e94df7'/>
<id>73bf8048d7c86a20a59d427e55deb1a778e94df7</id>
<content type='text'>
I've got a startech thunderbolt dock someone loaned me, which among other
things, has the following device in it:

08:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

This hotplugs just fine (kernel 4.2.0 plus a patch or two here):

[  863.020315] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.2.18-k
[  863.020316] igb: Copyright (c) 2007-2014 Intel Corporation.
[  863.028657] igb 0000:08:00.0: enabling device (0000 -&gt; 0002)
[  863.062089] igb 0000:08:00.0: added PHC on eth0
[  863.062090] igb 0000:08:00.0: Intel(R) Gigabit Ethernet Network Connection
[  863.062091] igb 0000:08:00.0: eth0: (PCIe:2.5Gb/s:Width x1) e8:ea:6a:00:1b:2a
[  863.062194] igb 0000:08:00.0: eth0: PBA No: 000200-000
[  863.062196] igb 0000:08:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[  863.064889] igb 0000:08:00.0 enp8s0: renamed from eth0

But disconnecting it is another story:

[ 1002.807932] igb 0000:08:00.0: removed PHC on enp8s0
[ 1002.807944] igb 0000:08:00.0 enp8s0: PCIe link lost, device now detached
[ 1003.341141] ------------[ cut here ]------------
[ 1003.341148] WARNING: CPU: 0 PID: 199 at lib/iomap.c:43 bad_io_access+0x38/0x40()
[ 1003.341149] Bad IO access at port 0x0 ()
[ 1003.342767] Modules linked in: snd_usb_audio snd_usbmidi_lib snd_rawmidi igb dca firewire_ohci firewire_core crc_itu_t rfcomm ctr ccm arc4 iwlmvm mac80211 fuse xt_CHECKSUM ipt_MASQUERADE
nf_nat_masquerade_ipv4 tun ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat
nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat
nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter bnep dm_mirror dm_region_hash dm_log dm_mod coretemp x86_pkg_temp_thermal intel_powerclamp kvm_intel snd_hda_codec_hdmi kvm
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel drbg
[ 1003.342793]  ansi_cprng aesni_intel hp_wmi aes_x86_64 iTCO_wdt lrw iTCO_vendor_support ppdev gf128mul sparse_keymap glue_helper ablk_helper cryptd snd_hda_codec_realtek snd_hda_codec_generic
microcode snd_hda_intel uvcvideo iwlwifi snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hda_core videobuf2_core snd_hwdep btusb v4l2_common btrtl snd_seq btbcm btintel videodev cfg80211
snd_seq_device rtsx_pci_ms bluetooth pcspkr input_leds i2c_i801 media parport_pc memstick rfkill sg lpc_ich snd_pcm 8250_fintek parport joydev snd_timer snd soundcore hp_accel ie31200_edac
mei_me lis3lv02d edac_core input_polldev mei hp_wireless shpchp tpm_infineon sch_fq_codel nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables autofs4 xfs libcrc32c sd_mod sr_mod cdrom
rtsx_pci_sdmmc mmc_core crc32c_intel serio_raw rtsx_pci
[ 1003.342822]  nouveau ahci libahci mxm_wmi e1000e xhci_pci hwmon ptp drm_kms_helper pps_core xhci_hcd ttm wmi video ipv6
[ 1003.342839] CPU: 0 PID: 199 Comm: kworker/0:2 Not tainted 4.2.0-2.el7_UNSUPPORTED.x86_64 #1
[ 1003.342840] Hardware name: Hewlett-Packard HP ZBook 15 G2/2253, BIOS M70 Ver. 01.07 02/26/2015
[ 1003.342843] Workqueue: pciehp-3 pciehp_power_thread
[ 1003.342844]  ffffffff81a90655 ffff8804866d3b48 ffffffff8164763a 0000000000000000
[ 1003.342846]  ffff8804866d3b98 ffff8804866d3b88 ffffffff8107134a ffff8804866d3b88
[ 1003.342847]  ffff880486f46000 ffff88046c8a8000 ffff880486f46840 ffff88046c8a8098
[ 1003.342848] Call Trace:
[ 1003.342852]  [&lt;ffffffff8164763a&gt;] dump_stack+0x45/0x57
[ 1003.342855]  [&lt;ffffffff8107134a&gt;] warn_slowpath_common+0x8a/0xc0
[ 1003.342857]  [&lt;ffffffff810713c6&gt;] warn_slowpath_fmt+0x46/0x50
[ 1003.342859]  [&lt;ffffffff8133719e&gt;] ? pci_disable_msix+0x3e/0x50
[ 1003.342860]  [&lt;ffffffff812f6328&gt;] bad_io_access+0x38/0x40
[ 1003.342861]  [&lt;ffffffff812f6567&gt;] pci_iounmap+0x27/0x40
[ 1003.342865]  [&lt;ffffffffa0b728d7&gt;] igb_remove+0xc7/0x160 [igb]
[ 1003.342867]  [&lt;ffffffff8132189f&gt;] pci_device_remove+0x3f/0xc0
[ 1003.342869]  [&lt;ffffffff81433426&gt;] __device_release_driver+0x96/0x130
[ 1003.342870]  [&lt;ffffffff814334e3&gt;] device_release_driver+0x23/0x30
[ 1003.342871]  [&lt;ffffffff8131b404&gt;] pci_stop_bus_device+0x94/0xa0
[ 1003.342872]  [&lt;ffffffff8131b3ad&gt;] pci_stop_bus_device+0x3d/0xa0
[ 1003.342873]  [&lt;ffffffff8131b3ad&gt;] pci_stop_bus_device+0x3d/0xa0
[ 1003.342874]  [&lt;ffffffff8131b516&gt;] pci_stop_and_remove_bus_device+0x16/0x30
[ 1003.342876]  [&lt;ffffffff81333f5b&gt;] pciehp_unconfigure_device+0x9b/0x180
[ 1003.342877]  [&lt;ffffffff81333a73&gt;] pciehp_disable_slot+0x43/0xb0
[ 1003.342878]  [&lt;ffffffff81333b6d&gt;] pciehp_power_thread+0x8d/0xb0
[ 1003.342885]  [&lt;ffffffff810881b2&gt;] process_one_work+0x152/0x3d0
[ 1003.342886]  [&lt;ffffffff8108854a&gt;] worker_thread+0x11a/0x460
[ 1003.342887]  [&lt;ffffffff81088430&gt;] ? process_one_work+0x3d0/0x3d0
[ 1003.342890]  [&lt;ffffffff8108ddd9&gt;] kthread+0xc9/0xe0
[ 1003.342891]  [&lt;ffffffff8108dd10&gt;] ? kthread_create_on_node+0x180/0x180
[ 1003.342893]  [&lt;ffffffff8164e29f&gt;] ret_from_fork+0x3f/0x70
[ 1003.342894]  [&lt;ffffffff8108dd10&gt;] ? kthread_create_on_node+0x180/0x180
[ 1003.342895] ---[ end trace 65a77e06d5aa9358 ]---

Upon looking at the igb driver, I see that igb_rd32() attempted to read from
hw_addr and failed, so it set hw-&gt;hw_addr to NULL and spit out the message
in the log output above, "PCIe link lost, device now detached".

Well, now that hw_addr is NULL, the attempt to call pci_iounmap is obviously
not going to go well. As suggested by Mark Rustad, do something similar to
what ixgbe does, and save a copy of hw_addr as adapter-&gt;io_addr, so we can
still call pci_iounmap on it on teardown. Additionally, for consistency,
make the pci_iomap call assignment directly to io_addr, so map and unmap
match.

Signed-off-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've got a startech thunderbolt dock someone loaned me, which among other
things, has the following device in it:

08:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

This hotplugs just fine (kernel 4.2.0 plus a patch or two here):

[  863.020315] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.2.18-k
[  863.020316] igb: Copyright (c) 2007-2014 Intel Corporation.
[  863.028657] igb 0000:08:00.0: enabling device (0000 -&gt; 0002)
[  863.062089] igb 0000:08:00.0: added PHC on eth0
[  863.062090] igb 0000:08:00.0: Intel(R) Gigabit Ethernet Network Connection
[  863.062091] igb 0000:08:00.0: eth0: (PCIe:2.5Gb/s:Width x1) e8:ea:6a:00:1b:2a
[  863.062194] igb 0000:08:00.0: eth0: PBA No: 000200-000
[  863.062196] igb 0000:08:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[  863.064889] igb 0000:08:00.0 enp8s0: renamed from eth0

But disconnecting it is another story:

[ 1002.807932] igb 0000:08:00.0: removed PHC on enp8s0
[ 1002.807944] igb 0000:08:00.0 enp8s0: PCIe link lost, device now detached
[ 1003.341141] ------------[ cut here ]------------
[ 1003.341148] WARNING: CPU: 0 PID: 199 at lib/iomap.c:43 bad_io_access+0x38/0x40()
[ 1003.341149] Bad IO access at port 0x0 ()
[ 1003.342767] Modules linked in: snd_usb_audio snd_usbmidi_lib snd_rawmidi igb dca firewire_ohci firewire_core crc_itu_t rfcomm ctr ccm arc4 iwlmvm mac80211 fuse xt_CHECKSUM ipt_MASQUERADE
nf_nat_masquerade_ipv4 tun ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat
nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat
nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter bnep dm_mirror dm_region_hash dm_log dm_mod coretemp x86_pkg_temp_thermal intel_powerclamp kvm_intel snd_hda_codec_hdmi kvm
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel drbg
[ 1003.342793]  ansi_cprng aesni_intel hp_wmi aes_x86_64 iTCO_wdt lrw iTCO_vendor_support ppdev gf128mul sparse_keymap glue_helper ablk_helper cryptd snd_hda_codec_realtek snd_hda_codec_generic
microcode snd_hda_intel uvcvideo iwlwifi snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hda_core videobuf2_core snd_hwdep btusb v4l2_common btrtl snd_seq btbcm btintel videodev cfg80211
snd_seq_device rtsx_pci_ms bluetooth pcspkr input_leds i2c_i801 media parport_pc memstick rfkill sg lpc_ich snd_pcm 8250_fintek parport joydev snd_timer snd soundcore hp_accel ie31200_edac
mei_me lis3lv02d edac_core input_polldev mei hp_wireless shpchp tpm_infineon sch_fq_codel nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables autofs4 xfs libcrc32c sd_mod sr_mod cdrom
rtsx_pci_sdmmc mmc_core crc32c_intel serio_raw rtsx_pci
[ 1003.342822]  nouveau ahci libahci mxm_wmi e1000e xhci_pci hwmon ptp drm_kms_helper pps_core xhci_hcd ttm wmi video ipv6
[ 1003.342839] CPU: 0 PID: 199 Comm: kworker/0:2 Not tainted 4.2.0-2.el7_UNSUPPORTED.x86_64 #1
[ 1003.342840] Hardware name: Hewlett-Packard HP ZBook 15 G2/2253, BIOS M70 Ver. 01.07 02/26/2015
[ 1003.342843] Workqueue: pciehp-3 pciehp_power_thread
[ 1003.342844]  ffffffff81a90655 ffff8804866d3b48 ffffffff8164763a 0000000000000000
[ 1003.342846]  ffff8804866d3b98 ffff8804866d3b88 ffffffff8107134a ffff8804866d3b88
[ 1003.342847]  ffff880486f46000 ffff88046c8a8000 ffff880486f46840 ffff88046c8a8098
[ 1003.342848] Call Trace:
[ 1003.342852]  [&lt;ffffffff8164763a&gt;] dump_stack+0x45/0x57
[ 1003.342855]  [&lt;ffffffff8107134a&gt;] warn_slowpath_common+0x8a/0xc0
[ 1003.342857]  [&lt;ffffffff810713c6&gt;] warn_slowpath_fmt+0x46/0x50
[ 1003.342859]  [&lt;ffffffff8133719e&gt;] ? pci_disable_msix+0x3e/0x50
[ 1003.342860]  [&lt;ffffffff812f6328&gt;] bad_io_access+0x38/0x40
[ 1003.342861]  [&lt;ffffffff812f6567&gt;] pci_iounmap+0x27/0x40
[ 1003.342865]  [&lt;ffffffffa0b728d7&gt;] igb_remove+0xc7/0x160 [igb]
[ 1003.342867]  [&lt;ffffffff8132189f&gt;] pci_device_remove+0x3f/0xc0
[ 1003.342869]  [&lt;ffffffff81433426&gt;] __device_release_driver+0x96/0x130
[ 1003.342870]  [&lt;ffffffff814334e3&gt;] device_release_driver+0x23/0x30
[ 1003.342871]  [&lt;ffffffff8131b404&gt;] pci_stop_bus_device+0x94/0xa0
[ 1003.342872]  [&lt;ffffffff8131b3ad&gt;] pci_stop_bus_device+0x3d/0xa0
[ 1003.342873]  [&lt;ffffffff8131b3ad&gt;] pci_stop_bus_device+0x3d/0xa0
[ 1003.342874]  [&lt;ffffffff8131b516&gt;] pci_stop_and_remove_bus_device+0x16/0x30
[ 1003.342876]  [&lt;ffffffff81333f5b&gt;] pciehp_unconfigure_device+0x9b/0x180
[ 1003.342877]  [&lt;ffffffff81333a73&gt;] pciehp_disable_slot+0x43/0xb0
[ 1003.342878]  [&lt;ffffffff81333b6d&gt;] pciehp_power_thread+0x8d/0xb0
[ 1003.342885]  [&lt;ffffffff810881b2&gt;] process_one_work+0x152/0x3d0
[ 1003.342886]  [&lt;ffffffff8108854a&gt;] worker_thread+0x11a/0x460
[ 1003.342887]  [&lt;ffffffff81088430&gt;] ? process_one_work+0x3d0/0x3d0
[ 1003.342890]  [&lt;ffffffff8108ddd9&gt;] kthread+0xc9/0xe0
[ 1003.342891]  [&lt;ffffffff8108dd10&gt;] ? kthread_create_on_node+0x180/0x180
[ 1003.342893]  [&lt;ffffffff8164e29f&gt;] ret_from_fork+0x3f/0x70
[ 1003.342894]  [&lt;ffffffff8108dd10&gt;] ? kthread_create_on_node+0x180/0x180
[ 1003.342895] ---[ end trace 65a77e06d5aa9358 ]---

Upon looking at the igb driver, I see that igb_rd32() attempted to read from
hw_addr and failed, so it set hw-&gt;hw_addr to NULL and spit out the message
in the log output above, "PCIe link lost, device now detached".

Well, now that hw_addr is NULL, the attempt to call pci_iounmap is obviously
not going to go well. As suggested by Mark Rustad, do something similar to
what ixgbe does, and save a copy of hw_addr as adapter-&gt;io_addr, so we can
still call pci_iounmap on it on teardown. Additionally, for consistency,
make the pci_iomap call assignment directly to io_addr, so map and unmap
match.

Signed-off-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: add 88E1543 initialization code</title>
<updated>2015-12-13T07:09:43+00:00</updated>
<author>
<name>Todd Fujinaka</name>
<email>todd.fujinaka@intel.com</email>
</author>
<published>2015-09-02T23:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=18f7ce5412027232890143ccfae23668d0872d27'/>
<id>18f7ce5412027232890143ccfae23668d0872d27</id>
<content type='text'>
Initialize the 88E1543 PHY.

Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initialize the 88E1543 PHY.

Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
