mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into asterisk-update
This commit is contained in:
@@ -17,9 +17,11 @@ fi
|
||||
# Load ethernet settings
|
||||
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
|
||||
|
||||
if [ "${RED_DEV}" == "" ]; then
|
||||
RED_DEV=ppp0
|
||||
fi
|
||||
case "${RED_TYPE}" in
|
||||
PPPOE)
|
||||
RED_DEV="ppp0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# setup_netdev_trigger LED DEVICE MODE
|
||||
setup_netdev_trigger ()
|
||||
|
||||
@@ -64,7 +64,7 @@ case "${1}" in
|
||||
|
||||
# Now traverse /sys in order to "coldplug" devices that have
|
||||
# already been discovered
|
||||
/bin/udevadm trigger
|
||||
/bin/udevadm trigger --action=add
|
||||
|
||||
# Now wait for udevd to process the uevents we triggered
|
||||
/bin/udevadm settle
|
||||
|
||||
@@ -542,7 +542,7 @@ int main(int argc, char *argv[])
|
||||
replace("/harddisk/boot/grub/grub.conf", "splashimage", "#splashimage");
|
||||
replace("/harddisk/boot/grub/grub.conf", "#serial", "serial");
|
||||
replace("/harddisk/boot/grub/grub.conf", "#terminal", "terminal");
|
||||
replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,38400n8 panic=10 ");
|
||||
replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,115200n8 panic=10 ");
|
||||
|
||||
/*inittab*/
|
||||
replace("/harddisk/etc/inittab", "1:2345:respawn:", "#1:2345:respawn:");
|
||||
|
||||
@@ -27,7 +27,7 @@ int writehostsfiles(void)
|
||||
FILE *file, *hosts;
|
||||
struct keyvalue *kv;
|
||||
char hostname[STRING_SIZE];
|
||||
char domainname[STRING_SIZE] = "";
|
||||
char domainname[STRING_SIZE] = "localdomain";
|
||||
char commandstring[STRING_SIZE];
|
||||
char buffer[STRING_SIZE];
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From 4e9792dc8ab29175295c79c35f9f6fbd2d453b35 Mon Sep 17 00:00:00 2001
|
||||
From: Octavian Purdila <octavian.purdila@intel.com>
|
||||
Date: Mon, 23 Dec 2013 19:06:31 +0200
|
||||
Subject: [PATCH] usbnet: mcs7830: rework link state detection
|
||||
|
||||
Even with the quirks in commit dabdaf0c (mcs7830: Fix link state
|
||||
detection) there are still spurious link-down events for some chips
|
||||
where the false link-down events count go over a few hundreds.
|
||||
|
||||
This patch takes a more conservative approach and only looks at
|
||||
link-down events where the link-down state is not combined with other
|
||||
states (e.g. half/full speed, pending frames in SRAM or TX status
|
||||
information valid). In all other cases we assume the link is up.
|
||||
|
||||
Tested on MCS7830CV-DA (USB ID 9710:7830).
|
||||
|
||||
Cc: Ondrej Zary <linux@rainbow-software.org>
|
||||
Cc: Michael Leun <lkml20120218@newton.leun.net>
|
||||
Cc: Ming Lei <ming.lei@canonical.com>
|
||||
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/usb/mcs7830.c | 19 ++++---------------
|
||||
1 file changed, 4 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
|
||||
index 9237c45..8dd48b5 100644
|
||||
--- a/drivers/net/usb/mcs7830.c
|
||||
+++ b/drivers/net/usb/mcs7830.c
|
||||
@@ -117,7 +117,6 @@ enum {
|
||||
struct mcs7830_data {
|
||||
u8 multi_filter[8];
|
||||
u8 config;
|
||||
- u8 link_counter;
|
||||
};
|
||||
|
||||
static const char driver_name[] = "MOSCHIP usb-ethernet driver";
|
||||
@@ -562,26 +561,16 @@ static void mcs7830_status(struct usbnet *dev, struct urb *urb)
|
||||
{
|
||||
u8 *buf = urb->transfer_buffer;
|
||||
bool link, link_changed;
|
||||
- struct mcs7830_data *data = mcs7830_get_data(dev);
|
||||
|
||||
if (urb->actual_length < 16)
|
||||
return;
|
||||
|
||||
- link = !(buf[1] & 0x20);
|
||||
+ link = !(buf[1] == 0x20);
|
||||
link_changed = netif_carrier_ok(dev->net) != link;
|
||||
if (link_changed) {
|
||||
- data->link_counter++;
|
||||
- /*
|
||||
- track link state 20 times to guard against erroneous
|
||||
- link state changes reported sometimes by the chip
|
||||
- */
|
||||
- if (data->link_counter > 20) {
|
||||
- data->link_counter = 0;
|
||||
- usbnet_link_change(dev, link, 0);
|
||||
- netdev_dbg(dev->net, "Link Status is: %d\n", link);
|
||||
- }
|
||||
- } else
|
||||
- data->link_counter = 0;
|
||||
+ usbnet_link_change(dev, link, 0);
|
||||
+ netdev_dbg(dev->net, "Link Status is: %d\n", link);
|
||||
+ }
|
||||
}
|
||||
|
||||
static const struct driver_info moschip_info = {
|
||||
--
|
||||
2.0.0
|
||||
|
||||
Reference in New Issue
Block a user