Merge "Merge android-4.4-p.203 (40ef73d
) into msm-4.4"
This commit is contained in:
commit
fbbb7d9af6
190 changed files with 950 additions and 2142 deletions
|
@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
|
|||
unsigned int expected_sz)
|
||||
{
|
||||
uint32_t in_buf_sz;
|
||||
uint32_t out_buf_sz;
|
||||
ssize_t out_buf_sz;
|
||||
ssize_t written;
|
||||
uint32_t status;
|
||||
struct amt_host_if_resp_header *msg_hdr;
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 202
|
||||
SUBLEVEL = 203
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <linux/string.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#define INT_MAX ((int)(~0U>>1))
|
||||
|
||||
typedef __be16 fdt16_t;
|
||||
typedef __be32 fdt32_t;
|
||||
typedef __be64 fdt64_t;
|
||||
|
|
|
@ -697,6 +697,7 @@
|
|||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
status = "okay";
|
||||
slaves = <1>;
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
|
@ -704,15 +705,14 @@
|
|||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "rgmii-txid";
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-handle = <ðphy0>;
|
||||
phy-mode = "rgmii-txid";
|
||||
};
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
uart1 {
|
||||
usart1 {
|
||||
pinctrl_usart1: usart1-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
|
||||
samsung,model = "Snow-I2S-MAX98090";
|
||||
samsung,audio-codec = <&max98090>;
|
||||
|
||||
cpu {
|
||||
sound-dai = <&i2s0 0>;
|
||||
};
|
||||
|
||||
codec {
|
||||
sound-dai = <&max98090 0>, <&hdmi>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -34,6 +42,9 @@
|
|||
interrupt-parent = <&gpx0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max98090_irq>;
|
||||
clocks = <&pmu_system_controller 0>;
|
||||
clock-names = "mclk";
|
||||
#sound-dai-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
aliases {
|
||||
display0 = &lcd;
|
||||
display1 = &tv0;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
|
@ -70,7 +71,7 @@
|
|||
#sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
spi_lcd {
|
||||
spi_lcd: spi_lcd {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
|
@ -459,6 +460,12 @@
|
|||
regulator-max-microvolt = <3150000>;
|
||||
};
|
||||
|
||||
/* Needed to power the DPI pins */
|
||||
|
||||
&vpll2 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
&dss {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = < &dss_dpi_pins >;
|
||||
|
@ -522,22 +529,22 @@
|
|||
|
||||
bootloaders@80000 {
|
||||
label = "U-Boot";
|
||||
reg = <0x80000 0x1e0000>;
|
||||
reg = <0x80000 0x1c0000>;
|
||||
};
|
||||
|
||||
bootloaders_env@260000 {
|
||||
bootloaders_env@240000 {
|
||||
label = "U-Boot Env";
|
||||
reg = <0x260000 0x20000>;
|
||||
reg = <0x240000 0x40000>;
|
||||
};
|
||||
|
||||
kernel@280000 {
|
||||
label = "Kernel";
|
||||
reg = <0x280000 0x400000>;
|
||||
reg = <0x280000 0x600000>;
|
||||
};
|
||||
|
||||
filesystem@680000 {
|
||||
filesystem@880000 {
|
||||
label = "File System";
|
||||
reg = <0x680000 0xf980000>;
|
||||
reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
clocks = <&clks CLK_PWM1>;
|
||||
};
|
||||
|
||||
pwri2c: i2c@40f000180 {
|
||||
pwri2c: i2c@40f00180 {
|
||||
compatible = "mrvl,pxa-i2c";
|
||||
reg = <0x40f00180 0x24>;
|
||||
interrupts = <6>;
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
status = "okay";
|
||||
speed-mode = <0>;
|
||||
|
||||
adxl345: adxl345@0 {
|
||||
adxl345: adxl345@53 {
|
||||
compatible = "adi,adxl345";
|
||||
reg = <0x53>;
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
<0xa0410100 0x100>;
|
||||
};
|
||||
|
||||
scu@a04100000 {
|
||||
scu@a0410000 {
|
||||
compatible = "arm,cortex-a9-scu";
|
||||
reg = <0xa0410000 0x100>;
|
||||
};
|
||||
|
@ -894,7 +894,7 @@
|
|||
power-domains = <&pm_domains DOMAIN_VAPE>;
|
||||
};
|
||||
|
||||
ssp@80002000 {
|
||||
spi@80002000 {
|
||||
compatible = "arm,pl022", "arm,primecell";
|
||||
reg = <0x80002000 0x1000>;
|
||||
interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
@ -908,7 +908,7 @@
|
|||
power-domains = <&pm_domains DOMAIN_VAPE>;
|
||||
};
|
||||
|
||||
ssp@80003000 {
|
||||
spi@80003000 {
|
||||
compatible = "arm,pl022", "arm,primecell";
|
||||
reg = <0x80003000 0x1000>;
|
||||
interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
|
|
@ -607,16 +607,20 @@
|
|||
|
||||
mcde {
|
||||
lcd_default_mode: lcd_default {
|
||||
default_mux {
|
||||
default_mux1 {
|
||||
/* Mux in VSI0 and all the data lines */
|
||||
function = "lcd";
|
||||
groups =
|
||||
"lcdvsi0_a_1", /* VSI0 for LCD */
|
||||
"lcd_d0_d7_a_1", /* Data lines */
|
||||
"lcd_d8_d11_a_1", /* TV-out */
|
||||
"lcdaclk_b_1", /* Clock line for TV-out */
|
||||
"lcdvsi1_a_1"; /* VSI1 for HDMI */
|
||||
};
|
||||
default_mux2 {
|
||||
function = "lcda";
|
||||
groups =
|
||||
"lcdaclk_b_1"; /* Clock line for TV-out */
|
||||
};
|
||||
default_cfg1 {
|
||||
pins =
|
||||
"GPIO68_E1", /* VSI0 */
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
ssp@80002000 {
|
||||
spi@80002000 {
|
||||
/*
|
||||
* On the first generation boards, this SSP/SPI port was connected
|
||||
* to the AB8500.
|
||||
|
|
|
@ -311,7 +311,7 @@
|
|||
pinctrl-1 = <&i2c3_sleep_mode>;
|
||||
};
|
||||
|
||||
ssp@80002000 {
|
||||
spi@80002000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ssp0_snowball_mode>;
|
||||
};
|
||||
|
|
|
@ -451,7 +451,7 @@
|
|||
dma-names = "rx";
|
||||
};
|
||||
|
||||
spi: ssp@c0006000 {
|
||||
spi: spi@c0006000 {
|
||||
compatible = "arm,pl022", "arm,primecell";
|
||||
reg = <0xc0006000 0x1000>;
|
||||
interrupt-parent = <&vica>;
|
||||
|
|
|
@ -147,14 +147,14 @@
|
|||
|
||||
/* Apalis MMC1 */
|
||||
sdmmc3_clk_pa6 {
|
||||
nvidia,pins = "sdmmc3_clk_pa6",
|
||||
"sdmmc3_cmd_pa7";
|
||||
nvidia,pins = "sdmmc3_clk_pa6";
|
||||
nvidia,function = "sdmmc3";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
sdmmc3_dat0_pb7 {
|
||||
nvidia,pins = "sdmmc3_dat0_pb7",
|
||||
nvidia,pins = "sdmmc3_cmd_pa7",
|
||||
"sdmmc3_dat0_pb7",
|
||||
"sdmmc3_dat1_pb6",
|
||||
"sdmmc3_dat2_pb5",
|
||||
"sdmmc3_dat3_pb4",
|
||||
|
|
|
@ -823,7 +823,7 @@
|
|||
nvidia,elastic-limit = <16>;
|
||||
nvidia,term-range-adj = <6>;
|
||||
nvidia,xcvr-setup = <51>;
|
||||
nvidia.xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-lsfslew = <1>;
|
||||
nvidia,xcvr-lsrslew = <1>;
|
||||
nvidia,xcvr-hsslew = <32>;
|
||||
|
@ -860,7 +860,7 @@
|
|||
nvidia,elastic-limit = <16>;
|
||||
nvidia,term-range-adj = <6>;
|
||||
nvidia,xcvr-setup = <51>;
|
||||
nvidia.xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-lsfslew = <2>;
|
||||
nvidia,xcvr-lsrslew = <2>;
|
||||
nvidia,xcvr-hsslew = <32>;
|
||||
|
@ -896,7 +896,7 @@
|
|||
nvidia,elastic-limit = <16>;
|
||||
nvidia,term-range-adj = <6>;
|
||||
nvidia,xcvr-setup = <51>;
|
||||
nvidia.xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-setup-use-fuses;
|
||||
nvidia,xcvr-lsfslew = <2>;
|
||||
nvidia,xcvr-lsrslew = <2>;
|
||||
nvidia,xcvr-hsslew = <32>;
|
||||
|
|
|
@ -271,16 +271,15 @@ __sys_trace:
|
|||
cmp scno, #-1 @ skip the syscall?
|
||||
bne 2b
|
||||
add sp, sp, #S_OFF @ restore stack
|
||||
b ret_slow_syscall
|
||||
|
||||
__sys_trace_return:
|
||||
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
|
||||
__sys_trace_return_nosave:
|
||||
enable_irq_notrace
|
||||
mov r0, sp
|
||||
bl syscall_trace_exit
|
||||
b ret_slow_syscall
|
||||
|
||||
__sys_trace_return_nosave:
|
||||
enable_irq_notrace
|
||||
__sys_trace_return:
|
||||
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
|
||||
mov r0, sp
|
||||
bl syscall_trace_exit
|
||||
b ret_slow_syscall
|
||||
|
|
|
@ -602,6 +602,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata
|
|||
IMX6Q_GPR1_GINT);
|
||||
}
|
||||
|
||||
static void imx6_pm_stby_poweroff(void)
|
||||
{
|
||||
imx6_set_lpm(STOP_POWER_OFF);
|
||||
imx6q_suspend_finish(0);
|
||||
|
||||
mdelay(1000);
|
||||
|
||||
pr_emerg("Unable to poweroff system\n");
|
||||
}
|
||||
|
||||
static int imx6_pm_stby_poweroff_probe(void)
|
||||
{
|
||||
if (pm_power_off) {
|
||||
pr_warn("%s: pm_power_off already claimed %p %pf!\n",
|
||||
__func__, pm_power_off, pm_power_off);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
pm_power_off = imx6_pm_stby_poweroff;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init imx6_pm_ccm_init(const char *ccm_compat)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
@ -618,6 +640,9 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
|
|||
val = readl_relaxed(ccm_base + CLPCR);
|
||||
val &= ~BM_CLPCR_LPM;
|
||||
writel_relaxed(val, ccm_base + CLPCR);
|
||||
|
||||
if (of_property_read_bool(np, "fsl,pmic-stby-poweroff"))
|
||||
imx6_pm_stby_poweroff_probe();
|
||||
}
|
||||
|
||||
void __init imx6q_pm_init(void)
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
clock-names = "uartclk", "apb_pclk";
|
||||
};
|
||||
|
||||
spi0: ssp@e1020000 {
|
||||
spi0: spi@e1020000 {
|
||||
status = "disabled";
|
||||
compatible = "arm,pl022", "arm,primecell";
|
||||
#gpio-cells = <2>;
|
||||
|
@ -95,7 +95,7 @@
|
|||
clock-names = "apb_pclk";
|
||||
};
|
||||
|
||||
spi1: ssp@e1030000 {
|
||||
spi1: spi@e1030000 {
|
||||
status = "disabled";
|
||||
compatible = "arm,pl022", "arm,primecell";
|
||||
#gpio-cells = <2>;
|
||||
|
|
|
@ -57,5 +57,7 @@ ENDPROC(__clear_user)
|
|||
.section .fixup,"ax"
|
||||
.align 2
|
||||
9: mov x0, x2 // return the original size
|
||||
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
|
||||
CONFIG_ARM64_PAN)
|
||||
ret
|
||||
.previous
|
||||
|
|
|
@ -80,5 +80,7 @@ ENDPROC(__arch_copy_from_user)
|
|||
strb wzr, [dst], #1 // zero remaining buffer space
|
||||
cmp dst, end
|
||||
b.lo 9999b
|
||||
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
|
||||
CONFIG_ARM64_PAN)
|
||||
ret
|
||||
.previous
|
||||
|
|
|
@ -76,5 +76,7 @@ ENDPROC(__copy_in_user)
|
|||
.section .fixup,"ax"
|
||||
.align 2
|
||||
9998: sub x0, end, dst // bytes not copied
|
||||
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
|
||||
CONFIG_ARM64_PAN)
|
||||
ret
|
||||
.previous
|
||||
|
|
|
@ -74,5 +74,7 @@ ENDPROC(__arch_copy_to_user)
|
|||
.section .fixup,"ax"
|
||||
.align 2
|
||||
9998: sub x0, end, dst // bytes not copied
|
||||
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
|
||||
CONFIG_ARM64_PAN)
|
||||
ret
|
||||
.previous
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
#include <bcm47xx_board.h>
|
||||
#include <bcm47xx.h>
|
||||
|
||||
static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
|
||||
static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
|
||||
{
|
||||
const int usb_power = 12;
|
||||
int err;
|
||||
|
||||
err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
|
||||
|
@ -22,7 +21,10 @@ void __init bcm47xx_workarounds(void)
|
|||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_workarounds_netgear_wnr3500l();
|
||||
bcm47xx_workarounds_enable_usb_power(12);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
|
||||
bcm47xx_workarounds_enable_usb_power(21);
|
||||
break;
|
||||
default:
|
||||
/* No workaround(s) needed */
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
#include <asm/stacktrace.h>
|
||||
|
||||
/* Maximum physical address we can use pages from */
|
||||
#define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000)
|
||||
#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
|
||||
/* Maximum address we can reach in physical address mode */
|
||||
#define KEXEC_DESTINATION_MEMORY_LIMIT (0x20000000)
|
||||
#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
|
||||
/* Maximum address we can use for the control code buffer */
|
||||
#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000)
|
||||
#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
|
||||
/* Reserve 3*4096 bytes for board-specific info */
|
||||
#define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
|
||||
|
||||
|
|
|
@ -961,12 +961,11 @@ void __init txx9_sramc_init(struct resource *r)
|
|||
goto exit_put;
|
||||
err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr);
|
||||
if (err) {
|
||||
device_unregister(&dev->dev);
|
||||
iounmap(dev->base);
|
||||
kfree(dev);
|
||||
device_unregister(&dev->dev);
|
||||
}
|
||||
return;
|
||||
exit_put:
|
||||
iounmap(dev->base);
|
||||
put_device(&dev->dev);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <types.h>
|
||||
#include <string.h>
|
||||
|
||||
#define INT_MAX ((int)(~0U>>1))
|
||||
|
||||
#include "of.h"
|
||||
|
||||
typedef u32 uint32_t;
|
||||
|
|
|
@ -764,9 +764,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
|
|||
|
||||
vaddr = page_address(page) + offset;
|
||||
uaddr = (unsigned long)vaddr;
|
||||
npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
|
||||
|
||||
if (tbl) {
|
||||
npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
|
||||
align = 0;
|
||||
if (tbl->it_page_shift < PAGE_SHIFT && size >= PAGE_SIZE &&
|
||||
((unsigned long)vaddr & ~PAGE_MASK) == 0)
|
||||
|
|
|
@ -967,6 +967,7 @@ int rtas_ibm_suspend_me(u64 handle)
|
|||
goto out;
|
||||
}
|
||||
|
||||
cpu_hotplug_disable();
|
||||
stop_topology_update();
|
||||
|
||||
/* Call function on all CPUs. One of us will make the
|
||||
|
@ -981,6 +982,7 @@ int rtas_ibm_suspend_me(u64 handle)
|
|||
printk(KERN_ERR "Error doing global join\n");
|
||||
|
||||
start_topology_update();
|
||||
cpu_hotplug_enable();
|
||||
|
||||
/* Take down CPUs not online prior to suspend */
|
||||
cpuret = rtas_offline_cpus_mask(offline_mask);
|
||||
|
|
|
@ -37,6 +37,7 @@ data_page_branch:
|
|||
mtlr r0
|
||||
addi r3, r3, __kernel_datapage_offset-data_page_branch
|
||||
lwz r0,0(r3)
|
||||
.cfi_restore lr
|
||||
add r3,r0,r3
|
||||
blr
|
||||
.cfi_endproc
|
||||
|
|
|
@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
|
|||
*/
|
||||
99:
|
||||
li r0,__NR_clock_gettime
|
||||
.cfi_restore lr
|
||||
sc
|
||||
blr
|
||||
.cfi_endproc
|
||||
|
|
|
@ -37,6 +37,7 @@ data_page_branch:
|
|||
mtlr r0
|
||||
addi r3, r3, __kernel_datapage_offset-data_page_branch
|
||||
lwz r0,0(r3)
|
||||
.cfi_restore lr
|
||||
add r3,r0,r3
|
||||
blr
|
||||
.cfi_endproc
|
||||
|
|
|
@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
|
|||
*/
|
||||
99:
|
||||
li r0,__NR_clock_gettime
|
||||
.cfi_restore lr
|
||||
sc
|
||||
blr
|
||||
.cfi_endproc
|
||||
|
|
|
@ -70,8 +70,11 @@ void kvmppc_unfixup_split_real(struct kvm_vcpu *vcpu)
|
|||
{
|
||||
if (vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) {
|
||||
ulong pc = kvmppc_get_pc(vcpu);
|
||||
ulong lr = kvmppc_get_lr(vcpu);
|
||||
if ((pc & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS)
|
||||
kvmppc_set_pc(vcpu, pc & ~SPLIT_HACK_MASK);
|
||||
if ((lr & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS)
|
||||
kvmppc_set_lr(vcpu, lr & ~SPLIT_HACK_MASK);
|
||||
vcpu->arch.hflags &= ~BOOK3S_HFLAG_SPLIT_HACK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ void slb_initialize(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
get_paca()->stab_rr = SLB_NUM_BOLTED;
|
||||
get_paca()->stab_rr = SLB_NUM_BOLTED - 1;
|
||||
|
||||
lflags = SLB_VSID_KERNEL | linear_llp;
|
||||
vflags = SLB_VSID_KERNEL | vmalloc_llp;
|
||||
|
|
|
@ -150,7 +150,7 @@ static int dtl_start(struct dtl *dtl)
|
|||
|
||||
/* Register our dtl buffer with the hypervisor. The HV expects the
|
||||
* buffer size to be passed in the second word of the buffer */
|
||||
((u32 *)dtl->buf)[1] = DISPATCH_LOG_BYTES;
|
||||
((u32 *)dtl->buf)[1] = cpu_to_be32(DISPATCH_LOG_BYTES);
|
||||
|
||||
hwcpu = get_hard_smp_processor_id(dtl->cpu);
|
||||
addr = __pa(dtl->buf);
|
||||
|
@ -185,7 +185,7 @@ static void dtl_stop(struct dtl *dtl)
|
|||
|
||||
static u64 dtl_current_index(struct dtl *dtl)
|
||||
{
|
||||
return lppaca_of(dtl->cpu).dtl_idx;
|
||||
return be64_to_cpu(lppaca_of(dtl->cpu).dtl_idx);
|
||||
}
|
||||
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
|
||||
|
||||
|
|
|
@ -2549,8 +2549,7 @@ config OLPC
|
|||
|
||||
config OLPC_XO1_PM
|
||||
bool "OLPC XO-1 Power Management"
|
||||
depends on OLPC && MFD_CS5535 && PM_SLEEP
|
||||
select MFD_CORE
|
||||
depends on OLPC && MFD_CS5535=y && PM_SLEEP
|
||||
---help---
|
||||
Add support for poweroff and suspend of the OLPC XO-1 laptop.
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static __always_inline void atomic_add(int i, atomic_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "addl %1,%0"
|
||||
: "+m" (v->counter)
|
||||
: "ir" (i));
|
||||
: "ir" (i) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@ static __always_inline void atomic_sub(int i, atomic_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "subl %1,%0"
|
||||
: "+m" (v->counter)
|
||||
: "ir" (i));
|
||||
: "ir" (i) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
|
|||
static __always_inline void atomic_inc(atomic_t *v)
|
||||
{
|
||||
asm volatile(LOCK_PREFIX "incl %0"
|
||||
: "+m" (v->counter));
|
||||
: "+m" (v->counter) :: "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ static __always_inline void atomic_inc(atomic_t *v)
|
|||
static __always_inline void atomic_dec(atomic_t *v)
|
||||
{
|
||||
asm volatile(LOCK_PREFIX "decl %0"
|
||||
: "+m" (v->counter));
|
||||
: "+m" (v->counter) :: "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@ static __always_inline void atomic64_add(long i, atomic64_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "addq %1,%0"
|
||||
: "=m" (v->counter)
|
||||
: "er" (i), "m" (v->counter));
|
||||
: "er" (i), "m" (v->counter) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ static inline void atomic64_sub(long i, atomic64_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "subq %1,%0"
|
||||
: "=m" (v->counter)
|
||||
: "er" (i), "m" (v->counter));
|
||||
: "er" (i), "m" (v->counter) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +85,7 @@ static __always_inline void atomic64_inc(atomic64_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "incq %0"
|
||||
: "=m" (v->counter)
|
||||
: "m" (v->counter));
|
||||
: "m" (v->counter) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,7 @@ static __always_inline void atomic64_dec(atomic64_t *v)
|
|||
{
|
||||
asm volatile(LOCK_PREFIX "decq %0"
|
||||
: "=m" (v->counter)
|
||||
: "m" (v->counter));
|
||||
: "m" (v->counter) : "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,7 +116,7 @@ do { \
|
|||
#endif
|
||||
|
||||
/* Atomic operations are already serializing on x86 */
|
||||
#define smp_mb__before_atomic() barrier()
|
||||
#define smp_mb__after_atomic() barrier()
|
||||
#define smp_mb__before_atomic() do { } while (0)
|
||||
#define smp_mb__after_atomic() do { } while (0)
|
||||
|
||||
#endif /* _ASM_X86_BARRIER_H */
|
||||
|
|
|
@ -198,4 +198,22 @@ static inline int insn_offset_immediate(struct insn *insn)
|
|||
return insn_offset_displacement(insn) + insn->displacement.nbytes;
|
||||
}
|
||||
|
||||
#define POP_SS_OPCODE 0x1f
|
||||
#define MOV_SREG_OPCODE 0x8e
|
||||
|
||||
/*
|
||||
* Intel SDM Vol.3A 6.8.3 states;
|
||||
* "Any single-step trap that would be delivered following the MOV to SS
|
||||
* instruction or POP to SS instruction (because EFLAGS.TF is 1) is
|
||||
* suppressed."
|
||||
* This function returns true if @insn is MOV SS or POP SS. On these
|
||||
* instructions, single stepping is suppressed.
|
||||
*/
|
||||
static inline int insn_masking_exception(struct insn *insn)
|
||||
{
|
||||
return insn->opcode.bytes[0] == POP_SS_OPCODE ||
|
||||
(insn->opcode.bytes[0] == MOV_SREG_OPCODE &&
|
||||
X86_MODRM_REG(insn->modrm.bytes[0]) == 2);
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_INSN_H */
|
||||
|
|
|
@ -66,7 +66,7 @@ struct kimage;
|
|||
|
||||
/* Memory to backup during crash kdump */
|
||||
#define KEXEC_BACKUP_SRC_START (0UL)
|
||||
#define KEXEC_BACKUP_SRC_END (640 * 1024UL) /* 640K */
|
||||
#define KEXEC_BACKUP_SRC_END (640 * 1024UL - 1) /* 640K */
|
||||
|
||||
/*
|
||||
* CPU does not save ss and sp on stack if execution is already
|
||||
|
|
|
@ -433,7 +433,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)
|
|||
/* enable MAPEN */
|
||||
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);
|
||||
/* enable cpuid */
|
||||
setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);
|
||||
setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80);
|
||||
/* disable MAPEN */
|
||||
setCx86(CX86_CCR3, ccr3);
|
||||
local_irq_restore(flags);
|
||||
|
|
|
@ -373,6 +373,10 @@ int __copy_instruction(u8 *dest, u8 *src)
|
|||
return 0;
|
||||
memcpy(dest, insn.kaddr, length);
|
||||
|
||||
/* We should not singlestep on the exception masking instructions */
|
||||
if (insn_masking_exception(&insn))
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
if (insn_rip_relative(&insn)) {
|
||||
s64 newdisp;
|
||||
|
|
|
@ -296,6 +296,10 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool
|
|||
if (is_prefix_bad(insn))
|
||||
return -ENOTSUPP;
|
||||
|
||||
/* We should not singlestep on the exception masking instructions */
|
||||
if (insn_masking_exception(insn))
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (x86_64)
|
||||
good_insns = good_insns_64;
|
||||
else
|
||||
|
@ -983,7 +987,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs
|
|||
pr_err("uprobe: return address clobbered: pid=%d, %%sp=%#lx, "
|
||||
"%%ip=%#lx\n", current->pid, regs->sp, regs->ip);
|
||||
|
||||
force_sig_info(SIGSEGV, SEND_SIG_FORCED, current);
|
||||
force_sig(SIGSEGV, current);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -1186,6 +1186,7 @@ void acpi_os_wait_events_complete(void)
|
|||
flush_workqueue(kacpid_wq);
|
||||
flush_workqueue(kacpi_notify_wq);
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_os_wait_events_complete);
|
||||
|
||||
struct acpi_hp_work {
|
||||
struct work_struct work;
|
||||
|
|
|
@ -454,8 +454,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
|
|||
decode_osc_support(root, "OS supports", support);
|
||||
status = acpi_pci_osc_support(root, support);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
|
||||
acpi_format_exception(status));
|
||||
dev_info(&device->dev, "_OSC failed (%s)%s\n",
|
||||
acpi_format_exception(status),
|
||||
pcie_aspm_support_enabled() ? "; disabling ASPM" : "");
|
||||
*no_aspm = 1;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -196,6 +196,7 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc)
|
|||
hc->callback = NULL;
|
||||
hc->context = NULL;
|
||||
mutex_unlock(&hc->lock);
|
||||
acpi_os_wait_events_complete();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -292,6 +293,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device)
|
|||
|
||||
hc = acpi_driver_data(device);
|
||||
acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
|
||||
acpi_os_wait_events_complete();
|
||||
kfree(hc);
|
||||
device->driver_data = NULL;
|
||||
return 0;
|
||||
|
|
|
@ -1654,6 +1654,21 @@ nothing_to_do:
|
|||
return 1;
|
||||
}
|
||||
|
||||
static bool ata_check_nblocks(struct scsi_cmnd *scmd, u32 n_blocks)
|
||||
{
|
||||
struct request *rq = scmd->request;
|
||||
u32 req_blocks;
|
||||
|
||||
if (!blk_rq_is_passthrough(rq))
|
||||
return true;
|
||||
|
||||
req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size;
|
||||
if (n_blocks > req_blocks)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one
|
||||
* @qc: Storage for translated ATA taskfile
|
||||
|
@ -1693,6 +1708,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
|
|||
scsi_10_lba_len(cdb, &block, &n_block);
|
||||
if (cdb[1] & (1 << 3))
|
||||
tf_flags |= ATA_TFLAG_FUA;
|
||||
if (!ata_check_nblocks(scmd, n_block))
|
||||
goto invalid_fld;
|
||||
break;
|
||||
case READ_6:
|
||||
case WRITE_6:
|
||||
|
@ -1705,6 +1722,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
|
|||
*/
|
||||
if (!n_block)
|
||||
n_block = 256;
|
||||
if (!ata_check_nblocks(scmd, n_block))
|
||||
goto invalid_fld;
|
||||
break;
|
||||
case READ_16:
|
||||
case WRITE_16:
|
||||
|
@ -1713,6 +1732,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
|
|||
scsi_16_lba_len(cdb, &block, &n_block);
|
||||
if (cdb[1] & (1 << 3))
|
||||
tf_flags |= ATA_TFLAG_FUA;
|
||||
if (!ata_check_nblocks(scmd, n_block))
|
||||
goto invalid_fld;
|
||||
break;
|
||||
default:
|
||||
DPRINTK("no-byte command\n");
|
||||
|
|
|
@ -659,7 +659,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
|||
* start of new transfer.
|
||||
*/
|
||||
drv_data->dma_rx_data.port = EP93XX_DMA_IDE;
|
||||
drv_data->dma_rx_data.direction = DMA_FROM_DEVICE;
|
||||
drv_data->dma_rx_data.direction = DMA_DEV_TO_MEM;
|
||||
drv_data->dma_rx_data.name = "ep93xx-pata-rx";
|
||||
drv_data->dma_rx_channel = dma_request_channel(mask,
|
||||
ep93xx_pata_dma_filter, &drv_data->dma_rx_data);
|
||||
|
@ -667,7 +667,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
|||
return;
|
||||
|
||||
drv_data->dma_tx_data.port = EP93XX_DMA_IDE;
|
||||
drv_data->dma_tx_data.direction = DMA_TO_DEVICE;
|
||||
drv_data->dma_tx_data.direction = DMA_MEM_TO_DEV;
|
||||
drv_data->dma_tx_data.name = "ep93xx-pata-tx";
|
||||
drv_data->dma_tx_channel = dma_request_channel(mask,
|
||||
ep93xx_pata_dma_filter, &drv_data->dma_tx_data);
|
||||
|
@ -678,7 +678,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
|||
|
||||
/* Configure receive channel direction and source address */
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.direction = DMA_FROM_DEVICE;
|
||||
conf.direction = DMA_DEV_TO_MEM;
|
||||
conf.src_addr = drv_data->udma_in_phys;
|
||||
conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
||||
if (dmaengine_slave_config(drv_data->dma_rx_channel, &conf)) {
|
||||
|
@ -689,7 +689,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
|||
|
||||
/* Configure transmit channel direction and destination address */
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.direction = DMA_TO_DEVICE;
|
||||
conf.direction = DMA_MEM_TO_DEV;
|
||||
conf.dst_addr = drv_data->udma_out_phys;
|
||||
conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
||||
if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) {
|
||||
|
|
|
@ -246,7 +246,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
|
|||
tty_ldisc_flush(tty);
|
||||
tty_driver_flush_buffer(tty);
|
||||
|
||||
if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
|
||||
if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
|
||||
hu->proto->flush(hu);
|
||||
|
||||
return 0;
|
||||
|
@ -531,7 +531,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
|
|||
|
||||
cancel_work_sync(&hu->write_work);
|
||||
|
||||
if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
|
||||
if (test_and_clear_bit(HCI_UART_PROTO_READY, &hu->flags)) {
|
||||
if (hdev) {
|
||||
if (test_bit(HCI_UART_REGISTERED, &hu->flags))
|
||||
hci_unregister_dev(hdev);
|
||||
|
@ -542,6 +542,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
|
|||
hu->proto = NULL;
|
||||
hci_uart_proto_unlock(hu);
|
||||
}
|
||||
clear_bit(HCI_UART_PROTO_SET, &hu->flags);
|
||||
|
||||
cancel_work_sync(&hu->write_work);
|
||||
|
||||
|
@ -573,7 +574,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
|
|||
if (tty != hu->tty)
|
||||
return;
|
||||
|
||||
if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
|
||||
if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
|
||||
hci_uart_tx_wakeup(hu);
|
||||
}
|
||||
|
||||
|
@ -597,7 +598,7 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
|
|||
if (!hu || tty != hu->tty)
|
||||
return;
|
||||
|
||||
if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
|
||||
if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
|
||||
return;
|
||||
|
||||
/* It does not need a lock here as it is already protected by a mutex in
|
||||
|
@ -692,6 +693,7 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id)
|
|||
return err;
|
||||
}
|
||||
|
||||
set_bit(HCI_UART_PROTO_READY, &hu->flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ struct hci_uart {
|
|||
/* HCI_UART proto flag bits */
|
||||
#define HCI_UART_PROTO_SET 0
|
||||
#define HCI_UART_REGISTERED 1
|
||||
#define HCI_UART_PROTO_READY 2
|
||||
|
||||
/* TX states */
|
||||
#define HCI_UART_SENDING 1
|
||||
|
|
|
@ -28,9 +28,24 @@
|
|||
|
||||
#define DCP_MAX_CHANS 4
|
||||
#define DCP_BUF_SZ PAGE_SIZE
|
||||
#define DCP_SHA_PAY_SZ 64
|
||||
|
||||
#define DCP_ALIGNMENT 64
|
||||
|
||||
/*
|
||||
* Null hashes to align with hw behavior on imx6sl and ull
|
||||
* these are flipped for consistency with hw output
|
||||
*/
|
||||
const uint8_t sha1_null_hash[] =
|
||||
"\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf"
|
||||
"\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda";
|
||||
|
||||
const uint8_t sha256_null_hash[] =
|
||||
"\x55\xb8\x52\x78\x1b\x99\x95\xa4"
|
||||
"\x4c\x93\x9b\x64\xe4\x41\xae\x27"
|
||||
"\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a"
|
||||
"\x14\x1c\xfc\x98\x42\xc4\xb0\xe3";
|
||||
|
||||
/* DCP DMA descriptor. */
|
||||
struct dcp_dma_desc {
|
||||
uint32_t next_cmd_addr;
|
||||
|
@ -48,6 +63,7 @@ struct dcp_coherent_block {
|
|||
uint8_t aes_in_buf[DCP_BUF_SZ];
|
||||
uint8_t aes_out_buf[DCP_BUF_SZ];
|
||||
uint8_t sha_in_buf[DCP_BUF_SZ];
|
||||
uint8_t sha_out_buf[DCP_SHA_PAY_SZ];
|
||||
|
||||
uint8_t aes_key[2 * AES_KEYSIZE_128];
|
||||
|
||||
|
@ -209,6 +225,12 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
|
|||
dma_addr_t dst_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_out_buf,
|
||||
DCP_BUF_SZ, DMA_FROM_DEVICE);
|
||||
|
||||
if (actx->fill % AES_BLOCK_SIZE) {
|
||||
dev_err(sdcp->dev, "Invalid block size!\n");
|
||||
ret = -EINVAL;
|
||||
goto aes_done_run;
|
||||
}
|
||||
|
||||
/* Fill in the DMA descriptor. */
|
||||
desc->control0 = MXS_DCP_CONTROL0_DECR_SEMAPHORE |
|
||||
MXS_DCP_CONTROL0_INTERRUPT |
|
||||
|
@ -238,6 +260,7 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
|
|||
|
||||
ret = mxs_dcp_start_dma(actx);
|
||||
|
||||
aes_done_run:
|
||||
dma_unmap_single(sdcp->dev, key_phys, 2 * AES_KEYSIZE_128,
|
||||
DMA_TO_DEVICE);
|
||||
dma_unmap_single(sdcp->dev, src_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
|
||||
|
@ -264,13 +287,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
|
|||
|
||||
uint8_t *out_tmp, *src_buf, *dst_buf = NULL;
|
||||
uint32_t dst_off = 0;
|
||||
uint32_t last_out_len = 0;
|
||||
|
||||
uint8_t *key = sdcp->coh->aes_key;
|
||||
|
||||
int ret = 0;
|
||||
int split = 0;
|
||||
unsigned int i, len, clen, rem = 0;
|
||||
unsigned int i, len, clen, rem = 0, tlen = 0;
|
||||
int init = 0;
|
||||
bool limit_hit = false;
|
||||
|
||||
actx->fill = 0;
|
||||
|
||||
|
@ -289,6 +314,11 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
|
|||
for_each_sg(req->src, src, nents, i) {
|
||||
src_buf = sg_virt(src);
|
||||
len = sg_dma_len(src);
|
||||
tlen += len;
|
||||
limit_hit = tlen > req->nbytes;
|
||||
|
||||
if (limit_hit)
|
||||
len = req->nbytes - (tlen - len);
|
||||
|
||||
do {
|
||||
if (actx->fill + len > out_off)
|
||||
|
@ -305,13 +335,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
|
|||
* If we filled the buffer or this is the last SG,
|
||||
* submit the buffer.
|
||||
*/
|
||||
if (actx->fill == out_off || sg_is_last(src)) {
|
||||
if (actx->fill == out_off || sg_is_last(src) ||
|
||||
limit_hit) {
|
||||
ret = mxs_dcp_run_aes(actx, req, init);
|
||||
if (ret)
|
||||
return ret;
|
||||
init = 0;
|
||||
|
||||
out_tmp = out_buf;
|
||||
last_out_len = actx->fill;
|
||||
while (dst && actx->fill) {
|
||||
if (!split) {
|
||||
dst_buf = sg_virt(dst);
|
||||
|
@ -334,6 +366,19 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
|
|||
}
|
||||
}
|
||||
} while (len);
|
||||
|
||||
if (limit_hit)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Copy the IV for CBC for chaining */
|
||||
if (!rctx->ecb) {
|
||||
if (rctx->enc)
|
||||
memcpy(req->info, out_buf+(last_out_len-AES_BLOCK_SIZE),
|
||||
AES_BLOCK_SIZE);
|
||||
else
|
||||
memcpy(req->info, in_buf+(last_out_len-AES_BLOCK_SIZE),
|
||||
AES_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -518,8 +563,6 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
|
|||
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
|
||||
struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm);
|
||||
struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req);
|
||||
struct hash_alg_common *halg = crypto_hash_alg_common(tfm);
|
||||
|
||||
struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
|
||||
|
||||
dma_addr_t digest_phys = 0;
|
||||
|
@ -541,10 +584,23 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
|
|||
desc->payload = 0;
|
||||
desc->status = 0;
|
||||
|
||||
/*
|
||||
* Align driver with hw behavior when generating null hashes
|
||||
*/
|
||||
if (rctx->init && rctx->fini && desc->size == 0) {
|
||||
struct hash_alg_common *halg = crypto_hash_alg_common(tfm);
|
||||
const uint8_t *sha_buf =
|
||||
(actx->alg == MXS_DCP_CONTROL1_HASH_SELECT_SHA1) ?
|
||||
sha1_null_hash : sha256_null_hash;
|
||||
memcpy(sdcp->coh->sha_out_buf, sha_buf, halg->digestsize);
|
||||
ret = 0;
|
||||
goto done_run;
|
||||
}
|
||||
|
||||
/* Set HASH_TERM bit for last transfer block. */
|
||||
if (rctx->fini) {
|
||||
digest_phys = dma_map_single(sdcp->dev, req->result,
|
||||
halg->digestsize, DMA_FROM_DEVICE);
|
||||
digest_phys = dma_map_single(sdcp->dev, sdcp->coh->sha_out_buf,
|
||||
DCP_SHA_PAY_SZ, DMA_FROM_DEVICE);
|
||||
desc->control0 |= MXS_DCP_CONTROL0_HASH_TERM;
|
||||
desc->payload = digest_phys;
|
||||
}
|
||||
|
@ -552,9 +608,10 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
|
|||
ret = mxs_dcp_start_dma(actx);
|
||||
|
||||
if (rctx->fini)
|
||||
dma_unmap_single(sdcp->dev, digest_phys, halg->digestsize,
|
||||
dma_unmap_single(sdcp->dev, digest_phys, DCP_SHA_PAY_SZ,
|
||||
DMA_FROM_DEVICE);
|
||||
|
||||
done_run:
|
||||
dma_unmap_single(sdcp->dev, buf_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
|
||||
|
||||
return ret;
|
||||
|
@ -572,6 +629,7 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
|
|||
const int nents = sg_nents(req->src);
|
||||
|
||||
uint8_t *in_buf = sdcp->coh->sha_in_buf;
|
||||
uint8_t *out_buf = sdcp->coh->sha_out_buf;
|
||||
|
||||
uint8_t *src_buf;
|
||||
|
||||
|
@ -626,11 +684,9 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
|
|||
|
||||
actx->fill = 0;
|
||||
|
||||
/* For some reason, the result is flipped. */
|
||||
for (i = 0; i < halg->digestsize / 2; i++) {
|
||||
swap(req->result[i],
|
||||
req->result[halg->digestsize - i - 1]);
|
||||
}
|
||||
/* For some reason the result is flipped */
|
||||
for (i = 0; i < halg->digestsize; i++)
|
||||
req->result[i] = out_buf[halg->digestsize - i - 1];
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -576,7 +576,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
|
|||
to_jz4780_dma_desc(vdesc), 0);
|
||||
} else if (cookie == jzchan->desc->vdesc.tx.cookie) {
|
||||
txstate->residue = jz4780_dma_desc_residue(jzchan, jzchan->desc,
|
||||
(jzchan->curr_hwdesc + 1) % jzchan->desc->count);
|
||||
jzchan->curr_hwdesc + 1);
|
||||
} else
|
||||
txstate->residue = 0;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ static void
|
|||
ioat_init_channel(struct ioatdma_device *ioat_dma,
|
||||
struct ioatdma_chan *ioat_chan, int idx);
|
||||
static void ioat_intr_quirk(struct ioatdma_device *ioat_dma);
|
||||
static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma);
|
||||
static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma);
|
||||
static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma);
|
||||
|
||||
static int ioat_dca_enabled = 1;
|
||||
|
@ -593,7 +593,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma)
|
|||
* ioat_enumerate_channels - find and initialize the device's channels
|
||||
* @ioat_dma: the ioat dma device to be enumerated
|
||||
*/
|
||||
static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
|
||||
static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
|
||||
{
|
||||
struct ioatdma_chan *ioat_chan;
|
||||
struct device *dev = &ioat_dma->pdev->dev;
|
||||
|
@ -612,7 +612,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
|
|||
xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET);
|
||||
xfercap_log &= 0x1f; /* bits [4:0] valid */
|
||||
if (xfercap_log == 0)
|
||||
return 0;
|
||||
return;
|
||||
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
|
||||
|
||||
for (i = 0; i < dma->chancnt; i++) {
|
||||
|
@ -629,7 +629,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
|
|||
}
|
||||
}
|
||||
dma->chancnt = i;
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -552,7 +552,7 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
|
|||
}
|
||||
|
||||
dma_sync_single_for_device(chan2dmadev(chan), td_desc->txd.phys,
|
||||
td_desc->desc_list_len, DMA_MEM_TO_DEV);
|
||||
td_desc->desc_list_len, DMA_TO_DEVICE);
|
||||
|
||||
return &td_desc->txd;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ static int syscon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, int val)
|
|||
BIT(offs % SYSCON_REG_BITS));
|
||||
}
|
||||
|
||||
priv->data->set(chip, offset, val);
|
||||
chip->set(chip, offset, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -227,8 +227,12 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
|||
|
||||
ctx->pwm = devm_of_pwm_get(&pdev->dev, pdev->dev.of_node, NULL);
|
||||
if (IS_ERR(ctx->pwm)) {
|
||||
dev_err(&pdev->dev, "Could not get PWM\n");
|
||||
return PTR_ERR(ctx->pwm);
|
||||
ret = PTR_ERR(ctx->pwm);
|
||||
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Could not get PWM: %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
|
|
@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev,
|
|||
long mask)
|
||||
{
|
||||
struct mcp4922_state *state = iio_priv(indio_dev);
|
||||
int ret;
|
||||
|
||||
if (val2 != 0)
|
||||
return -EINVAL;
|
||||
|
||||
switch (mask) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
if (val > GENMASK(chan->scan_type.realbits-1, 0))
|
||||
if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0))
|
||||
return -EINVAL;
|
||||
val <<= chan->scan_type.shift;
|
||||
state->value[chan->channel] = val;
|
||||
return mcp4922_spi_write(state, chan->channel, val);
|
||||
|
||||
ret = mcp4922_spi_write(state, chan->channel, val);
|
||||
if (!ret)
|
||||
state->value[chan->channel] = val;
|
||||
return ret;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -989,7 +989,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
|
|||
goto err_free_dev;
|
||||
}
|
||||
|
||||
if (mthca_cmd_init(mdev)) {
|
||||
err = mthca_cmd_init(mdev);
|
||||
if (err) {
|
||||
mthca_err(mdev, "Failed to init command interface, aborting.\n");
|
||||
goto err_free_dev;
|
||||
}
|
||||
|
|
|
@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_device *ff)
|
|||
{
|
||||
struct ml_device *ml = ff->private;
|
||||
|
||||
/*
|
||||
* Even though we stop all playing effects when tearing down
|
||||
* an input device (via input_device_flush() that calls into
|
||||
* input_ff_flush() that stops and erases all effects), we
|
||||
* do not actually stop the timer, and therefore we should
|
||||
* do it here.
|
||||
*/
|
||||
del_timer_sync(&ml->timer);
|
||||
|
||||
kfree(ml->private);
|
||||
}
|
||||
|
||||
|
|
|
@ -203,6 +203,7 @@ static int st1232_ts_probe(struct i2c_client *client,
|
|||
input_dev->id.bustype = BUS_I2C;
|
||||
input_dev->dev.parent = &client->dev;
|
||||
|
||||
__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
|
||||
__set_bit(EV_SYN, input_dev->evbit);
|
||||
__set_bit(EV_KEY, input_dev->evbit);
|
||||
__set_bit(EV_ABS, input_dev->evbit);
|
||||
|
|
|
@ -902,6 +902,7 @@ static void cached_dev_detach_finish(struct work_struct *w)
|
|||
bch_write_bdev_super(dc, &cl);
|
||||
closure_sync(&cl);
|
||||
|
||||
calc_cached_dev_sectors(dc->disk.c);
|
||||
bcache_device_detach(&dc->disk);
|
||||
list_move(&dc->list, &uncached_devices);
|
||||
|
||||
|
|
|
@ -936,7 +936,7 @@ static void ivtv_yuv_init(struct ivtv *itv)
|
|||
}
|
||||
|
||||
/* We need a buffer for blanking when Y plane is offset - non-fatal if we can't get one */
|
||||
yi->blanking_ptr = kzalloc(720 * 16, GFP_KERNEL|__GFP_NOWARN);
|
||||
yi->blanking_ptr = kzalloc(720 * 16, GFP_ATOMIC|__GFP_NOWARN);
|
||||
if (yi->blanking_ptr) {
|
||||
yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE);
|
||||
} else {
|
||||
|
|
|
@ -1469,7 +1469,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
unsigned long page, pos;
|
||||
|
||||
mutex_lock(&meye.lock);
|
||||
if (size > gbuffers * gbufsize) {
|
||||
if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {
|
||||
mutex_unlock(&meye.lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -1106,7 +1106,8 @@ fail_nobase_res:
|
|||
|
||||
while (i >= 0) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
if (res)
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
i--;
|
||||
}
|
||||
vpfe_unregister_ccdc_device(&isif_hw_dev);
|
||||
|
|
|
@ -520,7 +520,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,
|
|||
else if (v_scale == 4)
|
||||
layer_info->v_zoom = ZOOM_X4;
|
||||
if (v_exp)
|
||||
layer_info->h_exp = V_EXP_6_OVER_5;
|
||||
layer_info->v_exp = V_EXP_6_OVER_5;
|
||||
} else {
|
||||
/* no scaling, only cropping. Set display area to crop area */
|
||||
cfg->ysize = expected_ysize;
|
||||
|
|
|
@ -1346,7 +1346,7 @@ int cx231xx_g_register(struct file *file, void *priv,
|
|||
ret = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
|
||||
(u16)reg->reg, value, 4);
|
||||
reg->val = value[0] | value[1] << 8 |
|
||||
value[2] << 16 | value[3] << 24;
|
||||
value[2] << 16 | (u32)value[3] << 24;
|
||||
reg->size = 4;
|
||||
break;
|
||||
case 1: /* AFE - read byte */
|
||||
|
|
|
@ -298,7 +298,7 @@ static int genwqe_sgl_size(int num_pages)
|
|||
int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
||||
void __user *user_addr, size_t user_size)
|
||||
{
|
||||
int rc;
|
||||
int ret = -ENOMEM;
|
||||
struct pci_dev *pci_dev = cd->pci_dev;
|
||||
|
||||
sgl->fpage_offs = offset_in_page((unsigned long)user_addr);
|
||||
|
@ -317,7 +317,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
if (get_order(sgl->sgl_size) > MAX_ORDER) {
|
||||
dev_err(&pci_dev->dev,
|
||||
"[%s] err: too much memory requested!\n", __func__);
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
sgl->sgl = __genwqe_alloc_consistent(cd, sgl->sgl_size,
|
||||
|
@ -325,7 +325,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
if (sgl->sgl == NULL) {
|
||||
dev_err(&pci_dev->dev,
|
||||
"[%s] err: no memory available!\n", __func__);
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Only use buffering on incomplete pages */
|
||||
|
@ -338,7 +338,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
/* Sync with user memory */
|
||||
if (copy_from_user(sgl->fpage + sgl->fpage_offs,
|
||||
user_addr, sgl->fpage_size)) {
|
||||
rc = -EFAULT;
|
||||
ret = -EFAULT;
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
/* Sync with user memory */
|
||||
if (copy_from_user(sgl->lpage, user_addr + user_size -
|
||||
sgl->lpage_size, sgl->lpage_size)) {
|
||||
rc = -EFAULT;
|
||||
ret = -EFAULT;
|
||||
goto err_out2;
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,8 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
sgl->sgl = NULL;
|
||||
sgl->sgl_dma_addr = 0;
|
||||
sgl->sgl_size = 0;
|
||||
return -ENOMEM;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
||||
|
|
|
@ -979,6 +979,12 @@ static void kgdbts_run_tests(void)
|
|||
int nmi_sleep = 0;
|
||||
int i;
|
||||
|
||||
verbose = 0;
|
||||
if (strstr(config, "V1"))
|
||||
verbose = 1;
|
||||
if (strstr(config, "V2"))
|
||||
verbose = 2;
|
||||
|
||||
ptr = strchr(config, 'F');
|
||||
if (ptr)
|
||||
fork_test = simple_strtol(ptr + 1, NULL, 10);
|
||||
|
@ -1062,13 +1068,6 @@ static int kgdbts_option_setup(char *opt)
|
|||
return -ENOSPC;
|
||||
}
|
||||
strcpy(config, opt);
|
||||
|
||||
verbose = 0;
|
||||
if (strstr(config, "V1"))
|
||||
verbose = 1;
|
||||
if (strstr(config, "V2"))
|
||||
verbose = 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1080,9 +1079,6 @@ static int configure_kgdbts(void)
|
|||
|
||||
if (!strlen(config) || isspace(config[0]))
|
||||
goto noconfig;
|
||||
err = kgdbts_option_setup(config);
|
||||
if (err)
|
||||
goto noconfig;
|
||||
|
||||
final_ack = 0;
|
||||
run_plant_and_detach_test(1);
|
||||
|
|
|
@ -145,7 +145,7 @@ static int sdhci_at91_probe(struct platform_device *pdev)
|
|||
sdhci_get_of_property(pdev);
|
||||
|
||||
/* HS200 is broken at this moment */
|
||||
host->quirks2 = SDHCI_QUIRK2_BROKEN_HS200;
|
||||
host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
|
||||
|
||||
ret = sdhci_add_host(host);
|
||||
if (ret)
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
struct of_flash_list {
|
||||
struct mtd_info *mtd;
|
||||
struct map_info map;
|
||||
struct resource *res;
|
||||
};
|
||||
|
||||
struct of_flash {
|
||||
|
@ -53,18 +52,10 @@ static int of_flash_remove(struct platform_device *dev)
|
|||
mtd_concat_destroy(info->cmtd);
|
||||
}
|
||||
|
||||
for (i = 0; i < info->list_size; i++) {
|
||||
for (i = 0; i < info->list_size; i++)
|
||||
if (info->list[i].mtd)
|
||||
map_destroy(info->list[i].mtd);
|
||||
|
||||
if (info->list[i].map.virt)
|
||||
iounmap(info->list[i].map.virt);
|
||||
|
||||
if (info->list[i].res) {
|
||||
release_resource(info->list[i].res);
|
||||
kfree(info->list[i].res);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -223,10 +214,11 @@ static int of_flash_probe(struct platform_device *dev)
|
|||
|
||||
err = -EBUSY;
|
||||
res_size = resource_size(&res);
|
||||
info->list[i].res = request_mem_region(res.start, res_size,
|
||||
dev_name(&dev->dev));
|
||||
if (!info->list[i].res)
|
||||
info->list[i].map.virt = devm_ioremap_resource(&dev->dev, &res);
|
||||
if (IS_ERR(info->list[i].map.virt)) {
|
||||
err = PTR_ERR(info->list[i].map.virt);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
err = -ENXIO;
|
||||
width = of_get_property(dp, "bank-width", NULL);
|
||||
|
@ -242,15 +234,6 @@ static int of_flash_probe(struct platform_device *dev)
|
|||
info->list[i].map.bankwidth = be32_to_cpup(width);
|
||||
info->list[i].map.device_node = dp;
|
||||
|
||||
err = -ENOMEM;
|
||||
info->list[i].map.virt = ioremap(info->list[i].map.phys,
|
||||
info->list[i].map.size);
|
||||
if (!info->list[i].map.virt) {
|
||||
dev_err(&dev->dev, "Failed to ioremap() flash"
|
||||
" region\n");
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
simple_map_init(&info->list[i].map);
|
||||
|
||||
/*
|
||||
|
|
|
@ -428,7 +428,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
|
|||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_rx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_DEV_TO_MEM) > 0)
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
|
||||
goto convert; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
|
@ -487,7 +487,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
|
|||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_tx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_MEM_TO_DEV) > 0)
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
|
||||
return; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
|
|
|
@ -613,6 +613,7 @@ err_free_chan:
|
|||
sl->tty = NULL;
|
||||
tty->disc_data = NULL;
|
||||
clear_bit(SLF_INUSE, &sl->flags);
|
||||
free_netdev(sl->dev);
|
||||
|
||||
err_exit:
|
||||
rtnl_unlock();
|
||||
|
|
|
@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)
|
|||
/*
|
||||
* Transmit a packet
|
||||
*/
|
||||
static int
|
||||
static netdev_tx_t
|
||||
am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct dev_priv *priv = netdev_priv(dev);
|
||||
|
|
|
@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
|
|||
*init_rec );
|
||||
static int lance_open( struct net_device *dev );
|
||||
static void lance_init_ring( struct net_device *dev );
|
||||
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev );
|
||||
static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
static irqreturn_t lance_interrupt( int irq, void *dev_id );
|
||||
static int lance_rx( struct net_device *dev );
|
||||
static int lance_close( struct net_device *dev );
|
||||
|
@ -770,7 +771,8 @@ static void lance_tx_timeout (struct net_device *dev)
|
|||
|
||||
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
|
||||
|
||||
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
|
||||
static netdev_tx_t
|
||||
lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
struct lance_ioreg *IO = lp->iobase;
|
||||
|
|
|
@ -893,7 +893,7 @@ static void lance_tx_timeout(struct net_device *dev)
|
|||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
volatile struct lance_regs *ll = lp->ll;
|
||||
|
|
|
@ -235,7 +235,8 @@ struct lance_private {
|
|||
static int lance_probe( struct net_device *dev);
|
||||
static int lance_open( struct net_device *dev );
|
||||
static void lance_init_ring( struct net_device *dev );
|
||||
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev );
|
||||
static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
static irqreturn_t lance_interrupt( int irq, void *dev_id);
|
||||
static int lance_rx( struct net_device *dev );
|
||||
static int lance_close( struct net_device *dev );
|
||||
|
@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev )
|
|||
}
|
||||
|
||||
|
||||
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
|
||||
static netdev_tx_t
|
||||
lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
int entry, len;
|
||||
|
|
|
@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)
|
|||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
int entry, skblen, len;
|
||||
|
|
|
@ -1390,7 +1390,7 @@ static int xgbe_close(struct net_device *netdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
|
@ -1399,7 +1399,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||
struct xgbe_ring *ring;
|
||||
struct xgbe_packet_data *packet;
|
||||
struct netdev_queue *txq;
|
||||
int ret;
|
||||
netdev_tx_t ret;
|
||||
|
||||
DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len);
|
||||
|
||||
|
|
|
@ -571,12 +571,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)
|
|||
/*
|
||||
* tx request callback
|
||||
*/
|
||||
static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t
|
||||
bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct bcm_enet_priv *priv;
|
||||
struct bcm_enet_desc *desc;
|
||||
u32 len_stat;
|
||||
int ret;
|
||||
netdev_tx_t ret;
|
||||
|
||||
priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -3532,6 +3532,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
|
|||
*/
|
||||
static void bnx2x_config_mf_bw(struct bnx2x *bp)
|
||||
{
|
||||
/* Workaround for MFW bug.
|
||||
* MFW is not supposed to generate BW attention in
|
||||
* single function mode.
|
||||
*/
|
||||
if (!IS_MF(bp)) {
|
||||
DP(BNX2X_MSG_MCP,
|
||||
"Ignoring MF BW config in single function mode\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (bp->link_vars.link_up) {
|
||||
bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX);
|
||||
bnx2x_link_sync_notify(bp);
|
||||
|
|
|
@ -300,7 +300,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *,
|
|||
static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
|
||||
static uint64_t sbmac_addr2reg(unsigned char *ptr);
|
||||
static irqreturn_t sbmac_intr(int irq, void *dev_instance);
|
||||
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev);
|
||||
static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev);
|
||||
static void sbmac_setmulti(struct sbmac_softc *sc);
|
||||
static int sbmac_init(struct platform_device *pldev, long long base);
|
||||
static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed);
|
||||
|
@ -2033,7 +2033,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)
|
|||
* Return value:
|
||||
* nothing
|
||||
********************************************************************* */
|
||||
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct sbmac_softc *sc = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
|
|
|
@ -266,8 +266,8 @@ void cxgb4_dcb_handle_fw_update(struct adapter *adap,
|
|||
enum cxgb4_dcb_state_input input =
|
||||
((pcmd->u.dcb.control.all_syncd_pkd &
|
||||
FW_PORT_CMD_ALL_SYNCD_F)
|
||||
? CXGB4_DCB_STATE_FW_ALLSYNCED
|
||||
: CXGB4_DCB_STATE_FW_INCOMPLETE);
|
||||
? CXGB4_DCB_INPUT_FW_ALLSYNCED
|
||||
: CXGB4_DCB_INPUT_FW_INCOMPLETE);
|
||||
|
||||
if (dcb->dcb_version != FW_PORT_DCB_VER_UNKNOWN) {
|
||||
dcb_running_version = FW_PORT_CMD_DCB_VERSION_G(
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
do { \
|
||||
if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \
|
||||
cxgb4_dcb_state_fsm((__dev), \
|
||||
CXGB4_DCB_STATE_FW_ALLSYNCED); \
|
||||
CXGB4_DCB_INPUT_FW_ALLSYNCED); \
|
||||
} while (0)
|
||||
|
||||
/* States we can be in for a port's Data Center Bridging.
|
||||
|
|
|
@ -3482,7 +3482,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op)
|
|||
c.param[0].mnem =
|
||||
cpu_to_be32(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) |
|
||||
FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_FWCACHE));
|
||||
c.param[0].val = (__force __be32)op;
|
||||
c.param[0].val = cpu_to_be32(op);
|
||||
|
||||
return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL);
|
||||
}
|
||||
|
|
|
@ -10828,6 +10828,7 @@ static void i40e_remove(struct pci_dev *pdev)
|
|||
mutex_destroy(&hw->aq.asq_mutex);
|
||||
|
||||
/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */
|
||||
rtnl_lock();
|
||||
i40e_clear_interrupt_scheme(pf);
|
||||
for (i = 0; i < pf->num_alloc_vsi; i++) {
|
||||
if (pf->vsi[i]) {
|
||||
|
@ -10836,6 +10837,7 @@ static void i40e_remove(struct pci_dev *pdev)
|
|||
pf->vsi[i] = NULL;
|
||||
}
|
||||
}
|
||||
rtnl_unlock();
|
||||
|
||||
for (i = 0; i < I40E_MAX_VEB; i++) {
|
||||
kfree(pf->veb[i]);
|
||||
|
@ -10982,7 +10984,13 @@ static void i40e_shutdown(struct pci_dev *pdev)
|
|||
wr32(hw, I40E_PFPM_WUFC,
|
||||
(pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
|
||||
|
||||
/* Since we're going to destroy queues during the
|
||||
* i40e_clear_interrupt_scheme() we should hold the RTNL lock for this
|
||||
* whole section
|
||||
*/
|
||||
rtnl_lock();
|
||||
i40e_clear_interrupt_scheme(pf);
|
||||
rtnl_unlock();
|
||||
|
||||
if (system_state == SYSTEM_POWER_OFF) {
|
||||
pci_wake_from_d3(pdev, pf->wol_en);
|
||||
|
|
|
@ -605,7 +605,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)
|
|||
if (!IS_ERR_OR_NULL(pf->ptp_clock))
|
||||
return 0;
|
||||
|
||||
strncpy(pf->ptp_caps.name, i40e_driver_name, sizeof(pf->ptp_caps.name));
|
||||
strncpy(pf->ptp_caps.name, i40e_driver_name,
|
||||
sizeof(pf->ptp_caps.name) - 1);
|
||||
pf->ptp_caps.owner = THIS_MODULE;
|
||||
pf->ptp_caps.max_adj = 999999999;
|
||||
pf->ptp_caps.n_ext_ts = 0;
|
||||
|
|
|
@ -1677,6 +1677,16 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
|
|||
ret = I40E_ERR_INVALID_MAC_ADDR;
|
||||
goto error_param;
|
||||
}
|
||||
|
||||
if (vf->pf_set_mac &&
|
||||
ether_addr_equal(al->list[i].addr,
|
||||
vf->default_lan_addr.addr)) {
|
||||
dev_err(&pf->pdev->dev,
|
||||
"MAC addr %pM has been set by PF, cannot delete it for VF %d, reset VF to change MAC addr\n",
|
||||
vf->default_lan_addr.addr, vf->vf_id);
|
||||
ret = I40E_ERR_PARAM;
|
||||
goto error_param;
|
||||
}
|
||||
}
|
||||
vsi = pf->vsi[vf->lan_vsi_idx];
|
||||
|
||||
|
|
|
@ -4532,6 +4532,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
|
|||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
struct hlist_node *node2;
|
||||
struct ixgbe_fdir_filter *filter;
|
||||
u64 action;
|
||||
|
||||
spin_lock(&adapter->fdir_perfect_lock);
|
||||
|
||||
|
@ -4540,12 +4541,17 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
|
|||
|
||||
hlist_for_each_entry_safe(filter, node2,
|
||||
&adapter->fdir_filter_list, fdir_node) {
|
||||
action = filter->action;
|
||||
if (action != IXGBE_FDIR_DROP_QUEUE && action != 0)
|
||||
action =
|
||||
(action >> ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF) - 1;
|
||||
|
||||
ixgbe_fdir_write_perfect_filter_82599(hw,
|
||||
&filter->filter,
|
||||
filter->sw_idx,
|
||||
(filter->action == IXGBE_FDIR_DROP_QUEUE) ?
|
||||
(action == IXGBE_FDIR_DROP_QUEUE) ?
|
||||
IXGBE_FDIR_DROP_QUEUE :
|
||||
adapter->rx_ring[filter->action]->reg_idx);
|
||||
adapter->rx_ring[action]->reg_idx);
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->fdir_perfect_lock);
|
||||
|
|
|
@ -1156,7 +1156,7 @@ ks8695_timeout(struct net_device *ndev)
|
|||
* sk_buff and adds it to the TX ring. It then kicks the TX DMA
|
||||
* engine to ensure transmission begins.
|
||||
*/
|
||||
static int
|
||||
static netdev_tx_t
|
||||
ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
{
|
||||
struct ks8695_priv *ksp = netdev_priv(ndev);
|
||||
|
|
|
@ -1020,9 +1020,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
|
|||
* spin_lock_irqsave is required because tx and rx should be mutual exclusive.
|
||||
* So while tx is in-progress, prevent IRQ interrupt from happenning.
|
||||
*/
|
||||
static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
int retv = NETDEV_TX_OK;
|
||||
netdev_tx_t retv = NETDEV_TX_OK;
|
||||
struct ks_net *ks = netdev_priv(netdev);
|
||||
|
||||
disable_irq(netdev->irq);
|
||||
|
|
|
@ -511,7 +511,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
|
|||
* now, or set the card to generates an interrupt when ready
|
||||
* for the packet.
|
||||
*/
|
||||
static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t
|
||||
smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct smc911x_local *lp = netdev_priv(dev);
|
||||
unsigned int free;
|
||||
|
|
|
@ -637,7 +637,8 @@ done: if (!THROTTLE_TX_PKTS)
|
|||
* now, or set the card to generates an interrupt when ready
|
||||
* for the packet.
|
||||
*/
|
||||
static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t
|
||||
smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct smc_local *lp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = lp->base;
|
||||
|
|
|
@ -1677,7 +1677,8 @@ static int smsc911x_stop(struct net_device *dev)
|
|||
}
|
||||
|
||||
/* Entry point for transmitting a packet */
|
||||
static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t
|
||||
smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct smsc911x_data *pdata = netdev_priv(dev);
|
||||
unsigned int freespace;
|
||||
|
|
|
@ -845,9 +845,9 @@ static int gelic_card_kick_txdma(struct gelic_card *card,
|
|||
* @skb: packet to send out
|
||||
* @netdev: interface device structure
|
||||
*
|
||||
* returns 0 on success, <0 on failure
|
||||
* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure
|
||||
*/
|
||||
int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
netdev_tx_t gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
struct gelic_card *card = netdev_card(netdev);
|
||||
struct gelic_descr *descr;
|
||||
|
|
|
@ -370,7 +370,7 @@ void gelic_card_up(struct gelic_card *card);
|
|||
void gelic_card_down(struct gelic_card *card);
|
||||
int gelic_net_open(struct net_device *netdev);
|
||||
int gelic_net_stop(struct net_device *netdev);
|
||||
int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev);
|
||||
netdev_tx_t gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev);
|
||||
void gelic_net_set_multi(struct net_device *netdev);
|
||||
void gelic_net_tx_timeout(struct net_device *netdev);
|
||||
int gelic_net_change_mtu(struct net_device *netdev, int new_mtu);
|
||||
|
|
|
@ -881,9 +881,9 @@ out:
|
|||
* @skb: packet to send out
|
||||
* @netdev: interface device structure
|
||||
*
|
||||
* returns 0 on success, !0 on failure
|
||||
* returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure
|
||||
*/
|
||||
static int
|
||||
static netdev_tx_t
|
||||
spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
int cnt;
|
||||
|
|
|
@ -475,7 +475,8 @@ static void free_rxbuf_skb(struct pci_dev *hwdev, struct sk_buff *skb, dma_addr_
|
|||
/* Index to functions, as function prototypes. */
|
||||
|
||||
static int tc35815_open(struct net_device *dev);
|
||||
static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev);
|
||||
static netdev_tx_t tc35815_send_packet(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
static irqreturn_t tc35815_interrupt(int irq, void *dev_id);
|
||||
static int tc35815_rx(struct net_device *dev, int limit);
|
||||
static int tc35815_poll(struct napi_struct *napi, int budget);
|
||||
|
@ -1279,7 +1280,8 @@ tc35815_open(struct net_device *dev)
|
|||
* invariant will hold if you make sure that the netif_*_queue()
|
||||
* calls are done at the proper times.
|
||||
*/
|
||||
static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t
|
||||
tc35815_send_packet(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct tc35815_local *lp = netdev_priv(dev);
|
||||
struct TxFD *txfd;
|
||||
|
|
|
@ -673,7 +673,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
static netdev_tx_t
|
||||
temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
{
|
||||
struct temac_local *lp = netdev_priv(ndev);
|
||||
struct cdmac_bd *cur_p;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue