Skip to content

Commit

Permalink
Merge branch 'als/kernel.lnx.3.18.r33-rel' into miui-o-eas
Browse files Browse the repository at this point in the history
Signed-off-by: Rama Bondan Prakoso <[email protected]>
  • Loading branch information
ramabondanp committed Dec 22, 2018
2 parents df1f14c + b63cb26 commit 8004dbf
Show file tree
Hide file tree
Showing 29 changed files with 215 additions and 115 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 = 18
SUBLEVEL = 130
SUBLEVEL = 131
EXTRAVERSION =
NAME = Diseased Newt

Expand Down
8 changes: 5 additions & 3 deletions arch/arm/mm/cache-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,16 @@ ENTRY(v7_dma_inv_range)
ALT_UP(W(nop))
#endif
mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line
addne r0, r0, r2

tst r1, r3
bic r1, r1, r3
mcrne p15, 0, r1, c7, c14, 1 @ clean & invalidate D / U line
1:
mcr p15, 0, r0, c7, c6, 1 @ invalidate D / U line
add r0, r0, r2
cmp r0, r1
1:
mcrlo p15, 0, r0, c7, c6, 1 @ invalidate D / U line
addlo r0, r0, r2
cmplo r0, r1
blo 1b
dsb st
ret lr
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ $(addprefix $(obj)/,$(zlib) cuboot-c2k.o gunzip_util.o main.o): \
libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
libfdtheader := fdt.h libfdt.h libfdt_internal.h

$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \
$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o \
treeboot-akebono.o treeboot-currituck.o treeboot-iss4xx.o): \
$(addprefix $(obj)/,$(libfdtheader))

src-wlib-y := string.S crt0.S crtsavres.S stdio.c main.c \
Expand Down
6 changes: 5 additions & 1 deletion arch/powerpc/kernel/legacy_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ void __init find_legacy_serial_ports(void)

/* Now find out if one of these is out firmware console */
path = of_get_property(of_chosen, "linux,stdout-path", NULL);
if (path == NULL)
path = of_get_property(of_chosen, "stdout-path", NULL);
if (path != NULL) {
stdout = of_find_node_by_path(path);
if (stdout)
Expand Down Expand Up @@ -593,8 +595,10 @@ static int __init check_legacy_serial_console(void)
/* We are getting a weird phandle from OF ... */
/* ... So use the full path instead */
name = of_get_property(of_chosen, "linux,stdout-path", NULL);
if (name == NULL)
name = of_get_property(of_chosen, "stdout-path", NULL);
if (name == NULL) {
DBG(" no linux,stdout-path !\n");
DBG(" no stdout-path !\n");
return -ENODEV;
}
prom_stdout = of_find_node_by_path(name);
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/platform/efi/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ early_efi_write(struct console *con, const char *str, unsigned int num)
num--;
}

if (efi_x >= si->lfb_width) {
if (efi_x + font->width > si->lfb_width) {
efi_x = 0;
efi_y += font->height;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4295,6 +4295,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "SSD*INTEL*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "SAMSUNG*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "SAMSUNG*MZ7KM*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "ST[1248][0248]0[FH]*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },

/* devices that don't properly handle TRIM commands */
Expand Down
10 changes: 7 additions & 3 deletions drivers/i2c/busses/i2c-scmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
{
struct acpi_smbus_cmi *smbus_cmi;
const struct acpi_device_id *id;
int ret;

smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL);
if (!smbus_cmi)
Expand All @@ -385,8 +386,10 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1,
acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL);

if (smbus_cmi->cap_info == 0)
if (smbus_cmi->cap_info == 0) {
ret = -ENODEV;
goto err;
}

