From owner-freebsd-hackers@freebsd.org Sat Mar 28 11:02:28 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9996278045; Sat, 28 Mar 2020 11:02:28 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48qG5c0TYJz4bBZ; Sat, 28 Mar 2020 11:02:27 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: by mail-wr1-x444.google.com with SMTP id h15so14807966wrx.9; Sat, 28 Mar 2020 04:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=An3x10ookyGo6pKxX+/6xQXEd5JCzt7gaFKZxKboIEw=; b=ZyPv1ZvETJyGouYUcjJiWoCZCN7IXlV103iq6rYwzVMvTtXSZfdj4dTQ+oXGvaf3S8 IJeBKGxHFv7uE8R7LENd0dSTnAWxb3RVcUD8jiZrDCK8wJ4F7b+a8czEjO9zyXHjYx4/ ICzbNlrzs3igJokzrbn+97/xpbZKn4cZFSEOndvPhuxHvf1uJQVzllhHYNz7Bx/eI07u einafJI4R1J/vuRCswHx5bl8hoUmI/ENuFEeU2HTBq5HHa1y+7YQCpODZrSg0X9Utcfy tYbW2yD1mmHohHxocACVAMHJSwVsXErLQ+WhH2fh9bNMLZam6X/Ifc11AFIMtCKVDqrZ QssQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=An3x10ookyGo6pKxX+/6xQXEd5JCzt7gaFKZxKboIEw=; b=BvxnQjqc06aO3hHAl/PFvG5I6hKBbTkzgR59GT7AP516ufL0A+HL3aze0DnHsvxPOf lZc8QRmmht2S2xS0i59dSbWltHk/fexFIZ4vP1xQnl0zRrhNRKSx5uPRcREajsMRBop5 4iyNh7DWQjOLfdKsY/xspSDdMQ0L8zB5eCYWtI/QpTrd5caYdHttBV52NlPOhC4GDeo7 PT+itX+NJyDD2CQLeNH6zzgcLIs3Bn+OtLaCG22NHNP9fqnI0gsi8XwLNe/MIWB3MpyX TCPtMQraQ3orhig1jki1aSR1rWzgfQszwiX3vmDOSIEi4osz+ZihI5VNb4aFMFH2yy/4 IrbQ== X-Gm-Message-State: ANhLgQ0rIAH7cbTmzhnre/q5nsa56AI3gvg9s5rjQCgZsKG19eiw3DBp QBeN/bPM3KKUZL94olhU/7RNyLgKfIWDPBbV2AQs5g== X-Google-Smtp-Source: ADFU+vuylKidjjZW3FbZ4IngKu2UE5HDWyrUBOwzPDL+e+8eLSjwupTE4XHwQ5ce0yR1zhH1G/zoXyP/AgjjodVJgLw= X-Received: by 2002:a05:6000:1c4:: with SMTP id t4mr4192123wrx.89.1585393337575; Sat, 28 Mar 2020 04:02:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rajesh Kumar Date: Sat, 28 Mar 2020 16:32:06 +0530 Message-ID: Subject: Re: Does FreeBSD has a generic PHY library as in Linux? To: =?UTF-8?B?U3RlZmFuIEXDn2Vy?= Cc: freebsd-drivers@freebsd.org, FreeBSD Hackers X-Rspamd-Queue-Id: 48qG5c0TYJz4bBZ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 11:02:29 -0000 Thank you all for the response . I will go through the MIIBUS stuff and come back if I have any questions. Thanks, Rajesh. On Sat, Mar 28, 2020 at 12:18 AM Stefan E=C3=9Fer wrote: > Am 26.03.20 um 19:36 schrieb Rajesh Kumar: > > Hi, > > > > I am porting a network driver from Linux to FreeBSD. The driver in Lin= ux > > uses the PHY library (a generic wrapper) to access/config the PHY > > registers. Do we have anything equivalent in FreeBSD? > > > > PHY library routines in Linux: > > > > get_phy_device > > phy_device_register > > phy_attach_direct > > phy_start_aneg > > etc., > > > > FreeBSD being a stable OS for networking and Storage, I assume it shoul= d > > have something equivalent to this. Can anyone point to it? or any > > documentation related to this? > > See > > https://wiki.freebsd.org/MIIBUS > > for initial information about the miibus driver that covers most > PHYs supported by FreeBSD Ethernet devices. > > The miibus(4) man-page contains a list of devices that use this > interface and which might be useful as examples for its use: > > https://www.freebsd.org/cgi/man.cgi?miibus(4) > > Regards, STefan >