[PATCH libbsd] freebsd/sys/dev/e1000: Fix long timeout
Peter Dufault
dufault at hda.com
Thu Feb 1 12:12:46 UTC 2024
This is for 6-freebsd-12. How is that specified? I don't see [PATCH libbsd-6-freebsd-12] etc.
> On Feb 1, 2024, at 6:00 AM, dufault at hda.com wrote:
>
> From: Peter Dufault <dufault at hda.com>
>
> - safe_pause_us() and safe_pause_ms() depend on the clock tick. Use DELAY().
> ---
> freebsd/sys/dev/e1000/e1000_osdep.h | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/freebsd/sys/dev/e1000/e1000_osdep.h b/freebsd/sys/dev/e1000/e1000_osdep.h
> index 70db294..15dfc6f 100644
> --- a/freebsd/sys/dev/e1000/e1000_osdep.h
> +++ b/freebsd/sys/dev/e1000/e1000_osdep.h
> @@ -80,6 +80,7 @@ ms_scale(int x) {
> }
> }
>
> +#if !defined(__rtems__)
> static inline void
> safe_pause_us(int x) {
> if (cold) {
> @@ -97,6 +98,17 @@ safe_pause_ms(int x) {
> pause("e1000_delay", ms_scale(x));
> }
> }
> +#else
> +static inline void
> +safe_pause_us(int x) {
> + DELAY(x);
> +}
> +
> +static inline void
> +safe_pause_ms(int x) {
> + DELAY(x*1000);
> +}
> +#endif
>
> #define usec_delay(x) safe_pause_us(x)
> #define usec_delay_irq(x) usec_delay(x)
> --
> 1.8.3.1
>
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the devel
mailing list