Staging fixes for 5.16-rc3

Here are some small staging driver fixes and one driver removal for
 5.16-rc3.
 
 The fixes resolve a number of small issues found in 5.16-rc1, nothing
 huge at all.  The driver removal was due to a platform being removed in
 5.16-rc1, but this driver was forgotten about.  It wasn't being built
 anymore so it's safe to delete.
 
 All have been in linux-next for a while with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYaD5Bg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ym6LgCdGUhkJrDZ4ddeOowUXJ8mjelUaZYAnR6Q7TQ3
 /qXcTc/YRV1izMvnHmR9
 =Nlfs
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are some small staging driver fixes and one driver removal for
  5.16-rc3.

  The fixes resolve a number of small issues found in 5.16-rc1, nothing
  huge at all. The driver removal was due to a platform being removed in
  5.16-rc1, but this driver was forgotten about. It wasn't being built
  anymore so it's safe to delete.

  All have been in linux-next for a while with no reported problems"

* tag 'staging-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect()
  staging: greybus: Add missing rwsem around snd_ctl_remove() calls
  staging: Remove Netlogic XLP network driver
  staging: r8188eu: fix a memory leak in rtw_wx_read32()
  staging: r8188eu: use GFP_ATOMIC under spinlock
  staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic context
  staging/fbtft: Fix backlight
  staging: r8188eu: Fix breakage introduced when 5G code was removed
This commit is contained in:
Linus Torvalds 2021-11-26 10:27:43 -08:00
commit 703374418e
16 changed files with 21 additions and 2443 deletions

View File

@ -66,8 +66,6 @@ source "drivers/staging/gdm724x/Kconfig"
source "drivers/staging/fwserial/Kconfig"
source "drivers/staging/netlogic/Kconfig"
source "drivers/staging/gs_fpgaboot/Kconfig"
source "drivers/staging/unisys/Kconfig"

View File

@ -10,7 +10,6 @@ obj-$(CONFIG_RTL8723BS) += rtl8723bs/
obj-$(CONFIG_R8712U) += rtl8712/
obj-$(CONFIG_R8188EU) += r8188eu/
obj-$(CONFIG_RTS5208) += rts5208/
obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/
obj-$(CONFIG_OCTEON_ETHERNET) += octeon/
obj-$(CONFIG_OCTEON_USB) += octeon-usb/
obj-$(CONFIG_VT6655) += vt6655/

View File

@ -187,7 +187,6 @@ static struct fbtft_display display = {
},
};
#ifdef CONFIG_FB_BACKLIGHT
static int update_onboard_backlight(struct backlight_device *bd)
{
struct fbtft_par *par = bl_get_data(bd);
@ -231,9 +230,6 @@ static void register_onboard_backlight(struct fbtft_par *par)
if (!par->fbtftops.unregister_backlight)
par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
}
#else
static void register_onboard_backlight(struct fbtft_par *par) { };
#endif
FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1351", &display);

View File

@ -128,7 +128,6 @@ static int fbtft_request_gpios(struct fbtft_par *par)
return 0;
}
#ifdef CONFIG_FB_BACKLIGHT
static int fbtft_backlight_update_status(struct backlight_device *bd)
{
struct fbtft_par *par = bl_get_data(bd);
@ -161,6 +160,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par)
par->info->bl_dev = NULL;
}
}
EXPORT_SYMBOL(fbtft_unregister_backlight);
static const struct backlight_ops fbtft_bl_ops = {
.get_brightness = fbtft_backlight_get_brightness,
@ -198,12 +198,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
if (!par->fbtftops.unregister_backlight)
par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
}
#else
void fbtft_register_backlight(struct fbtft_par *par) { };
void fbtft_unregister_backlight(struct fbtft_par *par) { };
#endif
EXPORT_SYMBOL(fbtft_register_backlight);
EXPORT_SYMBOL(fbtft_unregister_backlight);
static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
int ye)
@ -853,13 +848,11 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
fb_info->fix.smem_len >> 10, text1,
HZ / fb_info->fbdefio->delay, text2);
#ifdef CONFIG_FB_BACKLIGHT
/* Turn on backlight if available */
if (fb_info->bl_dev) {
fb_info->bl_dev->props.power = FB_BLANK_UNBLANK;
fb_info->bl_dev->ops->update_status(fb_info->bl_dev);
}
#endif
return 0;

View File

@ -192,7 +192,11 @@ int gbaudio_remove_component_controls(struct snd_soc_component *component,
unsigned int num_controls)
{
struct snd_card *card = component->card->snd_card;
int err;
return gbaudio_remove_controls(card, component->dev, controls,
num_controls, component->name_prefix);
down_write(&card->controls_rwsem);
err = gbaudio_remove_controls(card, component->dev, controls,
num_controls, component->name_prefix);
up_write(&card->controls_rwsem);
return err;
}

View File

@ -1,9 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
config NETLOGIC_XLR_NET
tristate "Netlogic XLR/XLS network device"
depends on CPU_XLR
depends on NETDEVICES
select PHYLIB
help
This driver support Netlogic XLR/XLS on chip gigabit
Ethernet.

View File

@ -1,2 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_NETLOGIC_XLR_NET) += xlr_net.o platform_net.o

View File

@ -1,11 +0,0 @@
* Implementing 64bit stat counter in software
* All memory allocation should be changed to DMA allocations
* Changing comments into linux standard format
Please send patches
To:
Ganesan Ramalingam <ganesanr@broadcom.com>
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc:
Jayachandran Chandrashekaran Nair <jchandra@broadcom.com>

View File

@ -1,219 +0,0 @@
// SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
/*
* Copyright (c) 2003-2012 Broadcom Corporation
* All Rights Reserved
*/
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/resource.h>
#include <linux/phy.h>
#include <asm/netlogic/haldefs.h>
#include <asm/netlogic/common.h>
#include <asm/netlogic/xlr/fmn.h>
#include <asm/netlogic/xlr/xlr.h>
#include <asm/netlogic/psb-bootinfo.h>
#include <asm/netlogic/xlr/pic.h>
#include <asm/netlogic/xlr/iomap.h>
#include "platform_net.h"
/* Linux Net */
#define MAX_NUM_GMAC 8
#define MAX_NUM_XLS_GMAC 8
#define MAX_NUM_XLR_GMAC 4
static u32 xlr_gmac_offsets[] = {
NETLOGIC_IO_GMAC_0_OFFSET, NETLOGIC_IO_GMAC_1_OFFSET,
NETLOGIC_IO_GMAC_2_OFFSET, NETLOGIC_IO_GMAC_3_OFFSET,
NETLOGIC_IO_GMAC_4_OFFSET, NETLOGIC_IO_GMAC_5_OFFSET,
NETLOGIC_IO_GMAC_6_OFFSET, NETLOGIC_IO_GMAC_7_OFFSET
};
static u32 xlr_gmac_irqs[] = { PIC_GMAC_0_IRQ, PIC_GMAC_1_IRQ,
PIC_GMAC_2_IRQ, PIC_GMAC_3_IRQ,
PIC_GMAC_4_IRQ, PIC_GMAC_5_IRQ,
PIC_GMAC_6_IRQ, PIC_GMAC_7_IRQ
};
static struct resource xlr_net0_res[8];
static struct resource xlr_net1_res[8];
static u32 __iomem *gmac4_addr;
static u32 __iomem *gpio_addr;
static void xlr_resource_init(struct resource *res, int offset, int irq)
{
res->name = "gmac";
res->start = CPHYSADDR(nlm_mmio_base(offset));
res->end = res->start + 0xfff;
res->flags = IORESOURCE_MEM;
res++;
res->name = "gmac";
res->start = irq;
res->end = irq;
res->flags = IORESOURCE_IRQ;
}
static struct platform_device *gmac_controller2_init(void *gmac0_addr)
{
int mac;
static struct xlr_net_data ndata1 = {
.phy_interface = PHY_INTERFACE_MODE_SGMII,
.rfr_station = FMN_STNID_GMAC1_FR_0,
.bucket_size = xlr_board_fmn_config.bucket_size,
.gmac_fmn_info = &xlr_board_fmn_config.gmac[1],
};
static struct platform_device xlr_net_dev1 = {
.name = "xlr-net",
.id = 1,
.dev.platform_data = &ndata1,
};
gmac4_addr =
ioremap(CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GMAC_4_OFFSET)),
0xfff);
ndata1.serdes_addr = gmac4_addr;
ndata1.pcs_addr = gmac4_addr;
ndata1.mii_addr = gmac0_addr;
ndata1.gpio_addr = gpio_addr;
ndata1.cpu_mask = nlm_current_node()->coremask;
xlr_net_dev1.resource = xlr_net1_res;
for (mac = 0; mac < 4; mac++) {
ndata1.tx_stnid[mac] = FMN_STNID_GMAC1_TX0 + mac;
ndata1.phy_addr[mac] = mac + 4 + 0x10;
xlr_resource_init(&xlr_net1_res[mac * 2],
xlr_gmac_offsets[mac + 4],
xlr_gmac_irqs[mac + 4]);
}
xlr_net_dev1.num_resources = 8;
return &xlr_net_dev1;
}
static void xls_gmac_init(void)
{
int mac;
struct platform_device *xlr_net_dev1;
void __iomem *gmac0_addr =
ioremap(CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GMAC_0_OFFSET)),
0xfff);
static struct xlr_net_data ndata0 = {
.rfr_station = FMN_STNID_GMACRFR_0,
.bucket_size = xlr_board_fmn_config.bucket_size,
.gmac_fmn_info = &xlr_board_fmn_config.gmac[0],
};
static struct platform_device xlr_net_dev0 = {
.name = "xlr-net",
.id = 0,
};
xlr_net_dev0.dev.platform_data = &ndata0;
ndata0.serdes_addr = gmac0_addr;
ndata0.pcs_addr = gmac0_addr;
ndata0.mii_addr = gmac0_addr;
/* Passing GPIO base for serdes init. Only needed on sgmii ports */
gpio_addr =
ioremap(CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GPIO_OFFSET)),
0xfff);
ndata0.gpio_addr = gpio_addr;
ndata0.cpu_mask = nlm_current_node()->coremask;
xlr_net_dev0.resource = xlr_net0_res;
switch (nlm_prom_info.board_major_version) {
case 12:
/* first block RGMII or XAUI, use RGMII */
ndata0.phy_interface = PHY_INTERFACE_MODE_RGMII;
ndata0.tx_stnid[0] = FMN_STNID_GMAC0_TX0;
ndata0.phy_addr[0] = 0;
xlr_net_dev0.num_resources = 2;
xlr_resource_init(&xlr_net0_res[0], xlr_gmac_offsets[0],
xlr_gmac_irqs[0]);
platform_device_register(&xlr_net_dev0);
/* second block is XAUI, not supported yet */
break;
default:
/* default XLS config, all ports SGMII */
ndata0.phy_interface = PHY_INTERFACE_MODE_SGMII;
for (mac = 0; mac < 4; mac++) {
ndata0.tx_stnid[mac] = FMN_STNID_GMAC0_TX0 + mac;
ndata0.phy_addr[mac] = mac + 0x10;
xlr_resource_init(&xlr_net0_res[mac * 2],
xlr_gmac_offsets[mac],
xlr_gmac_irqs[mac]);
}
xlr_net_dev0.num_resources = 8;
platform_device_register(&xlr_net_dev0);
xlr_net_dev1 = gmac_controller2_init(gmac0_addr);
platform_device_register(xlr_net_dev1);
}
}
static void xlr_gmac_init(void)
{
int mac;
/* assume all GMACs for now */
static struct xlr_net_data ndata0 = {
.phy_interface = PHY_INTERFACE_MODE_RGMII,
.serdes_addr = NULL,
.pcs_addr = NULL,
.rfr_station = FMN_STNID_GMACRFR_0,
.bucket_size = xlr_board_fmn_config.bucket_size,
.gmac_fmn_info = &xlr_board_fmn_config.gmac[0],
.gpio_addr = NULL,
};
static struct platform_device xlr_net_dev0 = {
.name = "xlr-net",
.id = 0,
.dev.platform_data = &ndata0,
};
ndata0.mii_addr =
ioremap(CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GMAC_0_OFFSET)),
0xfff);
ndata0.cpu_mask = nlm_current_node()->coremask;
for (mac = 0; mac < MAX_NUM_XLR_GMAC; mac++) {
ndata0.tx_stnid[mac] = FMN_STNID_GMAC0_TX0 + mac;
ndata0.phy_addr[mac] = mac;
xlr_resource_init(&xlr_net0_res[mac * 2], xlr_gmac_offsets[mac],
xlr_gmac_irqs[mac]);
}
xlr_net_dev0.num_resources = 8;
xlr_net_dev0.resource = xlr_net0_res;
platform_device_register(&xlr_net_dev0);
}
static int __init xlr_net_init(void)
{
if (nlm_chip_is_xls())
xls_gmac_init();
else
xlr_gmac_init();
return 0;
}
arch_initcall(xlr_net_init);

