Linux 2.6.37.3
Subsystems (51)
I'm announcing the release of the 2.6.37.3 kernel.
All users of the 2.6.37 kernel series must upgrade.
The updated 2.6.37.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.37.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git;a=summarythanks,
greg k-h
------------
Documentation/networking/dns_resolver.txt | 9 ++ Makefile | 2 arch/x86/include/asm/acpi.h | 1 arch/x86/include/asm/smpboot_hooks.h | 2 arch/x86/kernel/acpi/boot.c | 14 ++- arch/x86/kernel/early-quirks.c | 16 +--- block/blk-core.c | 18 +---- block/blk-flush.c | 8 +- block/blk-throttle.c | 29 +++++--- block/cfq-iosched.c | 6 - block/elevator.c | 4 - block/genhd.c | 2 drivers/acpi/debugfs.c | 20 +++-- drivers/block/floppy.c | 2 drivers/block/loop.c | 5 - drivers/bluetooth/ath3k.c | 5 + drivers/bluetooth/btusb.c | 12 ++- drivers/gpu/drm/drm_irq.c | 3 drivers/gpu/drm/i915/i915_dma.c | 11 +++ drivers/gpu/drm/radeon/radeon_display.c | 2 drivers/md/linear.c | 1 drivers/md/md.c | 25 ++++++- drivers/md/md.h | 2 drivers/md/multipath.c | 1 drivers/md/raid0.c | 1 drivers/md/raid1.c | 6 + drivers/md/raid10.c | 7 + drivers/md/raid5.c | 1 drivers/mfd/tps6586x.c | 10 +- drivers/mfd/ucb1x00-ts.c | 12 ++- drivers/net/e1000e/ich8lan.c | 16 +++- drivers/net/e1000e/netdev.c | 3 drivers/net/e1000e/phy.c | 14 +++ drivers/net/r8169.c | 6 + drivers/net/tg3.c | 8 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 9 +- drivers/net/wireless/ath/carl9170/usb.c | 2 drivers/net/wireless/p54/p54pci.c | 14 ++- drivers/net/wireless/p54/p54usb.c | 1 drivers/rtc/rtc-ds3232.c | 14 ++- drivers/scsi/scsi_lib.c | 2 drivers/scsi/scsi_transport_fc.c | 2 drivers/staging/brcm80211/sys/wl_mac80211.c | 14 ++- drivers/staging/brcm80211/sys/wlc_mac80211.c | 14 +++ drivers/staging/brcm80211/sys/wlc_pub.h | 2 drivers/staging/comedi/drivers/mite.c | 2 drivers/staging/comedi/drivers/ni_6527.c | 4 + drivers/staging/comedi/drivers/ni_65xx.c | 4 + drivers/staging/comedi/drivers/ni_660x.c | 4 + drivers/staging/comedi/drivers/ni_670x.c | 4 + drivers/staging/comedi/drivers/ni_pcidio.c | 4 + drivers/staging/comedi/drivers/ni_pcimio.c | 4 + drivers/staging/usbip/vhci.h | 6 - drivers/staging/usbip/vhci_hcd.c | 54 +++++++++++++-- drivers/staging/usbip/vhci_rx.c | 15 ++-- drivers/usb/core/hub.c | 23 +++--- drivers/usb/core/quirks.c | 8 ++ drivers/usb/host/xhci-ring.c | 40 ++++++----- drivers/usb/musb/musb_core.c | 1 drivers/usb/musb/omap2430.c | 1 drivers/usb/serial/sierra.c | 3 drivers/usb/serial/usb_wwan.c | 15 ++-- drivers/usb/serial/visor.c | 12 +++ fs/block_dev.c | 12 +-- fs/eventpoll.c | 95 +++++++++++++++++++++++++++ fs/ext2/namei.c | 9 -- fs/fuse/file.c | 52 ++++++++++++-- fs/fuse/fuse_i.h | 6 + fs/gfs2/main.c | 9 -- fs/inode.c | 31 ++++++-- fs/internal.h | 2 fs/nilfs2/btnode.c | 5 - fs/nilfs2/btnode.h | 1 fs/nilfs2/mdt.c | 4 - fs/nilfs2/page.h | 1 fs/nilfs2/segment.c | 3 fs/nilfs2/super.c | 2 fs/ocfs2/refcounttree.c | 7 + fs/ocfs2/super.c | 28 +++++-- fs/partitions/ldm.c | 5 + include/drm/drmP.h | 2 include/linux/blkdev.h | 5 - include/linux/fs.h | 4 - include/linux/pm.h | 2 include/linux/pm_wakeup.h | 25 +++---- include/linux/vmstat.h | 10 +- kernel/time/tick-broadcast.c | 10 ++ kernel/time/tick-common.c | 6 + kernel/time/tick-internal.h | 3 lib/swiotlb.c | 6 + mm/memory.c | 2 mm/page_alloc.c | 5 - mm/vmscan.c | 19 ++++- mm/vmstat.c | 36 +--------- net/dccp/input.c | 7 - net/dns_resolver/dns_key.c | 20 ++++- net/ipv4/devinet.c | 30 +++++--- net/ipv4/inet_timewait_sock.c | 2 net/wireless/wext-compat.c | 4 - sound/pci/hda/patch_conexant.c | 5 + sound/pci/hda/patch_via.c | 2 sound/soc/imx/eukrea-tlv320.c | 2 sound/soc/pxa/e740_wm9705.c | 4 - sound/soc/pxa/e750_wm9705.c | 4 - sound/soc/pxa/e800_wm9712.c | 4 - sound/soc/pxa/em-x270.c | 4 - sound/soc/pxa/mioa701_wm9713.c | 4 - sound/soc/pxa/palm27x.c | 4 - sound/soc/pxa/tosa.c | 4 - sound/soc/pxa/zylonite.c | 4 - sound/usb/card.c | 4 + sound/usb/pcm.c | 7 + sound/usb/usbaudio.h | 1 113 files changed, 763 insertions(+), 322 deletions(-)
Alan Stern (2):
USB: add quirks entry for Keytouch QWERTY Panel
USB: prevent buggy hubs from crashing the USB stack
Alex Deucher (1):
Revert "drm/radeon/kms: switch back to min->max pll post divider iteration"
Andreas Herrmann (1):
x86 quirk: Fix polarity for IRQ0 pin2 override on SB800 systems
Arend van Spriel (1):
staging: brcm80211: remove assert to avoid panic since 2.6.37 kernel
Bruce Allan (2):
e1000e: 82579 PHY incorrectly identified during init
e1000e: disable broken PHY wakeup for ICH10 LOMs, use MAC wakeup instead
Christian Lamparter (2):
p54pci: update receive dma buffers before and after processing
p54usb: add Senao NUB-350 usbid
Daniel J Blueman (1):
fix cfg80211_wext_siwfreq lock ordering...
Dave Airlie (1):
drm: fix unsigned vs signed comparison issue in modeset ctl ioctl.
David Henningsson (3):
ALSA: HDA: Add a new Conexant codec 506e (20590)
ALSA: HDA: Fix mic initialization in VIA auto parser
ALSA: HDA: Add ideapad quirk for two Dell machines
David Howells (1):
DNS: Fix a NULL pointer deref when trying to read an error key [CVE-2011-1076]
Davide Libenzi (1):
epoll: prevent creating circular epoll structures
Dmitry Eremin-Solenikov (1):
ASoC: correct pxa AC97 DAI names
Don Zickus (1):
x86: Use u32 instead of long to set reset vector back to 0
Eric Bénard (1):
eukrea-tlv320: fix platform_name
Eric Dumazet (1):
tcp: fix inet_twsk_deschedule()
FUJITA Tomonori (1):
swiotlb: fix wrong panic
Felipe Balbi (1):
usb: musb: core: set has_tt flag
Gerrit Renker (1):
dccp: fix oops on Reset after close
Greg Kroah-Hartman (1):
Linux 2.6.37.3
Ian Abbott (1):
Staging: comedi: Add MODULE_LICENSE and similar to NI modules
Ian Campbell (1):
arp_notify: unconditionally send gratuitous ARP for NETDEV_NOTIFY_PEERS.
Jan Niehusmann (1):
drm/i915: fix memory corruption with GM965 and >4GB RAM
Jan Puk (1):
carl9170: add Airlive X.USB a/b/g/n USBID
Jiri Slaby (1):
USB: serial/usb_wwan, fix tty NULL dereference
Jochen Friedrich (1):
mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo
Johan Hovold (1):
usb: musb: omap2430: fix kernel panic on reboot
Jon Thomas (1):
sierra: add new ID for Airprime/Sierra USB IP modem
Josh Hunt (1):
ext2: Fix link count corruption under heavy link+rename load
Lei Xu (1):
drivers/rtc/rtc-ds3232.c: fix time range difference between linux and RTC chip
Linus Torvalds (1):
Revert "Bluetooth: Enable USB autosuspend by default on btusb"
Luben Tuikov (1):
USB: Reset USB 3.0 devices on (re)discovery
Maciej Szmigiero (2):
USB: Add Samsung SGH-I500/Android modem ID switch to visor driver
USB: Add quirk for Samsung Android phone modem
Mark Fasheh (1):
ocfs2: Check heartbeat mode for kernel stacks only
Matt Carlson (1):
tg3: Restrict phy ioctl access
Max Vozeler (4):
staging: usbip: vhci: update reference count for usb_device
staging: usbip: vhci: give back URBs from in-flight unlink requests
staging: usbip: vhci: refuse to enqueue for dead connections
staging: usbip: vhci: use urb->dev->portnum to find port
Mel Gorman (1):
mm: vmstat: use a single setter function and callback for adjusting percpu thresholds
Miklos Szeredi (2):
mm: prevent concurrent unmap_mapping_range() on the same inode
fuse: fix hang of single threaded fuseblk filesystem
Namhyung Kim (1):
mm: fix dubious code in __count_immobile_pages()
NeilBrown (4):
md: correctly handle probe of an 'mdp' device.
md: avoid spinlock problem in blk_throtl_exit
md: Fix - again - partition detection when array becomes active Fix over-zealous flush_disk when changing device size.
Oliver Neukum (1):
Bluetooth: fix crash with quirky dongles doing sound
Paul Zimmerman (4):
xhci: Avoid BUG() in interrupt context
xhci: Clarify some expressions in the TRB math
xhci: Fix errors in the running total calculations in the TRB math
xhci: Fix an error in count_sg_trbs_needed()
Petr Uzel (1):
block: kill loop_mutex
Rafael J. Wysocki (1):
PM: Make ACPI wakeup from S5 work again when CONFIG_PM_SLEEP is unset
Roland Vossen (1):
staging: brcm80211: bugfix for softmac crash on multi cpu configurations
Ryusuke Konishi (1):
nilfs2: fix regression that i-flag is not set on changeless checkpoints
Stanislaw Gruszka (1):
r8169: disable ASPM
Sujith Manoharan (1):
ath9k_htc: Fix an endian issue
Takashi Iwai (1):
ALSA: usb-audio: fix oops due to cleanup race when disconnecting
Tejun Heo (2):
block: add @force_kblockd to __blk_run_queue()
block: blk-flush shouldn't call directly into q->request_fn() __blk_run_queue()
Thomas Gleixner (1):
clockevents: Prevent oneshot mode when broadcast device is periodic
Timo Warns (1):
ldm: corrupted partition table can cause kernel oops
Tristan Ye (1):
Ocfs2/refcounttree: Fix a bug for refcounttree to writeback clusters in a right number.
Vasiliy Kulikov (1):
ACPI / debugfs: Fix buffer overflows, double free
Vivek Goyal (1):
blk-throttle: Do not use kblockd workqueue for throtl work
Yu-Chen Cho (2):
Bluetooth: add Atheros BT AR9285 fw supported
Bluetooth: Add Atheros BT AR5BBU12 fw supported
[email protected] (1):
mfd: Avoid tps6586x burst writes
Documentation/networking/dns_resolver.txt +8 -1
@@ -61,7 +61,6 @@ before the more general line given above as the first match is the one taken. create dns_resolver foo:* * /usr/sbin/dns.foo %k - ===== USAGE =====
@@ -104,6 +103,14 @@ implemented in the module can be called after doing: returned also. +=============================== +READING DNS KEYS FROM USERSPACE +=============================== + +Keys of dns_resolver type can be read from userspace using keyctl_read() or +"keyctl read/print/pipe". + + ========= MECHANISM =========
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 37 -EXTRAVERSION = .2 +EXTRAVERSION = .3 NAME = Flesh-Eating Bats with Fangs # *DOCUMENTATION*
arch/x86/include/asm/acpi.h +1 -0
@@ -88,6 +88,7 @@ extern int acpi_disabled;extern int acpi_pci_disabled;extern int acpi_skip_timer_override;extern int acpi_use_timer_override; +extern int acpi_fix_pin2_polarity;extern u8 acpi_sci_flags;extern int acpi_sci_override_gsi;
arch/x86/include/asm/smpboot_hooks.h +1 -1
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)*/ CMOS_WRITE (0 ,0xf ); - *((volatile long *)phys_to_virt (apic->trampoline_phys_low)) =0 ; + *((volatile u32 *)phys_to_virt (apic->trampoline_phys_low)) =0 ; }static inline void __init smpboot_setup_io_apic (void )
arch/x86/kernel/acpi/boot.c +10 -4
@@ -72,6 +72,7 @@ u8 acpi_sci_flags __initdata;int acpi_sci_override_gsi__initdata ;int acpi_skip_timer_override__initdata ;int acpi_use_timer_override__initdata ; +int acpi_fix_pin2_polarity__initdata ;#ifdef CONFIG_X86_LOCAL_APIC static u64 acpi_lapic_addr__initdata =APIC_DEFAULT_PHYS_BASE ;
@@ -410,10 +411,15 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,return 0 ; } -if (acpi_skip_timer_override && - intsrc->source_irq ==0 && intsrc->global_irq ==2 ) { -printk (PREFIX "BIOS IRQ0 pin2 override ignored.\n" ); -return 0 ; +if (intsrc->source_irq ==0 && intsrc->global_irq ==2 ) { +if (acpi_skip_timer_override) { +printk (PREFIX "BIOS IRQ0 pin2 override ignored.\n" ); +return 0 ; + } +if (acpi_fix_pin2_polarity && (intsrc->inti_flags &ACPI_MADT_POLARITY_MASK )) { + intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK ; +printk (PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n" ); + } } mp_override_legacy_irq(intsrc->source_irq,
arch/x86/kernel/early-quirks.c +7 -9
@@ -143,15 +143,10 @@ static void __init ati_bugs(int num, int slot, int func)static u32 __init ati_sbx00_rev (int num,int slot,int func) { -u32 old, d; +u32 d; - d =read_pci_config (num, slot, func,0x70 ); - old = d; - d &= ~(1 <<8 ); -write_pci_config (num, slot, func,0x70 , d); d =read_pci_config (num, slot, func,0x8 ); d &=0xff ; -write_pci_config (num, slot, func,0x70 , old);return d; }
@@ -160,13 +155,16 @@ static void __init ati_bugs_contd(int num, int slot, int func) {u32 d, rev; -if (acpi_use_timer_override) -return ; - rev =ati_sbx00_rev (num, slot, func); +if (rev >=0x40 ) + acpi_fix_pin2_polarity =1 ; +if (rev >0x13 )return ; +if (acpi_use_timer_override) +return ; +/* check for IRQ0 interrupt swap */ d =read_pci_config (num, slot, func,0x64 );if (!(d & (1 <<14 )))
block/blk-core.c +6 -12
@@ -352,7 +352,7 @@ void blk_start_queue(struct request_queue *q)WARN_ON (!irqs_disabled ());queue_flag_clear (QUEUE_FLAG_STOPPED , q); -__blk_run_queue (q); +__blk_run_queue (q, false); }EXPORT_SYMBOL (blk_start_queue);
@@ -403,13 +403,14 @@ EXPORT_SYMBOL(blk_sync_queue);/** * __blk_run_queue - run a single device queue * @q: The queue to run +* @force_kblockd: Don't run @q->request_fn directly. Use kblockd. * * Description: * See @blk_run_queue. This variant must be called with the queue lock * held and interrupts disabled. * */ -void __blk_run_queue (struct request_queue *q) +void __blk_run_queue (struct request_queue *q,bool force_kblockd) {blk_remove_plug (q);
@@ -423,7 +424,7 @@ void __blk_run_queue(struct request_queue *q)* Only recurse once to avoid overrunning the stack, let the unplug * handling reinvoke the handler shortly if we already got there. */ -if (!queue_flag_test_and_set (QUEUE_FLAG_REENTER , q)) { +if (!force_kblockd && !queue_flag_test_and_set (QUEUE_FLAG_REENTER , q)) { q->request_fn (q);queue_flag_clear (QUEUE_FLAG_REENTER , q); }else {
@@ -446,7 +447,7 @@ void blk_run_queue(struct request_queue *q)unsigned long flags;spin_lock_irqsave (q->queue_lock, flags); -__blk_run_queue (q); +__blk_run_queue (q, false);spin_unlock_irqrestore (q->queue_lock, flags); }EXPORT_SYMBOL (blk_run_queue);
@@ -1053,7 +1054,7 @@ void blk_insert_request(struct request_queue *q, struct request *rq,drive_stat_acct (rq,1 );__elv_add_request (q, rq, where,0 ); -__blk_run_queue (q); +__blk_run_queue (q, false);spin_unlock_irqrestore (q->queue_lock, flags); }EXPORT_SYMBOL (blk_insert_request);
@@ -2610,13 +2611,6 @@ int kblockd_schedule_work(struct request_queue *q, struct work_struct *work) }EXPORT_SYMBOL (kblockd_schedule_work); -int kblockd_schedule_delayed_work (struct request_queue *q, -struct delayed_work *dwork,unsigned long delay) -{ -return queue_delayed_work (kblockd_workqueue, dwork, delay); -} -EXPORT_SYMBOL (kblockd_schedule_delayed_work); - int __init blk_dev_init(void) { BUILD_BUG_ON(__REQ_NR_BITS > 8 *
block/blk-flush.c +5 -3
@@ -66,10 +66,12 @@ static void blk_flush_complete_seq_end_io(struct request_queue *q,/* * Moving a request silently to empty queue_head may stall the -* queue. Kick the queue in those cases. +* queue. Kick the queue in those cases. This function is called +* from request completion path and calling directly into +* request_fn may confuse the driver. Always use kblockd. */ if (was_empty && next_rq) -__blk_run_queue (q); +__blk_run_queue (q, true); }static void pre_flush_end_io (struct request *rq,int error)
@@ -130,7 +132,7 @@ static struct request *queue_next_fseq(struct request_queue *q)BUG (); } -elv_insert (q, rq,ELEVATOR_INSERT_FRONT ); +elv_insert (q, rq,ELEVATOR_INSERT_REQUEUE );return rq; }
block/blk-throttle.c +18 -11
@@ -20,6 +20,11 @@ static int throtl_quantum = 32;/* Throttling is performed over 100ms slice and after that slice is renewed */ static unsigned long throtl_slice =HZ /10 ;/* 100 ms */ +/* A workqueue to queue throttle related work */ +static struct workqueue_struct *kthrotld_workqueue; +static void throtl_schedule_delayed_work (struct throtl_data *td, +unsigned long delay); +struct throtl_rb_root {struct rb_root rb;struct rb_node *left;
@@ -337,10 +342,9 @@ static void throtl_schedule_next_dispatch(struct throtl_data *td)update_min_dispatch_time (st);if (time_before_eq (st->min_disptime, jiffies)) -throtl_schedule_delayed_work (td->queue,0 ); +throtl_schedule_delayed_work (td,0 );else -throtl_schedule_delayed_work (td->queue, - (st->min_disptime - jiffies)); +throtl_schedule_delayed_work (td, (st->min_disptime - jiffies)); } static inline void
@@ -807,10 +811,10 @@ void blk_throtl_work(struct work_struct *work) }/* Call with queue lock held */ -void throtl_schedule_delayed_work (struct request_queue *q,unsigned long delay) +static void +throtl_schedule_delayed_work (struct throtl_data *td,unsigned long delay) { -struct throtl_data *td = q->td;struct delayed_work *dwork = &td->throtl_work;if (total_nr_queued (td) >0 ) {
@@ -819,12 +823,11 @@ void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay)* Cancel that and schedule a new one. */ __cancel_delayed_work (dwork); -kblockd_schedule_delayed_work (q, dwork, delay); +queue_delayed_work (kthrotld_workqueue, dwork, delay);throtl_log (td,"schedule work. delay=%lu jiffies=%lu" , delay, jiffies); } } -EXPORT_SYMBOL (throtl_schedule_delayed_work);static void throtl_destroy_tg (struct throtl_data *td,struct throtl_grp *tg)
@@ -912,7 +915,7 @@ static void throtl_update_blkio_group_read_bps(void *key,smp_mb__after_atomic_inc ();/* Schedule a work now to process the limit change */ -throtl_schedule_delayed_work (td->queue,0 ); +throtl_schedule_delayed_work (td,0 ); } static void throtl_update_blkio_group_write_bps(void *key,
@@ -926,7 +929,7 @@ static void throtl_update_blkio_group_write_bps(void *key,smp_mb__before_atomic_inc ();atomic_inc (&td->limits_changed);smp_mb__after_atomic_inc (); -throtl_schedule_delayed_work (td->queue,0 ); +throtl_schedule_delayed_work (td,0 ); } static void throtl_update_blkio_group_read_iops(void *key,
@@ -940,7 +943,7 @@ static void throtl_update_blkio_group_read_iops(void *key,smp_mb__before_atomic_inc ();atomic_inc (&td->limits_changed);smp_mb__after_atomic_inc (); -throtl_schedule_delayed_work (td->queue,0 ); +throtl_schedule_delayed_work (td,0 ); } static void throtl_update_blkio_group_write_iops(void *key,
@@ -954,7 +957,7 @@ static void throtl_update_blkio_group_write_iops(void *key,smp_mb__before_atomic_inc ();atomic_inc (&td->limits_changed);smp_mb__after_atomic_inc (); -throtl_schedule_delayed_work (td->queue,0 ); +throtl_schedule_delayed_work (td,0 ); }void throtl_shutdown_timer_wq (struct request_queue *q)
@@ -1127,6 +1130,10 @@ void blk_throtl_exit(struct request_queue *q)static int __init throtl_init (void ) { + kthrotld_workqueue =alloc_workqueue ("kthrotld" ,WQ_MEM_RECLAIM ,0 ); +if (!kthrotld_workqueue) +panic ("Failed to create kthrotld\n" ); +blkio_policy_register (&blkio_policy_throtl);return 0 ; }
block/cfq-iosched.c +3 -3
@@ -3335,7 +3335,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, cfqd->busy_queues > 1) { cfq_del_timer(cfqd, cfqq); cfq_clear_cfqq_wait_request(cfqq); - __blk_run_queue(cfqd->queue); + __blk_run_queue(cfqd->queue, false); } else {cfq_blkiocg_update_idle_time_stats ( &cfqq->cfqg->blkg);
@@ -3350,7 +3350,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,* this new queue is RT and the current one is BE */ cfq_preempt_queue (cfqd, cfqq); -__blk_run_queue (cfqd->queue); +__blk_run_queue (cfqd->queue, false); } }
@@ -3711,7 +3711,7 @@ static void cfq_kick_queue(struct work_struct *work)struct request_queue *q = cfqd->queue;spin_lock_irq (q->queue_lock); -__blk_run_queue (cfqd->queue); +__blk_run_queue (cfqd->queue, false);spin_unlock_irq (q->queue_lock); }
block/elevator.c +2 -2
@@ -602,7 +602,7 @@ void elv_quiesce_start(struct request_queue *q)*/ elv_drain_elevator (q);while (q->rq.elvpriv) { -__blk_run_queue (q); +__blk_run_queue (q, false);spin_unlock_irq (q->queue_lock);msleep (10 );spin_lock_irq (q->queue_lock);
@@ -651,7 +651,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)* with anything. There's no point in delaying queue * processing. */ -__blk_run_queue (q); +__blk_run_queue (q, false);break ;case ELEVATOR_INSERT_SORT :
block/genhd.c +1 -1
@@ -1285,7 +1285,7 @@ int invalidate_partition(struct gendisk *disk, int partno)struct block_device *bdev =bdget_disk (disk, partno);if (bdev) {fsync_bdev (bdev); - res =__invalidate_device (bdev); + res =__invalidate_device (bdev, true);bdput (bdev); }return res;
drivers/acpi/debugfs.c +14 -6
@@ -26,7 +26,9 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, size_t count, loff_t *ppos) {static char *buf; -static int uncopied_bytes; +static u32 max_size; +static u32 uncopied_bytes; +struct acpi_table_header table;acpi_status status;
@@ -37,19 +39,24 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,if (copy_from_user (&table, user_buf,sizeof (struct acpi_table_header )))return -EFAULT ; - uncopied_bytes = table.length; - buf =kzalloc (uncopied_bytes,GFP_KERNEL ); + uncopied_bytes = max_size = table.length; + buf =kzalloc (max_size,GFP_KERNEL );if (!buf)return -ENOMEM ; } -if (uncopied_bytes < count) { -kfree (buf); +if (buf ==NULL ) +return -EINVAL ; + +if ((*ppos > max_size) || + (*ppos + count > max_size) || + (*ppos + count < count) || + (count > uncopied_bytes))return -EINVAL ; - }if (copy_from_user (buf + (*ppos), user_buf, count)) {kfree (buf); + buf =NULL ;return -EFAULT ; }
@@ -59,6 +66,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,if (!uncopied_bytes) { status =acpi_install_method (buf);kfree (buf); + buf =NULL ;if (ACPI_FAILURE (status))return -EINVAL ;add_taint (TAINT_OVERRIDDEN_ACPI_TABLE );
drivers/block/floppy.c +1 -1
@@ -3276,7 +3276,7 @@ static int set_geometry(unsigned int cmd, struct floppy_struct *g,struct block_device *bdev = opened_bdev[cnt];if (!bdev ||ITYPE (drive_state[cnt].fd_device) != type)continue ; -__invalidate_device (bdev); +__invalidate_device (bdev, true); }mutex_unlock (&open_lock); }else {
drivers/block/loop.c +0 -5
@@ -78,7 +78,6 @@#include <asm/uaccess.h> -static DEFINE_MUTEX (loop_mutex);static LIST_HEAD (loop_devices);static DEFINE_MUTEX (loop_devices_mutex);
@@ -1505,11 +1504,9 @@ static int lo_open(struct block_device *bdev, fmode_t mode) {struct loop_device *lo = bdev->bd_disk->private_data; -mutex_lock (&loop_mutex);mutex_lock (&lo->lo_ctl_mutex); lo->lo_refcnt++;mutex_unlock (&lo->lo_ctl_mutex); -mutex_unlock (&loop_mutex);return 0 ; }
@@ -1519,7 +1516,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)struct loop_device *lo = disk->private_data;int err; -mutex_lock (&loop_mutex);mutex_lock (&lo->lo_ctl_mutex);if (--lo->lo_refcnt)
@@ -1544,7 +1540,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode) out:mutex_unlock (&lo->lo_ctl_mutex); out_unlocked: -mutex_unlock (&loop_mutex);return 0 ; }
drivers/bluetooth/ath3k.c +5 -0
@@ -39,6 +39,11 @@ static struct usb_device_id ath3k_table[] = {/* Atheros AR3011 with sflash firmware*/ { USB_DEVICE(0x0CF3, 0x3002) }, +/* Atheros AR9285 Malbec with sflash firmware */ + { USB_DEVICE(0x03F0, 0x311D) }, + +/* Atheros AR5BBU12 with sflash firmware */ + { USB_DEVICE(0x0489, 0xE02C) }, { } /* Terminating entry */ };
drivers/bluetooth/btusb.c +8 -4
@@ -102,6 +102,12 @@ static struct usb_device_id blacklist_table[] = {/* Atheros 3011 with sflash firmware */ { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, + /* Atheros AR9285 Malbec with sflash firmware */ + { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, + + /* Atheros AR5BBU12 with sflash firmware */ + { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, + /* Broadcom BCM2035 */ { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU }, { USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
@@ -826,7 +832,7 @@ static void btusb_work(struct work_struct *work)if (hdev->conn_hash.sco_num >0 ) {if (!test_bit (BTUSB_DID_ISO_RESUME , &data->flags)) { - err =usb_autopm_get_interface (data->isoc); + err =usb_autopm_get_interface (data->isoc ? data->isoc : data->intf);if (err <0 ) {clear_bit (BTUSB_ISOC_RUNNING , &data->flags);usb_kill_anchored_urbs (&data->isoc_anchor);
@@ -855,7 +861,7 @@ static void btusb_work(struct work_struct *work)__set_isoc_interface (hdev,0 );if (test_and_clear_bit (BTUSB_DID_ISO_RESUME , &data->flags)) -usb_autopm_put_interface (data->isoc); +usb_autopm_put_interface (data->isoc ? data->isoc : data->intf); } }
@@ -1038,8 +1044,6 @@ static int btusb_probe(struct usb_interface *intf,usb_set_intfdata (intf, data); -usb_enable_autosuspend (interface_to_usbdev (intf)); -return 0 ; }
drivers/gpu/drm/drm_irq.c +2 -1
@@ -549,7 +549,8 @@ int drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {struct drm_modeset_ctl *modeset = data; -int crtc, ret =0 ; +int ret =0 ; +unsigned int crtc;/* If drm_vblank_init() hasn't been called yet, just no-op */ if (!dev->num_crtcs)
drivers/gpu/drm/i915/i915_dma.c +11 -0
@@ -1943,6 +1943,17 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)if (IS_GEN2 (dev))dma_set_coherent_mask (&dev->pdev->dev,DMA_BIT_MASK (30 )); +/* 965GM sometimes incorrectly writes to hardware status page (HWS) +* using 32bit addressing, overwriting memory if HWS is located +* above 4GB. +* +* The documentation also mentions an issue with undefined +* behaviour if any general state is accessed within a page above 4GB, +* which also needs to be handled carefully. +*/ +if (IS_BROADWATER (dev) ||IS_CRESTLINE (dev)) +dma_set_coherent_mask (&dev->pdev->dev,DMA_BIT_MASK (32 )); + dev_priv->regs =ioremap (base, size);if (!dev_priv->regs) {DRM_ERROR ("failed to map registers\n" );
drivers/gpu/drm/radeon/radeon_display.c +1 -1
@@ -639,7 +639,7 @@ void radeon_compute_pll_legacy(struct radeon_pll *pll, max_fractional_feed_div = pll->max_frac_feedback_div; } -for (post_div = min_post_div; post_div <= max_post_div; ++post_div) { +for (post_div = max_post_div; post_div >= min_post_div; --post_div) {uint32_t ref_div;if ((pll->flags &RADEON_PLL_NO_ODD_POST_DIV ) && (post_div &1 ))
drivers/md/linear.c +0 -1
@@ -216,7 +216,6 @@ static int linear_run (mddev_t *mddev)if (md_check_no_bitmap (mddev))return -EINVAL ; - mddev->queue->queue_lock = &mddev->queue->__queue_lock; conf =linear_conf (mddev, mddev->raid_disks);if (!conf)
drivers/md/md.c +24 -1
@@ -553,6 +553,9 @@ static mddev_t * mddev_find(dev_t unit) {mddev_t *mddev, *new =NULL ; +if (unit &&MAJOR (unit) !=MD_MAJOR ) + unit &= ~((1 <<MdpMinorShift)-1 ); + retry:spin_lock (&all_mddevs_lock);
@@ -4611,6 +4614,7 @@ static int do_md_run(mddev_t *mddev) }set_capacity (mddev->gendisk, mddev->array_sectors);revalidate_disk (mddev->gendisk); + mddev->changed =1 ;kobject_uevent (&disk_to_dev (mddev->gendisk)->kobj,KOBJ_CHANGE ); out:return err;
@@ -4699,6 +4703,7 @@ static void md_clean(mddev_t *mddev) mddev->sync_speed_min = mddev->sync_speed_max =0 ; mddev->recovery =0 ; mddev->in_sync =0 ; + mddev->changed =0 ; mddev->degraded =0 ; mddev->safemode =0 ; mddev->bitmap_info.offset =0 ;
@@ -4808,6 +4813,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)set_capacity (disk,0 );mutex_unlock (&mddev->open_mutex); + mddev->changed =1 ;revalidate_disk (disk);if (mddev->ro)
@@ -5991,7 +5997,7 @@ static int md_open(struct block_device *bdev, fmode_t mode)atomic_inc (&mddev->openers);mutex_unlock (&mddev->open_mutex); -check_disk_size_change (mddev->gendisk, bdev); +check_disk_change (bdev); out:return err; }
@@ -6006,6 +6012,21 @@ static int md_release(struct gendisk *disk, fmode_t mode)return 0 ; } + +static int md_media_changed (struct gendisk *disk) +{ +mddev_t *mddev = disk->private_data; + +return mddev->changed; +} + +static int md_revalidate (struct gendisk *disk) +{ +mddev_t *mddev = disk->private_data; + + mddev->changed =0 ; +return 0 ; +}static const struct block_device_operations md_fops = { .owner =THIS_MODULE ,
@@ -6016,6 +6037,8 @@ static const struct block_device_operations md_fops = .compat_ioctl = md_compat_ioctl, #endif .getgeo = md_getgeo, + .media_changed = md_media_changed, + .revalidate_disk= md_revalidate, };static int md_thread (void * arg)
drivers/md/md.h +2 -0
@@ -270,6 +270,8 @@ struct mddev_satomic_t active;/* general refcount */ atomic_t openers;/* number of active opens */ +int changed;/* True if we might need to +* reread partition info */ int degraded;/* whether md should consider * adding a spare */
drivers/md/multipath.c +0 -1
@@ -435,7 +435,6 @@ static int multipath_run (mddev_t *mddev)* bookkeeping area. [whatever we allocate in multipath_run(), * should be freed in multipath_stop()] */ - mddev->queue->queue_lock = &mddev->queue->__queue_lock; conf =kzalloc (sizeof (multipath_conf_t),GFP_KERNEL ); mddev->private = conf;
drivers/md/raid0.c +0 -1
@@ -353,7 +353,6 @@ static int raid0_run(mddev_t *mddev)if (md_check_no_bitmap (mddev))return -EINVAL ;blk_queue_max_hw_sectors (mddev->queue, mddev->chunk_sectors); - mddev->queue->queue_lock = &mddev->queue->__queue_lock;/* if private is not null, we are here after takeover */ if (mddev->private ==NULL ) {
drivers/md/raid1.c +4 -2
@@ -593,7 +593,10 @@ static int flush_pending_writes(conf_t *conf)if (conf->pending_bio_list.head) {struct bio *bio; bio =bio_list_get (&conf->pending_bio_list); +/* Only take the spinlock to quiet a warning */ +spin_lock (conf->mddev->queue->queue_lock);blk_remove_plug (conf->mddev->queue); +spin_unlock (conf->mddev->queue->queue_lock);spin_unlock_irq (&conf->device_lock);/* flush any pending bitmap writes to * disk before proceeding w/ I/O */
@@ -959,7 +962,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)atomic_inc (&r1_bio->remaining);spin_lock_irqsave (&conf->device_lock, flags);bio_list_add (&conf->pending_bio_list, mbio); -blk_plug_device (mddev->queue); +blk_plug_device_unlocked (mddev->queue);spin_unlock_irqrestore (&conf->device_lock, flags); }r1_bio_write_done (r1_bio, bio->bi_vcnt, behind_pages, behind_pages !=NULL );
@@ -2024,7 +2027,6 @@ static int run(mddev_t *mddev)if (IS_ERR (conf))return PTR_ERR (conf); - mddev->queue->queue_lock = &conf->device_lock;list_for_each_entry (rdev, &mddev->disks, same_set) {disk_stack_limits (mddev->gendisk, rdev->bdev, rdev->data_offset <<9 );
drivers/md/raid10.c +4 -3
@@ -662,7 +662,10 @@ static int flush_pending_writes(conf_t *conf)if (conf->pending_bio_list.head) {struct bio *bio; bio =bio_list_get (&conf->pending_bio_list); +/* Spinlock only taken to quiet a warning */ +spin_lock (conf->mddev->queue->queue_lock);blk_remove_plug (conf->mddev->queue); +spin_unlock (conf->mddev->queue->queue_lock);spin_unlock_irq (&conf->device_lock);/* flush any pending bitmap writes to disk * before proceeding w/ I/O */
@@ -971,7 +974,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)atomic_inc (&r10_bio->remaining);spin_lock_irqsave (&conf->device_lock, flags);bio_list_add (&conf->pending_bio_list, mbio); -blk_plug_device (mddev->queue); +blk_plug_device_unlocked (mddev->queue);spin_unlock_irqrestore (&conf->device_lock, flags); }
@@ -2303,8 +2306,6 @@ static int run(mddev_t *mddev)if (!conf) goto out; - mddev->queue->queue_lock = &conf->device_lock; - mddev->thread = conf->thread; conf->thread =NULL ;
drivers/md/raid5.c +0 -1
@@ -5205,7 +5205,6 @@ static int run(mddev_t *mddev) mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; - mddev->queue->queue_lock = &conf->device_lock; mddev->queue->unplug_fn = raid5_unplug_queue; chunk_size = mddev->chunk_sectors <<9 ;
drivers/mfd/tps6586x.c +5 -5
@@ -152,12 +152,12 @@ static inline int __tps6586x_write(struct i2c_client *client,static inline int __tps6586x_writes (struct i2c_client *client,int reg,int len,uint8_t *val) { -int ret; +int ret, i; - ret =i2c_smbus_write_i2c_block_data (client, reg, len, val); -if (ret <0 ) { -dev_err (&client->dev,"failed writings to 0x%02x\n" , reg); -return ret; +for (i =0 ; i < len; i++) { + ret =__tps6586x_write (client, reg + i, *(val + i)); +if (ret <0 ) +return ret; }return 0 ;
drivers/mfd/ucb1x00-ts.c +9 -3
@@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) idev->close = ucb1x00_ts_close;__set_bit (EV_ABS , idev->evbit); -__set_bit (ABS_X , idev->absbit); -__set_bit (ABS_Y , idev->absbit); -__set_bit (ABS_PRESSURE , idev->absbit);input_set_drvdata (idev, ts); +ucb1x00_adc_enable (ts->ucb); + ts->x_res =ucb1x00_ts_read_xres (ts); + ts->y_res =ucb1x00_ts_read_yres (ts); +ucb1x00_adc_disable (ts->ucb); + +input_set_abs_params (idev,ABS_X ,0 , ts->x_res,0 ,0 ); +input_set_abs_params (idev,ABS_Y ,0 , ts->y_res,0 ,0 ); +input_set_abs_params (idev,ABS_PRESSURE ,0 ,0 ,0 ,0 ); + err =input_register_device (idev);if (err) goto fail;
drivers/net/e1000e/ich8lan.c +11 -5
@@ -338,12 +338,17 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) } phy->id = e1000_phy_unknown; - ret_val =e1000e_get_phy_id (hw); -if (ret_val) - goto out; -if ((phy->id ==0 ) || (phy->id ==PHY_REVISION_MASK )) { +switch (hw->mac.type) { +default : + ret_val =e1000e_get_phy_id (hw); +if (ret_val) + goto out; +if ((phy->id !=0 ) && (phy->id !=PHY_REVISION_MASK )) +break ; +/* fall-through */ +case e1000_pch2lan:/* -* In case the PHY needs to be in mdio slow mode (eg. 82577), +* In case the PHY needs to be in mdio slow mode, * set slow mode and try to get the PHY id again. */ ret_val =e1000_set_mdio_slow_mode_hv (hw);
@@ -352,6 +357,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) ret_val =e1000e_get_phy_id (hw);if (ret_val) goto out; +break ; } phy->type =e1000e_get_phy_type_from_id (phy->id);
drivers/net/e1000e/netdev.c +2 -1
@@ -5884,7 +5884,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,/* APME bit in EEPROM is mapped to WUC.APME */ eeprom_data =er32 (WUC ); eeprom_apme_mask =E1000_WUC_APME ; -if (eeprom_data &E1000_WUC_PHY_WAKE ) +if ((hw->mac.type > e1000_ich10lan) && + (eeprom_data &E1000_WUC_PHY_WAKE )) adapter->flags2 |=FLAG2_HAS_PHY_WAKEUP ; }else if (adapter->flags &FLAG_APME_IN_CTRL3 ) { if (adapter->flags & FLAG_APME_CHECK_PORT_B &&
drivers/net/e1000e/phy.c +14 -0
@@ -226,6 +226,13 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) } *data = (u16 ) mdic; +/* +* Allow some time after each MDIC transaction to avoid +* reading duplicate data in the next MDIC transaction. +*/ +if (hw->mac.type == e1000_pch2lan) +udelay (100 ); +return 0 ; }
@@ -279,6 +286,13 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)return -E1000_ERR_PHY ; } +/* +* Allow some time after each MDIC transaction to avoid +* reading duplicate data in the next MDIC transaction. +*/ +if (hw->mac.type == e1000_pch2lan) +udelay (100 ); +return 0 ; }
drivers/net/r8169.c +6 -0
@@ -24,6 +24,7 @@#include <linux/init.h> #include <linux/dma-mapping.h> #include <linux/pm_runtime.h> +#include <linux/pci-aspm.h> #include <asm/system.h> #include <asm/io.h>
@@ -3047,6 +3048,11 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) mii->reg_num_mask =0x1f ; mii->supports_gmii = !!(cfg->features &RTL_FEATURE_GMII ); +/* disable ASPM completely as that cause random device stop working +* problems as well as full system hangs for some PCIe devices users */ +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 | +PCIE_LINK_STATE_CLKPM ); +/* enable device (incl. PCI PM wakeup and hotplug setup) */ rc =pci_enable_device (pdev);if (rc <0 ) {
drivers/net/tg3.c +6 -2
@@ -11165,7 +11165,9 @@ static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)if (tp->phy_flags &TG3_PHYFLG_PHY_SERDES )break ;/* We have no PHY */ -if (tp->phy_flags &TG3_PHYFLG_IS_LOW_POWER ) +if ((tp->phy_flags &TG3_PHYFLG_IS_LOW_POWER ) || + ((tp->tg3_flags &TG3_FLAG_ENABLE_ASF ) && + !netif_running (dev)))return -EAGAIN ;spin_lock_bh (&tp->lock);
@@ -11181,7 +11183,9 @@ static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)if (tp->phy_flags &TG3_PHYFLG_PHY_SERDES )break ;/* We have no PHY */ -if (tp->phy_flags &TG3_PHYFLG_IS_LOW_POWER ) +if ((tp->phy_flags &TG3_PHYFLG_IS_LOW_POWER ) || + ((tp->tg3_flags &TG3_FLAG_ENABLE_ASF ) && + !netif_running (dev)))return -EAGAIN ;spin_lock_bh (&tp->lock);
drivers/net/wireless/ath/ath9k/hif_usb.c +5 -4
@@ -210,8 +210,9 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)struct tx_buf *tx_buf =NULL ;struct sk_buff *nskb =NULL ;int ret =0 , i; -u16 *hdr, tx_skb_cnt =0 ; +u16 tx_skb_cnt =0 ;u8 *buf; +__le16 *hdr;if (hif_dev->tx.tx_skb_cnt ==0 )return 0 ;
@@ -236,9 +237,9 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev) buf = tx_buf->buf; buf += tx_buf->offset; - hdr = (u16 *)buf; - *hdr++ = nskb->len; - *hdr++ =ATH_USB_TX_STREAM_MODE_TAG ; + hdr = (__le16 *)buf; + *hdr++ =cpu_to_le16 (nskb->len); + *hdr++ =cpu_to_le16 (ATH_USB_TX_STREAM_MODE_TAG ); buf +=4 ;memcpy (buf, nskb->data, nskb->len); tx_buf->len = nskb->len +4 ;
drivers/net/wireless/ath/carl9170/usb.c +2 -0
@@ -118,6 +118,8 @@ static struct usb_device_id carl9170_usb_ids[] = { { USB_DEVICE(0x057c, 0x8402) },/* Qwest/Actiontec 802AIN Wireless N USB Network Adapter */ { USB_DEVICE(0x1668, 0x1200) }, +/* Airlive X.USB a/b/g/n */ + { USB_DEVICE(0x1b75, 0x9170) }, /* terminate */ {}
drivers/net/wireless/p54/p54pci.c +9 -5
@@ -199,6 +199,7 @@ static void p54p_check_rx_ring(struct ieee80211_hw *dev, u32 *index,while (i != idx) {u16 len;struct sk_buff *skb; +dma_addr_t dma_addr; desc = &ring[i]; len =le16_to_cpu (desc->len); skb = rx_buf[i];
@@ -216,17 +217,20 @@ static void p54p_check_rx_ring(struct ieee80211_hw *dev, u32 *index, len = priv->common.rx_mtu; } + dma_addr =le32_to_cpu (desc->host_addr); +pci_dma_sync_single_for_cpu (priv->pdev, dma_addr, + priv->common.rx_mtu +32 ,PCI_DMA_FROMDEVICE );skb_put (skb, len);if (p54_rx (dev, skb)) { -pci_unmap_single (priv->pdev, -le32_to_cpu (desc->host_addr), - priv->common.rx_mtu +32 , -PCI_DMA_FROMDEVICE ); +pci_unmap_single (priv->pdev, dma_addr, + priv->common.rx_mtu +32 ,PCI_DMA_FROMDEVICE ); rx_buf[i] =NULL ; - desc->host_addr =0 ; + desc->host_addr =cpu_to_le32 (0 ); }else {skb_trim (skb,0 ); +pci_dma_sync_single_for_device (priv->pdev, dma_addr, + priv->common.rx_mtu +32 ,PCI_DMA_FROMDEVICE ); desc->len =cpu_to_le16 (priv->common.rx_mtu +32 ); }
drivers/net/wireless/p54/p54usb.c +1 -0
@@ -98,6 +98,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ + {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ {USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */ {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
drivers/rtc/rtc-ds3232.c +9 -5
@@ -1,7 +1,7 @@/* * RTC client/driver for the Maxim/Dallas DS3232 Real-Time Clock over I2C * -* Copyright (C) 2009-2010 Freescale Semiconductor. +* Copyright (C) 2009-2011 Freescale Semiconductor. * Author: Jack Lan <[email protected]> * * This program is free software; you can redistribute it and/or modify it
@@ -141,9 +141,11 @@ static int ds3232_read_time(struct device *dev, struct rtc_time *time) time->tm_hour =bcd2bin (hour); } - time->tm_wday =bcd2bin (week); +/* Day of the week in linux range is 0~6 while 1~7 in RTC chip */ + time->tm_wday =bcd2bin (week) -1 ; time->tm_mday =bcd2bin (day); - time->tm_mon =bcd2bin (month &0x7F ); +/* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */ + time->tm_mon =bcd2bin (month &0x7F ) -1 ;if (century) add_century =100 ;
@@ -162,9 +164,11 @@ static int ds3232_set_time(struct device *dev, struct rtc_time *time) buf[0 ] =bin2bcd (time->tm_sec); buf[1 ] =bin2bcd (time->tm_min); buf[2 ] =bin2bcd (time->tm_hour); - buf[3 ] =bin2bcd (time->tm_wday);/* Day of the week */ +/* Day of the week in linux range is 0~6 while 1~7 in RTC chip */ + buf[3 ] =bin2bcd (time->tm_wday +1 ); buf[4 ] =bin2bcd (time->tm_mday);/* Date */ - buf[5 ] =bin2bcd (time->tm_mon); +/* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */ + buf[5 ] =bin2bcd (time->tm_mon +1 );if (time->tm_year >=100 ) { buf[5 ] |=0x80 ; buf[6 ] =bin2bcd (time->tm_year -100 );
drivers/scsi/scsi_lib.c +1 -1
@@ -443,7 +443,7 @@ static void scsi_run_queue(struct request_queue *q) &sdev->request_queue->queue_flags);if (flagset)queue_flag_set (QUEUE_FLAG_REENTER , sdev->request_queue); -__blk_run_queue (sdev->request_queue); +__blk_run_queue (sdev->request_queue, false);if (flagset)queue_flag_clear (QUEUE_FLAG_REENTER , sdev->request_queue);spin_unlock (sdev->request_queue->queue_lock);
drivers/scsi/scsi_transport_fc.c +1 -1
@@ -3829,7 +3829,7 @@ fc_bsg_goose_queue(struct fc_rport *rport) !test_bit (QUEUE_FLAG_REENTER , &rport->rqst_q->queue_flags);if (flagset)queue_flag_set (QUEUE_FLAG_REENTER , rport->rqst_q); -__blk_run_queue (rport->rqst_q); +__blk_run_queue (rport->rqst_q, false);if (flagset)queue_flag_clear (QUEUE_FLAG_REENTER , rport->rqst_q);spin_unlock_irqrestore (rport->rqst_q->queue_lock, flags);
drivers/staging/brcm80211/sys/wl_mac80211.c +10 -4
@@ -353,9 +353,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,switch (type) {case NL80211_CHAN_HT20 :case NL80211_CHAN_NO_HT : -WL_LOCK (wl); err =wlc_set (wl->wlc,WLC_SET_CHANNEL , chan->hw_value); -WL_UNLOCK (wl);break ;case NL80211_CHAN_HT40MINUS :case NL80211_CHAN_HT40PLUS :
@@ -376,6 +374,7 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)int err =0 ;int new_int; +WL_LOCK (wl);if (changed &IEEE80211_CONF_CHANGE_LISTEN_INTERVAL ) {WL_NONE (("%s: Setting listen interval to %d\n" , __func__, conf->listen_interval));
@@ -431,6 +430,7 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed) } config_out: +WL_UNLOCK (wl);return err; }
@@ -559,14 +559,20 @@ wl_ops_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)static void wl_ops_sw_scan_start (struct ieee80211_hw *hw) { +struct wl_info *wl = hw->priv;WL_NONE (("Scan Start\n" )); -return ; +WL_LOCK (wl); +wlc_scan_start (wl->wlc); +WL_UNLOCK (wl); }static void wl_ops_sw_scan_complete (struct ieee80211_hw *hw) { +struct wl_info *wl = hw->priv;WL_NONE (("Scan Complete\n" )); -return ; +WL_LOCK (wl); +wlc_scan_stop (wl->wlc); +WL_UNLOCK (wl); }static void wl_ops_set_tsf (struct ieee80211_hw *hw,u64 tsf)
drivers/staging/brcm80211/sys/wlc_mac80211.c +13 -1
@@ -5336,7 +5336,6 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw) fifo = prio2fifo[prio];ASSERT ((uint )PKTHEADROOM (sdu) >=TXOFF ); -ASSERT (!PKTSHARED (sdu));ASSERT (!PKTNEXT (sdu));ASSERT (!PKTLINK (sdu));ASSERT (fifo <NFIFO );
@@ -8673,3 +8672,16 @@ static void wlc_txq_free(wlc_info_t *wlc, osl_t *osh, wlc_txq_info_t *qi)kfree (qi); } + +/* +* Flag 'scan in progress' to withold dynamic phy calibration +*/ +void wlc_scan_start (struct wlc_info *wlc) +{ +wlc_phy_hold_upd (wlc->band->pi,PHY_HOLD_FOR_SCAN , true); +} + +void wlc_scan_stop (struct wlc_info *wlc) +{ +wlc_phy_hold_upd (wlc->band->pi,PHY_HOLD_FOR_SCAN , false); +}
drivers/staging/brcm80211/sys/wlc_pub.h +2 -0
@@ -568,6 +568,8 @@ extern void wlc_enable_mac(struct wlc_info *wlc);extern u16 wlc_rate_shm_offset (struct wlc_info *wlc,u8 rate);extern u32 wlc_get_rspec_history (struct wlc_bsscfg *cfg);extern u32 wlc_get_current_highest_rate (struct wlc_bsscfg *cfg); +extern void wlc_scan_start (struct wlc_info *wlc); +extern void wlc_scan_stop (struct wlc_info *wlc);static inline int wlc_iovar_getuint (struct wlc_info *wlc,const char *name,uint *arg)
drivers/staging/comedi/drivers/mite.c +0 -2
@@ -61,8 +61,6 @@#define PCI_DAQ_SIZE 4096#define PCI_DAQ_SIZE_660X 8192 -MODULE_LICENSE ("GPL" ); -struct mite_struct *mite_devices;EXPORT_SYMBOL (mite_devices);
drivers/staging/comedi/drivers/ni_6527.c +4 -0
@@ -527,3 +527,7 @@ static void __exit driver_ni6527_cleanup_module(void)module_init (driver_ni6527_init_module);module_exit (driver_ni6527_cleanup_module); + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/comedi/drivers/ni_65xx.c +4 -0
@@ -871,3 +871,7 @@ static void __exit driver_ni_65xx_cleanup_module(void)module_init (driver_ni_65xx_init_module);module_exit (driver_ni_65xx_cleanup_module); + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/comedi/drivers/ni_660x.c +4 -0
@@ -1421,3 +1421,7 @@ static int ni_660x_dio_insn_config(struct comedi_device *dev, };return 0 ; } + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/comedi/drivers/ni_670x.c +4 -0
@@ -384,3 +384,7 @@ static int ni_670x_find_device(struct comedi_device *dev, int bus, int slot)mite_list_devices ();return -EIO ; } + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/comedi/drivers/ni_pcidio.c +4 -0
@@ -1354,3 +1354,7 @@ static void __exit driver_pcidio_cleanup_module(void)module_init (driver_pcidio_init_module);module_exit (driver_pcidio_cleanup_module); + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/comedi/drivers/ni_pcimio.c +4 -0
@@ -1853,3 +1853,7 @@ static int pcimio_dio_change(struct comedi_device *dev,return 0 ; } + +MODULE_AUTHOR ("Comedi http://www.comedi.org" ); +MODULE_DESCRIPTION ("Comedi low-level driver" ); +MODULE_LICENSE ("GPL" );
drivers/staging/usbip/vhci.h +3 -3
@@ -100,9 +100,6 @@ struct vhci_hcd {* But, the index of this array begins from 0. */ struct vhci_device vdev[VHCI_NPORTS ]; - -/* vhci_device which has not been assiged its address yet */ -int pending_port; };
@@ -119,6 +116,9 @@ void rh_port_disconnect(int rhport);void vhci_rx_loop (struct usbip_task *ut);void vhci_tx_loop (struct usbip_task *ut); +struct urb *pickup_urb_and_free_priv (struct vhci_device *vdev, +__u32 seqnum); +#define hardware (&the_controller->pdev.dev)static inline struct vhci_device *port_to_vdev (__u32 port)
drivers/staging/usbip/vhci_hcd.c +46 -8
113 lines not on this page · raw message
drivers/staging/usbip/vhci_rx.c +9 -6
@@ -23,16 +23,14 @@#include "vhci.h" -/* get URB from transmitted urb queue */ -static struct urb *pickup_urb_and_free_priv (struct vhci_device *vdev, +/* get URB from transmitted urb queue. caller must hold vdev->priv_lock */ +struct urb *pickup_urb_and_free_priv (struct vhci_device *vdev,__u32 seqnum) {struct vhci_priv *priv, *tmp;struct urb *urb =NULL ;int status; -spin_lock (&vdev->priv_lock); -list_for_each_entry_safe (priv, tmp, &vdev->priv_rx, list) {if (priv->seqnum == seqnum) { urb = priv->urb;
@@ -63,8 +61,6 @@ static struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, } } -spin_unlock (&vdev->priv_lock); -return urb; }
@@ -74,9 +70,11 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,struct usbip_device *ud = &vdev->ud;struct urb *urb; +spin_lock (&vdev->priv_lock); urb =pickup_urb_and_free_priv (vdev, pdu->base.seqnum); +spin_unlock (&vdev->priv_lock);if (!urb) { usbip_uerr("cannot find a urb of seqnum %u\n",
@@ -161,7 +159,12 @@ static void vhci_recv_ret_unlink(struct vhci_device *vdev,return ; } +spin_lock (&vdev->priv_lock); + urb =pickup_urb_and_free_priv (vdev, unlink->unlink_seqnum); + +spin_unlock (&vdev->priv_lock); +if (!urb) {/* * I get the result of a unlink request. But, it seems that I
drivers/usb/core/hub.c +12 -11
@@ -2672,17 +2672,13 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,mutex_lock (&usb_address0_mutex); -if (!udev->config && oldspeed ==USB_SPEED_SUPER ) { -/* Don't reset USB 3.0 devices during an initial setup */ -usb_set_device_state (udev,USB_STATE_DEFAULT ); - }else { -/* Reset the device; full speed may morph to high speed */ -/* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */ - retval =hub_port_reset (hub, port1, udev, delay); -if (retval <0 )/* error or disconnect */ - goto fail; -/* success, speed is known */ - } +/* Reset the device; full speed may morph to high speed */ +/* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */ + retval =hub_port_reset (hub, port1, udev, delay); +if (retval <0 )/* error or disconnect */ + goto fail; +/* success, speed is known */ + retval = -ENODEV ;if (oldspeed !=USB_SPEED_UNKNOWN && oldspeed != udev->speed) {
@@ -2744,6 +2740,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, udev->ttport = hdev->ttport; }else if (udev->speed !=USB_SPEED_HIGH && hdev->speed ==USB_SPEED_HIGH ) { +if (!hub->tt.hub) { +dev_err (&udev->dev,"parent hub has no TT\n" ); + retval = -EINVAL ; + goto fail; + } udev->tt = &hub->tt; udev->ttport = port1; }
drivers/usb/core/quirks.c +8 -0
@@ -48,6 +48,10 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x04b4, 0x0526), .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 }, + /* Roland SC-8820 */ { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -68,6 +72,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Keytouch QWERTY Panel keyboard */ + { USB_DEVICE(0x0926, 0x3333), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, + /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
drivers/usb/host/xhci-ring.c +23 -17
@@ -479,8 +479,11 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, state->new_deq_seg =find_trb_seg (cur_td->start_seg, dev->eps[ep_index].stopped_trb, &state->new_cycle_state); -if (!state->new_deq_seg) -BUG (); +if (!state->new_deq_seg) { +WARN_ON (1 ); +return ; + } +/* Dig out the cycle state saved by the xHC during the stop ep cmd */ xhci_dbg (xhci,"Finding endpoint context\n" ); ep_ctx =xhci_get_ep_ctx (xhci, dev->out_ctx, ep_index);
@@ -491,8 +494,10 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, state->new_deq_seg =find_trb_seg (state->new_deq_seg, state->new_deq_ptr, &state->new_cycle_state); -if (!state->new_deq_seg) -BUG (); +if (!state->new_deq_seg) { +WARN_ON (1 ); +return ; + } trb = &state->new_deq_ptr->generic; if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) &&
@@ -2369,12 +2374,13 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)/* Scatter gather list entries may cross 64KB boundaries */ running_total =TRB_MAX_BUFF_SIZE - - (sg_dma_address (sg) & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); + (sg_dma_address (sg) & (TRB_MAX_BUFF_SIZE -1 )); + running_total &=TRB_MAX_BUFF_SIZE -1 ;if (running_total !=0 ) num_trbs++;/* How many more 64KB chunks to transfer, how many more TRBs? */ -while (running_total <sg_dma_len (sg)) { +while (running_total <sg_dma_len (sg) && running_total < temp) { num_trbs++; running_total +=TRB_MAX_BUFF_SIZE ; }
@@ -2399,11 +2405,11 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)static void check_trb_math (struct urb *urb,int num_trbs,int running_total) {if (num_trbs !=0 ) -dev_dbg (&urb->dev->dev,"%s - ep %#x - Miscalculated number of " +dev_err (&urb->dev->dev,"%s - ep %#x - Miscalculated number of " "TRBs, %d left\n" , __func__, urb->ep->desc.bEndpointAddress, num_trbs);if (running_total != urb->transfer_buffer_length) - dev_dbg(&urb->dev->dev, "%s - ep %#x - Miscalculated tx length, " + dev_err(&urb->dev->dev, "%s - ep %#x - Miscalculated tx length, " "queued %#x (%d), asked for %#x (%d)\n", __func__, urb->ep->desc.bEndpointAddress,
@@ -2535,8 +2541,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, sg = urb->sg; addr = (u64 )sg_dma_address (sg); this_sg_len =sg_dma_len (sg); - trb_buff_len =TRB_MAX_BUFF_SIZE - - (addr & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); + trb_buff_len =TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE -1 )); trb_buff_len =min_t (int, trb_buff_len, this_sg_len);if (trb_buff_len > urb->transfer_buffer_length) trb_buff_len = urb->transfer_buffer_length;
@@ -2572,7 +2577,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, (unsigned int ) (addr +TRB_MAX_BUFF_SIZE ) & ~(TRB_MAX_BUFF_SIZE -1 ), (unsigned int) addr + trb_buff_len);if (TRB_MAX_BUFF_SIZE - - (addr & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )) < trb_buff_len) { + (addr & (TRB_MAX_BUFF_SIZE -1 )) < trb_buff_len) {xhci_warn (xhci,"WARN: sg dma xfer crosses 64KB boundaries!\n" ); xhci_dbg(xhci, "Next boundary at %#x, end dma = %#x\n", (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
@@ -2616,7 +2621,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, } trb_buff_len =TRB_MAX_BUFF_SIZE - - (addr & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); + (addr & (TRB_MAX_BUFF_SIZE -1 )); trb_buff_len =min_t (int, trb_buff_len, this_sg_len);if (running_total + trb_buff_len > urb->transfer_buffer_length) trb_buff_len =
@@ -2656,7 +2661,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, num_trbs =0 ;/* How much data is (potentially) left before the 64KB boundary? */ running_total =TRB_MAX_BUFF_SIZE - - (urb->transfer_dma & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); + (urb->transfer_dma & (TRB_MAX_BUFF_SIZE -1 )); + running_total &=TRB_MAX_BUFF_SIZE -1 ;/* If there's some data on this 64KB chunk, or we have to send a * zero-length transfer, we need at least one TRB
@@ -2699,8 +2705,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,/* How much data is in the first TRB? */ addr = (u64 ) urb->transfer_dma; trb_buff_len =TRB_MAX_BUFF_SIZE - - (urb->transfer_dma & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); -if (urb->transfer_buffer_length < trb_buff_len) + (urb->transfer_dma & (TRB_MAX_BUFF_SIZE -1 )); +if (trb_buff_len > urb->transfer_buffer_length) trb_buff_len = urb->transfer_buffer_length; first_trb = true;
@@ -2872,8 +2878,8 @@ static int count_isoc_trbs_needed(struct xhci_hcd *xhci, addr = (u64) (urb->transfer_dma + urb->iso_frame_desc[i].offset); td_len = urb->iso_frame_desc[i].length; - running_total =TRB_MAX_BUFF_SIZE - - (addr & ((1 <<TRB_MAX_BUFF_SHIFT ) -1 )); + running_total =TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE -1 )); + running_total &=TRB_MAX_BUFF_SIZE -1 ;if (running_total !=0 ) num_trbs++;
drivers/usb/musb/musb_core.c +1 -0
@@ -1880,6 +1880,7 @@ allocate_instance(struct device *dev,INIT_LIST_HEAD (&musb->out_bulk); hcd->uses_new_polling =1 ; + hcd->has_tt =1 ; musb->vbuserr_retry =VBUSERR_RETRY_COUNT ; musb->a_wait_bcon =OTG_TIME_A_WAIT_BCON ;
drivers/usb/musb/omap2430.c +1 -0
@@ -317,6 +317,7 @@ static int musb_platform_resume(struct musb *musb)int musb_platform_exit (struct musb *musb) { +del_timer_sync (&musb_idle_timer);musb_platform_suspend (musb);
drivers/usb/serial/sierra.c +3 -0
@@ -301,6 +301,9 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist }, + { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ { }
drivers/usb/serial/usb_wwan.c +9 -6
@@ -216,12 +216,15 @@ static void usb_wwan_indat_callback(struct urb *urb) __func__, status, endpoint); }else { tty =tty_port_tty_get (&port->port); -if (urb->actual_length) { -tty_insert_flip_string (tty, data, urb->actual_length); -tty_flip_buffer_push (tty); - }else -dbg ("%s: empty read urb received" , __func__); -tty_kref_put (tty); +if (tty) { +if (urb->actual_length) { +tty_insert_flip_string (tty, data, + urb->actual_length); +tty_flip_buffer_push (tty); + }else +dbg ("%s: empty read urb received" , __func__); +tty_kref_put (tty); + }/* Resubmit urb so we continue receiving */ if (status != -ESHUTDOWN ) {
drivers/usb/serial/visor.c +12 -0
@@ -27,6 +27,7 @@#include <linux/uaccess.h> #include <linux/usb.h> #include <linux/usb/serial.h> +#include <linux/usb/cdc.h> #include "visor.h" /*
@@ -479,6 +480,17 @@ static int visor_probe(struct usb_serial *serial,dbg ("%s" , __func__); +/* +* some Samsung Android phones in modem mode have the same ID +* as SPH-I500, but they are ACM devices, so dont bind to them +*/ +if (id->idVendor ==SAMSUNG_VENDOR_ID && + id->idProduct ==SAMSUNG_SPH_I500_ID && + serial->dev->descriptor.bDeviceClass ==USB_CLASS_COMM && + serial->dev->descriptor.bDeviceSubClass == +USB_CDC_SUBCLASS_ACM ) +return -ENODEV ; +if (serial->dev->actconfig->desc.bConfigurationValue !=1 ) {dev_err (&serial->dev->dev,"active config #%d != 1 ??\n" , serial->dev->actconfig->desc.bConfigurationValue);
fs/block_dev.c +6 -6
@@ -1217,9 +1217,9 @@ EXPORT_SYMBOL(open_by_devnum);* when a disk has been changed -- either by a media change or online * resize. */ -static void flush_disk (struct block_device *bdev) +static void flush_disk (struct block_device *bdev,bool kill_dirty) { -if (__invalidate_device (bdev)) { +if (__invalidate_device (bdev, kill_dirty)) {char name[BDEVNAME_SIZE ] ="" ;if (bdev->bd_disk)
@@ -1256,7 +1256,7 @@ void check_disk_size_change(struct gendisk *disk, struct block_device *bdev)"%s: detected capacity change from %lld to %lld\n" , name, bdev_size, disk_size);i_size_write (bdev->bd_inode, disk_size); -flush_disk (bdev); +flush_disk (bdev, false); } }EXPORT_SYMBOL (check_disk_size_change);
@@ -1308,7 +1308,7 @@ int check_disk_change(struct block_device *bdev)if (!bdops->media_changed (bdev->bd_disk))return 0 ; -flush_disk (bdev); +flush_disk (bdev, true);if (bdops->revalidate_disk) bdops->revalidate_disk (bdev->bd_disk);return 1 ;
@@ -1776,7 +1776,7 @@ void close_bdev_exclusive(struct block_device *bdev, fmode_t mode)EXPORT_SYMBOL (close_bdev_exclusive); -int __invalidate_device (struct block_device *bdev) +int __invalidate_device (struct block_device *bdev,bool kill_dirty) {struct super_block *sb =get_super (bdev);int res =0 ;
@@ -1789,7 +1789,7 @@ int __invalidate_device(struct block_device *bdev)* hold). */ shrink_dcache_sb (sb); - res =invalidate_inodes (sb); + res =invalidate_inodes (sb, kill_dirty);drop_super (sb); }invalidate_bdev (bdev);
fs/eventpoll.c +95 -0
137 lines not on this page · raw message
fs/ext2/namei.c +2 -7
@@ -344,7 +344,6 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, new_de =ext2_find_entry (new_dir, &new_dentry->d_name, &new_page);if (!new_de) goto out_dir; -inode_inc_link_count (old_inode);ext2_set_link (new_dir, new_de, new_page, old_inode,1 ); new_inode->i_ctime =CURRENT_TIME_SEC ;if (dir_de)
@@ -356,12 +355,9 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,if (new_dir->i_nlink >=EXT2_LINK_MAX ) goto out_dir; } -inode_inc_link_count (old_inode); err =ext2_add_link (new_dentry, old_inode); -if (err) { -inode_dec_link_count (old_inode); +if (err) goto out_dir; - }if (dir_de)inode_inc_link_count (new_dir); }
@@ -369,12 +365,11 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,/* * Like most other Unix systems, set the ctime for inodes on a * rename. -* inode_dec_link_count() will mark the inode dirty. */ old_inode->i_ctime =CURRENT_TIME_SEC ; +mark_inode_dirty (old_inode);ext2_delete_entry (old_de, old_page); -inode_dec_link_count (old_inode);if (dir_de) {if (old_dir != new_dir)
fs/fuse/file.c +45 -7
85 lines not on this page · raw message
fs/fuse/fuse_i.h +5 -1
@@ -21,6 +21,7 @@#include <linux/rwsem.h> #include <linux/rbtree.h> #include <linux/poll.h> +#include <linux/workqueue.h> /** Max number of pages that can be used in a single read request */ #define FUSE_MAX_PAGES_PER_REQ 32
@@ -257,7 +258,10 @@ struct fuse_req {union {struct fuse_forget_in forget_in;struct { -struct fuse_release_in in; +union { +struct fuse_release_in in; +struct work_struct work; + };struct path path; } release;struct fuse_init_in init_in;
fs/gfs2/main.c +1 -8
@@ -59,14 +59,7 @@ static void gfs2_init_gl_aspace_once(void *foo)struct address_space *mapping = (struct address_space *)(gl +1 );gfs2_init_glock_once (gl); -memset (mapping,0 ,sizeof (*mapping)); -INIT_RADIX_TREE (&mapping->page_tree,GFP_ATOMIC ); -spin_lock_init (&mapping->tree_lock); -spin_lock_init (&mapping->i_mmap_lock); -INIT_LIST_HEAD (&mapping->private_list); -spin_lock_init (&mapping->private_lock); -INIT_RAW_PRIO_TREE_ROOT (&mapping->i_mmap); -INIT_LIST_HEAD (&mapping->i_mmap_nonlinear); +address_space_init_once (mapping); }/**
fs/inode.c +23 -8
@@ -280,6 +280,20 @@ static void destroy_inode(struct inode *inode)kmem_cache_free (inode_cachep, (inode)); } +void address_space_init_once (struct address_space *mapping) +{ +memset (mapping,0 ,sizeof (*mapping)); +INIT_RADIX_TREE (&mapping->page_tree,GFP_ATOMIC ); +spin_lock_init (&mapping->tree_lock); +spin_lock_init (&mapping->i_mmap_lock); +INIT_LIST_HEAD (&mapping->private_list); +spin_lock_init (&mapping->private_lock); +INIT_RAW_PRIO_TREE_ROOT (&mapping->i_mmap); +INIT_LIST_HEAD (&mapping->i_mmap_nonlinear); +mutex_init (&mapping->unmap_mutex); +} +EXPORT_SYMBOL (address_space_init_once); +/* * These are initializations that only need to be done * once, because the fields are idempotent across use
@@ -293,13 +307,7 @@ void inode_init_once(struct inode *inode)INIT_LIST_HEAD (&inode->i_devices);INIT_LIST_HEAD (&inode->i_wb_list);INIT_LIST_HEAD (&inode->i_lru); -INIT_RADIX_TREE (&inode->i_data.page_tree,GFP_ATOMIC ); -spin_lock_init (&inode->i_data.tree_lock); -spin_lock_init (&inode->i_data.i_mmap_lock); -INIT_LIST_HEAD (&inode->i_data.private_list); -spin_lock_init (&inode->i_data.private_lock); -INIT_RAW_PRIO_TREE_ROOT (&inode->i_data.i_mmap); -INIT_LIST_HEAD (&inode->i_data.i_mmap_nonlinear); +address_space_init_once (&inode->i_data);i_size_ordered_init (inode);#ifdef CONFIG_FSNOTIFY INIT_HLIST_HEAD (&inode->i_fsnotify_marks);
@@ -524,11 +532,14 @@ void evict_inodes(struct super_block *sb)/** * invalidate_inodes - attempt to free all inodes on a superblock * @sb: superblock to operate on +* @kill_dirty: flag to guide handling of dirty inodes * * Attempts to free all inodes for a given superblock. If there were any * busy inodes return a non-zero value, else zero. +* If @kill_dirty is set, discard dirty inodes too, otherwise treat +* them as busy. */ -int invalidate_inodes (struct super_block *sb) +int invalidate_inodes (struct super_block *sb,bool kill_dirty) {int busy =0 ;struct inode *inode, *next;
@@ -540,6 +551,10 @@ int invalidate_inodes(struct super_block *sb)list_for_each_entry_safe (inode, next, &sb->s_inodes, i_sb_list) {if (inode->i_state & (I_NEW |I_FREEING |I_WILL_FREE ))continue ; +if (inode->i_state &I_DIRTY && !kill_dirty) { + busy =1 ; +continue ; + }if (atomic_read (&inode->i_count)) { busy =1 ;continue ;
fs/internal.h +1 -1
@@ -107,4 +107,4 @@ extern void release_open_intent(struct nameidata *);*/ extern int get_nr_dirty_inodes (void );extern void evict_inodes (struct super_block *); -extern int invalidate_inodes (struct super_block *); +extern int invalidate_inodes (struct super_block *,bool );
fs/nilfs2/btnode.c +0 -5
@@ -35,11 +35,6 @@#include "btnode.h" -void nilfs_btnode_cache_init_once (struct address_space *btnc) -{ -nilfs_mapping_init_once (btnc); -} -static const struct address_space_operations def_btnode_aops = { .sync_page = block_sync_page, };
fs/nilfs2/btnode.h +0 -1
@@ -37,7 +37,6 @@ struct nilfs_btnode_chkey_ctxt {struct buffer_head *newbh; }; -void nilfs_btnode_cache_init_once (struct address_space *);void nilfs_btnode_cache_init (struct address_space *,struct backing_dev_info *);void nilfs_btnode_cache_clear (struct address_space *); struct buffer_head *nilfs_btnode_create_block(struct address_space *btnc,
fs/nilfs2/mdt.c +2 -2
@@ -460,9 +460,9 @@ int nilfs_mdt_setup_shadow_map(struct inode *inode,struct backing_dev_info *bdi = inode->i_sb->s_bdi;INIT_LIST_HEAD (&shadow->frozen_buffers); -nilfs_mapping_init_once (&shadow->frozen_data); +address_space_init_once (&shadow->frozen_data);nilfs_mapping_init (&shadow->frozen_data, bdi, &shadow_map_aops); -nilfs_mapping_init_once (&shadow->frozen_btnodes); +address_space_init_once (&shadow->frozen_btnodes);nilfs_mapping_init (&shadow->frozen_btnodes, bdi, &shadow_map_aops); mi->mi_shadow = shadow;return 0 ;
fs/nilfs2/page.h +0 -1
@@ -61,7 +61,6 @@ void nilfs_free_private_page(struct page *);int nilfs_copy_dirty_pages (struct address_space *,struct address_space *);void nilfs_copy_back_pages (struct address_space *,struct address_space *);void nilfs_clear_dirty_pages (struct address_space *); -void nilfs_mapping_init_once (struct address_space *mapping);void nilfs_mapping_init (struct address_space *mapping,struct backing_dev_info *bdi,const struct address_space_operations *aops);
fs/nilfs2/segment.c +2 -1
@@ -430,7 +430,8 @@ static void nilfs_segctor_begin_finfo(struct nilfs_sc_info *sci,nilfs_segctor_map_segsum_entry ( sci, &sci->sc_binfo_ptr,sizeof (struct nilfs_finfo )); -if (inode->i_sb && !test_bit (NILFS_SC_HAVE_DELTA , &sci->sc_flags)) +if (NILFS_I (inode)->i_root && + !test_bit (NILFS_SC_HAVE_DELTA , &sci->sc_flags))set_bit (NILFS_SC_HAVE_DELTA , &sci->sc_flags);/* skip finfo */ }
fs/nilfs2/super.c +1 -1
@@ -1263,7 +1263,7 @@ static void nilfs_inode_init_once(void *obj)#ifdef CONFIG_NILFS_XATTR init_rwsem (&ii->xattr_sem);#endif -nilfs_btnode_cache_init_once (&ii->i_btnode_cache); +address_space_init_once (&ii->i_btnode_cache); ii->i_bmap = &ii->i_bmap_data;inode_init_once (&ii->vfs_inode); }
fs/ocfs2/refcounttree.c +5 -2
@@ -3228,7 +3228,7 @@ static int ocfs2_make_clusters_writable(struct super_block *sb, u32 num_clusters, unsigned int e_flags) { int ret, delete, index, credits = 0; -u32 new_bit, new_len; +u32 new_bit, new_len, orig_num_clusters;unsigned int set_len;struct ocfs2_super *osb =OCFS2_SB (sb);handle_t *handle;
@@ -3261,6 +3261,8 @@ static int ocfs2_make_clusters_writable(struct super_block *sb, goto out; } + orig_num_clusters = num_clusters; +while (num_clusters) { ret = ocfs2_get_refcount_rec(ref_ci, context->ref_root_bh, p_cluster, num_clusters,
@@ -3348,7 +3350,8 @@ static int ocfs2_make_clusters_writable(struct super_block *sb,* in write-back mode. */ if (context->get_clusters == ocfs2_di_get_clusters) { - ret =ocfs2_cow_sync_writeback (sb, context, cpos, num_clusters); + ret =ocfs2_cow_sync_writeback (sb, context, cpos, + orig_num_clusters);if (ret)mlog_errno (ret); }
fs/ocfs2/super.c +20 -8
@@ -1310,7 +1310,7 @@ static int ocfs2_parse_options(struct super_block *sb,struct mount_options *mopt, int is_remount) { - int status; + int status, user_stack = 0;char *p;u32 tmp;
@@ -1453,6 +1453,15 @@ static int ocfs2_parse_options(struct super_block *sb,memcpy (mopt->cluster_stack, args[0 ].from,OCFS2_STACK_LABEL_LEN ); mopt->cluster_stack[OCFS2_STACK_LABEL_LEN ] ='\0' ; +/* +* Open code the memcmp here as we don't have +* an osb to pass to +* ocfs2_userspace_stack(). +*/ +if (memcmp (mopt->cluster_stack, +OCFS2_CLASSIC_CLUSTER_STACK , +OCFS2_STACK_LABEL_LEN )) + user_stack =1 ;break ;case Opt_inode64: mopt->mount_opt |=OCFS2_MOUNT_INODE64 ;
@@ -1508,13 +1517,16 @@ static int ocfs2_parse_options(struct super_block *sb, } } -/* Ensure only one heartbeat mode */ - tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL |OCFS2_MOUNT_HB_GLOBAL | -OCFS2_MOUNT_HB_NONE ); -if (hweight32 (tmp) !=1 ) { -mlog (ML_ERROR ,"Invalid heartbeat mount options\n" ); - status =0 ; - goto bail; +if (user_stack ==0 ) { +/* Ensure only one heartbeat mode */ + tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL | +OCFS2_MOUNT_HB_GLOBAL | +OCFS2_MOUNT_HB_NONE ); +if (hweight32 (tmp) !=1 ) { +mlog (ML_ERROR ,"Invalid heartbeat mount options\n" ); + status =0 ; + goto bail; + } } status =1 ;
fs/partitions/ldm.c +5 -0
@@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *data, struct vmdb *vm) } vm->vblk_size =get_unaligned_be32 (data +0x08 ); +if (vm->vblk_size ==0 ) { +ldm_error ("Illegal VBLK size" ); +return false; + } + vm->vblk_offset =get_unaligned_be32 (data +0x0C ); vm->last_vblk_seq =get_unaligned_be32 (data +0x04 );
include/drm/drmP.h +1 -1
@@ -1022,7 +1022,7 @@ struct drm_device {struct platform_device *platformdev;/**< Platform device struture */ struct drm_sg_mem *sg;/**< Scatter gather memory */ -int num_crtcs;/**< Number of CRTCs on this device */ +unsigned int num_crtcs;/**< Number of CRTCs on this device */ void *dev_private;/**< device private data */ void *mm_private;struct address_space *dev_mapping;
include/linux/blkdev.h +1 -4
@@ -700,7 +700,7 @@ extern void blk_start_queue(struct request_queue *q);extern void blk_stop_queue (struct request_queue *q);extern void blk_sync_queue (struct request_queue *q);extern void __blk_stop_queue (struct request_queue *q); -extern void __blk_run_queue (struct request_queue *); +extern void __blk_run_queue (struct request_queue *q,bool force_kblockd);extern void blk_run_queue (struct request_queue *); extern int blk_rq_map_user(struct request_queue *, struct request *, struct rq_map_data *, void __user *, unsigned long,
@@ -1089,7 +1089,6 @@ static inline void put_dev_sector(Sector p)struct work_struct ;int kblockd_schedule_work (struct request_queue *q,struct work_struct *work); -int kblockd_schedule_delayed_work (struct request_queue *q,struct delayed_work *dwork,unsigned long delay);#ifdef CONFIG_BLK_CGROUP /*
@@ -1137,7 +1136,6 @@ static inline uint64_t rq_io_start_time_ns(struct request *req)extern int blk_throtl_init (struct request_queue *q);extern void blk_throtl_exit (struct request_queue *q);extern int blk_throtl_bio (struct request_queue *q,struct bio **bio); -extern void throtl_schedule_delayed_work (struct request_queue *q,unsigned long delay);extern void throtl_shutdown_timer_wq (struct request_queue *q);#else /* CONFIG_BLK_DEV_THROTTLING */ static inline int blk_throtl_bio (struct request_queue *q,struct bio **bio)
@@ -1147,7 +1145,6 @@ static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio)static inline int blk_throtl_init (struct request_queue *q) {return 0 ; }static inline int blk_throtl_exit (struct request_queue *q) {return 0 ; } -static inline void throtl_schedule_delayed_work (struct request_queue *q,unsigned long delay) {}static inline void throtl_shutdown_timer_wq (struct request_queue *q) {}#endif /* CONFIG_BLK_DEV_THROTTLING */
include/linux/fs.h +3 -1
@@ -646,6 +646,7 @@ struct address_space {spinlock_t private_lock;/* for use by the address_space */ struct list_head private_list;/* ditto */ struct address_space *assoc_mapping;/* ditto */ +struct mutex unmap_mutex;/* to protect unmapping */ } __attribute__((aligned(sizeof(long))));/* * On most architectures that alignment is already the case; but
@@ -2117,7 +2118,7 @@ extern void check_disk_size_change(struct gendisk *disk, struct block_device *bdev);extern int revalidate_disk (struct gendisk *);extern int check_disk_change (struct block_device *); -extern int __invalidate_device (struct block_device *); +extern int __invalidate_device (struct block_device *,bool );extern int invalidate_partition (struct gendisk *,int );#endif unsigned long invalidate_mapping_pages(struct address_space *mapping,
@@ -2203,6 +2204,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);extern int inode_init_always (struct super_block *,struct inode *);extern void inode_init_once (struct inode *); +extern void address_space_init_once (struct address_space *mapping);extern void ihold (struct inode * inode);extern void iput (struct inode *);extern struct inode *igrab (struct inode *);
include/linux/pm.h +2 -0
@@ -470,6 +470,8 @@ struct dev_pm_info {struct list_head entry;struct completion completion;struct wakeup_source *wakeup; +#else + unsigned int should_wakeup:1;#endif #ifdef CONFIG_PM_RUNTIME struct timer_list suspend_timer;
include/linux/pm_wakeup.h +14 -11
@@ -109,11 +109,6 @@ static inline bool device_can_wakeup(struct device *dev)return dev->power.can_wakeup; } -static inline bool device_may_wakeup (struct device *dev) -{ -return false; -} -static inline struct wakeup_source *wakeup_source_create (const char *name) {return NULL ;
@@ -134,24 +129,32 @@ static inline void wakeup_source_unregister(struct wakeup_source *ws) {}static inline int device_wakeup_enable (struct device *dev) { -return -EINVAL ; + dev->power.should_wakeup = true; +return 0 ; }static inline int device_wakeup_disable (struct device *dev) { + dev->power.should_wakeup = false;return 0 ; } -static inline int device_init_wakeup (struct device *dev,bool val) +static inline int device_set_wakeup_enable (struct device *dev,bool enable) { - dev->power.can_wakeup = val; -return val ? -EINVAL :0 ; + dev->power.should_wakeup = enable; +return 0 ; } +static inline int device_init_wakeup (struct device *dev,bool val) +{ +device_set_wakeup_capable (dev, val); +device_set_wakeup_enable (dev, val); +return 0 ; +} -static inline int device_set_wakeup_enable (struct device *dev,bool enable) +static inline bool device_may_wakeup (struct device *dev) { -return -EINVAL ; +return dev->power.can_wakeup && dev->power.should_wakeup; }static inline void __pm_stay_awake (struct wakeup_source *ws) {}
include/linux/vmstat.h +6 -4
@@ -254,8 +254,11 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item);extern void __dec_zone_state (struct zone *,enum zone_stat_item );void refresh_cpu_vm_stats (int ); -void reduce_pgdat_percpu_threshold (pg_data_t *pgdat); -void restore_pgdat_percpu_threshold (pg_data_t *pgdat); + +int calculate_pressure_threshold (struct zone *zone); +int calculate_normal_threshold (struct zone *zone); +void set_pgdat_percpu_threshold (pg_data_t *pgdat, +int (*calculate_pressure)(struct zone *));#else /* CONFIG_SMP */ /*
@@ -300,8 +303,7 @@ static inline void __dec_zone_page_state(struct page *page,#define dec_zone_page_state __dec_zone_page_state#define mod_zone_page_state __mod_zone_page_state -static inline void reduce_pgdat_percpu_threshold (pg_data_t *pgdat) { } -static inline void restore_pgdat_percpu_threshold (pg_data_t *pgdat) { } +#define set_pgdat_percpu_threshold (pgdat, callback) { }static inline void refresh_cpu_vm_stats (int cpu) { }#endif
kernel/time/tick-broadcast.c +10 -0
@@ -600,4 +600,14 @@ int tick_broadcast_oneshot_active(void) return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT; } +/* +* Check whether the broadcast device supports oneshot. +*/ +bool tick_broadcast_oneshot_available (void ) +{ +struct clock_event_device *bc = tick_broadcast_device.evtdev; + +return bc ? bc->features &CLOCK_EVT_FEAT_ONESHOT : false; +} +#endif
kernel/time/tick-common.c +5 -1
@@ -51,7 +51,11 @@ int tick_is_oneshot_available(void) {struct clock_event_device *dev =__get_cpu_var (tick_cpu_device).evtdev; -return dev && (dev->features &CLOCK_EVT_FEAT_ONESHOT ); +if (!dev || !(dev->features &CLOCK_EVT_FEAT_ONESHOT )) +return 0 ; +if (!(dev->features &CLOCK_EVT_FEAT_C3STOP )) +return 1 ; +return tick_broadcast_oneshot_available (); }/*
kernel/time/tick-internal.h +3 -0
@@ -36,6 +36,7 @@ extern void tick_shutdown_broadcast_oneshot(unsigned int *cpup);extern int tick_resume_broadcast_oneshot (struct clock_event_device *bc);extern int tick_broadcast_oneshot_active (void );extern void tick_check_oneshot_broadcast (int cpu); +bool tick_broadcast_oneshot_available (void );# else /* BROADCAST */ static inline void tick_broadcast_setup_oneshot (struct clock_event_device *bc) {
@@ -46,6 +47,7 @@ static inline void tick_broadcast_switch_to_oneshot(void) { }static inline void tick_shutdown_broadcast_oneshot (unsigned int *cpup) { }static inline int tick_broadcast_oneshot_active (void ) {return 0 ; }static inline void tick_check_oneshot_broadcast (int cpu) { } +static inline bool tick_broadcast_oneshot_available (void ) {return true; }# endif /* !BROADCAST */ #else /* !ONESHOT */
@@ -76,6 +78,7 @@ static inline int tick_resume_broadcast_oneshot(struct clock_event_device *bc) return 0; }static inline int tick_broadcast_oneshot_active (void ) {return 0 ; } +static inline bool tick_broadcast_oneshot_available (void ) {return false; }#endif /* !TICK_ONESHOT */ /*
lib/swiotlb.c +4 -2
@@ -686,8 +686,10 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,/* * Ensure that the address returned is DMA'ble */ -if (!dma_capable (dev, dev_addr, size)) -panic ("map_single: bounce buffer is not DMA'ble" ); +if (!dma_capable (dev, dev_addr, size)) { +swiotlb_tbl_unmap_single (dev, map, size, dir); + dev_addr =swiotlb_virt_to_bus (dev, io_tlb_overflow_buffer); + }return dev_addr; }
mm/memory.c +2 -0
@@ -2572,6 +2572,7 @@ void unmap_mapping_range(struct address_space *mapping, details.last_index =ULONG_MAX ; details.i_mmap_lock = &mapping->i_mmap_lock; +mutex_lock (&mapping->unmap_mutex);spin_lock (&mapping->i_mmap_lock);/* Protect against endless unmapping loops */
@@ -2588,6 +2589,7 @@ void unmap_mapping_range(struct address_space *mapping,if (unlikely (!list_empty (&mapping->i_mmap_nonlinear)))unmap_mapping_range_list (&mapping->i_mmap_nonlinear, &details);spin_unlock (&mapping->i_mmap_lock); +mutex_unlock (&mapping->unmap_mutex); }EXPORT_SYMBOL (unmap_mapping_range);
mm/page_alloc.c +2 -3
@@ -5335,10 +5335,9 @@ __count_immobile_pages(struct zone *zone, struct page *page, int count)for (found =0 , iter =0 ; iter < pageblock_nr_pages; iter++) {unsigned long check = pfn + iter; -if (!pfn_valid_within (check)) { - iter++; +if (!pfn_valid_within (check))continue ; - } + page =pfn_to_page (check);if (!page_count (page)) {if (PageBuddy (page))
mm/vmscan.c +17 -2
@@ -2448,9 +2448,24 @@ static int kswapd(void *p)*/ if (!sleeping_prematurely (pgdat, order, remaining)) {trace_mm_vmscan_kswapd_sleep (pgdat->node_id); -restore_pgdat_percpu_threshold (pgdat); + +/* +* vmstat counters are not perfectly +* accurate and the estimated value +* for counters such as NR_FREE_PAGES +* can deviate from the true value by +* nr_online_cpus * threshold. To +* avoid the zone watermarks being +* breached while under pressure, we +* reduce the per-cpu vmstat threshold +* while kswapd is awake and restore +* them before going back to sleep. +*/ +set_pgdat_percpu_threshold (pgdat, + calculate_normal_threshold);schedule (); -reduce_pgdat_percpu_threshold (pgdat); +set_pgdat_percpu_threshold (pgdat, + calculate_pressure_threshold); }else {if (remaining)count_vm_event (KSWAPD_LOW_WMARK_HIT_QUICKLY );
mm/vmstat.c +7 -29
@@ -83,7 +83,7 @@ EXPORT_SYMBOL(vm_stat);#ifdef CONFIG_SMP -static int calculate_pressure_threshold (struct zone *zone) +int calculate_pressure_threshold (struct zone *zone) {int threshold;int watermark_distance;
@@ -107,7 +107,7 @@ static int calculate_pressure_threshold(struct zone *zone)return threshold; } -static int calculate_threshold (struct zone *zone) +int calculate_normal_threshold (struct zone *zone) {int threshold;int mem;/* memory in 128 MB units */
@@ -166,7 +166,7 @@ static void refresh_zone_stat_thresholds(void)for_each_populated_zone (zone) {unsigned long max_drift, tolerate_drift; - threshold =calculate_threshold (zone); + threshold =calculate_normal_threshold (zone);for_each_online_cpu (cpu)per_cpu_ptr (zone->pageset, cpu)->stat_threshold
@@ -185,46 +185,24 @@ static void refresh_zone_stat_thresholds(void) } } -void reduce_pgdat_percpu_threshold (pg_data_t *pgdat) +void set_pgdat_percpu_threshold (pg_data_t *pgdat, +int (*calculate_pressure)(struct zone *)) {struct zone *zone;int cpu;int threshold;int i; -get_online_cpus (); -for (i =0 ; i < pgdat->nr_zones; i++) { - zone = &pgdat->node_zones[i]; -if (!zone->percpu_drift_mark) -continue ; - - threshold =calculate_pressure_threshold (zone); -for_each_online_cpu (cpu) -per_cpu_ptr (zone->pageset, cpu)->stat_threshold - = threshold; - } -put_online_cpus (); -} - -void restore_pgdat_percpu_threshold (pg_data_t *pgdat) -{ -struct zone *zone; -int cpu; -int threshold; -int i; - -get_online_cpus ();for (i =0 ; i < pgdat->nr_zones; i++) { zone = &pgdat->node_zones[i];if (!zone->percpu_drift_mark)continue ; - threshold =calculate_threshold (zone); -for_each_online_cpu (cpu) + threshold = (*calculate_pressure)(zone); +for_each_possible_cpu (cpu)per_cpu_ptr (zone->pageset, cpu)->stat_threshold = threshold; } -put_online_cpus (); }/*
net/dccp/input.c +3 -4
@@ -621,6 +621,9 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,/* Caller (dccp_v4_do_rcv) will send Reset */ dcb->dccpd_reset_code =DCCP_RESET_CODE_NO_CONNECTION ;return 1 ; + }else if (sk->sk_state ==DCCP_CLOSED ) { + dcb->dccpd_reset_code =DCCP_RESET_CODE_NO_CONNECTION ; +return 1 ; }if (sk->sk_state !=DCCP_REQUESTING && sk->sk_state !=DCCP_RESPOND ) {
@@ -683,10 +686,6 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, }switch (sk->sk_state) { -case DCCP_CLOSED : - dcb->dccpd_reset_code =DCCP_RESET_CODE_NO_CONNECTION ; -return 1 ; -case DCCP_REQUESTING : queued =dccp_rcv_request_sent_state_process (sk, skb, dh, len);if (queued >=0 )
net/dns_resolver/dns_key.c +17 -3
@@ -67,8 +67,9 @@ dns_resolver_instantiate(struct key *key, const void *_data, size_t datalen)size_t result_len =0 ;const char *data = _data, *end, *opt; -kenter ("%%%d,%s,'%s',%zu" , - key->serial, key->description, data, datalen); +kenter ("%%%d,%s,'%*.*s',%zu" , + key->serial, key->description, + (int )datalen, (int )datalen, data, datalen);if (datalen <=1 || !data || data[datalen -1 ] !='\0' )return -EINVAL ;
@@ -217,6 +218,19 @@ static void dns_resolver_describe(const struct key *key, struct seq_file *m)seq_printf (m,": %u" , key->datalen); } +/* +* read the DNS data +* - the key's semaphore is read-locked +*/ +static long dns_resolver_read (const struct key *key, +char __user *buffer,size_t buflen) +{ +if (key->type_data.x[0 ]) +return key->type_data.x[0 ]; + +return user_read (key, buffer, buflen); +} +struct key_type key_type_dns_resolver = { .name ="dns_resolver" , .instantiate = dns_resolver_instantiate,
@@ -224,7 +238,7 @@ struct key_type key_type_dns_resolver = { .revoke = user_revoke, .destroy = user_destroy, .describe = dns_resolver_describe, - .read = user_read, + .read = dns_resolver_read, };static int __init init_dns_resolver (void )
net/ipv4/devinet.c +20 -10
@@ -1030,6 +1030,21 @@ static inline bool inetdev_valid_mtu(unsigned mtu)return mtu >=68 ; } +static void inetdev_send_gratuitous_arp (struct net_device *dev, +struct in_device *in_dev) + +{ +struct in_ifaddr *ifa = in_dev->ifa_list; + +if (!ifa) +return ; + +arp_send (ARPOP_REQUEST ,ETH_P_ARP , + ifa->ifa_address, dev, + ifa->ifa_address,NULL , + dev->dev_addr,NULL ); +} +/* Called only under RTNL semaphore */ static int inetdev_event(struct notifier_block *this, unsigned long event,
@@ -1082,18 +1097,13 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, }ip_mc_up (in_dev);/* fall through */ -case NETDEV_NOTIFY_PEERS :case NETDEV_CHANGEADDR : +if (!IN_DEV_ARP_NOTIFY (in_dev)) +break ; +/* fall through */ +case NETDEV_NOTIFY_PEERS :/* Send gratuitous ARP to notify of link change */ -if (IN_DEV_ARP_NOTIFY (in_dev)) { -struct in_ifaddr *ifa = in_dev->ifa_list; - -if (ifa) -arp_send (ARPOP_REQUEST ,ETH_P_ARP , - ifa->ifa_address, dev, - ifa->ifa_address,NULL , - dev->dev_addr,NULL ); - } +inetdev_send_gratuitous_arp (dev, in_dev);break ;case NETDEV_DOWN :ip_mc_down (in_dev);
net/ipv4/inet_timewait_sock.c +2 -0
@@ -505,7 +505,9 @@ restart: }rcu_read_unlock (); +local_bh_disable ();inet_twsk_deschedule (tw, twdr); +local_bh_enable ();inet_twsk_put (tw); goto restart_rcu; }
net/wireless/wext-compat.c +2 -2
@@ -802,11 +802,11 @@ int cfg80211_wext_siwfreq(struct net_device *dev,return freq;if (freq ==0 )return -EINVAL ; -wdev_lock (wdev);mutex_lock (&rdev->devlist_mtx); +wdev_lock (wdev); err =cfg80211_set_freq (rdev, wdev, freq,NL80211_CHAN_NO_HT ); -mutex_unlock (&rdev->devlist_mtx);wdev_unlock (wdev); +mutex_unlock (&rdev->devlist_mtx);return err;default :return -EOPNOTSUPP ;
sound/pci/hda/patch_conexant.c +5 -0
@@ -3106,6 +3106,8 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {SND_PCI_QUIRK (0x1028 ,0x0401 ,"Dell Vostro 1014" ,CXT5066_DELL_VOSTRO ),SND_PCI_QUIRK (0x1028 ,0x0402 ,"Dell Vostro" ,CXT5066_DELL_VOSTRO ),SND_PCI_QUIRK (0x1028 ,0x0408 ,"Dell Inspiron One 19T" ,CXT5066_IDEAPAD ), +SND_PCI_QUIRK (0x1028 ,0x050f ,"Dell Inspiron" ,CXT5066_IDEAPAD ), +SND_PCI_QUIRK (0x1028 ,0x0510 ,"Dell Vostro" ,CXT5066_IDEAPAD ),SND_PCI_QUIRK (0x103c ,0x360b ,"HP G60" ,CXT5066_HP_LAPTOP ),SND_PCI_QUIRK (0x1043 ,0x13f3 ,"Asus A52J" ,CXT5066_HP_LAPTOP ), SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD),
@@ -3890,6 +3892,8 @@ static struct hda_codec_preset snd_hda_preset_conexant[] = { .patch = patch_cxt5066 }, { .id = 0x14f15069, .name = "CX20585", .patch = patch_cxt5066 }, + { .id = 0x14f1506e, .name = "CX20590", + .patch = patch_cxt5066 }, { .id = 0x14f15097, .name = "CX20631", .patch = patch_conexant_auto }, { .id = 0x14f15098, .name = "CX20632",
@@ -3916,6 +3920,7 @@ MODULE_ALIAS("snd-hda-codec-id:14f15066");MODULE_ALIAS ("snd-hda-codec-id:14f15067" );MODULE_ALIAS ("snd-hda-codec-id:14f15068" );MODULE_ALIAS ("snd-hda-codec-id:14f15069" ); +MODULE_ALIAS ("snd-hda-codec-id:14f1506e" );MODULE_ALIAS ("snd-hda-codec-id:14f15097" );MODULE_ALIAS ("snd-hda-codec-id:14f15098" );MODULE_ALIAS ("snd-hda-codec-id:14f150a1" );
sound/pci/hda/patch_via.c +1 -1
@@ -568,7 +568,7 @@ static void via_auto_init_analog_input(struct hda_codec *codec)hda_nid_t nid = cfg->inputs[i].pin;if (spec->smart51_enabled &&is_smart51_pins (spec, nid)) ctl =PIN_OUT ; -else if (i ==AUTO_PIN_MIC ) +else if (cfg->inputs[i].type ==AUTO_PIN_MIC ) ctl =PIN_VREF50 ;else ctl =PIN_IN ;
sound/soc/imx/eukrea-tlv320.c +1 -1
@@ -80,7 +80,7 @@ static struct snd_soc_dai_link eukrea_tlv320_dai = { .name = "tlv320aic23", .stream_name = "TLV320AIC23", .codec_dai_name = "tlv320aic23-hifi", - .platform_name = "imx-pcm-audio.0", + .platform_name = "imx-fiq-pcm-audio.0", .codec_name = "tlv320aic23-codec.0-001a", .cpu_dai_name = "imx-ssi.0", .ops = &eukrea_tlv320_snd_ops,
sound/soc/pxa/e740_wm9705.c +2 -2
@@ -117,7 +117,7 @@ static struct snd_soc_dai_link e740_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9705-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm9705-codec",
@@ -126,7 +126,7 @@ static struct snd_soc_dai_link e740_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name = "wm9705-aux", .platform_name = "pxa-pcm-audio", .codec_name = "wm9705-codec",
sound/soc/pxa/e750_wm9705.c +2 -2
@@ -99,7 +99,7 @@ static struct snd_soc_dai_link e750_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9705-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm9705-codec",
@@ -109,7 +109,7 @@ static struct snd_soc_dai_link e750_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name ="wm9705-aux", .platform_name = "pxa-pcm-audio", .codec_name = "wm9705-codec",
sound/soc/pxa/e800_wm9712.c +2 -2
@@ -89,7 +89,7 @@ static struct snd_soc_dai_link e800_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9712-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
@@ -98,7 +98,7 @@ static struct snd_soc_dai_link e800_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name ="wm9712-aux", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
sound/soc/pxa/em-x270.c +2 -2
@@ -38,7 +38,7 @@ static struct snd_soc_dai_link em_x270_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9712-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
@@ -46,7 +46,7 @@ static struct snd_soc_dai_link em_x270_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name ="wm9712-aux", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
sound/soc/pxa/mioa701_wm9713.c +2 -2
@@ -162,7 +162,7 @@ static struct snd_soc_dai_link mioa701_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9713-hifi", .codec_name = "wm9713-codec", .init = mioa701_wm9713_init,
@@ -172,7 +172,7 @@ static struct snd_soc_dai_link mioa701_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name ="wm9713-aux", .codec_name = "wm9713-codec", .platform_name = "pxa-pcm-audio",
sound/soc/pxa/palm27x.c +2 -2
@@ -132,7 +132,7 @@ static struct snd_soc_dai_link palm27x_dai[] = { { .name = "AC97 HiFi", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9712-hifi", .codec_name = "wm9712-codec", .platform_name = "pxa-pcm-audio",
@@ -141,7 +141,7 @@ static struct snd_soc_dai_link palm27x_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name = "wm9712-aux", .codec_name = "wm9712-codec", .platform_name = "pxa-pcm-audio",
sound/soc/pxa/tosa.c +2 -2
@@ -217,7 +217,7 @@ static struct snd_soc_dai_link tosa_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_dai_name = "wm9712-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
@@ -227,7 +227,7 @@ static struct snd_soc_dai_link tosa_dai[] = { { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_dai_name = "wm9712-aux", .platform_name = "pxa-pcm-audio", .codec_name = "wm9712-codec",
sound/soc/pxa/zylonite.c +2 -2
@@ -166,7 +166,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { .stream_name = "AC97 HiFi", .codec_name = "wm9713-codec", .platform_name = "pxa-pcm-audio", - .cpu_dai_name = "pxa-ac97.0", + .cpu_dai_name = "pxa2xx-ac97", .codec_name = "wm9713-hifi", .init = zylonite_wm9713_init, },
@@ -175,7 +175,7 @@ static struct snd_soc_dai_link zylonite_dai[] = { .stream_name = "AC97 Aux", .codec_name = "wm9713-codec", .platform_name = "pxa-pcm-audio", - .cpu_dai_name = "pxa-ac97.1", + .cpu_dai_name = "pxa2xx-ac97-aux", .codec_name = "wm9713-aux", }, {
sound/usb/card.c +4 -0
@@ -323,6 +323,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,return -ENOMEM ; } +mutex_init (&chip->shutdown_mutex); chip->index = idx; chip->dev = dev; chip->card = card;
@@ -531,6 +532,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) chip = ptr; card = chip->card;mutex_lock (®ister_mutex); +mutex_lock (&chip->shutdown_mutex); chip->shutdown =1 ; chip->num_interfaces--;if (chip->num_interfaces <=0 ) {
@@ -548,9 +550,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)snd_usb_mixer_disconnect (p); } usb_chip[chip->index] =NULL ; +mutex_unlock (&chip->shutdown_mutex);mutex_unlock (®ister_mutex);snd_card_free_when_closed (card); }else { +mutex_unlock (&chip->shutdown_mutex);mutex_unlock (®ister_mutex); } }
sound/usb/pcm.c +5 -2
@@ -361,6 +361,7 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream, }if (changed) { +mutex_lock (&subs->stream->chip->shutdown_mutex);/* format changed */ snd_usb_release_substream_urbs (subs,0 );/* influenced: period_bytes, channels, rate, format, */
@@ -368,6 +369,7 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream,params_rate (hw_params),snd_pcm_format_physical_width (params_format (hw_params)) * params_channels(hw_params)); +mutex_unlock (&subs->stream->chip->shutdown_mutex); }return ret;
@@ -385,8 +387,9 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream) subs->cur_audiofmt =NULL ; subs->cur_rate =0 ; subs->period_bytes =0 ; -if (!subs->stream->chip->shutdown) -snd_usb_release_substream_urbs (subs,0 ); +mutex_lock (&subs->stream->chip->shutdown_mutex); +snd_usb_release_substream_urbs (subs,0 ); +mutex_unlock (&subs->stream->chip->shutdown_mutex);return snd_pcm_lib_free_vmalloc_buffer (substream); }
sound/usb/usbaudio.h +1 -0
@@ -36,6 +36,7 @@ struct snd_usb_audio {struct snd_card *card;u32 usb_id;int shutdown; +struct mutex shutdown_mutex; unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */int num_interfaces;int num_suspended_intf;