Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-08-01 15:33:19 +08:00
commit eea942069a
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
48 changed files with 119 additions and 693 deletions

View File

@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-5.4 = .134
LINUX_VERSION-5.4 = .137
LINUX_VERSION-5.10 = .54
LINUX_KERNEL_HASH-5.4.134 = c9fb861642161c256e10c97c35ccce18831e688d87ead53c18e3226778e05841
LINUX_KERNEL_HASH-5.4.137 = f09e5e366ce5d8bde887cda229ef17138fd1653706a702221f934f99aaa31f7c
LINUX_KERNEL_HASH-5.10.54 = bf50c63261847187eca4a1793e5df5c1355b21697409589f6ca03e32b629be44
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=18
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
PKG_SOURCE_DATE:=2021-01-09
PKG_SOURCE_VERSION:=53f07e90b7f1da6977143a488dd5cb73a33b233b
PKG_MIRROR_HASH:=ad3665b611d19177996771b11df28d92f066b0125484ea3bdfc0b3185c14f90e
PKG_SOURCE_DATE:=2021-07-14
PKG_SOURCE_VERSION:=94adc8bbfa5150d4c2ceb4e05ecd1840dfa3df08
PKG_MIRROR_HASH:=ddc3b203b37d5f82b88f8dc70f0bfc1b34493cbcba6ed81815ccbe250350fe11
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@ -19,6 +19,7 @@ BASEDHCPSTAMPFILE="/var/run/dnsmasq"
DHCPBOGUSHOSTNAMEFILE="/usr/share/dnsmasq/dhcpbogushostname.conf"
RFC6761FILE="/usr/share/dnsmasq/rfc6761.conf"
DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh"
DHCPSCRIPT_DEPENDS="/usr/share/libubox/jshn.sh /usr/bin/jshn /bin/ubus"
DNSMASQ_DHCP_VER=4
@ -187,6 +188,7 @@ append_notinterface() {
}
append_addnhosts() {
append EXTRA_MOUNT "$1"
xappend "--addn-hosts=$1"
}
@ -1123,7 +1125,11 @@ dnsmasq_start()
procd_set_param respawn
procd_add_jail dnsmasq ubus log
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE
procd_add_jail_mount $EXTRA_MOUNT $DHCPBOGUSHOSTNAMEFILE $DHCPSCRIPT $DHCPSCRIPT_DEPENDS
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
procd_add_jail_mount /dev/null /dev/urandom
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
procd_close_instance

View File

@ -10,7 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=otrx
PKG_RELEASE:=1
PKG_FLAGS:=nonshared
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
PKG_SOURCE_DATE:=2021-07-30
PKG_SOURCE_VERSION:=a5c65fa1192e174e9e895637aaf93945959aa029
PKG_MIRROR_HASH:=8ef94e74f50b21fd226dd5311962f8bdbd3aa55da11026b2cf2a4b35556350af
include $(INCLUDE_DIR)/package.mk
@ -26,10 +30,12 @@ define Package/otrx/description
This package contains an utility that allows validating TRX images.
endef
TARGET_CFLAGS += -Wall
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -Wall"
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
-o $(PKG_BUILD_DIR)/otrx \
$(PKG_BUILD_DIR)/src/otrx.c
endef
define Package/otrx/install

View File

@ -1,7 +0,0 @@
all: otrx
otrx:
$(CC) $(CFLAGS) -o $@ otrx.c -Wall
clean:
rm -f otrx

View File

