Skip to content

Commit

Permalink
Merge tag 'staging-6.0-rc1' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here is the big set of staging driver patches for 6.0-rc1.

  Another round where we removed more lines of code than added, always a
  nice progression. Some of that came from the movement of the vme code
  back into staging, and removal of some other of the vme driver code as
  there are no known users and it is very obsolete and unmaintained. It
  can be added back easily if someone offers to maintain it.

  Other than that this merge has lots of little things:

   - huge cleanups for r8188eu driver

   - minor cleanups for other wifi drivers

   - tiny loop fixes for greybus code

   - other small coding style fixes

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (191 commits)
  staging: r8188eu: fix potential uninitialised variable use in rtw_pwrctrl.c
  staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup
  staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function
  staging: vt6655: Rename MACvClearStckDS
  staging: fbtft: core: set smem_len before fb_deferred_io_init call
  staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics
  staging: r8188eu: make dump_chip_info() static
  staging: r8188eu: remove DoReserved prototype
  staging: r8188eu: remove OnAtim prototype
  staging: r8188eu: remove SetHwReg8188EU()
  staging: r8188eu: make update_TSF() and correct_TSF() static
  staging: r8188eu: remove unused parameter from update_TSF()
  staging: r8188eu: remove unused parameter from correct_TSF()
  staging: r8188eu: remove HW_VAR_SET_OPMODE from SetHwReg8188EU()
  staging: pi433: remove duplicated comments
  staging: qlge: refine variable name
  staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off to function
  staging: vt6655: Convert macro vt6655_mac_reg_bits_off to function
  staging: vt6655: Convert macro vt6655_mac_word_reg_bits_on to function
  staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function
  ...
  • Loading branch information
torvalds committed Aug 4, 2022
2 parents 78acd4c + 87f600a commit 723c188
Show file tree
Hide file tree
Showing 115 changed files with 2,047 additions and 4,714 deletions.
4 changes: 2 additions & 2 deletions Documentation/driver-api/vme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ The function :c:func:`vme_bus_num` returns the bus ID of the provided bridge.
VME API
-------

.. kernel-doc:: include/linux/vme.h
.. kernel-doc:: drivers/staging/vme_user/vme.h
:internal:

.. kernel-doc:: drivers/vme/vme.c
.. kernel-doc:: drivers/staging/vme_user/vme.c
:export:
5 changes: 2 additions & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -19261,6 +19261,7 @@ F: drivers/staging/olpc_dcon/
STAGING - REALTEK RTL8188EU DRIVERS
M: Larry Finger <[email protected]>
M: Phillip Potter <[email protected]>
R: Pavel Skripkin <[email protected]>
S: Supported
F: drivers/staging/r8188eu/

Expand Down Expand Up @@ -21580,12 +21581,10 @@ M: Martyn Welch <[email protected]>
M: Manohar Vanga <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
L: [email protected]
S: Maintained
S: Odd fixes
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
F: Documentation/driver-api/vme.rst
F: drivers/staging/vme_user/
F: drivers/vme/
F: include/linux/vme*

VM SOCKETS (AF_VSOCK)
M: Stefano Garzarella <[email protected]>
Expand Down
2 changes: 0 additions & 2 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ source "drivers/iio/Kconfig"

source "drivers/ntb/Kconfig"

source "drivers/vme/Kconfig"

source "drivers/pwm/Kconfig"

source "drivers/irqchip/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ obj-$(CONFIG_PM_DEVFREQ) += devfreq/
obj-$(CONFIG_EXTCON) += extcon/
obj-$(CONFIG_MEMORY) += memory/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_VME_BUS) += vme/
obj-$(CONFIG_IPACK_BUS) += ipack/
obj-$(CONFIG_NTB) += ntb/
obj-$(CONFIG_POWERCAP) += powercap/
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/fbtft/fb_ssd1351.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ static int update_onboard_backlight(struct backlight_device *bd)
"%s: power=%d, fb_blank=%d\n",
__func__, bd->props.power, bd->props.fb_blank);

on = (bd->props.power == FB_BLANK_UNBLANK) &&
(bd->props.fb_blank == FB_BLANK_UNBLANK);
on = !backlight_is_blank(bd);
/* Onboard backlight connected to GPIO0 on SSD1351, GPIO1 unused */
write_reg(par, 0xB5, on ? 0x03 : 0x02);

