Skip to content

Commit

Permalink
Linux Kernel 3.10.11 compiles and runs (.rej cleaned up)
Browse files Browse the repository at this point in the history
Applied:
/LineageOS/android/kernel/sony/msm8994$ patch -p1 -R <
/home/dj/Downloads/linuxkernelpatches/patch-3.10.11-12

Change-Id: I6ad908bea062b2c1481fc2837fb2acc3c071095e
  • Loading branch information
djStolen committed Jan 13, 2024
1 parent e7262e6 commit 16c31e5
Show file tree
Hide file tree
Showing 52 changed files with 151 additions and 347 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 12
SUBLEVEL = 11
EXTRAVERSION =
NAME = TOSSUG Baby Fish

Expand Down
10 changes: 0 additions & 10 deletions arch/arm/boot/dts/at91sam9260.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,6 @@
};
};

i2c_gpio0 {
pinctrl_i2c_gpio0: i2c_gpio0-0 {
atmel,pins =
<0 23 0x0 0x3 /* PA23 gpio I2C_SDA pin */
0 24 0x0 0x3>; /* PA24 gpio I2C_SCL pin */
};
};

pioA: gpio@fffff400 {
compatible = "atmel,at91rm9200-gpio";
reg = <0xfffff400 0x200>;
Expand Down Expand Up @@ -600,8 +592,6 @@
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c_gpio0>;
status = "disabled";
};
};
4 changes: 2 additions & 2 deletions arch/x86/include/asm/xor_avx.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ static struct xor_block_template xor_block_avx = {

#define AVX_XOR_SPEED \
do { \
if (cpu_has_avx && cpu_has_osxsave) \
if (cpu_has_avx) \
xor_speed(&xor_block_avx); \
} while (0)

#define AVX_SELECT(FASTEST) \
(cpu_has_avx && cpu_has_osxsave ? &xor_block_avx : FASTEST)
(cpu_has_avx ? &xor_block_avx : FASTEST)

#else

Expand Down
8 changes: 1 addition & 7 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3770,17 +3770,11 @@ static int bond_neigh_init(struct neighbour *n)
* The bonding ndo_neigh_setup is called at init time beofre any
* slave exists. So we must declare proxy setup function which will
* be used at run time to resolve the actual slave neigh param setup.
*
* It's also called by master devices (such as vlans) to setup their
* underlying devices. In that case - do nothing, we're already set up from
* our init.
*/
static int bond_neigh_setup(struct net_device *dev,
struct neigh_parms *parms)
{
/* modify only our neigh_parms */
if (parms->dev == dev)
parms->neigh_setup = bond_neigh_init;
parms->neigh_setup = bond_neigh_init;

return 0;
}
Expand Down
18 changes: 2 additions & 16 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -3003,19 +3003,6 @@ static bool tg3_phy_power_bug(struct tg3 *tp)
return false;
}

static bool tg3_phy_led_bug(struct tg3 *tp)
{
switch (tg3_asic_rev(tp)) {
case ASIC_REV_5719:
if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
!tp->pci_fn)
return true;
return false;
}

return false;
}

static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power)
{
u32 val;
Expand Down Expand Up @@ -3063,9 +3050,8 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power)
}
return;
} else if (do_low_power) {
if (!tg3_phy_led_bug(tp))
tg3_writephy(tp, MII_TG3_EXT_CTRL,
MII_TG3_EXT_CTRL_FORCE_LED_OFF);
tg3_writephy(tp, MII_TG3_EXT_CTRL,
MII_TG3_EXT_CTRL_FORCE_LED_OFF);

val = MII_TG3_AUXCTL_PCTL_100TX_LPWR |
MII_TG3_AUXCTL_PCTL_SPR_ISOLATE |
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2561,8 +2561,8 @@ static int be_close(struct net_device *netdev)
/* Wait for all pending tx completions to arrive so that
* all tx skbs are freed.
*/
netif_tx_disable(netdev);
be_tx_compl_clean(adapter);
netif_tx_disable(netdev);

be_rx_qs_destroy(adapter);

Expand Down
13 changes: 1 addition & 12 deletions drivers/net/ethernet/marvell/mvneta.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@
#define MVNETA_GMAC_FORCE_LINK_PASS BIT(1)
#define MVNETA_GMAC_CONFIG_MII_SPEED BIT(5)
#define MVNETA_GMAC_CONFIG_GMII_SPEED BIT(6)
#define MVNETA_GMAC_AN_SPEED_EN BIT(7)
#define MVNETA_GMAC_CONFIG_FULL_DUPLEX BIT(12)
#define MVNETA_GMAC_AN_DUPLEX_EN BIT(13)
#define MVNETA_MIB_COUNTERS_BASE 0x3080
#define MVNETA_MIB_LATE_COLLISION 0x7c
#define MVNETA_DA_FILT_SPEC_MCAST 0x3400
Expand Down Expand Up @@ -913,13 +911,6 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
/* Assign port SDMA configuration */
mvreg_write(pp, MVNETA_SDMA_CONFIG, val);

/* Disable PHY polling in hardware, since we're using the
* kernel phylib to do this.
*/
val = mvreg_read(pp, MVNETA_UNIT_CONTROL);
val &= ~MVNETA_PHY_POLLING_ENABLE;
mvreg_write(pp, MVNETA_UNIT_CONTROL, val);

mvneta_set_ucast_table(pp, -1);
mvneta_set_special_mcast_table(pp, -1);
mvneta_set_other_mcast_table(pp, -1);
Expand Down Expand Up @@ -2297,9 +2288,7 @@ static void mvneta_adjust_link(struct net_device *ndev)
val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG);
val &= ~(MVNETA_GMAC_CONFIG_MII_SPEED |
MVNETA_GMAC_CONFIG_GMII_SPEED |
MVNETA_GMAC_CONFIG_FULL_DUPLEX |
MVNETA_GMAC_AN_SPEED_EN |
MVNETA_GMAC_AN_DUPLEX_EN);
MVNETA_GMAC_CONFIG_FULL_DUPLEX);

