Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of intel 9560 wireless card #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

wjguo
Copy link
Owner

@wjguo wjguo commented Jan 24, 2019

build and test steps (my laptop uses intel 9260)

cd ~/
git clone https://github.com/wjguo/freebsd.git
cd freebsd && git checkout user/wjguo/iwm-9560
make -C sys/modules/iwm
kldload /usr/obj/usr/home/YOUR_ID/freebsd/amd64.amd64/sys/modules/iwmfw/iwm9260fw/iwm9260fw.ko
kldload /usr/obj/usr/home/YOUR_ID/freebsd/amd64.amd64/sys/modules/iwm/if_iwm.ko

@wjguo
Copy link
Owner Author

wjguo commented Jan 24, 2019

The failure log:

Security policy loaded: MAC/ntpd (mac_ntpd)
iwm0: <Intel(R) Dual Band Wireless AC 9560> mem 0x604c110000-0x604c113fff at device 20.3 on pci0
iwm0: ->iwm_prepare_card_hw
iwm0: <-iwm_prepare_card_hw
iwm0: ->iwm_preinit
iwm0: ->iwm_prepare_card_hw
iwm0: <-iwm_prepare_card_hw
iwm0: iwm apm start
iwm0: L1 Disabled - LTR Enabled
iwm0: ->iwm_prepare_card_hw
iwm0: <-iwm_prepare_card_hw
iwm0: iwm apm start
iwm0: L1 Disabled - LTR Enabled
iwm0: Radio type=0x0-0x2-0x1
iwm0: iwm_nic_init: shadow registers enabled
iwm0: Enabling FW load interrupt
iwm0: working with Dual CPU
iwm0: iwm_pcie_load_section: [0] uCode section being loaded...
iwm0: iwm_pcie_load_section: [1] uCode section being loaded...
iwm0: iwm_pcie_load_section: [2] uCode section being loaded...
iwm0: iwm_pcie_load_section: [3] uCode section being loaded...
iwm0: iwm_pcie_load_section: [4] uCode section being loaded...
iwm0: Break since Data not valid or Empty section, sec = 5
iwm0: iwm_pcie_load_section: [6] uCode section being loaded...
iwm0: iwm_pcie_load_section: [7] uCode section being loaded...
iwm0: iwm_pcie_load_section: [8] uCode section being loaded...
iwm0: iwm_pcie_load_section: [9] uCode section being loaded...
iwm0: Break since Data not valid or Empty section, sec = 10
iwm0: iwm_notif_intr: hw = 1 cur = 0
iwm0: rx packet qid=0 idx=0 type=1
iwm0: Alive ucode status 0xdead revision 0x9 0x0
iwm0: UMAC version: Major - 0x19, Minor - 0x0
iwm0: rx packet qid=64 idx=0 type=b1
iwm0: iwm_mvm_load_ucode_wait_alive: Loaded ucode is not valid
iwm0: Failed to start INIT ucode: 5
iwm0: iwm_nic_lock: resetting device via NMI
iwm0: iwm_nic_lock: resetting device via NMI
iwm0: <-iwm_attach

@wjguo
Copy link
Owner Author

wjguo commented Jan 27, 2019

appling this patch https://lists.freebsd.org/pipermail/svn-src-all/2019-January/175680.html, it shows:

iwm0: Radio type=0x0-0x2-0x1
iwm0: iwm_nic_init: shadow registers enabled
iwm0: Enabling FW load interrupt
iwm0: working with Dual CPU
iwm0: iwm_pcie_load_section: [0] uCode section being loaded...
iwm0: fw chunk addr 0x404000 len 712 failed to load
iwm0: iwm_pcie_load_section: Could not load the [0] uCode section
iwm0: iwm_mvm_load_ucode_wait_alive: error: 60 type: 1
iwm0: iwm0: iwm_start_fw: failed 60
iwm0: Failed to start INIT ucode: 60
iwm_intr:5482

screen shot 2019-01-27 at 5 45 53 pm
cc @lwhsu

@wjguo
Copy link
Owner Author

wjguo commented Feb 7, 2019

linux's iwl log with debug flag
iwlwifi_init.log
iwlwifi-9260-init-success-dump-reg.txt

