NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-arm/55317
The following reply was made to PR port-arm/55317; it has been noted by GNATS.
From: Sad Clouds <cryintothebluesky%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: mlelstv%serpens.de@localhost (Michael van Elst), port-arm-maintainer%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: port-arm/55317
Date: Thu, 15 Dec 2022 11:20:52 +0000
On Thu, 15 Dec 2022 09:35:01 +0000 (UTC)
mlelstv%serpens.de@localhost (Michael van Elst) wrote:
> USB is always "hot-plugging", the kernel doesn't know how long to wait
> for an USB device to attach.
OK that answers the question and makes sense now. Could I suggest
adding the following script fragment. This would avoid headaches for
people who run Raspberry Pi 3 without other USB devices plugged in.
/etc/rc.d/network:
network_start()
{
# Workaround for PR#55317
local hw_model i
hw_model=`sysctl -n hw.model | grep '^raspberrypi,3'`
if [ -n "$hw_model" ]
then
echo "Detected Raspberry Pi 3 hardware model"
echo "Waiting for USB ethernet device to attach..."
# Wait for up to 5 seconds before giving up
for i in 1 2 3 4 5
do
ifconfig mue0 >/dev/null 2>&1 && break
sleep 1
done
fi
...
}
Home |
Main Index |
Thread Index |
Old Index