if (phydev->duplex)
val |= MVNETA_GMAC_CONFIG_FULL_DUPLEX;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
PCI_DMA_FROMDEVICE);
if (dma_mapping_error(&cp->pdev->dev, new_mapping)) {
dev->stats.rx_dropped++;
kfree_skb(new_skb);
goto rx_next;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sfc/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ s32 efx_filter_insert_filter(struct efx_nic *efx, struct efx_filter_spec *spec,
BUILD_BUG_ON(EFX_FILTER_INDEX_UC_DEF != 0);
BUILD_BUG_ON(EFX_FILTER_INDEX_MC_DEF !=
EFX_FILTER_MC_DEF - EFX_FILTER_UC_DEF);
rep_index = spec->type - EFX_FILTER_UC_DEF;
rep_index = spec->type - EFX_FILTER_INDEX_UC_DEF;
ins_index = rep_index;

spin_lock_bh(&state->lock);
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,6 @@ static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[])
return -EADDRNOTAVAIL;
}

if (data && data[IFLA_MACVLAN_FLAGS] &&
nla_get_u16(data[IFLA_MACVLAN_FLAGS]) & ~MACVLAN_FLAG_NOPROMISC)
return -EINVAL;

if (data && data[IFLA_MACVLAN_MODE]) {
switch (nla_get_u32(data[IFLA_MACVLAN_MODE])) {
case MACVLAN_MODE_PRIVATE:
Expand Down
6 changes: 2 additions & 4 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,19 +1076,17 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
u32 rxhash;

if (!(tun->flags & TUN_NO_PI)) {
if (len < sizeof(pi))
if ((len -= sizeof(pi)) > total_len)
return -EINVAL;
len -= sizeof(pi);

if (memcpy_fromiovecend((void *)&pi, iv, 0, sizeof(pi)))
return -EFAULT;
offset += sizeof(pi);
}

if (tun->flags & TUN_VNET_HDR) {
if (len < tun->vnet_hdr_sz)
if ((len -= tun->vnet_hdr_sz) > total_len)
return -EINVAL;
len -= tun->vnet_hdr_sz;

if (memcpy_fromiovecend((void *)&gso, iv, offset, sizeof(gso)))
return -EFAULT;
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/usb/cdc_mbim.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ static const struct usb_device_id mbim_devs[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68a2, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
},
/* HP hs2434 Mobile Broadband Module needs ZLPs */
{ USB_DEVICE_AND_INTERFACE_INFO(0x3f0, 0x4b1d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
.driver_info = (unsigned long)&cdc_mbim_info_zlp,
},
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
.driver_info = (unsigned long)&cdc_mbim_info,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
iph->daddr = dst;
iph->saddr = fl4.saddr;
iph->ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
__ip_select_ident(iph, &rt->dst, (skb_shinfo(skb)->gso_segs ?: 1) - 1);
tunnel_ip_select_ident(skb, old_iph, &rt->dst);

nf_reset(skb);

Expand Down
14 changes: 14 additions & 0 deletions drivers/net/wireless/mwifiex/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,20 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
dev_err(adapter->dev, "cannot create default STA interface\n");
goto err_add_intf;
}

/* Create AP interface by default */
if (!mwifiex_add_virtual_intf(adapter->wiphy, "uap%d",
NL80211_IFTYPE_AP, NULL, NULL)) {
dev_err(adapter->dev, "cannot create default AP interface\n");
goto err_add_intf;
}

/* Create P2P interface by default */
if (!mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d",
NL80211_IFTYPE_P2P_CLIENT, NULL, NULL)) {
dev_err(adapter->dev, "cannot create default P2P interface\n");
goto err_add_intf;
}
rtnl_unlock();

mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1);
Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
}

alrm->pending = 0;
ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS1, &val);
if (ret < 0) {
dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
dev_err(info->dev, "%s:%d fail to read status1 reg(%d)\n",
__func__, __LINE__, ret);
goto out;
}
Expand Down
9 changes: 4 additions & 5 deletions drivers/vhost/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,6 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success)
struct vhost_virtqueue *vq = ubufs->vq;
int cnt = atomic_read(&ubufs->kref.refcount);

