Skip to content

Commit

Permalink
Changes representative of linux-3.10.0-957.10.1.el7.tar.xz
Browse files Browse the repository at this point in the history
  • Loading branch information
da-x committed Feb 7, 2019
1 parent a145d5f commit 517bed5
Show file tree
Hide file tree
Showing 40 changed files with 675 additions and 313 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRAVERSION =
NAME = Unicycling Gorilla
RHEL_MAJOR = 7
RHEL_MINOR = 6
RHEL_RELEASE = 957.5.1
RHEL_RELEASE = 957.10.1

#
# DRM backport version
Expand Down
11 changes: 11 additions & 0 deletions arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,17 @@ int rtas_ibm_suspend_me(u64 handle)
goto out;
}

cpu_hotplug_disable();
stop_topology_update();

/* Check if we raced with a CPU-Offline Operation */
if (unlikely(!cpumask_equal(cpu_present_mask, cpu_online_mask))) {
pr_err("%s: Raced against a concurrent CPU-Offline\n",
__func__);
atomic_set(&data.error, -EBUSY);
goto out_hotplug_enable;
}

/* Call function on all CPUs. One of us will make the
* rtas call
*/
Expand All @@ -975,6 +984,8 @@ int rtas_ibm_suspend_me(u64 handle)
printk(KERN_ERR "Error doing global join\n");

start_topology_update();
out_hotplug_enable:
cpu_hotplug_enable();

/* Take down CPUs not online prior to suspend */
cpuret = rtas_offline_cpus_mask(offline_mask);
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/platform/efi/efi-bgrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ void __init efi_bgrt_init(void)
return;
}

image = ioremap(bgrt_tab->image_address, sizeof(bmp_header));
image = memremap(bgrt_tab->image_address, sizeof(bmp_header), MEMREMAP_WB);
if (!image) {
pr_notice("Ignoring BGRT: failed to map image header memory\n");
return;
}

memcpy(&bmp_header, image, sizeof(bmp_header));
iounmap(image);
memunmap(image);
if (bmp_header.id != 0x4d42) {
pr_notice("Ignoring BGRT: Incorrect BMP magic number 0x%x (expected 0x4d42)\n",
bmp_header.id);
Expand All @@ -89,7 +89,7 @@ void __init efi_bgrt_init(void)
return;
}

image = ioremap(bgrt_tab->image_address, bmp_header.size);
image = memremap(bgrt_tab->image_address, bmp_header.size, MEMREMAP_WB);
if (!image) {
pr_notice("Ignoring BGRT: failed to map image memory\n");
kfree(bgrt_image);
Expand All @@ -98,5 +98,5 @@ void __init efi_bgrt_init(void)
}

memcpy(bgrt_image, image, bgrt_image_size);
iounmap(image);
memunmap(image);
}
7 changes: 4 additions & 3 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ static int __blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,
if (bypass_insert)
return BLK_MQ_RQ_QUEUE_BUSY;

blk_mq_sched_insert_request(rq, false, run_queue, false);
blk_mq_request_bypass_insert(rq, run_queue);
return BLK_MQ_RQ_QUEUE_OK;
}

Expand All @@ -1756,7 +1756,7 @@ static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,
hctx_lock(hctx, &srcu_idx);
ret = __blk_mq_try_issue_directly(hctx, rq, false);
if (ret == BLK_MQ_RQ_QUEUE_BUSY || ret == BLK_MQ_RQ_QUEUE_DEV_BUSY)
blk_mq_sched_insert_request(rq, false, true, false);
blk_mq_request_bypass_insert(rq, true);
else if (ret != BLK_MQ_RQ_QUEUE_OK)
blk_mq_end_request(rq, ret);

Expand Down Expand Up @@ -1790,7 +1790,8 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
if (ret != BLK_MQ_RQ_QUEUE_OK) {
if (ret == BLK_MQ_RQ_QUEUE_BUSY ||
ret == BLK_MQ_RQ_QUEUE_DEV_BUSY) {
list_add(&rq->queuelist, list);
blk_mq_request_bypass_insert(rq,
list_empty(list));
break;
}
blk_mq_end_request(rq, ret);
Expand Down
62 changes: 47 additions & 15 deletions drivers/acpi/nfit/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,32 @@ static u8 nfit_dsm_revid(unsigned family, unsigned func)
return id;
}

static int cmd_to_func(struct nfit_mem *nfit_mem, unsigned int cmd,
struct nd_cmd_pkg *call_pkg)
{
if (call_pkg) {
int i;

if (nfit_mem->family != call_pkg->nd_family)
return -ENOTTY;

for (i = 0; i < ARRAY_SIZE(call_pkg->nd_reserved2); i++)
if (call_pkg->nd_reserved2[i])
return -EINVAL;
return call_pkg->nd_command;
}

/* Linux ND commands == NVDIMM_FAMILY_INTEL function numbers */
if (nfit_mem->family == NVDIMM_FAMILY_INTEL)
return cmd;

/*
* Force function number validation to fail since 0 is never
* published as a valid function in dsm_mask.
*/
return 0;
}

int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc)
{
Expand All @@ -404,28 +430,20 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
unsigned long cmd_mask, dsm_mask;
u32 offset, fw_status = 0;
acpi_handle handle;
unsigned int func;
const guid_t *guid;
int rc, i;

func = cmd;
if (cmd == ND_CMD_CALL) {
call_pkg = buf;
func = call_pkg->nd_command;

for (i = 0; i < ARRAY_SIZE(call_pkg->nd_reserved2); i++)
if (call_pkg->nd_reserved2[i])
return -EINVAL;
}
int func, rc, i;

if (nvdimm) {
struct acpi_device *adev = nfit_mem->adev;

if (!adev)
return -ENOTTY;
if (call_pkg && nfit_mem->family != call_pkg->nd_family)
return -ENOTTY;

if (cmd == ND_CMD_CALL)
call_pkg = buf;
func = cmd_to_func(nfit_mem, cmd, call_pkg);
if (func < 0)
return func;
dimm_name = nvdimm_name(nvdimm);
cmd_name = nvdimm_cmd_name(cmd);
cmd_mask = nvdimm_cmd_mask(nvdimm);
Expand All @@ -436,6 +454,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
} else {
struct acpi_device *adev = to_acpi_dev(acpi_desc);

func = cmd;
cmd_name = nvdimm_bus_cmd_name(cmd);
cmd_mask = nd_desc->cmd_mask;
dsm_mask = cmd_mask;
Expand All @@ -450,7 +469,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
if (!desc || (cmd && (desc->out_num + desc->in_num == 0)))
return -ENOTTY;

if (!test_bit(cmd, &cmd_mask) || !test_bit(func, &dsm_mask))
/*
* Check for a valid command. For ND_CMD_CALL, we also have to
* make sure that the DSM function is supported.
*/
if (cmd == ND_CMD_CALL && !test_bit(func, &dsm_mask))
return -ENOTTY;
else if (!test_bit(cmd, &cmd_mask))
return -ENOTTY;

in_obj.type = ACPI_TYPE_PACKAGE;
Expand Down Expand Up @@ -1759,6 +1784,13 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
return 0;
}

/*
* Function 0 is the command interrogation function, don't
* export it to potential userspace use, and enable it to be
* used as an error value in acpi_nfit_ctl().
*/
dsm_mask &= ~1UL;

guid = to_nfit_uuid(nfit_mem->family);
for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
if (acpi_check_dsm(adev_dimm->handle, guid->b,
Expand Down
31 changes: 23 additions & 8 deletions drivers/input/mouse/psmouse-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ static bool psmouse_smartscroll = 1;
module_param_named(smartscroll, psmouse_smartscroll, bool, 0644);
MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");

static bool psmouse_a4tech_2wheels;
module_param_named(a4tech_workaround, psmouse_a4tech_2wheels, bool, 0644);
MODULE_PARM_DESC(a4tech_workaround, "A4Tech second scroll wheel workaround, 1 = enabled, 0 = disabled (default).");

static unsigned int psmouse_resetafter = 5;
module_param_named(resetafter, psmouse_resetafter, uint, 0644);
MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
Expand Down Expand Up @@ -148,6 +152,7 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
{
struct input_dev *dev = psmouse->dev;
u8 *packet = psmouse->packet;
int wheel;

if (psmouse->pktcnt < psmouse->pktsize)
return PSMOUSE_GOOD_DATA;
Expand All @@ -173,10 +178,20 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
break;
case 0x00:
case 0xC0:
input_report_rel(dev, REL_WHEEL,
-sign_extend32(packet[3], 3));
input_report_key(dev, BTN_SIDE, BIT(4));
input_report_key(dev, BTN_EXTRA, BIT(5));
wheel = sign_extend32(packet[3], 3);

/*
* Some A4Tech mice have two scroll wheels, with first
* one reporting +/-1 in the lower nibble, and second
* one reporting +/-2.
*/
if (psmouse_a4tech_2wheels && abs(wheel) > 1)
input_report_rel(dev, REL_HWHEEL, wheel / 2);
else
input_report_rel(dev, REL_WHEEL, -wheel);

input_report_key(dev, BTN_SIDE, packet[3] & BIT(4));
input_report_key(dev, BTN_EXTRA, packet[3] & BIT(5));
break;
}
break;
Expand All @@ -186,13 +201,13 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);

/* Extra buttons on Genius NewNet 3D */
input_report_key(dev, BTN_SIDE, BIT(6));
input_report_key(dev, BTN_EXTRA, BIT(7));
input_report_key(dev, BTN_SIDE, packet[0] & BIT(6));
input_report_key(dev, BTN_EXTRA, packet[0] & BIT(7));
break;

case PSMOUSE_THINKPS:
/* Extra button on ThinkingMouse */
input_report_key(dev, BTN_EXTRA, BIT(3));
input_report_key(dev, BTN_EXTRA, packet[0] & BIT(3));

/*
* Without this bit of weirdness moving up gives wildly
Expand All @@ -206,7 +221,7 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
* Cortron PS2 Trackball reports SIDE button in the
* 4th bit of the first byte.
*/
input_report_key(dev, BTN_SIDE, BIT(3));
input_report_key(dev, BTN_SIDE, packet[0] & BIT(3));
packet[0] |= BIT(3);
break;

Expand Down
7 changes: 4 additions & 3 deletions drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,8 @@ static bool raid1_write_request(struct mddev *mddev, struct bio *bio,
}

master_r1bio = alloc_r1bio(mddev, bio, 0);
atomic_set(&master_r1bio->split_bios, 0);
atomic_set(&master_r1bio->split_bios, 1);
r1_bio->master_r1bio = master_r1bio;

/* first select target devices under rcu_lock and
* inc refcount on their rdev. Record them by setting
Expand All @@ -1347,8 +1348,6 @@ static bool raid1_write_request(struct mddev *mddev, struct bio *bio,
disks = conf->raid_disks * 2;
retry_write:
wait_barrier(conf, r1_bio->sector);
r1_bio->master_r1bio = master_r1bio;
atomic_inc(&master_r1bio->split_bios);
blocked_rdev = NULL;
rcu_read_lock();
max_sectors = r1_bio->sectors;
Expand Down Expand Up @@ -1515,9 +1514,11 @@ static bool raid1_write_request(struct mddev *mddev, struct bio *bio,
*/
if (sectors_handled < bio_sectors(bio)) {
/* We need another r1_bio, which must be counted */
atomic_inc(&master_r1bio->split_bios);
bio_inc_remaining(bio);
r1_bio_write_done(r1_bio);
r1_bio = alloc_r1bio(mddev, bio, sectors_handled);
r1_bio->master_r1bio = master_r1bio;
goto retry_write;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,9 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
struct nvme_ns *ns, *next;
LIST_HEAD(ns_list);

/* prevent racing with ns scanning */
flush_work(&ctrl->scan_work);

/*
* The dead states indicates the controller was not gracefully
* disconnected. In that case, we won't be able to flush any data while
Expand Down Expand Up @@ -2699,7 +2702,6 @@ void nvme_stop_ctrl(struct nvme_ctrl *ctrl)
{
nvme_stop_keep_alive(ctrl);
flush_work(&ctrl->async_event_work);
flush_work(&ctrl->scan_work);
cancel_work_sync(&ctrl->fw_act_work);
if (ctrl->ops->stop_ctrl)
ctrl->ops->stop_ctrl(ctrl);
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,7 @@ static void nvme_remove_dead_ctrl(struct nvme_dev *dev, int status)

nvme_get_ctrl(&dev->ctrl);
nvme_dev_disable(dev, false);
nvme_kill_queues(&dev->ctrl);
if (!queue_work(nvme_wq, &dev->remove_work))
nvme_put_ctrl(&dev->ctrl);
}
Expand Down Expand Up @@ -2142,7 +2143,6 @@ static void nvme_remove_dead_ctrl_work(struct work_struct *work)
struct nvme_dev *dev = container_of(work, struct nvme_dev, remove_work);
struct pci_dev *pdev = to_pci_dev(dev->dev);

nvme_kill_queues(&dev->ctrl);
if (pci_get_drvdata(pdev))
device_release_driver(&pdev->dev);
nvme_put_ctrl(&dev->ctrl);
Expand Down
Loading

0 comments on commit 517bed5

Please sign in to comment.