snprintf(smbus_cmi->adapter.name, sizeof(smbus_cmi->adapter.name),
"SMBus CMI adapter %s",
Expand All @@ -397,7 +400,8 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
smbus_cmi->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
smbus_cmi->adapter.dev.parent = &device->dev;

if (i2c_add_adapter(&smbus_cmi->adapter)) {
ret = i2c_add_adapter(&smbus_cmi->adapter);
if (ret) {
dev_err(&device->dev, "Couldn't register adapter!\n");
goto err;
}
Expand All @@ -407,7 +411,7 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
err:
kfree(smbus_cmi);
device->driver_data = NULL;
return -EIO;
return ret;
}

static int acpi_smbus_cmi_remove(struct acpi_device *device)
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ static u8 pmac_ide_cable_detect(ide_hwif_t *hwif)
struct device_node *root = of_find_node_by_path("/");
const char *model = of_get_property(root, "model", NULL);

of_node_put(root);
/* Get cable type from device-tree. */
if (cable && !strncmp(cable, "80-", 3)) {
/* Some drives fail to detect 80c cable in PowerBook */
Expand Down
18 changes: 14 additions & 4 deletions drivers/input/keyboard/omap4-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,18 @@

/* OMAP4 values */
#define OMAP4_VAL_IRQDISABLE 0x0
#define OMAP4_VAL_DEBOUNCINGTIME 0x7
#define OMAP4_VAL_PVT 0x7

/*
* Errata i689: If a key is released for a time shorter than debounce time,
* the keyboard will idle and never detect the key release. The workaround
* is to use at least a 12ms debounce time. See omap5432 TRM chapter
* "26.4.6.2 Keyboard Controller Timer" for more information.
*/
#define OMAP4_KEYPAD_PTV_DIV_128 0x6
#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv) \
((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
#define OMAP4_VAL_DEBOUNCINGTIME_16MS \
OMAP4_KEYPAD_DEBOUNCINGTIME_MS(16, OMAP4_KEYPAD_PTV_DIV_128)

enum {
KBD_REVISION_OMAP4 = 0,
Expand Down Expand Up @@ -181,9 +191,9 @@ static int omap4_keypad_open(struct input_dev *input)

kbd_writel(keypad_data, OMAP4_KBD_CTRL,
OMAP4_DEF_CTRL_NOSOFTMODE |
(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
(OMAP4_KEYPAD_PTV_DIV_128 << OMAP4_DEF_CTRL_PTV_SHIFT));
kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
OMAP4_VAL_DEBOUNCINGTIME);
OMAP4_VAL_DEBOUNCINGTIME_16MS);
/* clear pending interrupts */
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
Expand Down
11 changes: 9 additions & 2 deletions drivers/mmc/host/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct mmc_omap_slot {
unsigned int vdd;
u16 saved_con;
u16 bus_mode;
u16 power_mode;
unsigned int fclk_freq;

struct tasklet_struct cover_tasklet;
Expand Down Expand Up @@ -1155,7 +1156,7 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct mmc_omap_slot *slot = mmc_priv(mmc);
struct mmc_omap_host *host = slot->host;
int i, dsor;
int clk_enabled;
int clk_enabled, init_stream;

mmc_omap_select_slot(slot, 0);

Expand All @@ -1165,20 +1166,25 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
slot->vdd = ios->vdd;

clk_enabled = 0;
init_stream = 0;
switch (ios->power_mode) {
case MMC_POWER_OFF:
mmc_omap_set_power(slot, 0, ios->vdd);
break;
case MMC_POWER_UP:
/* Cannot touch dsor yet, just power up MMC */
mmc_omap_set_power(slot, 1, ios->vdd);
slot->power_mode = ios->power_mode;
goto exit;
case MMC_POWER_ON:
mmc_omap_fclk_enable(host, 1);
clk_enabled = 1;
dsor |= 1 << 11;
if (slot->power_mode != MMC_POWER_ON)
init_stream = 1;
break;
}
slot->power_mode = ios->power_mode;

if (slot->bus_mode != ios->bus_mode) {
if (slot->pdata->set_bus_mode != NULL)
Expand All @@ -1194,7 +1200,7 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
for (i = 0; i < 2; i++)
OMAP_MMC_WRITE(host, CON, dsor);
slot->saved_con = dsor;
if (ios->power_mode == MMC_POWER_ON) {
if (init_stream) {
/* worst case at 400kHz, 80 cycles makes 200 microsecs */
int usecs = 250;

Expand Down Expand Up @@ -1232,6 +1238,7 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, int id)
slot->host = host;
slot->mmc = mmc;
slot->id = id;
slot->power_mode = MMC_POWER_UNDEFINED;
slot->pdata = &host->pdata->slots[id];

host->slots[id] = slot;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,9 @@ void bond_3ad_unbind_slave(struct slave *slave)
aggregator->aggregator_identifier);

/* Tell the partner that this port is not suitable for aggregation */
port->actor_oper_port_state &= ~AD_STATE_SYNCHRONIZATION;
port->actor_oper_port_state &= ~AD_STATE_COLLECTING;
port->actor_oper_port_state &= ~AD_STATE_DISTRIBUTING;
port->actor_oper_port_state &= ~AD_STATE_AGGREGATION;
__update_lacpdu_from_port(port);
ad_lacpdu_send(port);
Expand Down
1 change: 1 addition & 0 deletions drivers/sbus/char/display7seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static int d7s_probe(struct platform_device *op)
dev_set_drvdata(&op->dev, p);
d7s_device = p;
err = 0;
of_node_put(opts);

out:
return err;
Expand Down
2 changes: 2 additions & 0 deletions drivers/sbus/char/envctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,10 @@ static void envctrl_init_i2c_child(struct device_node *dp,
for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) {
pchild->mon_type[len] = ENVCTRL_NOMON;
}
of_node_put(root_node);
return;
}
of_node_put(root_node);
}

/* Get the monitor channels. */
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,8 +2433,8 @@ int iscsi_eh_session_reset(struct scsi_cmnd *sc)
failed:
ISCSI_DBG_EH(session,
"failing session reset: Could not log back into "
"%s, %s [age %d]\n", session->targetname,
conn->persistent_address, session->age);
"%s [age %d]\n", session->targetname,
session->age);
spin_unlock_bh(&session->frwd_lock);
mutex_unlock(&session->eh_mutex);
return FAILED;
Expand Down
21 changes: 7 additions & 14 deletions drivers/scsi/sr_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,30 +187,25 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
struct scsi_device *SDev;
struct scsi_sense_hdr sshdr;
int result, err = 0, retries = 0;
struct request_sense *sense = cgc->sense;
unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE];

SDev = cd->device;

if (!sense) {
sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
if (!sense) {
err = -ENOMEM;
goto out;
}
}

retry:
if (!scsi_block_when_processing_errors(SDev)) {
err = -ENODEV;
goto out;
}

memset(sense, 0, sizeof(*sense));
memset(sense_buffer, 0, sizeof(sense_buffer));
result = scsi_execute(SDev, cgc->cmd, cgc->data_direction,
cgc->buffer, cgc->buflen, (char *)sense,
cgc->buffer, cgc->buflen, sense_buffer,
cgc->timeout, IOCTL_RETRIES, 0, NULL);

scsi_normalize_sense((char *)sense, sizeof(*sense), &sshdr);
scsi_normalize_sense(sense_buffer, sizeof(sense_buffer), &sshdr);

if (cgc->sense)
memcpy(cgc->sense, sense_buffer, sizeof(*cgc->sense));

/* Minimal error checking. Ignore cases we know about, and report the rest. */
if (driver_byte(result) != 0) {
Expand Down Expand Up @@ -272,8 +267,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)

/* Wake up a process waiting for device */
out:
if (!cgc->sense)
kfree(sense);
cgc->stat = err;
return err;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/vmw_pvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,8 +1225,6 @@ static void pvscsi_shutdown_intr(struct pvscsi_adapter *adapter)

static void pvscsi_release_resources(struct pvscsi_adapter *adapter)
{
pvscsi_shutdown_intr(adapter);

if (adapter->workqueue)
destroy_workqueue(adapter->workqueue);

Expand Down Expand Up @@ -1555,6 +1553,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
out_reset_adapter:
ll_adapter_reset(adapter);
out_release_resources:
pvscsi_shutdown_intr(adapter);
pvscsi_release_resources(adapter);
scsi_host_put(host);
out_disable_device:
Expand All @@ -1563,6 +1562,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return error;

out_release_resources_and_disable:
pvscsi_shutdown_intr(adapter);
pvscsi_release_resources(adapter);
goto out_disable_device;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/tty/serial/suncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
mode = of_get_property(dp, mode_prop, NULL);
if (!mode)
mode = "9600,8,n,1,-";
of_node_put(dp);
}

cflag = CREAD | HUPCL | CLOCAL;
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ config CIFS_XATTR

config CIFS_POSIX
bool "CIFS POSIX Extensions"
depends on CIFS_XATTR
depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
help
Enabling this option will cause the cifs client to attempt to
negotiate a newer dialect with servers, such as Samba 3.0.5
Expand Down
4 changes: 2 additions & 2 deletions include/linux/posix-timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ struct k_itimer {
spinlock_t it_lock;
clockid_t it_clock; /* which timer type */
timer_t it_id; /* timer id */
int it_overrun; /* overrun on pending signal */
int it_overrun_last; /* overrun on last delivered signal */
s64 it_overrun; /* overrun on pending signal */
s64 it_overrun_last; /* overrun on last delivered signal */
int it_requeue_pending; /* waiting to requeue this timer */
#define REQUEUE_PENDING 1
int it_sigev_notify; /* notify word of sigevent struct */
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void bump_cpu_timer(struct k_itimer *timer,
continue;

timer->it.cpu.expires += incr;
timer->it_overrun += 1 << i;
timer->it_overrun += 1LL << i;
delta -= incr;
}
}
Expand Down
Loading

0 comments on commit 8004dbf

Please sign in to comment.