Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…/kernel/git/stable/linux

This is the 4.9.280 stable release
  • Loading branch information
Assunzain committed Mar 13, 2023
2 parents 06c795a + 89a3a5a commit 1658a43
Show file tree
Hide file tree
Showing 36 changed files with 249 additions and 104 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 279
SUBLEVEL = 280
EXTRAVERSION =
NAME = Roaring Lionus

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void
smp_send_stop(void)
{
cpumask_t to_whom;
cpumask_copy(&to_whom, cpu_possible_mask);
cpumask_copy(&to_whom, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &to_whom);
#ifdef DEBUG_IPI_MSG
if (hard_smp_processor_id() != boot_cpu_id)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ LDFLAGS += -m $(ld-emul)

ifdef CONFIG_MIPS
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
ifdef CONFIG_64BIT
CHECKFLAGS += -m64
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/mti-malta/malta-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ static struct plat_serial8250_port uart8250_data[] = {
.mapbase = 0x1f000900, /* The CBUS UART */
.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
.uartclk = 3686400, /* Twice the usual clk! */
.iotype = UPIO_MEM32,
.iotype = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ?
UPIO_MEM32BE : UPIO_MEM32,
.flags = CBUS_UART_FLAGS,
.regshift = 3,
},
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/events/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,10 @@ void x86_pmu_stop(struct perf_event *event, int flags);

static inline void x86_pmu_disable_event(struct perf_event *event)
{
u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask);
struct hw_perf_event *hwc = &event->hw;

wrmsrl(hwc->config_base, hwc->config);
wrmsrl(hwc->config_base, hwc->config & ~disable_mask);
}

void x86_pmu_enable_event(struct perf_event *event);
Expand Down
11 changes: 10 additions & 1 deletion drivers/media/usb/dvb-usb-v2/rtl28xxu.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req)
} else {
/* read */
requesttype = (USB_TYPE_VENDOR | USB_DIR_IN);
pipe = usb_rcvctrlpipe(d->udev, 0);

/*
* Zero-length transfers must use usb_sndctrlpipe() and
* rtl28xxu_identify_state() uses a zero-length i2c read
* command to determine the chip type.
*/
if (req->size)
pipe = usb_rcvctrlpipe(d->udev, 0);
else
pipe = usb_sndctrlpipe(d->udev, 0);
}

ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
Expand Down
13 changes: 12 additions & 1 deletion drivers/media/v4l2-core/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ static int vb2_start_streaming(struct vb2_queue *q)
int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
{
struct vb2_buffer *vb;
enum vb2_buffer_state orig_state;
int ret;

if (q->error) {
Expand Down Expand Up @@ -1399,6 +1400,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
* Add to the queued buffers list, a buffer will stay on it until
* dequeued in dqbuf.
*/
orig_state = vb->state;
list_add_tail(&vb->queued_entry, &q->queued_list);
q->queued_count++;
q->waiting_for_buffers = false;
Expand Down Expand Up @@ -1429,8 +1431,17 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
if (q->streaming && !q->start_streaming_called &&
q->queued_count >= q->min_buffers_needed) {
ret = vb2_start_streaming(q);
if (ret)
if (ret) {
/*
* Since vb2_core_qbuf will return with an error,
* we should return it to state DEQUEUED since
* the error indicates that the buffer wasn't queued.
*/
list_del(&vb->queued_entry);
q->queued_count--;
vb->state = orig_state;
return ret;
}
}

dprintk(1, "qbuf of buffer %d succeeded\n", vb->index);
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
}

/* Allocated memory for FW statistics */
if (bnx2x_alloc_fw_stats_mem(bp))
rc = bnx2x_alloc_fw_stats_mem(bp);
if (rc)
LOAD_ERROR_EXIT(bp, load_error0);

/* request pf to initialize status blocks */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3546,13 +3546,13 @@ fec_drv_remove(struct platform_device *pdev)
if (of_phy_is_fixed_link(np))
of_phy_deregister_fixed_link(np);
of_node_put(fep->phy_node);
free_netdev(ndev);

clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);

free_netdev(ndev);
return 0;
}

Expand Down
8 changes: 2 additions & 6 deletions drivers/net/ethernet/natsemi/natsemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
printk(version);
#endif

i = pci_enable_device(pdev);
i = pcim_enable_device(pdev);
if (i) return i;