@ -1,592 +0,0 @@
/*
* otrx
*
* Copyright (C) 2015-2017 Rafał Miłecki <zajec5@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*/
#include <byteswap.h>
#include <endian.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#if !defined(__BYTE_ORDER)
#error "Unknown byte order"
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
#define cpu_to_le32(x) bswap_32(x)
#define le32_to_cpu(x) bswap_32(x)
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define cpu_to_le32(x) (x)
#define le32_to_cpu(x) (x)
#else
#error "Unsupported endianness"
#endif
#define TRX_MAGIC 0x30524448
#define TRX_FLAGS_OFFSET 12
#define TRX_MAX_PARTS 3
struct trx_header {
uint32_t magic;
uint32_t length;
uint32_t crc32;
uint16_t flags;
uint16_t version;
uint32_t offset[3];
};
char *trx_path;
size_t trx_offset = 0;
char *partition[TRX_MAX_PARTS] = {};
static inline size_t otrx_min(size_t x, size_t y) {
return x < y ? x : y;
}
/**************************************************
* CRC32
**************************************************/
static const uint32_t crc32_tbl[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) {
while (len) {
crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8);
buf++;
len--;
}
return crc;
}
/**************************************************
* Check
**************************************************/
static void otrx_check_parse_options(int argc, char **argv) {
int c;
while ((c = getopt(argc, argv, "o:")) != -1) {
switch (c) {
case 'o':
trx_offset = atoi(optarg);
break;
}
}
}
static int otrx_check(int argc, char **argv) {
FILE *trx;
struct trx_header hdr;
size_t bytes, length;
uint8_t buf[1024];
uint32_t crc32;
int err = 0;
if (argc < 3) {
fprintf(stderr, "No TRX file passed\n");
err = -EINVAL;
goto out;
}
trx_path = argv[2];
optind = 3;
otrx_check_parse_options(argc, argv);
trx = fopen(trx_path, "r");
if (!trx) {
fprintf(stderr, "Couldn't open %s\n", trx_path);
err = -EACCES;
goto out;
}
fseek(trx, trx_offset, SEEK_SET);
bytes = fread(&hdr, 1, sizeof(hdr), trx);
if (bytes != sizeof(hdr)) {
fprintf(stderr, "Couldn't read %s header\n", trx_path);
err = -EIO;
goto err_close;
}
if (le32_to_cpu(hdr.magic) != TRX_MAGIC) {
fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic));
err = -EINVAL;
goto err_close;
}
length = le32_to_cpu(hdr.length);
if (length < sizeof(hdr)) {
fprintf(stderr, "Length read from TRX too low (%zu B)\n", length);
err = -EINVAL;
goto err_close;
}
crc32 = 0xffffffff;
fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET);
length -= TRX_FLAGS_OFFSET;
while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) {
crc32 = otrx_crc32(crc32, buf, bytes);
length -= bytes;
}
if (length) {
fprintf(stderr, "Couldn't read last %zd B of data from %s\n", length, trx_path);
err = -EIO;
goto err_close;
}
if (crc32 != le32_to_cpu(hdr.crc32)) {
fprintf(stderr, "Invalid data crc32: 0x%08x instead of 0x%08x\n", crc32, le32_to_cpu(hdr.crc32));
err = -EINVAL;
goto err_close;
}
printf("Found a valid TRX version %d\n", le32_to_cpu(hdr.version));
err_close:
fclose(trx);
out:
return err;
}
/**************************************************
* Create
**************************************************/
static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) {
FILE *in;
size_t bytes;
ssize_t length = 0;
uint8_t buf[1024];
in = fopen(in_path, "r");
if (!in) {
fprintf(stderr, "Couldn't open %s\n", in_path);
return -EACCES;
}
while ((bytes = fread(buf, 1, sizeof(buf), in)) > 0) {
if (fwrite(buf, 1, bytes, trx) != bytes) {
fprintf(stderr, "Couldn't write %zu B to %s\n", bytes, trx_path);
length = -EIO;
break;
}
length += bytes;
}
fclose(in);
return length;
}
static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) {
uint8_t *buf;
buf = malloc(length);
if (!buf)
return -ENOMEM;
memset(buf, 0, length);
if (fwrite(buf, 1, length, trx) != length) {
fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path);
free(buf);
return -EIO;
}
free(buf);
return length;
}
static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment) {
if (curr_offset & (alignment - 1)) {
size_t length = alignment - (curr_offset % alignment);
return otrx_create_append_zeros(trx, length);
}
return 0;
}
static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) {
size_t bytes, length;
uint8_t buf[1024];
uint32_t crc32;
hdr->magic = cpu_to_le32(TRX_MAGIC);
hdr->version = 1;
fseek(trx, 0, SEEK_SET);
bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx);
if (bytes != sizeof(struct trx_header)) {
fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path);
return -EIO;
}
length = le32_to_cpu(hdr->length);
crc32 = 0xffffffff;
fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET);
length -= TRX_FLAGS_OFFSET;
while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) {
crc32 = otrx_crc32(crc32, buf, bytes);
length -= bytes;
}
hdr->crc32 = cpu_to_le32(crc32);
fseek(trx, 0, SEEK_SET);
bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx);
if (bytes != sizeof(struct trx_header)) {
fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path);
return -EIO;
}
return 0;
}
static int otrx_create(int argc, char **argv) {
FILE *trx;
struct trx_header hdr = {};
ssize_t sbytes;
size_t curr_idx = 0;
size_t curr_offset = sizeof(hdr);
int c;
int err = 0;
if (argc < 3) {
fprintf(stderr, "No TRX file passed\n");
err = -EINVAL;
goto out;
}
trx_path = argv[2];
trx = fopen(trx_path, "w+");
if (!trx) {
fprintf(stderr, "Couldn't open %s\n", trx_path);
err = -EACCES;
goto out;
}
fseek(trx, curr_offset, SEEK_SET);
optind = 3;
while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) {
switch (c) {
case 'f':
if (curr_idx >= TRX_MAX_PARTS) {
err = -ENOSPC;
fprintf(stderr, "Reached TRX partitions limit, no place for %s\n", optarg);
goto err_close;
}
sbytes = otrx_create_append_file(trx, optarg);
if (sbytes < 0) {
fprintf(stderr, "Failed to append file %s\n", optarg);
} else {
hdr.offset[curr_idx++] = curr_offset;
curr_offset += sbytes;
}
sbytes = otrx_create_align(trx, curr_offset, 4);
if (sbytes < 0)
fprintf(stderr, "Failed to append zeros\n");
else
curr_offset += sbytes;
break;
case 'A':
sbytes = otrx_create_append_file(trx, optarg);
if (sbytes < 0) {
fprintf(stderr, "Failed to append file %s\n", optarg);
} else {
curr_offset += sbytes;
}
sbytes = otrx_create_align(trx, curr_offset, 4);
if (sbytes < 0)
fprintf(stderr, "Failed to append zeros\n");
else
curr_offset += sbytes;
break;
case 'a':
sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0));
if (sbytes < 0)
fprintf(stderr, "Failed to append zeros\n");
else
curr_offset += sbytes;
break;
case 'b':
sbytes = strtol(optarg, NULL, 0) - curr_offset;
if (sbytes < 0) {
fprintf(stderr, "Current TRX length is 0x%zx, can't pad it with zeros to 0x%lx\n", curr_offset, strtol(optarg, NULL, 0));
} else {
sbytes = otrx_create_append_zeros(trx, sbytes);
if (sbytes < 0)
fprintf(stderr, "Failed to append zeros\n");
else
curr_offset += sbytes;
}
break;
}
if (err)
break;
}
sbytes = otrx_create_align(trx, curr_offset, 0x1000);
if (sbytes < 0)
fprintf(stderr, "Failed to append zeros\n");
else
curr_offset += sbytes;
hdr.length = curr_offset;
otrx_create_write_hdr(trx, &hdr);
err_close:
fclose(trx);
out:
return err;
}
/**************************************************
* Extract
**************************************************/
static void otrx_extract_parse_options(int argc, char **argv) {
int c;
while ((c = getopt(argc, argv, "c:e:o:1:2:3:")) != -1) {
switch (c) {
case 'o':
trx_offset = atoi(optarg);
break;
case '1':
partition[0] = optarg;
break;
case '2':
partition[1] = optarg;
break;
case '3':
partition[2] = optarg;
break;
}
}
}
static int otrx_extract_copy(FILE *trx, size_t offset, size_t length, char *out_path) {
FILE *out;
size_t bytes;
uint8_t *buf;
int err = 0;
out = fopen(out_path, "w");
if (!out) {
fprintf(stderr, "Couldn't open %s\n", out_path);
err = -EACCES;
goto out;
}
buf = malloc(length);
if (!buf) {
fprintf(stderr, "Couldn't alloc %zu B buffer\n", length);
err = -ENOMEM;
goto err_close;
}
fseek(trx, offset, SEEK_SET);
bytes = fread(buf, 1, length, trx);
if (bytes != length) {
fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path);
err = -ENOMEM;
goto err_free_buf;
};
bytes = fwrite(buf, 1, length, out);
if (bytes != length) {
fprintf(stderr, "Couldn't write %zu B to %s\n", length, out_path);
err = -ENOMEM;
goto err_free_buf;
}
printf("Extracted 0x%zx bytes into %s\n", length, out_path);
err_free_buf:
free(buf);
err_close:
fclose(out);
out:
return err;
}
static int otrx_extract(int argc, char **argv) {
FILE *trx;
struct trx_header hdr;
size_t bytes;
int i;
int err = 0;
if (argc < 3) {
fprintf(stderr, "No TRX file passed\n");
err = -EINVAL;
goto out;
}
trx_path = argv[2];
optind = 3;
otrx_extract_parse_options(argc, argv);
trx = fopen(trx_path, "r");
if (!trx) {
fprintf(stderr, "Couldn't open %s\n", trx_path);
err = -EACCES;
goto out;
}
fseek(trx, trx_offset, SEEK_SET);
bytes = fread(&hdr, 1, sizeof(hdr), trx);
if (bytes != sizeof(hdr)) {
fprintf(stderr, "Couldn't read %s header\n", trx_path);
err = -EIO;
goto err_close;
}
if (le32_to_cpu(hdr.magic) != TRX_MAGIC) {
fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic));
err = -EINVAL;
goto err_close;
}
for (i = 0; i < TRX_MAX_PARTS; i++) {
size_t length;
if (!partition[i])
continue;
if (!hdr.offset[i]) {
printf("TRX doesn't contain partition %d, can't extract %s\n", i + 1, partition[i]);
continue;
}
if (i + 1 >= TRX_MAX_PARTS || !hdr.offset[i + 1])
length = le32_to_cpu(hdr.length) - le32_to_cpu(hdr.offset[i]);
else
length = le32_to_cpu(hdr.offset[i + 1]) - le32_to_cpu(hdr.offset[i]);
otrx_extract_copy(trx, trx_offset + le32_to_cpu(hdr.offset[i]), length, partition[i]);
}
err_close:
fclose(trx);
out:
return err;
}
/**************************************************
* Start
**************************************************/
static void usage() {
printf("Usage:\n");
printf("\n");
printf("Checking TRX file:\n");
printf("\totrx check <file> [options]\tcheck if file is a valid TRX\n");
printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n");
printf("\n");
printf("Creating new TRX file:\n");
printf("\totrx create <file> [options] [partitions]\n");
printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n");
printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n");
printf("\t-a alignment\t\t\t[partition] align current partition\n");
printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n");
printf("\n");
printf("Extracting from TRX file:\n");
printf("\totrx extract <file> [options]\textract partitions from TRX file\n");
printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n");
printf("\t-1 file\t\t\t\tfile to extract 1st partition to (optional)\n");
printf("\t-2 file\t\t\t\tfile to extract 2nd partition to (optional)\n");
printf("\t-3 file\t\t\t\tfile to extract 3rd partition to (optional)\n");
}
int main(int argc, char **argv) {
if (argc > 1) {
if (!strcmp(argv[1], "check"))
return otrx_check(argc, argv);
else if (!strcmp(argv[1], "create"))
return otrx_create(argc, argv);
else if (!strcmp(argv[1], "extract"))
return otrx_extract(argc, argv);
}
usage();
return 0;
}

