Skip to content

Commit

Permalink
Merge tag 'v6.2.2' into 6.2
Browse files Browse the repository at this point in the history
This is the 6.2.2 stable release
  • Loading branch information
xanmod committed Mar 3, 2023
2 parents 86e7743 + 6ab3eda commit 7adb581
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 66 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 2
SUBLEVEL = 1
SUBLEVEL = 2
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
snps,dis_enblslpm_quirk;
snps,dis_u2_susphy_quirk;
snps,dis_u3_susphy_quirk;
snps,usb2_gadget_lpm_disable;
snps,usb2-gadget-lpm-disable;
phy-names = "usb2-phy", "usb3-phy";
phys = <&usb0_hsphy0>, <&usb0_ssphy0>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
snps,dis_enblslpm_quirk;
snps,dis_u2_susphy_quirk;
snps,dis_u3_susphy_quirk;
snps,usb2_gadget_lpm_disable;
snps,usb2-gadget-lpm-disable;
phy-names = "usb2-phy", "usb3-phy";
phys = <&usb1_hsphy0>, <&usb1_ssphy0>;
};
Expand Down
51 changes: 25 additions & 26 deletions arch/arm64/crypto/sm4-ce-gcm-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,72 +135,75 @@ static void gcm_calculate_auth_mac(struct aead_request *req, u8 ghash[])
}

static int gcm_crypt(struct aead_request *req, struct skcipher_walk *walk,
struct sm4_gcm_ctx *ctx, u8 ghash[],
u8 ghash[], int err,
void (*sm4_ce_pmull_gcm_crypt)(const u32 *rkey_enc,
u8 *dst, const u8 *src, u8 *iv,
unsigned int nbytes, u8 *ghash,
const u8 *ghash_table, const u8 *lengths))
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead);
u8 __aligned(8) iv[SM4_BLOCK_SIZE];
be128 __aligned(8) lengths;
int err;

memset(ghash, 0, SM4_BLOCK_SIZE);

lengths.a = cpu_to_be64(req->assoclen * 8);
lengths.b = cpu_to_be64(walk->total * 8);

memcpy(iv, walk->iv, GCM_IV_SIZE);
memcpy(iv, req->iv, GCM_IV_SIZE);
put_unaligned_be32(2, iv + GCM_IV_SIZE);

kernel_neon_begin();

if (req->assoclen)
gcm_calculate_auth_mac(req, ghash);

do {
while (walk->nbytes) {
unsigned int tail = walk->nbytes % SM4_BLOCK_SIZE;
const u8 *src = walk->src.virt.addr;
u8 *dst = walk->dst.virt.addr;

if (walk->nbytes == walk->total) {
tail = 0;

sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv,
walk->nbytes, ghash,
ctx->ghash_table,
(const u8 *)&lengths);
} else if (walk->nbytes - tail) {
sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv,
walk->nbytes - tail, ghash,
ctx->ghash_table, NULL);

kernel_neon_end();

return skcipher_walk_done(walk, 0);
}

sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv,
walk->nbytes - tail, ghash,
ctx->ghash_table, NULL);

kernel_neon_end();

err = skcipher_walk_done(walk, tail);
if (err)
return err;
if (walk->nbytes)
kernel_neon_begin();
} while (walk->nbytes > 0);

return 0;
kernel_neon_begin();
}

sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, NULL, NULL, iv,
walk->nbytes, ghash, ctx->ghash_table,
(const u8 *)&lengths);

kernel_neon_end();

return err;
}

static int gcm_encrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead);
u8 __aligned(8) ghash[SM4_BLOCK_SIZE];
struct skcipher_walk walk;
int err;

err = skcipher_walk_aead_encrypt(&walk, req, false);
if (err)
return err;

err = gcm_crypt(req, &walk, ctx, ghash, sm4_ce_pmull_gcm_enc);
err = gcm_crypt(req, &walk, ghash, err, sm4_ce_pmull_gcm_enc);
if (err)
return err;

Expand All @@ -215,17 +218,13 @@ static int gcm_decrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
unsigned int authsize = crypto_aead_authsize(aead);
struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead);
u8 __aligned(8) ghash[SM4_BLOCK_SIZE];
u8 authtag[SM4_BLOCK_SIZE];
struct skcipher_walk walk;
int err;

err = skcipher_walk_aead_decrypt(&walk, req, false);
if (err)
return err;