/* natsemi has a non-standard PM control register
Expand Down Expand Up @@ -850,7 +850,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
ioaddr = ioremap(iostart, iosize);
if (!ioaddr) {
i = -ENOMEM;
goto err_ioremap;
goto err_pci_request_regions;
}

/* Work around the dropped serial bit. */
Expand Down Expand Up @@ -968,9 +968,6 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
err_register_netdev:
iounmap(ioaddr);

err_ioremap:
pci_release_regions(pdev);

err_pci_request_regions:
free_netdev(dev);
return i;
Expand Down Expand Up @@ -3228,7 +3225,6 @@ static void natsemi_remove1(struct pci_dev *pdev)

NATSEMI_REMOVE_FILE(pdev, dspcfg_workaround);
unregister_netdev (dev);
pci_release_regions (pdev);
iounmap(ioaddr);
free_netdev (dev);
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/neterion/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3539,13 +3539,13 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)

kfree(vdev->vpaths);

/* we are safe to free it now */
free_netdev(dev);

vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered",
buf);
vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d Exiting...", buf,
__func__, __LINE__);

/* we are safe to free it now */
free_netdev(dev);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/qlogic/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int ql_wait_for_drvr_lock(struct ql3_adapter *qdev)
"driver lock acquired\n");
return 1;
}
ssleep(1);
mdelay(1000);
} while (++i < 10);

netdev_err(qdev->ndev, "Timed out waiting for driver lock...\n");
Expand Down Expand Up @@ -3287,7 +3287,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
if ((value & ISP_CONTROL_SR) == 0)
break;

ssleep(1);
mdelay(1000);
} while ((--max_wait_time));

/*
Expand Down Expand Up @@ -3323,7 +3323,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
ispControlStatus);
if ((value & ISP_CONTROL_FSR) == 0)
break;
ssleep(1);
mdelay(1000);
} while ((--max_wait_time));
}
if (max_wait_time == 0)
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/ethernet/xilinx/xilinx_emaclite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
}

dev_info(dev,
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
(unsigned int __force)ndev->mem_start,
(unsigned int __force)lp->base_addr, ndev->irq);
"Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
(unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
return 0;

error:
Expand Down
19 changes: 15 additions & 4 deletions drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static struct channel *ppp_find_channel(struct ppp_net *pn, int unit);
static int ppp_connect_channel(struct channel *pch, int unit);
static int ppp_disconnect_channel(struct channel *pch);
static void ppp_destroy_channel(struct channel *pch);
static int unit_get(struct idr *p, void *ptr);
static int unit_get(struct idr *p, void *ptr, int min);
static int unit_set(struct idr *p, void *ptr, int n);
static void unit_put(struct idr *p, int n);
static void *unit_find(struct idr *p, int n);
Expand Down Expand Up @@ -976,9 +976,20 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
mutex_lock(&pn->all_ppp_mutex);

if (unit < 0) {
ret = unit_get(&pn->units_idr, ppp);
ret = unit_get(&pn->units_idr, ppp, 0);
if (ret < 0)
goto err;
if (!ifname_is_set) {
while (1) {
snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ret);
if (!__dev_get_by_name(ppp->ppp_net, ppp->dev->name))
break;
unit_put(&pn->units_idr, ret);
ret = unit_get(&pn->units_idr, ppp, ret + 1);
if (ret < 0)
goto err;
}
}
} else {
/* Caller asked for a specific unit number. Fail with -EEXIST
* if unavailable. For backward compatibility, return -EEXIST
Expand Down Expand Up @@ -3313,9 +3324,9 @@ static int unit_set(struct idr *p, void *ptr, int n)
}

/* get new free unit number and associate pointer with it */
static int unit_get(struct idr *p, void *ptr)
static int unit_get(struct idr *p, void *ptr, int min)
{
return idr_alloc(p, ptr, 0, 0, GFP_KERNEL);
return idr_alloc(p, ptr, min, 0, GFP_KERNEL);
}

/* put unit number back to a pool */
Expand Down
14 changes: 11 additions & 3 deletions drivers/net/usb/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,12 +755,16 @@ static inline void disable_net_traffic(pegasus_t *pegasus)
set_registers(pegasus, EthCtrl0, sizeof(tmp), &tmp);
}

