Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 24f7df5

Browse files
committed
Update kernel 5.6.11 and start using Mikeeq patches
1 parent 1d51f11 commit 24f7df5

10 files changed

Lines changed: 938 additions & 3 deletions

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu -o pipefail
44

55
## Update docker image tag, because kernel build is using `uname -r` when defining package version variable
66
# KERNEL_VERSION=$(curl -s https://www.kernel.org | grep '<strong>' | head -3 | tail -1 | cut -d'>' -f3 | cut -d'<' -f1)
7-
KERNEL_VERSION=5.6.10
7+
KERNEL_VERSION=5.6.11
88
#KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git
99
KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
1010
REPO_PATH=$(pwd)

patch_driver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ git checkout ${APPLE_SMC_DRIVER_COMMIT_HASH}
3131
while IFS= read -r file; do
3232
echo "adding ${file}"
3333
cp -rfv "${file}" "${WORKING_PATH}"/patches/"${file##*/}"
34-
done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*.patch" | sort)
34+
done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*applesmc*" | sort)
3535

3636
#### Add custom drivers to kernel
3737
#echo -e "From: \"Kernel Builder (sita)\" <ubuntu-kernel-bot@canonical.com>\nSubject: patch custom drivers\n" >"${WORKING_PATH}/patches/custom-drivers.patch"
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
From c5c75744f812e8fefa9a4a8706fe137c06c52814 Mon Sep 17 00:00:00 2001
2+
From: Aun-Ali Zaidi <admin@kodeit.net>
3+
Date: Fri, 10 Jan 2020 12:47:25 -0600
4+
Subject: [PATCH 1/2] brcmfmac: move brcmf_mp_device into its own header
5+
6+
This commit relocates the brcmf_mp_device struct into its own header. This aids
7+
in utilizing the struct without the redefinition of the existing included headers
8+
found in common.h, such as fwil_types.h.
9+
10+
Tested-by: Aun-Ali Zaidi <admin@kodeit.net>
11+
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
12+
---
13+
.../broadcom/brcm80211/brcmfmac/common.h | 36 +++--------------
14+
.../broadcom/brcm80211/brcmfmac/settings.h | 39 +++++++++++++++++++
15+
2 files changed, 44 insertions(+), 31 deletions(-)
16+
create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
17+
18+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
19+
index 144cf4570bc3..3826403ec5ff 100644
20+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
21+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
22+
@@ -8,15 +8,14 @@
23+
#include <linux/platform_device.h>
24+
#include <linux/platform_data/brcmfmac.h>
25+
#include "fwil_types.h"
26+
+#include "settings.h"
27+
28+
#define BRCMF_FW_ALTPATH_LEN 256
29+
30+
-/* Definitions for the module global and device specific settings are defined
31+
- * here. Two structs are used for them. brcmf_mp_global_t and brcmf_mp_device.
32+
- * The mp_global is instantiated once in a global struct and gets initialized
33+
- * by the common_attach function which should be called before any other
34+
- * (module) initiliazation takes place. The device specific settings is part
35+
- * of the drvr struct and should be initialized on every brcmf_attach.
36+
+/* Definition for the module global settings are defined here. One struct is
37+
+ * used called brcmf_mp_global_t. The mp_global is instantiated once in a
38+
+ * global struct and gets initialized by the common_attach function which
39+
+ * should be called before any other (module) initiliazation takes place.
40+
*/
41+
42+
/**
43+
@@ -30,31 +29,6 @@ struct brcmf_mp_global_t {
44+
45+
extern struct brcmf_mp_global_t brcmf_mp_global;
46+
47+
-/**
48+
- * struct brcmf_mp_device - Device module paramaters.
49+
- *
50+
- * @p2p_enable: Legacy P2P0 enable (old wpa_supplicant).
51+
- * @feature_disable: Feature_disable bitmask.
52+
- * @fcmode: FWS flow control.
53+
- * @roamoff: Firmware roaming off?
54+
- * @ignore_probe_fail: Ignore probe failure.
55+
- * @country_codes: If available, pointer to struct for translating country codes
56+
- * @bus: Bus specific platform data. Only SDIO at the mmoment.
57+
- */
58+
-struct brcmf_mp_device {
59+
- bool p2p_enable;
60+
- unsigned int feature_disable;
61+
- int fcmode;
62+
- bool roamoff;
63+
- bool iapp;
64+
- bool ignore_probe_fail;
65+
- struct brcmfmac_pd_cc *country_codes;
66+
- const char *board_type;
67+
- union {
68+
- struct brcmfmac_sdio_pd sdio;
69+
- } bus;
70+
-};
71+
-
72+
void brcmf_c_set_joinpref_default(struct brcmf_if *ifp);
73+
74+
struct brcmf_mp_device *brcmf_get_module_param(struct device *dev,
75+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
76+
new file mode 100644
77+
index 000000000000..5c4aa32fb73d
78+
--- /dev/null
79+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
80+
@@ -0,0 +1,39 @@
81+
+// SPDX-License-Identifier: ISC
82+
+/*
83+
+ * Copyright (c) 2014 Broadcom Corporation
84+
+ */
85+
+
86+
+#ifndef BRCMFMAC_SETTINGS_H
87+
+#define BRCMFMAC_SETTINGS_H
88+
+
89+
+/* Definition for the device specific settings are defined here. One struct
90+
+ * is used called brcmf_mp_device. The device specific settings is part of
91+
+ * the drvr struct and should be initialized on every brcmf_attach.
92+
+ */
93+
+
94+
+/**
95+
+ * struct brcmf_mp_device - Device module paramaters.
96+
+ *
97+
+ * @p2p_enable: Legacy P2P0 enable (old wpa_supplicant).
98+
+ * @feature_disable: Feature_disable bitmask.
99+
+ * @fcmode: FWS flow control.
100+
+ * @roamoff: Firmware roaming off?
101+
+ * @ignore_probe_fail: Ignore probe failure.
102+
+ * @country_codes: If available, pointer to struct for translating country codes
103+
+ * @bus: Bus specific platform data. Only SDIO at the mmoment.
104+
+ */
105+
+struct brcmf_mp_device {
106+
+ bool p2p_enable;
107+
+ unsigned int feature_disable;
108+
+ int fcmode;
109+
+ bool roamoff;
110+
+ bool iapp;
111+
+ bool ignore_probe_fail;
112+
+ struct brcmfmac_pd_cc *country_codes;
113+
+ const char *board_type;
114+
+ union {
115+
+ struct brcmfmac_sdio_pd sdio;
116+
+ } bus;
117+
+};
118+
+
119+
+#endif /* BRCMFMAC_SETTINGS_H */
120+
--
121+
2.24.1
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
From b4865b976ef02fe69bb0d03c6fda6ecb2f173bcb Mon Sep 17 00:00:00 2001
2+
From: Aun-Ali Zaidi <admin@kodeit.net>
3+
Date: Fri, 10 Jan 2020 19:41:21 -0600
4+
Subject: [PATCH 2/2] brcmfmac: Add ability to manually specify FW rambase
5+
address
6+
7+
This commit introduces the ability to manually pass the rambase address for
8+
the brcmfmac chip as a kernel module option. The existing brcmf_chip_tcm_rambase()
9+
function is bypassed when this option is supplied. This is very useful when
10+
debugging support for newer chipsets that are not provided by the aforementioned
11+
function.
12+
13+
Tested-by: Aun-Ali Zaidi <admin@kodeit.net>
14+
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
15+
---
16+
.../wireless/broadcom/brcm80211/brcmfmac/chip.c | 17 ++++++++++-------
17+
.../wireless/broadcom/brcm80211/brcmfmac/chip.h | 7 +++++--
18+
.../broadcom/brcm80211/brcmfmac/common.c | 5 +++++
19+
.../broadcom/brcm80211/brcmfmac/common.h | 1 -
20+
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++--
21+
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
22+
.../broadcom/brcm80211/brcmfmac/settings.h | 4 ++++
23+
7 files changed, 27 insertions(+), 13 deletions(-)
24+
25+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
26+
index a795d781b4c5..e6b6f23e15a5 100644
27+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
28+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
29+
@@ -696,7 +696,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)
30+
return 0;
31+
}
32+
33+
-int brcmf_chip_get_raminfo(struct brcmf_chip *pub)
34+
+int brcmf_chip_get_raminfo(struct brcmf_chip *pub, struct brcmf_mp_device *settings)
35+
{
36+
struct brcmf_chip_priv *ci = container_of(pub, struct brcmf_chip_priv,
37+
pub);
38+
@@ -707,7 +707,8 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub)
39+
if (mem) {
40+
mem_core = container_of(mem, struct brcmf_core_priv, pub);
41+
ci->pub.ramsize = brcmf_chip_tcm_ramsize(mem_core);
42+
- ci->pub.rambase = brcmf_chip_tcm_rambase(ci);
43+
+ ci->pub.rambase = (settings != NULL && settings->rambase_addr > 0) ? settings->rambase_addr
44+
+ : brcmf_chip_tcm_rambase(ci);
45+
if (!ci->pub.rambase) {
46+
brcmf_err("RAM base not provided with ARM CR4 core\n");
47+
return -EINVAL;
48+
@@ -718,7 +719,8 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub)
49+
mem_core = container_of(mem, struct brcmf_core_priv,
50+
pub);
51+
ci->pub.ramsize = brcmf_chip_sysmem_ramsize(mem_core);
52+
- ci->pub.rambase = brcmf_chip_tcm_rambase(ci);
53+
+ ci->pub.rambase = (settings != NULL && settings->rambase_addr > 0) ? settings->rambase_addr
54+
+ : brcmf_chip_tcm_rambase(ci);
55+
if (!ci->pub.rambase) {
56+
brcmf_err("RAM base not provided with ARM CA7 core\n");
57+
return -EINVAL;
58+
@@ -904,7 +906,7 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci)
59+
return 0;
60+
}
61+
62+
-static int brcmf_chip_recognition(struct brcmf_chip_priv *ci)
63+
+static int brcmf_chip_recognition(struct brcmf_chip_priv *ci, struct brcmf_mp_device *settings)
64+
{
65+
struct brcmf_core *core;
66+
u32 regdata;
67+
@@ -977,7 +979,7 @@ static int brcmf_chip_recognition(struct brcmf_chip_priv *ci)
68+
brcmf_chip_set_passive(&ci->pub);
69+
}
70+
71+
- return brcmf_chip_get_raminfo(&ci->pub);
72+
+ return brcmf_chip_get_raminfo(&ci->pub, settings);
73+
}
74+
75+
static void brcmf_chip_disable_arm(struct brcmf_chip_priv *chip, u16 id)
76+
@@ -1051,7 +1053,8 @@ static int brcmf_chip_setup(struct brcmf_chip_priv *chip)
77+
}
78+
79+
struct brcmf_chip *brcmf_chip_attach(void *ctx,
80+
- const struct brcmf_buscore_ops *ops)
81+
+ const struct brcmf_buscore_ops *ops,
82+
+ struct brcmf_mp_device *settings)
83+
{
84+
struct brcmf_chip_priv *chip;
85+
int err = 0;
86+
@@ -1080,7 +1083,7 @@ struct brcmf_chip *brcmf_chip_attach(void *ctx,
87+
if (err < 0)
88+
goto fail;
89+
90+
- err = brcmf_chip_recognition(chip);
91+
+ err = brcmf_chip_recognition(chip, settings);
92+
if (err < 0)
93+
goto fail;
94+
95+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
96+
index 7b00f6a59e89..db982154e0d3 100644
97+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
98+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h
99+
@@ -7,6 +7,8 @@
100+
101+
#include <linux/types.h>
102+
103+
+#include "settings.h"
104+
+
105+
#define CORE_CC_REG(base, field) \
106+
(base + offsetof(struct chipcregs, field))
107+
108+
@@ -69,9 +71,10 @@ struct brcmf_buscore_ops {
109+
void (*activate)(void *ctx, struct brcmf_chip *chip, u32 rstvec);
110+
};
111+
112+
-int brcmf_chip_get_raminfo(struct brcmf_chip *pub);
113+
+int brcmf_chip_get_raminfo(struct brcmf_chip *pub, struct brcmf_mp_device *settings);
114+
struct brcmf_chip *brcmf_chip_attach(void *ctx,
115+
- const struct brcmf_buscore_ops *ops);
116+
+ const struct brcmf_buscore_ops *ops,
117+
+ struct brcmf_mp_device *settings);
118+
void brcmf_chip_detach(struct brcmf_chip *chip);
119+
struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *chip, u16 coreid);
120+
struct brcmf_core *brcmf_chip_get_d11core(struct brcmf_chip *pub, u8 unit);
121+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
122+
index dec25e415619..384549237cce 100644
123+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
124+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
125+
@@ -67,6 +67,10 @@ static int brcmf_iapp_enable;
126+
module_param_named(iapp, brcmf_iapp_enable, int, 0);
127+
MODULE_PARM_DESC(iapp, "Enable partial support for the obsoleted Inter-Access Point Protocol");
128+
129+
+static uint brcmf_rambase_addr;
130+
+module_param_named(rambase_addr, brcmf_rambase_addr, uint, 0);
131+
+MODULE_PARM_DESC(rambase_addr, "Manually specify FW shared rambase address");
132+
+
133+
#ifdef DEBUG
134+
/* always succeed brcmf_bus_started() */
135+
static int brcmf_ignore_probe_fail;
136+
@@ -416,6 +420,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev,
137+
#ifdef DEBUG
138+
settings->ignore_probe_fail = !!brcmf_ignore_probe_fail;
139+
#endif
140+
+ settings->rambase_addr = brcmf_rambase_addr;
141+
142+
if (bus_type == BRCMF_BUSTYPE_SDIO)
143+
settings->bus.sdio.txglomsz = brcmf_sdiod_txglomsz;
144+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
145+
index 3826403ec5ff..c7a93e04a5f5 100644
146+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
147+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
148+
@@ -6,7 +6,6 @@
149+
#define BRCMFMAC_COMMON_H
150+
151+
#include <linux/platform_device.h>
152+
-#include <linux/platform_data/brcmfmac.h>
153+
#include "fwil_types.h"
154+
#include "settings.h"
155+
156+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
157+
index f64ce5074a55..ba42e1404683 100644
158+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
159+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
160+
@@ -1770,7 +1770,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
161+
nvram_len = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.len;
162+
kfree(fwreq);
163+
164+
- ret = brcmf_chip_get_raminfo(devinfo->ci);
165+
+ ret = brcmf_chip_get_raminfo(devinfo->ci, devinfo->settings);
166+
if (ret) {
167+
brcmf_err(bus, "Failed to get RAM info\n");
168+
goto fail;
169+
@@ -1882,7 +1882,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
170+
171+
devinfo->pdev = pdev;
172+
pcie_bus_dev = NULL;
173+
- devinfo->ci = brcmf_chip_attach(devinfo, &brcmf_pcie_buscore_ops);
174+
+ devinfo->ci = brcmf_chip_attach(devinfo, &brcmf_pcie_buscore_ops, devinfo->settings);
175+
if (IS_ERR(devinfo->ci)) {
176+
ret = PTR_ERR(devinfo->ci);
177+
devinfo->ci = NULL;
178+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
179+
index 264ad63232f8..2f0dc4002e88 100644
180+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
181+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
182+
@@ -3921,7 +3921,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus)
183+
goto fail;
184+
}
185+
186+
- bus->ci = brcmf_chip_attach(sdiodev, &brcmf_sdio_buscore_ops);
187+
+ bus->ci = brcmf_chip_attach(sdiodev, &brcmf_sdio_buscore_ops, sdiodev->settings);
188+
if (IS_ERR(bus->ci)) {
189+
brcmf_err("brcmf_chip_attach failed!\n");
190+
bus->ci = NULL;
191+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
192+
index 5c4aa32fb73d..9840a4cd3b2e 100644
193+
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
194+
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h
195+
@@ -6,6 +6,8 @@
196+
#ifndef BRCMFMAC_SETTINGS_H
197+
#define BRCMFMAC_SETTINGS_H
198+
199+
+#include <linux/platform_data/brcmfmac.h>
200+
+
201+
/* Definition for the device specific settings are defined here. One struct
202+
* is used called brcmf_mp_device. The device specific settings is part of
203+
* the drvr struct and should be initialized on every brcmf_attach.
204+
@@ -21,6 +23,7 @@
205+
* @ignore_probe_fail: Ignore probe failure.
206+
* @country_codes: If available, pointer to struct for translating country codes
207+
* @bus: Bus specific platform data. Only SDIO at the mmoment.
208+
+ * @rambase_addr: Manually specified FW shared rambase address.
209+
*/
210+
struct brcmf_mp_device {
211+
bool p2p_enable;
212+
@@ -34,6 +37,7 @@ struct brcmf_mp_device {
213+
union {
214+
struct brcmfmac_sdio_pd sdio;
215+
} bus;
216+
+ u32 rambase_addr;
217+
};
218+
219+
#endif /* BRCMFMAC_SETTINGS_H */
220+
--
221+
2.24.1

patches/camera.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
From: fedora kernel <fedora@kernel.org>
2+
Subject: patch camera
3+
4+
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
5+
index 10cfe8e51626..6a81c7ffda5f 100644
6+
--- a/drivers/media/usb/uvc/uvc_driver.c
7+
+++ b/drivers/media/usb/uvc/uvc_driver.c
8+
@@ -2874,6 +2874,15 @@ static const struct usb_device_id uvc_ids[] = {
9+
.bInterfaceSubClass = 1,
10+
.bInterfaceProtocol = 0,
11+
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
12+
+ /* Apple Built-In iSight via iBridge */
13+
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
14+
+ | USB_DEVICE_ID_MATCH_INT_INFO,
15+
+ .idVendor = 0x05ac,
16+
+ .idProduct = 0x8514,
17+
+ .bInterfaceClass = USB_CLASS_VIDEO,
18+
+ .bInterfaceSubClass = 1,
19+
+ .bInterfaceProtocol = 0,
20+
+ .driver_info = (kernel_ulong_t)&uvc_quirk_probe_def },
21+
/* Generic USB Video Class */
22+
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
23+
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
24+

0 commit comments

Comments
 (0)