mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c6e9d51b1a5("net/mlx5e: Initialize link speed to zero")1bffcea429("net/mlx5e: Add devlink hairpin queues parameters") https://lore.kernel.org/all/20230324120623.4ebbc66f@canb.auug.org.au/ https://lore.kernel.org/all/20230321211135.47711-1-saeed@kernel.org/ Adjacent changes: drivers/net/phy/phy.c323fe43cf9("net: phy: Improved PHY error reporting in state machine")4203d84032("net: phy: Ensure state transitions are processed from phy_stop()") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -78,6 +78,7 @@ modules.order
|
||||
# RPM spec file (make rpm-pkg)
|
||||
#
|
||||
/*.spec
|
||||
/rpmbuild/
|
||||
|
||||
#
|
||||
# Debian directory (make deb-pkg)
|
||||
|
||||
@@ -23,10 +23,13 @@ metadata is supported, this set will grow:
|
||||
An XDP program can use these kfuncs to read the metadata into stack
|
||||
variables for its own consumption. Or, to pass the metadata on to other
|
||||
consumers, an XDP program can store it into the metadata area carried
|
||||
ahead of the packet.
|
||||
ahead of the packet. Not all packets will necessary have the requested
|
||||
metadata available in which case the driver returns ``-ENODATA``.
|
||||
|
||||
Not all kfuncs have to be implemented by the device driver; when not
|
||||
implemented, the default ones that return ``-EOPNOTSUPP`` will be used.
|
||||
implemented, the default ones that return ``-EOPNOTSUPP`` will be used
|
||||
to indicate the device driver have not implemented this kfunc.
|
||||
|
||||
|
||||
Within an XDP frame, the metadata layout (accessed via ``xdp_buff``) is
|
||||
as follows::
|
||||
|
||||
@@ -19157,9 +19157,7 @@ W: http://www.brownhat.org/sis900.html
|
||||
F: drivers/net/ethernet/sis/sis900.*
|
||||
|
||||
SIS FRAMEBUFFER DRIVER
|
||||
M: Thomas Winischhofer <thomas@winischhofer.net>
|
||||
S: Maintained
|
||||
W: http://www.winischhofer.net/linuxsisvga.shtml
|
||||
S: Orphan
|
||||
F: Documentation/fb/sisfb.rst
|
||||
F: drivers/video/fbdev/sis/
|
||||
F: include/video/sisfb.h
|
||||
|
||||
13
Makefile
13
Makefile
@@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -274,8 +274,7 @@ no-dot-config-targets := $(clean-targets) \
|
||||
cscope gtags TAGS tags help% %docs check% coccicheck \
|
||||
$(version_h) headers headers_% archheaders archscripts \
|
||||
%asm-generic kernelversion %src-pkg dt_binding_check \
|
||||
outputmakefile rustavailable rustfmt rustfmtcheck \
|
||||
scripts_package
|
||||
outputmakefile rustavailable rustfmt rustfmtcheck
|
||||
# Installation targets should not require compiler. Unfortunately, vdso_install
|
||||
# is an exception where build artifacts may be updated. This must be fixed.
|
||||
no-compiler-targets := $(no-dot-config-targets) install dtbs_install \
|
||||
@@ -1605,7 +1604,7 @@ MRPROPER_FILES += include/config include/generated \
|
||||
certs/signing_key.pem \
|
||||
certs/x509.genkey \
|
||||
vmlinux-gdb.py \
|
||||
*.spec \
|
||||
*.spec rpmbuild \
|
||||
rust/libmacros.so
|
||||
|
||||
# clean - Delete most, but leave enough to build external modules
|
||||
@@ -1656,10 +1655,6 @@ distclean: mrproper
|
||||
%pkg: include/config/kernel.release FORCE
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||
|
||||
PHONY += scripts_package
|
||||
scripts_package: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/list-gitignored
|
||||
|
||||
# Brief documentation of the typical targets used
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -1886,6 +1881,8 @@ endif
|
||||
|
||||
else # KBUILD_EXTMOD
|
||||
|
||||
filechk_kernel.release = echo $(KERNELRELEASE)
|
||||
|
||||
###
|
||||
# External module support.
|
||||
# When building external modules the kernel used as basis is considered
|
||||
|
||||
@@ -116,7 +116,7 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
|
||||
tocopy = n;
|
||||
|
||||
ua_flags = uaccess_save_and_enable();
|
||||
memcpy((void *)to, from, tocopy);
|
||||
__memcpy((void *)to, from, tocopy);
|
||||
uaccess_restore(ua_flags);
|
||||
to += tocopy;
|
||||
from += tocopy;
|
||||
@@ -178,7 +178,7 @@ __clear_user_memset(void __user *addr, unsigned long n)
|
||||
tocopy = n;
|
||||
|
||||
ua_flags = uaccess_save_and_enable();
|
||||
memset((void *)addr, 0, tocopy);
|
||||
__memset((void *)addr, 0, tocopy);
|
||||
uaccess_restore(ua_flags);
|
||||
addr += tocopy;
|
||||
n -= tocopy;
|
||||
|
||||
@@ -128,8 +128,9 @@ struct snp_psc_desc {
|
||||
struct psc_entry entries[VMGEXIT_PSC_MAX_ENTRY];
|
||||
} __packed;
|
||||
|
||||
/* Guest message request error code */
|
||||
/* Guest message request error codes */
|
||||
#define SNP_GUEST_REQ_INVALID_LEN BIT_ULL(32)
|
||||
#define SNP_GUEST_REQ_ERR_BUSY BIT_ULL(33)
|
||||
|
||||
#define GHCB_MSR_TERM_REQ 0x100
|
||||
#define GHCB_MSR_TERM_REASON_SET_POS 12
|
||||
|
||||
@@ -2355,6 +2355,7 @@ static void mce_restart(void)
|
||||
{
|
||||
mce_timer_delete_all();
|
||||
on_each_cpu(mce_cpu_restart, NULL, 1);
|
||||
mce_schedule_work();
|
||||
}
|
||||
|
||||
/* Toggle features for corrected errors */
|
||||
|
||||
@@ -368,7 +368,6 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
|
||||
{
|
||||
struct resctrl_schema *s;
|
||||
struct rdtgroup *rdtgrp;
|
||||
struct rdt_domain *dom;
|
||||
struct rdt_resource *r;
|
||||
char *tok, *resname;
|
||||
int ret = 0;
|
||||
@@ -397,10 +396,7 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
|
||||
goto out;
|
||||
}
|
||||
|
||||
list_for_each_entry(s, &resctrl_schema_all, list) {
|
||||
list_for_each_entry(dom, &s->res->domains, list)
|
||||
memset(dom->staged_config, 0, sizeof(dom->staged_config));
|
||||
}
|
||||
rdt_staged_configs_clear();
|
||||
|
||||
while ((tok = strsep(&buf, "\n")) != NULL) {
|
||||
resname = strim(strsep(&tok, ":"));
|
||||
@@ -445,6 +441,7 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
|
||||
}
|
||||
|
||||
out:
|
||||
rdt_staged_configs_clear();
|
||||
rdtgroup_kn_unlock(of->kn);
|
||||
cpus_read_unlock();
|
||||
return ret ?: nbytes;
|
||||
|
||||
@@ -555,5 +555,6 @@ void __check_limbo(struct rdt_domain *d, bool force_free);
|
||||
void rdt_domain_reconfigure_cdp(struct rdt_resource *r);
|
||||
void __init thread_throttle_mode_init(void);
|
||||
void __init mbm_config_rftype_init(const char *config);
|
||||
void rdt_staged_configs_clear(void);
|
||||
|
||||
#endif /* _ASM_X86_RESCTRL_INTERNAL_H */
|
||||
|
||||
@@ -78,6 +78,19 @@ void rdt_last_cmd_printf(const char *fmt, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void rdt_staged_configs_clear(void)
|
||||
{
|
||||
struct rdt_resource *r;
|
||||
struct rdt_domain *dom;
|
||||
|
||||
lockdep_assert_held(&rdtgroup_mutex);
|
||||
|
||||
for_each_alloc_capable_rdt_resource(r) {
|
||||
list_for_each_entry(dom, &r->domains, list)
|
||||
memset(dom->staged_config, 0, sizeof(dom->staged_config));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Trivial allocator for CLOSIDs. Since h/w only supports a small number,
|
||||
* we can keep a bitmap of free CLOSIDs in a single integer.
|
||||
@@ -3107,7 +3120,9 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp)
|
||||
{
|
||||
struct resctrl_schema *s;
|
||||
struct rdt_resource *r;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
rdt_staged_configs_clear();
|
||||
|
||||
list_for_each_entry(s, &resctrl_schema_all, list) {
|
||||
r = s->res;
|
||||
@@ -3119,20 +3134,22 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp)
|
||||
} else {
|
||||
ret = rdtgroup_init_cat(s, rdtgrp->closid);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = resctrl_arch_update_domains(r, rdtgrp->closid);
|
||||
if (ret < 0) {
|
||||
rdt_last_cmd_puts("Failed to initialize allocations\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rdtgrp->mode = RDT_MODE_SHAREABLE;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
rdt_staged_configs_clear();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
|
||||
|
||||
@@ -2183,9 +2183,6 @@ int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, unsigned
|
||||
struct ghcb *ghcb;
|
||||
int ret;
|
||||
|
||||
if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return -ENODEV;
|
||||
|
||||
if (!fw_err)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2212,15 +2209,26 @@ int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, unsigned
|
||||
if (ret)
|
||||
goto e_put;
|
||||
|
||||
if (ghcb->save.sw_exit_info_2) {
|
||||
*fw_err = ghcb->save.sw_exit_info_2;
|
||||
switch (*fw_err) {
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case SNP_GUEST_REQ_ERR_BUSY:
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
|
||||
case SNP_GUEST_REQ_INVALID_LEN:
|
||||
/* Number of expected pages are returned in RBX */
|
||||
if (exit_code == SVM_VMGEXIT_EXT_GUEST_REQUEST &&
|
||||
ghcb->save.sw_exit_info_2 == SNP_GUEST_REQ_INVALID_LEN)
|
||||
if (exit_code == SVM_VMGEXIT_EXT_GUEST_REQUEST) {
|
||||
input->data_npages = ghcb_get_rbx(ghcb);
|
||||
|
||||
*fw_err = ghcb->save.sw_exit_info_2;
|
||||
|
||||
ret = -ENOSPC;
|
||||
break;
|
||||
}
|
||||
fallthrough;
|
||||
default:
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
e_put:
|
||||
|
||||
@@ -600,7 +600,8 @@ void __init sme_enable(struct boot_params *bp)
|
||||
cmdline_ptr = (const char *)((u64)bp->hdr.cmd_line_ptr |
|
||||
((u64)bp->ext_cmd_line_ptr << 32));
|
||||
|
||||
cmdline_find_option(cmdline_ptr, cmdline_arg, buffer, sizeof(buffer));
|
||||
if (cmdline_find_option(cmdline_ptr, cmdline_arg, buffer, sizeof(buffer)) < 0)
|
||||
return;
|
||||
|
||||
if (!strncmp(buffer, cmdline_on, sizeof(buffer)))
|
||||
sme_me_mask = me_mask;
|
||||
|
||||
@@ -79,16 +79,16 @@ static int pkcs7_digest(struct pkcs7_message *pkcs7,
|
||||
}
|
||||
|
||||
if (sinfo->msgdigest_len != sig->digest_size) {
|
||||
pr_debug("Sig %u: Invalid digest size (%u)\n",
|
||||
sinfo->index, sinfo->msgdigest_len);
|
||||
pr_warn("Sig %u: Invalid digest size (%u)\n",
|
||||
sinfo->index, sinfo->msgdigest_len);
|
||||
ret = -EBADMSG;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (memcmp(sig->digest, sinfo->msgdigest,
|
||||
sinfo->msgdigest_len) != 0) {
|
||||
pr_debug("Sig %u: Message digest doesn't match\n",
|
||||
sinfo->index);
|
||||
pr_warn("Sig %u: Message digest doesn't match\n",
|
||||
sinfo->index);
|
||||
ret = -EKEYREJECTED;
|
||||
goto error;
|
||||
}
|
||||
@@ -478,7 +478,7 @@ int pkcs7_supply_detached_data(struct pkcs7_message *pkcs7,
|
||||
const void *data, size_t datalen)
|
||||
{
|
||||
if (pkcs7->data) {
|
||||
pr_debug("Data already supplied\n");
|
||||
pr_warn("Data already supplied\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
pkcs7->data = data;
|
||||
|
||||
@@ -74,7 +74,7 @@ static int pefile_parse_binary(const void *pebuf, unsigned int pelen,
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_debug("Unknown PEOPT magic = %04hx\n", pe32->magic);
|
||||
pr_warn("Unknown PEOPT magic = %04hx\n", pe32->magic);
|
||||
return -ELIBBAD;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ static int pefile_parse_binary(const void *pebuf, unsigned int pelen,
|
||||
ctx->certs_size = ddir->certs.size;
|
||||
|
||||
if (!ddir->certs.virtual_address || !ddir->certs.size) {
|
||||
pr_debug("Unsigned PE binary\n");
|
||||
pr_warn("Unsigned PE binary\n");
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ static int pefile_strip_sig_wrapper(const void *pebuf,
|
||||
unsigned len;
|
||||
|
||||
if (ctx->sig_len < sizeof(wrapper)) {
|
||||
pr_debug("Signature wrapper too short\n");
|
||||
pr_warn("Signature wrapper too short\n");
|
||||
return -ELIBBAD;
|
||||
}
|
||||
|
||||
@@ -135,19 +135,23 @@ static int pefile_strip_sig_wrapper(const void *pebuf,
|
||||
pr_debug("sig wrapper = { %x, %x, %x }\n",
|
||||
wrapper.length, wrapper.revision, wrapper.cert_type);
|
||||
|
||||
/* Both pesign and sbsign round up the length of certificate table
|
||||
* (in optional header data directories) to 8 byte alignment.
|
||||
/* sbsign rounds up the length of certificate table (in optional
|
||||
* header data directories) to 8 byte alignment. However, the PE
|
||||
* specification states that while entries are 8-byte aligned, this is
|
||||
* not included in their length, and as a result, pesign has not
|
||||
* rounded up since 0.110.
|
||||
*/
|
||||
if (round_up(wrapper.length, 8) != ctx->sig_len) {
|
||||
pr_debug("Signature wrapper len wrong\n");
|
||||
if (wrapper.length > ctx->sig_len) {
|
||||
pr_warn("Signature wrapper bigger than sig len (%x > %x)\n",
|
||||
ctx->sig_len, wrapper.length);
|
||||
return -ELIBBAD;
|
||||
}
|
||||
if (wrapper.revision != WIN_CERT_REVISION_2_0) {
|
||||
pr_debug("Signature is not revision 2.0\n");
|
||||
pr_warn("Signature is not revision 2.0\n");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (wrapper.cert_type != WIN_CERT_TYPE_PKCS_SIGNED_DATA) {
|
||||
pr_debug("Signature certificate type is not PKCS\n");
|
||||
pr_warn("Signature certificate type is not PKCS\n");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
@@ -160,7 +164,7 @@ static int pefile_strip_sig_wrapper(const void *pebuf,
|
||||
ctx->sig_offset += sizeof(wrapper);
|
||||
ctx->sig_len -= sizeof(wrapper);
|
||||
if (ctx->sig_len < 4) {
|
||||
pr_debug("Signature data missing\n");
|
||||
pr_warn("Signature data missing\n");
|
||||
return -EKEYREJECTED;
|
||||
}
|
||||
|
||||
@@ -194,7 +198,7 @@ check_len:
|
||||
return 0;
|
||||
}
|
||||
not_pkcs7:
|
||||
pr_debug("Signature data not PKCS#7\n");
|
||||
pr_warn("Signature data not PKCS#7\n");
|
||||
return -ELIBBAD;
|
||||
}
|
||||
|
||||
@@ -337,8 +341,8 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen,
|
||||
digest_size = crypto_shash_digestsize(tfm);
|
||||
|
||||
if (digest_size != ctx->digest_len) {
|
||||
pr_debug("Digest size mismatch (%zx != %x)\n",
|
||||
digest_size, ctx->digest_len);
|
||||
pr_warn("Digest size mismatch (%zx != %x)\n",
|
||||
digest_size, ctx->digest_len);
|
||||
ret = -EBADMSG;
|
||||
goto error_no_desc;
|
||||
}
|
||||
@@ -369,7 +373,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen,
|
||||
* PKCS#7 certificate.
|
||||
*/
|
||||
if (memcmp(digest, ctx->digest, ctx->digest_len) != 0) {
|
||||
pr_debug("Digest mismatch\n");
|
||||
pr_warn("Digest mismatch\n");
|
||||
ret = -EKEYREJECTED;
|
||||
} else {
|
||||
pr_debug("The digests match!\n");
|
||||
|
||||
@@ -381,6 +381,7 @@ static void pata_parport_dev_release(struct device *dev)
|
||||
{
|
||||
struct pi_adapter *pi = container_of(dev, struct pi_adapter, dev);
|
||||
|
||||
ida_free(&pata_parport_bus_dev_ids, dev->id);
|
||||
kfree(pi);
|
||||
}
|
||||
|
||||
@@ -433,23 +434,27 @@ static struct pi_adapter *pi_init_one(struct parport *parport,
|
||||
if (bus_for_each_dev(&pata_parport_bus_type, NULL, &match, pi_find_dev))
|
||||
return NULL;
|
||||
|
||||
pi = kzalloc(sizeof(struct pi_adapter), GFP_KERNEL);
|
||||
if (!pi)
|
||||
id = ida_alloc(&pata_parport_bus_dev_ids, GFP_KERNEL);
|
||||
if (id < 0)
|
||||
return NULL;
|
||||
|
||||
pi = kzalloc(sizeof(struct pi_adapter), GFP_KERNEL);
|
||||
if (!pi) {
|
||||
ida_free(&pata_parport_bus_dev_ids, id);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* set up pi->dev before pi_probe_unit() so it can use dev_printk() */
|
||||
pi->dev.parent = &pata_parport_bus;
|
||||
pi->dev.bus = &pata_parport_bus_type;
|
||||
pi->dev.driver = &pr->driver;
|
||||
pi->dev.release = pata_parport_dev_release;
|
||||
id = ida_alloc(&pata_parport_bus_dev_ids, GFP_KERNEL);
|
||||
if (id < 0)
|
||||
return NULL; /* pata_parport_dev_release will do kfree(pi) */
|
||||
pi->dev.id = id;
|
||||
dev_set_name(&pi->dev, "pata_parport.%u", pi->dev.id);
|
||||
if (device_register(&pi->dev)) {
|
||||
put_device(&pi->dev);
|
||||
goto out_ida_free;
|
||||
/* pata_parport_dev_release will do ida_free(dev->id) and kfree(pi) */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pi->proto = pr;
|
||||
@@ -464,8 +469,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport,
|
||||
pi->port = parport->base;
|
||||
|
||||
par_cb.private = pi;
|
||||
pi->pardev = parport_register_dev_model(parport, DRV_NAME, &par_cb,
|
||||
pi->dev.id);
|
||||
pi->pardev = parport_register_dev_model(parport, DRV_NAME, &par_cb, id);
|
||||
if (!pi->pardev)
|
||||
goto out_module_put;
|
||||
|
||||
@@ -487,12 +491,13 @@ static struct pi_adapter *pi_init_one(struct parport *parport,
|
||||
|
||||
pi_connect(pi);
|
||||
if (ata_host_activate(host, 0, NULL, 0, &pata_parport_sht))
|
||||
goto out_unreg_parport;
|
||||
goto out_disconnect;
|
||||
|
||||
return pi;
|
||||
|
||||
out_unreg_parport:
|
||||
out_disconnect:
|
||||
pi_disconnect(pi);
|
||||
out_unreg_parport:
|
||||
parport_unregister_device(pi->pardev);
|
||||
if (pi->proto->release_proto)
|
||||
pi->proto->release_proto(pi);
|
||||
@@ -500,8 +505,7 @@ out_module_put:
|
||||
module_put(pi->proto->owner);
|
||||
out_unreg_dev:
|
||||
device_unregister(&pi->dev);
|
||||
out_ida_free:
|
||||
ida_free(&pata_parport_bus_dev_ids, pi->dev.id);
|
||||
/* pata_parport_dev_release will do ida_free(dev->id) and kfree(pi) */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -626,8 +630,7 @@ static void pi_remove_one(struct device *dev)
|
||||
pi_disconnect(pi);
|
||||
pi_release(pi);
|
||||
device_unregister(dev);
|
||||
ida_free(&pata_parport_bus_dev_ids, dev->id);
|
||||
/* pata_parport_dev_release will do kfree(pi) */
|
||||
/* pata_parport_dev_release will do ida_free(dev->id) and kfree(pi) */
|
||||
}
|
||||
|
||||
static ssize_t delete_device_store(struct bus_type *bus, const char *buf,
|
||||
@@ -643,6 +646,7 @@ static ssize_t delete_device_store(struct bus_type *bus, const char *buf,
|
||||
}
|
||||
|
||||
pi_remove_one(dev);
|
||||
put_device(dev);
|
||||
mutex_unlock(&pi_mutex);
|
||||
|
||||
return count;
|
||||
|
||||
@@ -2909,6 +2909,7 @@ close_card_oam(struct idt77252_dev *card)
|
||||
|
||||
recycle_rx_pool_skb(card, &vc->rcv.rx_pool);
|
||||
}
|
||||
kfree(vc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2952,6 +2953,15 @@ open_card_ubr0(struct idt77252_dev *card)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
close_card_ubr0(struct idt77252_dev *card)
|
||||
{
|
||||
struct vc_map *vc = card->vcs[0];
|
||||
|
||||
free_scq(card, vc->scq);
|
||||
kfree(vc);
|
||||
}
|
||||
|
||||
static int
|
||||
idt77252_dev_open(struct idt77252_dev *card)
|
||||
{
|
||||
@@ -3001,6 +3011,7 @@ static void idt77252_dev_close(struct atm_dev *dev)
|
||||
struct idt77252_dev *card = dev->dev_data;
|
||||
u32 conf;
|
||||
|
||||
close_card_ubr0(card);
|
||||
close_card_oam(card);
|
||||
|
||||
conf = SAR_CFG_RXPTH | /* enable receive path */
|
||||
|
||||
@@ -26,7 +26,14 @@
|
||||
#define ECDSA_HEADER_LEN 320
|
||||
|
||||
#define BTINTEL_PPAG_NAME "PPAG"
|
||||
#define BTINTEL_PPAG_PREFIX "\\_SB_.PCI0.XHCI.RHUB"
|
||||
|
||||
/* structure to store the PPAG data read from ACPI table */
|
||||
struct btintel_ppag {
|
||||
u32 domain;
|
||||
u32 mode;
|
||||
acpi_status status;
|
||||
struct hci_dev *hdev;
|
||||
};
|
||||
|
||||
#define CMD_WRITE_BOOT_PARAMS 0xfc0e
|
||||
struct cmd_write_boot_params {
|
||||
@@ -1295,17 +1302,16 @@ static acpi_status btintel_ppag_callback(acpi_handle handle, u32 lvl, void *data
|
||||
|
||||
status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
bt_dev_warn(hdev, "ACPI Failure: %s", acpi_format_exception(status));
|
||||
bt_dev_warn(hdev, "PPAG-BT: ACPI Failure: %s", acpi_format_exception(status));
|
||||
return status;
|
||||
}
|
||||
|
||||
if (strncmp(BTINTEL_PPAG_PREFIX, string.pointer,
|
||||
strlen(BTINTEL_PPAG_PREFIX))) {
|
||||
len = strlen(string.pointer);
|
||||
if (len < strlen(BTINTEL_PPAG_NAME)) {
|
||||
kfree(string.pointer);
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
len = strlen(string.pointer);
|
||||
if (strncmp((char *)string.pointer + len - 4, BTINTEL_PPAG_NAME, 4)) {
|
||||
kfree(string.pointer);
|
||||
return AE_OK;
|
||||
@@ -1314,7 +1320,8 @@ static acpi_status btintel_ppag_callback(acpi_handle handle, u32 lvl, void *data
|
||||
|
||||
status = acpi_evaluate_object(handle, NULL, NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
bt_dev_warn(hdev, "ACPI Failure: %s", acpi_format_exception(status));
|
||||
ppag->status = status;
|
||||
bt_dev_warn(hdev, "PPAG-BT: ACPI Failure: %s", acpi_format_exception(status));
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1323,8 +1330,9 @@ static acpi_status btintel_ppag_callback(acpi_handle handle, u32 lvl, void *data
|
||||
|
||||
if (p->type != ACPI_TYPE_PACKAGE || p->package.count != 2) {
|
||||
kfree(buffer.pointer);
|
||||
bt_dev_warn(hdev, "Invalid object type: %d or package count: %d",
|
||||
bt_dev_warn(hdev, "PPAG-BT: Invalid object type: %d or package count: %d",
|
||||
p->type, p->package.count);
|
||||
ppag->status = AE_ERROR;
|
||||
return AE_ERROR;
|
||||
}
|
||||
|
||||
@@ -1335,6 +1343,7 @@ static acpi_status btintel_ppag_callback(acpi_handle handle, u32 lvl, void *data
|
||||
|
||||
ppag->domain = (u32)p->package.elements[0].integer.value;
|
||||
ppag->mode = (u32)p->package.elements[1].integer.value;
|
||||
ppag->status = AE_OK;
|
||||
kfree(buffer.pointer);
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
@@ -2314,12 +2323,12 @@ error:
|
||||
|
||||
static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver)
|
||||
{
|
||||
acpi_status status;
|
||||
struct btintel_ppag ppag;
|
||||
struct sk_buff *skb;
|
||||
struct btintel_loc_aware_reg ppag_cmd;
|
||||
acpi_handle handle;
|
||||
|
||||
/* PPAG is not supported if CRF is HrP2, Jfp2, JfP1 */
|
||||
/* PPAG is not supported if CRF is HrP2, Jfp2, JfP1 */
|
||||
switch (ver->cnvr_top & 0xFFF) {
|
||||
case 0x504: /* Hrp2 */
|
||||
case 0x202: /* Jfp2 */
|
||||
@@ -2327,29 +2336,35 @@ static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver
|
||||
return;
|
||||
}
|
||||
|
||||
handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev));
|
||||
if (!handle) {
|
||||
bt_dev_info(hdev, "No support for BT device in ACPI firmware");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(&ppag, 0, sizeof(ppag));
|
||||
|
||||
ppag.hdev = hdev;
|
||||
status = acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, NULL,
|
||||
btintel_ppag_callback, &ppag, NULL);
|
||||
ppag.status = AE_NOT_FOUND;
|
||||
acpi_walk_namespace(ACPI_TYPE_PACKAGE, handle, 1, NULL,
|
||||
btintel_ppag_callback, &ppag, NULL);
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
/* Do not log warning message if ACPI entry is not found */
|
||||
if (status == AE_NOT_FOUND)
|
||||
if (ACPI_FAILURE(ppag.status)) {
|
||||
if (ppag.status == AE_NOT_FOUND) {
|
||||
bt_dev_dbg(hdev, "PPAG-BT: ACPI entry not found");
|
||||
return;
|
||||
bt_dev_warn(hdev, "PPAG: ACPI Failure: %s", acpi_format_exception(status));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ppag.domain != 0x12) {
|
||||
bt_dev_warn(hdev, "PPAG-BT Domain disabled");
|
||||
bt_dev_warn(hdev, "PPAG-BT: domain is not bluetooth");
|
||||
return;
|
||||
}
|
||||
|
||||
/* PPAG mode, BIT0 = 0 Disabled, BIT0 = 1 Enabled */
|
||||
if (!(ppag.mode & BIT(0))) {
|
||||
bt_dev_dbg(hdev, "PPAG disabled");
|
||||
bt_dev_dbg(hdev, "PPAG-BT: disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,13 +137,6 @@ struct intel_offload_use_cases {
|
||||
__u8 preset[8];
|
||||
} __packed;
|
||||
|
||||
/* structure to store the PPAG data read from ACPI table */
|
||||
struct btintel_ppag {
|
||||
u32 domain;
|
||||
u32 mode;
|
||||
struct hci_dev *hdev;
|
||||
};
|
||||
|
||||
struct btintel_loc_aware_reg {
|
||||
__le32 mcc;
|
||||
__le32 sel;
|
||||
|
||||
@@ -122,6 +122,21 @@ static int btqcomsmd_setup(struct hci_dev *hdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btqcomsmd_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = qca_set_bdaddr_rome(hdev, bdaddr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* The firmware stops responding for a while after setting the bdaddr,
|
||||
* causing timeouts for subsequent commands. Sleep a bit to avoid this.
|
||||
*/
|
||||
usleep_range(1000, 10000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btqcomsmd_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct btqcomsmd *btq;
|
||||
@@ -162,7 +177,7 @@ static int btqcomsmd_probe(struct platform_device *pdev)
|
||||
hdev->close = btqcomsmd_close;
|
||||
hdev->send = btqcomsmd_send;
|
||||
hdev->setup = btqcomsmd_setup;
|
||||
hdev->set_bdaddr = qca_set_bdaddr_rome;
|
||||
hdev->set_bdaddr = btqcomsmd_set_bdaddr;
|
||||
|
||||
ret = hci_register_dev(hdev);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -354,6 +354,7 @@ static void btsdio_remove(struct sdio_func *func)
|
||||
|
||||
BT_DBG("func %p", func);
|
||||
|
||||
cancel_work_sync(&data->work);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user