This is the 4.4.203 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl3b60UACgkQONu9yGCS
 aT7SHA//a75vH8zxZnVvNaDBbpw6GdvWAXiDuwFiaikG/UHOLFjv08aE/+QiuJz/
 AX94klb25jHsXVvMEk79lyDanQYGrrbfuXR6XxY+Q4N8dEdVmp+fBmM+Q/sktdOA
 M6BsAYuim0Ttz/Rv1Vb+dm8U5KlSpqBmqGs/aBSvpVMGCb9AKGbUNF3k4jB42xOU
 zHhyfG2u3K2YU7MbH9b6bktV7Q7ZpqQYD0qDT9aa9Mx1A1z9/mB4CVWjpCvhKPD7
 Dsjuz+/1+lBfvElLKxV1J9Xg+RI4kaqkv42gBydWP/PpsNKvZorZ5X1oFy/a5JSB
 qj4C6FkpTJmvJ0QLISS6s+vC6bEn2G+ojUT4UkgUKlsORyjQBV4twJTVUnX71vNC
 BVOgd/KNBUtu919JRL8Jr39ZTEUkpkhF6XbMjuCiKtoyDN46z13gi9ul54T+Go6S
 npyOBxK2QRbOfo+5b1XSqswfcbOOSTEk4WkSXtYO6XLojl7XRFsCYnxVm50Rc201
 U8nA/Mkk3FunSS21lGbm4e2SCPsVjiyewtolqc5J/4BY/l2y6vkYCEqVMJNelIP+
 cwN81i0Ugwp3v1Zj05dTlxFB8RduZoIIJmJdtrFczdg6gT44qtZR2GsIBMlBaxR/
 PaIYg2MSkWv8ednnPS05d1shgZXczr4aVI3pkj0e5mESu7Q8cRA=
 =NAKA
 -----END PGP SIGNATURE-----

Merge 4.4.203 into android-4.4-p

Changes in 4.4.203
	slip: Fix memory leak in slip_open error path
	ax88172a: fix information leak on short answers
	ALSA: usb-audio: Fix missing error check at mixer resolution test
	ALSA: usb-audio: not submit urb for stopped endpoint
	Input: ff-memless - kill timer in destroy()
	ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
	ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
	iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
	mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
	mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
	mmc: sdhci-of-at91: fix quirk2 overwrite
	iio: dac: mcp4922: fix error handling in mcp4922_write_raw
	ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
	ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
	ALSA: seq: Do error checks at creating system ports
	gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated
	ASoC: dpcm: Properly initialise hw->rate_max
	MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
	ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
	i40e: use correct length for strncpy
	i40e: hold the rtnl lock on clearing interrupt scheme
	i40e: Prevent deleting MAC address from VF when set by PF
	ARM: dts: pxa: fix power i2c base address
	rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
	net: lan78xx: Bail out if lan78xx_get_endpoints fails
	ASoC: sgtl5000: avoid division by zero if lo_vag is zero
	ath10k: wmi: disable softirq's while calling ieee80211_rx
	mips: txx9: fix iounmap related issue
	of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
	ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
	ARM: dts: omap3-gta04: tvout: enable as display1 alias
	ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
	ARM: dts: omap3-gta04: keep vpll2 always on
	dmaengine: dma-jz4780: Further residue status fix
	signal: Always ignore SIGKILL and SIGSTOP sent to the global init
	signal: Properly deliver SIGILL from uprobes
	signal: Properly deliver SIGSEGV from x86 uprobes
	scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
	ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
	scsi: pm80xx: Corrected dma_unmap_sg() parameter
	scsi: pm80xx: Fixed system hang issue during kexec boot
	kprobes: Don't call BUG_ON() if there is a kprobe in use on free list
	nvmem: core: return error code instead of NULL from nvmem_device_get
	media: fix: media: pci: meye: validate offset to avoid arbitrary access
	ALSA: intel8x0m: Register irq handler after register initializations
	pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
	llc: avoid blocking in llc_sap_close()
	powerpc/vdso: Correct call frame information
	ARM: dts: socfpga: Fix I2C bus unit-address error
	pinctrl: at91: don't use the same irqchip with multiple gpiochips
	cxgb4: Fix endianness issue in t4_fwcache()
	power: supply: ab8500_fg: silence uninitialized variable warnings
	power: supply: max8998-charger: Fix platform data retrieval
	kernfs: Fix range checks in kernfs_get_target_path
	s390/qeth: invoke softirqs after napi_schedule()
	PCI/ACPI: Correct error message for ASPM disabling
	serial: mxs-auart: Fix potential infinite loop
	powerpc/iommu: Avoid derefence before pointer check
	powerpc/64s/hash: Fix stab_rr off by one initialization
	powerpc/pseries: Disable CPU hotplug across migrations
	libfdt: Ensure INT_MAX is defined in libfdt_env.h
	power: supply: twl4030_charger: fix charging current out-of-bounds
	power: supply: twl4030_charger: disable eoc interrupt on linear charge
	net: toshiba: fix return type of ndo_start_xmit function
	net: xilinx: fix return type of ndo_start_xmit function
	net: broadcom: fix return type of ndo_start_xmit function
	net: amd: fix return type of ndo_start_xmit function
	usb: chipidea: Fix otg event handler
	ARM: dts: am335x-evm: fix number of cpsw
	ARM: dts: ux500: Correct SCU unit address
	ARM: dts: ux500: Fix LCDA clock line muxing
	ARM: dts: ste: Fix SPI controller node names
	cpufeature: avoid warning when compiling with clang
	bnx2x: Ignore bandwidth attention in single function mode
	net: micrel: fix return type of ndo_start_xmit function
	x86/CPU: Use correct macros for Cyrix calls
	MIPS: kexec: Relax memory restriction
	media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
	media: davinci: Fix implicit enum conversion warning
	usb: gadget: uvc: configfs: Drop leaked references to config items
	usb: gadget: uvc: configfs: Prevent format changes after linking header
	usb: gadget: uvc: Factor out video USB request queueing
	usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
	misc: kgdbts: Fix restrict error
	misc: genwqe: should return proper error value.
	vfio/pci: Fix potential memory leak in vfio_msi_cap_len
	scsi: libsas: always unregister the old device if going to discover new
	ARM: dts: tegra30: fix xcvr-setup-use-fuses
	ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
	net: smsc: fix return type of ndo_start_xmit function
	EDAC: Raise the maximum number of memory controllers
	Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
	arm64: dts: amd: Fix SPI bus warnings
	fuse: use READ_ONCE on congestion_threshold and max_background
	Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
	Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
	memfd: Use radix_tree_deref_slot_protected to avoid the warning.
	slcan: Fix memory leak in error path
	net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
	x86/atomic: Fix smp_mb__{before,after}_atomic()
	apparmor: fix uninitialized lsm_audit member
	apparmor: fix update the mtime of the profile file on replacement
	apparmor: fix module parameters can be changed after policy is locked
	kprobes/x86: Prohibit probing on exception masking instructions
	uprobes/x86: Prohibit probing on MOV SS instruction
	fbdev: Remove unused SH-Mobile HDMI driver
	fbdev: Ditch fb_edid_add_monspecs
	block: introduce blk_rq_is_passthrough
	libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
	net: ovs: fix return type of ndo_start_xmit function
	f2fs: return correct errno in f2fs_gc
	SUNRPC: Fix priority queue fairness
	ath10k: fix vdev-start timeout on error
	ath9k: fix reporting calculated new FFT upper max
	usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
	nl80211: Fix a GET_KEY reply attribute
	dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
	dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
	mei: samples: fix a signedness bug in amt_host_if_call()
	cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
	cxgb4: Use proper enum in IEEE_FAUX_SYNC
	powerpc/pseries: Fix DTL buffer registration
	powerpc/pseries: Fix how we iterate over the DTL entries
	mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer
	ixgbe: Fix crash with VFs and flow director on interface flap
	IB/mthca: Fix error return code in __mthca_init_one()
	ata: ep93xx: Use proper enums for directions
	ALSA: hda/sigmatel - Disable automute for Elo VuPoint
	KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
	USB: serial: cypress_m8: fix interrupt-out transfer length
	mtd: physmap_of: Release resources on error
	brcmfmac: fix full timeout waiting for action frame on-channel tx
	NFSv4.x: fix lock recovery during delegation recall
	dmaengine: ioat: fix prototype of ioat_enumerate_channels
	Input: st1232 - set INPUT_PROP_DIRECT property
	x86/olpc: Fix build error with CONFIG_MFD_CS5535=m
	crypto: mxs-dcp - Fix SHA null hashes and output length
	crypto: mxs-dcp - Fix AES issues
	ACPI / SBS: Fix rare oops when removing modules
	fbdev: sbuslib: use checked version of put_user()
	fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
	bcache: recal cached_dev_sectors on detach
	proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
	backlight: lm3639: Unconditionally call led_classdev_unregister
	printk: Give error on attempt to set log buffer length to over 2G
	media: isif: fix a NULL pointer dereference bug
	GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads
	media: cx231xx: fix potential sign-extension overflow on large shift
	x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
	gpio: syscon: Fix possible NULL ptr usage
	spi: spidev: Fix OF tree warning logic
	ARM: 8802/1: Call syscall_trace_exit even when system call skipped
	hwmon: (pwm-fan) Silence error on probe deferral
	mac80211: minstrel: fix CCK rate group streams value
	spi: rockchip: initialize dma_slave_config properly
	arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
	Linux 4.4.203