Expand Down
5 changes: 2 additions & 3 deletions drivers/staging/fbtft/fbtft-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ static int fbtft_backlight_update_status(struct backlight_device *bd)
"%s: polarity=%d, power=%d, fb_blank=%d\n",
__func__, polarity, bd->props.power, bd->props.fb_blank);

if ((bd->props.power == FB_BLANK_UNBLANK) &&
(bd->props.fb_blank == FB_BLANK_UNBLANK))
if (!backlight_is_blank(bd))
gpiod_set_value(par->gpio.led[0], polarity);
else
gpiod_set_value(par->gpio.led[0], !polarity);
Expand Down Expand Up @@ -655,7 +654,6 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
fbdefio->delay = HZ / fps;
fbdefio->sort_pagereflist = true;
fbdefio->deferred_io = fbtft_deferred_io;
fb_deferred_io_init(info);

snprintf(info->fix.id, sizeof(info->fix.id), "%s", dev->driver->name);
info->fix.type = FB_TYPE_PACKED_PIXELS;
Expand All @@ -666,6 +664,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
info->fix.line_length = width * bpp / 8;
info->fix.accel = FB_ACCEL_NONE;
info->fix.smem_len = vmem_size;
fb_deferred_io_init(info);

info->var.rotate = pdata->rotate;
info->var.xres = width;
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/greybus/audio_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
int num)
{
int i;
struct snd_soc_dapm_widget *w, *next_w;
struct snd_soc_dapm_widget *w, *tmp_w;
#ifdef CONFIG_DEBUG_FS
struct dentry *parent = dapm->debugfs_dapm;
struct dentry *debugfs_w = NULL;
Expand All @@ -124,13 +124,13 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
mutex_lock(&dapm->card->dapm_mutex);
for (i = 0; i < num; i++) {
/* below logic can be optimized to identify widget pointer */
list_for_each_entry_safe(w, next_w, &dapm->card->widgets,
list) {
if (w->dapm != dapm)
continue;
if (!strcmp(w->name, widget->name))
w = NULL;
list_for_each_entry(tmp_w, &dapm->card->widgets, list) {
if (tmp_w->dapm == dapm &&
!strcmp(tmp_w->name, widget->name)) {
w = tmp_w;
break;
w = NULL;
}
}
if (!w) {
dev_err(dapm->dev, "%s: widget not found\n",
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/greybus/fw-management.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static struct fw_mgmt *get_fw_mgmt(struct cdev *cdev)
}

static int fw_mgmt_interface_fw_version_operation(struct fw_mgmt *fw_mgmt,
struct fw_mgmt_ioc_get_intf_version *fw_info)
struct fw_mgmt_ioc_get_intf_version *fw_info)
{
struct gb_connection *connection = fw_mgmt->connection;
struct gb_fw_mgmt_interface_fw_version_response response;
Expand Down Expand Up @@ -240,7 +240,7 @@ static int fw_mgmt_interface_fw_loaded_operation(struct gb_operation *op)
}

static int fw_mgmt_backend_fw_version_operation(struct fw_mgmt *fw_mgmt,
struct fw_mgmt_ioc_get_backend_version *fw_info)
struct fw_mgmt_ioc_get_backend_version *fw_info)
{
struct gb_connection *connection = fw_mgmt->connection;
struct gb_fw_mgmt_backend_fw_version_request request;
Expand Down Expand Up @@ -473,7 +473,7 @@ static int fw_mgmt_ioctl(struct fw_mgmt *fw_mgmt, unsigned int cmd,
return -EFAULT;

ret = fw_mgmt_backend_fw_update_operation(fw_mgmt,
backend_update.firmware_tag);
backend_update.firmware_tag);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/greybus/loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ static int gb_loopback_fn(void *data)
if (gb->send_count == gb->iteration_max) {
mutex_unlock(&gb->mutex);

/* Wait for synchronous and asynchronus completion */
/* Wait for synchronous and asynchronous completion */
gb_loopback_async_wait_all(gb);

/* Mark complete unless user-space has poked us */
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/octeon/ethernet-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ void cvm_oct_rx_initialize(void)
if (!(pow_receive_groups & BIT(i)))
continue;

netif_napi_add(dev_for_napi, &oct_rx_group[i].napi,
cvm_oct_napi_poll, rx_napi_weight);
netif_napi_add_weight(dev_for_napi, &oct_rx_group[i].napi,
cvm_oct_napi_poll, rx_napi_weight);
napi_enable(&oct_rx_group[i].napi);

oct_rx_group[i].irq = OCTEON_IRQ_WORKQ0 + i;
Expand Down
7 changes: 2 additions & 5 deletions drivers/staging/olpc_dcon/olpc_dcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static void dcon_set_source(struct dcon_priv *dcon, int arg)
static void dcon_set_source_sync(struct dcon_priv *dcon, int arg)
{
dcon_set_source(dcon, arg);
flush_scheduled_work();
flush_work(&dcon->switch_source);
}

static ssize_t dcon_mode_show(struct device *dev,
Expand Down Expand Up @@ -517,10 +517,7 @@ static struct device_attribute dcon_device_files[] = {
static int dcon_bl_update(struct backlight_device *dev)
{
struct dcon_priv *dcon = bl_get_data(dev);
u8 level = dev->props.brightness & 0x0F;

if (dev->props.power != FB_BLANK_UNBLANK)
level = 0;
u8 level = backlight_get_brightness(dev) & 0x0F;

if (level != dcon->bl_val)
dcon_set_backlight(dcon, level);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/pi433/pi433_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ static int __init pi433_init(void)

/*
* Claim device numbers. Then register a class
* that will key udev/mdev to add/remove /dev nodes. Last, register
* that will key udev/mdev to add/remove /dev nodes.
* Last, register the driver which manages those device numbers.
*/
status = alloc_chrdev_region(&pi433_dev, 0, N_PI433_MINORS, "pi433");
Expand Down
40 changes: 20 additions & 20 deletions drivers/staging/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ static unsigned long qlge_process_mac_rx_intr(struct qlge_adapter *qdev,
vlan_id);
} else {
/* Non-TCP/UDP large frames that span multiple buffers
* can be processed corrrectly by the split frame logic.
* can be processed correctly by the split frame logic.
*/
qlge_process_mac_split_rx_intr(qdev, rx_ring, ib_mac_rsp,
vlan_id);
Expand Down Expand Up @@ -2955,7 +2955,7 @@ static int qlge_start_rx_ring(struct qlge_adapter *qdev, struct rx_ring *rx_ring
void __iomem *doorbell_area =
qdev->doorbell_area + (DB_PAGE_SIZE * (128 + rx_ring->cq_id));
int err = 0;
u64 tmp;
u64 dma;
__le64 *base_indirect_ptr;
int page_entries;

Expand Down Expand Up @@ -3004,15 +3004,15 @@ static int qlge_start_rx_ring(struct qlge_adapter *qdev, struct rx_ring *rx_ring
FLAGS_LI; /* Load irq delay values */
if (rx_ring->cq_id < qdev->rss_ring_count) {
cqicb->flags |= FLAGS_LL; /* Load lbq values */
tmp = (u64)rx_ring->lbq.base_dma;
dma = (u64)rx_ring->lbq.base_dma;
base_indirect_ptr = rx_ring->lbq.base_indirect;
page_entries = 0;
do {
*base_indirect_ptr = cpu_to_le64(tmp);
tmp += DB_PAGE_SIZE;
base_indirect_ptr++;
page_entries++;
} while (page_entries < MAX_DB_PAGES_PER_BQ(QLGE_BQ_LEN));

for (page_entries = 0;
page_entries < MAX_DB_PAGES_PER_BQ(QLGE_BQ_LEN);
page_entries++) {
base_indirect_ptr[page_entries] = cpu_to_le64(dma);
dma += DB_PAGE_SIZE;
}
cqicb->lbq_addr = cpu_to_le64(rx_ring->lbq.base_indirect_dma);
cqicb->lbq_buf_size =
cpu_to_le16(QLGE_FIT16(qdev->lbq_buf_size));
Expand All @@ -3021,15 +3021,15 @@ static int qlge_start_rx_ring(struct qlge_adapter *qdev, struct rx_ring *rx_ring
rx_ring->lbq.next_to_clean = 0;

cqicb->flags |= FLAGS_LS; /* Load sbq values */
tmp = (u64)rx_ring->sbq.base_dma;
dma = (u64)rx_ring->sbq.base_dma;
base_indirect_ptr = rx_ring->sbq.base_indirect;
page_entries = 0;
do {
*base_indirect_ptr = cpu_to_le64(tmp);
tmp += DB_PAGE_SIZE;
base_indirect_ptr++;
page_entries++;
} while (page_entries < MAX_DB_PAGES_PER_BQ(QLGE_BQ_LEN));

for (page_entries = 0;
page_entries < MAX_DB_PAGES_PER_BQ(QLGE_BQ_LEN);
page_entries++) {
base_indirect_ptr[page_entries] = cpu_to_le64(dma);
dma += DB_PAGE_SIZE;
}
cqicb->sbq_addr =
cpu_to_le64(rx_ring->sbq.base_indirect_dma);
cqicb->sbq_buf_size = cpu_to_le16(SMALL_BUFFER_SIZE);
Expand All @@ -3041,8 +3041,8 @@ static int qlge_start_rx_ring(struct qlge_adapter *qdev, struct rx_ring *rx_ring
/* Inbound completion handling rx_rings run in
* separate NAPI contexts.
*/
netif_napi_add(qdev->ndev, &rx_ring->napi, qlge_napi_poll_msix,
64);
netif_napi_add_weight(qdev->ndev, &rx_ring->napi,
qlge_napi_poll_msix, 64);
cqicb->irq_delay = cpu_to_le16(qdev->rx_coalesce_usecs);
cqicb->pkt_delay = cpu_to_le16(qdev->rx_max_coalesced_frames);
} else {
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/r8188eu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ r8188eu-y = \
hal/HalHWImg8188E_RF.o \
hal/HalPhyRf_8188e.o \
hal/HalPwrSeqCmd.o \
hal/Hal8188EPwrSeq.o \
hal/Hal8188ERateAdaptive.o \
hal/hal_intf.o \
hal/hal_com.o \
Expand Down
23 changes: 11 additions & 12 deletions drivers/staging/r8188eu/core/rtw_ap.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,18 +654,17 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
set_tx_beacon_cmd(padapter);
}

/*
op_mode
Set to 0 (HT pure) under the following conditions
- all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
- all STAs in the BSS are 20 MHz HT in 20 MHz BSS
Set to 1 (HT non-member protection) if there may be non-HT STAs
in both the primary and the secondary channel
Set to 2 if only HT STAs are associated in BSS,
however and at least one 20 MHz HT STA is associated
Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
(currently non-GF HT station is considered as non-HT STA also)
*/
/* op_mode
* Set to 0 (HT pure) under the following conditions
* - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
* - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
* Set to 1 (HT non-member protection) if there may be non-HT STAs
* in both the primary and the secondary channel
* Set to 2 if only HT STAs are associated in BSS,
* however and at least one 20 MHz HT STA is associated
* Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
* (currently non-GF HT station is considered as non-HT STA also)
*/
static int rtw_ht_operation_update(struct adapter *padapter)
{
u16 cur_op_mode, new_op_mode;
Expand Down
15 changes: 13 additions & 2 deletions drivers/staging/r8188eu/core/rtw_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,12 @@ static void traffic_status_watchdog(struct adapter *padapter)
static void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)
{
u32 txdma_status;
int res;

res = rtw_read32(padapter, REG_TXDMA_STATUS, &txdma_status);
if (res)
return;

txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
if (txdma_status != 0x00)
rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status);
/* total xmit irp = 4 */
Expand Down Expand Up @@ -1177,7 +1181,14 @@ u8 rtw_ps_cmd(struct adapter *padapter)

static bool rtw_is_hi_queue_empty(struct adapter *adapter)
{
return (rtw_read32(adapter, REG_HGQ_INFORMATION) & 0x0000ff00) == 0;
int res;
u32 reg;

res = rtw_read32(adapter, REG_HGQ_INFORMATION, &reg);
if (res)
return false;

return (reg & 0x0000ff00) == 0;
}

static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
Expand Down
Loading

0 comments on commit 723c188

Please sign in to comment.