err = gcm_crypt(req, &walk, ctx, ghash, sm4_ce_pmull_gcm_dec);
err = gcm_crypt(req, &walk, ghash, err, sm4_ce_pmull_gcm_dec);
if (err)
return err;

Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -10359,6 +10359,7 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(
ret = p_notify->aux_reply.length;
*operation_result = p_notify->result;
out:
reinit_completion(&adev->dm.dmub_aux_transfer_done);
mutex_unlock(&adev->dm.dpia_aux_lock);
return ret;
}
Expand Down Expand Up @@ -10386,6 +10387,8 @@ int amdgpu_dm_process_dmub_set_config_sync(
*operation_result = SET_CONFIG_UNKNOWN_ERROR;
}

if (!is_cmd_complete)
reinit_completion(&adev->dm.dmub_aux_transfer_done);
mutex_unlock(&adev->dm.dpia_aux_lock);
return ret;
}
Expand Down
24 changes: 24 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,27 @@ void dcn314_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx)
pipe_ctx->stream_res.stream_enc->funcs->set_input_mode(pipe_ctx->stream_res.stream_enc,
pix_per_cycle);
}

void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool power_on)
{
struct dc_context *ctx = hws->ctx;
union dmub_rb_cmd cmd;

if (hws->ctx->dc->debug.disable_hubp_power_gate)
return;

PERF_TRACE();

memset(&cmd, 0, sizeof(cmd));
cmd.domain_control.header.type = DMUB_CMD__VBIOS;
cmd.domain_control.header.sub_type = DMUB_CMD__VBIOS_DOMAIN_CONTROL;
cmd.domain_control.header.payload_bytes = sizeof(cmd.domain_control.data);
cmd.domain_control.data.inst = hubp_inst;
cmd.domain_control.data.power_gate = !power_on;

dc_dmub_srv_cmd_queue(ctx->dmub_srv, &cmd);
dc_dmub_srv_cmd_execute(ctx->dmub_srv);
dc_dmub_srv_wait_idle(ctx->dmub_srv);

PERF_TRACE();
}
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ unsigned int dcn314_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsig

void dcn314_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx);

void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool power_on);

#endif /* __DC_HWSS_DCN314_H__ */
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static const struct hwseq_private_funcs dcn314_private_funcs = {
.plane_atomic_disable = dcn20_plane_atomic_disable,
.plane_atomic_power_down = dcn10_plane_atomic_power_down,
.enable_power_gating_plane = dcn314_enable_power_gating_plane,
.hubp_pg_control = dcn31_hubp_pg_control,
.hubp_pg_control = dcn314_hubp_pg_control,
.program_all_writeback_pipes_in_tree = dcn30_program_all_writeback_pipes_in_tree,
.update_odm = dcn314_update_odm,
.dsc_pg_control = dcn314_dsc_pg_control,
Expand Down
25 changes: 25 additions & 0 deletions drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ enum dmub_cmd_vbios_type {
* Query DP alt status on a transmitter.
*/
DMUB_CMD__VBIOS_TRANSMITTER_QUERY_DP_ALT = 26,
/**
* Controls domain power gating
*/
DMUB_CMD__VBIOS_DOMAIN_CONTROL = 28,
};

//==============================================================================
Expand Down Expand Up @@ -1204,6 +1208,23 @@ struct dmub_rb_cmd_dig1_transmitter_control {
union dmub_cmd_dig1_transmitter_control_data transmitter_control; /**< payload */
};

/**
* struct dmub_rb_cmd_domain_control_data - Data for DOMAIN power control
*/
struct dmub_rb_cmd_domain_control_data {
uint8_t inst : 6; /**< DOMAIN instance to control */
uint8_t power_gate : 1; /**< 1=power gate, 0=power up */
uint8_t reserved[3]; /**< Reserved for future use */
};

/**
* struct dmub_rb_cmd_domain_control - Controls DOMAIN power gating
*/
struct dmub_rb_cmd_domain_control {
struct dmub_cmd_header header; /**< header */
struct dmub_rb_cmd_domain_control_data data; /**< payload */
};

/**
* DPIA tunnel command parameters.
*/
Expand Down Expand Up @@ -3231,6 +3252,10 @@ union dmub_rb_cmd {
* Definition of a DMUB_CMD__VBIOS_DIG1_TRANSMITTER_CONTROL command.
*/
struct dmub_rb_cmd_dig1_transmitter_control dig1_transmitter_control;
/**
* Definition of a DMUB_CMD__VBIOS_DOMAIN_CONTROL command.
*/
struct dmub_rb_cmd_domain_control domain_control;
/**
* Definition of a DMUB_CMD__PSR_SET_VERSION command.
*/
Expand Down
18 changes: 3 additions & 15 deletions drivers/net/wireless/realtek/rtw88/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s
return -ENOMEM;

usb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context);
urb->transfer_flags |= URB_ZERO_PACKET;
ret = usb_submit_urb(urb, GFP_ATOMIC);

usb_free_urb(urb);
Expand Down Expand Up @@ -413,24 +414,11 @@ static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf,
u32 size)
{
const struct rtw_chip_info *chip = rtwdev->chip;
struct rtw_usb *rtwusb;
struct rtw_tx_pkt_info pkt_info = {0};
u32 len, desclen;

rtwusb = rtw_get_usb_priv(rtwdev);

pkt_info.tx_pkt_size = size;
pkt_info.qsel = TX_DESC_QSEL_BEACON;

desclen = chip->tx_pkt_desc_sz;
len = desclen + size;
if (len % rtwusb->bulkout_size == 0) {
len += RTW_USB_PACKET_OFFSET_SZ;
pkt_info.offset = desclen + RTW_USB_PACKET_OFFSET_SZ;
pkt_info.pkt_offset = 1;
} else {
pkt_info.offset = desclen;
}
pkt_info.offset = chip->tx_pkt_desc_sz;

return rtw_usb_write_data(rtwdev, &pkt_info, buf);
}
Expand Down Expand Up @@ -471,9 +459,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev,
u8 *pkt_desc;
int ep;

pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
memset(pkt_desc, 0, chip->tx_pkt_desc_sz);
pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
ep = qsel_to_ep(rtwusb, pkt_info->qsel);
rtw_tx_fill_tx_desc(pkt_info, skb);
rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);
Expand Down
7 changes: 4 additions & 3 deletions drivers/tty/vt/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,11 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
unsigned int this_round, skip = 0;
int size;

ret = -ENXIO;
vc = vcs_vc(inode, &viewed);
if (!vc)
goto unlock_out;
if (!vc) {
ret = -ENXIO;
break;
}

/* Check whether we are above size each round,
* as copy_to_user at the end of this loop
Expand Down
5 changes: 2 additions & 3 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,9 +2389,8 @@ static int usb_enumerate_device_otg(struct usb_device *udev)
* usb_enumerate_device - Read device configs/intfs/otg (usbcore-internal)
* @udev: newly addressed device (in ADDRESS state)
*
* This is only called by usb_new_device() and usb_authorize_device()
* and FIXME -- all comments that apply to them apply here wrt to
* environment.
* This is only called by usb_new_device() -- all comments that apply there
* apply here wrt to environment.
*
* If the device is WUSB and not authorized, we don't attempt to read
* the string descriptors, as they will be errored out by the device
Expand Down
5 changes: 0 additions & 5 deletions drivers/usb/core/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,11 +869,7 @@ read_descriptors(struct file *filp, struct kobject *kobj,
size_t srclen, n;
int cfgno;
void *src;
int retval;

retval = usb_lock_device_interruptible(udev);
if (retval < 0)
return -EINTR;
/* The binary attribute begins with the device descriptor.
* Following that are the raw descriptor entries for all the
* configurations (config plus subsidiary descriptors).
Expand All @@ -898,7 +894,6 @@ read_descriptors(struct file *filp, struct kobject *kobj,
off -= srclen;
}
}
usb_unlock_device(udev);
return count - nleft;
}

Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/dwc3/dwc3-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1
#define PCI_DEVICE_ID_INTEL_RPL 0xa70e
#define PCI_DEVICE_ID_INTEL_RPLS 0x7a61
#define PCI_DEVICE_ID_INTEL_MTLM 0x7eb1
#define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1
#define PCI_DEVICE_ID_INTEL_MTL 0x7e7e
#define PCI_DEVICE_ID_INTEL_TGL 0x9a15
Expand Down Expand Up @@ -467,6 +468,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS),
(kernel_ulong_t) &dwc3_pci_intel_swnode, },

{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLM),
(kernel_ulong_t) &dwc3_pci_intel_swnode, },

{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP),
(kernel_ulong_t) &dwc3_pci_intel_swnode, },

Expand Down

0 comments on commit 7adb581

Please sign in to comment.