Change-Id: Icba08e9fbb6f47274ee6fcf1023a1469cd8550d3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2019-11-25 17:44:35 +01:00
commit 40ef73d67a
191 changed files with 951 additions and 2142 deletions

View file

@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
unsigned int expected_sz) unsigned int expected_sz)
{ {
uint32_t in_buf_sz; uint32_t in_buf_sz;
uint32_t out_buf_sz; ssize_t out_buf_sz;
ssize_t written; ssize_t written;
uint32_t status; uint32_t status;
struct amt_host_if_resp_header *msg_hdr; struct amt_host_if_resp_header *msg_hdr;

View file

@ -1,6 +1,6 @@
VERSION = 4 VERSION = 4
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 202 SUBLEVEL = 203
EXTRAVERSION = EXTRAVERSION =
NAME = Blurry Fish Butt NAME = Blurry Fish Butt

View file

@ -5,6 +5,8 @@
#include <linux/string.h> #include <linux/string.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#define INT_MAX ((int)(~0U>>1))
typedef __be16 fdt16_t; typedef __be16 fdt16_t;
typedef __be32 fdt32_t; typedef __be32 fdt32_t;
typedef __be64 fdt64_t; typedef __be64 fdt64_t;

View file

@ -697,6 +697,7 @@
pinctrl-0 = <&cpsw_default>; pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>; pinctrl-1 = <&cpsw_sleep>;
status = "okay"; status = "okay";
slaves = <1>;
}; };
&davinci_mdio { &davinci_mdio {
@ -704,15 +705,14 @@
pinctrl-0 = <&davinci_mdio_default>; pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>; pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay"; status = "okay";
ethphy0: ethernet-phy@0 {
reg = <0>;
};
}; };
&cpsw_emac0 { &cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>; phy-handle = <&ethphy0>;
phy-mode = "rgmii-txid";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii-txid"; phy-mode = "rgmii-txid";
}; };

View file

@ -546,7 +546,7 @@
}; };
}; };
uart1 { usart1 {
pinctrl_usart1: usart1-0 { pinctrl_usart1: usart1-0 {
atmel,pins = atmel,pins =
<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */ <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */

View file

@ -23,6 +23,14 @@
samsung,model = "Snow-I2S-MAX98090"; samsung,model = "Snow-I2S-MAX98090";
samsung,audio-codec = <&max98090>; samsung,audio-codec = <&max98090>;
cpu {
sound-dai = <&i2s0 0>;
};
codec {
sound-dai = <&max98090 0>, <&hdmi>;
};
}; };
}; };
@ -34,6 +42,9 @@
interrupt-parent = <&gpx0>; interrupt-parent = <&gpx0>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&max98090_irq>; pinctrl-0 = <&max98090_irq>;
clocks = <&pmu_system_controller 0>;
clock-names = "mclk";
#sound-dai-cells = <1>;
}; };
}; };

View file

@ -28,6 +28,7 @@
aliases { aliases {
display0 = &lcd; display0 = &lcd;
display1 = &tv0;
}; };
gpio-keys { gpio-keys {
@ -70,7 +71,7 @@
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
}; };
spi_lcd { spi_lcd: spi_lcd {
compatible = "spi-gpio"; compatible = "spi-gpio";
#address-cells = <0x1>; #address-cells = <0x1>;
#size-cells = <0x0>; #size-cells = <0x0>;
@ -459,6 +460,12 @@
regulator-max-microvolt = <3150000>; regulator-max-microvolt = <3150000>;
}; };
/* Needed to power the DPI pins */
&vpll2 {
regulator-always-on;
};
&dss { &dss {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = < &dss_dpi_pins >; pinctrl-0 = < &dss_dpi_pins >;
@ -522,22 +529,22 @@
bootloaders@80000 { bootloaders@80000 {
label = "U-Boot"; label = "U-Boot";
reg = <0x80000 0x1e0000>; reg = <0x80000 0x1c0000>;
}; };
bootloaders_env@260000 { bootloaders_env@240000 {
label = "U-Boot Env"; label = "U-Boot Env";
reg = <0x260000 0x20000>; reg = <0x240000 0x40000>;
}; };
kernel@280000 { kernel@280000 {
label = "Kernel"; label = "Kernel";
reg = <0x280000 0x400000>; reg = <0x280000 0x600000>;
}; };
filesystem@680000 { filesystem@880000 {
label = "File System"; label = "File System";
reg = <0x680000 0xf980000>; reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */
}; };
}; };
}; };

View file

@ -63,7 +63,7 @@
clocks = <&clks CLK_PWM1>; clocks = <&clks CLK_PWM1>;
}; };
pwri2c: i2c@40f000180 { pwri2c: i2c@40f00180 {
compatible = "mrvl,pxa-i2c"; compatible = "mrvl,pxa-i2c";
reg = <0x40f00180 0x24>; reg = <0x40f00180 0x24>;
interrupts = <6>; interrupts = <6>;

View file

@ -88,7 +88,7 @@
status = "okay"; status = "okay";
speed-mode = <0>; speed-mode = <0>;
adxl345: adxl345@0 { adxl345: adxl345@53 {
compatible = "adi,adxl345"; compatible = "adi,adxl345";
reg = <0x53>; reg = <0x53>;

View file

@ -186,7 +186,7 @@
<0xa0410100 0x100>; <0xa0410100 0x100>;
}; };
scu@a04100000 { scu@a0410000 {
compatible = "arm,cortex-a9-scu"; compatible = "arm,cortex-a9-scu";
reg = <0xa0410000 0x100>; reg = <0xa0410000 0x100>;
}; };
@ -894,7 +894,7 @@
power-domains = <&pm_domains DOMAIN_VAPE>; power-domains = <&pm_domains DOMAIN_VAPE>;
}; };
ssp@80002000 { spi@80002000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x80002000 0x1000>; reg = <0x80002000 0x1000>;
interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
@ -908,7 +908,7 @@
power-domains = <&pm_domains DOMAIN_VAPE>; power-domains = <&pm_domains DOMAIN_VAPE>;
}; };
ssp@80003000 { spi@80003000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x80003000 0x1000>; reg = <0x80003000 0x1000>;
interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;

View file

@ -607,16 +607,20 @@
mcde { mcde {
lcd_default_mode: lcd_default { lcd_default_mode: lcd_default {
default_mux { default_mux1 {
/* Mux in VSI0 and all the data lines */ /* Mux in VSI0 and all the data lines */
function = "lcd"; function = "lcd";
groups = groups =
"lcdvsi0_a_1", /* VSI0 for LCD */ "lcdvsi0_a_1", /* VSI0 for LCD */
"lcd_d0_d7_a_1", /* Data lines */ "lcd_d0_d7_a_1", /* Data lines */
"lcd_d8_d11_a_1", /* TV-out */ "lcd_d8_d11_a_1", /* TV-out */
"lcdaclk_b_1", /* Clock line for TV-out */
"lcdvsi1_a_1"; /* VSI1 for HDMI */ "lcdvsi1_a_1"; /* VSI1 for HDMI */
}; };
default_mux2 {
function = "lcda";
groups =
"lcdaclk_b_1"; /* Clock line for TV-out */
};
default_cfg1 { default_cfg1 {
pins = pins =
"GPIO68_E1", /* VSI0 */ "GPIO68_E1", /* VSI0 */

View file

@ -57,7 +57,7 @@
}; };
}; };
ssp@80002000 { spi@80002000 {
/* /*
* On the first generation boards, this SSP/SPI port was connected * On the first generation boards, this SSP/SPI port was connected
* to the AB8500. * to the AB8500.

View file

@ -311,7 +311,7 @@
pinctrl-1 = <&i2c3_sleep_mode>; pinctrl-1 = <&i2c3_sleep_mode>;
}; };
ssp@80002000 { spi@80002000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ssp0_snowball_mode>; pinctrl-0 = <&ssp0_snowball_mode>;
}; };

View file

@ -451,7 +451,7 @@
dma-names = "rx"; dma-names = "rx";
}; };
spi: ssp@c0006000 { spi: spi@c0006000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0xc0006000 0x1000>; reg = <0xc0006000 0x1000>;
interrupt-parent = <&vica>; interrupt-parent = <&vica>;

View file

@ -147,14 +147,14 @@
/* Apalis MMC1 */ /* Apalis MMC1 */
sdmmc3_clk_pa6 { sdmmc3_clk_pa6 {
nvidia,pins = "sdmmc3_clk_pa6", nvidia,pins = "sdmmc3_clk_pa6";
"sdmmc3_cmd_pa7";
nvidia,function = "sdmmc3"; nvidia,function = "sdmmc3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>; nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,tristate = <TEGRA_PIN_DISABLE>;
}; };
sdmmc3_dat0_pb7 { sdmmc3_dat0_pb7 {
nvidia,pins = "sdmmc3_dat0_pb7", nvidia,pins = "sdmmc3_cmd_pa7",
"sdmmc3_dat0_pb7",
"sdmmc3_dat1_pb6", "sdmmc3_dat1_pb6",
"sdmmc3_dat2_pb5", "sdmmc3_dat2_pb5",
"sdmmc3_dat3_pb4", "sdmmc3_dat3_pb4",

View file

@ -823,7 +823,7 @@
nvidia,elastic-limit = <16>; nvidia,elastic-limit = <16>;
nvidia,term-range-adj = <6>; nvidia,term-range-adj = <6>;
nvidia,xcvr-setup = <51>; nvidia,xcvr-setup = <51>;
nvidia.xcvr-setup-use-fuses; nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-lsfslew = <1>; nvidia,xcvr-lsfslew = <1>;
nvidia,xcvr-lsrslew = <1>; nvidia,xcvr-lsrslew = <1>;
nvidia,xcvr-hsslew = <32>; nvidia,xcvr-hsslew = <32>;
@ -860,7 +860,7 @@
nvidia,elastic-limit = <16>; nvidia,elastic-limit = <16>;
nvidia,term-range-adj = <6>; nvidia,term-range-adj = <6>;
nvidia,xcvr-setup = <51>; nvidia,xcvr-setup = <51>;
nvidia.xcvr-setup-use-fuses; nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsfslew = <2>;
nvidia,xcvr-lsrslew = <2>; nvidia,xcvr-lsrslew = <2>;
nvidia,xcvr-hsslew = <32>; nvidia,xcvr-hsslew = <32>;
@ -896,7 +896,7 @@
nvidia,elastic-limit = <16>; nvidia,elastic-limit = <16>;
nvidia,term-range-adj = <6>; nvidia,term-range-adj = <6>;
nvidia,xcvr-setup = <51>; nvidia,xcvr-setup = <51>;
nvidia.xcvr-setup-use-fuses; nvidia,xcvr-setup-use-fuses;
nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsfslew = <2>;
nvidia,xcvr-lsrslew = <2>; nvidia,xcvr-lsrslew = <2>;
nvidia,xcvr-hsslew = <32>; nvidia,xcvr-hsslew = <32>;

View file

@ -261,16 +261,15 @@ __sys_trace:
cmp scno, #-1 @ skip the syscall? cmp scno, #-1 @ skip the syscall?
bne 2b bne 2b
add sp, sp, #S_OFF @ restore stack add sp, sp, #S_OFF @ restore stack
b ret_slow_syscall
__sys_trace_return: __sys_trace_return_nosave:
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 enable_irq_notrace
mov r0, sp mov r0, sp
bl syscall_trace_exit bl syscall_trace_exit
b ret_slow_syscall b ret_slow_syscall
__sys_trace_return_nosave: __sys_trace_return:
enable_irq_notrace str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
mov r0, sp mov r0, sp
bl syscall_trace_exit bl syscall_trace_exit
b ret_slow_syscall b ret_slow_syscall

View file

@ -602,6 +602,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata
IMX6Q_GPR1_GINT); 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) void __init imx6_pm_ccm_init(const char *ccm_compat)
{ {
struct device_node *np; 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 = readl_relaxed(ccm_base + CLPCR);
val &= ~BM_CLPCR_LPM; val &= ~BM_CLPCR_LPM;
writel_relaxed(val, ccm_base + CLPCR); 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) void __init imx6q_pm_init(void)

View file

@ -84,7 +84,7 @@
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
spi0: ssp@e1020000 { spi0: spi@e1020000 {
status = "disabled"; status = "disabled";
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
#gpio-cells = <2>; #gpio-cells = <2>;
@ -95,7 +95,7 @@
clock-names = "apb_pclk"; clock-names = "apb_pclk";
}; };
spi1: ssp@e1030000 { spi1: spi@e1030000 {
status = "disabled"; status = "disabled";
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
#gpio-cells = <2>; #gpio-cells = <2>;

View file

@ -57,5 +57,7 @@ ENDPROC(__clear_user)
.section .fixup,"ax" .section .fixup,"ax"
.align 2 .align 2
9: mov x0, x2 // return the original size 9: mov x0, x2 // return the original size
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
ret ret
.previous .previous

View file

@ -80,5 +80,7 @@ ENDPROC(__arch_copy_from_user)
strb wzr, [dst], #1 // zero remaining buffer space strb wzr, [dst], #1 // zero remaining buffer space
cmp dst, end cmp dst, end
b.lo 9999b b.lo 9999b
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
ret ret
.previous .previous

View file

@ -76,5 +76,7 @@ ENDPROC(__copy_in_user)
.section .fixup,"ax" .section .fixup,"ax"
.align 2 .align 2
9998: sub x0, end, dst // bytes not copied 9998: sub x0, end, dst // bytes not copied
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
ret ret
.previous .previous

View file

@ -74,5 +74,7 @@ ENDPROC(__arch_copy_to_user)
.section .fixup,"ax" .section .fixup,"ax"
.align 2 .align 2
9998: sub x0, end, dst // bytes not copied 9998: sub x0, end, dst // bytes not copied
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
ret ret
.previous .previous

View file

@ -4,9 +4,8 @@
#include <bcm47xx_board.h> #include <bcm47xx_board.h>
#include <bcm47xx.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; int err;
err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power"); err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
@ -22,7 +21,10 @@ void __init bcm47xx_workarounds(void)
switch (board) { switch (board) {
case BCM47XX_BOARD_NETGEAR_WNR3500L: 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; break;
default: default:
/* No workaround(s) needed */ /* No workaround(s) needed */

View file

@ -12,11 +12,11 @@
#include <asm/stacktrace.h> #include <asm/stacktrace.h>
/* Maximum physical address we can use pages from */ /* 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 */ /* 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 */ /* 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 */ /* Reserve 3*4096 bytes for board-specific info */
#define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096) #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)

View file

@ -961,12 +961,11 @@ void __init txx9_sramc_init(struct resource *r)
goto exit_put; goto exit_put;
err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr); err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr);
if (err) { if (err) {
device_unregister(&dev->dev);
iounmap(dev->base); iounmap(dev->base);
kfree(dev); device_unregister(&dev->dev);
} }
return; return;
exit_put: exit_put:
iounmap(dev->base);
put_device(&dev->dev); put_device(&dev->dev);
return;
} }

View file

@ -4,6 +4,8 @@
#include <types.h> #include <types.h>
#include <string.h> #include <string.h>
#define INT_MAX ((int)(~0U>>1))
#include "of.h" #include "of.h"
typedef u32 uint32_t; typedef u32 uint32_t;

View file

@ -764,9 +764,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
vaddr = page_address(page) + offset; vaddr = page_address(page) + offset;
uaddr = (unsigned long)vaddr; uaddr = (unsigned long)vaddr;
npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
if (tbl) { if (tbl) {
npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
align = 0; align = 0;
if (tbl->it_page_shift < PAGE_SHIFT && size >= PAGE_SIZE && if (tbl->it_page_shift < PAGE_SHIFT && size >= PAGE_SIZE &&
((unsigned long)vaddr & ~PAGE_MASK) == 0) ((unsigned long)vaddr & ~PAGE_MASK) == 0)

View file

@ -967,6 +967,7 @@ int rtas_ibm_suspend_me(u64 handle)
goto out; goto out;
} }
cpu_hotplug_disable();
stop_topology_update(); stop_topology_update();
/* Call function on all CPUs. One of us will make the /* 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"); printk(KERN_ERR "Error doing global join\n");
start_topology_update(); start_topology_update();
cpu_hotplug_enable();
/* Take down CPUs not online prior to suspend */ /* Take down CPUs not online prior to suspend */
cpuret = rtas_offline_cpus_mask(offline_mask); cpuret = rtas_offline_cpus_mask(offline_mask);

View file

@ -37,6 +37,7 @@ data_page_branch:
mtlr r0 mtlr r0
addi r3, r3, __kernel_datapage_offset-data_page_branch addi r3, r3, __kernel_datapage_offset-data_page_branch
lwz r0,0(r3) lwz r0,0(r3)
.cfi_restore lr
add r3,r0,r3 add r3,r0,r3
blr blr
.cfi_endproc .cfi_endproc

View file

@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
*/ */
99: 99:
li r0,__NR_clock_gettime li r0,__NR_clock_gettime
.cfi_restore lr
sc sc
blr blr
.cfi_endproc .cfi_endproc

View file

@ -37,6 +37,7 @@ data_page_branch:
mtlr r0 mtlr r0
addi r3, r3, __kernel_datapage_offset-data_page_branch addi r3, r3, __kernel_datapage_offset-data_page_branch
lwz r0,0(r3) lwz r0,0(r3)
.cfi_restore lr
add r3,r0,r3 add r3,r0,r3
blr blr
.cfi_endproc .cfi_endproc

View file

@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
*/ */
99: 99:
li r0,__NR_clock_gettime li r0,__NR_clock_gettime
.cfi_restore lr
sc sc
blr blr
.cfi_endproc .cfi_endproc

View file

@ -70,8 +70,11 @@ void kvmppc_unfixup_split_real(struct kvm_vcpu *vcpu)
{ {
if (vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) { if (vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) {
ulong pc = kvmppc_get_pc(vcpu); ulong pc = kvmppc_get_pc(vcpu);
ulong lr = kvmppc_get_lr(vcpu);
if ((pc & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS) if ((pc & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS)
kvmppc_set_pc(vcpu, pc & ~SPLIT_HACK_MASK); 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; vcpu->arch.hflags &= ~BOOK3S_HFLAG_SPLIT_HACK;
} }
} }

View file

@ -322,7 +322,7 @@ void slb_initialize(void)
#endif #endif
} }
get_paca()->stab_rr = SLB_NUM_BOLTED; get_paca()->stab_rr = SLB_NUM_BOLTED - 1;
lflags = SLB_VSID_KERNEL | linear_llp; lflags = SLB_VSID_KERNEL | linear_llp;
vflags = SLB_VSID_KERNEL | vmalloc_llp; vflags = SLB_VSID_KERNEL | vmalloc_llp;

View file

@ -150,7 +150,7 @@ static int dtl_start(struct dtl *dtl)
/* Register our dtl buffer with the hypervisor. The HV expects the /* Register our dtl buffer with the hypervisor. The HV expects the
* buffer size to be passed in the second word of the buffer */ * 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); hwcpu = get_hard_smp_processor_id(dtl->cpu);
addr = __pa(dtl->buf); addr = __pa(dtl->buf);
@ -185,7 +185,7 @@ static void dtl_stop(struct dtl *dtl)
static u64 dtl_current_index(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 */ #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */

View file

@ -2549,8 +2549,7 @@ config OLPC
config OLPC_XO1_PM config OLPC_XO1_PM
bool "OLPC XO-1 Power Management" bool "OLPC XO-1 Power Management"
depends on OLPC && MFD_CS5535 && PM_SLEEP depends on OLPC && MFD_CS5535=y && PM_SLEEP
select MFD_CORE
---help--- ---help---
Add support for poweroff and suspend of the OLPC XO-1 laptop. Add support for poweroff and suspend of the OLPC XO-1 laptop.

View file

@ -49,7 +49,7 @@ static __always_inline void atomic_add(int i, atomic_t *v)
{ {
asm volatile(LOCK_PREFIX "addl %1,%0" asm volatile(LOCK_PREFIX "addl %1,%0"
: "+m" (v->counter) : "+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" asm volatile(LOCK_PREFIX "subl %1,%0"
: "+m" (v->counter) : "+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) static __always_inline void atomic_inc(atomic_t *v)
{ {
asm volatile(LOCK_PREFIX "incl %0" 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) static __always_inline void atomic_dec(atomic_t *v)
{ {
asm volatile(LOCK_PREFIX "decl %0" asm volatile(LOCK_PREFIX "decl %0"
: "+m" (v->counter)); : "+m" (v->counter) :: "memory");
} }
/** /**

View file

@ -44,7 +44,7 @@ static __always_inline void atomic64_add(long i, atomic64_t *v)
{ {
asm volatile(LOCK_PREFIX "addq %1,%0" asm volatile(LOCK_PREFIX "addq %1,%0"
: "=m" (v->counter) : "=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" asm volatile(LOCK_PREFIX "subq %1,%0"
: "=m" (v->counter) : "=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" asm volatile(LOCK_PREFIX "incq %0"
: "=m" (v->counter) : "=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" asm volatile(LOCK_PREFIX "decq %0"
: "=m" (v->counter) : "=m" (v->counter)
: "m" (v->counter)); : "m" (v->counter) : "memory");
} }
/** /**

View file

@ -116,7 +116,7 @@ do { \
#endif #endif
/* Atomic operations are already serializing on x86 */ /* Atomic operations are already serializing on x86 */
#define smp_mb__before_atomic() barrier() #define smp_mb__before_atomic() do { } while (0)
#define smp_mb__after_atomic() barrier() #define smp_mb__after_atomic() do { } while (0)
#endif /* _ASM_X86_BARRIER_H */ #endif /* _ASM_X86_BARRIER_H */

View file

@ -198,4 +198,22 @@ static inline int insn_offset_immediate(struct insn *insn)
return insn_offset_displacement(insn) + insn->displacement.nbytes; 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 */ #endif /* _ASM_X86_INSN_H */

View file

@ -66,7 +66,7 @@ struct kimage;
/* Memory to backup during crash kdump */ /* Memory to backup during crash kdump */
#define KEXEC_BACKUP_SRC_START (0UL) #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 * CPU does not save ss and sp on stack if execution is already

View file

@ -433,7 +433,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)
/* enable MAPEN */ /* enable MAPEN */
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);
/* enable cpuid */ /* enable cpuid */
setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80);
/* disable MAPEN */ /* disable MAPEN */
setCx86(CX86_CCR3, ccr3); setCx86(CX86_CCR3, ccr3);
local_irq_restore(flags); local_irq_restore(flags);

View file

@ -373,6 +373,10 @@ int __copy_instruction(u8 *dest, u8 *src)
return 0; return 0;
memcpy(dest, insn.kaddr, length); 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 #ifdef CONFIG_X86_64
if (insn_rip_relative(&insn)) { if (insn_rip_relative(&insn)) {
s64 newdisp; s64 newdisp;

View file

@ -296,6 +296,10 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool
if (is_prefix_bad(insn)) if (is_prefix_bad(insn))
return -ENOTSUPP; return -ENOTSUPP;
/* We should not singlestep on the exception masking instructions */
if (insn_masking_exception(insn))
return -ENOTSUPP;
if (x86_64) if (x86_64)
good_insns = good_insns_64; good_insns = good_insns_64;
else 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, " pr_err("uprobe: return address clobbered: pid=%d, %%sp=%#lx, "
"%%ip=%#lx\n", current->pid, regs->sp, regs->ip); "%%ip=%#lx\n", current->pid, regs->sp, regs->ip);
force_sig_info(SIGSEGV, SEND_SIG_FORCED, current); force_sig(SIGSEGV, current);
} }
return -1; return -1;

View file

@ -1186,6 +1186,7 @@ void acpi_os_wait_events_complete(void)
flush_workqueue(kacpid_wq); flush_workqueue(kacpid_wq);
flush_workqueue(kacpi_notify_wq); flush_workqueue(kacpi_notify_wq);
} }
EXPORT_SYMBOL(acpi_os_wait_events_complete);
struct acpi_hp_work { struct acpi_hp_work {
struct work_struct work; struct work_struct work;

View file

@ -454,8 +454,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
decode_osc_support(root, "OS supports", support); decode_osc_support(root, "OS supports", support);
status = acpi_pci_osc_support(root, support); status = acpi_pci_osc_support(root, support);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n", dev_info(&device->dev, "_OSC failed (%s)%s\n",
acpi_format_exception(status)); acpi_format_exception(status),
pcie_aspm_support_enabled() ? "; disabling ASPM" : "");
*no_aspm = 1; *no_aspm = 1;
return; return;
} }

View file

@ -196,6 +196,7 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc)
hc->callback = NULL; hc->callback = NULL;
hc->context = NULL; hc->context = NULL;
mutex_unlock(&hc->lock); mutex_unlock(&hc->lock);
acpi_os_wait_events_complete();
return 0; return 0;
} }
@ -292,6 +293,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device)
hc = acpi_driver_data(device); hc = acpi_driver_data(device);
acpi_ec_remove_query_handler(hc->ec, hc->query_bit); acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
acpi_os_wait_events_complete();
kfree(hc); kfree(hc);
device->driver_data = NULL; device->driver_data = NULL;
return 0; return 0;