@wjguo
Copy link
Owner Author

wjguo commented Feb 14, 2019

freebsd's iwm's init log with debug flags (Intel 9260)
iwm-9260-init-failure.txt
iwm-9260-init-failure-dump-reg.txt

@Surgams
Copy link

Surgams commented Mar 6, 2019

Hi there,
is intel 9560 working now?

Thanks

@lwhsu
Copy link

lwhsu commented Mar 7, 2019

Hi there,
is intel 9560 working now?

Thanks

Still WIP.

@waddlesplash
Copy link

@wjguo The patch in your screenshot is different than the one I submitted and was merged: it is missing the (crucial) msleep line. Perhaps that's part of your problems?

@waddlesplash
Copy link

Also, IWM_NVM_EXT was added in 4545fe8, which should help resolve one of your TODOs.

@lwhsu
Copy link

lwhsu commented Mar 23, 2019

I did a quick test to merge this and head at https://github.com/lwhsu/freebsd/tree/iwm-9000 , it still gets:

iwm0: <Intel(R) Dual Band Wireless AC 9560> mem 0x604c110000-0x604c113fff at device 20.3 on pci0
iwm0: api flags index 1 larger than supported by driver
iwm0: iwm_read_firmware: unknown firmware section 48, abort
iwm0: iwm_mvm_load_ucode_wait_alive: Loaded ucode is not valid
iwm0: Failed to start INIT ucode: 5

@@ -2602,6 +2599,7 @@ iwm_pcie_load_given_ucode_8000(struct iwm_softc *sc,
IWM_DPRINTF(sc, IWM_DEBUG_RESET, "working with %s CPU\n",
image->is_dual_cpus ? "Dual" : "Single");

iwm_write_prph(sc, IWM_WFPM_GP2, 0x01010101);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's @wjguo just try to port from iwlwifi.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjguo
Copy link
Owner Author

wjguo commented Mar 24, 2019

@wjguo The patch in your screenshot is different than the one I submitted and was merged: it is missing the (crucial) msleep line. Perhaps that's part of your problems?

Good catch. It could be the cause. I will correct it.

@waddlesplash
Copy link

Yes, at least @lwhsu's log is much further than yours; it actually hits a ucode section it does not know about. So it looks like there is still more to try.

@lwhsu
Copy link

lwhsu commented Mar 25, 2019

Our progress are about the same, I think @wjguo 's log is recorded before 80887cf , which is from iwlwifi and just ignores unknown sections (iwm(4) whitelisted them before, like TLV type 48.)

The firmware initialization still errors out like before, though.

@wjguo
Copy link
Owner Author

wjguo commented Apr 9, 2019

9260fw-33-err.log
9260fw-41-err.log
9260fw-43-err.log

@lwhsu these logs are captured by loading driver with different 9260 firmware. They have different init error code. It indicates that firmware may cause different issues. So, for driver + .43 firmware, I cannot tell the failure is caused by ported driver or firmware.

@michael-yuji
Copy link

I am also start playing around with my intel 9560 come with my X1 extreme, I realise that the device id is different and is not listed. Here's a patch to include the device id I found on my device. michael-yuji@1e4d0ad

@wjguo
Copy link
Owner Author

wjguo commented May 3, 2019

update: the biggest problem is that after iwm loads the firmware, the firmware cannot be successfully started. Although there is an error code, we still don't know how to move forward. So, if we can have the datasheet, that will be very helpful.

@rakuco
Copy link

rakuco commented May 4, 2019

Is there a more up-to-date version of the patch that we could test, or did you get the firmware to load with what's in the PR?

@SchrodingerZhu
Copy link

Any Progress recently?

@waddlesplash
Copy link

I note that on Haiku, the iwm driver fails to load on many EFI setups (while working on those same machines while booted off BIOS) with a similar error: https://dev.haiku-os.org/ticket/14298

Perhaps this is somehow related, and the 9560 just exposes the bug more reliably?

@markjdb
Copy link

markjdb commented Nov 20, 2019

This work was rolled into a patch set that adds support for 9K devices. The patches were committed to FreeBSD HEAD as of r354517 and will be merged to stable/12 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants