NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/53903: ixgbe cannot access some PCI registers
The following reply was made to PR kern/53903; it has been noted by GNATS.
From: MAEKAWA Masahide <maekawa%daemon-systems.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/53903: ixgbe cannot access some PCI registers
Date: Wed, 6 Feb 2019 16:33:31 +0900
This issue that enabled "Above 4G Decoding" on MicroServer Gen10 will cause some troubles with FreeBSD/Ubuntu, too.
Please close this PR once.
When I have any progress, I'll reopen it.
Thank you.
On 2019/01/25 14:08, Masanobu SAITOH wrote:
> On 2019/01/24 12:10, Masanobu SAITOH wrote:
>> The following reply was made to PR kern/53903; it has been noted by GNATS.
>>
>> From: Masanobu SAITOH <msaitoh%execsw.org@localhost>
>> To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
>> Â gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
>> Cc: msaitoh%execsw.org@localhost
>> Subject: Re: kern/53903: ixgbe cannot access some PCI registers
>> Date: Thu, 24 Jan 2019 12:07:41 +0900
>>
>> Â On 2019/01/23 23:05, maekawa%daemon-systems.org@localhost wrote:
>> Â >> Number:Â Â Â Â Â Â Â Â 53903
>> Â >> Category:Â Â Â Â Â Â kern
>> Â >> Synopsis:Â Â Â Â Â Â ixgbe cannot access some PCI registers
>> Â >> Confidential:Â Â no
>> Â >> Severity:Â Â Â Â Â Â serious
>> Â >> Priority:Â Â Â Â Â Â medium
>> Â >> Responsible:Â Â Â kern-bug-people
>> Â >> State:Â Â Â Â Â Â Â Â Â open
>> Â >> Class:Â Â Â Â Â Â Â Â Â sw-bug
>> Â >> Submitter-Id:Â Â net
>> Â >> Arrival-Date:Â Â Wed Jan 23 14:05:01 +0000 2019
>> Â >> Originator:Â Â Â Â MAEKAWA Masahide
>> Â >> Release:Â Â Â Â Â Â Â 8.99.31
>> Â >> Organization:
>> Â > M-Systems, Inc.
>> Â >> Environment:
>> Â > NetBSD hpegen10.daemon-systems.org 8.99.31 NetBSD 8.99.31 (GENERIC) #0: Wed Jan 23 21:59:19 JST 2019Â maekawa%kerberos.daemon-systems.org@localhost:/home/release/objs/sys/arch/amd64/compile/GENERIC amd64
>> Â >> Description:
>> Â > X540-T1 doesn't work on MicroServer Gen10 when "UEFI only", enabling "Above 4G Decoding" in setup menu.
>> Â > When disable "Above 4G Decoding", ixg(4) is attached normaly.
>> Â >
>> Â > Full dmesg is : https://www.daemon-systems.org/~maekawa/ixgbe/dmesg_64bit_regdump.log
>> Â >
>> Â > The ixg(4)-related part of boot message:
>> Â > ixg0 at pci3 dev 0 function 0: Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 4.0.1-k
>> Â > ixg0: clearing prefetchable bit
>> Â > ixgbe_init_shared_code
>> Â > ixgbe_set_mac_type
>> Â >
>> Â > ixgbe_set_mac_type found mac: 4, returns: 0
>> Â >
>> Â > ixgbe_init_ops_X540
>> Â > ixgbe_init_phy_ops_generic
>> Â > ixgbe_init_ops_generic
>> Â > ixgbe_get_pcie_msix_count_generic
>> Â > ixgbe_init_ops_X540 end
>> Â > ixg0: device X540
>> Â > ixgbe_set_lan_id_multi_port_pcie
>> Â > ixgbe_get_device_caps_generic
>> Â > ixgbe_read_eerd_X540
>> Â > ixgbe_acquire_swfw_sync_X540
>> Â > ixgbe_get_swfw_sync_semaphore
>> Â > ixg0: Software semaphore SMBI between device drivers not granted.
>> Â > Failed to get NVM access and register semaphore, returning IXGBE_ERR_SWFW_SYNC
>> Â >
>> Â > 00000: ffffffff
>> Â > 00004: ffffffff
>> Â > 00008: ffffffff
>> Â > 0000c: ffffffff
>> Â > 00010: ffffffff
>> Â > 00014: ffffffff
>> Â > 00018: ffffffff
>> Â > 0001c: ffffffff
>> Â > 00020: ffffffff
>> Â > 00024: ffffffff
>> Â > 00028: ffffffff
>> Â > 0002c: ffffffff
>> Â > 00030: ffffffff
>> Â > 00034: ffffffff
>> Â > 00038: ffffffff
>> Â > 0003c: ffffffff
>> Â > 10140: ffffffff
>> Â > 10160: ffffffff
>> Â > 10140: ffffffff
>> Â > 10160: ffffffff
>> Â The above diff was generated from the following diff:
>> Â Index: ixgbe.c
>> Â ===================================================================
>> Â RCS file: /cvsroot/src/sys/dev/pci/ixgbe/ixgbe.c,v
>> Â retrieving revision 1.173
>> Â diff -u -p -r1.173 ixgbe.c
>>  --- ixgbe.c   23 Jan 2019 09:47:52 -0000   1.173
>>  +++ ixgbe.c   23 Jan 2019 11:44:40 -0000
>> Â @@ -876,6 +871,23 @@ ixgbe_attach(device_t parent, device_t d
>> Â Â Â Â Â Â Â } else
>> Â Â Â Â Â Â Â Â Â Â Â adapter->num_segs = IXGBE_82598_SCATTER;
>> Â +#if 1
>> Â +Â Â Â {
>> Â +Â Â Â Â Â Â Â uint32_t i;
>> Â +
>> Â +Â Â Â Â Â Â Â for (i = 0; i < 64; i += 4)
>> Â +Â Â Â Â Â Â Â Â Â Â Â printf("%05x: %08x\n", i, IXGBE_READ_REG(hw, i));
>> Â +Â Â Â Â Â Â Â printf("%05x: %08x\n", IXGBE_SWSM_BY_MAC(hw),
>> Â +Â Â Â Â Â Â Â Â Â Â Â IXGBE_READ_REG(hw, IXGBE_SWSM_BY_MAC(hw)));
>> Â +Â Â Â Â Â Â Â printf("%05x: %08x\n", IXGBE_SWFW_SYNC_BY_MAC(hw),
>> Â +Â Â Â Â Â Â Â Â Â Â Â IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)));
>> Â +Â Â Â Â Â Â Â printf("%05x: %08x\n", IXGBE_SWSM_BY_MAC(hw),
>> Â +Â Â Â Â Â Â Â Â Â Â Â IXGBE_READ_REG(hw, IXGBE_SWSM_BY_MAC(hw)));
>> Â +Â Â Â Â Â Â Â printf("%05x: %08x\n", IXGBE_SWFW_SYNC_BY_MAC(hw),
>> Â +Â Â Â Â Â Â Â Â Â Â Â IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)));
>> Â +Â Â Â }
>> Â +#endif
>> Â +
>> Â Â Â Â Â Â Â /* Ensure SW/FW semaphore is free */
>> Â Â Â Â Â Â Â ixgbe_init_swfw_semaphore(hw);
>> Â > ixgbe_get_swfw_sync_semaphore
>> Â > ixg0: Software semaphore SMBI between device drivers not granted.
>> Â > ixgbe_release_swfw_sync_semaphore
>> Â > ixgbe_acquire_swfw_sync_X540
>> Â > ixgbe_get_swfw_sync_semaphore
>> Â > ixg0: Software semaphore SMBI between device drivers not granted.
>> Â > Failed to get NVM access and register semaphore, returning IXGBE_ERR_SWFW_SYNC
>> Â >
>> Â > ixgbe_release_swfw_sync_X540
>> Â > ixgbe_get_swfw_sync_semaphore
>> Â > ixg0: Software semaphore SMBI between device drivers not granted.
>> Â > ixgbe_release_swfw_sync_semaphore
>> Â > ixgbe_reset_hw_X540
>> Â > ixgbe_stop_adapter_generic
>> Â > ixgbe_disable_pcie_master
>> Â > GIO Master Disable bit didn't clear - requesting resets
>> Â >
>> Â > ixgbe_acquire_swfw_sync_X540
>> Â > ixgbe_get_swfw_sync_semaphore
>> Â > ixg0: Software semaphore SMBI between device drivers not granted.
>> Â > Failed to get NVM access and register semaphore, returning IXGBE_ERR_SWFW_SYNC
>> Â >
>> Â > ixg0: semaphore failed with -16ixg0: autoconfiguration error: Hardware initialization failed
>> Â >> How-To-Repeat:
>> Â > 0.) Install X540-T1 to MicroServer Gen10
>> Â > 1.) Restore default settings in setup menu.
>> Â > 2.) Enable "Above 4G Decoding" in setup menu.
>> Â > 3.) Boot
>> Â >> Fix:
>> Â >
>> Â The following directory has some logs:
>> Â Â Â Â Â https://www.daemon-systems.org/~maekawa/ixgbe/
>> Â pcidump_{32,64}bit.log are dump of all pci devices
>> Â (64 is from "Above 4G Decoding" enabled).
>> Â Â Â Only X540 is mapped to over 4G. I suspect the reason is that
>> Â the BAR0 is marked prefetchable and it's used as a annotation
>> Â that the device requires large amounts of memory space. See also:
>> Â Â Â Â Â http://mail-index.netbsd.org/tech-kern/2017/03/22/msg021678.html
>> Â I think this problem is not ixgbe specific.
>> Â Has our implementation of amd64 PCI bus access 32bit limitation?
>> Â (extent_create() or extent_alloc())
>> Â Â Â I'm not familiar with x86 PCI memory map, so any test patch are
>> Â welcomed :)
>
> Â I have SuperMicro A2SDi-H-TP4F. The BIOS setting has "Above 4G Decoding"
> enable/disable flag. I changed it to enable. The BIOS set the BAR0 over
> 4GB and the driver WORKS without any problem.
>
>> Â Â Â Base address register at 0x10
>> Â Â Â Â Â type: 64-bit prefetchable memory
>> Â Â Â Â Â base: 0x0000007d7f600000
>
> So, I think this is not ixgbe driver's problem but it might be
> BIOS/UEFI, our ACPI code, or some others' problem...
>
--
MAEKAWA Masahide
https://github.com/cvsync
Use the Source, Luke
Home |
Main Index |
Thread Index |
Old Index