View file

@ -1654,6 +1654,21 @@ nothing_to_do:
return 1; 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 * ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one
* @qc: Storage for translated ATA taskfile * @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); scsi_10_lba_len(cdb, &block, &n_block);
if (cdb[1] & (1 << 3)) if (cdb[1] & (1 << 3))
tf_flags |= ATA_TFLAG_FUA; tf_flags |= ATA_TFLAG_FUA;
if (!ata_check_nblocks(scmd, n_block))
goto invalid_fld;
break; break;
case READ_6: case READ_6:
case WRITE_6: case WRITE_6:
@ -1705,6 +1722,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
*/ */
if (!n_block) if (!n_block)
n_block = 256; n_block = 256;
if (!ata_check_nblocks(scmd, n_block))
goto invalid_fld;
break; break;
case READ_16: case READ_16:
case WRITE_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); scsi_16_lba_len(cdb, &block, &n_block);
if (cdb[1] & (1 << 3)) if (cdb[1] & (1 << 3))
tf_flags |= ATA_TFLAG_FUA; tf_flags |= ATA_TFLAG_FUA;
if (!ata_check_nblocks(scmd, n_block))
goto invalid_fld;
break; break;
default: default:
DPRINTK("no-byte command\n"); DPRINTK("no-byte command\n");

