All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: 'Jakub Kicinski' <kuba@kernel.org>,
	'Mengyuan Lou' <mengyuanlou@net-swift.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/5] net: txgbe: Initialize service task
Date: Wed, 9 Nov 2022 03:36:15 +0100	[thread overview]
Message-ID: <Y2sSH/WAwivllMtI@lunn.ch> (raw)
In-Reply-To: <028801d8f3e1$492f08c0$db8d1a40$@trustnetic.com>

On Wed, Nov 09, 2022 at 10:16:32AM +0800, Jiawen Wu wrote:
> On Wednesday, November 9, 2022 7:56 AM, Jakub wrote:
> > On Tue,  8 Nov 2022 19:19:04 +0800 Mengyuan Lou wrote:
> > > +	__TXGBE_TESTING,
> > > +	__TXGBE_RESETTING,
> > > +	__TXGBE_DOWN,
> > > +	__TXGBE_HANGING,
> > > +	__TXGBE_DISABLED,
> > > +	__TXGBE_REMOVING,
> > > +	__TXGBE_SERVICE_SCHED,
> > > +	__TXGBE_SERVICE_INITED,
> > 
> > Please don't try to implement a state machine in the driver.
> > Protect data structures with locks, like a normal piece of SW.
> > 
> 
> The state machine will be used in interrupt events, locks don't seem to fit it.

spinlock can be used with interrupts.

Also, once you make use of phylink, you might not need any of this.

	 Andrew

  reply	other threads:[~2022-11-09  2:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 11:19 [PATCH net-next 0/5] net: WangXun ethernet drivers Mengyuan Lou
2022-11-08 11:19 ` [PATCH net-next 1/5] net: txgbe: Identify PHY and SFP module Mengyuan Lou
2022-11-08 20:52   ` Andrew Lunn
2022-11-09  6:32     ` Jiawen Wu
2022-11-09 13:26       ` Andrew Lunn
2022-11-14  9:34         ` Jiawen Wu
2022-11-14 13:25           ` Andrew Lunn
2022-11-29  8:20         ` Jiawen Wu
2022-11-14 15:34   ` Alexander Lobakin
2022-11-14 20:18     ` Andrew Lunn
2022-11-08 11:19 ` [PATCH net-next 2/5] net: txgbe: Initialize service task Mengyuan Lou
2022-11-08 23:55   ` Jakub Kicinski
2022-11-09  2:16     ` Jiawen Wu
2022-11-09  2:36       ` Andrew Lunn [this message]
2022-11-14 15:39   ` Alexander Lobakin
2022-11-08 11:19 ` [PATCH net-next 3/5] net: txgbe: Support to setup link Mengyuan Lou
2022-11-08 21:03   ` Andrew Lunn
2022-11-14 15:48   ` Alexander Lobakin
2022-11-14 20:20     ` Andrew Lunn
2022-11-08 11:19 ` [PATCH net-next 4/5] net: ngbe: Initialize phy information Mengyuan Lou
2022-11-08 21:10   ` Andrew Lunn
2022-11-11  3:13     ` mengyuanlou
2022-11-11  3:28       ` Andrew Lunn
2022-11-14 16:16   ` Alexander Lobakin
2022-11-08 11:19 ` [PATCH net-next 5/5] net: ngbe: Initialize service task Mengyuan Lou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2sSH/WAwivllMtI@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.