/* set len to mark this desc buffers done DMA */
vq->heads[ubuf->desc].len = success ?
VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN;
vhost_net_ubuf_put(ubufs);

/*
* Trigger polling thread if guest stopped submitting new buffers:
* in this case, the refcount after decrement will eventually reach 1
Expand All @@ -322,6 +317,10 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success)
*/
if (cnt <= 2 || !(cnt % 16))
vhost_poll_queue(&vq->poll);
/* set len to mark this desc buffers done DMA */
vq->heads[ubuf->desc].len = success ?
VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN;
vhost_net_ubuf_put(ubufs);
}

/* Expects to be always run from workqueue - which acts as
Expand Down
1 change: 0 additions & 1 deletion include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ struct inet6_skb_parm {
#define IP6SKB_FORWARDED 2
#define IP6SKB_REROUTED 4
#define IP6SKB_ROUTERALERT 8
#define IP6SKB_FRAGMENTED 16
};

#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
Expand Down
20 changes: 2 additions & 18 deletions include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ struct genl_family {
struct list_head ops_list; /* private */
struct list_head family_list; /* private */
struct list_head mcast_groups; /* private */
struct module *module;
};

/**
Expand Down Expand Up @@ -124,24 +123,9 @@ struct genl_ops {
struct list_head ops_list;
};

extern int __genl_register_family(struct genl_family *family);

static inline int genl_register_family(struct genl_family *family)
{
family->module = THIS_MODULE;
return __genl_register_family(family);
}

extern int __genl_register_family_with_ops(struct genl_family *family,
extern int genl_register_family(struct genl_family *family);
extern int genl_register_family_with_ops(struct genl_family *family,
struct genl_ops *ops, size_t n_ops);

static inline int genl_register_family_with_ops(struct genl_family *family,
struct genl_ops *ops, size_t n_ops)
{
family->module = THIS_MODULE;
return __genl_register_family_with_ops(family, ops, n_ops);
}

extern int genl_unregister_family(struct genl_family *family);
extern int genl_register_ops(struct genl_family *, struct genl_ops *ops);
extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops);
Expand Down
14 changes: 14 additions & 0 deletions include/net/ip_tunnels.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph,
return INET_ECN_encapsulate(tos, inner);
}

static inline void tunnel_ip_select_ident(struct sk_buff *skb,
const struct iphdr *old_iph,
struct dst_entry *dst)
{
struct iphdr *iph = ip_hdr(skb);

/* Use inner packet iph-id if possible. */
if (skb->protocol == htons(ETH_P_IP) && old_iph->id)
iph->id = old_iph->id;
else
__ip_select_ident(iph, dst,
(skb_shinfo(skb)->gso_segs ?: 1) - 1);
}

static inline void iptunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
int err;
Expand Down
9 changes: 1 addition & 8 deletions include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,19 +682,13 @@ struct psched_ratecfg {
u64 rate_bps;
u32 mult;
u16 overhead;
u8 linklayer;
u8 shift;
};

static inline u64 psched_l2t_ns(const struct psched_ratecfg *r,
unsigned int len)
{
len += r->overhead;

if (unlikely(r->linklayer == TC_LINKLAYER_ATM))
return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->shift;

return ((u64)len * r->mult) >> r->shift;
return ((u64)(len + r->overhead) * r->mult) >> r->shift;
}

extern void psched_ratecfg_precompute(struct psched_ratecfg *r, const struct tc_ratespec *conf);
Expand All @@ -705,7 +699,6 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res,
memset(res, 0, sizeof(*res));
res->rate = r->rate_bps >> 3;
res->overhead = r->overhead;
res->linklayer = (r->linklayer & TC_LINKLAYER_MASK);
}

#endif
2 changes: 0 additions & 2 deletions include/uapi/linux/icmpv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ struct icmp6hdr {
#define ICMPV6_NOT_NEIGHBOUR 2
#define ICMPV6_ADDR_UNREACH 3
#define ICMPV6_PORT_UNREACH 4
#define ICMPV6_POLICY_FAIL 5
#define ICMPV6_REJECT_ROUTE 6

/*
* Codes for Time Exceeded
Expand Down
10 changes: 1 addition & 9 deletions include/uapi/linux/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,9 @@ struct tc_estimator {
#define TC_H_ROOT (0xFFFFFFFFU)
#define TC_H_INGRESS (0xFFFFFFF1U)

/* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */
enum tc_link_layer {
TC_LINKLAYER_UNAWARE, /* Indicate unaware old iproute2 util */
TC_LINKLAYER_ETHERNET,
TC_LINKLAYER_ATM,
};
#define TC_LINKLAYER_MASK 0x0F /* limit use to lower 4 bits */

struct tc_ratespec {
unsigned char cell_log;
__u8 linklayer; /* lower 4 bits */
unsigned char __reserved;
unsigned short overhead;
short cell_align;
unsigned short mpu;
Expand Down
Loading

0 comments on commit 16c31e5

Please sign in to comment.