View file

@ -659,7 +659,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
* start of new transfer. * start of new transfer.
*/ */
drv_data->dma_rx_data.port = EP93XX_DMA_IDE; 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_data.name = "ep93xx-pata-rx";
drv_data->dma_rx_channel = dma_request_channel(mask, drv_data->dma_rx_channel = dma_request_channel(mask,
ep93xx_pata_dma_filter, &drv_data->dma_rx_data); 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; return;
drv_data->dma_tx_data.port = EP93XX_DMA_IDE; 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_data.name = "ep93xx-pata-tx";
drv_data->dma_tx_channel = dma_request_channel(mask, drv_data->dma_tx_channel = dma_request_channel(mask,
ep93xx_pata_dma_filter, &drv_data->dma_tx_data); 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 */ /* Configure receive channel direction and source address */
memset(&conf, 0, sizeof(conf)); 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 = drv_data->udma_in_phys;
conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
if (dmaengine_slave_config(drv_data->dma_rx_channel, &conf)) { 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 */ /* Configure transmit channel direction and destination address */
memset(&conf, 0, sizeof(conf)); 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 = drv_data->udma_out_phys;
conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) { if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) {

View file

@ -227,7 +227,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
tty_ldisc_flush(tty); tty_ldisc_flush(tty);
tty_driver_flush_buffer(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); hu->proto->flush(hu);
return 0; return 0;
@ -506,7 +506,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
cancel_work_sync(&hu->write_work); 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 (hdev) {
if (test_bit(HCI_UART_REGISTERED, &hu->flags)) if (test_bit(HCI_UART_REGISTERED, &hu->flags))
hci_unregister_dev(hdev); hci_unregister_dev(hdev);
@ -514,6 +514,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
} }
hu->proto->close(hu); hu->proto->close(hu);
} }
clear_bit(HCI_UART_PROTO_SET, &hu->flags);
kfree(hu); kfree(hu);
} }
@ -540,7 +541,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
if (tty != hu->tty) if (tty != hu->tty)
return; return;
if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hci_uart_tx_wakeup(hu); hci_uart_tx_wakeup(hu);
} }
@ -564,7 +565,7 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
if (!hu || tty != hu->tty) if (!hu || tty != hu->tty)
return; return;
if (!test_bit(HCI_UART_PROTO_SET, &hu->flags)) if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
return; return;
/* It does not need a lock here as it is already protected by a mutex in /* It does not need a lock here as it is already protected by a mutex in
@ -659,6 +660,7 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id)
return err; return err;
} }
set_bit(HCI_UART_PROTO_READY, &hu->flags);
return 0; return 0;
} }

View file

@ -94,6 +94,7 @@ struct hci_uart {
/* HCI_UART proto flag bits */ /* HCI_UART proto flag bits */
#define HCI_UART_PROTO_SET 0 #define HCI_UART_PROTO_SET 0
#define HCI_UART_REGISTERED 1 #define HCI_UART_REGISTERED 1
#define HCI_UART_PROTO_READY 2
/* TX states */ /* TX states */
#define HCI_UART_SENDING 1 #define HCI_UART_SENDING 1

View file

@ -28,9 +28,24 @@
#define DCP_MAX_CHANS 4 #define DCP_MAX_CHANS 4
#define DCP_BUF_SZ PAGE_SIZE #define DCP_BUF_SZ PAGE_SIZE
#define DCP_SHA_PAY_SZ 64
#define DCP_ALIGNMENT 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. */ /* DCP DMA descriptor. */
struct dcp_dma_desc { struct dcp_dma_desc {
uint32_t next_cmd_addr; uint32_t next_cmd_addr;
@ -48,6 +63,7 @@ struct dcp_coherent_block {
uint8_t aes_in_buf[DCP_BUF_SZ]; uint8_t aes_in_buf[DCP_BUF_SZ];
uint8_t aes_out_buf[DCP_BUF_SZ]; uint8_t aes_out_buf[DCP_BUF_SZ];
uint8_t sha_in_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]; 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, dma_addr_t dst_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_out_buf,
DCP_BUF_SZ, DMA_FROM_DEVICE); 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. */ /* Fill in the DMA descriptor. */
desc->control0 = MXS_DCP_CONTROL0_DECR_SEMAPHORE | desc->control0 = MXS_DCP_CONTROL0_DECR_SEMAPHORE |
MXS_DCP_CONTROL0_INTERRUPT | 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); ret = mxs_dcp_start_dma(actx);
aes_done_run:
dma_unmap_single(sdcp->dev, key_phys, 2 * AES_KEYSIZE_128, dma_unmap_single(sdcp->dev, key_phys, 2 * AES_KEYSIZE_128,
DMA_TO_DEVICE); DMA_TO_DEVICE);
dma_unmap_single(sdcp->dev, src_phys, DCP_BUF_SZ, 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; uint8_t *out_tmp, *src_buf, *dst_buf = NULL;
uint32_t dst_off = 0; uint32_t dst_off = 0;
uint32_t last_out_len = 0;
uint8_t *key = sdcp->coh->aes_key; uint8_t *key = sdcp->coh->aes_key;
int ret = 0; int ret = 0;
int split = 0; int split = 0;
unsigned int i, len, clen, rem = 0; unsigned int i, len, clen, rem = 0, tlen = 0;
int init = 0; int init = 0;
bool limit_hit = false;
actx->fill = 0; 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) { for_each_sg(req->src, src, nents, i) {
src_buf = sg_virt(src); src_buf = sg_virt(src);
len = sg_dma_len(src); len = sg_dma_len(src);
tlen += len;
limit_hit = tlen > req->nbytes;
if (limit_hit)
len = req->nbytes - (tlen - len);
do { do {
if (actx->fill + len > out_off) 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, * If we filled the buffer or this is the last SG,
* submit the buffer. * 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); ret = mxs_dcp_run_aes(actx, req, init);
if (ret) if (ret)
return ret; return ret;
init = 0; init = 0;
out_tmp = out_buf; out_tmp = out_buf;
last_out_len = actx->fill;
while (dst && actx->fill) { while (dst && actx->fill) {
if (!split) { if (!split) {
dst_buf = sg_virt(dst); dst_buf = sg_virt(dst);
@ -334,6 +366,19 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
} }
} }
} while (len); } 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; 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 crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm);
struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req); 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]; struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
dma_addr_t digest_phys = 0; dma_addr_t digest_phys = 0;
@ -541,10 +584,23 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
desc->payload = 0; desc->payload = 0;
desc->status = 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. */ /* Set HASH_TERM bit for last transfer block. */
if (rctx->fini) { if (rctx->fini) {
digest_phys = dma_map_single(sdcp->dev, req->result, digest_phys = dma_map_single(sdcp->dev, sdcp->coh->sha_out_buf,
halg->digestsize, DMA_FROM_DEVICE); DCP_SHA_PAY_SZ, DMA_FROM_DEVICE);
desc->control0 |= MXS_DCP_CONTROL0_HASH_TERM; desc->control0 |= MXS_DCP_CONTROL0_HASH_TERM;
desc->payload = digest_phys; desc->payload = digest_phys;
} }
@ -552,9 +608,10 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
ret = mxs_dcp_start_dma(actx); ret = mxs_dcp_start_dma(actx);
if (rctx->fini) 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); DMA_FROM_DEVICE);
done_run:
dma_unmap_single(sdcp->dev, buf_phys, DCP_BUF_SZ, DMA_TO_DEVICE); dma_unmap_single(sdcp->dev, buf_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
return ret; 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); const int nents = sg_nents(req->src);
uint8_t *in_buf = sdcp->coh->sha_in_buf; uint8_t *in_buf = sdcp->coh->sha_in_buf;
uint8_t *out_buf = sdcp->coh->sha_out_buf;
uint8_t *src_buf; uint8_t *src_buf;
@ -626,11 +684,9 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
actx->fill = 0; actx->fill = 0;
/* For some reason, the result is flipped. */ /* For some reason the result is flipped */
for (i = 0; i < halg->digestsize / 2; i++) { for (i = 0; i < halg->digestsize; i++)
swap(req->result[i], req->result[i] = out_buf[halg->digestsize - i - 1];
req->result[halg->digestsize - i - 1]);
}
} }
return 0; return 0;