View File

@ -43,7 +43,7 @@ produce a noisy warning.
hcd->msi_enabled = 1;
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1883,6 +1883,7 @@ struct xhci_hcd {
@@ -1884,6 +1884,7 @@ struct xhci_hcd {
struct xhci_hub usb2_rhub;
struct xhci_hub usb3_rhub;
/* support xHCI 1.0 spec USB2 hardware LPM */

View File

@ -214,7 +214,7 @@
#include <linux/uaccess.h>
#include <linux/ipv6.h>
#include <linux/icmpv6.h>
@@ -849,10 +850,10 @@ static void tcp_v6_send_response(const s
@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s
topt = (__be32 *)(t1 + 1);
if (tsecr) {

View File

@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5321,7 +5321,7 @@ static void port_event(struct usb_hub *h
@@ -5369,7 +5369,7 @@ static void port_event(struct usb_hub *h
port_dev->over_current_count++;
port_over_current_notify(port_dev);

View File

@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
@@ -2150,7 +2150,7 @@ static void bcmgenet_init_tx_ring(struct
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor
@@ -3574,9 +3574,12 @@ static int bcmgenet_probe(struct platfor
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
/* Set default coalescing parameters */

View File

@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -527,7 +527,10 @@ void xhci_find_new_dequeue_state(struct
@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
struct xhci_virt_ep *ep = &dev->eps[ep_index];
struct xhci_ring *ep_ring;
struct xhci_segment *new_seg;
@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
dma_addr_t addr;
u64 hw_dequeue;
bool cycle_found = false;
@@ -565,7 +568,28 @@ void xhci_find_new_dequeue_state(struct
@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
new_seg = ep_ring->deq_seg;
new_deq = ep_ring->dequeue;
@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1873,6 +1873,7 @@ struct xhci_hcd {
@@ -1874,6 +1874,7 @@ struct xhci_hcd {
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)

View File

@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
/* MIPS chips strapped for BE will automagically configure the
@@ -1995,6 +1999,11 @@ static void reset_umac(struct bcmgenet_p
@@ -1996,6 +2000,11 @@ static void reset_umac(struct bcmgenet_p
bcmgenet_rbuf_ctrl_set(priv, 0);
udelay(10);

View File

@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
val);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1649,8 +1649,8 @@ struct urb_priv {
@@ -1650,8 +1650,8 @@ struct urb_priv {
* Each segment table entry is 4*32bits long. 1K seems like an ok size:
* (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
* meaning 64 ring segments.

View File

@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3474,7 +3474,7 @@ static int bcmgenet_probe(struct platfor
@@ -3475,7 +3475,7 @@ static int bcmgenet_probe(struct platfor
priv = netdev_priv(dev);
priv->irq0 = platform_get_irq(pdev, 0);
priv->irq1 = platform_get_irq(pdev, 1);

View File

@ -24,16 +24,16 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2790,7 +2790,7 @@ static void bcmgenet_set_hw_addr(struct
@@ -2791,7 +2791,7 @@ static void bcmgenet_set_hw_addr(struct
}
/* Returns a reusable dma control register value */
-static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
+static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv, bool flush_rx)
{
unsigned int i;
u32 reg;
u32 dma_ctrl;
@@ -2809,6 +2809,14 @@ static u32 bcmgenet_dma_disable(struct b
@@ -2816,6 +2816,14 @@ static u32 bcmgenet_dma_disable(struct b
udelay(10);
bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
@ -48,9 +48,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
return dma_ctrl;
}
@@ -2910,8 +2918,8 @@ static int bcmgenet_open(struct net_devi
bcmgenet_ext_writel(priv, reg, EXT_EXT_PWR_MGMT);
}
@@ -2911,8 +2919,8 @@ static int bcmgenet_open(struct net_devi
bcmgenet_set_hw_addr(priv, dev->dev_addr);
- /* Disable RX/TX DMA and flush TX queues */
- dma_ctrl = bcmgenet_dma_disable(priv);
@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
/* Reinitialize TDMA and RDMA and SW housekeeping */
ret = bcmgenet_init_dma(priv);
@@ -3671,7 +3679,7 @@ static int bcmgenet_resume(struct device
@@ -3665,7 +3673,7 @@ static int bcmgenet_resume(struct device
bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC);
/* Disable RX/TX DMA and flush TX queues */

View File

@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct
@@ -647,6 +647,16 @@ void xhci_find_new_dequeue_state(struct
} while (!cycle_found || !td_last_trb_found);
@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1876,6 +1876,7 @@ struct xhci_hcd {
@@ -1877,6 +1877,7 @@ struct xhci_hcd {
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36)
#define XHCI_SKIP_PHY_INIT BIT_ULL(37)
#define XHCI_DISABLE_SPARSE BIT_ULL(38)

View File

@ -127,7 +127,7 @@ it on BCM4708 family.
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1873,6 +1873,7 @@ struct xhci_hcd {
@@ -1874,6 +1874,7 @@ struct xhci_hcd {
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)

View File

@ -84,7 +84,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
--- a/arch/arm/boot/dts/gemini.dtsi
+++ b/arch/arm/boot/dts/gemini.dtsi
@@ -356,7 +356,7 @@
@@ -357,7 +357,7 @@
};
};
@ -93,7 +93,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
compatible = "cortina,gemini-pata", "faraday,ftide010";
reg = <0x63000000 0x1000>;
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
@@ -365,9 +365,11 @@
@@ -366,9 +366,11 @@
clock-names = "PCLK";
sata = <&sata>;
status = "disabled";
@ -106,7 +106,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
compatible = "cortina,gemini-pata", "faraday,ftide010";
reg = <0x63400000 0x1000>;
interrupts = <5 IRQ_TYPE_EDGE_RISING>;
@@ -376,6 +378,8 @@
@@ -377,6 +379,8 @@
clock-names = "PCLK";
sata = <&sata>;
status = "disabled";

View File

@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4922,6 +4922,80 @@ static int mv88e6xxx_port_mdb_del(struct
@@ -4926,6 +4926,80 @@ static int mv88e6xxx_port_mdb_del(struct
return err;
}
@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
bool unicast, bool multicast)
{
@@ -4976,6 +5050,8 @@ static const struct dsa_switch_ops mv88e
@@ -4980,6 +5054,8 @@ static const struct dsa_switch_ops mv88e
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
.port_mdb_add = mv88e6xxx_port_mdb_add,
.port_mdb_del = mv88e6xxx_port_mdb_del,

View File

@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4989,7 +4989,7 @@ static void mv88e6xxx_port_mirror_del(st
@@ -4993,7 +4993,7 @@ static void mv88e6xxx_port_mirror_del(st
if (chip->info->ops->set_egress_port(chip,
direction,
dsa_upstream_port(ds,

View File

@ -961,7 +961,13 @@ CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_AES_ARM is not set
# CONFIG_CRYPTO_AES_ARM_BS is not set
# CONFIG_CRYPTO_AES_ARM64_BS is not set
# CONFIG_CRYPTO_AES_ARM_CE is not set
# CONFIG_CRYPTO_AES_ARM64 is not set
# CONFIG_CRYPTO_AES_ARM64_CE is not set
# CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set
# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set
# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_AES_TI is not set
CONFIG_CRYPTO_ALGAPI=y
@ -991,6 +997,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_CRC32_ARM_CE is not set
# CONFIG_CRYPTO_CRCT10DIF is not set
# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set
# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
@ -1048,6 +1056,7 @@ CONFIG_CRYPTO_BLKCIPHER2=y
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_GHASH_ARM_CE is not set
# CONFIG_CRYPTO_GHASH_ARM64_CE is not set
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
# CONFIG_CRYPTO_HASH is not set
# CONFIG_CRYPTO_HMAC is not set
@ -1103,15 +1112,19 @@ CONFIG_CRYPTO_PCRYPT=y
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA1_ARM is not set
# CONFIG_CRYPTO_SHA1_ARM64_CE is not set
# CONFIG_CRYPTO_SHA1_ARM_CE is not set
# CONFIG_CRYPTO_SHA1_ARM_NEON is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA256_ARM is not set
# CONFIG_CRYPTO_SHA256_ARM64 is not set
# CONFIG_CRYPTO_SHA2_ARM_CE is not set
# CONFIG_CRYPTO_SHA2_ARM64_CE is not set
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SHA3_ARM64 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_SHA512_ARM is not set
# CONFIG_CRYPTO_SHA512_ARM64 is not set
# CONFIG_CRYPTO_SHA512_ARM64_CE is not set
# CONFIG_CRYPTO_SIMD is not set
# CONFIG_CRYPTO_SM3 is not set

View File

@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -5076,6 +5076,7 @@ static int mv88e6xxx_register_switch(str
@@ -5080,6 +5080,7 @@ static int mv88e6xxx_register_switch(str
ds->ops = &mv88e6xxx_switch_ops;
ds->ageing_time_min = chip->info->age_time_coeff;
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;

View File

@ -702,7 +702,7 @@ binding
};
pmu {
@@ -560,15 +559,126 @@
@@ -559,15 +558,126 @@
#interrupt-cells = <2>;
};
@ -831,7 +831,7 @@ binding
};
i2c1: i2c@2010000 {
@@ -579,7 +689,7 @@
@@ -578,7 +688,7 @@
reg = <0x0 0x2010000 0x0 0x10000>;
interrupts = <0 34 0x4>; /* Level high type */
clock-names = "i2c";
@ -840,7 +840,7 @@ binding
};
i2c2: i2c@2020000 {
@@ -590,7 +700,7 @@
@@ -589,7 +699,7 @@
reg = <0x0 0x2020000 0x0 0x10000>;
interrupts = <0 35 0x4>; /* Level high type */
clock-names = "i2c";
@ -849,7 +849,7 @@ binding
};
i2c3: i2c@2030000 {
@@ -601,7 +711,7 @@
@@ -600,7 +710,7 @@
reg = <0x0 0x2030000 0x0 0x10000>;
interrupts = <0 35 0x4>; /* Level high type */
clock-names = "i2c";
@ -858,7 +858,7 @@ binding
};
ifc: ifc@2240000 {
@@ -633,8 +743,8 @@
@@ -632,8 +742,8 @@
pcie1: pcie@3400000 {
compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
reg-names = "regs", "config";
@ -869,7 +869,7 @@ binding
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
@@ -642,6 +752,7 @@
@@ -641,6 +751,7 @@
num-viewport = <6>;
bus-range = <0x0 0xff>;
msi-parent = <&its>;
@ -877,7 +877,7 @@ binding
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0000 0 0 1 &gic 0 0 0 109 4>,
@@ -654,8 +765,8 @@
@@ -653,8 +764,8 @@
pcie2: pcie@3500000 {
compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
reg-names = "regs", "config";
@ -888,7 +888,7 @@ binding
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
@@ -663,6 +774,7 @@
@@ -662,6 +773,7 @@
num-viewport = <6>;
bus-range = <0x0 0xff>;
msi-parent = <&its>;
@ -896,7 +896,7 @@ binding
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0000 0 0 1 &gic 0 0 0 114 4>,
@@ -675,8 +787,8 @@
@@ -674,8 +786,8 @@
pcie3: pcie@3600000 {
compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
reg-names = "regs", "config";
@ -907,7 +907,7 @@ binding
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
@@ -684,6 +796,7 @@
@@ -683,6 +795,7 @@
num-viewport = <256>;
bus-range = <0x0 0xff>;
msi-parent = <&its>;
@ -915,7 +915,7 @@ binding
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0000 0 0 1 &gic 0 0 0 119 4>,
@@ -696,8 +809,8 @@
@@ -695,8 +808,8 @@
pcie4: pcie@3700000 {
compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
reg-names = "regs", "config";
@ -926,7 +926,7 @@ binding
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
@@ -705,6 +818,7 @@
@@ -704,6 +817,7 @@
num-viewport = <6>;
bus-range = <0x0 0xff>;
msi-parent = <&its>;
@ -934,7 +934,7 @@ binding
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0000 0 0 1 &gic 0 0 0 124 4>,
@@ -754,11 +868,22 @@
@@ -753,11 +867,22 @@
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
};

View File

@ -146,7 +146,7 @@ Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
timer: timer {
compatible = "arm,armv8-timer";
@@ -907,3 +872,36 @@
@@ -906,3 +871,36 @@
};
};
};

View File

@ -27,7 +27,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
tmu: tmu@1f80000 {
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -834,8 +834,9 @@
@@ -833,8 +833,9 @@
};
serdes1: serdes@1ea0000 {

View File

@ -98,7 +98,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -820,6 +820,7 @@
@@ -819,6 +819,7 @@
snps,quirk-frame-length-adjustment = <0x20>;
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
@ -106,7 +106,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
};
usb1: usb3@3110000 {
@@ -831,6 +832,7 @@
@@ -830,6 +831,7 @@
snps,quirk-frame-length-adjustment = <0x20>;
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;

View File

@ -117,7 +117,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
*
* Abhimanyu Saini <abhimanyu.saini@nxp.com>
*
@@ -525,7 +525,7 @@
@@ -524,7 +524,7 @@
};
/* TODO: WRIOP (CCSR?) */
@ -126,7 +126,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
* E-MDIO1: 0x1_6000
*/
compatible = "fsl,fman-memac-mdio";
@@ -538,7 +538,7 @@
@@ -537,7 +537,7 @@
#size-cells = <0>;
};
@ -135,7 +135,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
* E-MDIO2: 0x1_7000
*/
compatible = "fsl,fman-memac-mdio";
@@ -550,7 +550,7 @@
@@ -549,7 +549,7 @@
#size-cells = <0>;
};
@ -144,7 +144,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c07000 0x0 0x1000>;
device_type = "mdio";
@@ -560,7 +560,7 @@
@@ -559,7 +559,7 @@
#size-cells = <0>;
};
@ -153,7 +153,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c0b000 0x0 0x1000>;
device_type = "mdio";
@@ -570,7 +570,7 @@
@@ -569,7 +569,7 @@
#size-cells = <0>;
};
@ -162,7 +162,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c0f000 0x0 0x1000>;
device_type = "mdio";
@@ -580,7 +580,7 @@
@@ -579,7 +579,7 @@
#size-cells = <0>;
};
@ -171,7 +171,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c13000 0x0 0x1000>;
device_type = "mdio";
@@ -590,7 +590,7 @@
@@ -589,7 +589,7 @@
#size-cells = <0>;
};
@ -180,7 +180,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
status = "disabled";
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c17000 0x0 0x1000>;
@@ -601,7 +601,7 @@
@@ -600,7 +600,7 @@
#size-cells = <0>;
};
@ -189,7 +189,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
status = "disabled";
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c1b000 0x0 0x1000>;
@@ -612,7 +612,7 @@
@@ -611,7 +611,7 @@
#size-cells = <0>;
};
@ -198,7 +198,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
status = "disabled";
compatible = "fsl,fman-memac-mdio";
reg = <0x0 0x8c1f000 0x0 0x1000>;
@@ -623,7 +623,7 @@
@@ -622,7 +622,7 @@
#size-cells = <0>;
};

View File

@ -260,7 +260,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
phy-handle = <&mdio0_phy12>;
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -550,90 +550,6 @@
@@ -549,90 +549,6 @@
#size-cells = <0>;
};
@ -351,7 +351,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
i2c0: i2c@2000000 {
status = "disabled";
compatible = "fsl,vf610-i2c", "fsl,ls208xa-vf610-i2c";
@@ -835,12 +751,6 @@
@@ -834,12 +750,6 @@
snps,host-vbus-glitches;
};

View File

@ -276,7 +276,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
};
cpu: cpus {
@@ -757,9 +758,16 @@
@@ -756,9 +757,16 @@
interrupts = <0 12 4>;
};

View File

@ -34,7 +34,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
ftm_alarm0: timer@2800000 {
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -762,6 +762,7 @@
@@ -761,6 +761,7 @@
compatible = "fsl,ls208xa-rcpm", "fsl,qoriq-rcpm-2.1+";
reg = <0x0 0x1e34040 0x0 0x18>;
#fsl,rcpm-wakeup-cells = <6>;

View File

@ -110,7 +110,7 @@ Reviewed-by: Leo Li <leo.li@nxp.com>
dr_mode = "host";
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -730,7 +730,7 @@
@@ -729,7 +729,7 @@
usb0: usb3@3100000 {
status = "disabled";
@ -119,7 +119,7 @@ Reviewed-by: Leo Li <leo.li@nxp.com>
reg = <0x0 0x3100000 0x0 0x10000>;
interrupts = <0 80 0x4>; /* Level high type */
dr_mode = "host";
@@ -742,7 +742,7 @@
@@ -741,7 +741,7 @@
usb1: usb3@3110000 {
status = "disabled";

View File

@ -122,7 +122,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -738,6 +738,7 @@
@@ -737,6 +737,7 @@
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
snps,host-vbus-glitches;
@ -130,7 +130,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
};
usb1: usb3@3110000 {
@@ -750,6 +751,7 @@
@@ -749,6 +750,7 @@
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
snps,host-vbus-glitches;

View File

@ -42,7 +42,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
};
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -610,16 +610,16 @@
@@ -609,16 +609,16 @@
};
qspi: spi@20c0000 {

View File

@ -18,7 +18,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -738,7 +738,6 @@
@@ -737,7 +737,6 @@
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
snps,host-vbus-glitches;
@ -26,7 +26,7 @@ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
};
usb1: usb3@3110000 {
@@ -751,7 +750,6 @@
@@ -750,7 +749,6 @@
snps,dis_rxdet_inp3_quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
snps,host-vbus-glitches;

View File

@ -658,7 +658,7 @@ Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
struct dsa_switch_driver {
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -323,6 +323,10 @@ static int dsa_port_setup(struct dsa_por
@@ -325,6 +325,10 @@ static int dsa_port_setup(struct dsa_por
if (err)
break;

View File

@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3592,6 +3592,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
@@ -3624,6 +3624,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
return 0;
}
@ -184,7 +184,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
void xhci_init_driver(struct hc_driver *drv,
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -2150,6 +2150,16 @@ int xhci_find_raw_port_number(struct usb
@@ -2151,6 +2151,16 @@ int xhci_find_raw_port_number(struct usb
struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);
void xhci_hc_died(struct xhci_hcd *xhci);

View File

@ -32,7 +32,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
ret = xhci_handshake(&xhci->op_regs->command,
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1873,6 +1873,7 @@ struct xhci_hcd {
@@ -1874,6 +1874,7 @@ struct xhci_hcd {
#define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)

View File

@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2058,12 +2058,9 @@ static int process_ctrl_td(struct xhci_h
@@ -2091,12 +2091,9 @@ static int process_ctrl_td(struct xhci_h
switch (trb_comp_code) {
case COMP_SUCCESS:

View File

@ -35,7 +35,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
EXPORT_SYMBOL_GPL(xhci_init_driver);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1916,6 +1916,7 @@ struct xhci_driver_overrides {
@@ -1917,6 +1917,7 @@ struct xhci_driver_overrides {
int (*start)(struct usb_hcd *hcd);
int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);

View File

@ -20,7 +20,7 @@ Signed-off-by: Li Jun <jun.li@freescale.com>
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4731,7 +4731,8 @@ hub_port_init(struct usb_hub *hub, struc
@@ -4779,7 +4779,8 @@ hub_port_init(struct usb_hub *hub, struc
}
if (r) {
if (r != -ENODEV)

View File

@ -16,7 +16,7 @@ Signed-off-by: Li Jun <jun.li@nxp.com>
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1737,7 +1737,8 @@ static bool xhci_port_missing_cas_quirk(
@@ -1738,7 +1738,8 @@ static bool xhci_port_missing_cas_quirk(
return false;
if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&

View File

@ -797,7 +797,7 @@
static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
{
@@ -1099,6 +1100,8 @@ static int spinand_probe(struct spi_mem
@@ -1100,6 +1101,8 @@ static int spinand_probe(struct spi_mem
if (ret)
return ret;
@ -806,7 +806,7 @@
ret = mtd_device_register(mtd, NULL, 0);
if (ret)
goto err_spinand_cleanup;
@@ -1124,6 +1127,7 @@ static int spinand_remove(struct spi_mem
@@ -1125,6 +1128,7 @@ static int spinand_remove(struct spi_mem
if (ret)
return ret;

View File

@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
@@ -3104,6 +3112,16 @@ static int mtk_probe(struct platform_dev
@@ -3106,6 +3114,16 @@ static int mtk_probe(struct platform_dev
}
}

View File

@ -69,7 +69,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
/* J6 */
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -120,10 +120,6 @@
@@ -126,10 +126,6 @@
};
};

View File

@ -37,7 +37,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -126,7 +126,6 @@
@@ -132,7 +132,6 @@
status = "okay";
max-link-speed = <2>;
reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;

View File

@ -24,7 +24,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -124,7 +124,6 @@
@@ -130,7 +130,6 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
status = "okay";

View File

@ -22,7 +22,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
#include <linux/platform_data/x86/apple.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
@@ -5725,3 +5726,34 @@ static void apex_pci_fixup_class(struct
@@ -5727,3 +5728,34 @@ static void apex_pci_fixup_class(struct
}
DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);

View File

@ -22,9 +22,9 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
const __be32 *_id = of_get_property(np, "reg", NULL);
struct phylink *phylink;
int phy_mode, id, err;
@@ -3035,6 +3036,9 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
@@ -3037,6 +3038,9 @@ static int mtk_add_mac(struct mtk_eth *e
of_platform_device_create(np, NULL, NULL);
+ if (name)
+ strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);