From owner-freebsd-net@freebsd.org Wed Aug 22 16:17:49 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35C43108D4FB for ; Wed, 22 Aug 2018 16:17:49 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C52237C158 for ; Wed, 22 Aug 2018 16:17:48 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mailman.ysv.freebsd.org (Postfix) id 8A1E6108D4FA; Wed, 22 Aug 2018 16:17:48 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FF48108D4F9 for ; Wed, 22 Aug 2018 16:17:48 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5B167C154 for ; Wed, 22 Aug 2018 16:17:47 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it0-x229.google.com with SMTP id j81-v6so3597427ite.0 for ; Wed, 22 Aug 2018 09:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ox+1+hfnb/I1fEU+FWzKqZBHq3cX6nm0GAZEunWfqRw=; b=aHeqkuyXrJDhc/ZLq9Xwmg/Mu2RWgEuSjhCPvvieyHZA/UZneRso7j91jmKBU+zzao aQp+PPm89sx+CtP4DuXe+xO+6wwzThqWkCNfZr+43MX2kh3Kfxbqrb6usGEiBiV8950f 3/XrWFp86D3VsXKovZOz9wpA4+9aw4YAhe44U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ox+1+hfnb/I1fEU+FWzKqZBHq3cX6nm0GAZEunWfqRw=; b=dn+mIa6ogH6VBiH3nIhrgQuTVF6f4rTJ2+QdHVRPBjXUeSnQV0jc6a05mxkXZ7w2HT N7O8NF1rrX4TVyF29ojZKOhqWSj3f8IJZtJUer2aM+/ifZtJjIrBnkHJfGPFJnq4bdNr oq1fcaw66suS/v3IRZQUZhkMtc7QfFAs1weZti4DQ/GvWDg7HOl1592NVI7mzX0M2Iy+ A8ZGQHLtwQ8eim7mscUuQnD+0cK9GsIsiZp+by81RSJ+6mdHH57uBXmZVeUZ0xzllqKh 3kGhb5YnPziD1vf0ZljsggXX2wz/Bvtxuwaj5MvIpBF9l3VDLey6SeLv/uvhvDamJ7Xy 3Qow== X-Gm-Message-State: APzg51BK63OwG/wJ/+pINWxjARCbConyPtR6E1JV31QD95c8HMZfwGs2 bznkUd1FAAJYg3UFBOOm9L6iPEt5TxNVCExExapk2g== X-Google-Smtp-Source: ANB0VdYL70WGuBeZ+p79LA39TAvI4ejQka5rQGd1p61UHUDj6onmfD/Hl+W2CldNP3sJwc3Y/sVIMhvmykARdYVT3XU= X-Received: by 2002:a24:3095:: with SMTP id q143-v6mr3758383itq.73.1534954667143; Wed, 22 Aug 2018 09:17:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:665b:0:0:0:0:0 with HTTP; Wed, 22 Aug 2018 09:17:46 -0700 (PDT) In-Reply-To: <20180822090811.GA1691@kloomba> References: <20180819142106.GA1539@kloomba> <20180822090811.GA1691@kloomba> From: Kevin Bowling Date: Wed, 22 Aug 2018 09:17:46 -0700 Message-ID: Subject: Re: igb: device_attach: igb1 attach returned 6 To: Roman Bogorodskiy Cc: net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 16:17:49 -0000 The phy code hasn't changed in any material way that I can see in a long time. So I wonder if it's timing or some initialization issue. e1000_get_hw_semaphore e1000_put_hw_semaphore e1000_read_phy_reg_i2c This looks a bit funny, I think the hw sem should be held over the i2c call. Is there a chance you can get the same log from the working kernel? Regards, Kevin On Wed, Aug 22, 2018 at 2:08 AM, Roman Bogorodskiy wrote: > Kevin Bowling wrote: > >> Roman, >> >> Interesting.. can you set DBG to 1 sys/dev/e1000/e1000_osdep.h Line >> 109 so we can see closer what is failing to initialize? > > Hi Kevin, > > Here's a relevant bit of dmesg with debug enabled: > > igb1: port 0xe040-0xe05f mem 0xf7800000-0xf79fffff,0xf7c08000-0xf7c0bfff irq 17 at device 0.1 on pci1 > e1000_set_mac_type > igb1: attach_pre capping queues at 8 > e1000_set_mac_type > e1000_init_mac_ops_generic > e1000_init_phy_ops_generic > e1000_init_nvm_ops_generic > e1000_init_function_pointers_82575 > e1000_init_mac_params_82575 > e1000_read_sfp_data_byte > e1000_read_sfp_data_byte > e1000_init_nvm_params_82575 > e1000_init_phy_params_82575 > e1000_reset_mdicnfg_82580 > e1000_sgmii_uses_mdio_82575 > e1000_get_phy_id_82575 > e1000_sgmii_uses_mdio_82575 > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 1 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 2 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 3 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 4 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 5 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 6 was unreadable > e1000_read_phy_reg_sgmii_82575 > e1000_acquire_phy_82575 > e1000_acquire_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > e1000_read_phy_reg_i2c > I2CCMD Error bit set > e1000_release_phy_82575 > e1000_release_swfw_sync > e1000_get_hw_semaphore > e1000_put_hw_semaphore > PHY address 7 was unreadable > PHY Initialization Error > igb1: Setup of Shared code failed, error -2 > igb1: IFDI_ATTACH_PRE failed 6 > device_attach: igb1 attach returned 6 > > I've also attached a complete dmesg. > >> Regards, >> Kevin >> >> On Sun, Aug 19, 2018 at 7:21 AM, Roman Bogorodskiy wrote: >> > Hi, >> > >> > I have a 4-port Intel I350 network card. When I plug sfp rj45 module to >> > one of the ports, devices fails to initialise, e.g. ifconfig(8) only >> > shows three igb interfaces (expected to be four): >> > >> > igb0: flags=8802 metric 0 mtu 1500 >> > options=e505bb >> > ether 00:12:c0:00:e9:14 >> > media: Ethernet autoselect >> > status: no carrier >> > nd6 options=29 >> > igb1: flags=8802 metric 0 mtu 1500 >> > options=e505bb >> > ether 00:12:c0:00:e9:16 >> > media: Ethernet autoselect >> > status: no carrier >> > nd6 options=29 >> > igb2: flags=8802 metric 0 mtu 1500 >> > options=e505bb >> > ether 00:12:c0:00:e9:17 >> > media: Ethernet autoselect >> > status: no carrier >> > nd6 options=29 >> > >> > dmesg has the following: >> > >> > igb0: port 0xe060-0xe07f mem 0xf7a00000-0xf7bfffff,0xf7c0c000-0xf7c0ffff irq 16 at device 0.0 on pci1 >> > igb0: attach_pre capping queues at 8 >> > igb0: using 1024 tx descriptors and 1024 rx descriptors >> > igb0: msix_init qsets capped at 8 >> > igb0: pxm cpus: 4 queue msgs: 9 admincnt: 1 >> > igb0: using 4 rx queues 4 tx queues >> > igb0: Using MSIX interrupts with 5 vectors >> > igb0: allocated for 4 tx_queues >> > igb0: allocated for 4 rx_queues >> > igb0: Ethernet address: 00:12:c0:00:e9:14 >> > igb0: netmap queues/slots: TX 4/1024, RX 4/1024 >> > igb1: port 0xe040-0xe05f mem 0xf7800000-0xf79fffff,0xf7c08000-0xf7c0bfff irq 17 at device 0.1 on pci1 >> > igb1: attach_pre capping queues at 8 >> > igb1: Setup of Shared code failed, error -2 >> > igb1: IFDI_ATTACH_PRE failed 6 >> > device_attach: igb1 attach returned 6 >> > igb1: port 0xe020-0xe03f mem 0xf7600000-0xf77fffff,0xf7c04000-0xf7c07fff irq 18 at device 0.2 on pci1 >> > igb1: attach_pre capping queues at 8 >> > igb1: using 1024 tx descriptors and 1024 rx descriptors >> > igb1: msix_init qsets capped at 8 >> > igb1: pxm cpus: 4 queue msgs: 9 admincnt: 1 >> > igb1: using 4 rx queues 4 tx queues >> > igb1: Using MSIX interrupts with 5 vectors >> > igb1: allocated for 4 tx_queues >> > igb1: allocated for 4 rx_queues >> > igb1: Ethernet address: 00:12:c0:00:e9:16 >> > igb1: netmap queues/slots: TX 4/1024, RX 4/1024 >> > igb2: port 0xe000-0xe01f mem 0xf7400000-0xf75fffff,0xf7c00000-0xf7c03fff irq 19 at device 0.3 on pci1 >> > igb2: attach_pre capping queues at 8 >> > igb2: using 1024 tx descriptors and 1024 rx descriptors >> > igb2: msix_init qsets capped at 8 >> > igb2: pxm cpus: 4 queue msgs: 9 admincnt: 1 >> > igb2: using 4 rx queues 4 tx queues >> > igb2: Using MSIX interrupts with 5 vectors >> > igb2: allocated for 4 tx_queues >> > igb2: allocated for 4 rx_queues >> > igb2: Ethernet address: 00:12:c0:00:e9:17 >> > igb2: netmap queues/slots: TX 4/1024, RX 4/1024 >> > >> > And in pciconf(8) it shows as: >> > >> > igb0@pci0:1:0:0: class=0x020000 card=0x00101b6d chip=0x15228086 rev=0x01 hdr=0x00 >> > vendor = 'Intel Corporation' >> > device = 'I350 Gigabit Fiber Network Connection' >> > class = network >> > subclass = ethernet >> > none1@pci0:1:0:1: class=0x020000 card=0x00101b6d chip=0x15228086 rev=0x01 hdr=0x00 >> > vendor = 'Intel Corporation' >> > device = 'I350 Gigabit Fiber Network Connection' >> > class = network >> > subclass = ethernet >> > igb1@pci0:1:0:2: class=0x020000 card=0x00101b6d chip=0x15228086 rev=0x01 hdr=0x00 >> > vendor = 'Intel Corporation' >> > device = 'I350 Gigabit Fiber Network Connection' >> > class = network >> > subclass = ethernet >> > igb2@pci0:1:0:3: class=0x020000 card=0x00101b6d chip=0x15228086 rev=0x01 hdr=0x00 >> > vendor = 'Intel Corporation' >> > device = 'I350 Gigabit Fiber Network Connection' >> > class = network >> > subclass = ethernet >> > >> > Any suggestions what could be wrong with that? >> > >> > The host is FreeBSD 12.0-ALPHA1 amd64 @ r337885. I don't know how/if it >> > worked before, just plugged that in. >> > >> > Roman Bogorodskiy > > Roman Bogorodskiy