View file

@ -576,7 +576,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
to_jz4780_dma_desc(vdesc), 0); to_jz4780_dma_desc(vdesc), 0);
} else if (cookie == jzchan->desc->vdesc.tx.cookie) { } else if (cookie == jzchan->desc->vdesc.tx.cookie) {
txstate->residue = jz4780_dma_desc_residue(jzchan, jzchan->desc, txstate->residue = jz4780_dma_desc_residue(jzchan, jzchan->desc,
(jzchan->curr_hwdesc + 1) % jzchan->desc->count); jzchan->curr_hwdesc + 1);
} else } else
txstate->residue = 0; txstate->residue = 0;

View file

@ -128,7 +128,7 @@ static void
ioat_init_channel(struct ioatdma_device *ioat_dma, ioat_init_channel(struct ioatdma_device *ioat_dma,
struct ioatdma_chan *ioat_chan, int idx); struct ioatdma_chan *ioat_chan, int idx);
static void ioat_intr_quirk(struct ioatdma_device *ioat_dma); 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 ioat3_dma_self_test(struct ioatdma_device *ioat_dma);
static int ioat_dca_enabled = 1; 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_enumerate_channels - find and initialize the device's channels
* @ioat_dma: the ioat dma device to be enumerated * @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 ioatdma_chan *ioat_chan;
struct device *dev = &ioat_dma->pdev->dev; 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 = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET);
xfercap_log &= 0x1f; /* bits [4:0] valid */ xfercap_log &= 0x1f; /* bits [4:0] valid */
if (xfercap_log == 0) if (xfercap_log == 0)
return 0; return;
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log); dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
for (i = 0; i < dma->chancnt; i++) { for (i = 0; i < dma->chancnt; i++) {
@ -629,7 +629,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
} }
} }
dma->chancnt = i; dma->chancnt = i;
return i;
} }
/** /**

View file

@ -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, 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; return &td_desc->txd;
} }

View file

@ -127,7 +127,7 @@ static int syscon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, int val)
BIT(offs % SYSCON_REG_BITS)); BIT(offs % SYSCON_REG_BITS));
} }
priv->data->set(chip, offset, val); chip->set(chip, offset, val);
return 0; return 0;
} }

View file

@ -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); ctx->pwm = devm_of_pwm_get(&pdev->dev, pdev->dev.of_node, NULL);
if (IS_ERR(ctx->pwm)) { if (IS_ERR(ctx->pwm)) {
dev_err(&pdev->dev, "Could not get PWM\n"); ret = PTR_ERR(ctx->pwm);
return 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); platform_set_drvdata(pdev, ctx);

View file

@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev,
long mask) long mask)
{ {
struct mcp4922_state *state = iio_priv(indio_dev); struct mcp4922_state *state = iio_priv(indio_dev);
int ret;
if (val2 != 0) if (val2 != 0)
return -EINVAL; return -EINVAL;
switch (mask) { switch (mask) {
case IIO_CHAN_INFO_RAW: 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; return -EINVAL;
val <<= chan->scan_type.shift; 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: default:
return -EINVAL; return -EINVAL;
} }

View file

@ -989,7 +989,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
goto err_free_dev; 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"); mthca_err(mdev, "Failed to init command interface, aborting.\n");
goto err_free_dev; goto err_free_dev;
} }

View file

@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_device *ff)
{ {
struct ml_device *ml = ff->private; 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); kfree(ml->private);
} }

View file

@ -203,6 +203,7 @@ static int st1232_ts_probe(struct i2c_client *client,
input_dev->id.bustype = BUS_I2C; input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = &client->dev; input_dev->dev.parent = &client->dev;
__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
__set_bit(EV_SYN, input_dev->evbit); __set_bit(EV_SYN, input_dev->evbit);
__set_bit(EV_KEY, input_dev->evbit); __set_bit(EV_KEY, input_dev->evbit);
__set_bit(EV_ABS, input_dev->evbit); __set_bit(EV_ABS, input_dev->evbit);

View file

@ -902,6 +902,7 @@ static void cached_dev_detach_finish(struct work_struct *w)
bch_write_bdev_super(dc, &cl); bch_write_bdev_super(dc, &cl);
closure_sync(&cl); closure_sync(&cl);
calc_cached_dev_sectors(dc->disk.c);
bcache_device_detach(&dc->disk); bcache_device_detach(&dc->disk);
list_move(&dc->list, &uncached_devices); list_move(&dc->list, &uncached_devices);

View file

@ -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 */ /* 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) { if (yi->blanking_ptr) {
yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE); yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE);
} else { } else {

View file

@ -1469,7 +1469,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)
unsigned long page, pos; unsigned long page, pos;
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
if (size > gbuffers * gbufsize) { if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {
mutex_unlock(&meye.lock); mutex_unlock(&meye.lock);
return -EINVAL; return -EINVAL;
} }

View file

@ -1106,7 +1106,8 @@ fail_nobase_res:
while (i >= 0) { while (i >= 0) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i); 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--; i--;
} }
vpfe_unregister_ccdc_device(&isif_hw_dev); vpfe_unregister_ccdc_device(&isif_hw_dev);

View file

@ -520,7 +520,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,
else if (v_scale == 4) else if (v_scale == 4)
layer_info->v_zoom = ZOOM_X4; layer_info->v_zoom = ZOOM_X4;
if (v_exp) if (v_exp)
layer_info->h_exp = V_EXP_6_OVER_5; layer_info->v_exp = V_EXP_6_OVER_5;
} else { } else {
/* no scaling, only cropping. Set display area to crop area */ /* no scaling, only cropping. Set display area to crop area */
cfg->ysize = expected_ysize; cfg->ysize = expected_ysize;

View file

@ -1346,7 +1346,7 @@ int cx231xx_g_register(struct file *file, void *priv,
ret = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, ret = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
(u16)reg->reg, value, 4); (u16)reg->reg, value, 4);
reg->val = value[0] | value[1] << 8 | reg->val = value[0] | value[1] << 8 |
value[2] << 16 | value[3] << 24; value[2] << 16 | (u32)value[3] << 24;
reg->size = 4; reg->size = 4;
break; break;
case 1: /* AFE - read byte */ case 1: /* AFE - read byte */

View file

@ -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, int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
void __user *user_addr, size_t user_size) void __user *user_addr, size_t user_size)
{ {
int rc; int ret = -ENOMEM;
struct pci_dev *pci_dev = cd->pci_dev; struct pci_dev *pci_dev = cd->pci_dev;
sgl->fpage_offs = offset_in_page((unsigned long)user_addr); 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) { if (get_order(sgl->sgl_size) > MAX_ORDER) {
dev_err(&pci_dev->dev, dev_err(&pci_dev->dev,
"[%s] err: too much memory requested!\n", __func__); "[%s] err: too much memory requested!\n", __func__);
return -ENOMEM; return ret;
} }
sgl->sgl = __genwqe_alloc_consistent(cd, sgl->sgl_size, 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) { if (sgl->sgl == NULL) {
dev_err(&pci_dev->dev, dev_err(&pci_dev->dev,
"[%s] err: no memory available!\n", __func__); "[%s] err: no memory available!\n", __func__);
return -ENOMEM; return ret;
} }
/* Only use buffering on incomplete pages */ /* 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 */ /* Sync with user memory */
if (copy_from_user(sgl->fpage + sgl->fpage_offs, if (copy_from_user(sgl->fpage + sgl->fpage_offs,
user_addr, sgl->fpage_size)) { user_addr, sgl->fpage_size)) {
rc = -EFAULT; ret = -EFAULT;
goto err_out; goto err_out;
} }
} }
@ -351,7 +351,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
/* Sync with user memory */ /* Sync with user memory */
if (copy_from_user(sgl->lpage, user_addr + user_size - if (copy_from_user(sgl->lpage, user_addr + user_size -
sgl->lpage_size, sgl->lpage_size)) { sgl->lpage_size, sgl->lpage_size)) {
rc = -EFAULT; ret = -EFAULT;
goto err_out2; 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 = NULL;
sgl->sgl_dma_addr = 0; sgl->sgl_dma_addr = 0;
sgl->sgl_size = 0; sgl->sgl_size = 0;
return -ENOMEM;
return ret;
} }
int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl, int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,

View file

@ -979,6 +979,12 @@ static void kgdbts_run_tests(void)
int nmi_sleep = 0; int nmi_sleep = 0;
int i; int i;
verbose = 0;
if (strstr(config, "V1"))
verbose = 1;
if (strstr(config, "V2"))
verbose = 2;
ptr = strchr(config, 'F'); ptr = strchr(config, 'F');
if (ptr) if (ptr)
fork_test = simple_strtol(ptr + 1, NULL, 10); fork_test = simple_strtol(ptr + 1, NULL, 10);
@ -1062,13 +1068,6 @@ static int kgdbts_option_setup(char *opt)
return -ENOSPC; return -ENOSPC;
} }
strcpy(config, opt); strcpy(config, opt);
verbose = 0;
if (strstr(config, "V1"))
verbose = 1;
if (strstr(config, "V2"))
verbose = 2;
return 0; return 0;
} }
@ -1080,9 +1079,6 @@ static int configure_kgdbts(void)
if (!strlen(config) || isspace(config[0])) if (!strlen(config) || isspace(config[0]))
goto noconfig; goto noconfig;
err = kgdbts_option_setup(config);
if (err)
goto noconfig;
final_ack = 0; final_ack = 0;
run_plant_and_detach_test(1); run_plant_and_detach_test(1);

View file

@ -145,7 +145,7 @@ static int sdhci_at91_probe(struct platform_device *pdev)
sdhci_get_of_property(pdev); sdhci_get_of_property(pdev);
/* HS200 is broken at this moment */ /* HS200 is broken at this moment */
host->quirks2 = SDHCI_QUIRK2_BROKEN_HS200; host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
ret = sdhci_add_host(host); ret = sdhci_add_host(host);
if (ret) if (ret)

View file

@ -28,7 +28,6 @@
struct of_flash_list { struct of_flash_list {
struct mtd_info *mtd; struct mtd_info *mtd;
struct map_info map; struct map_info map;
struct resource *res;
}; };
struct of_flash { struct of_flash {
@ -53,18 +52,10 @@ static int of_flash_remove(struct platform_device *dev)
mtd_concat_destroy(info->cmtd); 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) if (info->list[i].mtd)
map_destroy(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; return 0;
} }
@ -223,10 +214,11 @@ static int of_flash_probe(struct platform_device *dev)
err = -EBUSY; err = -EBUSY;
res_size = resource_size(&res); res_size = resource_size(&res);
info->list[i].res = request_mem_region(res.start, res_size, info->list[i].map.virt = devm_ioremap_resource(&dev->dev, &res);
dev_name(&dev->dev)); if (IS_ERR(info->list[i].map.virt)) {
if (!info->list[i].res) err = PTR_ERR(info->list[i].map.virt);
goto err_out; goto err_out;
}
err = -ENXIO; err = -ENXIO;
width = of_get_property(dp, "bank-width", NULL); 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.bankwidth = be32_to_cpup(width);
info->list[i].map.device_node = dp; 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); simple_map_init(&info->list[i].map);
/* /*

View file

@ -428,7 +428,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
/* initiate DMA transfer */ /* initiate DMA transfer */
if (flctl->chan_fifo0_rx && rlen >= 32 && 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 */ goto convert; /* DMA success */
/* do polling transfer */ /* do polling transfer */
@ -487,7 +487,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
/* initiate DMA transfer */ /* initiate DMA transfer */
if (flctl->chan_fifo0_tx && rlen >= 32 && 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 */ return; /* DMA success */
/* do polling transfer */ /* do polling transfer */

View file

@ -613,6 +613,7 @@ err_free_chan:
sl->tty = NULL; sl->tty = NULL;
tty->disc_data = NULL; tty->disc_data = NULL;
clear_bit(SLF_INUSE, &sl->flags); clear_bit(SLF_INUSE, &sl->flags);
free_netdev(sl->dev);
err_exit: err_exit:
rtnl_unlock(); rtnl_unlock();

View file

@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)
/* /*
* Transmit a packet * Transmit a packet
*/ */
static int static netdev_tx_t
am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev) am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
{ {
struct dev_priv *priv = netdev_priv(dev); struct dev_priv *priv = netdev_priv(dev);

View file

@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
*init_rec ); *init_rec );
static int lance_open( struct net_device *dev ); static int lance_open( struct net_device *dev );
static void lance_init_ring( 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 irqreturn_t lance_interrupt( int irq, void *dev_id );
static int lance_rx( struct net_device *dev ); static int lance_rx( struct net_device *dev );
static int lance_close( 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 */ /* 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_private *lp = netdev_priv(dev);
struct lance_ioreg *IO = lp->iobase; struct lance_ioreg *IO = lp->iobase;

View file

@ -893,7 +893,7 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(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); struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll; volatile struct lance_regs *ll = lp->ll;

View file

@ -235,7 +235,8 @@ struct lance_private {
static int lance_probe( struct net_device *dev); static int lance_probe( struct net_device *dev);
static int lance_open( struct net_device *dev ); static int lance_open( struct net_device *dev );
static void lance_init_ring( 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 irqreturn_t lance_interrupt( int irq, void *dev_id);
static int lance_rx( struct net_device *dev ); static int lance_rx( struct net_device *dev );
static int lance_close( 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); struct lance_private *lp = netdev_priv(dev);
int entry, len; int entry, len;

View file

@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(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); struct lance_private *lp = netdev_priv(dev);
int entry, skblen, len; int entry, skblen, len;

View file

@ -1390,7 +1390,7 @@ static int xgbe_close(struct net_device *netdev)
return 0; 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_prv_data *pdata = netdev_priv(netdev);
struct xgbe_hw_if *hw_if = &pdata->hw_if; 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_ring *ring;
struct xgbe_packet_data *packet; struct xgbe_packet_data *packet;
struct netdev_queue *txq; struct netdev_queue *txq;
int ret; netdev_tx_t ret;
DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len); DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len);

View file

@ -571,12 +571,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)
/* /*
* tx request callback * 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_priv *priv;
struct bcm_enet_desc *desc; struct bcm_enet_desc *desc;
u32 len_stat; u32 len_stat;
int ret; netdev_tx_t ret;
priv = netdev_priv(dev); priv = netdev_priv(dev);

View file

@ -3532,6 +3532,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
*/ */
static void bnx2x_config_mf_bw(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) { if (bp->link_vars.link_up) {
bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX); bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX);
bnx2x_link_sync_notify(bp); bnx2x_link_sync_notify(bp);

View file

@ -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 void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
static uint64_t sbmac_addr2reg(unsigned char *ptr); static uint64_t sbmac_addr2reg(unsigned char *ptr);
static irqreturn_t sbmac_intr(int irq, void *dev_instance); 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 void sbmac_setmulti(struct sbmac_softc *sc);
static int sbmac_init(struct platform_device *pldev, long long base); static int sbmac_init(struct platform_device *pldev, long long base);
static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed); 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: * Return value:
* nothing * 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); struct sbmac_softc *sc = netdev_priv(dev);
unsigned long flags; unsigned long flags;

View file

@ -266,8 +266,8 @@ void cxgb4_dcb_handle_fw_update(struct adapter *adap,
enum cxgb4_dcb_state_input input = enum cxgb4_dcb_state_input input =
((pcmd->u.dcb.control.all_syncd_pkd & ((pcmd->u.dcb.control.all_syncd_pkd &
FW_PORT_CMD_ALL_SYNCD_F) FW_PORT_CMD_ALL_SYNCD_F)
? CXGB4_DCB_STATE_FW_ALLSYNCED ? CXGB4_DCB_INPUT_FW_ALLSYNCED
: CXGB4_DCB_STATE_FW_INCOMPLETE); : CXGB4_DCB_INPUT_FW_INCOMPLETE);
if (dcb->dcb_version != FW_PORT_DCB_VER_UNKNOWN) { if (dcb->dcb_version != FW_PORT_DCB_VER_UNKNOWN) {
dcb_running_version = FW_PORT_CMD_DCB_VERSION_G( dcb_running_version = FW_PORT_CMD_DCB_VERSION_G(

View file

@ -67,7 +67,7 @@
do { \ do { \
if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \ if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \
cxgb4_dcb_state_fsm((__dev), \ cxgb4_dcb_state_fsm((__dev), \
CXGB4_DCB_STATE_FW_ALLSYNCED); \ CXGB4_DCB_INPUT_FW_ALLSYNCED); \
} while (0) } while (0)
/* States we can be in for a port's Data Center Bridging. /* States we can be in for a port's Data Center Bridging.

View file

@ -3482,7 +3482,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op)
c.param[0].mnem = c.param[0].mnem =
cpu_to_be32(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | cpu_to_be32(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) |
FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_FWCACHE)); 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); return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL);
} }

View file

@ -10828,6 +10828,7 @@ static void i40e_remove(struct pci_dev *pdev)
mutex_destroy(&hw->aq.asq_mutex); mutex_destroy(&hw->aq.asq_mutex);
/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */ /* Clear all dynamic memory lists of rings, q_vectors, and VSIs */
rtnl_lock();
i40e_clear_interrupt_scheme(pf); i40e_clear_interrupt_scheme(pf);
for (i = 0; i < pf->num_alloc_vsi; i++) { for (i = 0; i < pf->num_alloc_vsi; i++) {
if (pf->vsi[i]) { if (pf->vsi[i]) {
@ -10836,6 +10837,7 @@ static void i40e_remove(struct pci_dev *pdev)
pf->vsi[i] = NULL; pf->vsi[i] = NULL;
} }
} }
rtnl_unlock();
for (i = 0; i < I40E_MAX_VEB; i++) { for (i = 0; i < I40E_MAX_VEB; i++) {
kfree(pf->veb[i]); kfree(pf->veb[i]);
@ -10982,7 +10984,13 @@ static void i40e_shutdown(struct pci_dev *pdev)
wr32(hw, I40E_PFPM_WUFC, wr32(hw, I40E_PFPM_WUFC,
(pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0)); (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); i40e_clear_interrupt_scheme(pf);
rtnl_unlock();
if (system_state == SYSTEM_POWER_OFF) { if (system_state == SYSTEM_POWER_OFF) {
pci_wake_from_d3(pdev, pf->wol_en); pci_wake_from_d3(pdev, pf->wol_en);

View file

@ -605,7 +605,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)
if (!IS_ERR_OR_NULL(pf->ptp_clock)) if (!IS_ERR_OR_NULL(pf->ptp_clock))
return 0; 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.owner = THIS_MODULE;
pf->ptp_caps.max_adj = 999999999; pf->ptp_caps.max_adj = 999999999;
pf->ptp_caps.n_ext_ts = 0; pf->ptp_caps.n_ext_ts = 0;

View file

@ -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; ret = I40E_ERR_INVALID_MAC_ADDR;
goto error_param; 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]; vsi = pf->vsi[vf->lan_vsi_idx];

View file

@ -4532,6 +4532,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
struct hlist_node *node2; struct hlist_node *node2;
struct ixgbe_fdir_filter *filter; struct ixgbe_fdir_filter *filter;
u64 action;
spin_lock(&adapter->fdir_perfect_lock); 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, hlist_for_each_entry_safe(filter, node2,
&adapter->fdir_filter_list, fdir_node) { &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, ixgbe_fdir_write_perfect_filter_82599(hw,
&filter->filter, &filter->filter,
filter->sw_idx, filter->sw_idx,
(filter->action == IXGBE_FDIR_DROP_QUEUE) ? (action == IXGBE_FDIR_DROP_QUEUE) ?
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); spin_unlock(&adapter->fdir_perfect_lock);

View file

@ -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 * sk_buff and adds it to the TX ring. It then kicks the TX DMA
* engine to ensure transmission begins. * engine to ensure transmission begins.
*/ */
static int static netdev_tx_t
ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev) ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{ {
struct ks8695_priv *ksp = netdev_priv(ndev); struct ks8695_priv *ksp = netdev_priv(ndev);

View file

@ -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. * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
* So while tx is in-progress, prevent IRQ interrupt from happenning. * 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); struct ks_net *ks = netdev_priv(netdev);
disable_irq(netdev->irq); disable_irq(netdev->irq);

View file

@ -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 * now, or set the card to generates an interrupt when ready
* for the packet. * 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); struct smc911x_local *lp = netdev_priv(dev);
unsigned int free; unsigned int free;

View file

@ -637,7 +637,8 @@ done: if (!THROTTLE_TX_PKTS)
* now, or set the card to generates an interrupt when ready * now, or set the card to generates an interrupt when ready
* for the packet. * 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); struct smc_local *lp = netdev_priv(dev);
void __iomem *ioaddr = lp->base; void __iomem *ioaddr = lp->base;

View file

@ -1677,7 +1677,8 @@ static int smsc911x_stop(struct net_device *dev)
} }
/* Entry point for transmitting a packet */ /* 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); struct smsc911x_data *pdata = netdev_priv(dev);
unsigned int freespace; unsigned int freespace;

View file

@ -845,9 +845,9 @@ static int gelic_card_kick_txdma(struct gelic_card *card,
* @skb: packet to send out * @skb: packet to send out
* @netdev: interface device structure * @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_card *card = netdev_card(netdev);
struct gelic_descr *descr; struct gelic_descr *descr;

View file

@ -370,7 +370,7 @@ void gelic_card_up(struct gelic_card *card);
void gelic_card_down(struct gelic_card *card); void gelic_card_down(struct gelic_card *card);
int gelic_net_open(struct net_device *netdev); int gelic_net_open(struct net_device *netdev);
int gelic_net_stop(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_set_multi(struct net_device *netdev);
void gelic_net_tx_timeout(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); int gelic_net_change_mtu(struct net_device *netdev, int new_mtu);

View file

@ -881,9 +881,9 @@ out:
* @skb: packet to send out * @skb: packet to send out
* @netdev: interface device structure * @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) spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
{ {
int cnt; int cnt;

View file

@ -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. */ /* Index to functions, as function prototypes. */
static int tc35815_open(struct net_device *dev); 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 irqreturn_t tc35815_interrupt(int irq, void *dev_id);
static int tc35815_rx(struct net_device *dev, int limit); static int tc35815_rx(struct net_device *dev, int limit);
static int tc35815_poll(struct napi_struct *napi, int budget); 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() * invariant will hold if you make sure that the netif_*_queue()
* calls are done at the proper times. * 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 tc35815_local *lp = netdev_priv(dev);
struct TxFD *txfd; struct TxFD *txfd;

View file

@ -673,7 +673,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)
return 0; 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 temac_local *lp = netdev_priv(ndev);
struct cdmac_bd *cur_p; struct cdmac_bd *cur_p;

Some files were not shown because too many files have changed in this diff Show more