Linux 3.0.44
I'm announcing the release of the 3.0.44 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/alpha/include/asm/atomic.h | 4 - arch/arm/Kconfig | 52 ++++++------- arch/arm/boot/compressed/head.S | 1 arch/arm/include/asm/mutex.h | 119 +------------------------------ arch/x86/kernel/cpu/mcheck/mce.c | 9 ++ arch/x86/pci/fixup.c | 17 ++++ arch/x86/xen/setup.c | 4 + drivers/acpi/processor_core.c | 6 + drivers/ata/ahci.c | 2 drivers/ata/libata-core.c | 1 drivers/base/power/runtime.c | 5 - drivers/block/cciss_scsi.c | 1 drivers/bluetooth/btusb.c | 10 +- drivers/cpufreq/powernow-k8.c | 63 ++++++++-------- drivers/dma/at_hdmac.c | 13 +++ drivers/gpu/drm/i915/intel_hdmi.c | 2 drivers/gpu/drm/radeon/radeon_atombios.c | 2 drivers/hwmon/ads7871.c | 9 ++ drivers/hwmon/fam15h_power.c | 15 +++ drivers/hwmon/twl4030-madc-hwmon.c | 9 +- drivers/input/serio/i8042-x86ia64io.h | 6 + drivers/isdn/isdnloop/isdnloop.c | 12 --- drivers/md/md.c | 9 +- drivers/media/rc/rc-main.c | 5 - drivers/misc/sgi-xp/xpc_uv.c | 84 ++++++++++++++++----- drivers/mmc/core/sd.c | 6 - drivers/mmc/host/mxs-mmc.c | 4 - drivers/mmc/host/sdhci-esdhc.h | 6 - drivers/mmc/host/sdhci.c | 5 - drivers/mtd/ubi/vtbl.c | 4 - drivers/net/can/janz-ican3.c | 4 - drivers/net/can/mcp251x.c | 11 ++ drivers/net/can/ti_hecc.c | 2 drivers/net/e1000e/82571.c | 3 drivers/net/netconsole.c | 1 drivers/net/sfc/efx.c | 6 + drivers/net/sfc/efx.h | 14 ++- drivers/net/sfc/ethtool.c | 16 ++-- drivers/net/sfc/nic.h | 5 + drivers/net/sfc/tx.c | 19 ++++ drivers/net/usb/asix.c | 4 + drivers/net/wireless/rt2x00/rt2400pci.c | 9 ++ drivers/net/wireless/rt2x00/rt2400pci.h | 1 drivers/net/wireless/rt2x00/rt2500pci.c | 9 ++ drivers/net/wireless/rt2x00/rt2500usb.c | 11 ++ drivers/net/wireless/rt2x00/rt2500usb.h | 17 ++-- drivers/net/wireless/rt2x00/rt2800pci.c | 9 ++ drivers/net/wireless/rt2x00/rt2800usb.c | 9 ++ drivers/net/wireless/rt2x00/rt61pci.c | 9 ++ drivers/net/wireless/rt2x00/rt61pci.h | 1 drivers/net/wireless/rt2x00/rt73usb.c | 9 ++ drivers/net/wireless/rt2x00/rt73usb.h | 3 drivers/platform/x86/asus-laptop.c | 8 +- drivers/platform/x86/asus-nb-wmi.c | 4 + drivers/rtc/rtc-rs5c348.c | 7 + drivers/rtc/rtc-twl.c | 5 + drivers/scsi/bnx2i/bnx2i_hwi.c | 3 drivers/scsi/hpsa.c | 3 drivers/scsi/mpt2sas/mpt2sas_base.c | 7 + drivers/spi/spi_fsl_spi.c | 6 + drivers/staging/comedi/drivers/das08.c | 2 drivers/staging/lirc/lirc_sir.c | 60 +++++++++++++++ drivers/staging/rtl8712/recv_linux.c | 7 - drivers/staging/speakup/main.c | 2 drivers/staging/vt6656/dpc.c | 2 drivers/staging/vt6656/rxtx.c | 38 ++++----- drivers/target/target_core_transport.c | 9 +- drivers/tty/serial/pch_uart.c | 21 +++-- drivers/usb/core/devices.c | 2 drivers/usb/core/hcd.c | 6 - drivers/usb/core/quirks.c | 4 + drivers/usb/host/ehci-q.c | 12 ++- drivers/usb/host/pci-quirks.c | 42 +++++++++- drivers/usb/host/pci-quirks.h | 1 drivers/usb/host/xhci-ring.c | 39 ++++++---- drivers/usb/host/xhci.c | 2 drivers/usb/serial/ftdi_sio.c | 22 +++++ drivers/usb/serial/ftdi_sio_ids.h | 29 +++++++ drivers/usb/serial/option.c | 6 + drivers/video/console/fbcon.c | 9 ++ drivers/watchdog/hpwdt.c | 3 fs/dcache.c | 4 - fs/ecryptfs/inode.c | 5 + fs/nfs/inode.c | 2 fs/nfs/nfs3proc.c | 2 fs/nfs/nfs4proc.c | 4 - fs/nfs/nfs4xdr.c | 3 fs/nfs/super.c | 2 fs/squashfs/super.c | 2 fs/stat.c | 2 include/asm-generic/mutex-xchg.h | 11 ++ include/linux/dcache.h | 2 include/linux/init_task.h | 12 ++- include/linux/kobject.h | 2 include/linux/ktime.h | 7 - include/linux/memory.h | 2 include/linux/netdevice.h | 2 include/linux/nfs_fs.h | 5 - include/linux/perf_event.h | 2 include/linux/sched.h | 5 + include/linux/time.h | 29 +++++++ include/net/sock.h | 2 include/trace/events/kmem.h | 4 - kernel/async.c | 13 ++- kernel/events/core.c | 62 ++++++++-------- kernel/exit.c | 16 ++++ kernel/sched.c | 32 ++++---- kernel/time/timekeeping.c | 36 ++++++++- kernel/workqueue.c | 34 +++----- mm/memory_hotplug.c | 16 ++-- mm/page_alloc.c | 2 net/atm/common.c | 1 net/atm/pvc.c | 1 net/bluetooth/hci_sock.c | 2 net/bluetooth/l2cap_sock.c | 1 net/bluetooth/rfcomm/sock.c | 1 net/bluetooth/rfcomm/tty.c | 2 net/core/dev.c | 14 ++- net/core/drop_monitor.c | 113 +++++++++++++++-------------- net/core/net_namespace.c | 4 - net/core/sock.c | 1 net/dccp/ccids/ccid3.c | 1 net/ipv4/ipmr.c | 14 +++ net/ipv4/tcp.c | 4 - net/ipv4/tcp_cong.c | 3 net/ipv4/tcp_output.c | 21 +++-- net/ipv6/addrconf.c | 4 - net/l2tp/l2tp_core.c | 3 net/l2tp/l2tp_core.h | 1 net/llc/af_llc.c | 3 net/netfilter/ipvs/ip_vs_ctl.c | 1 net/netlink/af_netlink.c | 4 - net/packet/af_packet.c | 1 net/rds/recv.c | 3 net/sched/act_gact.c | 14 ++- net/socket.c | 1 net/wireless/reg.c | 12 ++- sound/pci/ice1712/prodigy_hifi.c | 3 139 files changed, 1031 insertions(+), 544 deletions(-)
AceLan Kao (1):
asus-nb-wmi: add some video toggle keys
Al Cooper (1):
mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
Al Viro (1):
perf_event: Switch to internal refcount, fix race with close()
Alan Cox (3):
ahci: Add alternate identifier for the 88SE9172
x86: Fix boot on Twinhead H12Y
pch_uart: Fix missing break for 16 byte fifo
Alan Stern (2):
USB: add device quirk for Joss Optical touchboard
USB: Fix race condition when removing host controllers
Alexey Khoroshilov (1):
net/core: Fix potential memory leak in dev_set_alias()
Amerigo Wang (1):
netconsole: remove a redundant netconsole_target_put()
Andi Kleen (1):
MCE: Fix vm86 handling for 32bit mce handler
Andreas Herrmann (1):
hwmon: (fam15h_power) Tweak runavg_range on resume
Anisse Astier (1):
Input: i8042 - disable mux on Toshiba C850D
Artem Bityutskiy (1):
UBI: fix a horrible memory deallocation bug
Atsushi Nemoto (1):
drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode
Ben Hutchings (4):
net: Allow driver to limit number of GSO segments per skb
sfc: Fix maximum number of TSO segments and minimum TX queue size
tcp: Apply device TSO segment limit earlier
ipv6: addrconf: Avoid calling netdevice notifiers with RCU read-side lock
Benoît Locher (1):
can: mcp251x: avoid repeated frame bug
Bjørn Mork (3):
USB: option: replace ZTE K5006-Z entry with vendor class rule
kobject: fix oops with "input0: bad kobj_uevent_env content in show_uevent()"
USB: ftdi_sio: do not claim CDC ACM function
Chris Boot (1):
e1000e: Disable ASPM L1 on 82574
Christopher Brannon (1):
Staging: speakup: fix an improperly-declared variable.
Corentin Chary (1):
asus-laptop: HRWS/HWRS typo
Dan Carpenter (1):
xhci: Fix a logical vs bitwise AND bug
Daniel J Blueman (1):
libata: Prevent interface errors with Seagate FreeAgent GoFlex
Dave Airlie (1):
fbcon: fix race condition between console lock and cursor timer (v1.1)
Douglas Bagnall (1):
media: Avoid sysfs oops when an rc_dev's raw device is absent
Eddie Wai (1):
SCSI: bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload
Eric Dumazet (2):
staging: r8712u: fix bug in r8712_recv_indicatepkt()
drop_monitor: dont sleep in atomic context
Francesco Ruggeri (1):
net: ipv4: ipmr_expire_timer causes crash when removing net namespace
Gertjan van Wingerde (2):
rt2x00: Fix word size of rt2500usb MAC_CSR19 register.
rt2x00: Fix rfkill polling prior to interface start.
Greg Kroah-Hartman (1):
Linux 3.0.44
Guenter Roeck (2):
hwmon: (twl4030-madc-hwmon) Initialize uninitialized structure elements
hwmon: (ads7871) Add 'name' sysfs attribute
Gustavo Padovan (1):
Bluetooth: Use USB_VENDOR_AND_INTERFACE() for Broadcom devices
Henrik Rydberg (1):
Bluetooth: Add support for Apple vendor-specific devices
Herton Ronaldo Krzesinski (1):
spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control
Hiroaki SHIMODA (1):
net_sched: gact: Fix potential panic in tcf_gact().
Horst Schirmeier (1):
USB: ftdi_sio: PID for NZR SEM 16+ USB
Ian Abbott (1):
staging: comedi: das08: Correct AO output for das08jr-16-ao
Ira W. Snyder (1):
can: janz-ican3: fix support for older hardware revisions
Jarod Wilson (1):
media: lirc_sir: make device registration work
Jianguo Wu (1):
mm/ia64: fix a memory block size bug
John Stultz (3):
time: Improve sanity checking of timekeeping inputs
time: Avoid making adjustments if we haven't accumulated anything
time: Move ktime_t overflow checking into timespec_valid_strict
Keng-Yu Lin (1):
Intel xhci: Only switch the switchable ports
Kenth Eriksson (1):
spi/mpc83xx: fix NULL pdata dereference bug
Kevin Hilman (1):
drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe
Konrad Rzeszutek Wilk (1):
xen/boot: Disable NUMA for PV guests.
Lai Jiangshan (1):
workqueue: UNBOUND -> REBIND morphing in rebind_workers() should be atomic
Lauri Hintsala (1):
mmc: mxs-mmc: fix deadlock in SDIO IRQ case
Li Haifeng (1):
mm/page_alloc: fix the page address of higher page's buddy calculation
Li Zhong (1):
Fix a dead loop in async_synchronize_full()
Linus Torvalds (1):
vfs: make O_PATH file descriptors usable for 'fstat()'
Luis R. Rodriguez (1):
cfg80211: fix possible circular lock on reg_regdb_search()
Malcolm Priestley (1):
staging: vt6656: [BUG] - Failed connection, incorrect endian.
Manoj Iyer (2):
xhci: Recognize USB 3.0 devices as superspeed at powerup
Bluetooth: btusb: Add vendor specific ID (0a5c:21f4) BCM20702A0
Marc Kleine-Budde (1):
can: ti_hecc: fix oops during rmmod
Mathias Krause (11):
atm: fix info leak in getsockopt(SO_ATMPVC)
atm: fix info leak via getsockname()
Bluetooth: HCI - Fix info leak in getsockopt(HCI_FILTER)
Bluetooth: HCI - Fix info leak via getsockname()
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)
Bluetooth: RFCOMM - Fix info leak via getsockname()
Bluetooth: L2CAP - Fix info leak via getsockname()
llc: fix info leak via getsockname()
dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
net: fix info leak in compat dev_ifconf()
Matteo Frigo (1):
ALSA: ice1724: Use linear scale for AK4396 volume control.
Matthew Garrett (1):
xhci: Make handover code more robust
Matthew Leach (1):
ARM: 7532/1: decompressor: reset SCTLR.TRE for VMSA ARMv7 cores
Mel Gorman (1):
Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts
Miklos Szeredi (1):
vfs: dcache: use DCACHE_DENTRY_KILLED instead of DCACHE_DISCONNECTED in d_kill()
Moiz Sonasath (1):
usb: host: xhci: fix compilation error for non-PCI based stacks
Neil Horman (3):
drop_monitor: fix sleeping in invalid context warning
drop_monitor: Make updating data->skb smp safe
drop_monitor: prevent init path from scheduling on the wrong cpu
NeilBrown (1):
md: Don't truncate size at 4TB for RAID0 and Linear
Nicholas Bellinger (1):
target: Fix ->data_length re-assignment bug with SCSI overflow
Nicolas Ferre (2):
dmaengine: at_hdmac: fix comment in atc_prep_slave_sg()
dmaengine: at_hdmac: check that each sg data length is non-null
Pablo Neira Ayuso (1):
netlink: fix possible spoofing from non-root processes
Pavankumar Kondeti (1):
EHCI: Update qTD next pointer in QH overlay region during unlink
Peter Zijlstra (1):
sched: Fix race in task_group()
Phillip Lougher (1):
Squashfs: fix mount time sanity check for corrupted superblock
Rafael J. Wysocki (2):
PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set PM / Runtime: Clear power.deferred_resume on success in rpm_suspend()
Robin Holt (1):
drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources
Rustad, Mark D (1):
net: Statically initialize init_net.dev_base_head
Sarah Sharp (1):
xhci: Fix bug after deq ptr set to link TRB.
Shawn Guo (1):
mmc: sdhci-esdhc: break out early if clock is 0
Stephen M. Cameron (2):
cciss: fix handling of protocol error
SCSI: hpsa: fix handling of protocol error
Subhash Jadavani (1):
mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode
Søren Holm (1):
asix: Support DLink DUB-E100 H/W Ver C1
Tejun Heo (2):
workqueue: reimplement work_on_cpu() using system_wq cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU
Tetsuyuki Kobayashi (1):
ARM: fix bad applied patch for arch/arm/Kconfig of stable 3.0.y tree.
Thomas Renninger (1):
cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression
Tomoya MORINAGA (2):
pch_uart: Fix rx error interrupt setting issue
pch_uart: Fix parity setting issue
Toshi Kani (1):
hpwdt: Fix kdump issue in hpwdt
Trond Myklebust (2):
NFS: Fix the initialisation of the readdir 'cookieverf' array
NFS: Fix a problem with the legacy binary mount code
Tvrtko Ursulin (1):
drm/radeon/kms: extend the Fujitsu D3003-S2 board connector quirk to cover later silicon stepping
Tyler Hicks (1):
eCryptfs: Copy up attributes of the lower target inode after rename
Wang Xingchao (1):
drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
Weiping Pan (1):
rds: set correct msg_namelen
Wen Congyang (1):
tracing: Don't call page_to_pfn() if page is NULL
Weston Andros Adamson (1):
NFS: return error from decode_getfh in decode open
Will Deacon (2):
mutex: Place lock in contended state after fastpath_lock failure
ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
Wu Fengguang (1):
isdnloop: fix and simplify isdnloop_init()
Yasunori Goto (1):
sched: Fix ancient race in do_exit()
[email protected] (1):
af_packet: remove BUG statement in tpacket_destruct_skb
qiuxishi (1):
memory hotplug: fix section info double registration bug
[email protected] (1):
SCSI: mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA
[email protected] (1):
l2tp: avoid to use synchronize_rcu in tunnel free function
Éric Piel (1):
USB: ftdi-sio: add support for more Physik Instrumente devices
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 43 +SUBLEVEL = 44 EXTRAVERSION = NAME = Sneaky Weasel
arch/alpha/include/asm/atomic.h +2 -2
@@ -14,8 +14,8 @@*/ -#define ATOMIC_INIT (i) ( (atomic_t) { (i) } ) -#define ATOMIC64_INIT (i) ( (atomic64_t) { (i) } ) +#define ATOMIC_INIT (i) { (i) } +#define ATOMIC64_INIT (i) { (i) }#define atomic_read (v) (*(volatile int *)&(v)->counter)#define atomic64_read (v) (*(volatile long *)&(v)->counter)
arch/arm/Kconfig +26 -26
64 lines not on this page · raw message
arch/arm/boot/compressed/head.S +1 -0
@@ -539,6 +539,7 @@ __armv7_mmu_cache_on: mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs #endif mrc p15, 0, r0, c1, c0, 0 @ read control reg + bic r0, r0, #1 << 28 @ clear SCTLR.TRE orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement orr r0, r0, #0x003c @ write buffer #ifdef CONFIG_MMU
arch/arm/include/asm/mutex.h +4 -115
125 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce.c +8 -1
@@ -451,6 +451,13 @@ static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)if (regs && (m->mcgstatus & (MCG_STATUS_RIPV |MCG_STATUS_EIPV ))) { m->ip = regs->ip; m->cs = regs->cs; +/* +* When in VM86 mode make the cs look like ring 3 +* always. This is a lie, but it's better than passing +* the additional vm86 bit around everywhere. +*/ +if (v8086_mode (regs)) + m->cs |=3 ; }else { m->ip =0 ; m->cs =0 ;
@@ -988,6 +995,7 @@ void do_machine_check(struct pt_regs *regs, long error_code)*/ add_taint (TAINT_MACHINE_CHECK ); +mce_get_rip (&m, regs); severity =mce_severity (&m, tolerant,NULL );/*
@@ -1026,7 +1034,6 @@ void do_machine_check(struct pt_regs *regs, long error_code)if (severity ==MCE_AO_SEVERITY &&mce_usable_address (&m))mce_ring_add (m.addr >>PAGE_SHIFT ); -mce_get_rip (&m, regs);mce_log (&m);if (severity > worst) {
arch/x86/pci/fixup.c +17 -0
@@ -521,3 +521,20 @@ static void sb600_disable_hpet_bar(struct pci_dev *dev) } }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_ATI ,0x4385 , sb600_disable_hpet_bar); + +/* +* Twinhead H12Y needs us to block out a region otherwise we map devices +* there and any access kills the box. +* +* See: https://bugzilla.kernel.org/show_bug.cgi?id=10231 +* +* Match off the LPC and svid/sdid (older kernels lose the bridge subvendor) +*/ +static void __devinit twinhead_reserve_killing_zone (struct pci_dev *dev) +{ +if (dev->subsystem_vendor ==0x14FF && dev->subsystem_device ==0xA003 ) { +pr_info ("Reserving memory on Twinhead H12Y\n" ); +request_mem_region (0xFFB00000 ,0x100000 ,"twinhead" ); + } +} +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x27B9 , twinhead_reserve_killing_zone);
arch/x86/xen/setup.c +4 -0
@@ -15,6 +15,7 @@#include <asm/e820.h> #include <asm/setup.h> #include <asm/acpi.h> +#include <asm/numa.h> #include <asm/xen/hypervisor.h> #include <asm/xen/hypercall.h>
@@ -463,4 +464,7 @@ void __init xen_arch_setup(void) boot_option_idle_override =IDLE_HALT ;fiddle_vdso (); +#ifdef CONFIG_NUMA + numa_off =1 ; +#endif }
drivers/acpi/processor_core.c +4 -2
@@ -188,10 +188,12 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)* Processor (CPU3, 0x03, 0x00000410, 0x06) {} * } * -* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with acpi id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found. * Return -1 for other CPU's handle. */ -if (acpi_id ==0 ) +if (nr_cpu_ids <=1 && acpi_id ==0 )return acpi_id;else return apic_id;
drivers/ata/ahci.c +2 -0
@@ -394,6 +394,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ { PCI_DEVICE(0x1b4b, 0x917a), .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ + { PCI_DEVICE(0x1b4b, 0x9192), + .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ { PCI_DEVICE(0x1b4b, 0x91a3), .driver_data = board_ahci_yes_fbs },
drivers/ata/libata-core.c +1 -0
@@ -4138,6 +4138,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {/* Devices which aren't very happy with higher link speeds */ { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, + { "Seagate FreeAgent GoFlex", NULL, ATA_HORKAGE_1_5_GBPS, },/* * Devices which choke on SETXFER. Applies only if both the
drivers/base/power/runtime.c +3 -2
@@ -360,7 +360,6 @@ static int rpm_suspend(struct device *dev, int rpmflags) goto repeat; } - dev->power.deferred_resume = false;if (dev->power.no_callbacks) goto no_callback;/* Assume success. */
@@ -420,6 +419,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)wake_up_all (&dev->power.wait_queue);if (dev->power.deferred_resume) { + dev->power.deferred_resume = false;rpm_resume (dev,0 ); retval = -EAGAIN ; goto out;
@@ -533,6 +533,7 @@ static int rpm_resume(struct device *dev, int rpmflags) || dev->parent->power.runtime_status == RPM_ACTIVE) {atomic_inc (&dev->parent->power.child_count);spin_unlock (&dev->parent->power.lock); + retval =1 ; goto no_callback;/* Assume success. */ }spin_unlock (&dev->parent->power.lock);
@@ -610,7 +611,7 @@ static int rpm_resume(struct device *dev, int rpmflags) }wake_up_all (&dev->power.wait_queue); -if (!retval) +if (retval >=0 )rpm_idle (dev,RPM_ASYNC ); out:
drivers/block/cciss_scsi.c +1 -0
@@ -795,6 +795,7 @@ static void complete_scsi_command(CommandList_struct *c, int timeout, }break ;case CMD_PROTOCOL_ERR : + cmd->result =DID_ERROR <<16 ;dev_warn (&h->pdev->dev,"%p has protocol error\n" , c);break ;
drivers/bluetooth/btusb.c +6 -4
@@ -60,6 +60,9 @@ static struct usb_device_id btusb_table[] = {/* Generic Bluetooth USB device */ { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, +/* Apple-specific (Broadcom) devices */ + { USB_VENDOR_AND_INTERFACE_INFO(0x05ac, 0xff, 0x01, 0x01) }, +/* Broadcom SoftSailing reporting vendor specific */ { USB_DEVICE(0x0a5c, 0x21e1) },
@@ -102,15 +105,14 @@ static struct usb_device_id btusb_table[] = {/* Broadcom BCM20702A0 */ { USB_DEVICE(0x0489, 0xe042) }, - { USB_DEVICE(0x0a5c, 0x21e3) }, - { USB_DEVICE(0x0a5c, 0x21e6) }, - { USB_DEVICE(0x0a5c, 0x21e8) }, - { USB_DEVICE(0x0a5c, 0x21f3) }, { USB_DEVICE(0x413c, 0x8197) },/* Foxconn - Hon Hai */ { USB_DEVICE(0x0489, 0xe033) }, +/*Broadcom devices with vendor specific id */ + { USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) }, + { } /* Terminating entry */ };
drivers/cpufreq/powernow-k8.c +34 -29
114 lines not on this page · raw message
drivers/dma/at_hdmac.c +12 -1
@@ -674,7 +674,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, flags);if (unlikely (!atslave || !sg_len)) { -dev_dbg (chan2dev (chan),"prep_dma_memcpy: length is zero!\n" ); +dev_dbg (chan2dev (chan),"prep_slave_sg: sg length is zero!\n" );return NULL ; }
@@ -702,6 +702,11 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, mem =sg_dma_address (sg); len =sg_dma_len (sg); +if (unlikely (!len)) { +dev_dbg (chan2dev (chan), +"prep_slave_sg: sg(%d) data length is zero\n" , i); + goto err; + } mem_width =2 ;if (unlikely (mem &3 || len &3 )) mem_width =0 ;
@@ -736,6 +741,11 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, mem =sg_dma_address (sg); len =sg_dma_len (sg); +if (unlikely (!len)) { +dev_dbg (chan2dev (chan), +"prep_slave_sg: sg(%d) data length is zero\n" , i); + goto err; + } mem_width =2 ;if (unlikely (mem &3 || len &3 )) mem_width =0 ;
@@ -769,6 +779,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, err_desc_get:dev_err (chan2dev (chan),"not enough descriptors available\n" ); +err:atc_desc_put (atchan, first);return NULL ; }
drivers/gpu/drm/i915/intel_hdmi.c +1 -1
@@ -160,7 +160,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode)u32 temp;u32 enable_bits =SDVO_ENABLE ; -if (intel_hdmi->has_audio) +if (intel_hdmi->has_audio || mode !=DRM_MODE_DPMS_ON ) enable_bits |=SDVO_AUDIO_ENABLE ; temp =I915_READ (intel_hdmi->sdvox_reg);
drivers/gpu/drm/radeon/radeon_atombios.c +1 -1
@@ -488,7 +488,7 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, }/* Fujitsu D3003-S2 board lists DVI-I as DVI-D and VGA */ -if ((dev->pdev->device ==0x9802 ) && +if (((dev->pdev->device ==0x9802 ) || (dev->pdev->device ==0x9806 )) && (dev->pdev->subsystem_vendor ==0x1734 ) && (dev->pdev->subsystem_device ==0x11bd )) {if (*connector_type ==DRM_MODE_CONNECTOR_VGA ) {
drivers/hwmon/ads7871.c +9 -0
@@ -133,6 +133,12 @@ static ssize_t show_voltage(struct device *dev, } } +static ssize_t ads7871_show_name (struct device *dev, +struct device_attribute *devattr,char *buf) +{ +return sprintf (buf,"%s\n" ,to_spi_device (dev)->modalias); +} + static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_voltage, NULL, 0); static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_voltage, NULL, 1); static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_voltage, NULL, 2);
@@ -142,6 +148,8 @@ static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_voltage, NULL, 5); static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_voltage, NULL, 6); static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_voltage, NULL, 7); +static DEVICE_ATTR(name, S_IRUGO, ads7871_show_name, NULL); +static struct attribute *ads7871_attributes[] = { &sensor_dev_attr_in0_input.dev_attr.attr, &sensor_dev_attr_in1_input.dev_attr.attr,
@@ -151,6 +159,7 @@ static struct attribute *ads7871_attributes[] = { &sensor_dev_attr_in5_input.dev_attr.attr, &sensor_dev_attr_in6_input.dev_attr.attr, &sensor_dev_attr_in7_input.dev_attr.attr, + &dev_attr_name.attr, NULL };
drivers/hwmon/fam15h_power.c +13 -2
@@ -128,12 +128,12 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)* counter saturations resulting in bogus power readings. * We correct this value ourselves to cope with older BIOSes. */ -static DEFINE_PCI_DEVICE_TABLE (affected_device) = { +static const struct pci_device_id affected_device[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_NB_F4 ) }, {0 } }; -static void __devinit tweak_runavg_range (struct pci_dev *pdev) +static void tweak_runavg_range (struct pci_dev *pdev) {u32 val;
@@ -157,6 +157,16 @@ static void __devinit tweak_runavg_range(struct pci_dev *pdev) REG_TDP_RUNNING_AVERAGE, val); } +#ifdef CONFIG_PM +static int fam15h_power_resume (struct pci_dev *pdev) +{ +tweak_runavg_range (pdev); +return 0 ; +} +#else +#define fam15h_power_resume NULL +#endif +static void __devinit fam15h_power_init_data (struct pci_dev *f4,struct fam15h_power_data *data) {
@@ -255,6 +265,7 @@ static struct pci_driver fam15h_power_driver = { .id_table = fam15h_power_id_table, .probe = fam15h_power_probe, .remove = __devexit_p(fam15h_power_remove), + .resume = fam15h_power_resume, };static int __init fam15h_power_init (void )
drivers/hwmon/twl4030-madc-hwmon.c +5 -4
@@ -44,12 +44,13 @@ static ssize_t madc_read(struct device *dev, struct device_attribute *devattr, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); -struct twl4030_madc_request req; +struct twl4030_madc_request req = { + .channels =1 << attr->index, + .method =TWL4030_MADC_SW2 , + .type =TWL4030_MADC_WAIT , + };long val; - req.channels = (1 << attr->index); - req.method =TWL4030_MADC_SW2 ; - req.func_cb =NULL ; val =twl4030_madc_conversion (&req);if (val <0 )return val;
drivers/input/serio/i8042-x86ia64io.h +6 -0
@@ -335,6 +335,12 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { }, { .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"TOSHIBA" ), + DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"), + }, + }, + { + .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"ALIENWARE" ), DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), },
drivers/isdn/isdnloop/isdnloop.c +0 -12
@@ -16,7 +16,6 @@#include <linux/sched.h> #include "isdnloop.h" -static char *revision ="$Revision: 1.11.6.7 $" ;static char *isdnloop_id ="loop0" ;MODULE_DESCRIPTION ("ISDN4Linux: Pseudo Driver that simulates an ISDN card" );
@@ -1494,17 +1493,6 @@ isdnloop_addcard(char *id1)static int __init isdnloop_init (void ) { -char *p; -char rev[10 ]; - -if ((p =strchr (revision,':' ))) { -strcpy (rev, p +1 ); - p =strchr (rev,'$' ); - *p =0 ; - }else -strcpy (rev," ??? " ); -printk (KERN_NOTICE "isdnloop-ISDN-driver Rev%s\n" , rev); -if (isdnloop_id)return (isdnloop_addcard (isdnloop_id));
drivers/md/md.c +6 -3
@@ -1096,8 +1096,11 @@ static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version ret =0 ; } rdev->sectors = rdev->sb_start; -/* Limit to 4TB as metadata cannot record more than that */ -if (rdev->sectors >= (2ULL <<32 )) +/* Limit to 4TB as metadata cannot record more than that. +* (not needed for Linear and RAID0 as metadata doesn't +* record this size) +*/ +if (rdev->sectors >= (2ULL <<32 ) && sb->level >=1 ) rdev->sectors = (2ULL <<32 ) -2 ;if (rdev->sectors < ((sector_t )sb->size) *2 && sb->level >=1 )
@@ -1379,7 +1382,7 @@ super_90_rdev_size_change(mdk_rdev_t *rdev, sector_t num_sectors)/* Limit to 4TB as metadata cannot record more than that. * 4TB == 2^32 KB, or 2*2^32 sectors. */ -if (num_sectors >= (2ULL <<32 )) +if (num_sectors >= (2ULL <<32 ) && rdev->mddev->level >=1 ) num_sectors = (2ULL <<32 ) -2 ;md_super_write (rdev->mddev, rdev, rdev->sb_start, rdev->sb_size, rdev->sb_page);
drivers/media/rc/rc-main.c +3 -2
@@ -772,10 +772,11 @@ static ssize_t show_protocols(struct device *device,if (dev->driver_type ==RC_DRIVER_SCANCODE ) { enabled = dev->rc_map.rc_type; allowed = dev->allowed_protos; - }else { + }else if (dev->raw) { enabled = dev->raw->enabled_protocols; allowed =ir_raw_get_allowed_protocols (); - } + }else +return -ENODEV ; IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", (long long)allowed,
drivers/misc/sgi-xp/xpc_uv.c +65 -19
129 lines not on this page · raw message
drivers/mmc/core/sd.c +3 -3
@@ -306,6 +306,9 @@ static int mmc_read_switch(struct mmc_card *card) goto out; } +if (status[13 ] &UHS_SDR50_BUS_SPEED ) + card->sw_caps.hs_max_dtr =50000000 ; +if (card->scr.sda_spec3) { card->sw_caps.sd3_bus_mode = status[13 ];
@@ -348,9 +351,6 @@ static int mmc_read_switch(struct mmc_card *card) } card->sw_caps.sd3_curr_limit = status[7 ]; - }else { -if (status[13 ] &0x02 ) - card->sw_caps.hs_max_dtr =50000000 ; } out:
drivers/mmc/host/mxs-mmc.c +2 -2
@@ -278,11 +278,11 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)writel (stat &MXS_MMC_IRQ_BITS , host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR ); +spin_unlock (&host->lock); +if ((stat &BM_SSP_CTRL1_SDIO_IRQ ) && (stat &BM_SSP_CTRL1_SDIO_IRQ_EN ))mmc_signal_sdio_irq (host->mmc); -spin_unlock (&host->lock); -if (stat &BM_SSP_CTRL1_RESP_TIMEOUT_IRQ ) cmd->error = -ETIMEDOUT ;else if (stat &BM_SSP_CTRL1_RESP_ERR_IRQ )
drivers/mmc/host/sdhci-esdhc.h +3 -3
@@ -48,14 +48,14 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock)int div =1 ;u32 temp; +if (clock ==0 ) + goto out; + temp =sdhci_readl (host,ESDHC_SYSTEM_CONTROL ); temp &= ~(ESDHC_CLOCK_IPGEN |ESDHC_CLOCK_HCKEN |ESDHC_CLOCK_PEREN |ESDHC_CLOCK_MASK );sdhci_writel (host, temp,ESDHC_SYSTEM_CONTROL ); -if (clock ==0 ) - goto out; -while (host->max_clk / pre_div /16 > clock && pre_div <256 ) pre_div *=2 ;
drivers/mmc/host/sdhci.c +3 -2
@@ -2515,8 +2515,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc_card_is_removable(mmc)) mmc->caps |=MMC_CAP_NEEDS_POLL ; -/* UHS-I mode(s) supported by the host controller. */ -if (host->version >=SDHCI_SPEC_300 ) +/* Any UHS-I mode in caps implies SDR12 and SDR25 support. */ +if (caps[1 ] & (SDHCI_SUPPORT_SDR104 |SDHCI_SUPPORT_SDR50 | +SDHCI_SUPPORT_DDR50 )) mmc->caps |=MMC_CAP_UHS_SDR12 |MMC_CAP_UHS_SDR25 ;/* SDR104 supports also implies SDR50 support */
drivers/mtd/ubi/vtbl.c +2 -2
@@ -356,7 +356,7 @@ retry:*/ err =ubi_scan_add_used (ubi, si, new_seb->pnum, new_seb->ec, vid_hdr,0 ); -kfree (new_seb); +kmem_cache_free (si->scan_leb_slab, new_seb);ubi_free_vid_hdr (ubi, vid_hdr);return err;
@@ -369,7 +369,7 @@ write_error:list_add (&new_seb->u.list, &si->erase); goto retry; } -kfree (new_seb); +kmem_cache_free (si->scan_leb_slab, new_seb); out_free:ubi_free_vid_hdr (ubi, vid_hdr);return err;
drivers/net/can/janz-ican3.c +1 -3
@@ -1249,7 +1249,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id)*/ static int ican3_reset_module (struct ican3_dev *mod) { -u8 val =1 << mod->num;unsigned long start;u8 runold, runnew;
@@ -1263,8 +1262,7 @@ static int ican3_reset_module(struct ican3_dev *mod) runold =ioread8 (mod->dpm +TARGET_RUNNING );/* reset the module */ -iowrite8 (val, &mod->ctrl->reset_assert); -iowrite8 (val, &mod->ctrl->reset_deassert); +iowrite8 (0x00 , &mod->dpmctrl->hwreset);/* wait until the module has finished resetting and is running */ start = jiffies;
drivers/net/can/mcp251x.c +10 -1
@@ -83,6 +83,11 @@#define INSTRUCTION_LOAD_TXB (n) (0x40 + 2 * (n))#define INSTRUCTION_READ_RXB (n) (((n) == 0) ? 0x90 : 0x94)#define INSTRUCTION_RESET 0xC0 +#define RTS_TXB0 0x01 +#define RTS_TXB1 0x02 +#define RTS_TXB2 0x04 +#define INSTRUCTION_RTS (n) (0x80 | ((n) & 0x07)) +/* MPC251x registers */ #define CANSTAT 0x0e
@@ -397,6 +402,7 @@ static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,static void mcp251x_hw_tx (struct spi_device *spi,struct can_frame *frame,int tx_buf_idx) { +struct mcp251x_priv *priv =dev_get_drvdata (&spi->dev);u32 sid, eid, exide, rtr;u8 buf[SPI_TRANSFER_BUF_LEN ];
@@ -418,7 +424,10 @@ static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame, buf[TXBDLC_OFF ] = (rtr <<DLC_RTR_SHIFT ) | frame->can_dlc;memcpy (buf +TXBDAT_OFF , frame->data, frame->can_dlc);mcp251x_hw_tx_frame (spi, buf, frame->can_dlc, tx_buf_idx); -mcp251x_write_reg (spi,TXBCTRL (tx_buf_idx),TXBCTRL_TXREQ ); + +/* use INSTRUCTION_RTS, to avoid "repeated frame problem" */ + priv->spi_tx_buf[0 ] =INSTRUCTION_RTS (1 << tx_buf_idx); +mcp251x_spi_trans (priv->spi,1 ); } static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
drivers/net/can/ti_hecc.c +1 -1
@@ -969,12 +969,12 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)struct net_device *ndev =platform_get_drvdata (pdev);struct ti_hecc_priv *priv =netdev_priv (ndev); +unregister_candev (ndev);clk_disable (priv->clk);clk_put (priv->clk); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );iounmap (priv->base);release_mem_region (res->start,resource_size (res)); -unregister_candev (ndev);free_candev (ndev);platform_set_drvdata (pdev,NULL );
drivers/net/e1000e/82571.c +2 -1
@@ -2088,7 +2088,8 @@ struct e1000_info e1000_82574_info = { | FLAG_HAS_AMT | FLAG_HAS_CTRLEXT_ON_LOAD, .flags2 =FLAG2_CHECK_PHY_HANG - | FLAG2_DISABLE_ASPM_L0S, + |FLAG2_DISABLE_ASPM_L0S + | FLAG2_DISABLE_ASPM_L1, .pba = 32, .max_hw_frame_size = DEFAULT_JUMBO, .get_variants = e1000_get_variants_82571,
drivers/net/netconsole.c +0 -1
@@ -652,7 +652,6 @@ static int netconsole_netdev_event(struct notifier_block *this, flags);dev_put (nt->np.dev); nt->np.dev =NULL ; -netconsole_target_put (nt); } nt->enabled =0 ; stopped = true;
drivers/net/sfc/efx.c +6 -0
@@ -1383,6 +1383,11 @@ static int efx_probe_all(struct efx_nic *efx) goto fail2; } +BUILD_BUG_ON (EFX_DEFAULT_DMAQ_SIZE <EFX_RXQ_MIN_ENT ); +if (WARN_ON (EFX_DEFAULT_DMAQ_SIZE <EFX_TXQ_MIN_ENT (efx))) { + rc = -EINVAL ; + goto fail3; + } efx->rxq_entries = efx->txq_entries =EFX_DEFAULT_DMAQ_SIZE ; rc =efx_probe_channels (efx);if (rc)
@@ -1942,6 +1947,7 @@ static int efx_register_netdev(struct efx_nic *efx) net_dev->irq = efx->pci_dev->irq; net_dev->netdev_ops = &efx_netdev_ops;SET_ETHTOOL_OPS (net_dev, &efx_ethtool_ops); + net_dev->gso_max_segs =EFX_TSO_MAX_SEGS ;/* Clear MAC statistics */ efx->mac_op->update_stats (efx);
drivers/net/sfc/efx.h +10 -4
@@ -38,6 +38,7 @@ extern netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb);extern void efx_xmit_done (struct efx_tx_queue *tx_queue,unsigned int index);extern int efx_setup_tc (struct net_device *net_dev,u8 num_tc); +extern unsigned int efx_tx_max_skb_descs (struct efx_nic *efx);/* RX */ extern int efx_probe_rx_queue (struct efx_rx_queue *rx_queue);
@@ -60,10 +61,15 @@ extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue);#define EFX_MAX_EVQ_SIZE 16384UL#define EFX_MIN_EVQ_SIZE 512UL -/* The smallest [rt]xq_entries that the driver supports. Callers of -* efx_wake_queue() assume that they can subsequently send at least one -* skb. Falcon/A1 may require up to three descriptors per skb_frag. */ -#define EFX_MIN_RING_SIZE (roundup_pow_of_two(2 * 3 * MAX_SKB_FRAGS)) +/* Maximum number of TCP segments we support for soft-TSO */ +#define EFX_TSO_MAX_SEGS 100 + +/* The smallest [rt]xq_entries that the driver supports. RX minimum +* is a bit arbitrary. For TX, we must have space for at least 2 +* TSO skbs. +*/ +#define EFX_RXQ_MIN_ENT 128U +#define EFX_TXQ_MIN_ENT (efx) (2 * efx_tx_max_skb_descs(efx))/* Filters */ extern int efx_probe_filters (struct efx_nic *efx);
drivers/net/sfc/ethtool.c +11 -5
@@ -677,21 +677,27 @@ static int efx_ethtool_set_ringparam(struct net_device *net_dev, struct ethtool_ringparam *ring) {struct efx_nic *efx =netdev_priv (net_dev); +u32 txq_entries;if (ring->rx_mini_pending || ring->rx_jumbo_pending || ring->rx_pending >EFX_MAX_DMAQ_SIZE || ring->tx_pending >EFX_MAX_DMAQ_SIZE )return -EINVAL ; -if (ring->rx_pending <EFX_MIN_RING_SIZE || - ring->tx_pending <EFX_MIN_RING_SIZE ) { +if (ring->rx_pending <EFX_RXQ_MIN_ENT ) {netif_err (efx, drv, efx->net_dev, -"TX and RX queues cannot be smaller than %ld\n" , -EFX_MIN_RING_SIZE ); +"RX queues cannot be smaller than %u\n" , +EFX_RXQ_MIN_ENT );return -EINVAL ; } -return efx_realloc_channels (efx, ring->rx_pending, ring->tx_pending); + txq_entries =max (ring->tx_pending,EFX_TXQ_MIN_ENT (efx)); +if (txq_entries != ring->tx_pending) +netif_warn (efx, drv, efx->net_dev, +"increasing TX queue size to minimum of %u\n" , + txq_entries); + +return efx_realloc_channels (efx, ring->rx_pending, txq_entries); } static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
drivers/net/sfc/nic.h +5 -0
@@ -65,6 +65,11 @@ enum {#define FALCON_GMAC_LOOPBACKS \ (1 << LOOPBACK_GMAC) +/* Alignment of PCIe DMA boundaries (4KB) */ +#define EFX_PAGE_SIZE 4096 +/* Size and alignment of buffer table entries (same) */ +#define EFX_BUF_SIZE EFX_PAGE_SIZE +/** * struct falcon_board_type - board operations and type information * @id: Board type id, as found in NVRAM
drivers/net/sfc/tx.c +19 -0
@@ -115,6 +115,25 @@ efx_max_tx_len(struct efx_nic *efx, dma_addr_t dma_addr)return len; } +unsigned int efx_tx_max_skb_descs (struct efx_nic *efx) +{ +/* Header and payload descriptor for each output segment, plus +* one for every input fragment boundary within a segment +*/ +unsigned int max_descs =EFX_TSO_MAX_SEGS *2 +MAX_SKB_FRAGS ; + +/* Possibly one more per segment for the alignment workaround */ +if (EFX_WORKAROUND_5391 (efx)) + max_descs +=EFX_TSO_MAX_SEGS ; + +/* Possibly more for PCIe page boundaries within input fragments */ +if (PAGE_SIZE >EFX_PAGE_SIZE ) + max_descs += max_t(unsigned int, MAX_SKB_FRAGS, +DIV_ROUND_UP (GSO_MAX_SIZE ,EFX_PAGE_SIZE )); + +return max_descs; +} +/* * Add a socket buffer to a TX queue *
drivers/net/usb/asix.c +4 -0
@@ -1537,6 +1537,10 @@ static const struct usb_device_id products [] = { USB_DEVICE (0x2001, 0x3c05), .driver_info = (unsigned long ) &ax88772_info, }, { +// DLink DUB-E100 H/W Ver C1 +USB_DEVICE (0x2001 ,0x1a02 ), + .driver_info = (unsigned long) &ax88772_info, +}, {// Linksys USB1000 USB_DEVICE (0x1737 ,0x0039 ), .driver_info = (unsigned long) &ax88178_info,
drivers/net/wireless/rt2x00/rt2400pci.c +9 -0
@@ -1618,6 +1618,7 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)static int rt2400pci_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Allocate eeprom data.
@@ -1631,6 +1632,14 @@ static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00pci_register_read (rt2x00dev,GPIOCSR , ®); +rt2x00_set_field32 (®,GPIOCSR_BIT8 ,1 ); +rt2x00pci_register_write (rt2x00dev,GPIOCSR , reg); + +/* * Initialize hw specifications. */ retval =rt2400pci_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt2400pci.h +1 -0
@@ -670,6 +670,7 @@#define GPIOCSR_BIT5 FIELD32(0x00000020)#define GPIOCSR_BIT6 FIELD32(0x00000040)#define GPIOCSR_BIT7 FIELD32(0x00000080) +#define GPIOCSR_BIT8 FIELD32(0x00000100)/* * BBPPCSR: BBP Pin control register.
drivers/net/wireless/rt2x00/rt2500pci.c +9 -0
@@ -1936,6 +1936,7 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)static int rt2500pci_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Allocate eeprom data.
@@ -1949,6 +1950,14 @@ static int rt2500pci_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00pci_register_read (rt2x00dev,GPIOCSR , ®); +rt2x00_set_field32 (®,GPIOCSR_DIR0 ,1 ); +rt2x00pci_register_write (rt2x00dev,GPIOCSR , reg); + +/* * Initialize hw specifications. */ retval =rt2500pci_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt2500usb.c +10 -1
@@ -283,7 +283,7 @@ static int rt2500usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)u16 reg;rt2500usb_register_read (rt2x00dev,MAC_CSR19 , ®); -return rt2x00_get_field32 (reg,MAC_CSR19_BIT7 ); +return rt2x00_get_field16 (reg,MAC_CSR19_BIT7 ); }#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -1768,6 +1768,7 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)static int rt2500usb_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u16 reg;/* * Allocate eeprom data.
@@ -1781,6 +1782,14 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2500usb_register_read (rt2x00dev,MAC_CSR19 , ®); +rt2x00_set_field16 (®,MAC_CSR19_BIT8 ,0 ); +rt2500usb_register_write (rt2x00dev,MAC_CSR19 , reg); + +/* * Initialize hw specifications. */ retval =rt2500usb_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt2500usb.h +9 -8
@@ -189,14 +189,15 @@* MAC_CSR19: GPIO control register. */ #define MAC_CSR19 0x0426 -#define MAC_CSR19_BIT0 FIELD32(0x0001) -#define MAC_CSR19_BIT1 FIELD32(0x0002) -#define MAC_CSR19_BIT2 FIELD32(0x0004) -#define MAC_CSR19_BIT3 FIELD32(0x0008) -#define MAC_CSR19_BIT4 FIELD32(0x0010) -#define MAC_CSR19_BIT5 FIELD32(0x0020) -#define MAC_CSR19_BIT6 FIELD32(0x0040) -#define MAC_CSR19_BIT7 FIELD32(0x0080) +#define MAC_CSR19_BIT0 FIELD16(0x0001) +#define MAC_CSR19_BIT1 FIELD16(0x0002) +#define MAC_CSR19_BIT2 FIELD16(0x0004) +#define MAC_CSR19_BIT3 FIELD16(0x0008) +#define MAC_CSR19_BIT4 FIELD16(0x0010) +#define MAC_CSR19_BIT5 FIELD16(0x0020) +#define MAC_CSR19_BIT6 FIELD16(0x0040) +#define MAC_CSR19_BIT7 FIELD16(0x0080) +#define MAC_CSR19_BIT8 FIELD16(0x0100)/* * MAC_CSR20: LED control register.
drivers/net/wireless/rt2x00/rt2800pci.c +9 -0
@@ -941,6 +941,7 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)static int rt2800pci_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Allocate eeprom data.
@@ -954,6 +955,14 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00pci_register_read (rt2x00dev,GPIO_CTRL_CFG , ®); +rt2x00_set_field32 (®,GPIO_CTRL_CFG_GPIOD_BIT2 ,1 ); +rt2x00pci_register_write (rt2x00dev,GPIO_CTRL_CFG , reg); + +/* * Initialize hw specifications. */ retval =rt2800_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt2800usb.c +9 -0
@@ -600,6 +600,7 @@ static int rt2800usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)static int rt2800usb_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Allocate eeprom data.
@@ -613,6 +614,14 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00usb_register_read (rt2x00dev,GPIO_CTRL_CFG , ®); +rt2x00_set_field32 (®,GPIO_CTRL_CFG_GPIOD_BIT2 ,1 ); +rt2x00usb_register_write (rt2x00dev,GPIO_CTRL_CFG , reg); + +/* * Initialize hw specifications. */ retval =rt2800_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt61pci.c +9 -0
@@ -2840,6 +2840,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)static int rt61pci_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Disable power saving.
@@ -2858,6 +2859,14 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00pci_register_read (rt2x00dev,MAC_CSR13 , ®); +rt2x00_set_field32 (®,MAC_CSR13_BIT13 ,1 ); +rt2x00pci_register_write (rt2x00dev,MAC_CSR13 , reg); + +/* * Initialize hw specifications. */ retval =rt61pci_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt61pci.h +1 -0
@@ -372,6 +372,7 @@ struct hw_pairwise_ta_entry {#define MAC_CSR13_BIT10 FIELD32(0x00000400)#define MAC_CSR13_BIT11 FIELD32(0x00000800)#define MAC_CSR13_BIT12 FIELD32(0x00001000) +#define MAC_CSR13_BIT13 FIELD32(0x00002000)/* * MAC_CSR14: LED control register.
drivers/net/wireless/rt2x00/rt73usb.c +9 -0
@@ -2177,6 +2177,7 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)static int rt73usb_probe_hw (struct rt2x00_dev *rt2x00dev) {int retval; +u32 reg;/* * Allocate eeprom data.
@@ -2190,6 +2191,14 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)return retval;/* +* Enable rfkill polling by setting GPIO direction of the +* rfkill switch GPIO pin correctly. +*/ +rt2x00usb_register_read (rt2x00dev,MAC_CSR13 , ®); +rt2x00_set_field32 (®,MAC_CSR13_BIT15 ,0 ); +rt2x00usb_register_write (rt2x00dev,MAC_CSR13 , reg); + +/* * Initialize hw specifications. */ retval =rt73usb_probe_hw_mode (rt2x00dev);
drivers/net/wireless/rt2x00/rt73usb.h +3 -0
@@ -282,6 +282,9 @@ struct hw_pairwise_ta_entry {#define MAC_CSR13_BIT10 FIELD32(0x00000400)#define MAC_CSR13_BIT11 FIELD32(0x00000800)#define MAC_CSR13_BIT12 FIELD32(0x00001000) +#define MAC_CSR13_BIT13 FIELD32(0x00002000) +#define MAC_CSR13_BIT14 FIELD32(0x00004000) +#define MAC_CSR13_BIT15 FIELD32(0x00008000)/* * MAC_CSR14: LED control register.
drivers/platform/x86/asus-laptop.c +4 -4
@@ -646,9 +646,9 @@ static ssize_t show_infos(struct device *dev,* The significance of others is yet to be found. * If we don't find the method, we assume the device are present. */ - rv =acpi_evaluate_integer (asus->handle,"HRWS" ,NULL , &temp); + rv =acpi_evaluate_integer (asus->handle,"HWRS" ,NULL , &temp);if (!ACPI_FAILURE (rv)) - len +=sprintf (page + len,"HRWS value : %#x\n" , + len +=sprintf (page + len,"HWRS value : %#x\n" , (uint ) temp);/* * Another value for userspace: the ASYM method returns 0x02 for
@@ -1340,9 +1340,9 @@ static int asus_laptop_get_info(struct asus_laptop *asus)* The significance of others is yet to be found. */ status = -acpi_evaluate_integer (asus->handle,"HRWS" ,NULL , &hwrs_result); +acpi_evaluate_integer (asus->handle,"HWRS" ,NULL , &hwrs_result);if (!ACPI_FAILURE (status)) -pr_notice (" HRWS returned %x" , (int )hwrs_result); +pr_notice (" HWRS returned %x" , (int )hwrs_result);if (!acpi_check_handle (asus->handle,METHOD_WL_STATUS ,NULL )) asus->have_rsts = true;
drivers/platform/x86/asus-nb-wmi.c +4 -0
@@ -68,6 +68,10 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x8A, { KEY_PROG1 } }, { KE_KEY, 0x95, { KEY_MEDIA } }, { KE_KEY, 0x99, { KEY_PHONE } }, + { KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */ + { KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */ + { KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */ + { KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */ { KE_KEY, 0xb5, { KEY_CALC } }, { KE_KEY, 0xc4, { KEY_KBDILLUMUP } }, { KE_KEY, 0xc5, { KEY_KBDILLUMDOWN } },
drivers/rtc/rtc-rs5c348.c +5 -2
@@ -121,9 +121,12 @@ rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_min =bcd2bin (rxbuf[RS5C348_REG_MINS ] &RS5C348_MINS_MASK ); tm->tm_hour =bcd2bin (rxbuf[RS5C348_REG_HOURS ] &RS5C348_HOURS_MASK );if (!pdata->rtc_24h) { - tm->tm_hour %=12 ; -if (rxbuf[RS5C348_REG_HOURS ] &RS5C348_BIT_PM ) +if (rxbuf[RS5C348_REG_HOURS ] &RS5C348_BIT_PM ) { + tm->tm_hour -=20 ; + tm->tm_hour %=12 ; tm->tm_hour +=12 ; + }else + tm->tm_hour %=12 ; } tm->tm_wday =bcd2bin (rxbuf[RS5C348_REG_WDAY ] &RS5C348_WDAY_MASK ); tm->tm_mday =bcd2bin (rxbuf[RS5C348_REG_DAY ] &RS5C348_DAY_MASK );
drivers/rtc/rtc-twl.c +5 -0
@@ -490,6 +490,11 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) goto out2; } +/* ensure interrupts are disabled, bootloaders can be strange */ + ret =twl_rtc_write_u8 (0 ,REG_RTC_INTERRUPTS_REG ); +if (ret <0 ) +dev_warn (&pdev->dev,"unable to disable interrupt\n" ); +/* init cached IRQ enable bits */ ret =twl_rtc_read_u8 (&rtc_irq_bits,REG_RTC_INTERRUPTS_REG );if (ret <0 )
drivers/scsi/bnx2i/bnx2i_hwi.c +3 -0
@@ -1260,6 +1260,9 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)int rc =0 ;u64 mask64; +memset (&iscsi_init,0x00 ,sizeof (struct iscsi_kwqe_init1 )); +memset (&iscsi_init2,0x00 ,sizeof (struct iscsi_kwqe_init2 )); +bnx2i_adjust_qp_size (hba); iscsi_init.flags =
drivers/scsi/hpsa.c +2 -1
@@ -1209,8 +1209,9 @@ static void complete_scsi_command(struct CommandList *cp) }break ;case CMD_PROTOCOL_ERR : + cmd->result =DID_ERROR <<16 ;dev_warn (&h->pdev->dev,"cp %p has " -"protocol error \n" , cp); +"protocol error\n" , cp);break ;case CMD_HARDWARE_ERR : cmd->result =DID_ERROR <<16 ;
drivers/scsi/mpt2sas/mpt2sas_base.c +7 -0
@@ -1097,6 +1097,13 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)u16 message_control; +/* Check whether controller SAS2008 B0 controller, +if it is SAS2008 B0 controller use IO-APIC instead of MSIX */ +if (ioc->pdev->device ==MPI2_MFGPAGE_DEVID_SAS2008 && + ioc->pdev->revision ==0x01 ) { +return -EINVAL ; + } + base =pci_find_capability (ioc->pdev,PCI_CAP_ID_MSIX );if (!base) { dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "msix not "
drivers/spi/spi_fsl_spi.c +4 -2
@@ -139,10 +139,12 @@ static void fsl_spi_change_mode(struct spi_device *spi)static void fsl_spi_chipselect (struct spi_device *spi,int value) {struct mpc8xxx_spi *mpc8xxx_spi =spi_master_get_devdata (spi->master); -struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data; +struct fsl_spi_platform_data *pdata;bool pol = spi->mode &SPI_CS_HIGH ;struct spi_mpc8xxx_cs *cs = spi->controller_state; + pdata = spi->dev.parent->parent->platform_data; +if (value ==BITBANG_CS_INACTIVE ) {if (pdata->cs_control) pdata->cs_control (spi, !pol);
@@ -934,7 +936,7 @@ err:static void fsl_spi_cs_control (struct spi_device *spi,bool on) { -struct device *dev = spi->dev.parent; +struct device *dev = spi->dev.parent->parent;struct mpc8xxx_spi_probe_info *pinfo =to_of_pinfo (dev->platform_data);u16 cs = spi->chip_select;int gpio = pinfo->gpios[cs];
drivers/staging/comedi/drivers/das08.c +1 -1
@@ -655,7 +655,7 @@ static int das08jr_ao_winsn(struct comedi_device *dev,int chan; lsb = data[0 ] &0xff ; - msb = (data[0 ] >>8 ) &0xf ; + msb = (data[0 ] >>8 ) &0xff ; chan =CR_CHAN (insn->chanspec);
drivers/staging/lirc/lirc_sir.c +58 -2
99 lines not on this page · raw message
drivers/staging/rtl8712/recv_linux.c +1 -6
@@ -113,13 +113,8 @@ void r8712_recv_indicatepkt(struct _adapter *padapter,if (skb ==NULL ) goto _recv_indicatepkt_drop; skb->data = precv_frame->u.hdr.rx_data; -#ifdef NET_SKBUFF_DATA_USES_OFFSET - skb->tail = (sk_buff_data_t)(precv_frame->u.hdr.rx_tail - - precv_frame->u.hdr.rx_head); -#else - skb->tail = (sk_buff_data_t )precv_frame->u.hdr.rx_tail; -#endif skb->len = precv_frame->u.hdr.len; +skb_set_tail_pointer (skb, skb->len);if ((pattrib->tcpchk_valid ==1 ) && (pattrib->tcp_chkrpt ==1 )) skb->ip_summed =CHECKSUM_UNNECESSARY ;else
drivers/staging/speakup/main.c +1 -1
@@ -1855,7 +1855,7 @@ static void speakup_bits(struct vc_data *vc)static int handle_goto (struct vc_data *vc,u_char type,u_char ch,u_short key) { -static u_char *goto_buf ="\0\0\0\0\0\0" ; +static u_char goto_buf[8 ];static int num;int maxlen, go_pos;char *cp;
drivers/staging/vt6656/dpc.c +1 -1
@@ -200,7 +200,7 @@ s_vProcessRxMACHeader ( }else if (!compare_ether_addr (pbyRxBuffer, &pDevice->abySNAP_RFC1042[0 ])) { cbHeaderSize +=6 ; pwType = (PWORD ) (pbyRxBufferAddr + cbHeaderSize); -if ((*pwType ==cpu_to_le16 (ETH_P_IPX )) || +if ((*pwType ==cpu_to_be16 (ETH_P_IPX )) || (*pwType ==cpu_to_le16 (0xF380 ))) { cbHeaderSize -=8 ; pwType = (PWORD ) (pbyRxBufferAddr + cbHeaderSize);
drivers/staging/vt6656/rxtx.c +19 -19
@@ -1701,7 +1701,7 @@ s_bPacketToWirelessUsb(// 802.1H if (ntohs (psEthHeader->wType) >ETH_DATA_LEN ) {if (pDevice->dwDiagRefCount ==0 ) { -if ((psEthHeader->wType ==cpu_to_le16 (ETH_P_IPX )) || +if ((psEthHeader->wType ==cpu_to_be16 (ETH_P_IPX )) || (psEthHeader->wType ==cpu_to_le16 (0xF380 ))) {memcpy ((PBYTE ) (pbyPayloadHead), abySNAP_Bridgetunnel,6 );
@@ -2840,10 +2840,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) Packet_Type = skb->data[ETH_HLEN +1 ]; Descriptor_type = skb->data[ETH_HLEN +1 +1 +2 ]; Key_info = (skb->data[ETH_HLEN +1 +1 +2 +1 ] <<8 )|(skb->data[ETH_HLEN +1 +1 +2 +2 ]); -if (pDevice->sTxEthHeader.wType ==cpu_to_le16 (ETH_P_PAE )) { -/* 802.1x OR eapol-key challenge frame transfer */ -if (((Protocol_Version ==1 ) || (Protocol_Version ==2 )) && - (Packet_Type ==3 )) { +if (pDevice->sTxEthHeader.wType ==cpu_to_be16 (ETH_P_PAE )) { +/* 802.1x OR eapol-key challenge frame transfer */ +if (((Protocol_Version ==1 ) || (Protocol_Version ==2 )) && + (Packet_Type ==3 )) { bTxeapol_key = TRUE;if (!(Key_info &BIT3 ) &&//WPA or RSN group-key challenge (Key_info &BIT8 ) && (Key_info &BIT9 )) {//send 2/2 key
@@ -2989,19 +2989,19 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb) } } -if (pDevice->sTxEthHeader.wType ==cpu_to_le16 (ETH_P_PAE )) { -if (pDevice->byBBType !=BB_TYPE_11A ) { - pDevice->wCurrentRate =RATE_1M ; - pDevice->byACKRate =RATE_1M ; - pDevice->byTopCCKBasicRate =RATE_1M ; - pDevice->byTopOFDMBasicRate =RATE_6M ; - }else { - pDevice->wCurrentRate =RATE_6M ; - pDevice->byACKRate =RATE_6M ; - pDevice->byTopCCKBasicRate =RATE_1M ; - pDevice->byTopOFDMBasicRate =RATE_6M ; - } - } +if (pDevice->sTxEthHeader.wType ==cpu_to_be16 (ETH_P_PAE )) { +if (pDevice->byBBType !=BB_TYPE_11A ) { + pDevice->wCurrentRate =RATE_1M ; + pDevice->byACKRate =RATE_1M ; + pDevice->byTopCCKBasicRate =RATE_1M ; + pDevice->byTopOFDMBasicRate =RATE_6M ; + }else { + pDevice->wCurrentRate =RATE_6M ; + pDevice->byACKRate =RATE_6M ; + pDevice->byTopCCKBasicRate =RATE_1M ; + pDevice->byTopOFDMBasicRate =RATE_6M ; + } + } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n",
@@ -3017,7 +3017,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)if (bNeedEncryption == TRUE) {DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ntohs Pkt Type=%04x\n" ,ntohs (pDevice->sTxEthHeader.wType)); -if ((pDevice->sTxEthHeader.wType) ==cpu_to_le16 (ETH_P_PAE )) { +if ((pDevice->sTxEthHeader.wType) ==cpu_to_be16 (ETH_P_PAE )) { bNeedEncryption = FALSE;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Pkt Type=%04x\n" , (pDevice->sTxEthHeader.wType));if ((pMgmt->eCurrMode ==WMAC_MODE_ESS_STA ) && (pMgmt->eCurrState ==WMAC_STATE_ASSOC )) {
drivers/target/target_core_transport.c +7 -2
@@ -3672,15 +3672,20 @@ static int transport_generic_cmd_sequencer(/* Returns CHECK_CONDITION + INVALID_CDB_FIELD */ goto out_invalid_cdb_field; } - +/* +* For the overflow case keep the existing fabric provided +* ->data_length. Otherwise for the underflow case, reset +* ->data_length to the smaller SCSI expected data transfer +* length. +*/ if (size > cmd->data_length) { cmd->se_cmd_flags |=SCF_OVERFLOW_BIT ; cmd->residual_count = (size - cmd->data_length); }else { cmd->se_cmd_flags |=SCF_UNDERFLOW_BIT ; cmd->residual_count = (cmd->data_length - size); + cmd->data_length = size; } - cmd->data_length = size; }transport_set_supported_SAM_opcode (cmd);
drivers/tty/serial/pch_uart.c +14 -7
@@ -658,7 +658,8 @@ static void pch_dma_rx_complete(void *arg)tty_flip_buffer_push (tty);tty_kref_put (tty);async_tx_ack (priv->desc_rx); -pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_RX_INT ); +pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT ); }static void pch_dma_tx_complete (void *arg)
@@ -713,7 +714,8 @@ static int handle_rx_to(struct eg20t_port *priv)int rx_size;int ret;if (!priv->start_rx) { -pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_RX_INT ); +pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT );return 0 ; } buf = &priv->rxbuf;
@@ -975,11 +977,13 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)case PCH_UART_IID_RDR :/* Received Data Ready */ if (priv->use_dma) {pch_uart_hal_disable_interrupt (priv, -PCH_UART_HAL_RX_INT ); +PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT ); ret =dma_handle_rx (priv);if (!ret)pch_uart_hal_enable_interrupt (priv, -PCH_UART_HAL_RX_INT ); +PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT ); }else { ret =handle_rx (priv); }
@@ -1105,7 +1109,8 @@ static void pch_uart_stop_rx(struct uart_port *port)struct eg20t_port *priv; priv = container_of(port, struct eg20t_port, port); priv->start_rx =0 ; -pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_RX_INT ); +pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT ); priv->int_dis_flag =1 ; }
@@ -1161,6 +1166,7 @@ static int pch_uart_startup(struct uart_port *port)break ;case 16 : fifo_size =PCH_UART_HAL_FIFO16 ; +break ;case 1 :default : fifo_size =PCH_UART_HAL_FIFO_DIS ;
@@ -1198,7 +1204,8 @@ static int pch_uart_startup(struct uart_port *port)pch_request_dma (port); priv->start_rx =1 ; -pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_RX_INT ); +pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_RX_INT | +PCH_UART_HAL_RX_ERR_INT );uart_update_timeout (port,CS8 , default_baud);return 0 ;
@@ -1256,7 +1263,7 @@ static void pch_uart_set_termios(struct uart_port *port, stb =PCH_UART_HAL_STB1 ;if (termios->c_cflag &PARENB ) { -if (!(termios->c_cflag &PARODD )) +if (termios->c_cflag &PARODD ) parity =PCH_UART_HAL_PARITY_ODD ;else parity =PCH_UART_HAL_PARITY_EVEN ;
drivers/usb/core/devices.c +1 -1
@@ -624,7 +624,7 @@ static ssize_t usb_device_read(struct file *file, char __user *buf,/* print devices for all busses */ list_for_each_entry (bus, &usb_bus_list, bus_list) {/* recurse through all children of the root hub */ -if (!bus->root_hub) +if (!bus_to_hcd (bus)->rh_registered)continue ;usb_lock_device (bus->root_hub); ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos,
drivers/usb/core/hcd.c +2 -4
@@ -977,10 +977,7 @@ static int register_root_hub(struct usb_hcd *hcd)if (retval) {dev_err (parent_dev,"can't register root hub for %s, %d\n" ,dev_name (&usb_dev->dev), retval); - } -mutex_unlock (&usb_bus_list_lock); - -if (retval ==0 ) { + }else {spin_lock_irq (&hcd_root_hub_lock); hcd->rh_registered =1 ;spin_unlock_irq (&hcd_root_hub_lock);
@@ -989,6 +986,7 @@ static int register_root_hub(struct usb_hcd *hcd)if (HCD_DEAD (hcd))usb_hc_died (hcd);/* This time clean up */ } +mutex_unlock (&usb_bus_list_lock);return retval; }
drivers/usb/core/quirks.c +4 -0
@@ -96,6 +96,10 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x04b4, 0x0526), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* Microchip Joss Optical infrared touchboard device */ + { USB_DEVICE(0x04d8, 0x000c), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, + /* Samsung Android phone modem - ID conflict with SPH-I500 */ { USB_DEVICE(0x04e8, 0x6601), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/host/ehci-q.c +10 -2
@@ -130,9 +130,17 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)else { qtd =list_entry (qh->qtd_list.next, struct ehci_qtd, qtd_list); -/* first qtd may already be partially processed */ -if (cpu_to_hc32 (ehci, qtd->qtd_dma) == qh->hw->hw_current) +/* +* first qtd may already be partially processed. +* If we come here during unlink, the QH overlay region +* might have reference to the just unlinked qtd. The +* qtd is updated in qh_completions(). Update the QH +* overlay here. +*/ +if (cpu_to_hc32 (ehci, qtd->qtd_dma) == qh->hw->hw_current) { + qh->hw->hw_qtd_next = qtd->hw_next; qtd =NULL ; + } }if (qtd)
drivers/usb/host/pci-quirks.c +35 -7
89 lines not on this page · raw message
drivers/usb/host/pci-quirks.h +1 -0
@@ -15,6 +15,7 @@ void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);static inline void usb_amd_quirk_pll_disable (void ) {}static inline void usb_amd_quirk_pll_enable (void ) {}static inline void usb_amd_dev_put (void ) {} +static inline void usb_disable_xhci_ports (struct pci_dev *xhci_pdev) {}#endif /* CONFIG_PCI */ #endif /* __LINUX_USB_PCI_QUIRKS_H */
drivers/usb/host/xhci-ring.c +24 -15
@@ -147,25 +147,34 @@ static void next_trb(struct xhci_hcd *xhci,*/ static void inc_deq (struct xhci_hcd *xhci,struct xhci_ring *ring,bool consumer) { -union xhci_trb *next = ++(ring->dequeue);unsigned long long addr; ring->deq_updates++; -/* Update the dequeue pointer further if that was a link TRB or we're at -* the end of an event ring segment (which doesn't have link TRBS) -*/ -while (last_trb (xhci, ring, ring->deq_seg, next)) { -if (consumer &&last_trb_on_last_seg (xhci, ring, ring->deq_seg, next)) { - ring->cycle_state = (ring->cycle_state ?0 :1 ); -if (!in_interrupt ()) -xhci_dbg (xhci,"Toggle cycle state for ring %p = %i\n" , - ring, - (unsigned int ) ring->cycle_state); + +do { +/* +* Update the dequeue pointer further if that was a link TRB or +* we're at the end of an event ring segment (which doesn't have +* link TRBS) +*/ +if (last_trb (xhci, ring, ring->deq_seg, ring->dequeue)) { +if (consumer &&last_trb_on_last_seg (xhci, ring, + ring->deq_seg, ring->dequeue)) { +if (!in_interrupt ()) +xhci_dbg (xhci,"Toggle cycle state " +"for ring %p = %i\n" , + ring, + (unsigned int ) + ring->cycle_state); + ring->cycle_state = (ring->cycle_state ?0 :1 ); + } + ring->deq_seg = ring->deq_seg->next; + ring->dequeue = ring->deq_seg->trbs; + }else { + ring->dequeue++; } - ring->deq_seg = ring->deq_seg->next; - ring->dequeue = ring->deq_seg->trbs; - next = ring->dequeue; - } + }while (last_trb (xhci, ring, ring->deq_seg, ring->dequeue)); + addr = (unsigned long long )xhci_trb_virt_to_dma (ring->deq_seg, ring->dequeue); }
drivers/usb/host/xhci.c +1 -1
@@ -594,7 +594,7 @@ void xhci_shutdown(struct usb_hcd *hcd) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); -if (xhci->quirks &&XHCI_SPURIOUS_REBOOT ) +if (xhci->quirks &XHCI_SPURIOUS_REBOOT )usb_disable_xhci_ports (to_pci_dev (hcd->self.controller));spin_lock_irq (&xhci->lock);
drivers/usb/serial/ftdi_sio.c +21 -1
@@ -702,6 +702,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_NZR_SEM_USB_PID) }, { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) }, { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) }, { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) },
@@ -802,13 +803,32 @@ static struct usb_device_id id_table_combined [] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, - { USB_DEVICE(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID) }, + {USB_DEVICE_AND_INTERFACE_INFO (MICROCHIP_VID ,MICROCHIP_USB_BOARD_PID , +USB_CLASS_VENDOR_SPEC , + USB_SUBCLASS_VENDOR_SPEC, 0x00) }, { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, + { USB_DEVICE(FTDI_VID, PI_C865_PID) }, + { USB_DEVICE(FTDI_VID, PI_C857_PID) }, + { USB_DEVICE(PI_VID, PI_C866_PID) }, + { USB_DEVICE(PI_VID, PI_C663_PID) }, + { USB_DEVICE(PI_VID, PI_C725_PID) }, + { USB_DEVICE(PI_VID, PI_E517_PID) }, + { USB_DEVICE(PI_VID, PI_C863_PID) }, { USB_DEVICE(PI_VID, PI_E861_PID) }, + { USB_DEVICE(PI_VID, PI_C867_PID) }, + { USB_DEVICE(PI_VID, PI_E609_PID) }, + { USB_DEVICE(PI_VID, PI_E709_PID) }, + { USB_DEVICE(PI_VID, PI_100F_PID) }, + { USB_DEVICE(PI_VID, PI_1011_PID) }, + { USB_DEVICE(PI_VID, PI_1012_PID) }, + { USB_DEVICE(PI_VID, PI_1013_PID) }, + { USB_DEVICE(PI_VID, PI_1014_PID) }, + { USB_DEVICE(PI_VID, PI_1015_PID) }, + { USB_DEVICE(PI_VID, PI_1016_PID) }, { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) }, { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
drivers/usb/serial/ftdi_sio_ids.h +27 -2
@@ -75,6 +75,9 @@#define FTDI_OPENDCC_GATEWAY_PID 0xBFDB#define FTDI_OPENDCC_GBM_PID 0xBFDC +/* NZR SEM 16+ USB (http://www.nzr.de) */ +#define FTDI_NZR_SEM_USB_PID 0xC1E0/* NZR SEM-LOG16+ */ +/* * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com) */
@@ -539,7 +542,10 @@/* * Microchip Technology, Inc. * -* MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are also used by: +* MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are +* used by single function CDC ACM class based firmware demo +* applications. The VID/PID has also been used in firmware +* emulating FTDI serial chips by: * Hornby Elite - Digital Command Control Console * http://www.hornby.com/hornby-dcc/controllers/ */
@@ -791,8 +797,27 @@* Physik Instrumente * http://www.physikinstrumente.com/en/products/ */ +/* These two devices use the VID of FTDI */ +#define PI_C865_PID 0xe0a0/* PI C-865 Piezomotor Controller */ +#define PI_C857_PID 0xe0a1/* PI Encoder Trigger Box */ +#define PI_VID 0x1a72/* Vendor ID */ -#define PI_E861_PID 0x1008/* E-861 piezo controller USB connection */ +#define PI_C866_PID 0x1000/* PI C-866 Piezomotor Controller */ +#define PI_C663_PID 0x1001/* PI C-663 Mercury-Step */ +#define PI_C725_PID 0x1002/* PI C-725 Piezomotor Controller */ +#define PI_E517_PID 0x1005/* PI E-517 Digital Piezo Controller Operation Module */ +#define PI_C863_PID 0x1007/* PI C-863 */ +#define PI_E861_PID 0x1008/* PI E-861 Piezomotor Controller */ +#define PI_C867_PID 0x1009/* PI C-867 Piezomotor Controller */ +#define PI_E609_PID 0x100D/* PI E-609 Digital Piezo Controller */ +#define PI_E709_PID 0x100E/* PI E-709 Digital Piezo Controller */ +#define PI_100F_PID 0x100F/* PI Digital Piezo Controller */ +#define PI_1011_PID 0x1011/* PI Digital Piezo Controller */ +#define PI_1012_PID 0x1012/* PI Motion Controller */ +#define PI_1013_PID 0x1013/* PI Motion Controller */ +#define PI_1014_PID 0x1014/* PI Device */ +#define PI_1015_PID 0x1015/* PI Device */ +#define PI_1016_PID 0x1016/* PI Digital Servo Module */ /* * Kondo Kagaku Co.Ltd.
drivers/usb/serial/option.c +4 -2
@@ -882,8 +882,6 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff), - .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
@@ -1088,6 +1086,10 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, + { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */
drivers/video/console/fbcon.c +8 -1
@@ -373,8 +373,15 @@ static void fb_flashcursor(struct work_struct *work)struct vc_data *vc =NULL ;int c;int mode; +int ret; + +/* FIXME: we should sort out the unbind locking instead */ +/* instead we just fail to flash the cursor if we can't get +* the lock instead of blocking fbcon deinit */ + ret =console_trylock (); +if (ret ==0 ) +return ; -console_lock ();if (ops && ops->currcon !=-1 ) vc = vc_cons[ops->currcon].d;
drivers/watchdog/hpwdt.c +3 -0
@@ -773,6 +773,9 @@ static int __devinit hpwdt_init_one(struct pci_dev *dev, hpwdt_timer_reg = pci_mem_addr +0x70 ; hpwdt_timer_con = pci_mem_addr +0x72 ; +/* Make sure that timer is disabled until /dev/watchdog is opened */ +hpwdt_stop (); +/* Make sure that we have a valid soft_margin */ if (hpwdt_change_timer (soft_margin))hpwdt_change_timer (DEFAULT_MARGIN );
fs/dcache.c +2 -2
@@ -290,7 +290,7 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent)* Inform try_to_ascend() that we are no longer attached to the * dentry tree */ - dentry->d_flags |=DCACHE_DISCONNECTED ; + dentry->d_flags |=DCACHE_DENTRY_KILLED ;if (parent)spin_unlock (&parent->d_lock);dentry_iput (dentry);
@@ -1015,7 +1015,7 @@ static struct dentry *try_to_ascend(struct dentry *old, int locked, unsigned seq* or deletion */ if (new != old->d_parent || - (old->d_flags &DCACHE_DISCONNECTED ) || + (old->d_flags &DCACHE_DENTRY_KILLED ) || (!locked &&read_seqretry (&rename_lock, seq))) {spin_unlock (&new->d_lock); new =NULL ;
fs/ecryptfs/inode.c +5 -0
@@ -653,6 +653,7 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,struct dentry *lower_old_dir_dentry;struct dentry *lower_new_dir_dentry;struct dentry *trap =NULL ; +struct inode *target_inode; lower_old_dentry =ecryptfs_dentry_to_lower (old_dentry); lower_new_dentry =ecryptfs_dentry_to_lower (new_dentry);
@@ -660,6 +661,7 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,dget (lower_new_dentry); lower_old_dir_dentry =dget_parent (lower_old_dentry); lower_new_dir_dentry =dget_parent (lower_new_dentry); + target_inode = new_dentry->d_inode; trap =lock_rename (lower_old_dir_dentry, lower_new_dir_dentry);/* source should not be ancestor of target */ if (trap == lower_old_dentry) {
@@ -675,6 +677,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry, lower_new_dir_dentry->d_inode, lower_new_dentry);if (rc) goto out_lock; +if (target_inode) +fsstack_copy_attr_all (target_inode, +ecryptfs_inode_to_lower (target_inode));fsstack_copy_attr_all (new_dir, lower_new_dir_dentry->d_inode);if (new_dir != old_dir)fsstack_copy_attr_all (old_dir, lower_old_dir_dentry->d_inode);
fs/nfs/inode.c +1 -1
@@ -150,7 +150,7 @@ static void nfs_zap_caches_locked(struct inode *inode) nfsi->attrtimeo =NFS_MINATTRTIMEO (inode); nfsi->attrtimeo_timestamp = jiffies; -memset (NFS_COOKIEVERF (inode),0 ,sizeof (NFS_COOKIEVERF (inode))); +memset (NFS_I (inode)->cookieverf,0 ,sizeof (NFS_I (inode)->cookieverf));if (S_ISREG (mode) ||S_ISDIR (mode) ||S_ISLNK (mode)) nfsi->cache_validity |=NFS_INO_INVALID_ATTR |NFS_INO_INVALID_DATA |NFS_INO_INVALID_ACCESS |NFS_INO_INVALID_ACL |NFS_INO_REVAL_PAGECACHE ;else
fs/nfs/nfs3proc.c +1 -1
@@ -633,7 +633,7 @@ nfs3_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, u64 cookie, struct page **pages, unsigned int count, int plus) { struct inode *dir = dentry->d_inode; -__be32 *verf =NFS_COOKIEVERF (dir); +__be32 *verf =NFS_I (dir)->cookieverf; struct nfs3_readdirargs arg = { .fh = NFS_FH(dir), .cookie = cookie,
fs/nfs/nfs4proc.c +2 -2
@@ -3018,11 +3018,11 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, dentry->d_parent->d_name.name, dentry->d_name.name, (unsigned long long)cookie); -nfs4_setup_readdir (cookie,NFS_COOKIEVERF (dir), dentry, &args); +nfs4_setup_readdir (cookie,NFS_I (dir)->cookieverf, dentry, &args); res.pgbase = args.pgbase; status =nfs4_call_sync (NFS_SERVER (dir)->client,NFS_SERVER (dir), &msg, &args.seq_args, &res.seq_res,0 );if (status >=0 ) { -memcpy (NFS_COOKIEVERF (dir), res.verifier.data,NFS4_VERIFIER_SIZE ); +memcpy (NFS_I (dir)->cookieverf, res.verifier.data,NFS4_VERIFIER_SIZE ); status += args.pgbase; }
fs/nfs/nfs4xdr.c +2 -1
@@ -5745,7 +5745,8 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr, status =decode_open (xdr, res);if (status) goto out; -if (decode_getfh (xdr, &res->fh) !=0 ) + status =decode_getfh (xdr, &res->fh); +if (status) goto out;if (decode_getfattr (xdr, res->f_attr, res->server, !RPC_IS_ASYNC (rqstp->rq_task)) !=0 )
fs/nfs/super.c +2 -0
@@ -1815,6 +1815,7 @@ static int nfs_validate_mount_data(void *options,memcpy (sap, &data->addr,sizeof (data->addr)); args->nfs_server.addrlen =sizeof (data->addr); + args->nfs_server.port =ntohs (data->addr.sin_port);if (!nfs_verify_server_address (sap)) goto out_no_address;
@@ -2528,6 +2529,7 @@ static int nfs4_validate_mount_data(void *options,return -EFAULT ;if (!nfs_verify_server_address (sap)) goto out_no_address; + args->nfs_server.port =ntohs (((struct sockaddr_in *)sap)->sin_port);if (data->auth_flavourlen) {if (data->auth_flavourlen >1 )
fs/squashfs/super.c +1 -1
@@ -290,7 +290,7 @@ handle_fragments: check_directory_table:/* Sanity check directory_table */ -if (msblk->directory_table >= next_table) { +if (msblk->directory_table > next_table) { err = -EINVAL ; goto failed_mount; }
fs/stat.c +1 -1
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(vfs_getattr);int vfs_fstat (unsigned int fd,struct kstat *stat) { -struct file *f =fget (fd); +struct file *f =fget_raw (fd);int error = -EBADF ;if (f) {
include/asm-generic/mutex-xchg.h +9 -2
@@ -26,7 +26,13 @@ static inline void __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) {if (unlikely (atomic_xchg (count,0 ) !=1 )) -fail_fn (count); +/* +* We failed to acquire the lock, so mark it contended +* to ensure that any waiting tasks are woken up by the +* unlock slow path. +*/ +if (likely (atomic_xchg (count,-1 ) !=1 )) +fail_fn (count); }/**
@@ -43,7 +49,8 @@ static inline int __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) {if (unlikely (atomic_xchg (count,0 ) !=1 )) -return fail_fn (count); +if (likely (atomic_xchg (count,-1 ) !=1 )) +return fail_fn (count);return 0 ; }
include/linux/dcache.h +2 -0
@@ -220,6 +220,8 @@ struct dentry_operations {#define DCACHE_MANAGED_DENTRY \ (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) +#define DCACHE_DENTRY_KILLED 0x100000 +extern seqlock_t rename_lock;static inline int dname_external (struct dentry *dentry)
include/linux/init_task.h +11 -1
@@ -124,8 +124,17 @@ extern struct group_info init_groups;extern struct cred init_cred; +extern struct task_group root_task_group; + +#ifdef CONFIG_CGROUP_SCHED +# define INIT_CGROUP_SCHED (tsk) \ + .sched_task_group = &root_task_group, +#else +# define INIT_CGROUP_SCHED (tsk) +#endif +#ifdef CONFIG_PERF_EVENTS -# define INIT_PERF_EVENTS (tsk) \ +# define INIT_PERF_EVENTS (tsk) \ .perf_event_mutex = \ __MUTEX_INITIALIZER(tsk.perf_event_mutex), \ .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list),
@@ -160,6 +169,7 @@ extern struct cred init_cred; }, \ .tasks = LIST_HEAD_INIT(tsk.tasks), \ INIT_PUSHABLE_TASKS(tsk) \ +INIT_CGROUP_SCHED (tsk) \ .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ .real_parent = &tsk, \
include/linux/kobject.h +1 -1
@@ -228,7 +228,7 @@ static inline int kobject_uevent_env(struct kobject *kobj,static inline __attribute__((format (printf,2 ,3 )))int add_uevent_var (struct kobj_uevent_env *env,const char *format, ...) -{return 0 ; } +{return -ENOMEM ; }static inline int kobject_action_type (const char *buf,size_t count,enum kobject_action *type)
include/linux/ktime.h +0 -7
@@ -58,13 +58,6 @@ union ktime {typedef union ktime ktime_t ;/* Kill this */ -#define KTIME_MAX ((s64)~((u64)1 << 63)) -#if (BITS_PER_LONG ==64 ) -# define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) -#else -# define KTIME_SEC_MAX LONG_MAX -#endif -/* * ktime_t definitions when using the 64-bit scalar representation: */
include/linux/memory.h +1 -1
@@ -20,7 +20,7 @@#include <linux/compiler.h> #include <linux/mutex.h> -#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) +#define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)struct memory_block {unsigned long start_section_nr;
include/linux/netdevice.h +2 -0
@@ -1329,6 +1329,8 @@ struct net_device {/* for setting kernel sock attribute on TCP connection setup */ #define GSO_MAX_SIZE 65536unsigned int gso_max_size; +#define GSO_MAX_SEGS 65535 +u16 gso_max_segs;#ifdef CONFIG_DCB /* Data Center Bridging netlink ops */
include/linux/nfs_fs.h +0 -5
@@ -261,11 +261,6 @@ static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode)return NFS_SERVER (inode)->nfs_client->rpc_ops; } -static inline __be32 *NFS_COOKIEVERF (const struct inode *inode) -{ -return NFS_I (inode)->cookieverf; -} -static inline unsigned NFS_MINATTRTIMEO (const struct inode *inode) {struct nfs_server *nfss =NFS_SERVER (inode);
include/linux/perf_event.h +1 -1
@@ -807,7 +807,7 @@ struct perf_event {struct hw_perf_event hw;struct perf_event_context *ctx; -struct file *filp; +atomic_long_t refcount;/* * These accumulate total time (in nanoseconds) that children
include/linux/sched.h +4 -1
@@ -1235,6 +1235,9 @@ struct task_struct {const struct sched_class *sched_class;struct sched_entity se;struct sched_rt_entity rt; +#ifdef CONFIG_CGROUP_SCHED +struct task_group *sched_task_group; +#endif #ifdef CONFIG_PREEMPT_NOTIFIERS /* list of struct preempt_notifier: */
@@ -2613,7 +2616,7 @@ extern int sched_group_set_rt_period(struct task_group *tg,extern long sched_group_rt_period (struct task_group *tg);extern int sched_rt_can_attach (struct task_group *tg,struct task_struct *tsk);#endif -#endif +#endif /* CONFIG_CGROUP_SCHED */ extern int task_can_switch_user (struct user_struct *up,struct task_struct *tsk);
include/linux/time.h +27 -2
@@ -107,11 +107,36 @@ static inline struct timespec timespec_sub(struct timespec lhs,return ts_delta; } +#define KTIME_MAX ((s64)~((u64)1 << 63)) +#if (BITS_PER_LONG ==64 ) +# define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) +#else +# define KTIME_SEC_MAX LONG_MAX +#endif +/* * Returns true if the timespec is norm, false if denorm: */ -#define timespec_valid (ts) \ - (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) +static inline bool timespec_valid (const struct timespec *ts) +{ +/* Dates before 1970 are bogus */ +if (ts->tv_sec <0 ) +return false; +/* Can't have more nanoseconds then a second */ +if ((unsigned long )ts->tv_nsec >=NSEC_PER_SEC ) +return false; +return true; +} + +static inline bool timespec_valid_strict (const struct timespec *ts) +{ +if (!timespec_valid (ts)) +return false; +/* Disallow values that could overflow ktime_t */ +if ((unsigned long long )ts->tv_sec >=KTIME_SEC_MAX ) +return false; +return true; +}extern void read_persistent_clock (struct timespec *ts);extern void read_boot_clock (struct timespec *ts);
include/net/sock.h +2 -0
@@ -194,6 +194,7 @@ struct sock_common {* @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK) * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) * @sk_gso_max_size: Maximum GSO segment size to build +* @sk_gso_max_segs: Maximum number of GSO segments * @sk_lingertime: %SO_LINGER l_linger setting * @sk_backlog: always used with the per-socket spinlock held * @sk_callback_lock: used with the callbacks in the end of this struct
@@ -310,6 +311,7 @@ struct sock {int sk_route_nocaps;int sk_gso_type;unsigned int sk_gso_max_size; +u16 sk_gso_max_segs;int sk_rcvlowat;unsigned long sk_lingertime;struct sk_buff_head sk_error_queue;
include/trace/events/kmem.h +2 -2
@@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc,TP_printk ("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s" , __entry->page, -page_to_pfn (__entry->page), + __entry->page ?page_to_pfn (__entry->page) :0 , __entry->order, __entry->migratetype,show_gfp_flags (__entry->gfp_flags))
@@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page,TP_printk ("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d" , __entry->page, -page_to_pfn (__entry->page), + __entry->page ?page_to_pfn (__entry->page) :0 , __entry->order, __entry->migratetype, __entry->order ==0 )
kernel/async.c +9 -4
@@ -87,6 +87,13 @@ static async_cookie_t __lowest_in_progress(struct list_head *running) {struct async_entry *entry; +if (!running) {/* just check the entry count */ +if (atomic_read (&entry_count)) +return 0 ;/* smaller than any cookie */ +else +return next_cookie; + } +if (!list_empty (running)) { entry =list_first_entry (running, struct async_entry, list);
@@ -236,9 +243,7 @@ EXPORT_SYMBOL_GPL(async_schedule_domain);*/ void async_synchronize_full (void ) { -do { -async_synchronize_cookie (next_cookie); - }while (!list_empty (&async_running) || !list_empty (&async_pending)); +async_synchronize_cookie_domain (next_cookie,NULL ); }EXPORT_SYMBOL_GPL (async_synchronize_full);
@@ -258,7 +263,7 @@ EXPORT_SYMBOL_GPL(async_synchronize_full_domain);/** * async_synchronize_cookie_domain - synchronize asynchronous function calls within a certain domain with cookie checkpointing * @cookie: async_cookie_t to use as checkpoint -* @running: running list to synchronize on +* @running: running list to synchronize on, NULL indicates all lists * * This function waits until all asynchronous function calls for the * synchronization domain specified by the running list @list submitted
kernel/events/core.c +33 -29
160 lines not on this page · raw message
kernel/exit.c +16 -0
@@ -1049,6 +1049,22 @@ NORET_TYPE void do_exit(long code)preempt_disable ();exit_rcu (); + +/* +* The setting of TASK_RUNNING by try_to_wake_up() may be delayed +* when the following two conditions become true. +* - There is race condition of mmap_sem (It is acquired by +* exit_mm()), and +* - SMI occurs before setting TASK_RUNINNG. +* (or hypervisor of virtual machine switches to other guest) +* As a result, we may become TASK_RUNNING after becoming TASK_DEAD +* +* To avoid it, we have to wait for releasing tsk->pi_lock which +* is held by try_to_wake_up() +*/ +smp_mb (); +raw_spin_unlock_wait (&tsk->pi_lock); +/* causes final put_task_struct in finish_task_switch(). */ tsk->state =TASK_DEAD ;schedule ();
kernel/sched.c +18 -14
@@ -605,22 +605,19 @@ static inline int cpu_of(struct rq *rq)/* * Return the group to which this tasks belongs. * -* We use task_subsys_state_check() and extend the RCU verification with -* pi->lock and rq->lock because cpu_cgroup_attach() holds those locks for each -* task it moves into the cgroup. Therefore by holding either of those locks, -* we pin the task to the current cgroup. +* We cannot use task_subsys_state() and friends because the cgroup +* subsystem changes that value before the cgroup_subsys::attach() method +* is called, therefore we cannot pin it and might observe the wrong value. +* +* The same is true for autogroup's p->signal->autogroup->tg, the autogroup +* core changes this before calling sched_move_task(). +* +* Instead we use a 'copy' which is updated from sched_move_task() while +* holding both task_struct::pi_lock and rq::lock. */ static inline struct task_group *task_group (struct task_struct *p) { -struct task_group *tg; -struct cgroup_subsys_state *css; - - css =task_subsys_state_check (p, cpu_cgroup_subsys_id, -lockdep_is_held (&p->pi_lock) || -lockdep_is_held (&task_rq (p)->lock)); - tg = container_of(css, struct task_group, css); - -return autogroup_task_group (p, tg); +return p->sched_task_group; }/* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */
@@ -2206,7 +2203,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)* a task's CPU. ->pi_lock for waking tasks, rq->lock for runnable tasks. * * sched_move_task() holds both and thus holding either pins the cgroup, -* see set_task_rq(). +* see task_group(). * * Furthermore, all task_rq users should acquire both locks, see * task_rq_lock().
@@ -8545,6 +8542,7 @@ void sched_destroy_group(struct task_group *tg)*/ void sched_move_task (struct task_struct *tsk) { +struct task_group *tg;int on_rq, running;unsigned long flags;struct rq *rq;
@@ -8559,6 +8557,12 @@ void sched_move_task(struct task_struct *tsk)if (unlikely (running)) tsk->sched_class->put_prev_task (rq, tsk); + tg =container_of (task_subsys_state_check (tsk, cpu_cgroup_subsys_id, +lockdep_is_held (&tsk->sighand->siglock)), + struct task_group, css); + tg =autogroup_task_group (tsk, tg); + tsk->sched_task_group = tg; +#ifdef CONFIG_FAIR_GROUP_SCHED if (tsk->sched_class->task_move_group) tsk->sched_class->task_move_group (tsk, on_rq);
kernel/time/timekeeping.c +34 -2
@@ -382,7 +382,7 @@ int do_settimeofday(const struct timespec *tv)struct timespec ts_delta;unsigned long flags; -if ((unsigned long )tv->tv_nsec >=NSEC_PER_SEC ) +if (!timespec_valid_strict (tv))return -EINVAL ;write_seqlock_irqsave (&xtime_lock, flags);
@@ -417,6 +417,8 @@ EXPORT_SYMBOL(do_settimeofday);int timekeeping_inject_offset (struct timespec *ts) {unsigned long flags; +struct timespec tmp; +int ret =0 ;if ((unsigned long )ts->tv_nsec >=NSEC_PER_SEC )return -EINVAL ;
@@ -425,9 +427,16 @@ int timekeeping_inject_offset(struct timespec *ts)timekeeping_forward_now (); + tmp =timespec_add (xtime, *ts); +if (!timespec_valid_strict (&tmp)) { + ret = -EINVAL ; + goto error; + } + xtime =timespec_add (xtime, *ts); wall_to_monotonic =timespec_sub (wall_to_monotonic, *ts); +error:/* even if we error out, we forwarded the time, so call update */ timekeeping_update (true);write_sequnlock_irqrestore (&xtime_lock, flags);
@@ -435,7 +444,7 @@ int timekeeping_inject_offset(struct timespec *ts)/* signal hrtimers about time change */ clock_was_set (); -return 0 ; +return ret; }EXPORT_SYMBOL (timekeeping_inject_offset);
@@ -582,7 +591,20 @@ void __init timekeeping_init(void)struct timespec now, boot;read_persistent_clock (&now); +if (!timespec_valid_strict (&now)) { +pr_warn ("WARNING: Persistent clock returned invalid value!\n" +" Check your CMOS/BIOS settings.\n" ); + now.tv_sec =0 ; + now.tv_nsec =0 ; + } +read_boot_clock (&boot); +if (!timespec_valid_strict (&boot)) { +pr_warn ("WARNING: Boot clock returned invalid value!\n" +" Check your CMOS/BIOS settings.\n" ); + boot.tv_sec =0 ; + boot.tv_nsec =0 ; + }write_seqlock_irqsave (&xtime_lock, flags);
@@ -627,6 +649,12 @@ static void update_sleep_time(struct timespec t)*/ static void __timekeeping_inject_sleeptime (struct timespec *delta) { +if (!timespec_valid_strict (delta)) { +printk (KERN_WARNING "__timekeeping_inject_sleeptime: Invalid " +"sleep delta value!\n" ); +return ; + } + xtime =timespec_add (xtime, *delta); wall_to_monotonic =timespec_sub (wall_to_monotonic, *delta);update_sleep_time (timespec_add (total_sleep_time, *delta));
@@ -897,6 +925,10 @@ static void update_wall_time(void)#else offset = (clock->read (clock) - clock->cycle_last) & clock->mask;#endif +/* Check if there's really nothing to do */ +if (offset < timekeeper.cycle_interval) +return ; + timekeeper.xtime_nsec = (s64 )xtime.tv_nsec << timekeeper.shift;/*
kernel/workqueue.c +14 -20
@@ -3412,14 +3412,17 @@ static int __cpuinit trustee_thread(void *__gcwq)for_each_busy_worker (worker, i, pos, gcwq) {struct work_struct *rebind_work = &worker->rebind_work; +unsigned long worker_flags = worker->flags;/* * Rebind_work may race with future cpu hotplug * operations. Use a separate flag to mark that -* rebinding is scheduled. +* rebinding is scheduled. The morphing should +* be atomic. */ - worker->flags |=WORKER_REBIND ; - worker->flags &= ~WORKER_ROGUE ; + worker_flags |=WORKER_REBIND ; + worker_flags &= ~WORKER_ROGUE ; +ACCESS_ONCE (worker->flags) = worker_flags;/* queue rebind_work, wq doesn't matter, use the default one */ if (test_and_set_bit(WORK_STRUCT_PENDING_BIT,
@@ -3599,18 +3602,17 @@ static int __devinit workqueue_cpu_down_callback(struct notifier_block *nfb,#ifdef CONFIG_SMP struct work_for_cpu { -struct completion completion; +struct work_struct work;long (*fn)(void *);void *arg;long ret; }; -static int do_work_for_cpu (void *_wfc) +static void work_for_cpu_fn (struct work_struct *work) { -struct work_for_cpu *wfc = _wfc; + struct work_for_cpu *wfc = container_of(work, struct work_for_cpu, work); + wfc->ret = wfc->fn (wfc->arg); -complete (&wfc->completion); -return 0 ; }/**
@@ -3625,19 +3627,11 @@ static int do_work_for_cpu(void *_wfc)*/ long work_on_cpu (unsigned int cpu,long (*fn)(void *),void *arg) { -struct task_struct *sub_thread; -struct work_for_cpu wfc = { - .completion =COMPLETION_INITIALIZER_ONSTACK (wfc.completion), - .fn = fn, - .arg = arg, - }; +struct work_for_cpu wfc = { .fn = fn, .arg = arg }; - sub_thread =kthread_create (do_work_for_cpu, &wfc,"work_for_cpu" ); -if (IS_ERR (sub_thread)) -return PTR_ERR (sub_thread); -kthread_bind (sub_thread, cpu); -wake_up_process (sub_thread); -wait_for_completion (&wfc.completion); +INIT_WORK_ONSTACK (&wfc.work, work_for_cpu_fn); +schedule_work_on (cpu, &wfc.work); +flush_work (&wfc.work);return wfc.ret; }EXPORT_SYMBOL_GPL (work_on_cpu);
mm/memory_hotplug.c +10 -6
@@ -116,9 +116,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)struct mem_section *ms;struct page *page, *memmap; -if (!pfn_valid (start_pfn)) -return ; - section_nr =pfn_to_section_nr (start_pfn); ms =__nr_to_section (section_nr);
@@ -177,9 +174,16 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat) end_pfn = pfn + pgdat->node_spanned_pages;/* register_section info */ -for (; pfn < end_pfn; pfn +=PAGES_PER_SECTION ) - register_page_bootmem_info_section(pfn); - +for (; pfn < end_pfn; pfn +=PAGES_PER_SECTION ) { +/* +* Some platforms can assign the same pfn to multiple nodes - on +* node0 as well as nodeN. To avoid registering a pfn against +* multiple nodes we check that this pfn does not already +* reside in some other node. +*/ +if (pfn_valid (pfn) && (pfn_to_nid (pfn) == node)) +register_page_bootmem_info_section (pfn); + } }#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
mm/page_alloc.c +1 -1
@@ -540,7 +540,7 @@ static inline void __free_one_page(struct page *page, combined_idx = buddy_idx & page_idx; higher_page = page + (combined_idx - page_idx); buddy_idx =__find_buddy_index (combined_idx, order +1 ); - higher_buddy = page + (buddy_idx - combined_idx); + higher_buddy = higher_page + (buddy_idx - combined_idx);if (page_is_buddy (higher_page, higher_buddy, order +1 )) {list_add_tail (&page->lru, &zone->free_area[order].free_list[migratetype]);
net/atm/common.c +1 -0
@@ -784,6 +784,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname,if (!vcc->dev || !test_bit (ATM_VF_ADDR , &vcc->flags))return -ENOTCONN ; +memset (&pvc,0 ,sizeof (pvc)); pvc.sap_family =AF_ATMPVC ; pvc.sap_addr.itf = vcc->dev->number; pvc.sap_addr.vpi = vcc->vpi;
net/atm/pvc.c +1 -0
@@ -94,6 +94,7 @@ static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr,return -ENOTCONN ; *sockaddr_len =sizeof (struct sockaddr_atmpvc ); addr = (struct sockaddr_atmpvc *)sockaddr; +memset (addr,0 ,sizeof (*addr)); addr->sap_family =AF_ATMPVC ; addr->sap_addr.itf = vcc->dev->number; addr->sap_addr.vpi = vcc->vpi;
net/bluetooth/hci_sock.c +2 -0
@@ -432,6 +432,7 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr, int *add *addr_len =sizeof (*haddr); haddr->hci_family =AF_BLUETOOTH ; haddr->hci_dev = hdev->id; + haddr->hci_channel=0 ;release_sock (sk);return 0 ;
@@ -644,6 +645,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char {struct hci_filter *f = &hci_pi (sk)->filter; +memset (&uf,0 ,sizeof (uf)); uf.type_mask = f->type_mask; uf.opcode = f->opcode; uf.event_mask[0 ] = *((u32 *) f->event_mask +0 );
net/bluetooth/l2cap_sock.c +1 -0
@@ -329,6 +329,7 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *lBT_DBG ("sock %p, sk %p" , sock, sk); +memset (la,0 ,sizeof (struct sockaddr_l2 )); addr->sa_family =AF_BLUETOOTH ; *len =sizeof (struct sockaddr_l2 );
net/bluetooth/rfcomm/sock.c +1 -0
@@ -544,6 +544,7 @@ static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *BT_DBG ("sock %p, sk %p" , sock, sk); +memset (sa,0 ,sizeof (*sa)); sa->rc_family =AF_BLUETOOTH ; sa->rc_channel =rfcomm_pi (sk)->channel;if (peer)
net/bluetooth/rfcomm/tty.c +1 -1
@@ -471,7 +471,7 @@ static int rfcomm_get_dev_list(void __user *arg) size =sizeof (*dl) + dev_num *sizeof (*di); - dl =kmalloc (size,GFP_KERNEL ); + dl =kzalloc (size,GFP_KERNEL );if (!dl)return -ENOMEM ;
net/core/dev.c +11 -3
@@ -1045,6 +1045,8 @@ rollback:*/ int dev_set_alias (struct net_device *dev,const char *alias,size_t len) { +char *new_ifalias; +ASSERT_RTNL ();if (len >=IFALIASZ )
@@ -1058,9 +1060,10 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len)return 0 ; } - dev->ifalias =krealloc (dev->ifalias, len +1 ,GFP_KERNEL ); -if (!dev->ifalias) + new_ifalias =krealloc (dev->ifalias, len +1 ,GFP_KERNEL ); +if (!new_ifalias)return -ENOMEM ; + dev->ifalias = new_ifalias;strlcpy (dev->ifalias, alias, len+1 );return len;
@@ -2050,6 +2053,9 @@ u32 netif_skb_features(struct sk_buff *skb)__be16 protocol = skb->protocol;u32 features = skb->dev->features; +if (skb_shinfo (skb)->gso_segs > skb->dev->gso_max_segs) + features &= ~NETIF_F_GSO_MASK ; +if (protocol ==htons (ETH_P_8021Q )) {struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; protocol = veh->h_vlan_encapsulated_proto;
@@ -5870,6 +5876,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,dev_net_set (dev, &init_net); dev->gso_max_size =GSO_MAX_SIZE ; + dev->gso_max_segs =GSO_MAX_SEGS ;INIT_LIST_HEAD (&dev->ethtool_ntuple_list.list); dev->ethtool_ntuple_list.count =0 ;
@@ -6253,7 +6260,8 @@ static struct hlist_head *netdev_create_hash(void)/* Initialize per network namespace state */ static int __net_init netdev_init (struct net *net) { -INIT_LIST_HEAD (&net->dev_base_head); +if (net != &init_net) +INIT_LIST_HEAD (&net->dev_base_head); net->dev_name_head =netdev_create_hash ();if (net->dev_name_head ==NULL )
net/core/drop_monitor.c +59 -54
125 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.