From nobody Tue May 13 09:00:16 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZxVmd5wNxz5wZHT for ; Tue, 13 May 2025 09:00:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZxVmd2JQmz3TnG for ; Tue, 13 May 2025 09:00:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747126817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5UVrCUBG6LbGmy8s9K6BErWrov65j1SpJQLGxGpECY=; b=VcRL45/vGjhWVHAM6mO4qdxK+GTdRdQFb+SYU92wnhavW14a7RZi0mVPyTBVHwR5EfVqnY jAVqX9ghKadamzRJ1bHbKsQ1Tn6uxuEiDnLUx4eHj7QCXhrM2DKjTKxfj84jjw+GwasOLd ofLu/1iNWCuSHcgHfLxwBkWwlKkb392t5QRNhBZXUGe1Ii5Renu5CuawCd1rXWyiuZh7Q7 rboDpRVQJFDa7Dz7yqwHC68G+cu4mddrSx9NgqGpuORl+R+dfC+ndTQM26rgJyF3NJpHBI W4DGCQHB9ZuCrMulmxpT+HxwoM0H17yKJZUhLJNIzQptO6v5uZp/Js52NekqEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747126817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5UVrCUBG6LbGmy8s9K6BErWrov65j1SpJQLGxGpECY=; b=lLJMfRj3Mz3LNFUs4kY5pa5UpPvCjtZ33cgeLvZnWrGcHY1yReBkwdLsG/KPbM26Z7uEgr 9Rr9fH2Zc2OJSv8+/DnfnGM/0ZrzQFmpfQcquBNY/B3L0ltmDZ+IlRosb9eDIAz2FFvbPJ QwSE8udR3iPIG+QiudAVWG+mD7NGlORm+030117zEcQmJaCYjGc2mkCX+T84Wi7etnUGco cOjwhN2YWg90EyUqM44maU/GwJi3XZ2MT7HrzqYl+tLlDHUWcKtiPOX3o3x7nQNy+U+xjC iruDt04UuCyzTsofS6eziJ1QDUhfxlKnewaRvy5t0gFT0Qdn0QNAb26ODwH2ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747126817; a=rsa-sha256; cv=none; b=aU8TR+5o7D/PTqZkyYwNJ0OAtO3qHL6yrM75VFD9jyU2TNoq6lzWxTGV2faILHn6m/fWSa a/roPdl15l8IBTUwvwASZi4wrNFz4FcuYUyYQWsgLlm1NiZVanci7MALOCGfdSSUl+52A5 suLfM5zglMEc9RaV0RUZkw0vuRhvy+7s/zSTuXh2IV0fLfO/mZpSQD+qX9Pij7qdobf9Ls aDyl3OgpCUw66cABmYOUnIu+B5ekp07BfNW+TdTSwm3ezUGhwoyH3VKGmZEfZCmzibKUrX rnV4u2vDtQQHxykdwNpTnsPlk4tR086PG6Xsea08dESCJQoFaXFWyVubeL5Fcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZxVmd1w3Gzgrk for ; Tue, 13 May 2025 09:00:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 54D90GJU087863 for ; Tue, 13 May 2025 09:00:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 54D90Gxt087862 for bugs@FreeBSD.org; Tue, 13 May 2025 09:00:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 286762] igc driver doesn't properly recognize link status when in down state Date: Tue, 13 May 2025 09:00:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: aaron.styx@baesystems.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286762 Bug ID: 286762 Summary: igc driver doesn't properly recognize link status when in down state Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: aaron.styx@baesystems.com I have an igc card (Intel I225-V device id 0x15f3) that doesn't properly re= port link status when down. Without a cable attached, ifconfig properly reports a status of no carrier. When a cable is then attached, ifconfig correctly rep= orts the status is active. However, when the cable is then removed, ifconfig incorrectly reports that the status is active when it should report no carr= ier.=20 I believe the root cause is that there is nothing in the ioctl SIOCGIFXMEDIA path (through iflib and if_media that ultimately calls the driver's igc_if_update_admin_status() function) that will set the igc_softc's hw.mac.get_link_status variable to true when the device is down. When the device is up, the 2Hz timer will check and set things appropriately, but the timer doesn't run while the device is down.=20 The hardware doesn't seem to trigger an admin interrupt on cable attach/det= ach while down either. If it did, I don't think this would be a problem. I don't know if it's only my specific card that doesn't generate admin interrupts on link status change while down, or if that's common across all igc cards.=20 A quick hack to fix this is to set at the top of igc_if_update_admin_status= (): sc->hw.mac.get_link_status =3D true; but that alone is clearly not a proper fix. --=20 You are receiving this mail because: You are the assignee for the bug.=