mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Daniel Glöckner" <dg@emlix.com>
Cc: barebox@lists.infradead.org, Edmund Henniges <eh@emlix.com>
Subject: Re: [PATCH 2/3] fastboot net: implement fastboot over UDP
Date: Fri, 6 Mar 2020 20:36:25 +0100	[thread overview]
Message-ID: <20200306193625.GA3335@pengutronix.de> (raw)
In-Reply-To: <ca2405ef-b084-c12f-ec4c-806ecd7fd144@emlix.com>

On Thu, Mar 05, 2020 at 09:15:57PM +0100, Daniel Glöckner wrote:
> Am 03/05/20 um 08:50 schrieb Sascha Hauer:
> >> +		const char *fastboot_files = getenv("nv.fastboot.files");
> > 
> > Please don't use nv variables directly, always use the corresponding
> > global variable.
> > 
> > For USB fastboot we have a variable global.usbgadget.fastboot_function
> > for the same purpose. We should probably use the same variable for both
> > fastboot variants and maybe also for DFU. How about moving the variable
> > name out of that usbgadget namespace and use something like
> > global.update_partitions? There might be better names...
> 
> Since there is also the question what to do with global.usbgadget
> .fastboot_max_download_size, we could introduce a new namespace for
> fastboot and call the variables global.fastboot.update_partitions
> and global.fastboot.max_download_size. Although I would prefer
> "partitions" to "update_partitions".
> 
> > Interestingly this only became a problem with my change, I tested your
> > fastboot net patches as-is and it works fluently.
> 
> Maybe it works with the fastboot code because the poller is registered
> in a very late initcall. Or did it cause problems for you after all
> initcalls had run?
> 
> > My
> > favourite solution would be to move net_poll() inside a poller indeed,
> > but I currently have no good idea how to fix this mdio read problem.
> 
> How about wrapping the body of mdiobus_read, mdiobus_write, eth_send,
> eth_rx, eth_check_open, and maybe even mdiobus_register, eth_register,
> and eth_unregister in
> 
> net_entered++;
> ...
> net_entered--;
> 
> and then immediately returning from net_poll if net_entered != 0 on
> entry? That's similar to how poller_call prevents reentrance.

Yes, something like that. I created a series which implements such a
scheme, but a little more generic so that hopefully it will help with
the same problem in other areas as well.

Regards
 Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-03-06 19:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 20:48 [PATCH 0/3] Support for " Daniel Glöckner
2020-02-28 20:48 ` [PATCH 1/3] fastboot: split generic code from USB gadget Daniel Glöckner
2020-03-05  7:25   ` Sascha Hauer
2020-02-28 20:48 ` [PATCH 2/3] fastboot net: implement fastboot over UDP Daniel Glöckner
2020-03-05  7:50   ` Sascha Hauer
2020-03-05 20:15     ` Daniel Glöckner
2020-03-06 19:36       ` Sascha Hauer [this message]
2020-02-28 20:48 ` [PATCH 3/3] fastboot net: workaround for receiving before sending Daniel Glöckner
2020-03-05  7:54 ` [PATCH 0/3] Support for fastboot over UDP Sascha Hauer
2020-03-09  7:14 ` Sascha Hauer
2020-03-09 15:38   ` Daniel Glöckner
2020-03-12  8:26     ` Sascha Hauer

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=20200306193625.GA3335@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=dg@emlix.com \
    --cc=eh@emlix.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox