Merge tag 'v4.19.325-cip131' of https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip into android13-4.19-kona

version 4.19.325-cip131

* tag 'v4.19.325-cip131' of https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip:
  CIP: Bump version suffix to -cip131 after merge from cip/linux-4.19.y-st tree
  Update localversion-st, tree is up-to-date with 5.10.252.
  nfsd: fix return error code for nfsd_map_name_to_[ug]id
  net: usb: pegasus: enable basic endpoint checking
  Bluetooth: L2CAP: Fix not checking l2cap_chan security level
  Bluetooth: Enforce key size of 16 bytes on FIPS level
  xfrm6: fix uninitialized saddr in xfrm6_get_saddr()
  netfilter: nf_conntrack: Add allow_clash to generic protocol handler
  ext4: don't cache extent during splitting extent
  NTB: ntb_transport: Fix too small buffer for debugfs_name
  net: ethernet: ec_bhf: Fix dma_free_coherent() dma handle
  fbdev: ffb: fix corrupted video output on Sun FFB1
  fbdev: of: display_timing: fix refcount leak in of_get_display_timings()
  atm: fore200e: fix use-after-free in tasklets during device removal
  net: wan/fsl_ucc_hdlc: Fix dma_free_coherent() in uhdlc_memclean()
  net: ethernet: marvell: skge: remove incorrect conflicting PCI ID
  ceph: supply snapshot context in ceph_zero_partial_object()
  MIPS: rb532: Fix MMIO UART resource registration
  parisc: kernel: replace kfree() with put_device() in create_tree_node()
  drm/amdkfd: Fix out-of-bounds write in kfd_event_page_set()
  usb: dwc2: fix resume failure if dr_mode is host
  btrfs: continue trimming remaining devices on failure
  kexec: derive purgatory entry from symbol
  ocfs2: fix reflink preserve cleanup issue
  ocfs2: fix xattr array entry __counted_by error
  rapidio: replace rio_free_net() with kfree() in rio_scan_alloc_net()
  iio: gyro: itg3200: Fix unchecked return value in read_raw
  dm mpath: make pg_init_delay_msecs settable
  bus: fsl-mc: fix an error handling in fsl_mc_device_add()
  md/bitmap: fix GPF in write_page caused by resize race
  xfs: fix remote xattr valuelblk check
  xfs: fix freemap adjustments when adding xattrs to leaf blocks
  xfs: delete attr leaf freemap entries when empty
  xfs: mark data structures corrupt on EIO and ENODATA
  mm, page_alloc, thp: prevent reclaim for __GFP_THISNODE THP allocations
  drm: of: drm_of_panel_bridge_remove(): fix device_node leak
  dm-unstripe: fix mapping bug when there are multiple targets in a table
  clk: tegra: tegra124-emc: Fix potential memory leak in tegra124_clk_register_emc()
  dm: clear cloned request bio pointer when last clone bio completes
  media: i2c/tw9906: Fix potential memory leak in tw9906_probe()
  media: i2c/tw9903: Fix potential memory leak in tw9903_probe()
  media: cx25821: Add missing unmap in snd_cx25821_hw_params()
  media: cx23885: Add missing unmap in snd_cx23885_hw_params()
  media: cx88: Add missing unmap in snd_cx88_hw_params()
  media: radio-keene: fix memory leak in error path
  HID: prodikeys: Check presence of pm->input_ep82
  HID: magicmouse: Do not crash on missing msc->input
  HID: hid-pl: handle probe errors
  media: mtk-mdp: Fix a reference leak bug in mtk_mdp_remove()
  dm-verity: correctly handle dm_bufio_client_create() failure
  fpga: dfl: use subsys_initcall to allow built-in drivers to be added
  rpmsg: core: fix race in driver_override_show() and use core helper
  netfilter: nf_conntrack_h323: fix OOB read in decode_choice()
  net: consume xmit errors of GSO frames
  Bluetooth: L2CAP: Fix missing key size check for L2CAP_LE_CONN_REQ
  Bluetooth: l2cap: Check encryption key size on incoming connection
  wifi: cfg80211: wext: fix IGTK key ID off-by-one
  net: usb: lan78xx: scan all MDIO addresses on LAN7801
  lan78xx: Fix memory allocation bug
  lan78xx: Fix race condition in disconnect handling
  lan78xx: Remove unused pause frame queue
  net: usb: kaweth: remove TX queue manipulation in kaweth_set_rx_mode
  ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
  ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
  drm/radeon: Add HAINAN clock adjustment
  drm/amdgpu: Add HAINAN clock adjustment
  ARM: 9467/1: mm: Don't use %pK through printk
  include: uapi: netfilter_bridge.h: Cover for musl libc
  iio: magnetometer: Remove IRQF_ONESHOT
  Revert "mfd: da9052-spi: Change read-mask to write-mask"
  binder: don't use %pK through printk
  serial: 8250_dw: handle clock enable errors in runtime_resume
  m68k: nommu: fix memmove() with differently aligned src and dest for 68000
  clk: microchip: core: correct return value on *_get_parent()
  nfc: nxp-nci: remove interrupt trigger type
  myri10ge: avoid uninitialized variable use
  PCI: Mark Nvidia GB10 to avoid bus reset
  PCI: Fix pci_slot_lock () device locking
  PCI: Mark ASM1164 SATA controller to avoid bus reset
  net/rds: Clear reconnect pending bit
  vmw_vsock: bypass false-positive Wnonnull warning with gcc-16
  net: usb: sr9700: remove code to drive nonexistent multicast filter
  Bluetooth: btusb: Add device ID for Realtek RTL8761BU
  Bluetooth: hci_conn: use mod_delayed_work for active mode timeout
  ipv4: fib: Annotate access to struct fib_alias.fa_state.
  wifi: iwlegacy: add missing mutex protection in il3945_store_measurement()
  wifi: iwlegacy: add missing mutex protection in il4965_store_tx_power()
  net/rds: No shortcut out of RDS_CONN_ERROR
  net: usb: r8152: fix transmit queue timeout
  openrisc: define arch-specific version of nop()
  netfilter: xt_tcpmss: check remaining length before reading optlen
  wifi: libertas: fix WARNING in usb_tx_block
  jfs: nlink overflow in jfs_rename
  jfs: Add missing set_freezable() for freezable kthread
  modpost: Amend ppc64 save/restfpr symnames for -Os build
  ASoC: es8328: Add error unwind in resume
  HID: multitouch: add eGalaxTouch EXC3188 support
  drm/atmel-hlcdc: fix use-after-free of drm_crtc_commit after release
  drm/atmel-hlcdc: fix memory leak from the atomic_destroy_state callback
  virt: vbox: uapi: Mark inner unions in packed structs as packed
  hyper-v: Mark inner union in hv_kvp_exchg_msg_value as packed
  drm: Account property blob allocations to memcg
  media: cx25821: Fix a resource leak in cx25821_dev_setup()
  media: solo6x10: Check for out of bounds chip_id
  media: pvrusb2: fix URB leak in pvr2_send_request_ex
  media: adv7180: fix frame interval in progressive mode
  ASoC: wm8962: Add WM8962_ADC_MONOMIX to "3D Coefficients" mask
  media: omap3isp: set initial format
  media: omap3isp: isppreview: always clamp in preview_try_format()
  media: omap3isp: isp_video_mbus_to_pix/pix_to_mbus fixes
  media: dvb-core: dmxdevfilter must always flush bufs
  parisc: Prevent interrupts during reboot
  arm64: tegra: smaug: Add usb-role-switch support
  pstore: ram_core: fix incorrect success return when vmap() fails
  mailbox: bcm-ferxrm-mailbox: Use default primary handler
  clocksource/drivers/sh_tmu: Always leave device running after probe
  sparc: don't reference obsolete termio struct for TC* constants
  xenbus: Use .freeze/.thaw to handle xenbus devices
  ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP
  EFI/CPER: don't go past the ARM processor CPER record buffer
  x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
  s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS
  tools/power cpupower: Reset errno before strtoull()
  minix: Add required sanity checking to minix_check_superblock()
  hfsplus: pretend special inodes as regular files
  audit: add missing syscalls to read class
  hfsplus: fix volume corruption issue for generic/498
  audit: add fchmodat2() to change attributes class
  rtc: interface: Alarm race handling should not discard preceding error
  SUNRPC: fix gss_auth kref leak in gss_alloc_msg error path
  SUNRPC: auth_gss: fix memory leaks in XDR decoding error paths
  ata: pata_ftide010: Fix some DMA timings
  ext4: fix memory leak in ext4_ext_shift_extents()
  MIPS: Work around LLVM bug when gp is used as global register variable
  apparmor: fix invalid deref of rawdata when export_binary is unset
  apparmor: fix rlimit for posix cpu timers
  apparmor: fix NULL sock in aa_sock_file_perm
  bonding: alb: fix UAF in rlb_arp_recv during bond up/down
  macvlan: observe an RCU grace period in macvlan_common_newlink() error path
  netfilter: nf_conntrack_h323: don't pass uninitialised l3num value
  net/rds: rds_sendmsg should not discard payload_len
  xen-netback: reject zero-queue configuration from guest
  net: usb: catc: enable basic endpoint checking
  usbb: catc: use correct API for MAC addresses
  cpuidle: Skip governor when only one idle state is available
  pinctrl: single: fix refcount leak in pcs_add_gpio_func()
  iio: sca3000: Fix a resource leak in sca3000_probe()
  ovl: Fix uninit-value in ovl_fill_real
  drivers: iio: mpu3050: use dev_err_probe for regulator request
  mfd: arizona: Fix regulator resource leak on wm5102_clear_write_sequencer() failure
  Revert "mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms"
  mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms
  mmc: core: Initial support for SD express card/host
  serial: SH_SCI: improve "DMA support" prompt
  staging: greybus: lights: avoid NULL deref
  fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()
  tracing: Remove duplicate ENABLE_EVENT_STR and DISABLE_EVENT_STR macros
  scsi: csiostor: Fix dereference of null pointer rn
  pNFS: fix a missing wake up while waiting on NFS_LAYOUT_DRAIN
  svcrdma: Remove queue-shortening warnings
  RDMA/core: Fix a couple of obvious typos in comments
  power: supply: wm97xx_battery: Convert to GPIO descriptor
  power: supply: bq27xxx: fix wrong errno when bus ops are unsupported
  power: supply: sbs-battery: Fix use-after-free in power_supply_changed()
  power: supply: rt9455: Fix use-after-free in power_supply_changed()
  power: supply: act8945a: Fix use-after-free in power_supply_changed()
  serial: caif: fix use-after-free in caif_serial ldisc_close()
  net: atm: fix crash due to unvalidated vcc pointer in sigd_send()
  procfs: fix missing RCU protection when reading real_parent in do_task_stat()
  netfilter: nft_set_rbtree: check for partial overlaps in anonymous sets
  netfilter: nft_set_hash: fix get operation on big endian
  bonding: only set speed/duplex to unknown, if getting speed failed
  ucount: check for CAP_SYS_RESOURCE using ns_capable_noaudit()
  tcp: tcp_tx_timestamp() must look at the rtx queue
  fat: avoid parent link count underflow in rmdir
  PCI: Mark 3ware-9650SA Root Port Extended Tags as broken
  netfilter: nf_conncount: fix tracking of connections from localhost
  netfilter: nf_conncount: increase the connection clean up limit to 64
  netfilter: nf_conncount: make nf_conncount_gc_list() to disable BH
  wifi: cfg80211: stop NAN and P2P in cfg80211_leave
  PCI/portdrv: Fix potential resource leak
  PCI: Do not attempt to set ExtTag for VFs
  PCI: mediatek: Fix IRQ domain leak when MSI allocation fails
  Revert "hwmon: (ibmpex) fix use-after-free in high/low store"
  spi: tools: Add include folder to .gitignore
  regulator: Flag uncontrollable regulators as always_on
  regulator: core: Respect off_on_delay at startup
  smack: /smack/doi: accept previously used values
  smack: /smack/doi must be > 0
  arm64: dts: amlogic: gx: assign the MMC signal clocks
  ARM: dts: allwinner: sun5i-a13-utoo-p66: delete "power-gpios" property
  EDAC/i5400: Fix snprintf() limit calculation in calculate_dimm_size()
  EDAC/i5000: Fix snprintf() size calculation in calculate_dimm_size()
  pstore/ram: fix buffer overflow in persistent_ram_save_old()
  sched/rt: Skip currently executing CPU in rto_next_cpu()
  mfd: wm8350-core: Use IRQF_ONESHOT
  EDAC/altera: Remove IRQF_ONESHOT
  hrtimer: Fix trace oddity
  crypto: cavium - fix dma_free_coherent() size
  s390/cio: Fix device lifecycle handling in css_alloc_subchannel()
  PM: sleep: wakeirq: harden dev_pm_clear_wake_irq() against races
  md/raid10: fix any_working flag handling in raid10_sync_request
  tpm: st33zp24: Fix missing cleanup on get_burstcount() error
  tpm: tpm_i2c_infineon: Fix locality leak on get_burstcount() failure
  gfs2: Add metapath_dibh helper
  gfs2: Add wrapper for iomap_file_buffered_write
  fs: add <linux/init_task.h> for 'init_fs'
  hfsplus: return error when node already exists in hfs_bnode_create
  auxdisplay: arm-charlcd: fix release_mem_region() size
  RDMA/umad: Reject negative data_len in ib_umad_write

Change-Id: Ice1efa8b2faaaab14d1d1563e5aa6ae36549682b
This commit is contained in:
Thomas Turner committed 2026-04-22 07:08:43 +01:00
commit b0da80ea68
211 files changed
+1476 -671

No files matched your search

+1
View File
@@ -116,6 +116,7 @@
/* The P66 uses a different EINT then the reference design */
interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
/* The icn8318 binding expects wake-gpios instead of power-gpios */
/delete-property/ power-gpios;
wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
-1
View File
@@ -576,7 +576,6 @@ static struct platform_device power_dev = {
static struct wm97xx_batt_pdata mioa701_battery_data = {
.batt_aux = WM97XX_AUX_ID1,
.temp_aux = -1,
.charge_gpio = -1,
.min_voltage = 0xc00,
.max_voltage = 0xfc0,
.batt_tech = POWER_SUPPLY_TECHNOLOGY_LION,
-1
View File
@@ -220,7 +220,6 @@ void __init palm27x_irda_init(int pwdn)
static struct wm97xx_batt_pdata palm27x_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1,
.batt_mult = 1000,
.batt_div = 414,
.temp_mult = 1,
-1
View File
@@ -266,7 +266,6 @@ static struct platform_device power_supply = {
static struct wm97xx_batt_pdata palmte2_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1,
.max_voltage = PALMTE2_BAT_MAX_VOLTAGE,
.min_voltage = PALMTE2_BAT_MIN_VOLTAGE,
.batt_mult = 1000,
+1 -1
View File
@@ -38,7 +38,7 @@ static inline bool __virt_addr_valid(unsigned long x)
phys_addr_t __virt_to_phys(unsigned long x)
{
WARN(!__virt_addr_valid(x),
"virt_to_phys used for non-linear address: %pK (%pS)\n",
"virt_to_phys used for non-linear address: %px (%pS)\n",
(void *)x, (void *)x);
return __virt_to_phys_nodebug(x);
@@ -716,6 +716,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_A>;
assigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>;
assigned-clock-rates = <24000000>;
};
&sd_emmc_b {
@@ -724,6 +727,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_B>;
assigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>;
assigned-clock-rates = <24000000>;
};
&sd_emmc_c {
@@ -732,6 +738,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_C>;
assigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>;
assigned-clock-rates = <24000000>;
};
&spicc {
@@ -722,6 +722,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_A>;
assigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>;
assigned-clock-rates = <24000000>;
};
&sd_emmc_b {
@@ -730,6 +733,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_B>;
assigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>;
assigned-clock-rates = <24000000>;
};
&sd_emmc_c {
@@ -738,6 +744,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_C>;
assigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>;
assigned-clock-rates = <24000000>;
};
&spicc {
@@ -1664,6 +1664,8 @@
status = "okay";
vbus-supply = <&usbc_vbus>;
mode = "otg";
usb-role-switch;
role-switch-default-mode = "host";
};
usb3-0 {
+18
View File
@@ -24,6 +24,15 @@ void *memmove(void *dest, const void *src, size_t n)
src = csrc;
n--;
}
#if defined(CONFIG_M68000)
if ((long)src & 1) {
char *cdest = dest;
const char *csrc = src;
for (; n; n--)
*cdest++ = *csrc++;
return xdest;
}
#endif
if (n > 2 && (long)dest & 2) {
short *sdest = dest;
const short *ssrc = src;
@@ -66,6 +75,15 @@ void *memmove(void *dest, const void *src, size_t n)
src = csrc;
n--;
}
#if defined(CONFIG_M68000)
if ((long)src & 1) {
char *cdest = dest;
const char *csrc = src;
for (; n; n--)
*--cdest = *--csrc;
return xdest;
}
#endif
if (n > 2 && (long)dest & 2) {
short *sdest = dest;
const short *ssrc = src;
+13
View File
@@ -399,7 +399,20 @@ void *__init relocate_kernel(void)
goto out;
/* The current thread is now within the relocated image */
#ifndef CONFIG_CC_IS_CLANG
__current_thread_info = RELOCATED(&init_thread_union);
#else
/*
* LLVM may wrongly restore $gp ($28) in epilog even if it's
* intentionally modified. Work around this by using inline
* assembly to assign $gp. $gp couldn't be listed as output or
* clobber, or LLVM will still restore its original value.
* See also LLVM upstream issue
* https://github.com/llvm/llvm-project/issues/176546
*/
asm volatile("move $28, %0" : :
"r" (RELOCATED(&init_thread_union)));
#endif
/* Return the new kernel's entry point */
kernel_entry = RELOCATED(start_kernel);
+3 -2
View File
@@ -225,11 +225,12 @@ static struct platform_device rb532_wdt = {
static struct plat_serial8250_port rb532_uart_res[] = {
{
.type = PORT_16550A,
.membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),
.mapbase = REGBASE + UART0BASE,
.mapsize = 0x1000,
.irq = UART0_IRQ,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
},
{
.flags = 0,
+2
View File
@@ -4,6 +4,8 @@
#define mb() asm volatile ("l.msync" ::: "memory")
#define nop() asm volatile ("l.nop")
#include <asm-generic/barrier.h>
#endif /* __ASM_BARRIER_H */
+1 -1
View File
@@ -413,7 +413,7 @@ struct parisc_device * __init create_tree_node(char id, struct device *parent)
dev->dev.dma_mask = &dev->dma_mask;
dev->dev.coherent_dma_mask = dev->dma_mask;
if (device_register(&dev->dev)) {
kfree(dev);
put_device(&dev->dev);
return NULL;
}
+3
View File
@@ -100,6 +100,9 @@ void machine_restart(char *cmd)
#endif
/* set up a new led state on systems shipped with a LED State panel */
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
/* prevent interrupts during reboot */
set_eiem(0);
/* "Normal" system reset */
pdc_do_reset();
+1
View File
@@ -25,6 +25,7 @@ KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_CFLAGS += $(call cc-option, -Wno-default-const-init-unsafe)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
+4 -4
View File
@@ -5,10 +5,10 @@
#include <asm/ioctl.h>
/* Big T */
#define TCGETA _IOR('T', 1, struct termio)
#define TCSETA _IOW('T', 2, struct termio)
#define TCSETAW _IOW('T', 3, struct termio)
#define TCSETAF _IOW('T', 4, struct termio)
#define TCGETA 0x40125401 /* _IOR('T', 1, struct termio) */
#define TCSETA 0x80125402 /* _IOW('T', 2, struct termio) */
#define TCSETAW 0x80125403 /* _IOW('T', 3, struct termio) */
#define TCSETAF 0x80125404 /* _IOW('T', 4, struct termio) */
#define TCSBRK _IO('T', 5)
#define TCXONC _IO('T', 6)
#define TCFLSH _IO('T', 7)
+2
View File
@@ -82,10 +82,12 @@ ENTRY(pvh_start_xen)
mov $_pa(early_stack_end), %esp
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
/* Enable PAE mode. */
mov %cr4, %eax
orl $X86_CR4_PAE, %eax
mov %eax, %cr4
#endif
#ifdef CONFIG_X86_64
/* Enable Long mode. */
+17 -27
View File
@@ -10,6 +10,7 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "acinterp.h"
#include <acpi/acoutput.h>
#include "acparser.h"
#include "amlcode.h"
@@ -51,8 +52,7 @@ ACPI_MODULE_NAME("exoparg3")
acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
{
union acpi_operand_object **operand = &walk_state->operands[0];
struct acpi_signal_fatal_info *fatal;
acpi_status status = AE_OK;
struct acpi_signal_fatal_info fatal;
ACPI_FUNCTION_TRACE_STR(ex_opcode_3A_0T_0R,
acpi_ps_get_opcode_name(walk_state->opcode));
@@ -60,28 +60,23 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
switch (walk_state->opcode) {
case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"FatalOp: Type %X Code %X Arg %X "
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
(u32)operand[0]->integer.value,
(u32)operand[1]->integer.value,
(u32)operand[2]->integer.value));
fatal.type = (u32)operand[0]->integer.value;
fatal.code = (u32)operand[1]->integer.value;
fatal.argument = (u32)operand[2]->integer.value;
fatal = ACPI_ALLOCATE(sizeof(struct acpi_signal_fatal_info));
if (fatal) {
fatal->type = (u32) operand[0]->integer.value;
fatal->code = (u32) operand[1]->integer.value;
fatal->argument = (u32) operand[2]->integer.value;
}
ACPI_BIOS_ERROR((AE_INFO,
"Fatal ACPI BIOS error (Type 0x%X Code 0x%X Arg 0x%X)\n",
fatal.type, fatal.code, fatal.argument));
/* Always signal the OS! */
status = acpi_os_signal(ACPI_SIGNAL_FATAL, fatal);
acpi_os_signal(ACPI_SIGNAL_FATAL, &fatal);
/* Might return while OS is shutting down, just continue */
ACPI_FREE(fatal);
goto cleanup;
/*
* Might return while OS is shutting down, so abort the AML execution
* by returning an error.
*/
return_ACPI_STATUS(AE_ERROR);
case AML_EXTERNAL_OP:
/*
@@ -93,21 +88,16 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
* wrong if an external opcode ever gets here.
*/
ACPI_ERROR((AE_INFO, "Executed External Op"));
status = AE_OK;
goto cleanup;
return_ACPI_STATUS(AE_OK);
default:
ACPI_ERROR((AE_INFO, "Unknown AML opcode 0x%X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}
cleanup:
return_ACPI_STATUS(status);
}
/*******************************************************************************
+1 -1
View File
@@ -4207,7 +4207,7 @@ static int binder_thread_write(struct binder_proc *proc,
}
}
binder_debug(BINDER_DEBUG_DEAD_BINDER,
"%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n",
"%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n",
proc->pid, thread->pid, (u64)cookie,
death);
if (death == NULL) {
+3 -3
View File
@@ -87,7 +87,7 @@ static void binder_insert_free_buffer(struct binder_alloc *alloc,
new_buffer_size = binder_alloc_buffer_size(alloc, new_buffer);
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
"%d: add free buffer, size %zd, at %pK\n",
"%d: add free buffer, size %zd, at %p\n",
alloc->pid, new_buffer_size, new_buffer);
while (*p) {
@@ -498,7 +498,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
}
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
"%d: binder_alloc_buf size %zd got buffer %pK size %zd\n",
"%d: binder_alloc_buf size %zd got buffer %p size %zd\n",
alloc->pid, size, buffer, buffer_size);
has_page_addr = (void __user *)
@@ -669,7 +669,7 @@ static void binder_free_buf_locked(struct binder_alloc *alloc,
ALIGN(buffer->extra_buffers_size, sizeof(void *));
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
"%d: binder_free_buf %pK size %zd buffer_size %zd\n",
"%d: binder_free_buf %p size %zd buffer_size %zd\n",
alloc->pid, buffer, size, buffer_size);
BUG_ON(buffer->free);
+3 -3
View File
@@ -122,10 +122,10 @@ static const u8 mwdma_50_active_time[3] = {6, 2, 2};
static const u8 mwdma_50_recovery_time[3] = {6, 2, 1};
static const u8 mwdma_66_active_time[3] = {8, 3, 3};
static const u8 mwdma_66_recovery_time[3] = {8, 2, 1};
static const u8 udma_50_setup_time[6] = {3, 3, 2, 2, 1, 1};
static const u8 udma_50_setup_time[6] = {3, 3, 2, 2, 1, 9};
static const u8 udma_50_hold_time[6] = {3, 1, 1, 1, 1, 1};
static const u8 udma_66_setup_time[7] = {4, 4, 3, 2, };
static const u8 udma_66_hold_time[7] = {};
static const u8 udma_66_setup_time[7] = {4, 4, 3, 2, 1, 9, 9};
static const u8 udma_66_hold_time[7] = {4, 2, 1, 1, 1, 1, 1};
/*
* We set 66 MHz for all MWDMA modes
+4
View File
@@ -361,6 +361,10 @@ fore200e_shutdown(struct fore200e* fore200e)
/* fall through */
case FORE200E_STATE_IRQ:
free_irq(fore200e->irq, fore200e->atm_dev);
#ifdef FORE200E_USE_TASKLET
tasklet_kill(&fore200e->tx_tasklet);
tasklet_kill(&fore200e->rx_tasklet);
#endif
/* fall through */
case FORE200E_STATE_ALLOC_BUF:
+1 -1
View File
@@ -323,7 +323,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
out_no_irq:
iounmap(lcd->virtbase);
out_no_memregion:
release_mem_region(lcd->phybase, SZ_4K);
release_mem_region(lcd->phybase, lcd->physize);
out_no_resource:
kfree(lcd);
return ret;
+7 -4
View File
@@ -97,13 +97,16 @@ EXPORT_SYMBOL_GPL(dev_pm_set_wake_irq);
*/
void dev_pm_clear_wake_irq(struct device *dev)
{
struct wake_irq *wirq = dev->power.wakeirq;
struct wake_irq *wirq;
unsigned long flags;
if (!wirq)
return;
spin_lock_irqsave(&dev->power.lock, flags);
wirq = dev->power.wakeirq;
if (!wirq) {
spin_unlock_irqrestore(&dev->power.lock, flags);
return;
}
device_wakeup_detach_irq(dev);
dev->power.wakeirq = NULL;
spin_unlock_irqrestore(&dev->power.lock, flags);
+1
View File
@@ -375,6 +375,7 @@ static const struct usb_device_id blacklist_table[] = {
/* Additional Realtek 8723BU Bluetooth devices */
{ USB_DEVICE(0x7392, 0xa611), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x2c0a, 0x8761), .driver_info = BTUSB_REALTEK },
/* Additional Realtek 8723DE Bluetooth devices */
{ USB_DEVICE(0x0bda, 0xb009), .driver_info = BTUSB_REALTEK },
+1 -5
View File
@@ -654,11 +654,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
return 0;
error_cleanup_dev:
kfree(mc_dev->regions);
if (mc_bus)
kfree(mc_bus);
else
kfree(mc_dev);
put_device(&mc_dev->dev);
return error;
}
+4 -2
View File
@@ -393,8 +393,10 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf,
for (i = 0; i < len - 1;) {
burstcnt = get_burstcount(chip);
if (burstcnt < 0)
return burstcnt;
if (burstcnt < 0) {
ret = burstcnt;
goto out_err;
}
size = min_t(int, len - i - 1, burstcnt);
ret = tpm_dev->ops->send(tpm_dev->phy_id, TPM_DATA_FIFO,
buf + i, size);
+4 -2
View File
@@ -549,8 +549,10 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t len)
burstcnt = get_burstcount(chip);
/* burstcnt < 0 = TPM is busy */
if (burstcnt < 0)
return burstcnt;
if (burstcnt < 0) {
rc = burstcnt;
goto out_err;
}
if (burstcnt > (len - 1 - count))
burstcnt = len - 1 - count;
+12 -13
View File
@@ -286,14 +286,13 @@ static u8 roclk_get_parent(struct clk_hw *hw)
v = (readl(refo->ctrl_reg) >> REFO_SEL_SHIFT) & REFO_SEL_MASK;
if (!refo->parent_map)
return v;
if (refo->parent_map) {
for (i = 0; i < clk_hw_get_num_parents(hw); i++)
if (refo->parent_map[i] == v)
return i;
}
for (i = 0; i < clk_hw_get_num_parents(hw); i++)
if (refo->parent_map[i] == v)
return i;
return -EINVAL;
return v;
}
static unsigned long roclk_calc_rate(unsigned long parent_rate,
@@ -828,13 +827,13 @@ static u8 sclk_get_parent(struct clk_hw *hw)
v = (readl(sclk->mux_reg) >> OSC_CUR_SHIFT) & OSC_CUR_MASK;
if (!sclk->parent_map)
return v;
if (sclk->parent_map) {
for (i = 0; i < clk_hw_get_num_parents(hw); i++)
if (sclk->parent_map[i] == v)
return i;
}
for (i = 0; i < clk_hw_get_num_parents(hw); i++)
if (sclk->parent_map[i] == v)
return i;
return -EINVAL;
return v;
}
static int sclk_set_parent(struct clk_hw *hw, u8 index)
+3 -1
View File
@@ -523,8 +523,10 @@ struct clk *tegra_clk_register_emc(void __iomem *base, struct device_node *np,
tegra->hw.init = &init;
clk = clk_register(NULL, &tegra->hw);
if (IS_ERR(clk))
if (IS_ERR(clk)) {
kfree(tegra);
return clk;
}
tegra->prev_parent = clk_hw_get_parent_by_index(
&tegra->hw, emc_get_parent(&tegra->hw))->clk;
-18
View File
@@ -139,16 +139,6 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
static int __sh_tmu_enable(struct sh_tmu_channel *ch)
{
int ret;
/* enable clock */
ret = clk_enable(ch->tmu->clk);
if (ret) {
dev_err(&ch->tmu->pdev->dev, "ch%u: cannot enable clock\n",
ch->index);
return ret;
}
/* make sure channel is disabled */
sh_tmu_start_stop_ch(ch, 0);
@@ -170,7 +160,6 @@ static int sh_tmu_enable(struct sh_tmu_channel *ch)
if (ch->enable_count++ > 0)
return 0;
pm_runtime_get_sync(&ch->tmu->pdev->dev);
dev_pm_syscore_device(&ch->tmu->pdev->dev, true);
return __sh_tmu_enable(ch);
@@ -183,9 +172,6 @@ static void __sh_tmu_disable(struct sh_tmu_channel *ch)
/* disable interrupts in TMU block */
sh_tmu_write(ch, TCR, TCR_TPSC_CLK4);
/* stop clock */
clk_disable(ch->tmu->clk);
}
static void sh_tmu_disable(struct sh_tmu_channel *ch)
@@ -199,7 +185,6 @@ static void sh_tmu_disable(struct sh_tmu_channel *ch)
__sh_tmu_disable(ch);
dev_pm_syscore_device(&ch->tmu->pdev->dev, false);
pm_runtime_put(&ch->tmu->pdev->dev);
}
static void sh_tmu_set_next(struct sh_tmu_channel *ch, unsigned long delta,
@@ -551,7 +536,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
goto err_clk_unprepare;
tmu->rate = clk_get_rate(tmu->clk) / 4;
clk_disable(tmu->clk);
/* Map the memory resource. */
ret = sh_tmu_map_memory(tmu);
@@ -624,8 +608,6 @@ static int sh_tmu_probe(struct platform_device *pdev)
out:
if (tmu->has_clockevent || tmu->has_clocksource)
pm_runtime_irq_safe(&pdev->dev);
else
pm_runtime_idle(&pdev->dev);
return 0;
}
+10
View File
@@ -290,6 +290,16 @@ int __nocfi cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_drive
int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
bool *stop_tick)
{
/*
* If there is only a single idle state (or none), there is nothing
* meaningful for the governor to choose. Skip the governor and
* always use state 0 with the tick running.
*/
if (drv->state_count <= 1) {
*stop_tick = false;
return 0;
}
return cpuidle_curr_governor->select(drv, dev, stop_tick);
}
+2 -1
View File
@@ -186,7 +186,8 @@ static void free_command_queues(struct cpt_vf *cptvf,
hlist_for_each_entry_safe(chunk, node, &cqinfo->queue[i].chead,
nextchunk) {
dma_free_coherent(&pdev->dev, chunk->size,
dma_free_coherent(&pdev->dev,
chunk->size + CPT_NEXT_CHUNK_PTR_SIZE,
chunk->head,
chunk->dma_addr);
chunk->head = NULL;
+4 -7
View File
@@ -1755,8 +1755,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
goto err_release_group_1;
}
rc = devm_request_irq(&altdev->ddev, altdev->sb_irq,
prv->ecc_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
ecc_name, altdev);
if (rc) {
edac_printk(KERN_ERR, EDAC_DEVICE, "PortB SBERR IRQ error\n");
@@ -1770,8 +1769,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
goto err_release_group_1;
}
rc = devm_request_irq(&altdev->ddev, altdev->db_irq,
prv->ecc_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
ecc_name, altdev);
if (rc) {
edac_printk(KERN_ERR, EDAC_DEVICE, "PortB DBERR IRQ error\n");
@@ -2065,8 +2063,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
goto err_release_group1;
}
rc = devm_request_irq(edac->dev, altdev->sb_irq, prv->ecc_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
ecc_name, altdev);
IRQF_TRIGGER_HIGH, ecc_name, altdev);
if (rc) {
edac_printk(KERN_ERR, EDAC_DEVICE, "No SBERR IRQ resource\n");
goto err_release_group1;
@@ -2079,7 +2076,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
goto err_release_group1;
}
rc = devm_request_irq(edac->dev, altdev->db_irq, prv->ecc_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
IRQF_TRIGGER_HIGH,
ecc_name, altdev);
if (rc) {
edac_printk(KERN_ERR, EDAC_DEVICE, "No DBERR IRQ resource\n");
+1
View File
@@ -1111,6 +1111,7 @@ static void calculate_dimm_size(struct i5000_pvt *pvt)
n = snprintf(p, space, " ");
p += n;
space -= n;
for (branch = 0; branch < MAX_BRANCHES; branch++) {
n = snprintf(p, space, " branch %d | ", branch);
p += n;
+1 -1
View File
@@ -1024,13 +1024,13 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
space -= n;
}
space -= n;
edac_dbg(2, "%s\n", mem_buffer);
p = mem_buffer;
space = PAGE_SIZE;
n = snprintf(p, space, " ");
p += n;
space -= n;
for (branch = 0; branch < MAX_BRANCHES; branch++) {
n = snprintf(p, space, " branch %d | ", branch);
p += n;
+8 -4
View File
@@ -248,7 +248,8 @@ static void cper_print_arm_err_info(const char *pfx, u32 type,
}
void cper_print_proc_arm(const char *pfx,
const struct cper_sec_proc_arm *proc)
const struct cper_sec_proc_arm *proc,
u32 length)
{
int i, len, max_ctx_type;
struct cper_arm_err_info *err_info;
@@ -259,9 +260,12 @@ void cper_print_proc_arm(const char *pfx,
len = proc->section_length - (sizeof(*proc) +
proc->err_info_num * (sizeof(*err_info)));
if (len < 0) {
printk("%ssection length: %d\n", pfx, proc->section_length);
printk("%ssection length is too small\n", pfx);
if (len < 0 || proc->section_length > length) {
printk("%ssection length: %d, CPER size: %d\n",
pfx, proc->section_length, length);
printk("%ssection length is too %s\n", pfx,
(len < 0) ? "small" : "big");
printk("%sfirmware-generated error record is incorrect\n", pfx);
printk("%sERR_INFO_NUM is %d\n", pfx, proc->err_info_num);
return;
+2 -1
View File
@@ -550,7 +550,8 @@ cper_estatus_print_section(const char *pfx, struct acpi_hest_generic_data *gdata
printk("%ssection_type: ARM processor error\n", newpfx);
if (gdata->error_data_length >= sizeof(*arm_err))
cper_print_proc_arm(newpfx, arm_err);
cper_print_proc_arm(newpfx, arm_err,
gdata->error_data_length);
else
goto err_section_too_small;
#endif
+1 -1
View File
@@ -1050,7 +1050,7 @@ static void __exit dfl_fpga_exit(void)
dfl_ids_destroy();
}
module_init(dfl_fpga_init);
subsys_initcall(dfl_fpga_init);
module_exit(dfl_fpga_exit);
MODULE_DESCRIPTION("FPGA Device Feature List (DFL) Support");
+5
View File
@@ -3445,6 +3445,11 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev,
max_sclk = 60000;
max_mclk = 80000;
}
if ((adev->pdev->device == 0x666f) &&
(adev->pdev->revision == 0x00)) {
max_sclk = 80000;
max_mclk = 95000;
}
} else if (adev->asic_type == CHIP_OLAND) {
if ((adev->pdev->revision == 0xC7) ||
(adev->pdev->revision == 0x80) ||
+6
View File
@@ -303,6 +303,12 @@ int kfd_event_page_set(struct kfd_process *p, void *kernel_address,
if (p->signal_page)
return -EBUSY;
if (size < KFD_SIGNAL_EVENT_LIMIT * 8) {
pr_err("Event page size %llu is too small, need at least %lu bytes\n",
size, (unsigned long)(KFD_SIGNAL_EVENT_LIMIT * 8));
return -EINVAL;
}
page = kzalloc(sizeof(*page), GFP_KERNEL);
if (!page)
return -ENOMEM;
@@ -965,8 +965,7 @@ atmel_hlcdc_plane_atomic_duplicate_state(struct drm_plane *p)
return NULL;
}
if (copy->base.fb)
drm_framebuffer_get(copy->base.fb);
__drm_atomic_helper_plane_duplicate_state(p, &copy->base);
return &copy->base;
}
@@ -984,8 +983,7 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,
state->dscrs[i]->self);
}
if (s->fb)
drm_framebuffer_put(s->fb);
__drm_atomic_helper_plane_destroy_state(s);
kfree(state);
}
+1 -1
View File
@@ -563,7 +563,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
sizeof(struct drm_property_blob))
return ERR_PTR(-EINVAL);
blob = kvzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
blob = kvzalloc(sizeof(struct drm_property_blob) + length, GFP_KERNEL_ACCOUNT);
if (!blob)
return ERR_PTR(-ENOMEM);
+5
View File
@@ -2990,6 +2990,11 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
max_sclk = 60000;
max_mclk = 80000;
}
if ((rdev->pdev->device == 0x666f) &&
(rdev->pdev->revision == 0x00)) {
max_sclk = 80000;
max_mclk = 95000;
}
} else if (rdev->family == CHIP_OLAND) {
if ((rdev->pdev->revision == 0xC7) ||
(rdev->pdev->revision == 0x80) ||
+1
View File
@@ -393,6 +393,7 @@
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C000 0xc000
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002 0xc002
#define USB_VENDOR_ID_EDIFIER 0x2d99
+5
View File
@@ -485,6 +485,11 @@ static int magicmouse_input_configured(struct hid_device *hdev,
struct magicmouse_sc *msc = hid_get_drvdata(hdev);
int ret;
if (!msc->input) {
hid_err(hdev, "magicmouse setup input failed (no input)");
return -EINVAL;
}
ret = magicmouse_setup_input(msc->input, hdev);
if (ret) {
hid_err(hdev, "magicmouse setup input failed (%d)\n", ret);
+3
View File
@@ -1928,6 +1928,9 @@ static const struct hid_device_id mt_devices[] = {
{ .driver_data = MT_CLS_EGALAX_SERIAL,
MT_USB_DEVICE(USB_VENDOR_ID_DWAV,
USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
{ .driver_data = MT_CLS_EGALAX_SERIAL,
MT_USB_DEVICE(USB_VENDOR_ID_DWAV,
USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C000) },
{ .driver_data = MT_CLS_EGALAX,
MT_USB_DEVICE(USB_VENDOR_ID_DWAV,
USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002) },
+6 -1
View File
@@ -206,9 +206,14 @@ static int pl_probe(struct hid_device *hdev, const struct hid_device_id *id)
goto err;
}
plff_init(hdev);
ret = plff_init(hdev);
if (ret)
goto stop;
return 0;
stop:
hid_hw_stop(hdev);
err:
return ret;
}
+4
View File
@@ -392,6 +392,10 @@ static int pcmidi_handle_report4(struct pcmidi_snd *pm, u8 *data)
bit_mask = (bit_mask << 8) | data[2];
bit_mask = (bit_mask << 8) | data[3];
/* robustness in case input_mapping hook does not get called */
if (!pm->input_ep82)
return 0;
/* break keys */
for (bit_index = 0; bit_index < 24; bit_index++) {
if (!((0x01 << bit_index) & bit_mask)) {
+2 -7
View File
@@ -296,9 +296,6 @@ static ssize_t ibmpex_reset_high_low(struct device *dev,
{
struct ibmpex_bmc_data *data = dev_get_drvdata(dev);
if (!data)
return -ENODEV;
ibmpex_reset_high_low_data(data);
return count;
@@ -532,9 +529,6 @@ static void ibmpex_bmc_delete(struct ibmpex_bmc_data *data)
{
int i, j;
hwmon_device_unregister(data->hwmon_dev);
dev_set_drvdata(data->bmc_device, NULL);
device_remove_file(data->bmc_device,
&sensor_dev_attr_reset_high_low.dev_attr);
device_remove_file(data->bmc_device, &sensor_dev_attr_name.dev_attr);
@@ -548,7 +542,8 @@ static void ibmpex_bmc_delete(struct ibmpex_bmc_data *data)
}
list_del(&data->list);
dev_set_drvdata(data->bmc_device, NULL);
hwmon_device_unregister(data->hwmon_dev);
ipmi_destroy_user(data->user);
kfree(data->sensors);
kfree(data);
+5 -1
View File
@@ -1505,7 +1505,11 @@ static int sca3000_probe(struct spi_device *spi)
if (ret)
goto error_free_irq;
return iio_device_register(indio_dev);
ret = iio_device_register(indio_dev);
if (ret)
goto error_free_irq;
return 0;
error_free_irq:
if (spi->irq)
+2
View File
@@ -96,6 +96,8 @@ static int itg3200_read_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_RAW:
reg = (u8)chan->address;
ret = itg3200_read_reg_s16(indio_dev, reg, val);
if (ret)
return ret;
return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE:
*val = 0;
+2 -4
View File
@@ -1172,10 +1172,8 @@ int mpu3050_common_probe(struct device *dev,
mpu3050->regs[1].supply = mpu3050_reg_vlogic;
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(mpu3050->regs),
mpu3050->regs);
if (ret) {
dev_err(dev, "Cannot get regulators\n");
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "Cannot get regulators\n");
ret = mpu3050_power_up(mpu3050);
if (ret)
+1 -1
View File
@@ -521,7 +521,7 @@ static int ak8975_setup_irq(struct ak8975_data *data)
irq = gpio_to_irq(data->eoc_gpio);
rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler,
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
IRQF_TRIGGER_RISING,
dev_name(&client->dev), data);
if (rc < 0) {
dev_err(&client->dev,
+1 -1
View File
@@ -678,7 +678,7 @@ void rdma_rw_init_qp(struct ib_device *dev, struct ib_qp_init_attr *attr)
factor = 1;
/*
* If the devices needs MRs to perform RDMA READ or WRITE operations,
* If the device needs MRs to perform RDMA READ or WRITE operations,
* we'll need two additional MRs for the registrations and the
* invalidation.
*/
+6 -2
View File
@@ -496,7 +496,8 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
struct ib_ah *ah;
struct ib_rmpp_mad *rmpp_mad;
__be64 *tid;
int ret, data_len, hdr_len, copy_offset, rmpp_active;
int ret, hdr_len, copy_offset, rmpp_active;
size_t data_len;
u8 base_version;
if (count < hdr_size(file) + IB_MGMT_RMPP_HDR)
@@ -567,7 +568,10 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
}
base_version = ((struct ib_mad_hdr *)&packet->mad.data)->base_version;
data_len = count - hdr_size(file) - hdr_len;
if (check_sub_overflow(count, hdr_size(file) + hdr_len, &data_len)) {
ret = -EINVAL;
goto err_ah;
}
packet->msg = ib_create_send_mad(agent,
be32_to_cpu(packet->mad.hdr.qpn),
packet->mad.hdr.pkey_index, rmpp_active,
+2 -12
View File
@@ -1187,14 +1187,6 @@ static int flexrm_debugfs_stats_show(struct seq_file *file, void *offset)
/* ====== FlexRM interrupt handler ===== */
static irqreturn_t flexrm_irq_event(int irq, void *dev_id)
{
/* We only have MSI for completions so just wakeup IRQ thread */
/* Ring related errors will be informed via completion descriptors */
return IRQ_WAKE_THREAD;
}
static irqreturn_t flexrm_irq_thread(int irq, void *dev_id)
{
flexrm_process_completions(dev_id);
@@ -1285,10 +1277,8 @@ static int flexrm_startup(struct mbox_chan *chan)
ret = -ENODEV;
goto fail_free_cmpl_memory;
}
ret = request_threaded_irq(ring->irq,
flexrm_irq_event,
flexrm_irq_thread,
0, dev_name(ring->mbox->dev), ring);
ret = request_threaded_irq(ring->irq, NULL, flexrm_irq_thread,
IRQF_ONESHOT, dev_name(ring->mbox->dev), ring);
if (ret) {
dev_err(ring->mbox->dev,
"failed to request ring%d IRQ\n", ring->num);
+1 -1
View File
@@ -192,6 +192,7 @@ static struct multipath *alloc_multipath(struct dm_target *ti)
mutex_init(&m->work_mutex);
m->queue_mode = DM_TYPE_NONE;
m->pg_init_delay_msecs = DM_PG_INIT_DELAY_DEFAULT;
m->ti = ti;
ti->private = m;
@@ -229,7 +230,6 @@ static int alloc_multipath_stage2(struct dm_target *ti, struct multipath *m)
set_bit(MPATHF_QUEUE_IO, &m->flags);
atomic_set(&m->pg_init_in_progress, 0);
atomic_set(&m->pg_init_count, 0);
m->pg_init_delay_msecs = DM_PG_INIT_DELAY_DEFAULT;
init_waitqueue_head(&m->pg_init_wait);
return 0;
+10 -3
View File
@@ -143,14 +143,21 @@ static void end_clone_bio(struct bio *clone)
*/
tio->completed += nr_bytes;
if (!is_last)
return;
/*
* At this moment we know this is the last bio of the cloned request,
* and all cloned bios have been released, so reset the clone request's
* bio pointer to avoid double free.
*/
tio->clone->bio = NULL;
exit:
/*
* Update the original request.
* Do not use blk_end_request() here, because it may complete
* the original request before the clone, and break the ordering.
*/
if (is_last)
exit:
blk_update_request(tio->orig, BLK_STS_OK, tio->completed);
blk_update_request(tio->orig, BLK_STS_OK, tio->completed);
}
static struct dm_rq_target_io *tio_from_request(struct request *rq)
+1 -1
View File
@@ -116,7 +116,7 @@ static void unstripe_dtr(struct dm_target *ti)
static sector_t map_to_core(struct dm_target *ti, struct bio *bio)
{
struct unstripe_c *uc = ti->private;
sector_t sector = bio->bi_iter.bi_sector;
sector_t sector = dm_target_offset(ti, bio->bi_iter.bi_sector);
sector_t tmp_sector = sector;
/* Shift us up to the right "row" on the stripe */
+2 -2
View File
@@ -558,9 +558,9 @@ void verity_fec_dtr(struct dm_verity *v)
mempool_exit(&f->output_pool);
kmem_cache_destroy(f->cache);
if (f->data_bufio)
if (!IS_ERR_OR_NULL(f->data_bufio))
dm_bufio_client_destroy(f->data_bufio);
if (f->bufio)
if (!IS_ERR_OR_NULL(f->bufio))
dm_bufio_client_destroy(f->bufio);
if (f->dev)
+2 -1
View File
@@ -2142,6 +2142,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
memcpy(page_address(store.sb_page),
page_address(bitmap->storage.sb_page),
sizeof(bitmap_super_t));
mutex_lock(&bitmap->mddev->bitmap_info.mutex);
spin_lock_irq(&bitmap->counts.lock);
md_bitmap_file_unmap(&bitmap->storage);
bitmap->storage = store;
@@ -2249,7 +2250,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
set_page_attr(bitmap, i, BITMAP_PAGE_DIRTY);
}
spin_unlock_irq(&bitmap->counts.lock);
mutex_unlock(&bitmap->mddev->bitmap_info.mutex);
if (!init) {
md_bitmap_unplug(bitmap);
bitmap->mddev->pers->quiesce(bitmap->mddev, 0);
+1 -1
View File
@@ -3201,7 +3201,6 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
!test_bit(In_sync, &rdev->flags))
continue;
/* This is where we read from */
any_working = 1;
sector = r10_bio->devs[j].addr;
if (is_badblock(rdev, sector, max_sync,
@@ -3216,6 +3215,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
continue;
}
}
any_working = 1;
bio = r10_bio->devs[0].bio;
bio->bi_next = biolist;
biolist = bio;
+4 -4
View File
@@ -2690,11 +2690,11 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
if (dvb_vb2_is_streaming(&dmxdevfilter->vb2_ctx)) {
ret = dvb_vb2_fill_buffer(&dmxdevfilter->vb2_ctx,
buffer1, buffer1_len,
buffer_flags);
buffer_flags, true);
if (ret == buffer1_len)
ret = dvb_vb2_fill_buffer(&dmxdevfilter->vb2_ctx,
buffer2, buffer2_len,
buffer_flags);
buffer_flags, true);
} else {
if ((buffer1_len + buffer2_len) == 0) {
if (buffer1 == NULL && buffer2 == NULL) {
@@ -2795,10 +2795,10 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
if (dvb_vb2_is_streaming(ctx)) {
ret = dvb_vb2_fill_buffer(ctx, buffer1, buffer1_len,
buffer_flags);
buffer_flags, false);
if (ret == buffer1_len)
ret = dvb_vb2_fill_buffer(ctx, buffer2, buffer2_len,
buffer_flags);
buffer_flags, false);
} else {
if (buffer->error) {
spin_unlock(&dmxdevfilter->dev->lock);
+3 -2
View File
@@ -257,7 +257,8 @@ int dvb_vb2_is_streaming(struct dvb_vb2_ctx *ctx)
int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx,
const unsigned char *src, int len,
enum dmx_buffer_flags *buffer_flags)
enum dmx_buffer_flags *buffer_flags,
bool flush)
{
unsigned long flags = 0;
void *vbuf = NULL;
@@ -314,7 +315,7 @@ int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx,
}
}
if (ctx->nonblocking && ctx->buf) {
if (flush && ctx->buf) {
vb2_set_plane_payload(&ctx->buf->vb, 0, ll);
vb2_buffer_done(&ctx->buf->vb, VB2_BUF_STATE_DONE);
list_del(&ctx->buf->list);
+7
View File
@@ -474,6 +474,13 @@ static int adv7180_g_frame_interval(struct v4l2_subdev *sd,
fi->interval.denominator = 25;
}
/*
* If the de-interlacer is active, the chip produces full video frames
* at the field rate.
*/
if (state->field == V4L2_FIELD_NONE)
fi->interval.denominator *= 2;
return 0;
}
+1
View File
@@ -237,6 +237,7 @@ static int tw9903_probe(struct i2c_client *client,
if (write_regs(sd, initial_registers) < 0) {
v4l2_err(client, "error initializing TW9903\n");
v4l2_ctrl_handler_free(hdl);
return -EINVAL;
}
+1
View File
@@ -205,6 +205,7 @@ static int tw9906_probe(struct i2c_client *client,
if (write_regs(sd, initial_registers) < 0) {
v4l2_err(client, "error initializing TW9906\n");
v4l2_ctrl_handler_free(hdl);
return -EINVAL;
}
+3 -1
View File
@@ -400,8 +400,10 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream,
ret = cx23885_risc_databuffer(chip->pci, &buf->risc, buf->sglist,
chip->period_size, chip->num_periods, 1);
if (ret < 0)
if (ret < 0) {
cx23885_alsa_dma_unmap(chip);
goto error;
}
/* Loop back to start of program */
buf->risc.jmp[0] = cpu_to_le32(RISC_JUMP|RISC_IRQ1|RISC_CNT_INC);
+1
View File
@@ -544,6 +544,7 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream,
chip->period_size, chip->num_periods, 1);
if (ret < 0) {
pr_info("DEBUG: ERROR after cx25821_risc_databuffer_audio()\n");
cx25821_alsa_dma_unmap(chip);
goto error;
}
+1
View File
@@ -925,6 +925,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
if (!dev->lmmio) {
CX25821_ERR("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
release_mem_region(dev->base_io_addr, pci_resource_len(dev->pci, 0));
cx25821_iounmap(dev);
return -ENOMEM;
}
+3 -1
View File
@@ -492,8 +492,10 @@ static int snd_cx88_hw_params(struct snd_pcm_substream *substream,
ret = cx88_risc_databuffer(chip->pci, &buf->risc, buf->sglist,
chip->period_size, chip->num_periods, 1);
if (ret < 0)
if (ret < 0) {
cx88_alsa_dma_unmap(chip);
goto error;
}
/* Loop back to start of program */
buf->risc.jmp[0] = cpu_to_le32(RISC_JUMP | RISC_IRQ1 | RISC_CNT_INC);
+7 -1
View File
@@ -175,7 +175,7 @@ static const u8 tbl_tw2865_pal_template[] = {
0x64, 0x51, 0x40, 0xaf, 0xFF, 0xF0, 0x00, 0xC0,
};
#define is_tw286x(__solo, __id) (!(__solo->tw2815 & (1 << __id)))
#define is_tw286x(__solo, __id) (!((__solo)->tw2815 & (1U << (__id))))
static u8 tw_readbyte(struct solo_dev *solo_dev, int chip_id, u8 tw6x_off,
u8 tw_off)
@@ -695,6 +695,9 @@ int tw28_set_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch,
chip_num = ch / 4;
ch %= 4;
if (chip_num >= TW_NUM_CHIP)
return -EINVAL;
if (val > 255 || val < 0)
return -ERANGE;
@@ -767,6 +770,9 @@ int tw28_get_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch,
chip_num = ch / 4;
ch %= 4;
if (chip_num >= TW_NUM_CHIP)
return -EINVAL;
switch (ctrl) {
case V4L2_CID_SHARPNESS:
/* Only 286x has sharpness */
@@ -231,6 +231,7 @@ static int mtk_mdp_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
vb2_dma_contig_clear_max_seg_size(&pdev->dev);
platform_device_put(mdp->vpu_dev);
mtk_mdp_unregister_m2m_device(mdp);
v4l2_device_unregister(&mdp->v4l2_dev);
+8 -13
View File
@@ -1742,22 +1742,17 @@ static void preview_try_format(struct isp_prev_device *prev,
switch (pad) {
case PREV_PAD_SINK:
/* When reading data from the CCDC, the input size has already
* been mangled by the CCDC output pad so it can be accepted
* as-is.
*
* When reading data from memory, clamp the requested width and
* height. The TRM doesn't specify a minimum input height, make
/*
* Clamp the requested width and height.
* The TRM doesn't specify a minimum input height, make
* sure we got enough lines to enable the noise filter and color
* filter array interpolation.
*/
if (prev->input == PREVIEW_INPUT_MEMORY) {
fmt->width = clamp_t(u32, fmt->width, PREV_MIN_IN_WIDTH,
preview_max_out_width(prev));
fmt->height = clamp_t(u32, fmt->height,
PREV_MIN_IN_HEIGHT,
PREV_MAX_IN_HEIGHT);
}
fmt->width = clamp_t(u32, fmt->width, PREV_MIN_IN_WIDTH,
preview_max_out_width(prev));
fmt->height = clamp_t(u32, fmt->height,
PREV_MIN_IN_HEIGHT,
PREV_MAX_IN_HEIGHT);
fmt->colorspace = V4L2_COLORSPACE_SRGB;
+11 -3
View File
@@ -152,12 +152,12 @@ static unsigned int isp_video_mbus_to_pix(const struct isp_video *video,
pix->width = mbus->width;
pix->height = mbus->height;
for (i = 0; i < ARRAY_SIZE(formats); ++i) {
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
if (formats[i].code == mbus->code)
break;
}
if (WARN_ON(i == ARRAY_SIZE(formats)))
if (WARN_ON(i == ARRAY_SIZE(formats) - 1))
return 0;
min_bpl = pix->width * formats[i].bpp;
@@ -195,7 +195,7 @@ static void isp_video_pix_to_mbus(const struct v4l2_pix_format *pix,
/* Skip the last format in the loop so that it will be selected if no
* match is found.
*/
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
for (i = 0; i < ARRAY_SIZE(formats) - 2; ++i) {
if (formats[i].pixelformat == pix->pixelformat)
break;
}
@@ -1301,6 +1301,7 @@ static const struct v4l2_ioctl_ops isp_video_ioctl_ops = {
static int isp_video_open(struct file *file)
{
struct isp_video *video = video_drvdata(file);
struct v4l2_mbus_framefmt fmt;
struct isp_video_fh *handle;
struct vb2_queue *queue;
int ret = 0;
@@ -1342,6 +1343,13 @@ static int isp_video_open(struct file *file)
memset(&handle->format, 0, sizeof(handle->format));
handle->format.type = video->type;
handle->format.fmt.pix.width = 720;
handle->format.fmt.pix.height = 480;
handle->format.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
handle->format.fmt.pix.field = V4L2_FIELD_NONE;
handle->format.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
isp_video_pix_to_mbus(&handle->format.fmt.pix, &fmt);
isp_video_mbus_to_pix(video, &fmt, &handle->format.fmt.pix);
handle->timeperframe.denominator = 1;
handle->video = video;
+1 -1
View File
@@ -349,7 +349,6 @@ static int usb_keene_probe(struct usb_interface *intf,
if (hdl->error) {
retval = hdl->error;
v4l2_ctrl_handler_free(hdl);
goto err_v4l2;
}
retval = v4l2_device_register(&intf->dev, &radio->v4l2_dev);
@@ -394,6 +393,7 @@ static int usb_keene_probe(struct usb_interface *intf,
err_vdev:
v4l2_device_unregister(&radio->v4l2_dev);
err_v4l2:
v4l2_ctrl_handler_free(&radio->hdl);
kfree(radio->buffer);
kfree(radio);
err:
+5
View File
@@ -3697,6 +3697,11 @@ status);
"Failed to submit read-control URB status=%d",
status);
hdw->ctl_read_pend_flag = 0;
if (hdw->ctl_write_pend_flag) {
usb_unlink_urb(hdw->ctl_write_urb);
while (hdw->ctl_write_pend_flag)
wait_for_completion(&hdw->ctl_done);
}
goto done;
}
}
+1 -1
View File
@@ -1157,7 +1157,7 @@ int arizona_dev_init(struct arizona *arizona)
} else if (val & 0x01) {
ret = wm5102_clear_write_sequencer(arizona);
if (ret)
return ret;
goto err_reset;
}
break;
default:
+1 -1
View File
@@ -42,7 +42,7 @@ static int da9052_spi_probe(struct spi_device *spi)
spi_set_drvdata(spi, da9052);
config = da9052_regmap_config;
config.write_flag_mask = 1;
config.read_flag_mask = 1;
config.reg_bits = 7;
config.pad_bits = 1;
config.val_bits = 8;
+13 -2
View File
@@ -3525,8 +3525,12 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
mmc_go_idle(host);
if (!(host->caps2 & MMC_CAP2_NO_SD))
mmc_send_if_cond(host, host->ocr_avail);
if (!(host->caps2 & MMC_CAP2_NO_SD)) {
if (mmc_send_if_cond_pcie(host, host->ocr_avail))
goto out;
if (mmc_card_sd_express(host))
return 0;
}
/* Order's important: probe SDIO, then SD, then MMC */
if (!(host->caps2 & MMC_CAP2_NO_SDIO))
@@ -3541,6 +3545,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
if (!mmc_attach_mmc(host))
return 0;
out:
mmc_power_off(host);
return -EIO;
}
@@ -3689,6 +3694,12 @@ void mmc_rescan(struct work_struct *work)
goto out;
}
/* If an SD express card is present, then leave it as is. */
if (mmc_card_sd_express(host)) {
mmc_release_host(host);
goto out;
}
mmc_rescan_try_freq(host, host->f_min);
host->err_stats[MMC_ERR_CMD_TIMEOUT] = 0;
mmc_release_host(host);
+6
View File
@@ -80,5 +80,11 @@ static inline bool mmc_card_hs400es(struct mmc_card *card)
return card->host->ios.enhanced_strobe;
}
static inline bool mmc_card_sd_express(struct mmc_host *host)
{
return host->ios.timing == MMC_TIMING_SD_EXP ||
host->ios.timing == MMC_TIMING_SD_EXP_1_2V;
}
#endif
+47 -2
View File
@@ -195,7 +195,8 @@ int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
return err;
}
int mmc_send_if_cond(struct mmc_host *host, u32 ocr)
static int __mmc_send_if_cond(struct mmc_host *host, u32 ocr, u8 pcie_bits,
u32 *resp)
{
struct mmc_command cmd = {};
int err;
@@ -208,7 +209,7 @@ int mmc_send_if_cond(struct mmc_host *host, u32 ocr)
* SD 1.0 cards.
*/
cmd.opcode = SD_SEND_IF_COND;
cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | test_pattern;
cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | pcie_bits << 8 | test_pattern;
cmd.flags = MMC_RSP_SPI_R7 | MMC_RSP_R7 | MMC_CMD_BCR;
err = mmc_wait_for_cmd(host, &cmd, 0);
@@ -223,6 +224,50 @@ int mmc_send_if_cond(struct mmc_host *host, u32 ocr)
if (result_pattern != test_pattern)
return -EIO;
if (resp)
*resp = cmd.resp[0];
return 0;
}
int mmc_send_if_cond(struct mmc_host *host, u32 ocr)
{
return __mmc_send_if_cond(host, ocr, 0, NULL);
}
int mmc_send_if_cond_pcie(struct mmc_host *host, u32 ocr)
{
u32 resp = 0;
u8 pcie_bits = 0;
int ret;
if (host->caps2 & MMC_CAP2_SD_EXP) {
/* Probe card for SD express support via PCIe. */
pcie_bits = 0x10;
if (host->caps2 & MMC_CAP2_SD_EXP_1_2V)
/* Probe also for 1.2V support. */
pcie_bits = 0x30;
}
ret = __mmc_send_if_cond(host, ocr, pcie_bits, &resp);
if (ret)
return 0;
/* Continue with the SD express init, if the card supports it. */
resp &= 0x3000;
if (pcie_bits && resp) {
if (resp == 0x3000)
host->ios.timing = MMC_TIMING_SD_EXP_1_2V;
else
host->ios.timing = MMC_TIMING_SD_EXP;
/*
* According to the spec the clock shall also be gated, but
* let's leave this to the host driver for more flexibility.
*/
return host->ops->init_sd_express(host, &host->ios);
}
return 0;
}
+1
View File
@@ -21,6 +21,7 @@ struct mmc_command;
int mmc_app_set_bus_width(struct mmc_card *card, int width);
int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr);
int mmc_send_if_cond(struct mmc_host *host, u32 ocr);
int mmc_send_if_cond_pcie(struct mmc_host *host, u32 ocr);
int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca);
int mmc_app_send_scr(struct mmc_card *card);
int mmc_sd_switch(struct mmc_card *card, int mode, int group,
+14 -7
View File
@@ -375,26 +375,29 @@ static int bond_update_speed_duplex(struct slave *slave)
struct ethtool_link_ksettings ecmd;
int res;
slave->speed = SPEED_UNKNOWN;
slave->duplex = DUPLEX_UNKNOWN;
res = __ethtool_get_link_ksettings(slave_dev, &ecmd);
if (res < 0)
return 1;
goto speed_duplex_unknown;
if (ecmd.base.speed == 0 || ecmd.base.speed == ((__u32)-1))
return 1;
goto speed_duplex_unknown;
switch (ecmd.base.duplex) {
case DUPLEX_FULL:
case DUPLEX_HALF:
break;
default:
return 1;
goto speed_duplex_unknown;
}
slave->speed = ecmd.base.speed;
slave->duplex = ecmd.base.duplex;
return 0;
speed_duplex_unknown:
slave->speed = SPEED_UNKNOWN;
slave->duplex = DUPLEX_UNKNOWN;
return 1;
}
const char *bond_slave_link_status(s8 link)
@@ -3442,9 +3445,13 @@ static int bond_close(struct net_device *bond_dev)
bond_work_cancel_all(bond);
bond->send_peer_notif = 0;
WRITE_ONCE(bond->recv_probe, NULL);
/* Wait for any in-flight RX handlers */
synchronize_net();
if (bond_is_lb(bond))
bond_alb_deinitialize(bond);
bond->recv_probe = NULL;
return 0;
}
+3 -2
View File
@@ -308,6 +308,7 @@ static void ser_release(struct work_struct *work)
{
struct list_head list;
struct ser_device *ser, *tmp;
struct tty_struct *tty;
spin_lock(&ser_lock);
list_replace_init(&ser_release_list, &list);
@@ -316,9 +317,11 @@ static void ser_release(struct work_struct *work)
if (!list_empty(&list)) {
rtnl_lock();
list_for_each_entry_safe(ser, tmp, &list, node) {
tty = ser->tty;
dev_close(ser->dev);
unregister_netdevice(ser->dev);
debugfs_deinit(ser);
tty_kref_put(tty);
}
rtnl_unlock();
}
@@ -379,8 +382,6 @@ static void ldisc_close(struct tty_struct *tty)
{
struct ser_device *ser = tty->disc_data;
tty_kref_put(ser->tty);
spin_lock(&ser_lock);
list_move(&ser->node, &ser_release_list);
spin_unlock(&ser_lock);
+1 -1
View File
@@ -433,7 +433,7 @@ static int ec_bhf_open(struct net_device *net_dev)
error_rx_free:
dma_free_coherent(dev, priv->rx_buf.alloc_len, priv->rx_buf.alloc,
priv->rx_buf.alloc_len);
priv->rx_buf.alloc_phys);
out:
return err;
}
-1
View File
@@ -91,7 +91,6 @@ static const struct pci_device_id skge_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x4320) }, /* SK-98xx V2.0 */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* D-Link DGE-530T (rev.B) */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4c00) }, /* D-Link DGE-530T */
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302) }, /* D-Link DGE-530T Rev C1 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) }, /* Marvell Yukon 88E8001/8003/8010 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
{ PCI_DEVICE(PCI_VENDOR_ID_CNET, 0x434E) }, /* CNet PowerG-2000 */
@@ -689,6 +689,9 @@ static int myri10ge_get_firmware_capabilities(struct myri10ge_priv *mgp)
/* probe for IPv6 TSO support */
mgp->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO;
cmd.data0 = 0,
cmd.data1 = 0,
cmd.data2 = 0,
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE,
&cmd, 0);
if (status == 0) {
@@ -806,6 +809,7 @@ static int myri10ge_update_mac_address(struct myri10ge_priv *mgp, u8 * addr)
| (addr[2] << 8) | addr[3]);
cmd.data1 = ((addr[4] << 8) | (addr[5]));
cmd.data2 = 0;
status = myri10ge_send_cmd(mgp, MXGEFW_SET_MAC_ADDRESS, &cmd, 0);
return status;
@@ -817,6 +821,9 @@ static int myri10ge_change_pause(struct myri10ge_priv *mgp, int pause)
int status, ctl;
ctl = pause ? MXGEFW_ENABLE_FLOW_CONTROL : MXGEFW_DISABLE_FLOW_CONTROL;
cmd.data0 = 0,
cmd.data1 = 0,
cmd.data2 = 0,
status = myri10ge_send_cmd(mgp, ctl, &cmd, 0);
if (status) {
@@ -834,6 +841,9 @@ myri10ge_change_promisc(struct myri10ge_priv *mgp, int promisc, int atomic)
int status, ctl;
ctl = promisc ? MXGEFW_ENABLE_PROMISC : MXGEFW_DISABLE_PROMISC;
cmd.data0 = 0;
cmd.data1 = 0;
cmd.data2 = 0;
status = myri10ge_send_cmd(mgp, ctl, &cmd, atomic);
if (status)
netdev_err(mgp->dev, "Failed to set promisc mode\n");
@@ -1951,6 +1961,8 @@ static int myri10ge_allocate_rings(struct myri10ge_slice_state *ss)
/* get ring sizes */
slice = ss - mgp->ss;
cmd.data0 = slice;
cmd.data1 = 0;
cmd.data2 = 0;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_RING_SIZE, &cmd, 0);
tx_ring_size = cmd.data0;
cmd.data0 = slice;
@@ -2243,12 +2255,16 @@ static int myri10ge_get_txrx(struct myri10ge_priv *mgp, int slice)
status = 0;
if (slice == 0 || (mgp->dev->real_num_tx_queues > 1)) {
cmd.data0 = slice;
cmd.data1 = 0;
cmd.data2 = 0;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_OFFSET,
&cmd, 0);
ss->tx.lanai = (struct mcp_kreq_ether_send __iomem *)
(mgp->sram + cmd.data0);
}
cmd.data0 = slice;
cmd.data1 = 0;
cmd.data2 = 0;
status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SMALL_RX_OFFSET,
&cmd, 0);
ss->rx_small.lanai = (struct mcp_kreq_ether_recv __iomem *)
@@ -2317,6 +2333,7 @@ static int myri10ge_open(struct net_device *dev)
if (mgp->num_slices > 1) {
cmd.data0 = mgp->num_slices;
cmd.data1 = MXGEFW_SLICE_INTR_MODE_ONE_PER_SLICE;
cmd.data2 = 0;
if (mgp->dev->real_num_tx_queues > 1)
cmd.data1 |= MXGEFW_SLICE_ENABLE_MULTIPLE_TX_QUEUES;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ENABLE_RSS_QUEUES,
@@ -2419,6 +2436,8 @@ static int myri10ge_open(struct net_device *dev)
/* now give firmware buffers sizes, and MTU */
cmd.data0 = dev->mtu + ETH_HLEN + VLAN_HLEN;
cmd.data1 = 0;
cmd.data2 = 0;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_MTU, &cmd, 0);
cmd.data0 = mgp->small_bytes;
status |=
@@ -2477,7 +2496,6 @@ abort_with_nothing:
static int myri10ge_close(struct net_device *dev)
{
struct myri10ge_priv *mgp = netdev_priv(dev);
struct myri10ge_cmd cmd;
int status, old_down_cnt;
int i;
@@ -2496,8 +2514,13 @@ static int myri10ge_close(struct net_device *dev)
netif_tx_stop_all_queues(dev);
if (mgp->rebooted == 0) {
struct myri10ge_cmd cmd;
old_down_cnt = mgp->down_cnt;
mb();
cmd.data0 = 0;
cmd.data1 = 0;
cmd.data2 = 0;
status =
myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_DOWN, &cmd, 0);
if (status)
@@ -2966,6 +2989,9 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
/* Disable multicast filtering */
cmd.data0 = 0;
cmd.data1 = 0;
cmd.data2 = 0;
err = myri10ge_send_cmd(mgp, MXGEFW_ENABLE_ALLMULTI, &cmd, 1);
if (err != 0) {
netdev_err(dev, "Failed MXGEFW_ENABLE_ALLMULTI, error status: %d\n",
+5
View File
@@ -1486,6 +1486,11 @@ destroy_macvlan_port:
if (create)
macvlan_port_destroy(port->dev);
}
/* @dev might have been made visible before an error was detected.
* Make sure to observe an RCU grace period before our caller
* (rtnl_newlink()) frees it.
*/
synchronize_net();
return err;
}
EXPORT_SYMBOL_GPL(macvlan_common_newlink);
-1
View File
@@ -316,7 +316,6 @@ config USB_NET_DM9601
config USB_NET_SR9700
tristate "CoreChip-sz SR9700 based USB 1.1 10/100 ethernet devices"
depends on USB_USBNET
select CRC32
help
This option adds support for CoreChip-sz SR9700 based USB 1.1
10/100 Ethernet adapters.
+48 -11
View File
@@ -75,6 +75,16 @@ static const char driver_name[] = "catc";
#define CTRL_QUEUE 16 /* Max control requests in flight (power of two) */
#define RX_PKT_SZ 1600 /* Max size of receive packet for F5U011 */
/*
* USB endpoints.
*/
enum catc_usb_ep {
CATC_USB_EP_CONTROL = 0,
CATC_USB_EP_BULK = 1,
CATC_USB_EP_INT_IN = 2,
};
/*
* Control requests.
*/
@@ -781,17 +791,38 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
struct net_device *netdev;
struct catc *catc;
u8 broadcast[ETH_ALEN];
int pktsz, ret;
u8 *macbuf;
int pktsz, ret = -ENOMEM;
static const u8 bulk_ep_addr[] = {
CATC_USB_EP_BULK | USB_DIR_OUT,
CATC_USB_EP_BULK | USB_DIR_IN,
0};
static const u8 int_ep_addr[] = {
CATC_USB_EP_INT_IN | USB_DIR_IN,
0};
macbuf = kmalloc(ETH_ALEN, GFP_KERNEL);
if (!macbuf)
goto error;
if (usb_set_interface(usbdev,
intf->altsetting->desc.bInterfaceNumber, 1)) {
dev_err(dev, "Can't set altsetting 1.\n");
return -EIO;
ret = -EIO;
goto fail_mem;;
}
/* Verify that all required endpoints are present */
if (!usb_check_bulk_endpoints(intf, bulk_ep_addr) ||
!usb_check_int_endpoints(intf, int_ep_addr)) {
dev_err(dev, "Missing or invalid endpoints\n");
ret = -ENODEV;
goto fail_mem;
}
netdev = alloc_etherdev(sizeof(struct catc));
if (!netdev)
return -ENOMEM;
goto fail_mem;
catc = netdev_priv(netdev);
@@ -833,14 +864,14 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
usb_fill_control_urb(catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
NULL, NULL, 0, catc_ctrl_done, catc);
usb_fill_bulk_urb(catc->tx_urb, usbdev, usb_sndbulkpipe(usbdev, 1),
NULL, 0, catc_tx_done, catc);
usb_fill_bulk_urb(catc->tx_urb, usbdev, usb_sndbulkpipe(usbdev, CATC_USB_EP_BULK),
NULL, 0, catc_tx_done, catc);
usb_fill_bulk_urb(catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
catc->rx_buf, pktsz, catc_rx_done, catc);
usb_fill_bulk_urb(catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, CATC_USB_EP_BULK),
catc->rx_buf, pktsz, catc_rx_done, catc);
usb_fill_int_urb(catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
catc->irq_buf, 2, catc_irq_done, catc, 1);
usb_fill_int_urb(catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, CATC_USB_EP_INT_IN),
catc->irq_buf, 2, catc_irq_done, catc, 1);
if (!catc->is_f5u011) {
u32 *buf;
@@ -881,7 +912,8 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
dev_dbg(dev, "Getting MAC from SEEROM.\n");
catc_get_mac(catc, netdev->dev_addr);
catc_get_mac(catc, macbuf);
eth_hw_addr_set(netdev, macbuf);
dev_dbg(dev, "Setting MAC into registers.\n");
@@ -910,7 +942,8 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
} else {
dev_dbg(dev, "Performing reset\n");
catc_reset(catc);
catc_get_mac(catc, netdev->dev_addr);
catc_get_mac(catc, macbuf);
eth_hw_addr_set(netdev, macbuf);
dev_dbg(dev, "Setting RX Mode\n");
catc->rxmode[0] = RxEnable | RxPolarity | RxMultiCast;
@@ -928,6 +961,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
if (ret)
goto fail_clear_intfdata;
kfree(macbuf);
return 0;
fail_clear_intfdata:
@@ -938,6 +972,9 @@ fail_free:
usb_free_urb(catc->rx_urb);
usb_free_urb(catc->irq_urb);
free_netdev(netdev);
fail_mem:
kfree(macbuf);
error:
return ret;
}
-2
View File
@@ -855,7 +855,6 @@ static void kaweth_set_rx_mode(struct net_device *net)
netdev_dbg(net, "Setting Rx mode to %d\n", packet_filter_bitmap);
netif_stop_queue(net);
if (net->flags & IFF_PROMISC) {
packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS;
@@ -865,7 +864,6 @@ static void kaweth_set_rx_mode(struct net_device *net)
}
kaweth->packet_filter_bitmap = packet_filter_bitmap;
netif_wake_queue(net);
}
/****************************************************************
+78 -37
View File
@@ -349,6 +349,7 @@ struct usb_context {
#define EVENT_DEV_ASLEEP 7
#define EVENT_DEV_OPEN 8
#define EVENT_STAT_UPDATE 9
#define EVENT_DEV_DISCONNECT 10
struct statstage {
struct mutex access_lock; /* for stats access */
@@ -378,7 +379,6 @@ struct lan78xx_net {
struct sk_buff_head rxq;
struct sk_buff_head txq;
struct sk_buff_head done;
struct sk_buff_head rxq_pause;
struct sk_buff_head txq_pend;
struct tasklet_struct bh;
@@ -435,9 +435,13 @@ MODULE_PARM_DESC(msg_level, "Override default message level");
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
u32 *buf;
int ret;
if (test_bit(EVENT_DEV_DISCONNECT, &dev->flags))
return -ENODEV;
buf = kmalloc(sizeof(u32), GFP_KERNEL);
if (!buf)
return -ENOMEM;
@@ -461,9 +465,13 @@ static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
static int lan78xx_write_reg(struct lan78xx_net *dev, u32 index, u32 data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
u32 *buf;
int ret;
if (test_bit(EVENT_DEV_DISCONNECT, &dev->flags))
return -ENODEV;
buf = kmalloc(sizeof(u32), GFP_KERNEL);
if (!buf)
return -ENOMEM;
@@ -1867,8 +1875,6 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev)
dev->mdiobus->phy_mask = ~(1 << 1);
break;
case ID_REV_CHIP_ID_7801_:
/* scan thru PHYAD[2..0] */
dev->mdiobus->phy_mask = ~(0xFF);
break;
}
@@ -3000,8 +3006,6 @@ static int lan78xx_stop(struct net_device *net)
usb_kill_urb(dev->urb_intr);
skb_queue_purge(&dev->rxq_pause);
/* deferred work (task, timer, softirq) must also stop.
* can't flush_scheduled_work() until we drop rtnl (later),
* else workers could deadlock; so make workers a NOP.
@@ -3108,16 +3112,23 @@ static void tx_complete(struct urb *urb)
/* software-driven interface shutdown */
case -ECONNRESET:
case -ESHUTDOWN:
netif_dbg(dev, tx_err, dev->net,
"tx err interface gone %d\n",
entry->urb->status);
break;
case -EPROTO:
case -ETIME:
case -EILSEQ:
netif_stop_queue(dev->net);
netif_dbg(dev, tx_err, dev->net,
"tx err queue stopped %d\n",
entry->urb->status);
break;
default:
netif_dbg(dev, tx_err, dev->net,
"tx err %d\n", entry->urb->status);
"unknown tx err %d\n",
entry->urb->status);
break;
}
}
@@ -3304,11 +3315,6 @@ static void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb)
{
int status;
if (test_bit(EVENT_RX_PAUSED, &dev->flags)) {
skb_queue_tail(&dev->rxq_pause, skb);
return;
}
dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len;
@@ -3459,6 +3465,7 @@ static int rx_submit(struct lan78xx_net *dev, struct urb *urb, gfp_t flags)
lan78xx_defer_kevent(dev, EVENT_RX_HALT);
break;
case -ENODEV:
case -ENOENT:
netif_dbg(dev, ifdown, dev->net, "device gone\n");
netif_device_detach(dev->net);
break;
@@ -3659,6 +3666,12 @@ gso_skb:
lan78xx_defer_kevent(dev, EVENT_TX_HALT);
usb_autopm_put_interface_async(dev->intf);
break;
case -ENODEV:
case -ENOENT:
netif_dbg(dev, tx_err, dev->net,
"tx: submit urb err %d (disconnected?)", ret);
netif_device_detach(dev->net);
break;
default:
usb_autopm_put_interface_async(dev->intf);
netif_dbg(dev, tx_err, dev->net,
@@ -3754,6 +3767,9 @@ static void lan78xx_delayedwork(struct work_struct *work)
dev = container_of(work, struct lan78xx_net, wq.work);
if (test_bit(EVENT_DEV_DISCONNECT, &dev->flags))
return;
if (usb_autopm_get_interface(dev->intf) < 0)
return;
@@ -3828,6 +3844,7 @@ static void intr_complete(struct urb *urb)
/* software-driven interface shutdown */
case -ENOENT: /* urb killed */
case -ENODEV: /* hardware gone */
case -ESHUTDOWN: /* hardware gone */
netif_dbg(dev, ifdown, dev->net,
"intr shutdown, code %d\n", status);
@@ -3841,14 +3858,29 @@ static void intr_complete(struct urb *urb)
break;
}
if (!netif_running(dev->net))
if (!netif_device_present(dev->net) ||
!netif_running(dev->net)) {
netdev_warn(dev->net, "not submitting new status URB");
return;
}
memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status != 0)
switch (status) {
case 0:
break;
case -ENODEV:
case -ENOENT:
netif_dbg(dev, timer, dev->net,
"intr resubmit %d (disconnect?)", status);
netif_device_detach(dev->net);
break;
default:
netif_err(dev, timer, dev->net,
"intr resubmit --> %d\n", status);
break;
}
}
static void lan78xx_disconnect(struct usb_interface *intf)
@@ -3863,8 +3895,15 @@ static void lan78xx_disconnect(struct usb_interface *intf)
if (!dev)
return;
set_bit(EVENT_DEV_DISCONNECT, &dev->flags);
udev = interface_to_usbdev(intf);
net = dev->net;
unregister_netdev(net);
cancel_delayed_work_sync(&dev->wq);
phydev = net->phydev;
phy_unregister_fixup_for_uid(PHY_KSZ9031RNX, 0xfffffff0);
@@ -3877,12 +3916,11 @@ static void lan78xx_disconnect(struct usb_interface *intf)
phy_device_free(phydev);
}
unregister_netdev(net);
cancel_delayed_work_sync(&dev->wq);
usb_scuttle_anchored_urbs(&dev->deferred);
if (timer_pending(&dev->stat_monitor))
del_timer_sync(&dev->stat_monitor);
lan78xx_unbind(dev, intf);
usb_kill_urb(dev->urb_intr);
@@ -3971,7 +4009,6 @@ static int lan78xx_probe(struct usb_interface *intf,
skb_queue_head_init(&dev->rxq);
skb_queue_head_init(&dev->txq);
skb_queue_head_init(&dev->done);
skb_queue_head_init(&dev->rxq_pause);
skb_queue_head_init(&dev->txq_pend);
mutex_init(&dev->phy_mutex);
mutex_init(&dev->dev_mutex);
@@ -4031,18 +4068,20 @@ static int lan78xx_probe(struct usb_interface *intf,
period = ep_intr->desc.bInterval;
maxp = usb_maxpacket(dev->udev, dev->pipe_intr, 0);
buf = kmalloc(maxp, GFP_KERNEL);
if (buf) {
dev->urb_intr = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->urb_intr) {
ret = -ENOMEM;
kfree(buf);
goto out3;
} else {
usb_fill_int_urb(dev->urb_intr, dev->udev,
dev->pipe_intr, buf, maxp,
intr_complete, dev, period);
dev->urb_intr->transfer_flags |= URB_FREE_BUFFER;
}
if (!buf) {
ret = -ENOMEM;
goto out3;
}
dev->urb_intr = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->urb_intr) {
ret = -ENOMEM;
goto out4;
} else {
usb_fill_int_urb(dev->urb_intr, dev->udev,
dev->pipe_intr, buf, maxp,
intr_complete, dev, period);
dev->urb_intr->transfer_flags |= URB_FREE_BUFFER;
}
dev->maxpacket = usb_maxpacket(dev->udev, dev->pipe_out, 1);
@@ -4050,7 +4089,7 @@ static int lan78xx_probe(struct usb_interface *intf,
/* Reject broken descriptors. */
if (dev->maxpacket == 0) {
ret = -ENODEV;
goto out4;
goto out5;
}
/* driver requires remote-wakeup capability during autosuspend. */
@@ -4058,12 +4097,12 @@ static int lan78xx_probe(struct usb_interface *intf,
ret = lan78xx_phy_init(dev);
if (ret < 0)
goto out4;
goto out5;
ret = register_netdev(netdev);
if (ret != 0) {
netif_err(dev, probe, netdev, "couldn't register the device\n");
goto out5;
goto out6;
}
usb_set_intfdata(intf, dev);
@@ -4078,10 +4117,12 @@ static int lan78xx_probe(struct usb_interface *intf,
return 0;
out5:
out6:
phy_disconnect(netdev->phydev);
out4:
out5:
usb_free_urb(dev->urb_intr);
out4:
kfree(buf);
out3:
lan78xx_unbind(dev, intf);
out2:
+30 -5
View File
@@ -58,6 +58,17 @@ static const char driver_name[] = "pegasus";
#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \
BMSR_100FULL | BMSR_ANEGCAPABLE)
/*
* USB endpoints.
*/
enum pegasus_usb_ep {
PEGASUS_USB_EP_CONTROL = 0,
PEGASUS_USB_EP_BULK_IN = 1,
PEGASUS_USB_EP_BULK_OUT = 2,
PEGASUS_USB_EP_INT_IN = 3,
};
static bool loopback;
static bool mii_mode;
static char *devid;
@@ -550,7 +561,7 @@ static void read_bulk_callback(struct urb *urb)
goto tl_sched;
goon:
usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1),
usb_rcvbulkpipe(pegasus->usb, PEGASUS_USB_EP_BULK_IN),
pegasus->rx_skb->data, PEGASUS_MTU,
read_bulk_callback, pegasus);
rx_status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC);
@@ -591,7 +602,7 @@ static void rx_fixup(unsigned long data)
return;
}
usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1),
usb_rcvbulkpipe(pegasus->usb, PEGASUS_USB_EP_BULK_IN),
pegasus->rx_skb->data, PEGASUS_MTU,
read_bulk_callback, pegasus);
try_again:
@@ -719,7 +730,7 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
((__le16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
skb_copy_from_linear_data(skb, pegasus->tx_buff + 2, skb->len);
usb_fill_bulk_urb(pegasus->tx_urb, pegasus->usb,
usb_sndbulkpipe(pegasus->usb, 2),
usb_sndbulkpipe(pegasus->usb, PEGASUS_USB_EP_BULK_OUT),
pegasus->tx_buff, count,
write_bulk_callback, pegasus);
if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) {
@@ -846,7 +857,7 @@ static int pegasus_open(struct net_device *net)
res = set_registers(pegasus, EthID, 6, net->dev_addr);
usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1),
usb_rcvbulkpipe(pegasus->usb, PEGASUS_USB_EP_BULK_IN),
pegasus->rx_skb->data, PEGASUS_MTU,
read_bulk_callback, pegasus);
if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) {
@@ -857,7 +868,7 @@ static int pegasus_open(struct net_device *net)
}
usb_fill_int_urb(pegasus->intr_urb, pegasus->usb,
usb_rcvintpipe(pegasus->usb, 3),
usb_rcvintpipe(pegasus->usb, PEGASUS_USB_EP_INT_IN),
pegasus->intr_buff, sizeof(pegasus->intr_buff),
intr_callback, pegasus, pegasus->intr_interval);
if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) {
@@ -1150,10 +1161,24 @@ static int pegasus_probe(struct usb_interface *intf,
pegasus_t *pegasus;
int dev_index = id - pegasus_ids;
int res = -ENOMEM;
static const u8 bulk_ep_addr[] = {
PEGASUS_USB_EP_BULK_IN | USB_DIR_IN,
PEGASUS_USB_EP_BULK_OUT | USB_DIR_OUT,
0};
static const u8 int_ep_addr[] = {
PEGASUS_USB_EP_INT_IN | USB_DIR_IN,
0};
if (pegasus_blacklisted(dev))
return -ENODEV;
/* Verify that all required endpoints are present */
if (!usb_check_bulk_endpoints(intf, bulk_ep_addr) ||
!usb_check_int_endpoints(intf, int_ep_addr)) {
dev_err(&intf->dev, "Missing or invalid endpoints\n");
return -ENODEV;
}
if (pegasus_count == 0) {
pegasus_workqueue = alloc_workqueue("pegasus", WQ_MEM_RECLAIM,
0);
+2
View File
@@ -1837,6 +1837,8 @@ static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg)
ret = usb_submit_urb(agg->urb, GFP_ATOMIC);
if (ret < 0)
usb_autopm_put_interface_async(tp->intf);
else
netif_trans_update(tp->netdev);
out_tx_fill:
return ret;
+4 -21
View File
@@ -18,7 +18,6 @@
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/crc32.h>
#include <linux/usb/usbnet.h>
#include "sr9700.h"
@@ -264,31 +263,15 @@ static const struct ethtool_ops sr9700_ethtool_ops = {
static void sr9700_set_multicast(struct net_device *netdev)
{
struct usbnet *dev = netdev_priv(netdev);
/* We use the 20 byte dev->data for our 8 byte filter buffer
* to avoid allocating memory that is tricky to free later
*/
u8 *hashes = (u8 *)&dev->data;
/* rx_ctl setting : enable, disable_long, disable_crc */
u8 rx_ctl = RCR_RXEN | RCR_DIS_CRC | RCR_DIS_LONG;
memset(hashes, 0x00, SR_MCAST_SIZE);
/* broadcast address */
hashes[SR_MCAST_SIZE - 1] |= SR_MCAST_ADDR_FLAG;
if (netdev->flags & IFF_PROMISC) {
if (netdev->flags & IFF_PROMISC)
rx_ctl |= RCR_PRMSC;
} else if (netdev->flags & IFF_ALLMULTI ||
netdev_mc_count(netdev) > SR_MCAST_MAX) {
rx_ctl |= RCR_RUNT;
} else if (!netdev_mc_empty(netdev)) {
struct netdev_hw_addr *ha;
else if (netdev->flags & IFF_ALLMULTI || !netdev_mc_empty(netdev))
/* The chip has no multicast filter */
rx_ctl |= RCR_ALL;
netdev_for_each_mc_addr(ha, netdev) {
u32 crc = ether_crc(ETH_ALEN, ha->addr) >> 26;
hashes[crc >> 3] |= 1 << (crc & 0x7);
}
}
sr_write_async(dev, SR_MAR, SR_MCAST_SIZE, hashes);
sr_write_reg_async(dev, SR_RCR, rx_ctl);
}
+1 -6
View File
@@ -107,9 +107,7 @@
#define WCR_LINKEN (1 << 5)
/* Physical Address Reg */
#define SR_PAR 0x10 /* 0x10 ~ 0x15 6 bytes for PAR */
/* Multicast Address Reg */
#define SR_MAR 0x16 /* 0x16 ~ 0x1D 8 bytes for MAR */
/* 0x1e unused */
/* 0x16 --> 0x1E unused */
/* Phy Reset Reg */
#define SR_PRR 0x1F
#define PRR_PHY_RST (1 << 0)
@@ -164,9 +162,6 @@
/* parameters */
#define SR_SHARE_TIMEOUT 1000
#define SR_EEPROM_LEN 256
#define SR_MCAST_SIZE 8
#define SR_MCAST_ADDR_FLAG 0x80
#define SR_MCAST_MAX 64
#define SR_TX_OVERHEAD 2 /* 2bytes header */
#define SR_RX_OVERHEAD 7 /* 3bytes header + 4crc tail */
+2 -6
View File
@@ -742,18 +742,14 @@ static void uhdlc_memclean(struct ucc_hdlc_private *priv)
if (priv->rx_buffer) {
dma_free_coherent(priv->dev,
RX_BD_RING_LEN * MAX_RX_BUF_LENGTH,
(RX_BD_RING_LEN + TX_BD_RING_LEN) * MAX_RX_BUF_LENGTH,
priv->rx_buffer, priv->dma_rx_addr);
priv->rx_buffer = NULL;
priv->dma_rx_addr = 0;
}
if (priv->tx_buffer) {
dma_free_coherent(priv->dev,
TX_BD_RING_LEN * MAX_RX_BUF_LENGTH,
priv->tx_buffer, priv->dma_tx_addr);
priv->tx_buffer = NULL;
priv->dma_tx_addr = 0;
}
}
@@ -3290,7 +3290,9 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr,
D_INFO("Invoking measurement of type %d on " "channel %d (for '%s')\n",
type, params.channel, buf);
mutex_lock(&il->mutex);
il3945_get_measurement(il, &params, type);
mutex_unlock(&il->mutex);
return count;
}
Loaded 100 of 211 files, more files were not shown because too many files have changed in this diff. Show more