static inline void get_interrupt_interval(pegasus_t *pegasus)
static inline int get_interrupt_interval(pegasus_t *pegasus)
{
u16 data;
u8 interval;
int ret;

ret = read_eprom_word(pegasus, 4, &data);
if (ret < 0)
return ret;

read_eprom_word(pegasus, 4, &data);
interval = data >> 8;
if (pegasus->usb->speed != USB_SPEED_HIGH) {
if (interval < 0x80) {
Expand All @@ -775,6 +779,8 @@ static inline void get_interrupt_interval(pegasus_t *pegasus)
}
}
pegasus->intr_interval = interval;

return 0;
}

static void set_carrier(struct net_device *net)
Expand Down Expand Up @@ -1191,7 +1197,9 @@ static int pegasus_probe(struct usb_interface *intf,
| NETIF_MSG_PROBE | NETIF_MSG_LINK);

pegasus->features = usb_dev_id[dev_index].private;
get_interrupt_interval(pegasus);
res = get_interrupt_interval(pegasus);
if (res)
goto out2;
if (reset_mac(pegasus)) {
dev_err(&intf->dev, "can't reset MAC\n");
res = -EIO;
Expand Down
1 change: 1 addition & 0 deletions drivers/pcmcia/i82092.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
for (i = 0;i<socket_count;i++) {
sockets[i].card_state = 1; /* 1 = present but empty */
sockets[i].io_base = pci_resource_start(dev, 0);
sockets[i].dev = dev;
sockets[i].socket.features |= SS_CAP_PCCARD;
sockets[i].socket.map_size = 0x1000;
sockets[i].socket.irq_mask = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static unsigned int sr_get_events(struct scsi_device *sdev)
else if (med->media_event_code == 2)
return DISK_EVENT_MEDIA_CHANGE;
else if (med->media_event_code == 3)
return DISK_EVENT_EJECT_REQUEST;
return DISK_EVENT_MEDIA_CHANGE;
return 0;
}

Expand Down
12 changes: 9 additions & 3 deletions drivers/tty/serial/8250/8250_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ static const struct serial8250_config uart_config[] = {
/* Uart divisor latch read */
static int default_serial_dl_read(struct uart_8250_port *up)
{
return serial_in(up, UART_DLL) | serial_in(up, UART_DLM) << 8;
/* Assign these in pieces to truncate any bits above 7. */
unsigned char dll = serial_in(up, UART_DLL);
unsigned char dlm = serial_in(up, UART_DLM);

return dll | dlm << 8;
}

/* Uart divisor latch write */
Expand Down Expand Up @@ -1262,9 +1266,11 @@ static void autoconfig(struct uart_8250_port *up)
serial_out(up, UART_LCR, 0);

serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
scratch = serial_in(up, UART_IIR) >> 6;

switch (scratch) {
/* Assign this as it is to truncate any bits above 7. */
scratch = serial_in(up, UART_IIR);

switch (scratch >> 6) {
case 0:
autoconfig_8250(up);
break;
Expand Down
8 changes: 1 addition & 7 deletions drivers/usb/class/usbtmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,16 +1342,10 @@ static void usbtmc_interrupt(struct urb *urb)
case -EOVERFLOW:
dev_err(dev, "overflow with length %d, actual length is %d\n",
data->iin_wMaxPacketSize, urb->actual_length);
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
case -EILSEQ:
case -ETIME:
default:
/* urb terminated, clean up */
dev_dbg(dev, "urb terminated, status: %d\n", status);
return;
default:
dev_err(dev, "unknown status received: %d\n", status);
}
exit:
rv = usb_submit_urb(urb, GFP_ATOMIC);
Expand Down
6 changes: 5 additions & 1 deletion drivers/usb/common/usb-otg-fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ static void otg_start_hnp_polling(struct otg_fsm *fsm)
if (!fsm->host_req_flag)
return;

INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
if (!fsm->hnp_work_inited) {
INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
fsm->hnp_work_inited = true;
}

schedule_delayed_work(&fsm->hnp_polling_work,
msecs_to_jiffies(T_HOST_REQ_POLL));
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
if (pdev->vendor == PCI_VENDOR_ID_STMICRO
&& pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
; /* ConneXT has no sbrn register */
else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI
&& pdev->device == 0xa239)
; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */
else
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);

Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/ch341.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ static struct usb_serial_driver ch341_device = {
.owner = THIS_MODULE,
.name = "ch341-uart",
},
.bulk_in_size = 512,
.id_table = id_table,
.num_ports = 1,
.open = ch341_open,
Expand Down
Loading

0 comments on commit 1658a43

Please sign in to comment.