mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-19 17:59:18 +01:00
project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
@@ -442,7 +442,7 @@ void tcp_init_sock(struct sock *sk)
|
||||
tp->snd_cwnd_clamp = ~0;
|
||||
tp->mss_cache = TCP_MSS_DEFAULT;
|
||||
|
||||
tp->reordering = sock_net(sk)->ipv4.sysctl_tcp_reordering;
|
||||
tp->reordering = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_reordering);
|
||||
tcp_assign_congestion_control(sk);
|
||||
|
||||
tp->tsoffset = 0;
|
||||
@@ -453,8 +453,8 @@ void tcp_init_sock(struct sock *sk)
|
||||
|
||||
icsk->icsk_sync_mss = tcp_sync_mss;
|
||||
|
||||
WRITE_ONCE(sk->sk_sndbuf, sock_net(sk)->ipv4.sysctl_tcp_wmem[1]);
|
||||
WRITE_ONCE(sk->sk_rcvbuf, sock_net(sk)->ipv4.sysctl_tcp_rmem[1]);
|
||||
WRITE_ONCE(sk->sk_sndbuf, READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_wmem[1]));
|
||||
WRITE_ONCE(sk->sk_rcvbuf, READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_rmem[1]));
|
||||
|
||||
sk_sockets_allocated_inc(sk);
|
||||
sk->sk_route_forced_caps = NETIF_F_GSO;
|
||||
@@ -700,7 +700,7 @@ static bool tcp_should_autocork(struct sock *sk, struct sk_buff *skb,
|
||||
int size_goal)
|
||||
{
|
||||
return skb->len < size_goal &&
|
||||
sock_net(sk)->ipv4.sysctl_tcp_autocorking &&
|
||||
READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_autocorking) &&
|
||||
!tcp_rtx_queue_empty(sk) &&
|
||||
refcount_read(&sk->sk_wmem_alloc) > skb->truesize;
|
||||
}
|
||||
@@ -1150,7 +1150,8 @@ static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg,
|
||||
struct sockaddr *uaddr = msg->msg_name;
|
||||
int err, flags;
|
||||
|
||||
if (!(sock_net(sk)->ipv4.sysctl_tcp_fastopen & TFO_CLIENT_ENABLE) ||
|
||||
if (!(READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen) &
|
||||
TFO_CLIENT_ENABLE) ||
|
||||
(uaddr && msg->msg_namelen >= sizeof(uaddr->sa_family) &&
|
||||
uaddr->sa_family == AF_UNSPEC))
|
||||
return -EOPNOTSUPP;
|
||||
@@ -1713,7 +1714,7 @@ int tcp_set_rcvlowat(struct sock *sk, int val)
|
||||
if (sk->sk_userlocks & SOCK_RCVBUF_LOCK)
|
||||
cap = sk->sk_rcvbuf >> 1;
|
||||
else
|
||||
cap = sock_net(sk)->ipv4.sysctl_tcp_rmem[2] >> 1;
|
||||
cap = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_rmem[2]) >> 1;
|
||||
val = min(val, cap);
|
||||
WRITE_ONCE(sk->sk_rcvlowat, val ? : 1);
|
||||
|
||||
@@ -2774,6 +2775,8 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
|
||||
tp->snd_cwnd = TCP_INIT_CWND;
|
||||
tp->snd_cwnd_cnt = 0;
|
||||
tp->is_cwnd_limited = 0;
|
||||
tp->max_packets_out = 0;
|
||||
tp->window_clamp = 0;
|
||||
tp->delivered = 0;
|
||||
tp->delivered_ce = 0;
|
||||
@@ -2792,8 +2795,7 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||
icsk->icsk_ack.rcv_mss = TCP_MIN_MSS;
|
||||
memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
|
||||
__sk_dst_reset(sk);
|
||||
dst_release(sk->sk_rx_dst);
|
||||
sk->sk_rx_dst = NULL;
|
||||
dst_release(xchg((__force struct dst_entry **)&sk->sk_rx_dst, NULL));
|
||||
tcp_saved_syn_free(tp);
|
||||
tp->compressed_ack = 0;
|
||||
tp->segs_in = 0;
|
||||
@@ -3268,7 +3270,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,
|
||||
case TCP_REPAIR_OPTIONS:
|
||||
if (!tp->repair)
|
||||
err = -EINVAL;
|
||||
else if (sk->sk_state == TCP_ESTABLISHED)
|
||||
else if (sk->sk_state == TCP_ESTABLISHED && !tp->bytes_sent)
|
||||
err = tcp_repair_options_est(sk, optval, optlen);
|
||||
else
|
||||
err = -EPERM;
|
||||
@@ -3369,7 +3371,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,
|
||||
case TCP_FASTOPEN_CONNECT:
|
||||
if (val > 1 || val < 0) {
|
||||
err = -EINVAL;
|
||||
} else if (net->ipv4.sysctl_tcp_fastopen & TFO_CLIENT_ENABLE) {
|
||||
} else if (READ_ONCE(net->ipv4.sysctl_tcp_fastopen) &
|
||||
TFO_CLIENT_ENABLE) {
|
||||
if (sk->sk_state == TCP_CLOSE)
|
||||
tp->fastopen_connect = val;
|
||||
else
|
||||
@@ -3706,7 +3709,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
|
||||
case TCP_LINGER2:
|
||||
val = tp->linger2;
|
||||
if (val >= 0)
|
||||
val = (val ? : net->ipv4.sysctl_tcp_fin_timeout) / HZ;
|
||||
val = (val ? : READ_ONCE(net->ipv4.sysctl_tcp_fin_timeout)) / HZ;
|
||||
break;
|
||||
case TCP_DEFER_ACCEPT:
|
||||
val = retrans_to_secs(icsk->icsk_accept_queue.rskq_defer_accept,
|
||||
@@ -4018,12 +4021,16 @@ static void __tcp_alloc_md5sig_pool(void)
|
||||
* to memory. See smp_rmb() in tcp_get_md5sig_pool()
|
||||
*/
|
||||
smp_wmb();
|
||||
tcp_md5sig_pool_populated = true;
|
||||
/* Paired with READ_ONCE() from tcp_alloc_md5sig_pool()
|
||||
* and tcp_get_md5sig_pool().
|
||||
*/
|
||||
WRITE_ONCE(tcp_md5sig_pool_populated, true);
|
||||
}
|
||||
|
||||
bool tcp_alloc_md5sig_pool(void)
|
||||
{
|
||||
if (unlikely(!tcp_md5sig_pool_populated)) {
|
||||
/* Paired with WRITE_ONCE() from __tcp_alloc_md5sig_pool() */
|
||||
if (unlikely(!READ_ONCE(tcp_md5sig_pool_populated))) {
|
||||
mutex_lock(&tcp_md5sig_mutex);
|
||||
|
||||
if (!tcp_md5sig_pool_populated) {
|
||||
@@ -4034,7 +4041,8 @@ bool tcp_alloc_md5sig_pool(void)
|
||||
|
||||
mutex_unlock(&tcp_md5sig_mutex);
|
||||
}
|
||||
return tcp_md5sig_pool_populated;
|
||||
/* Paired with WRITE_ONCE() from __tcp_alloc_md5sig_pool() */
|
||||
return READ_ONCE(tcp_md5sig_pool_populated);
|
||||
}
|
||||
EXPORT_SYMBOL(tcp_alloc_md5sig_pool);
|
||||
|
||||
@@ -4050,7 +4058,8 @@ struct tcp_md5sig_pool *tcp_get_md5sig_pool(void)
|
||||
{
|
||||
local_bh_disable();
|
||||
|
||||
if (tcp_md5sig_pool_populated) {
|
||||
/* Paired with WRITE_ONCE() from __tcp_alloc_md5sig_pool() */
|
||||
if (READ_ONCE(tcp_md5sig_pool_populated)) {
|
||||
/* coupled with smp_wmb() in __tcp_alloc_md5sig_pool() */
|
||||
smp_rmb();
|
||||
return this_cpu_ptr(&tcp_md5sig_pool);
|
||||
|
||||
Reference in New Issue
Block a user