View File

@ -1,21 +0,0 @@
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
/*
* Copyright (c) 2003-2012 Broadcom Corporation
* All Rights Reserved
*/
#define PORTS_PER_CONTROLLER 4
struct xlr_net_data {
int cpu_mask;
u32 __iomem *mii_addr;
u32 __iomem *serdes_addr;
u32 __iomem *pcs_addr;
u32 __iomem *gpio_addr;
int phy_interface;
int rfr_station;
int tx_stnid[PORTS_PER_CONTROLLER];
int *bucket_size;
int phy_addr[PORTS_PER_CONTROLLER];
struct xlr_fmn_info *gmac_fmn_info;
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -107,6 +107,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
{0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
{0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
{0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
{0x00}, /* 0x13 */
{0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
{0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
{0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
@ -118,6 +119,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
{0x00}, /* 0x1C, */
{0x00}, /* 0x1D, */
{0x00}, /* 0x1E, */
{0x00}, /* 0x1F, */
/* 0x20 ~ 0x7F , New Define ===== */
{0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
{0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
@ -6845,12 +6847,12 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
pcmd_obj = kzalloc(sizeof(*pcmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
cmdsz = (sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header));
pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
return;

View File

@ -1980,6 +1980,7 @@ static int rtw_wx_read32(struct net_device *dev,
u32 data32;
u32 bytes;
u8 *ptmp;
int ret;
padapter = (struct adapter *)rtw_netdev_priv(dev);
p = &wrqu->data;
@ -2007,12 +2008,17 @@ static int rtw_wx_read32(struct net_device *dev,
break;
default:
DBG_88E(KERN_INFO "%s: usage> read [bytes],[address(hex)]\n", __func__);
return -EINVAL;
ret = -EINVAL;
goto err_free_ptmp;
}
DBG_88E(KERN_INFO "%s: addr = 0x%08X data =%s\n", __func__, addr, extra);
kfree(ptmp);
return 0;
err_free_ptmp:
kfree(ptmp);
return ret;
}
static int rtw_wx_write32(struct net_device *dev,

View File

@ -112,7 +112,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
buff = NULL;
if (authmode == _WPA_IE_ID_) {
buff = kzalloc(IW_CUSTOM_MAX, GFP_KERNEL);
buff = kzalloc(IW_CUSTOM_MAX, GFP_ATOMIC);
if (!buff)
return;
p = buff;

View File

@ -2549,13 +2549,14 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)
free_irq(dev->irq, dev);
priv->irq = 0;
}
free_rtllib(dev);
if (dev->mem_start != 0) {
iounmap((void __iomem *)dev->mem_start);
release_mem_region(pci_resource_start(pdev, 1),
pci_resource_len(pdev, 1));
}
free_rtllib(dev);
}
pci_disable_device(pdev);