You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge 5.10.205 into android12-5.10-lts
Changes in 5.10.205 netfilter: nf_tables: fix 'exist' matching on bigendian arches afs: Fix refcount underflow from error handling race HID: lenovo: Restrict detection of patched firmware only to USB cptkbd net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX qca_debug: Prevent crash on TX ring changes qca_debug: Fix ethtool -G iface tx behavior qca_spi: Fix reset behavior atm: solos-pci: Fix potential deadlock on &cli_queue_lock atm: solos-pci: Fix potential deadlock on &tx_queue_lock net: vlan: introduce skb_vlan_eth_hdr() net: fec: correct queue selection atm: Fix Use-After-Free in do_vcc_ioctl net/rose: Fix Use-After-Free in rose_ioctl qed: Fix a potential use-after-free in qed_cxt_tables_alloc net: Remove acked SYN flag from packet in the transmit queue correctly net: ena: Destroy correct number of xdp queues upon failure net: ena: Fix XDP redirection error sign-file: Fix incorrect return values check vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space() net: stmmac: use dev_err_probe() for reporting mdio bus registration failure net: stmmac: Handle disabled MDIO busses from devicetree appletalk: Fix Use-After-Free in atalk_ioctl net: atlantic: fix double free in ring reinit logic cred: switch to using atomic_long_t fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants ALSA: hda/realtek: Apply mute LED quirk for HP15-db Revert "PCI: acpiphp: Reassign resources on bridge if necessary" PCI: loongson: Limit MRRS to 256 drm/mediatek: Add spinlock for setting vblank event in atomic_begin usb: aqc111: check packet for fixup for true limit blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" bcache: avoid oversize memory allocation by small stripe_size bcache: remove redundant assignment to variable cur_idx bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc() bcache: avoid NULL checking to c->root in run_cache_set() platform/x86: intel_telemetry: Fix kernel doc descriptions HID: glorious: fix Glorious Model I HID report HID: add ALWAYS_POLL quirk for Apple kb HID: hid-asus: reset the backlight brightness level on resume HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation net: usb: qmi_wwan: claim interface 4 for ZTE MF290 HID: hid-asus: add const to read-only outgoing usb buffer perf: Fix perf_event_validate_size() lockdep splat soundwire: stream: fix NULL pointer dereference for multi_link ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify team: Fix use-after-free when an option instance allocation fails ring-buffer: Fix memory leak of free page tracing: Update snapshot buffer on resize if it is allocated ring-buffer: Have saved event hold the entire event ring-buffer: Fix writing to the buffer with max_data_size ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs USB: gadget: core: adjust uevent timing on gadget unbind tty: n_gsm: fix tty registration before control channel open tty: n_gsm, remove duplicates of parameters tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf() powerpc/ftrace: Create a dummy stackframe to fix stack unwind powerpc/ftrace: Fix stack teardown in ftrace_no_trace Linux 5.10.205 Change-Id: I2471e112e6ed8bd85f0bf2812cb0a5bff2ac1bdd Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 204
|
||||
SUBLEVEL = 205
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -761,6 +761,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
if (pte_hw_dirty(pte))
|
||||
pte = pte_mkdirty(pte);
|
||||
pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
|
||||
/*
|
||||
* If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware
|
||||
* dirtiness again.
|
||||
*/
|
||||
if (pte_sw_dirty(pte))
|
||||
pte = pte_mkdirty(pte);
|
||||
return pte;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ _GLOBAL(ftrace_regs_caller)
|
||||
/* Save the original return address in A's stack frame */
|
||||
std r0,LRSAVE(r1)
|
||||
|
||||
/* Create a minimal stack frame for representing B */
|
||||
stdu r1, -STACK_FRAME_MIN_SIZE(r1)
|
||||
|
||||
/* Create our stack frame + pt_regs */
|
||||
stdu r1,-SWITCH_FRAME_SIZE(r1)
|
||||
|
||||
@@ -52,7 +55,7 @@ _GLOBAL(ftrace_regs_caller)
|
||||
SAVE_10GPRS(22, r1)
|
||||
|
||||
/* Save previous stack pointer (r1) */
|
||||
addi r8, r1, SWITCH_FRAME_SIZE
|
||||
addi r8, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
std r8, GPR1(r1)
|
||||
|
||||
/* Load special regs for save below */
|
||||
@@ -65,6 +68,8 @@ _GLOBAL(ftrace_regs_caller)
|
||||
mflr r7
|
||||
/* Save it as pt_regs->nip */
|
||||
std r7, _NIP(r1)
|
||||
/* Also save it in B's stackframe header for proper unwind */
|
||||
std r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
|
||||
/* Save the read LR in pt_regs->link */
|
||||
std r0, _LINK(r1)
|
||||
|
||||
@@ -121,7 +126,7 @@ ftrace_regs_call:
|
||||
ld r2, 24(r1)
|
||||
|
||||
/* Pop our stack frame */
|
||||
addi r1, r1, SWITCH_FRAME_SIZE
|
||||
addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
|
||||
#ifdef CONFIG_LIVEPATCH
|
||||
/* Based on the cmpd above, if the NIP was altered handle livepatch */
|
||||
@@ -145,7 +150,7 @@ ftrace_no_trace:
|
||||
mflr r3
|
||||
mtctr r3
|
||||
REST_GPR(3, r1)
|
||||
addi r1, r1, SWITCH_FRAME_SIZE
|
||||
addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
mtlr r0
|
||||
bctr
|
||||
|
||||
@@ -153,6 +158,9 @@ _GLOBAL(ftrace_caller)
|
||||
/* Save the original return address in A's stack frame */
|
||||
std r0, LRSAVE(r1)
|
||||
|
||||
/* Create a minimal stack frame for representing B */
|
||||
stdu r1, -STACK_FRAME_MIN_SIZE(r1)
|
||||
|
||||
/* Create our stack frame + pt_regs */
|
||||
stdu r1, -SWITCH_FRAME_SIZE(r1)
|
||||
|
||||
@@ -166,6 +174,7 @@ _GLOBAL(ftrace_caller)
|
||||
/* Get the _mcount() call site out of LR */
|
||||
mflr r7
|
||||
std r7, _NIP(r1)
|
||||
std r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
|
||||
|
||||
/* Save callee's TOC in the ABI compliant location */
|
||||
std r2, 24(r1)
|
||||
@@ -200,7 +209,7 @@ ftrace_call:
|
||||
ld r2, 24(r1)
|
||||
|
||||
/* Pop our stack frame */
|
||||
addi r1, r1, SWITCH_FRAME_SIZE
|
||||
addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
|
||||
/* Reload original LR */
|
||||
ld r0, LRSAVE(r1)
|
||||
|
||||
@@ -1409,6 +1409,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
|
||||
tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE),
|
||||
tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE));
|
||||
|
||||
rcu_read_lock();
|
||||
/*
|
||||
* Update has_rules[] flags for the updated tg's subtree. A tg is
|
||||
* considered to have rules if either the tg itself or any of its
|
||||
@@ -1436,6 +1437,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
|
||||
this_tg->latency_target = max(this_tg->latency_target,
|
||||
parent_tg->latency_target);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
/*
|
||||
* We're already holding queue_lock and know @tg is valid. Let's
|
||||
|
||||
@@ -449,9 +449,9 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
|
||||
struct sk_buff *skb;
|
||||
unsigned int len;
|
||||
|
||||
spin_lock(&card->cli_queue_lock);
|
||||
spin_lock_bh(&card->cli_queue_lock);
|
||||
skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]);
|
||||
spin_unlock(&card->cli_queue_lock);
|
||||
spin_unlock_bh(&card->cli_queue_lock);
|
||||
if(skb == NULL)
|
||||
return sprintf(buf, "No data.\n");
|
||||
|
||||
@@ -956,14 +956,14 @@ static void pclose(struct atm_vcc *vcc)
|
||||
struct pkt_hdr *header;
|
||||
|
||||
/* Remove any yet-to-be-transmitted packets from the pending queue */
|
||||
spin_lock(&card->tx_queue_lock);
|
||||
spin_lock_bh(&card->tx_queue_lock);
|
||||
skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {
|
||||
if (SKB_CB(skb)->vcc == vcc) {
|
||||
skb_unlink(skb, &card->tx_queue[port]);
|
||||
solos_pop(vcc, skb);
|
||||
}
|
||||
}
|
||||
spin_unlock(&card->tx_queue_lock);
|
||||
spin_unlock_bh(&card->tx_queue_lock);
|
||||
|
||||
skb = alloc_skb(sizeof(*header), GFP_KERNEL);
|
||||
if (!skb) {
|
||||
|
||||
@@ -582,6 +582,7 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
|
||||
{
|
||||
struct mtk_crtc_state *state = to_mtk_crtc_state(crtc->state);
|
||||
struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
|
||||
unsigned long flags;
|
||||
|
||||
if (mtk_crtc->event && state->base.event)
|
||||
DRM_ERROR("new event while there is still a pending event\n");
|
||||
@@ -589,7 +590,11 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
|
||||
if (state->base.event) {
|
||||
state->base.event->pipe = drm_crtc_index(crtc);
|
||||
WARN_ON(drm_crtc_vblank_get(crtc) != 0);
|
||||
|
||||
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
||||
mtk_crtc->event = state->base.event;
|
||||
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||
|
||||
state->base.event = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ static int asus_raw_event(struct hid_device *hdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size)
|
||||
static int asus_kbd_set_report(struct hid_device *hdev, const u8 *buf, size_t buf_size)
|
||||
{
|
||||
unsigned char *dmabuf;
|
||||
int ret;
|
||||
@@ -355,7 +355,7 @@ static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size
|
||||
|
||||
static int asus_kbd_init(struct hid_device *hdev)
|
||||
{
|
||||
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
|
||||
0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 };
|
||||
int ret;
|
||||
|
||||
@@ -369,7 +369,7 @@ static int asus_kbd_init(struct hid_device *hdev)
|
||||
static int asus_kbd_get_functions(struct hid_device *hdev,
|
||||
unsigned char *kbd_func)
|
||||
{
|
||||
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
|
||||
u8 *readbuf;
|
||||
int ret;
|
||||
|
||||
@@ -901,6 +901,24 @@ static int asus_start_multitouch(struct hid_device *hdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused asus_resume(struct hid_device *hdev) {
|
||||
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
|
||||
int ret = 0;
|
||||
|
||||
if (drvdata->kbd_backlight) {
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4,
|
||||
drvdata->kbd_backlight->cdev.brightness };
|
||||
ret = asus_kbd_set_report(hdev, buf, sizeof(buf));
|
||||
if (ret < 0) {
|
||||
hid_err(hdev, "Asus failed to set keyboard backlight: %d\n", ret);
|
||||
goto asus_resume_err;
|
||||
}
|
||||
}
|
||||
|
||||
asus_resume_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __maybe_unused asus_reset_resume(struct hid_device *hdev)
|
||||
{
|
||||
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
|
||||
@@ -1177,6 +1195,7 @@ static struct hid_driver asus_driver = {
|
||||
.input_configured = asus_input_configured,
|
||||
#ifdef CONFIG_PM
|
||||
.reset_resume = asus_reset_resume,
|
||||
.resume = asus_resume,
|
||||
#endif
|
||||
.event = asus_event,
|
||||
.raw_event = asus_raw_event
|
||||
|
||||
@@ -21,6 +21,10 @@ MODULE_DESCRIPTION("HID driver for Glorious PC Gaming Race mice");
|
||||
* Glorious Model O and O- specify the const flag in the consumer input
|
||||
* report descriptor, which leads to inputs being ignored. Fix this
|
||||
* by patching the descriptor.
|
||||
*
|
||||
* Glorious Model I incorrectly specifes the Usage Minimum for its
|
||||
* keyboard HID report, causing keycodes to be misinterpreted.
|
||||
* Fix this by setting Usage Minimum to 0 in that report.
|
||||
*/
|
||||
static __u8 *glorious_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
@@ -32,6 +36,10 @@ static __u8 *glorious_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
rdesc[85] = rdesc[113] = rdesc[141] = \
|
||||
HID_MAIN_ITEM_VARIABLE | HID_MAIN_ITEM_RELATIVE;
|
||||
}
|
||||
if (*rsize == 156 && rdesc[41] == 1) {
|
||||
hid_info(hdev, "patching Glorious Model I keyboard report descriptor\n");
|
||||
rdesc[41] = 0;
|
||||
}
|
||||
return rdesc;
|
||||
}
|
||||
|
||||
@@ -44,6 +52,8 @@ static void glorious_update_name(struct hid_device *hdev)
|
||||
model = "Model O"; break;
|
||||
case USB_DEVICE_ID_GLORIOUS_MODEL_D:
|
||||
model = "Model D"; break;
|
||||
case USB_DEVICE_ID_GLORIOUS_MODEL_I:
|
||||
model = "Model I"; break;
|
||||
}
|
||||
|
||||
snprintf(hdev->name, sizeof(hdev->name), "%s %s", "Glorious", model);
|
||||
@@ -66,10 +76,12 @@ static int glorious_probe(struct hid_device *hdev,
|
||||
}
|
||||
|
||||
static const struct hid_device_id glorious_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GLORIOUS,
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SINOWEALTH,
|
||||
USB_DEVICE_ID_GLORIOUS_MODEL_O) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GLORIOUS,
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SINOWEALTH,
|
||||
USB_DEVICE_ID_GLORIOUS_MODEL_D) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LAVIEW,
|
||||
USB_DEVICE_ID_GLORIOUS_MODEL_I) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, glorious_devices);
|
||||
|
||||
@@ -471,10 +471,6 @@
|
||||
#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_010A 0x010a
|
||||
#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
|
||||
|
||||
#define USB_VENDOR_ID_GLORIOUS 0x258a
|
||||
#define USB_DEVICE_ID_GLORIOUS_MODEL_D 0x0033
|
||||
#define USB_DEVICE_ID_GLORIOUS_MODEL_O 0x0036
|
||||
|
||||
#define I2C_VENDOR_ID_GOODIX 0x27c6
|
||||
#define I2C_DEVICE_ID_GOODIX_01F0 0x01f0
|
||||
|
||||
@@ -697,6 +693,9 @@
|
||||
#define USB_VENDOR_ID_LABTEC 0x1020
|
||||
#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
|
||||
|
||||
#define USB_VENDOR_ID_LAVIEW 0x22D4
|
||||
#define USB_DEVICE_ID_GLORIOUS_MODEL_I 0x1503
|
||||
|
||||
#define USB_VENDOR_ID_LCPOWER 0x1241
|
||||
#define USB_DEVICE_ID_LCPOWER_LC1000 0xf767
|
||||
|
||||
@@ -1071,6 +1070,10 @@
|
||||
#define USB_VENDOR_ID_SIGMATEL 0x066F
|
||||
#define USB_DEVICE_ID_SIGMATEL_STMP3780 0x3780
|
||||
|
||||
#define USB_VENDOR_ID_SINOWEALTH 0x258a
|
||||
#define USB_DEVICE_ID_GLORIOUS_MODEL_D 0x0033
|
||||
#define USB_DEVICE_ID_GLORIOUS_MODEL_O 0x0036
|
||||
|
||||
#define USB_VENDOR_ID_SIS_TOUCH 0x0457
|
||||
#define USB_DEVICE_ID_SIS9200_TOUCH 0x9200
|
||||
#define USB_DEVICE_ID_SIS817_TOUCH 0x0817
|
||||
|
||||
@@ -489,7 +489,8 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,
|
||||
* so set middlebutton_state to 3
|
||||
* to never apply workaround anymore
|
||||
*/
|
||||
if (cptkbd_data->middlebutton_state == 1 &&
|
||||
if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD &&
|
||||
cptkbd_data->middlebutton_state == 1 &&
|
||||
usage->type == EV_REL &&
|
||||
(usage->code == REL_X || usage->code == REL_Y)) {
|
||||
cptkbd_data->middlebutton_state = 3;
|
||||
|
||||
@@ -1962,6 +1962,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT,
|
||||
USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },
|
||||
|
||||
/* HONOR GLO-GXXX panel */
|
||||
{ .driver_data = MT_CLS_VTL,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
0x347d, 0x7853) },
|
||||
|
||||
/* Ilitek dual touch panel */
|
||||
{ .driver_data = MT_CLS_NSMU,
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
|
||||
|
||||
@@ -33,6 +33,7 @@ static const struct hid_device_id hid_quirks[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI, USB_DEVICE_ID_AKAI_MPKMINI2), HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD), HID_QUIRK_BADPAD },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AMI, USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM), HID_QUIRK_NOGET },
|
||||
|
||||
@@ -265,6 +265,7 @@ struct bcache_device {
|
||||
#define BCACHE_DEV_WB_RUNNING 3
|
||||
#define BCACHE_DEV_RATE_DW_RUNNING 4
|
||||
int nr_stripes;
|
||||
#define BCH_MIN_STRIPE_SZ ((4 << 20) >> SECTOR_SHIFT)
|
||||
unsigned int stripe_size;
|
||||
atomic_t *stripe_sectors_dirty;
|
||||
unsigned long *full_dirty_stripes;
|
||||
|
||||
@@ -974,6 +974,9 @@ err:
|
||||
*
|
||||
* The btree node will have either a read or a write lock held, depending on
|
||||
* level and op->lock.
|
||||
*
|
||||
* Note: Only error code or btree pointer will be returned, it is unncessary
|
||||
* for callers to check NULL pointer.
|
||||
*/
|
||||
struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op,
|
||||
struct bkey *k, int level, bool write,
|
||||
@@ -1085,6 +1088,10 @@ retry:
|
||||
mutex_unlock(&b->c->bucket_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Only error code or btree pointer will be returned, it is unncessary for
|
||||
* callers to check NULL pointer.
|
||||
*/
|
||||
struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op,
|
||||
int level, bool wait,
|
||||
struct btree *parent)
|
||||
|
||||
@@ -917,6 +917,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
|
||||
|
||||
if (!d->stripe_size)
|
||||
d->stripe_size = 1 << 31;
|
||||
else if (d->stripe_size < BCH_MIN_STRIPE_SZ)
|
||||
d->stripe_size = roundup(BCH_MIN_STRIPE_SZ, d->stripe_size);
|
||||
|
||||
n = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
|
||||
if (!n || n > max_stripes) {
|
||||
@@ -2041,7 +2043,7 @@ static int run_cache_set(struct cache_set *c)
|
||||
c->root = bch_btree_node_get(c, NULL, k,
|
||||
j->btree_level,
|
||||
true, NULL);
|
||||
if (IS_ERR_OR_NULL(c->root))
|
||||
if (IS_ERR(c->root))
|
||||
goto err;
|
||||
|
||||
list_del_init(&c->root->list);
|
||||
|
||||
@@ -857,7 +857,7 @@ static int bch_dirty_init_thread(void *arg)
|
||||
int cur_idx, prev_idx, skip_nr;
|
||||
|
||||
k = p = NULL;
|
||||
cur_idx = prev_idx = 0;
|
||||
prev_idx = 0;
|
||||
|
||||
bch_btree_iter_init(&c->root->keys, &iter, NULL);
|
||||
k = bch_btree_iter_next_filter(&iter, &c->root->keys, bch_ptr_bad);
|
||||
|
||||
@@ -316,9 +316,6 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
|
||||
* compare it to the stored version, just create the meta
|
||||
*/
|
||||
if (io_sq->disable_meta_caching) {
|
||||
if (unlikely(!ena_tx_ctx->meta_valid))
|
||||
return -EINVAL;
|
||||
|
||||
*have_meta = true;
|
||||
return ena_com_create_meta(io_sq, ena_meta);
|
||||
}
|
||||
|
||||
@@ -77,6 +77,8 @@ static void ena_unmap_tx_buff(struct ena_ring *tx_ring,
|
||||
struct ena_tx_buffer *tx_info);
|
||||
static int ena_create_io_tx_queues_in_range(struct ena_adapter *adapter,
|
||||
int first_index, int count);
|
||||
static void ena_free_all_io_tx_resources_in_range(struct ena_adapter *adapter,
|
||||
int first_index, int count);
|
||||
|
||||
static void ena_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
{
|
||||
@@ -388,23 +390,22 @@ static void ena_init_all_xdp_queues(struct ena_adapter *adapter)
|
||||
|
||||
static int ena_setup_and_create_all_xdp_queues(struct ena_adapter *adapter)
|
||||
{
|
||||
u32 xdp_first_ring = adapter->xdp_first_ring;
|
||||
u32 xdp_num_queues = adapter->xdp_num_queues;
|
||||
int rc = 0;
|
||||
|
||||
rc = ena_setup_tx_resources_in_range(adapter, adapter->xdp_first_ring,
|
||||
adapter->xdp_num_queues);
|
||||
rc = ena_setup_tx_resources_in_range(adapter, xdp_first_ring, xdp_num_queues);
|
||||
if (rc)
|
||||
goto setup_err;
|
||||
|
||||
rc = ena_create_io_tx_queues_in_range(adapter,
|
||||
adapter->xdp_first_ring,
|
||||
adapter->xdp_num_queues);
|
||||
rc = ena_create_io_tx_queues_in_range(adapter, xdp_first_ring, xdp_num_queues);
|
||||
if (rc)
|
||||
goto create_err;
|
||||
|
||||
return 0;
|
||||
|
||||
create_err:
|
||||
ena_free_all_io_tx_resources(adapter);
|
||||
ena_free_all_io_tx_resources_in_range(adapter, xdp_first_ring, xdp_num_queues);
|
||||
setup_err:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -577,11 +577,14 @@ void aq_ring_free(struct aq_ring_s *self)
|
||||
return;
|
||||
|
||||
kfree(self->buff_ring);
|
||||
self->buff_ring = NULL;
|
||||
|
||||
if (self->dx_ring)
|
||||
if (self->dx_ring) {
|
||||
dma_free_coherent(aq_nic_get_dev(self->aq_nic),
|
||||
self->size * self->dx_size, self->dx_ring,
|
||||
self->dx_ring_pa);
|
||||
self->dx_ring = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int aq_ring_fill_stats_data(struct aq_ring_s *self, u64 *data)
|
||||
|
||||
@@ -1924,8 +1924,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
|
||||
/* Skip VLAN tag if present */
|
||||
if (ether_type == ETH_P_8021Q) {
|
||||
struct vlan_ethhdr *vhdr =
|
||||
(struct vlan_ethhdr *)skb->data;
|
||||
struct vlan_ethhdr *vhdr = skb_vlan_eth_hdr(skb);
|
||||
|
||||
ether_type = ntohs(vhdr->h_vlan_encapsulated_proto);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user