diff --git a/[refs] b/[refs] index 53f2657318f0..6d5008cf0ff4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8bd93ca7b03f38a7bc1a4ed9e93e8c006e753d5b +refs/heads/master: 2a9e1cfa23fb62da37739af81127dab5af095d99 diff --git a/trunk/.mailmap b/trunk/.mailmap index 97f7b4fb6139..eba9bf953ef5 100644 --- a/trunk/.mailmap +++ b/trunk/.mailmap @@ -80,8 +80,6 @@ Nguyen Anh Quynh Paolo 'Blaisorblade' Giarrusso Patrick Mochel Peter A Jonsson -Peter Oruba -Peter Oruba Praveen BP Rajesh Shah Ralf Baechle diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index edef85ce1195..7286ad090db7 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -172,7 +172,7 @@ i2c/ - directory with info about the I2C bus/protocol (2 wire, kHz speed). i2o/ - directory with info about the Linux I2O subsystem. -x86/i386/ +i386/ - directory with info about Linux on Intel 32 bit architecture. ia64/ - directory with info about Linux on Intel 64 bit architecture. @@ -382,7 +382,7 @@ w1/ - directory with documents regarding the 1-wire (w1) subsystem. watchdog/ - how to auto-reboot Linux if it has "fallen and can't get up". ;-) -x86/x86_64/ +x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. zorro.txt - info on writing drivers for Zorro bus devices found on Amigas. diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 9b1f6ca100d1..fabc06466b93 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -136,7 +136,7 @@ quiet_cmd_db2ps = PS $@ %.ps : %.xml $(call cmd,db2ps) -quiet_cmd_db2pdf = PDF $@ +quiet_cmd_db2pdf = PDF $@ cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template)) %.pdf : %.xml $(call cmd,db2pdf) @@ -148,7 +148,7 @@ build_main_index = rm -rf $(main_idx) && \ echo '

Kernel Version: $(KERNELVERSION)

' >> $(main_idx) && \ cat $(HTML) >> $(main_idx) -quiet_cmd_db2html = HTML $@ +quiet_cmd_db2html = HTML $@ cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ echo ' \ $(patsubst %.html,%,$(notdir $@))

' > $@ diff --git a/trunk/Documentation/DocBook/deviceiobook.tmpl b/trunk/Documentation/DocBook/deviceiobook.tmpl index 3ed88126ab8f..60d6e0b81bd9 100644 --- a/trunk/Documentation/DocBook/deviceiobook.tmpl +++ b/trunk/Documentation/DocBook/deviceiobook.tmpl @@ -24,7 +24,7 @@ Cox

- alan@lxorguk.ukuu.org.uk + alan@redhat.com
diff --git a/trunk/Documentation/DocBook/mcabook.tmpl b/trunk/Documentation/DocBook/mcabook.tmpl index 467ccac6ec50..499eddc2d079 100644 --- a/trunk/Documentation/DocBook/mcabook.tmpl +++ b/trunk/Documentation/DocBook/mcabook.tmpl @@ -12,7 +12,7 @@ Cox
- alan@lxorguk.ukuu.org.uk + alan@redhat.com
diff --git a/trunk/Documentation/DocBook/wanbook.tmpl b/trunk/Documentation/DocBook/wanbook.tmpl index 8c93db122f04..9eebcc304de4 100644 --- a/trunk/Documentation/DocBook/wanbook.tmpl +++ b/trunk/Documentation/DocBook/wanbook.tmpl @@ -12,7 +12,7 @@ Cox
- alan@lxorguk.ukuu.org.uk + alan@redhat.com
diff --git a/trunk/Documentation/DocBook/z8530book.tmpl b/trunk/Documentation/DocBook/z8530book.tmpl index 6f3883be877e..a42a8a4c7689 100644 --- a/trunk/Documentation/DocBook/z8530book.tmpl +++ b/trunk/Documentation/DocBook/z8530book.tmpl @@ -12,7 +12,7 @@ Cox
- alan@lxorguk.ukuu.org.uk + alan@redhat.com
diff --git a/trunk/Documentation/ManagementStyle b/trunk/Documentation/ManagementStyle index a5f0ea58c788..49a8efa5afeb 100644 --- a/trunk/Documentation/ManagementStyle +++ b/trunk/Documentation/ManagementStyle @@ -17,7 +17,7 @@ companies. If you sign purchase orders or you have any clue about the budget of your group, you're almost certainly not a kernel manager. These suggestions may or may not apply to you. -First off, I'd suggest buying "Seven Habits of Highly Effective +First off, I'd suggest buying "Seven Habits of Highly Successful People", and NOT read it. Burn it, it's a great symbolic gesture. (*) This document does so not so much by answering the question, but by diff --git a/trunk/Documentation/accounting/.gitignore b/trunk/Documentation/accounting/.gitignore deleted file mode 100644 index 86485203c4ae..000000000000 --- a/trunk/Documentation/accounting/.gitignore +++ /dev/null @@ -1 +0,0 @@ -getdelays diff --git a/trunk/Documentation/auxdisplay/.gitignore b/trunk/Documentation/auxdisplay/.gitignore deleted file mode 100644 index 7af222860a96..000000000000 --- a/trunk/Documentation/auxdisplay/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cfag12864b-example diff --git a/trunk/Documentation/connector/.gitignore b/trunk/Documentation/connector/.gitignore deleted file mode 100644 index d2b9c32accd4..000000000000 --- a/trunk/Documentation/connector/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ucon diff --git a/trunk/Documentation/filesystems/Locking b/trunk/Documentation/filesystems/Locking index 23d2f4460deb..8362860e21a7 100644 --- a/trunk/Documentation/filesystems/Locking +++ b/trunk/Documentation/filesystems/Locking @@ -161,12 +161,8 @@ prototypes: int (*set_page_dirty)(struct page *page); int (*readpages)(struct file *filp, struct address_space *mapping, struct list_head *pages, unsigned nr_pages); - int (*write_begin)(struct file *, struct address_space *mapping, - loff_t pos, unsigned len, unsigned flags, - struct page **pagep, void **fsdata); - int (*write_end)(struct file *, struct address_space *mapping, - loff_t pos, unsigned len, unsigned copied, - struct page *page, void *fsdata); + int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); + int (*commit_write)(struct file *, struct page *, unsigned, unsigned); sector_t (*bmap)(struct address_space *, sector_t); int (*invalidatepage) (struct page *, unsigned long); int (*releasepage) (struct page *, int); @@ -184,6 +180,8 @@ sync_page: no maybe writepages: no set_page_dirty no no readpages: no +prepare_write: no yes yes +commit_write: no yes yes write_begin: no locks the page yes write_end: no yes, unlocks yes perform_write: no n/a yes @@ -193,7 +191,7 @@ releasepage: no yes direct_IO: no launder_page: no yes - ->write_begin(), ->write_end(), ->sync_page() and ->readpage() + ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() may be called from the request handler (/dev/loop). ->readpage() unlocks the page, either synchronously or via I/O diff --git a/trunk/Documentation/filesystems/vfs.txt b/trunk/Documentation/filesystems/vfs.txt index 5579bda58a6d..c4d348dabe94 100644 --- a/trunk/Documentation/filesystems/vfs.txt +++ b/trunk/Documentation/filesystems/vfs.txt @@ -492,7 +492,7 @@ written-back to storage typically in whole pages, however the address_space has finer control of write sizes. The read process essentially only requires 'readpage'. The write -process is more complicated and uses write_begin/write_end or +process is more complicated and uses prepare_write/commit_write or set_page_dirty to write data into the address_space, and writepage, sync_page, and writepages to writeback data to storage. @@ -521,6 +521,8 @@ struct address_space_operations { int (*set_page_dirty)(struct page *page); int (*readpages)(struct file *filp, struct address_space *mapping, struct list_head *pages, unsigned nr_pages); + int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); + int (*commit_write)(struct file *, struct page *, unsigned, unsigned); int (*write_begin)(struct file *, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata); @@ -596,7 +598,37 @@ struct address_space_operations { readpages is only used for read-ahead, so read errors are ignored. If anything goes wrong, feel free to give up. - write_begin: + prepare_write: called by the generic write path in VM to set up a write + request for a page. This indicates to the address space that + the given range of bytes is about to be written. The + address_space should check that the write will be able to + complete, by allocating space if necessary and doing any other + internal housekeeping. If the write will update parts of + any basic-blocks on storage, then those blocks should be + pre-read (if they haven't been read already) so that the + updated blocks can be written out properly. + The page will be locked. + + Note: the page _must not_ be marked uptodate in this function + (or anywhere else) unless it actually is uptodate right now. As + soon as a page is marked uptodate, it is possible for a concurrent + read(2) to copy it to userspace. + + commit_write: If prepare_write succeeds, new data will be copied + into the page and then commit_write will be called. It will + typically update the size of the file (if appropriate) and + mark the inode as dirty, and do any other related housekeeping + operations. It should avoid returning an error if possible - + errors should have been handled by prepare_write. + + write_begin: This is intended as a replacement for prepare_write. The + key differences being that: + - it returns a locked page (in *pagep) rather than being + given a pre locked page; + - it must be able to cope with short writes (where the + length passed to write_begin is greater than the number + of bytes copied into the page). + Called by the generic buffered write code to ask the filesystem to prepare to write len bytes at the given offset in the file. The address_space should check that the write will be able to complete, @@ -608,9 +640,6 @@ struct address_space_operations { The filesystem must return the locked pagecache page for the specified offset, in *pagep, for the caller to write into. - It must be able to cope with short writes (where the length passed to - write_begin is greater than the number of bytes copied into the page). - flags is a field for AOP_FLAG_xxx flags, described in include/linux/fs.h. diff --git a/trunk/Documentation/i2c/busses/i2c-sis96x b/trunk/Documentation/i2c/busses/i2c-sis96x index 70e6a0cc1e15..266481fd26e2 100644 --- a/trunk/Documentation/i2c/busses/i2c-sis96x +++ b/trunk/Documentation/i2c/busses/i2c-sis96x @@ -42,7 +42,7 @@ I suspect that this driver could be made to work for the following SiS chipsets as well: 635, and 635T. If anyone owns a board with those chips AND is willing to risk crashing & burning an otherwise well-behaved kernel in the name of progress... please contact me at or -via the linux-i2c mailing list: . Please send bug +via the project's mailing list: . Please send bug reports and/or success stories as well. diff --git a/trunk/Documentation/ia64/.gitignore b/trunk/Documentation/ia64/.gitignore deleted file mode 100644 index ab806edc8732..000000000000 --- a/trunk/Documentation/ia64/.gitignore +++ /dev/null @@ -1 +0,0 @@ -aliasing-test diff --git a/trunk/Documentation/isdn/CREDITS b/trunk/Documentation/isdn/CREDITS index c1679e913fca..8cac6c2f23ee 100644 --- a/trunk/Documentation/isdn/CREDITS +++ b/trunk/Documentation/isdn/CREDITS @@ -5,7 +5,7 @@ I want to thank all who contributed to this project and especially to: Thomas Bogendörfer (tsbogend@bigbug.franken.de) Tester, lots of bugfixes and hints. -Alan Cox (alan@lxorguk.ukuu.org.uk) +Alan Cox (alan@redhat.com) For help getting into standard-kernel. Henner Eisen (eis@baty.hanse.de) diff --git a/trunk/Documentation/ja_JP/HOWTO b/trunk/Documentation/ja_JP/HOWTO index 55476982b5ca..0775cf4798b2 100644 --- a/trunk/Documentation/ja_JP/HOWTO +++ b/trunk/Documentation/ja_JP/HOWTO @@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a fork. So if you have any comments or updates for this file, please try to update the original English file first. -Last Updated: 2008/10/24 +Last Updated: 2008/08/21 ================================== これは、 -linux-2.6.28/Documentation/HOWTO +linux-2.6.27/Documentation/HOWTO の和訳です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > -翻訳日: 2008/10/24 +翻訳日: 2008/8/5 翻訳者: Tsugikazu Shibata 校正者: 松倉さん 小林 雅典さん (Masanori Kobayasi) @@ -110,8 +110,8 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを 新しいドキュメントファイルも追加することを勧めます。 カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 -をマニュアルページのメンテナ mtk.manpages@gmail.com に送り、CC を -linux-api@ver.kernel.org に送ることを勧めます。 +をマニュアルページのメンテナ mtk.manpages@gmail.com に送ることを勧めま +す。 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で す- @@ -149,7 +149,7 @@ linux-api@ver.kernel.org に送ることを勧めます。 この他にパッチを作る方法についてのよくできた記述は- "The Perfect Patch" - http://userweb.kernel.org/~akpm/stuff/tpp.txt + http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt "Linux kernel patch submission format" http://linux.yyz.us/patch-format.html @@ -664,7 +664,7 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を これについて全てがどのようにあるべきかについての詳細は、以下のドキュメ ントの ChangeLog セクションを見てください- "The Perfect Patch" - http://userweb.kernel.org/~akpm/stuff/tpp.txt + http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt これらのどれもが、時にはとても困難です。これらの慣例を完璧に実施するに は数年かかるかもしれません。これは継続的な改善のプロセスであり、そのた diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 1bbcaa8982b6..343e0f0f84b6 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -100,7 +100,7 @@ parameter is applicable: X86-32 X86-32, aka i386 architecture is enabled. X86-64 X86-64 architecture is enabled. More X86-64 boot options can be found in - Documentation/x86/x86_64/boot-options.txt . + Documentation/x86_64/boot-options.txt . X86 Either 32bit or 64bit x86 (same as X86-32+X86-64) In addition, the following text indicates that the option: @@ -112,10 +112,10 @@ In addition, the following text indicates that the option: Parameters denoted with BOOT are actually interpreted by the boot loader, and have no meaning to the kernel directly. Do not modify the syntax of boot loader parameters without extreme -need or coordination with . +need or coordination with . There are also arch-specific kernel-parameters not documented here. -See for example . +See for example . Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will @@ -1222,7 +1222,7 @@ and is between 256 and 4096 characters. It is defined in the file mce [X86-32] Machine Check Exception - mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt + mce=option [X86-64] See Documentation/x86_64/boot-options.txt md= [HW] RAID subsystems devices and level See Documentation/md.txt. @@ -1728,7 +1728,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/paride.txt. pirq= [SMP,APIC] Manual mp-table setup - See Documentation/x86/i386/IO-APIC.txt. + See Documentation/i386/IO-APIC.txt. plip= [PPT,NET] Parallel port network link Format: { parport | timid | 0 } @@ -2343,7 +2343,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/fb/modedb.txt. vga= [BOOT,X86-32] Select a particular video mode - See Documentation/x86/i386/boot.txt and + See Documentation/i386/boot.txt and Documentation/svga.txt. Use vga=ask for menu. This is actually a boot loader parameter; the value is diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index da86fd53856a..7228369d1014 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -402,7 +402,7 @@ static unsigned long load_bzimage(int fd) void *p = from_guest_phys(0x100000); /* Go back to the start of the file and read the header. It should be - * a Linux boot header (see Documentation/x86/i386/boot.txt) */ + * a Linux boot header (see Documentation/i386/boot.txt) */ lseek(fd, 0, SEEK_SET); read(fd, &boot, sizeof(boot)); diff --git a/trunk/Documentation/networking/.gitignore b/trunk/Documentation/networking/.gitignore deleted file mode 100644 index 286a5680f490..000000000000 --- a/trunk/Documentation/networking/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ifenslave diff --git a/trunk/Documentation/networking/dmfe.txt b/trunk/Documentation/networking/dmfe.txt index 8006c227fda2..b1b7499dd9d3 100644 --- a/trunk/Documentation/networking/dmfe.txt +++ b/trunk/Documentation/networking/dmfe.txt @@ -60,6 +60,6 @@ Tobias Ringstrom : Current Maintainer Contributors: Marcelo Tosatti -Alan Cox +Alan Cox Jeff Garzik Vojtech Pavlik diff --git a/trunk/Documentation/pcmcia/.gitignore b/trunk/Documentation/pcmcia/.gitignore deleted file mode 100644 index 53d081336757..000000000000 --- a/trunk/Documentation/pcmcia/.gitignore +++ /dev/null @@ -1 +0,0 @@ -crc32hash diff --git a/trunk/Documentation/scsi/aacraid.txt b/trunk/Documentation/scsi/aacraid.txt index ddace3afc83b..709ca991a451 100644 --- a/trunk/Documentation/scsi/aacraid.txt +++ b/trunk/Documentation/scsi/aacraid.txt @@ -128,7 +128,7 @@ Supported Cards/Chipsets People ------------------------- -Alan Cox +Alan Cox Christoph Hellwig (updates for new-style PCI probing and SCSI host registration, small cleanups/fixes) Matt Domsch (revision ioctl, adapter messages) diff --git a/trunk/Documentation/spi/.gitignore b/trunk/Documentation/spi/.gitignore deleted file mode 100644 index 4280576397e8..000000000000 --- a/trunk/Documentation/spi/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -spidev_fdx -spidev_test diff --git a/trunk/Documentation/stable_kernel_rules.txt b/trunk/Documentation/stable_kernel_rules.txt index a452227361b1..4cfc78835bc1 100644 --- a/trunk/Documentation/stable_kernel_rules.txt +++ b/trunk/Documentation/stable_kernel_rules.txt @@ -12,7 +12,6 @@ Rules on what kind of patches are accepted, and which ones are not, into the marked CONFIG_BROKEN), an oops, a hang, data corruption, a real security issue, or some "oh, that's not good" issue. In short, something critical. - - New device IDs and quirks are also accepted. - No "theoretical race condition" issues, unless an explanation of how the race can be exploited is also provided. - It cannot contain any "trivial" fixes in it (spelling changes, diff --git a/trunk/Documentation/sysctl/kernel.txt b/trunk/Documentation/sysctl/kernel.txt index a4ccdd1981cf..bde799e06598 100644 --- a/trunk/Documentation/sysctl/kernel.txt +++ b/trunk/Documentation/sysctl/kernel.txt @@ -363,21 +363,11 @@ tainted: Non-zero if the kernel has been tainted. Numeric values, which can be ORed together: - 1 - A module with a non-GPL license has been loaded, this - includes modules with no license. - Set by modutils >= 2.4.9 and module-init-tools. - 2 - A module was force loaded by insmod -f. - Set by modutils >= 2.4.9 and module-init-tools. - 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. - 8 - A module was forcibly unloaded from the system by rmmod -f. - 16 - A hardware machine check error occurred on the system. - 32 - A bad page was discovered on the system. - 64 - The user has asked that the system be marked "tainted". This - could be because they are running software that directly modifies - the hardware, or for other reasons. - 128 - The system has died. - 256 - The ACPI DSDT has been overridden with one supplied by the user - instead of using the one provided by the hardware. - 512 - A kernel warning has occurred. -1024 - A module from drivers/staging was loaded. + 1 - A module with a non-GPL license has been loaded, this + includes modules with no license. + Set by modutils >= 2.4.9 and module-init-tools. + 2 - A module was force loaded by insmod -f. + Set by modutils >= 2.4.9 and module-init-tools. + 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. + 64 - A module from drivers/staging was loaded. diff --git a/trunk/Documentation/video4linux/.gitignore b/trunk/Documentation/video4linux/.gitignore deleted file mode 100644 index 952703943e8e..000000000000 --- a/trunk/Documentation/video4linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -v4lgrab diff --git a/trunk/Documentation/video4linux/bttv/CONTRIBUTORS b/trunk/Documentation/video4linux/bttv/CONTRIBUTORS index eb41b2650860..8aad6dd93d6b 100644 --- a/trunk/Documentation/video4linux/bttv/CONTRIBUTORS +++ b/trunk/Documentation/video4linux/bttv/CONTRIBUTORS @@ -3,7 +3,7 @@ Contributors to bttv: Michael Chu AverMedia fix and more flexible card recognition -Alan Cox +Alan Cox Video4Linux interface and 2.1.x kernel adaptation Chris Kleitsch diff --git a/trunk/Documentation/vm/.gitignore b/trunk/Documentation/vm/.gitignore deleted file mode 100644 index 33e8a023df02..000000000000 --- a/trunk/Documentation/vm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -slabinfo diff --git a/trunk/Documentation/watchdog/src/.gitignore b/trunk/Documentation/watchdog/src/.gitignore deleted file mode 100644 index ac90997dba93..000000000000 --- a/trunk/Documentation/watchdog/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -watchdog-simple -watchdog-test diff --git a/trunk/Documentation/x86/x86_64/boot-options.txt b/trunk/Documentation/x86/x86_64/boot-options.txt index f6d561a1a9b2..72ffb5373ec7 100644 --- a/trunk/Documentation/x86/x86_64/boot-options.txt +++ b/trunk/Documentation/x86/x86_64/boot-options.txt @@ -35,7 +35,7 @@ APICs nolapic Don't use the local APIC (alias for i386 compatibility) - pirq=... See Documentation/x86/i386/IO-APIC.txt + pirq=... See Documentation/i386/IO-APIC.txt noapictimer Don't set up the APIC timer @@ -139,7 +139,7 @@ Non Executable Mappings SMP additional_cpus=NUM Allow NUM more CPUs for hotplug - (defaults are specified by the BIOS, see Documentation/x86/x86_64/cpu-hotplug-spec) + (defaults are specified by the BIOS, see Documentation/x86_64/cpu-hotplug-spec) NUMA diff --git a/trunk/Documentation/x86/x86_64/fake-numa-for-cpusets b/trunk/Documentation/x86/x86_64/fake-numa-for-cpusets index 33bb56655991..d1a985c5b00a 100644 --- a/trunk/Documentation/x86/x86_64/fake-numa-for-cpusets +++ b/trunk/Documentation/x86/x86_64/fake-numa-for-cpusets @@ -10,7 +10,7 @@ amount of system memory that are available to a certain class of tasks. For more information on the features of cpusets, see Documentation/cpusets.txt. There are a number of different configurations you can use for your needs. For more information on the numa=fake command line option and its various ways of -configuring fake nodes, see Documentation/x86/x86_64/boot-options.txt. +configuring fake nodes, see Documentation/x86_64/boot-options.txt. For the purposes of this introduction, we'll assume a very primitive NUMA emulation setup of "numa=fake=4*512,". This will split our system memory into diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index c842ec34d2fe..16202c8ac68f 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -347,7 +347,7 @@ S: Maintained ALI1563 I2C DRIVER P: Rudolf Marek M: r.marek@assembler.cz -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained ALPHA PORT @@ -1749,7 +1749,7 @@ FREESCALE I2C CPM DRIVER P: Jochen Friedrich M: jochen@scram.de L: linuxppc-dev@ozlabs.org -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained FREESCALE SOC FS_ENET DRIVER @@ -2022,7 +2022,7 @@ S: Maintained I2C/SMBUS STUB DRIVER P: Mark M. Hoffman M: mhoffman@lightlink.com -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained I2C SUBSYSTEM @@ -2030,14 +2030,14 @@ P: Jean Delvare (PC drivers, core) M: khali@linux-fr.org P: Ben Dooks (embedded platforms) M: ben-linux@fluff.org -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org T: quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/ S: Maintained I2C-TINY-USB DRIVER P: Till Harbaum M: till@harbaum.org -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org T: http://www.harbaum.org/till/i2c_tiny_usb S: Maintained @@ -2701,16 +2701,6 @@ M: matthew@wil.cx L: linux-scsi@vger.kernel.org S: Maintained -LTP (Linux Test Project) -P: Subrata Modak -M: subrata@linux.vnet.ibm.com -P: Mike Frysinger -M: vapier@gentoo.org -L: ltp-list@lists.sourceforge.net (subscribers-only) -W: http://ltp.sourceforge.net/ -T: git kernel.org/pub/scm/linux/kernel/git/galak/ltp.git -S: Maintained - M32R ARCHITECTURE P: Hirokazu Takata M: takata@linux-m32r.org @@ -3153,7 +3143,7 @@ S: Maintained OPENCORES I2C BUS DRIVER P: Peter Korsgaard M: jacmet@sunsite.dk -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained OPROFILE @@ -3200,7 +3190,7 @@ S: Maintained PA SEMI SMBUS DRIVER P: Olof Johansson M: olof@lixom.net -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained PANASONIC LAPTOP ACPI EXTRAS DRIVER @@ -3345,7 +3335,7 @@ S: Maintained PNXxxxx I2C DRIVER P: Vitaly Wool M: vitalywool@gmail.com -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained PPP PROTOCOL DRIVERS AND COMPRESSORS @@ -3809,7 +3799,7 @@ S: Maintained SIS 96X I2C/SMBUS DRIVER P: Mark M. Hoffman M: mhoffman@lightlink.com -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained SIS FRAMEBUFFER DRIVER @@ -4556,7 +4546,7 @@ S: Maintained VIAPRO SMBUS DRIVER P: Jean Delvare M: khali@linux-fr.org -L: linux-i2c@vger.kernel.org +L: i2c@lm-sensors.org S: Maintained VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER diff --git a/trunk/arch/ia64/include/asm/iommu.h b/trunk/arch/ia64/include/asm/iommu.h index 0490794fe4aa..5fb2bb93de3b 100644 --- a/trunk/arch/ia64/include/asm/iommu.h +++ b/trunk/arch/ia64/include/asm/iommu.h @@ -11,5 +11,6 @@ extern int force_iommu, no_iommu; extern int iommu_detected; extern void iommu_dma_init(void); extern void machvec_init(const char *name); +extern int forbid_dac; #endif diff --git a/trunk/arch/ia64/kernel/pci-dma.c b/trunk/arch/ia64/kernel/pci-dma.c index 031abbf9c875..10a75b557650 100644 --- a/trunk/arch/ia64/kernel/pci-dma.c +++ b/trunk/arch/ia64/kernel/pci-dma.c @@ -89,6 +89,13 @@ int iommu_dma_supported(struct device *dev, u64 mask) { struct dma_mapping_ops *ops = get_dma_ops(dev); +#ifdef CONFIG_PCI + if (mask > 0xffffffff && forbid_dac > 0) { + dev_info(dev, "Disallowing DAC for device\n"); + return 0; + } +#endif + if (ops->dma_supported_op) return ops->dma_supported_op(dev, mask); diff --git a/trunk/arch/x86/Kconfig.cpu b/trunk/arch/x86/Kconfig.cpu index b815664fe370..0b7c4a3f0651 100644 --- a/trunk/arch/x86/Kconfig.cpu +++ b/trunk/arch/x86/Kconfig.cpu @@ -513,19 +513,19 @@ config CPU_SUP_UMC_32 If unsure, say N. config X86_DS - def_bool X86_PTRACE_BTS - depends on X86_DEBUGCTLMSR + bool "Debug Store support" + default y + help + Add support for Debug Store. + This allows the kernel to provide a memory buffer to the hardware + to store various profiling and tracing events. config X86_PTRACE_BTS - bool "Branch Trace Store" + bool "ptrace interface to Branch Trace Store" default y - depends on X86_DEBUGCTLMSR + depends on (X86_DS && X86_DEBUGCTLMSR) help - This adds a ptrace interface to the hardware's branch trace store. - - Debuggers may use it to collect an execution trace of the debugged - application in order to answer the question 'how did I get here?'. - Debuggers may trace user mode as well as kernel mode. - - Say Y unless there is no application development on this machine - and you want to save a small amount of code size. + Add a ptrace interface to allow collecting an execution trace + of the traced task. + This collects control flow changes in a (cyclic) buffer and allows + debuggers to fill in the gaps and show an execution trace of the debuggee. diff --git a/trunk/arch/x86/boot/compressed/.gitignore b/trunk/arch/x86/boot/compressed/.gitignore index 63eff3b04d01..be0ed065249b 100644 --- a/trunk/arch/x86/boot/compressed/.gitignore +++ b/trunk/arch/x86/boot/compressed/.gitignore @@ -1,3 +1 @@ relocs -vmlinux.bin.all -vmlinux.relocs diff --git a/trunk/arch/x86/include/asm/es7000/wakecpu.h b/trunk/arch/x86/include/asm/es7000/wakecpu.h index 398493461913..3ffc5a7bf667 100644 --- a/trunk/arch/x86/include/asm/es7000/wakecpu.h +++ b/trunk/arch/x86/include/asm/es7000/wakecpu.h @@ -50,9 +50,10 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#define inquire_remote_apic(apicid) do { \ - if (apic_verbosity >= APIC_DEBUG) \ - __inquire_remote_apic(apicid); \ - } while (0) +#if APIC_DEBUG + #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid) +#else + #define inquire_remote_apic(apicid) {} +#endif #endif /* __ASM_MACH_WAKECPU_H */ diff --git a/trunk/arch/x86/include/asm/iommu.h b/trunk/arch/x86/include/asm/iommu.h index e4a552d44465..98e28ea8cd16 100644 --- a/trunk/arch/x86/include/asm/iommu.h +++ b/trunk/arch/x86/include/asm/iommu.h @@ -7,6 +7,7 @@ extern struct dma_mapping_ops nommu_dma_ops; extern int force_iommu, no_iommu; extern int iommu_detected; extern int dmar_disabled; +extern int forbid_dac; extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); diff --git a/trunk/arch/x86/include/asm/mach-default/mach_wakecpu.h b/trunk/arch/x86/include/asm/mach-default/mach_wakecpu.h index 9d80db91e992..d5c0b826a4ff 100644 --- a/trunk/arch/x86/include/asm/mach-default/mach_wakecpu.h +++ b/trunk/arch/x86/include/asm/mach-default/mach_wakecpu.h @@ -33,9 +33,10 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#define inquire_remote_apic(apicid) do { \ - if (apic_verbosity >= APIC_DEBUG) \ - __inquire_remote_apic(apicid); \ - } while (0) +#if APIC_DEBUG + #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid) +#else + #define inquire_remote_apic(apicid) {} +#endif #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */ diff --git a/trunk/arch/x86/kernel/k8.c b/trunk/arch/x86/kernel/k8.c index cbc4332a77b2..304d8bad6559 100644 --- a/trunk/arch/x86/kernel/k8.c +++ b/trunk/arch/x86/kernel/k8.c @@ -18,6 +18,7 @@ static u32 *flush_words; struct pci_device_id k8_nb_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) }, {} }; EXPORT_SYMBOL(k8_nb_ids); diff --git a/trunk/arch/x86/kernel/machine_kexec_32.c b/trunk/arch/x86/kernel/machine_kexec_32.c index 7a385746509a..0732adba05ca 100644 --- a/trunk/arch/x86/kernel/machine_kexec_32.c +++ b/trunk/arch/x86/kernel/machine_kexec_32.c @@ -162,10 +162,7 @@ void machine_kexec(struct kimage *image) page_list[VA_PTE_0] = (unsigned long)kexec_pte0; page_list[PA_PTE_1] = __pa(kexec_pte1); page_list[VA_PTE_1] = (unsigned long)kexec_pte1; - - if (image->type == KEXEC_TYPE_DEFAULT) - page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) - << PAGE_SHIFT); + page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) << PAGE_SHIFT); /* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is diff --git a/trunk/arch/x86/kernel/microcode_amd.c b/trunk/arch/x86/kernel/microcode_amd.c index 5f8e5d75a254..7a1f8eeac2c7 100644 --- a/trunk/arch/x86/kernel/microcode_amd.c +++ b/trunk/arch/x86/kernel/microcode_amd.c @@ -39,7 +39,7 @@ #include MODULE_DESCRIPTION("AMD Microcode Update Driver"); -MODULE_AUTHOR("Peter Oruba"); +MODULE_AUTHOR("Peter Oruba "); MODULE_LICENSE("GPL v2"); #define UCODE_MAGIC 0x00414d44 diff --git a/trunk/arch/x86/kernel/microcode_core.c b/trunk/arch/x86/kernel/microcode_core.c index 82fb2809ce32..936d8d55f230 100644 --- a/trunk/arch/x86/kernel/microcode_core.c +++ b/trunk/arch/x86/kernel/microcode_core.c @@ -480,8 +480,8 @@ static int __init microcode_init(void) printk(KERN_INFO "Microcode Update Driver: v" MICROCODE_VERSION - " ," - " Peter Oruba\n"); + " " + " \n"); return 0; } diff --git a/trunk/arch/x86/kernel/pci-dma.c b/trunk/arch/x86/kernel/pci-dma.c index 192624820217..1972266e8ba5 100644 --- a/trunk/arch/x86/kernel/pci-dma.c +++ b/trunk/arch/x86/kernel/pci-dma.c @@ -9,8 +9,6 @@ #include #include -static int forbid_dac __read_mostly; - struct dma_mapping_ops *dma_ops; EXPORT_SYMBOL(dma_ops); @@ -293,17 +291,3 @@ void pci_iommu_shutdown(void) } /* Must execute after PCI subsystem */ fs_initcall(pci_iommu_init); - -#ifdef CONFIG_PCI -/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ - -static __devinit void via_no_dac(struct pci_dev *dev) -{ - if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { - printk(KERN_INFO "PCI: VIA PCI bridge detected." - "Disabling DAC.\n"); - forbid_dac = 1; - } -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); -#endif diff --git a/trunk/arch/x86/kernel/pci-gart_64.c b/trunk/arch/x86/kernel/pci-gart_64.c index a42b02b4df68..e3f75bbcedea 100644 --- a/trunk/arch/x86/kernel/pci-gart_64.c +++ b/trunk/arch/x86/kernel/pci-gart_64.c @@ -744,7 +744,7 @@ void __init gart_iommu_init(void) long i; if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) { - printk(KERN_INFO "PCI-GART: No AMD GART found.\n"); + printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n"); return; } diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index ad38648bddbd..f79a02f64d10 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -884,7 +884,6 @@ static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, void __init mem_init(void) { long codesize, reservedpages, datasize, initsize; - unsigned long absent_pages; start_periodic_check_for_corruption(); @@ -900,9 +899,8 @@ void __init mem_init(void) #else totalram_pages = free_all_bootmem(); #endif - - absent_pages = absent_pages_in_range(0, max_pfn); - reservedpages = max_pfn - totalram_pages - absent_pages; + reservedpages = max_pfn - totalram_pages - + absent_pages_in_range(0, max_pfn); after_bootmem = 1; codesize = (unsigned long) &_etext - (unsigned long) &_text; @@ -919,11 +917,10 @@ void __init mem_init(void) VSYSCALL_END - VSYSCALL_START); printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " - "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n", + "%ldk reserved, %ldk data, %ldk init)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), max_pfn << (PAGE_SHIFT-10), codesize >> 10, - absent_pages << (PAGE_SHIFT-10), reservedpages << (PAGE_SHIFT-10), datasize >> 10, initsize >> 10); diff --git a/trunk/drivers/Kconfig b/trunk/drivers/Kconfig index 2f557f570ade..d38f43f593d4 100644 --- a/trunk/drivers/Kconfig +++ b/trunk/drivers/Kconfig @@ -68,8 +68,6 @@ source "drivers/ssb/Kconfig" source "drivers/mfd/Kconfig" -source "drivers/regulator/Kconfig" - source "drivers/media/Kconfig" source "drivers/video/Kconfig" diff --git a/trunk/drivers/base/sys.c b/trunk/drivers/base/sys.c index c98c31ec2f75..75dd6e22faff 100644 --- a/trunk/drivers/base/sys.c +++ b/trunk/drivers/base/sys.c @@ -355,7 +355,7 @@ static void __sysdev_resume(struct sys_device *dev) * sysdev_suspend - Suspend all system devices. * @state: Power state to enter. * - * We perform an almost identical operation as sysdev_shutdown() + * We perform an almost identical operation as sys_device_shutdown() * above, though calling ->suspend() instead. Interrupts are disabled * when this called. Devices are responsible for both saving state and * quiescing or powering down the device. @@ -437,7 +437,7 @@ int sysdev_suspend(pm_message_t state) /** * sysdev_resume - Bring system devices back to life. * - * Similar to sysdev_suspend(), but we iterate the list forwards + * Similar to sys_device_suspend(), but we iterate the list forwards * to guarantee that parent devices are resumed before their children. * * Note: Interrupts are disabled when called. @@ -488,8 +488,7 @@ ssize_t sysdev_store_ulong(struct sys_device *sysdev, if (end == buf) return -EINVAL; *(unsigned long *)(ea->var) = new; - /* Always return full write size even if we didn't consume all */ - return size; + return end - buf; } EXPORT_SYMBOL_GPL(sysdev_store_ulong); @@ -512,8 +511,7 @@ ssize_t sysdev_store_int(struct sys_device *sysdev, if (end == buf || new > INT_MAX || new < INT_MIN) return -EINVAL; *(int *)(ea->var) = new; - /* Always return full write size even if we didn't consume all */ - return size; + return end - buf; } EXPORT_SYMBOL_GPL(sysdev_store_int); diff --git a/trunk/drivers/block/loop.c b/trunk/drivers/block/loop.c index 5c4ee70d5cf3..3f09cd8bcc38 100644 --- a/trunk/drivers/block/loop.c +++ b/trunk/drivers/block/loop.c @@ -40,7 +40,8 @@ * Heinz Mauelshagen , Feb 2002 * * Support for falling back on the write file operation when the address space - * operations write_begin is not available on the backing filesystem. + * operations prepare_write and/or commit_write are not available on the + * backing filesystem. * Anton Altaparmakov, 16 Feb 2005 * * Still To Fix: @@ -764,7 +765,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, */ if (!file->f_op->splice_read) goto out_putf; - if (aops->write_begin) + if (aops->prepare_write || aops->write_begin) lo_flags |= LO_FLAGS_USE_AOPS; if (!(lo_flags & LO_FLAGS_USE_AOPS) && !file->f_op->write) lo_flags |= LO_FLAGS_READ_ONLY; diff --git a/trunk/drivers/char/ipmi/ipmi_devintf.c b/trunk/drivers/char/ipmi/ipmi_devintf.c index 1d7b429f7ffa..835a33c8d5f5 100644 --- a/trunk/drivers/char/ipmi/ipmi_devintf.c +++ b/trunk/drivers/char/ipmi/ipmi_devintf.c @@ -957,4 +957,3 @@ module_exit(cleanup_ipmi); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Corey Minyard "); MODULE_DESCRIPTION("Linux device interface for the IPMI message handler."); -MODULE_ALIAS("platform:ipmi_si"); diff --git a/trunk/drivers/edac/Kconfig b/trunk/drivers/edac/Kconfig index e0dbd388757f..5a11e3cbcae2 100644 --- a/trunk/drivers/edac/Kconfig +++ b/trunk/drivers/edac/Kconfig @@ -102,13 +102,6 @@ config EDAC_I3000 Support for error detection and correction on the Intel 3000 and 3010 server chipsets. -config EDAC_X38 - tristate "Intel X38" - depends on EDAC_MM_EDAC && PCI && X86 - help - Support for error detection and correction on the Intel - X38 server chipsets. - config EDAC_I82860 tristate "Intel 82860" depends on EDAC_MM_EDAC && PCI && X86_32 diff --git a/trunk/drivers/edac/Makefile b/trunk/drivers/edac/Makefile index 62c2d9bad8dc..e5e9104b5520 100644 --- a/trunk/drivers/edac/Makefile +++ b/trunk/drivers/edac/Makefile @@ -26,7 +26,6 @@ obj-$(CONFIG_EDAC_I82443BXGX) += i82443bxgx_edac.o obj-$(CONFIG_EDAC_I82875P) += i82875p_edac.o obj-$(CONFIG_EDAC_I82975X) += i82975x_edac.o obj-$(CONFIG_EDAC_I3000) += i3000_edac.o -obj-$(CONFIG_EDAC_X38) += x38_edac.o obj-$(CONFIG_EDAC_I82860) += i82860_edac.o obj-$(CONFIG_EDAC_R82600) += r82600_edac.o obj-$(CONFIG_EDAC_PASEMI) += pasemi_edac.o diff --git a/trunk/drivers/edac/cell_edac.c b/trunk/drivers/edac/cell_edac.c index cd2e3b8087e7..887072f5dc8b 100644 --- a/trunk/drivers/edac/cell_edac.c +++ b/trunk/drivers/edac/cell_edac.c @@ -9,7 +9,6 @@ */ #undef DEBUG -#include #include #include #include @@ -165,8 +164,6 @@ static int __devinit cell_edac_probe(struct platform_device *pdev) if (regs == NULL) return -ENODEV; - edac_op_state = EDAC_OPSTATE_POLL; - /* Get channel population */ reg = in_be64(®s->mic_mnt_cfg); dev_dbg(&pdev->dev, "MIC_MNT_CFG = 0x%016lx\n", reg); diff --git a/trunk/drivers/edac/x38_edac.c b/trunk/drivers/edac/x38_edac.c deleted file mode 100644 index 2406c2ce2844..000000000000 --- a/trunk/drivers/edac/x38_edac.c +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Intel X38 Memory Controller kernel module - * Copyright (C) 2008 Cluster Computing, Inc. - * - * This file may be distributed under the terms of the - * GNU General Public License. - * - * This file is based on i3200_edac.c - * - */ - -#include -#include -#include -#include -#include -#include -#include "edac_core.h" - -#define X38_REVISION "1.1" - -#define EDAC_MOD_STR "x38_edac" - -#define PCI_DEVICE_ID_INTEL_X38_HB 0x29e0 - -#define X38_RANKS 8 -#define X38_RANKS_PER_CHANNEL 4 -#define X38_CHANNELS 2 - -/* Intel X38 register addresses - device 0 function 0 - DRAM Controller */ - -#define X38_MCHBAR_LOW 0x48 /* MCH Memory Mapped Register BAR */ -#define X38_MCHBAR_HIGH 0x4b -#define X38_MCHBAR_MASK 0xfffffc000ULL /* bits 35:14 */ -#define X38_MMR_WINDOW_SIZE 16384 - -#define X38_TOM 0xa0 /* Top of Memory (16b) - * - * 15:10 reserved - * 9:0 total populated physical memory - */ -#define X38_TOM_MASK 0x3ff /* bits 9:0 */ -#define X38_TOM_SHIFT 26 /* 64MiB grain */ - -#define X38_ERRSTS 0xc8 /* Error Status Register (16b) - * - * 15 reserved - * 14 Isochronous TBWRR Run Behind FIFO Full - * (ITCV) - * 13 Isochronous TBWRR Run Behind FIFO Put - * (ITSTV) - * 12 reserved - * 11 MCH Thermal Sensor Event - * for SMI/SCI/SERR (GTSE) - * 10 reserved - * 9 LOCK to non-DRAM Memory Flag (LCKF) - * 8 reserved - * 7 DRAM Throttle Flag (DTF) - * 6:2 reserved - * 1 Multi-bit DRAM ECC Error Flag (DMERR) - * 0 Single-bit DRAM ECC Error Flag (DSERR) - */ -#define X38_ERRSTS_UE 0x0002 -#define X38_ERRSTS_CE 0x0001 -#define X38_ERRSTS_BITS (X38_ERRSTS_UE | X38_ERRSTS_CE) - - -/* Intel MMIO register space - device 0 function 0 - MMR space */ - -#define X38_C0DRB 0x200 /* Channel 0 DRAM Rank Boundary (16b x 4) - * - * 15:10 reserved - * 9:0 Channel 0 DRAM Rank Boundary Address - */ -#define X38_C1DRB 0x600 /* Channel 1 DRAM Rank Boundary (16b x 4) */ -#define X38_DRB_MASK 0x3ff /* bits 9:0 */ -#define X38_DRB_SHIFT 26 /* 64MiB grain */ - -#define X38_C0ECCERRLOG 0x280 /* Channel 0 ECC Error Log (64b) - * - * 63:48 Error Column Address (ERRCOL) - * 47:32 Error Row Address (ERRROW) - * 31:29 Error Bank Address (ERRBANK) - * 28:27 Error Rank Address (ERRRANK) - * 26:24 reserved - * 23:16 Error Syndrome (ERRSYND) - * 15: 2 reserved - * 1 Multiple Bit Error Status (MERRSTS) - * 0 Correctable Error Status (CERRSTS) - */ -#define X38_C1ECCERRLOG 0x680 /* Channel 1 ECC Error Log (64b) */ -#define X38_ECCERRLOG_CE 0x1 -#define X38_ECCERRLOG_UE 0x2 -#define X38_ECCERRLOG_RANK_BITS 0x18000000 -#define X38_ECCERRLOG_SYNDROME_BITS 0xff0000 - -#define X38_CAPID0 0xe0 /* see P.94 of spec for details */ - -static int x38_channel_num; - -static int how_many_channel(struct pci_dev *pdev) -{ - unsigned char capid0_8b; /* 8th byte of CAPID0 */ - - pci_read_config_byte(pdev, X38_CAPID0 + 8, &capid0_8b); - if (capid0_8b & 0x20) { /* check DCD: Dual Channel Disable */ - debugf0("In single channel mode.\n"); - x38_channel_num = 1; - } else { - debugf0("In dual channel mode.\n"); - x38_channel_num = 2; - } - - return x38_channel_num; -} - -static unsigned long eccerrlog_syndrome(u64 log) -{ - return (log & X38_ECCERRLOG_SYNDROME_BITS) >> 16; -} - -static int eccerrlog_row(int channel, u64 log) -{ - return ((log & X38_ECCERRLOG_RANK_BITS) >> 27) | - (channel * X38_RANKS_PER_CHANNEL); -} - -enum x38_chips { - X38 = 0, -}; - -struct x38_dev_info { - const char *ctl_name; -}; - -struct x38_error_info { - u16 errsts; - u16 errsts2; - u64 eccerrlog[X38_CHANNELS]; -}; - -static const struct x38_dev_info x38_devs[] = { - [X38] = { - .ctl_name = "x38"}, -}; - -static struct pci_dev *mci_pdev; -static int x38_registered = 1; - - -static void x38_clear_error_info(struct mem_ctl_info *mci) -{ - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - - /* - * Clear any error bits. - * (Yes, we really clear bits by writing 1 to them.) - */ - pci_write_bits16(pdev, X38_ERRSTS, X38_ERRSTS_BITS, - X38_ERRSTS_BITS); -} - -static u64 x38_readq(const void __iomem *addr) -{ - return readl(addr) | (((u64)readl(addr + 4)) << 32); -} - -static void x38_get_and_clear_error_info(struct mem_ctl_info *mci, - struct x38_error_info *info) -{ - struct pci_dev *pdev; - void __iomem *window = mci->pvt_info; - - pdev = to_pci_dev(mci->dev); - - /* - * This is a mess because there is no atomic way to read all the - * registers at once and the registers can transition from CE being - * overwritten by UE. - */ - pci_read_config_word(pdev, X38_ERRSTS, &info->errsts); - if (!(info->errsts & X38_ERRSTS_BITS)) - return; - - info->eccerrlog[0] = x38_readq(window + X38_C0ECCERRLOG); - if (x38_channel_num == 2) - info->eccerrlog[1] = x38_readq(window + X38_C1ECCERRLOG); - - pci_read_config_word(pdev, X38_ERRSTS, &info->errsts2); - - /* - * If the error is the same for both reads then the first set - * of reads is valid. If there is a change then there is a CE - * with no info and the second set of reads is valid and - * should be UE info. - */ - if ((info->errsts ^ info->errsts2) & X38_ERRSTS_BITS) { - info->eccerrlog[0] = x38_readq(window + X38_C0ECCERRLOG); - if (x38_channel_num == 2) - info->eccerrlog[1] = - x38_readq(window + X38_C1ECCERRLOG); - } - - x38_clear_error_info(mci); -} - -static void x38_process_error_info(struct mem_ctl_info *mci, - struct x38_error_info *info) -{ - int channel; - u64 log; - - if (!(info->errsts & X38_ERRSTS_BITS)) - return; - - if ((info->errsts ^ info->errsts2) & X38_ERRSTS_BITS) { - edac_mc_handle_ce_no_info(mci, "UE overwrote CE"); - info->errsts = info->errsts2; - } - - for (channel = 0; channel < x38_channel_num; channel++) { - log = info->eccerrlog[channel]; - if (log & X38_ECCERRLOG_UE) { - edac_mc_handle_ue(mci, 0, 0, - eccerrlog_row(channel, log), "x38 UE"); - } else if (log & X38_ECCERRLOG_CE) { - edac_mc_handle_ce(mci, 0, 0, - eccerrlog_syndrome(log), - eccerrlog_row(channel, log), 0, "x38 CE"); - } - } -} - -static void x38_check(struct mem_ctl_info *mci) -{ - struct x38_error_info info; - - debugf1("MC%d: %s()\n", mci->mc_idx, __func__); - x38_get_and_clear_error_info(mci, &info); - x38_process_error_info(mci, &info); -} - - -void __iomem *x38_map_mchbar(struct pci_dev *pdev) -{ - union { - u64 mchbar; - struct { - u32 mchbar_low; - u32 mchbar_high; - }; - } u; - void __iomem *window; - - pci_read_config_dword(pdev, X38_MCHBAR_LOW, &u.mchbar_low); - pci_write_config_dword(pdev, X38_MCHBAR_LOW, u.mchbar_low | 0x1); - pci_read_config_dword(pdev, X38_MCHBAR_HIGH, &u.mchbar_high); - u.mchbar &= X38_MCHBAR_MASK; - - if (u.mchbar != (resource_size_t)u.mchbar) { - printk(KERN_ERR - "x38: mmio space beyond accessible range (0x%llx)\n", - (unsigned long long)u.mchbar); - return NULL; - } - - window = ioremap_nocache(u.mchbar, X38_MMR_WINDOW_SIZE); - if (!window) - printk(KERN_ERR "x38: cannot map mmio space at 0x%llx\n", - (unsigned long long)u.mchbar); - - return window; -} - - -static void x38_get_drbs(void __iomem *window, - u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL]) -{ - int i; - - for (i = 0; i < X38_RANKS_PER_CHANNEL; i++) { - drbs[0][i] = readw(window + X38_C0DRB + 2*i) & X38_DRB_MASK; - drbs[1][i] = readw(window + X38_C1DRB + 2*i) & X38_DRB_MASK; - } -} - -static bool x38_is_stacked(struct pci_dev *pdev, - u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL]) -{ - u16 tom; - - pci_read_config_word(pdev, X38_TOM, &tom); - tom &= X38_TOM_MASK; - - return drbs[X38_CHANNELS - 1][X38_RANKS_PER_CHANNEL - 1] == tom; -} - -static unsigned long drb_to_nr_pages( - u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL], - bool stacked, int channel, int rank) -{ - int n; - - n = drbs[channel][rank]; - if (rank > 0) - n -= drbs[channel][rank - 1]; - if (stacked && (channel == 1) && drbs[channel][rank] == - drbs[channel][X38_RANKS_PER_CHANNEL - 1]) { - n -= drbs[0][X38_RANKS_PER_CHANNEL - 1]; - } - - n <<= (X38_DRB_SHIFT - PAGE_SHIFT); - return n; -} - -static int x38_probe1(struct pci_dev *pdev, int dev_idx) -{ - int rc; - int i; - struct mem_ctl_info *mci = NULL; - unsigned long last_page; - u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL]; - bool stacked; - void __iomem *window; - - debugf0("MC: %s()\n", __func__); - - window = x38_map_mchbar(pdev); - if (!window) - return -ENODEV; - - x38_get_drbs(window, drbs); - - how_many_channel(pdev); - - /* FIXME: unconventional pvt_info usage */ - mci = edac_mc_alloc(0, X38_RANKS, x38_channel_num, 0); - if (!mci) - return -ENOMEM; - - debugf3("MC: %s(): init mci\n", __func__); - - mci->dev = &pdev->dev; - mci->mtype_cap = MEM_FLAG_DDR2; - - mci->edac_ctl_cap = EDAC_FLAG_SECDED; - mci->edac_cap = EDAC_FLAG_SECDED; - - mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = X38_REVISION; - mci->ctl_name = x38_devs[dev_idx].ctl_name; - mci->dev_name = pci_name(pdev); - mci->edac_check = x38_check; - mci->ctl_page_to_phys = NULL; - mci->pvt_info = window; - - stacked = x38_is_stacked(pdev, drbs); - - /* - * The dram rank boundary (DRB) reg values are boundary addresses - * for each DRAM rank with a granularity of 64MB. DRB regs are - * cumulative; the last one will contain the total memory - * contained in all ranks. - */ - last_page = -1UL; - for (i = 0; i < mci->nr_csrows; i++) { - unsigned long nr_pages; - struct csrow_info *csrow = &mci->csrows[i]; - - nr_pages = drb_to_nr_pages(drbs, stacked, - i / X38_RANKS_PER_CHANNEL, - i % X38_RANKS_PER_CHANNEL); - - if (nr_pages == 0) { - csrow->mtype = MEM_EMPTY; - continue; - } - - csrow->first_page = last_page + 1; - last_page += nr_pages; - csrow->last_page = last_page; - csrow->nr_pages = nr_pages; - - csrow->grain = nr_pages << PAGE_SHIFT; - csrow->mtype = MEM_DDR2; - csrow->dtype = DEV_UNKNOWN; - csrow->edac_mode = EDAC_UNKNOWN; - } - - x38_clear_error_info(mci); - - rc = -ENODEV; - if (edac_mc_add_mc(mci)) { - debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__); - goto fail; - } - - /* get this far and it's successful */ - debugf3("MC: %s(): success\n", __func__); - return 0; - -fail: - iounmap(window); - if (mci) - edac_mc_free(mci); - - return rc; -} - -static int __devinit x38_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - int rc; - - debugf0("MC: %s()\n", __func__); - - if (pci_enable_device(pdev) < 0) - return -EIO; - - rc = x38_probe1(pdev, ent->driver_data); - if (!mci_pdev) - mci_pdev = pci_dev_get(pdev); - - return rc; -} - -static void __devexit x38_remove_one(struct pci_dev *pdev) -{ - struct mem_ctl_info *mci; - - debugf0("%s()\n", __func__); - - mci = edac_mc_del_mc(&pdev->dev); - if (!mci) - return; - - iounmap(mci->pvt_info); - - edac_mc_free(mci); -} - -static const struct pci_device_id x38_pci_tbl[] __devinitdata = { - { - PCI_VEND_DEV(INTEL, X38_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0, - X38}, - { - 0, - } /* 0 terminated list. */ -}; - -MODULE_DEVICE_TABLE(pci, x38_pci_tbl); - -static struct pci_driver x38_driver = { - .name = EDAC_MOD_STR, - .probe = x38_init_one, - .remove = __devexit_p(x38_remove_one), - .id_table = x38_pci_tbl, -}; - -static int __init x38_init(void) -{ - int pci_rc; - - debugf3("MC: %s()\n", __func__); - - /* Ensure that the OPSTATE is set correctly for POLL or NMI */ - opstate_init(); - - pci_rc = pci_register_driver(&x38_driver); - if (pci_rc < 0) - goto fail0; - - if (!mci_pdev) { - x38_registered = 0; - mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_X38_HB, NULL); - if (!mci_pdev) { - debugf0("x38 pci_get_device fail\n"); - pci_rc = -ENODEV; - goto fail1; - } - - pci_rc = x38_init_one(mci_pdev, x38_pci_tbl); - if (pci_rc < 0) { - debugf0("x38 init fail\n"); - pci_rc = -ENODEV; - goto fail1; - } - } - - return 0; - -fail1: - pci_unregister_driver(&x38_driver); - -fail0: - if (mci_pdev) - pci_dev_put(mci_pdev); - - return pci_rc; -} - -static void __exit x38_exit(void) -{ - debugf3("MC: %s()\n", __func__); - - pci_unregister_driver(&x38_driver); - if (!x38_registered) { - x38_remove_one(mci_pdev); - pci_dev_put(mci_pdev); - } -} - -module_init(x38_init); -module_exit(x38_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Cluster Computing, Inc. Hitoshi Mitake"); -MODULE_DESCRIPTION("MC support for Intel X38 memory hub controllers"); - -module_param(edac_op_state, int, 0444); -MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); diff --git a/trunk/drivers/hid/hid-core.c b/trunk/drivers/hid/hid-core.c index 1903e7515650..743e6f8cb202 100644 --- a/trunk/drivers/hid/hid-core.c +++ b/trunk/drivers/hid/hid-core.c @@ -1263,7 +1263,6 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658) }, { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) }, { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, - { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, diff --git a/trunk/drivers/hid/hid-dell.c b/trunk/drivers/hid/hid-dell.c index f5474300b83a..1a0d0dfc62fc 100644 --- a/trunk/drivers/hid/hid-dell.c +++ b/trunk/drivers/hid/hid-dell.c @@ -48,7 +48,6 @@ static int dell_probe(struct hid_device *hdev, const struct hid_device_id *id) static const struct hid_device_id dell_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658) }, { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) }, - { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) }, { } }; MODULE_DEVICE_TABLE(hid, dell_devices); diff --git a/trunk/drivers/hid/hid-ids.h b/trunk/drivers/hid/hid-ids.h index 5cc404291736..a0d6a6cb1842 100644 --- a/trunk/drivers/hid/hid-ids.h +++ b/trunk/drivers/hid/hid-ids.h @@ -163,9 +163,6 @@ #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc -#define USB_VENDOR_ID_GENERIC_13BA 0x13ba -#define USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE 0x0017 - #define USB_VENDOR_ID_GLAB 0x06c2 #define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 #define USB_DEVICE_ID_1_PHIDGETSERVO_30 0x0039 diff --git a/trunk/drivers/hid/usbhid/hid-core.c b/trunk/drivers/hid/usbhid/hid-core.c index 18e5ddd722cd..42bdd83444c1 100644 --- a/trunk/drivers/hid/usbhid/hid-core.c +++ b/trunk/drivers/hid/usbhid/hid-core.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -777,10 +776,21 @@ static int usbhid_start(struct hid_device *hid) struct usb_interface *intf = to_usb_interface(hid->dev.parent); struct usb_host_interface *interface = intf->cur_altsetting; struct usb_device *dev = interface_to_usbdev(intf); - struct usbhid_device *usbhid = hid->driver_data; + struct usbhid_device *usbhid; unsigned int n, insize = 0; int ret; + WARN_ON(hid->driver_data); + + usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL); + if (usbhid == NULL) { + ret = -ENOMEM; + goto err; + } + + hid->driver_data = usbhid; + usbhid->hid = hid; + usbhid->bufsize = HID_MIN_BUFFER_SIZE; hid_find_max_report(hid, HID_INPUT_REPORT, &usbhid->bufsize); hid_find_max_report(hid, HID_OUTPUT_REPORT, &usbhid->bufsize); @@ -794,7 +804,6 @@ static int usbhid_start(struct hid_device *hid) if (insize > HID_MAX_BUFFER_SIZE) insize = HID_MAX_BUFFER_SIZE; - mutex_lock(&usbhid->setup); if (hid_alloc_buffers(dev, hid)) { ret = -ENOMEM; goto fail; @@ -879,9 +888,6 @@ static int usbhid_start(struct hid_device *hid) usbhid_init_reports(hid); hid_dump_device(hid); - set_bit(HID_STARTED, &usbhid->iofl); - mutex_unlock(&usbhid->setup); - return 0; fail: @@ -889,7 +895,8 @@ static int usbhid_start(struct hid_device *hid) usb_free_urb(usbhid->urbout); usb_free_urb(usbhid->urbctrl); hid_free_buffers(dev, hid); - mutex_unlock(&usbhid->setup); + kfree(usbhid); +err: return ret; } @@ -900,8 +907,6 @@ static void usbhid_stop(struct hid_device *hid) if (WARN_ON(!usbhid)) return; - mutex_lock(&usbhid->setup); - clear_bit(HID_STARTED, &usbhid->iofl); spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ set_bit(HID_DISCONNECTED, &usbhid->iofl); spin_unlock_irq(&usbhid->inlock); @@ -926,7 +931,8 @@ static void usbhid_stop(struct hid_device *hid) usb_free_urb(usbhid->urbout); hid_free_buffers(hid_to_usb_dev(hid), hid); - mutex_unlock(&usbhid->setup); + kfree(usbhid); + hid->driver_data = NULL; } static struct hid_ll_driver usb_hid_driver = { @@ -941,7 +947,6 @@ static struct hid_ll_driver usb_hid_driver = { static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *dev = interface_to_usbdev(intf); - struct usbhid_device *usbhid; struct hid_device *hid; size_t len; int ret; @@ -995,26 +1000,14 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0) hid->uniq[0] = 0; - usbhid = kzalloc(sizeof(*usbhid), GFP_KERNEL); - if (usbhid == NULL) { - ret = -ENOMEM; - goto err; - } - - hid->driver_data = usbhid; - usbhid->hid = hid; - mutex_init(&usbhid->setup); /* needed on suspend/resume */ - ret = hid_add_device(hid); if (ret) { if (ret != -ENODEV) dev_err(&intf->dev, "can't add hid device: %d\n", ret); - goto err_free; + goto err; } return 0; -err_free: - kfree(usbhid); err: hid_destroy_device(hid); return ret; @@ -1023,14 +1016,11 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) static void hid_disconnect(struct usb_interface *intf) { struct hid_device *hid = usb_get_intfdata(intf); - struct usbhid_device *usbhid; if (WARN_ON(!hid)) return; - usbhid = hid->driver_data; hid_destroy_device(hid); - kfree(usbhid); } static int hid_suspend(struct usb_interface *intf, pm_message_t message) @@ -1038,18 +1028,11 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) struct hid_device *hid = usb_get_intfdata (intf); struct usbhid_device *usbhid = hid->driver_data; - mutex_lock(&usbhid->setup); - if (!test_bit(HID_STARTED, &usbhid->iofl)) { - mutex_unlock(&usbhid->setup); - return 0; - } - spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ set_bit(HID_SUSPENDED, &usbhid->iofl); spin_unlock_irq(&usbhid->inlock); - del_timer_sync(&usbhid->io_retry); + del_timer(&usbhid->io_retry); usb_kill_urb(usbhid->urbin); - mutex_unlock(&usbhid->setup); dev_dbg(&intf->dev, "suspend\n"); return 0; } @@ -1060,16 +1043,9 @@ static int hid_resume(struct usb_interface *intf) struct usbhid_device *usbhid = hid->driver_data; int status; - mutex_lock(&usbhid->setup); - if (!test_bit(HID_STARTED, &usbhid->iofl)) { - mutex_unlock(&usbhid->setup); - return 0; - } - clear_bit(HID_SUSPENDED, &usbhid->iofl); usbhid->retry_delay = 0; status = hid_start_in(hid); - mutex_unlock(&usbhid->setup); dev_dbg(&intf->dev, "resume status %d\n", status); return status; } diff --git a/trunk/drivers/hid/usbhid/usbhid.h b/trunk/drivers/hid/usbhid/usbhid.h index 55973ff54008..abedb13c623e 100644 --- a/trunk/drivers/hid/usbhid/usbhid.h +++ b/trunk/drivers/hid/usbhid/usbhid.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -74,7 +73,6 @@ struct usbhid_device { dma_addr_t outbuf_dma; /* Output buffer dma */ spinlock_t outlock; /* Output fifo spinlock */ - struct mutex setup; unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */ struct timer_list io_retry; /* Retry timer */ unsigned long stop_retry; /* Time to give up, in jiffies */ diff --git a/trunk/drivers/i2c/busses/i2c-s3c2410.c b/trunk/drivers/i2c/busses/i2c-s3c2410.c index 1fac4e233133..c772e02c2803 100644 --- a/trunk/drivers/i2c/busses/i2c-s3c2410.c +++ b/trunk/drivers/i2c/busses/i2c-s3c2410.c @@ -507,7 +507,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int unsigned long timeout; int ret; - if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN)) + if (!readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN) return -EIO; ret = s3c24xx_i2c_set_master(i2c); diff --git a/trunk/drivers/i2c/busses/scx200_i2c.c b/trunk/drivers/i2c/busses/scx200_i2c.c index e4c98539c517..c3022a023449 100644 --- a/trunk/drivers/i2c/busses/scx200_i2c.c +++ b/trunk/drivers/i2c/busses/scx200_i2c.c @@ -81,7 +81,6 @@ static struct i2c_algo_bit_data scx200_i2c_data = { static struct i2c_adapter scx200_i2c_ops = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .id = I2C_HW_B_SCX200, .algo_data = &scx200_i2c_data, .name = "NatSemi SCx200 I2C", diff --git a/trunk/drivers/md/dm-raid1.c b/trunk/drivers/md/dm-raid1.c index 9d7b53ed75b2..92dcc06832a4 100644 --- a/trunk/drivers/md/dm-raid1.c +++ b/trunk/drivers/md/dm-raid1.c @@ -656,10 +656,9 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures) return; if (!ms->log_failure) { - while ((bio = bio_list_pop(failures))) { + while ((bio = bio_list_pop(failures))) ms->in_sync = 0; dm_rh_mark_nosync(ms->rh, bio, bio->bi_size, 0); - } return; } diff --git a/trunk/drivers/md/dm-snap.c b/trunk/drivers/md/dm-snap.c index 6c96db26b87c..b2d9d1ac28ad 100644 --- a/trunk/drivers/md/dm-snap.c +++ b/trunk/drivers/md/dm-snap.c @@ -229,21 +229,19 @@ static void __insert_origin(struct origin *o) */ static int register_snapshot(struct dm_snapshot *snap) { - struct origin *o, *new_o; + struct origin *o; struct block_device *bdev = snap->origin->bdev; - new_o = kmalloc(sizeof(*new_o), GFP_KERNEL); - if (!new_o) - return -ENOMEM; - down_write(&_origins_lock); o = __lookup_origin(bdev); - if (o) - kfree(new_o); - else { + if (!o) { /* New origin */ - o = new_o; + o = kmalloc(sizeof(*o), GFP_KERNEL); + if (!o) { + up_write(&_origins_lock); + return -ENOMEM; + } /* Initialise the struct */ INIT_LIST_HEAD(&o->snapshots); @@ -370,7 +368,6 @@ static struct dm_snap_pending_exception *alloc_pending_exception(struct dm_snaps struct dm_snap_pending_exception *pe = mempool_alloc(s->pending_pool, GFP_NOIO); - atomic_inc(&s->pending_exceptions_count); pe->snap = s; return pe; @@ -378,11 +375,7 @@ static struct dm_snap_pending_exception *alloc_pending_exception(struct dm_snaps static void free_pending_exception(struct dm_snap_pending_exception *pe) { - struct dm_snapshot *s = pe->snap; - - mempool_free(pe, s->pending_pool); - smp_mb__before_atomic_dec(); - atomic_dec(&s->pending_exceptions_count); + mempool_free(pe, pe->snap->pending_pool); } static void insert_completed_exception(struct dm_snapshot *s, @@ -607,7 +600,6 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) s->valid = 1; s->active = 0; - atomic_set(&s->pending_exceptions_count, 0); init_rwsem(&s->lock); spin_lock_init(&s->pe_lock); s->ti = ti; @@ -734,14 +726,6 @@ static void snapshot_dtr(struct dm_target *ti) /* After this returns there can be no new kcopyd jobs. */ unregister_snapshot(s); - while (atomic_read(&s->pending_exceptions_count)) - yield(); - /* - * Ensure instructions in mempool_destroy aren't reordered - * before atomic_read. - */ - smp_mb(); - #ifdef CONFIG_DM_DEBUG for (i = 0; i < DM_TRACKED_CHUNK_HASH_SIZE; i++) BUG_ON(!hlist_empty(&s->tracked_chunk_hash[i])); diff --git a/trunk/drivers/md/dm-snap.h b/trunk/drivers/md/dm-snap.h index 99c0106ede2d..f07315fe2362 100644 --- a/trunk/drivers/md/dm-snap.h +++ b/trunk/drivers/md/dm-snap.h @@ -160,8 +160,6 @@ struct dm_snapshot { mempool_t *pending_pool; - atomic_t pending_exceptions_count; - struct exception_table pending; struct exception_table complete; diff --git a/trunk/drivers/message/i2o/i2o_block.c b/trunk/drivers/message/i2o/i2o_block.c index 84bdc2ee69e6..11a617ab4243 100644 --- a/trunk/drivers/message/i2o/i2o_block.c +++ b/trunk/drivers/message/i2o/i2o_block.c @@ -567,8 +567,8 @@ static void i2o_block_biosparam(unsigned long capacity, unsigned short *cyls, /** * i2o_block_open - Open the block device - * @bdev: block device being opened - * @mode: file open mode + * @inode: inode for block device being opened + * @file: file to open * * Power up the device, mount and lock the media. This function is called, * if the block device is opened for access. @@ -596,8 +596,8 @@ static int i2o_block_open(struct block_device *bdev, fmode_t mode) /** * i2o_block_release - Release the I2O block device - * @disk: gendisk device being released - * @mode: file open mode + * @inode: inode for block device being released + * @file: file to close * * Unlock and unmount the media, and power down the device. Gets called if * the block device is closed. @@ -643,8 +643,8 @@ static int i2o_block_getgeo(struct block_device *bdev, struct hd_geometry *geo) /** * i2o_block_ioctl - Issue device specific ioctl calls. - * @bdev: block device being opened - * @mode: file open mode + * @inode: inode for block device ioctl + * @file: file for ioctl * @cmd: ioctl command * @arg: arg * diff --git a/trunk/drivers/misc/hdpuftrs/hdpu_nexus.c b/trunk/drivers/misc/hdpuftrs/hdpu_nexus.c index ce39fa54949b..08e26beefe64 100644 --- a/trunk/drivers/misc/hdpuftrs/hdpu_nexus.c +++ b/trunk/drivers/misc/hdpuftrs/hdpu_nexus.c @@ -113,6 +113,7 @@ static int hdpu_nexus_probe(struct platform_device *pdev) if (!hdpu_chassis_id) printk(KERN_WARNING "sky_nexus: " "Unable to create proc dir entry: sky_chassis_id\n"); + } return 0; } diff --git a/trunk/drivers/misc/sgi-xp/Makefile b/trunk/drivers/misc/sgi-xp/Makefile index 4fc40d8e1bcc..35ce28578075 100644 --- a/trunk/drivers/misc/sgi-xp/Makefile +++ b/trunk/drivers/misc/sgi-xp/Makefile @@ -5,14 +5,14 @@ obj-$(CONFIG_SGI_XP) += xp.o xp-y := xp_main.o xp-$(CONFIG_IA64_SGI_SN2) += xp_sn2.o xp_nofault.o -xp-$(CONFIG_IA64_GENERIC) += xp_sn2.o xp_nofault.o +xp-$(CONFIG_IA64_GENERIC) += xp_sn2.o xp_nofault.o xp_uv.o xp-$(CONFIG_IA64_SGI_UV) += xp_uv.o xp-$(CONFIG_X86_64) += xp_uv.o obj-$(CONFIG_SGI_XP) += xpc.o xpc-y := xpc_main.o xpc_channel.o xpc_partition.o xpc-$(CONFIG_IA64_SGI_SN2) += xpc_sn2.o -xpc-$(CONFIG_IA64_GENERIC) += xpc_sn2.o +xpc-$(CONFIG_IA64_GENERIC) += xpc_sn2.o xpc_uv.o xpc-$(CONFIG_IA64_SGI_UV) += xpc_uv.o xpc-$(CONFIG_X86_64) += xpc_uv.o diff --git a/trunk/drivers/misc/sgi-xp/xp.h b/trunk/drivers/misc/sgi-xp/xp.h index ed1722e50049..859a5281c61b 100644 --- a/trunk/drivers/misc/sgi-xp/xp.h +++ b/trunk/drivers/misc/sgi-xp/xp.h @@ -19,11 +19,7 @@ #include #include /* defines is_shub1() and is_shub2() */ #define is_shub() ia64_platform_is("sn2") -#ifdef CONFIG_IA64_SGI_UV #define is_uv() ia64_platform_is("uv") -#else -#define is_uv() 0 -#endif #endif #ifdef CONFIG_X86_64 #include diff --git a/trunk/drivers/misc/sgi-xp/xpc_main.c b/trunk/drivers/misc/sgi-xp/xpc_main.c index e8d5cfbd32c2..46325fc84811 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_main.c +++ b/trunk/drivers/misc/sgi-xp/xpc_main.c @@ -1104,7 +1104,7 @@ xpc_do_exit(enum xp_retval reason) if (is_shub()) xpc_exit_sn2(); - else if (is_uv()) + else xpc_exit_uv(); } @@ -1363,7 +1363,7 @@ xpc_init(void) out_1: if (is_shub()) xpc_exit_sn2(); - else if (is_uv()) + else xpc_exit_uv(); return ret; } diff --git a/trunk/drivers/misc/sony-laptop.c b/trunk/drivers/misc/sony-laptop.c index f483c4221f76..5a97d3a9d745 100644 --- a/trunk/drivers/misc/sony-laptop.c +++ b/trunk/drivers/misc/sony-laptop.c @@ -2315,10 +2315,8 @@ static int sony_pic_possible_resources(struct acpi_device *device) */ static int sony_pic_disable(struct acpi_device *device) { - acpi_status ret = acpi_evaluate_object(device->handle, "_DIS", NULL, - NULL); - - if (ACPI_FAILURE(ret) && ret != AE_NOT_FOUND) + if (ACPI_FAILURE(acpi_evaluate_object(device->handle, + "_DIS", NULL, NULL))) return -ENXIO; dprintk("Device disabled\n"); diff --git a/trunk/drivers/net/amd8111e.c b/trunk/drivers/net/amd8111e.c index ba1be0b3a8c8..c54967f7942a 100644 --- a/trunk/drivers/net/amd8111e.c +++ b/trunk/drivers/net/amd8111e.c @@ -833,14 +833,12 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget) } while(intr0 & RINT0); - if (rx_pkt_limit > 0) { - /* Receive descriptor is empty now */ - spin_lock_irqsave(&lp->lock, flags); - __netif_rx_complete(dev, napi); - writel(VAL0|RINTEN0, mmio + INTEN0); - writel(VAL2 | RDMD0, mmio + CMD0); - spin_unlock_irqrestore(&lp->lock, flags); - } + /* Receive descriptor is empty now */ + spin_lock_irqsave(&lp->lock, flags); + __netif_rx_complete(dev, napi); + writel(VAL0|RINTEN0, mmio + INTEN0); + writel(VAL2 | RDMD0, mmio + CMD0); + spin_unlock_irqrestore(&lp->lock, flags); rx_not_empty: return num_rx_pkt; diff --git a/trunk/drivers/net/ehea/ehea.h b/trunk/drivers/net/ehea/ehea.h index 002d918fb4c7..82dd1a891ce7 100644 --- a/trunk/drivers/net/ehea/ehea.h +++ b/trunk/drivers/net/ehea/ehea.h @@ -40,7 +40,7 @@ #include #define DRV_NAME "ehea" -#define DRV_VERSION "EHEA_0095" +#define DRV_VERSION "EHEA_0094" /* eHEA capability flags */ #define DLPAR_PORT_ADD_REM 1 diff --git a/trunk/drivers/net/ehea/ehea_qmr.c b/trunk/drivers/net/ehea/ehea_qmr.c index 9d006878f045..9b61dc9865d1 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.c +++ b/trunk/drivers/net/ehea/ehea_qmr.c @@ -632,13 +632,10 @@ static void ehea_rebuild_busmap(void) } } -static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add) +static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add) { unsigned long i, start_section, end_section; - if (!nr_pages) - return 0; - if (!ehea_bmap) { ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); if (!ehea_bmap) @@ -646,7 +643,7 @@ static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add } start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE; - end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE); + end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE); /* Mark entries as valid or invalid only; address is assigned later */ for (i = start_section; i < end_section; i++) { u64 flag; @@ -695,54 +692,10 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages) return ret; } -static int ehea_is_hugepage(unsigned long pfn) -{ - int page_order; - - if (pfn & EHEA_HUGEPAGE_PFN_MASK) - return 0; - - page_order = compound_order(pfn_to_page(pfn)); - if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT) - return 0; - - return 1; -} - -static int ehea_create_busmap_callback(unsigned long initial_pfn, - unsigned long total_nr_pages, void *arg) +static int ehea_create_busmap_callback(unsigned long pfn, + unsigned long nr_pages, void *arg) { - int ret; - unsigned long pfn, start_pfn, end_pfn, nr_pages; - - if ((total_nr_pages * PAGE_SIZE) < EHEA_HUGEPAGE_SIZE) - return ehea_update_busmap(initial_pfn, total_nr_pages, - EHEA_BUSMAP_ADD_SECT); - - /* Given chunk is >= 16GB -> check for hugepages */ - start_pfn = initial_pfn; - end_pfn = initial_pfn + total_nr_pages; - pfn = start_pfn; - - while (pfn < end_pfn) { - if (ehea_is_hugepage(pfn)) { - /* Add mem found in front of the hugepage */ - nr_pages = pfn - start_pfn; - ret = ehea_update_busmap(start_pfn, nr_pages, - EHEA_BUSMAP_ADD_SECT); - if (ret) - return ret; - - /* Skip the hugepage */ - pfn += (EHEA_HUGEPAGE_SIZE / PAGE_SIZE); - start_pfn = pfn; - } else - pfn += (EHEA_SECTSIZE / PAGE_SIZE); - } - - /* Add mem found behind the hugepage(s) */ - nr_pages = pfn - start_pfn; - return ehea_update_busmap(start_pfn, nr_pages, EHEA_BUSMAP_ADD_SECT); + return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT); } int ehea_create_busmap(void) diff --git a/trunk/drivers/net/ehea/ehea_qmr.h b/trunk/drivers/net/ehea/ehea_qmr.h index 0817c1e74a19..1e58dc06b7d2 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.h +++ b/trunk/drivers/net/ehea/ehea_qmr.h @@ -40,9 +40,6 @@ #define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT) #define EHEA_SECTSIZE (1UL << 24) #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) -#define EHEA_HUGEPAGESHIFT 34 -#define EHEA_HUGEPAGE_SIZE (1UL << EHEA_HUGEPAGESHIFT) -#define EHEA_HUGEPAGE_PFN_MASK ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT) #if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) #error eHEA module cannot work if kernel sectionsize < ehea sectionsize diff --git a/trunk/drivers/net/ibm_newemac/core.c b/trunk/drivers/net/ibm_newemac/core.c index 901212aa37cb..2ee2622258f5 100644 --- a/trunk/drivers/net/ibm_newemac/core.c +++ b/trunk/drivers/net/ibm_newemac/core.c @@ -2605,7 +2605,7 @@ static int __devinit emac_init_config(struct emac_instance *dev) of_device_is_compatible(np, "ibm,emac-440gr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; if (of_device_is_compatible(np, "ibm,emac-405ez")) { -#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL +#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; #else printk(KERN_ERR "%s: Flow control not disabled!\n", diff --git a/trunk/drivers/net/mlx4/en_main.c b/trunk/drivers/net/mlx4/en_main.c index 4b9794e97a79..1b0eebf84f76 100644 --- a/trunk/drivers/net/mlx4/en_main.c +++ b/trunk/drivers/net/mlx4/en_main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/net/mlx4/fw.c b/trunk/drivers/net/mlx4/fw.c index cee199ceba2f..be09fdb79cb8 100644 --- a/trunk/drivers/net/mlx4/fw.c +++ b/trunk/drivers/net/mlx4/fw.c @@ -360,9 +360,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) #define QUERY_PORT_ETH_MTU_OFFSET 0x02 #define QUERY_PORT_WIDTH_OFFSET 0x06 #define QUERY_PORT_MAX_GID_PKEY_OFFSET 0x07 +#define QUERY_PORT_MAC_OFFSET 0x08 #define QUERY_PORT_MAX_MACVLAN_OFFSET 0x0a #define QUERY_PORT_MAX_VL_OFFSET 0x0b -#define QUERY_PORT_MAC_OFFSET 0x10 for (i = 1; i <= dev_cap->num_ports; ++i) { err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, diff --git a/trunk/drivers/net/tulip/dmfe.c b/trunk/drivers/net/tulip/dmfe.c index c91852f49a48..8e46a513a252 100644 --- a/trunk/drivers/net/tulip/dmfe.c +++ b/trunk/drivers/net/tulip/dmfe.c @@ -420,13 +420,9 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, /* Allocate Tx/Rx descriptor memory */ db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); - if (!db->desc_pool_ptr) - goto err_out_res; db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, &db->buf_pool_dma_ptr); - if (!db->buf_pool_ptr) - goto err_out_free_desc; db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; db->first_tx_desc_dma = db->desc_pool_dma_ptr; @@ -473,7 +469,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, err = register_netdev (dev); if (err) - goto err_out_free_buf; + goto err_out_res; printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, " "%s, irq %d.\n", @@ -487,12 +483,6 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, return 0; -err_out_free_buf: - pci_free_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, - db->buf_pool_ptr, db->buf_pool_dma_ptr); -err_out_free_desc: - pci_free_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, - db->desc_pool_ptr, db->desc_pool_dma_ptr); err_out_res: pci_release_regions(pdev); err_out_disable: diff --git a/trunk/drivers/net/usb/dm9601.c b/trunk/drivers/net/usb/dm9601.c index db3377dae9d5..78df2be8a728 100644 --- a/trunk/drivers/net/usb/dm9601.c +++ b/trunk/drivers/net/usb/dm9601.c @@ -396,20 +396,6 @@ static void dm9601_set_multicast(struct net_device *net) dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl); } -static int dm9601_set_mac_address(struct net_device *net, void *p) -{ - struct sockaddr *addr = p; - struct usbnet *dev = netdev_priv(net); - - if (!is_valid_ether_addr(addr->sa_data)) - return -EINVAL; - - memcpy(net->dev_addr, addr->sa_data, net->addr_len); - dm_write_async(dev, DM_PHY_ADDR, net->addr_len, net->dev_addr); - - return 0; -} - static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) { int ret; @@ -420,7 +406,6 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->do_ioctl = dm9601_ioctl; dev->net->set_multicast_list = dm9601_set_multicast; - dev->net->set_mac_address = dm9601_set_mac_address; dev->net->ethtool_ops = &dm9601_ethtool_ops; dev->net->hard_header_len += DM_TX_OVERHEAD; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; diff --git a/trunk/drivers/net/via-velocity.c b/trunk/drivers/net/via-velocity.c index 3590ea5a902d..2dced383bcfb 100644 --- a/trunk/drivers/net/via-velocity.c +++ b/trunk/drivers/net/via-velocity.c @@ -521,7 +521,7 @@ static void __devexit velocity_remove1(struct pci_dev *pdev) * we don't duplicate code for each option. */ -static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, const char *devname) +static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, char *devname) { if (val == -1) *opt = def; @@ -550,7 +550,7 @@ static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, * we don't duplicate code for each option. */ -static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, const char *devname) +static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, char *devname) { (*opt) &= (~flag); if (val == -1) @@ -576,7 +576,7 @@ static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 fla * for the current device */ -static void __devinit velocity_get_options(struct velocity_opt *opts, int index, const char *devname) +static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname) { velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname); @@ -863,7 +863,6 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi static int first = 1; struct net_device *dev; int i; - const char *drv_string; const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data]; struct velocity_info *vptr; struct mac_regs __iomem * regs; @@ -936,9 +935,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi dev->dev_addr[i] = readb(®s->PAR[i]); - drv_string = dev_driver_string(&pdev->dev); - - velocity_get_options(&vptr->options, velocity_nics, drv_string); + velocity_get_options(&vptr->options, velocity_nics, dev->name); /* * Mask out the options cannot be set to the chip diff --git a/trunk/drivers/net/wan/syncppp.c b/trunk/drivers/net/wan/syncppp.c index 6e92f7b44b1a..327d58589e12 100644 --- a/trunk/drivers/net/wan/syncppp.c +++ b/trunk/drivers/net/wan/syncppp.c @@ -756,11 +756,10 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb) case CISCO_ADDR_REQ: /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */ { - __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ -#ifdef CONFIG_INET struct in_device *in_dev; struct in_ifaddr *ifa; - + __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ +#ifdef CONFIG_INET rcu_read_lock(); if ((in_dev = __in_dev_get_rcu(dev)) != NULL) { diff --git a/trunk/drivers/net/wireless/ath5k/base.c b/trunk/drivers/net/wireless/ath5k/base.c index cfd4d052d666..0f1d6bdd51a2 100644 --- a/trunk/drivers/net/wireless/ath5k/base.c +++ b/trunk/drivers/net/wireless/ath5k/base.c @@ -661,7 +661,8 @@ ath5k_pci_resume(struct pci_dev *pdev) { struct ieee80211_hw *hw = pci_get_drvdata(pdev); struct ath5k_softc *sc = hw->priv; - int err; + struct ath5k_hw *ah = sc->ah; + int i, err; pci_restore_state(pdev); @@ -687,6 +688,16 @@ ath5k_pci_resume(struct pci_dev *pdev) goto err_irq; ath5k_led_enable(sc); + /* + * Reset the key cache since some parts do not + * reset the contents on initial power up or resume. + * + * FIXME: This may need to be revisited when mac80211 becomes + * aware of suspend/resume. + */ + for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) + ath5k_hw_reset_key(ah, i); + return 0; err_irq: free_irq(pdev->irq, sc); @@ -707,6 +718,7 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) struct ath5k_softc *sc = hw->priv; struct ath5k_hw *ah = sc->ah; u8 mac[ETH_ALEN]; + unsigned int i; int ret; ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); @@ -724,6 +736,13 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) if (ret > 0) __set_bit(ATH_STAT_MRRETRY, sc->status); + /* + * Reset the key cache since some parts do not + * reset the contents on initial power up. + */ + for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) + ath5k_hw_reset_key(ah, i); + /* * Collect the channel list. The 802.11 layer * is resposible for filtering this list based @@ -2183,8 +2202,7 @@ ath5k_beacon_config(struct ath5k_softc *sc) static int ath5k_init(struct ath5k_softc *sc, bool is_resume) { - struct ath5k_hw *ah = sc->ah; - int ret, i; + int ret; mutex_lock(&sc->lock); @@ -2217,17 +2235,10 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume) if (ret) goto done; - /* - * Reset the key cache since some parts do not reset the - * contents on initial power up or resume from suspend. - */ - for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) - ath5k_hw_reset_key(ah, i); - __set_bit(ATH_STAT_STARTED, sc->status); /* Set ack to be sent at low bit-rates */ - ath5k_hw_set_ack_bitrate_high(ah, false); + ath5k_hw_set_ack_bitrate_high(sc->ah, false); mod_timer(&sc->calib_tim, round_jiffies(jiffies + msecs_to_jiffies(ath5k_calinterval * 1000))); diff --git a/trunk/drivers/net/wireless/p54/p54common.c b/trunk/drivers/net/wireless/p54/p54common.c index 827ca0384a4c..2d022f83774c 100644 --- a/trunk/drivers/net/wireless/p54/p54common.c +++ b/trunk/drivers/net/wireless/p54/p54common.c @@ -319,7 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) void *tmp; int err; u8 *end = (u8 *)eeprom + len; - u16 synth = 0; + u16 synth; DECLARE_MAC_BUF(mac); wrap = (struct eeprom_pda_wrap *) eeprom; @@ -422,8 +422,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) entry = (void *)entry + (entry_len + 1)*2; } - if (!synth || !priv->iq_autocal || !priv->output_limit || - !priv->curve_data) { + if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) { printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); err = -EINVAL; goto err; diff --git a/trunk/drivers/net/wireless/p54/p54pci.c b/trunk/drivers/net/wireless/p54/p54pci.c index 88b3cad8b65e..1c2a02a741af 100644 --- a/trunk/drivers/net/wireless/p54/p54pci.c +++ b/trunk/drivers/net/wireless/p54/p54pci.c @@ -346,6 +346,68 @@ static void p54p_tx(struct ieee80211_hw *dev, struct p54_control_hdr *data, printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy)); } +static int p54p_open(struct ieee80211_hw *dev) +{ + struct p54p_priv *priv = dev->priv; + int err; + + init_completion(&priv->boot_comp); + err = request_irq(priv->pdev->irq, &p54p_interrupt, + IRQF_SHARED, "p54pci", dev); + if (err) { + printk(KERN_ERR "%s: failed to register IRQ handler\n", + wiphy_name(dev->wiphy)); + return err; + } + + memset(priv->ring_control, 0, sizeof(*priv->ring_control)); + err = p54p_upload_firmware(dev); + if (err) { + free_irq(priv->pdev->irq, dev); + return err; + } + priv->rx_idx_data = priv->tx_idx_data = 0; + priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0; + + p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data, + ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data); + + p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt, + ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt); + + P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma)); + P54P_READ(ring_control_base); + wmb(); + udelay(10); + + P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT)); + P54P_READ(int_enable); + wmb(); + udelay(10); + + P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); + P54P_READ(dev_int); + + if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { + printk(KERN_ERR "%s: Cannot boot firmware!\n", + wiphy_name(dev->wiphy)); + free_irq(priv->pdev->irq, dev); + return -ETIMEDOUT; + } + + P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); + P54P_READ(int_enable); + wmb(); + udelay(10); + + P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE)); + P54P_READ(dev_int); + wmb(); + udelay(10); + + return 0; +} + static void p54p_stop(struct ieee80211_hw *dev) { struct p54p_priv *priv = dev->priv; @@ -412,68 +474,6 @@ static void p54p_stop(struct ieee80211_hw *dev) memset(ring_control, 0, sizeof(*ring_control)); } -static int p54p_open(struct ieee80211_hw *dev) -{ - struct p54p_priv *priv = dev->priv; - int err; - - init_completion(&priv->boot_comp); - err = request_irq(priv->pdev->irq, &p54p_interrupt, - IRQF_SHARED, "p54pci", dev); - if (err) { - printk(KERN_ERR "%s: failed to register IRQ handler\n", - wiphy_name(dev->wiphy)); - return err; - } - - memset(priv->ring_control, 0, sizeof(*priv->ring_control)); - err = p54p_upload_firmware(dev); - if (err) { - free_irq(priv->pdev->irq, dev); - return err; - } - priv->rx_idx_data = priv->tx_idx_data = 0; - priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0; - - p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data, - ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data); - - p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt, - ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt); - - P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma)); - P54P_READ(ring_control_base); - wmb(); - udelay(10); - - P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT)); - P54P_READ(int_enable); - wmb(); - udelay(10); - - P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); - P54P_READ(dev_int); - - if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { - printk(KERN_ERR "%s: Cannot boot firmware!\n", - wiphy_name(dev->wiphy)); - p54p_stop(dev); - return -ETIMEDOUT; - } - - P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); - P54P_READ(int_enable); - wmb(); - udelay(10); - - P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE)); - P54P_READ(dev_int); - wmb(); - udelay(10); - - return 0; -} - static int __devinit p54p_probe(struct pci_dev *pdev, const struct pci_device_id *id) { @@ -556,13 +556,11 @@ static int __devinit p54p_probe(struct pci_dev *pdev, spin_lock_init(&priv->lock); tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); - err = p54p_open(dev); - if (err) - goto err_free_common; + p54p_open(dev); err = p54_read_eeprom(dev); p54p_stop(dev); if (err) - goto err_free_common; + goto err_free_desc; err = ieee80211_register_hw(dev); if (err) { @@ -575,6 +573,8 @@ static int __devinit p54p_probe(struct pci_dev *pdev, err_free_common: p54_free_common(dev); + + err_free_desc: pci_free_consistent(pdev, sizeof(*priv->ring_control), priv->ring_control, priv->ring_control_dma); diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index bbf66ea8fd87..96cf8ecd04ce 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -43,6 +43,20 @@ static void __devinit quirk_mellanox_tavor(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor); +/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ +int forbid_dac __read_mostly; +EXPORT_SYMBOL(forbid_dac); + +static __devinit void via_no_dac(struct pci_dev *dev) +{ + if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { + dev_info(&dev->dev, + "VIA PCI bridge detected. Disabling DAC.\n"); + forbid_dac = 1; + } +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); + /* Deal with broken BIOS'es that neglect to enable passive release, which can cause problems in combination with the 82441FX/PPro MTRRs */ static void quirk_passive_release(struct pci_dev *dev) diff --git a/trunk/drivers/regulator/da903x.c b/trunk/drivers/regulator/da903x.c index 773b29cec8be..3688e339db87 100644 --- a/trunk/drivers/regulator/da903x.c +++ b/trunk/drivers/regulator/da903x.c @@ -79,11 +79,6 @@ struct da903x_regulator_info { int enable_bit; }; -static inline struct device *to_da903x_dev(struct regulator_dev *rdev) -{ - return rdev_get_dev(rdev)->parent->parent; -} - static inline int check_range(struct da903x_regulator_info *info, int min_uV, int max_uV) { @@ -98,7 +93,7 @@ static int da903x_set_ldo_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; if (check_range(info, min_uV, max_uV)) { @@ -116,7 +111,7 @@ static int da903x_set_ldo_voltage(struct regulator_dev *rdev, static int da903x_get_voltage(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int ret; @@ -133,7 +128,7 @@ static int da903x_get_voltage(struct regulator_dev *rdev) static int da903x_enable(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; return da903x_set_bits(da9034_dev, info->enable_reg, 1 << info->enable_bit); @@ -142,7 +137,7 @@ static int da903x_enable(struct regulator_dev *rdev) static int da903x_disable(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; return da903x_clr_bits(da9034_dev, info->enable_reg, 1 << info->enable_bit); @@ -151,7 +146,7 @@ static int da903x_disable(struct regulator_dev *rdev) static int da903x_is_enabled(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t reg_val; int ret; @@ -167,7 +162,7 @@ static int da9030_set_ldo1_15_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da903x_dev = to_da903x_dev(rdev); + struct device *da903x_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int ret; @@ -194,7 +189,7 @@ static int da9030_set_ldo14_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da903x_dev = to_da903x_dev(rdev); + struct device *da903x_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int thresh; @@ -220,7 +215,7 @@ static int da9030_set_ldo14_voltage(struct regulator_dev *rdev, static int da9030_get_ldo14_voltage(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da903x_dev = to_da903x_dev(rdev); + struct device *da903x_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int ret; @@ -243,7 +238,7 @@ static int da9034_set_dvc_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int ret; @@ -269,7 +264,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; if (check_range(info, min_uV, max_uV)) { @@ -288,7 +283,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev, static int da9034_get_ldo12_voltage(struct regulator_dev *rdev) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); - struct device *da9034_dev = to_da903x_dev(rdev); + struct device *da9034_dev = rdev_get_dev(rdev)->parent; uint8_t val, mask; int ret; @@ -471,7 +466,7 @@ static int __devinit da903x_regulator_probe(struct platform_device *pdev) if (ri->desc.id == DA9030_ID_LDO1 || ri->desc.id == DA9030_ID_LDO15) ri->desc.ops = &da9030_regulator_ldo1_15_ops; - rdev = regulator_register(&ri->desc, &pdev->dev, ri); + rdev = regulator_register(&ri->desc, pdev->dev.parent, ri); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "failed to register regulator %s\n", ri->desc.name); diff --git a/trunk/drivers/rtc/rtc-ds3234.c b/trunk/drivers/rtc/rtc-ds3234.c index 45e5b106af73..37d131d03f33 100644 --- a/trunk/drivers/rtc/rtc-ds3234.c +++ b/trunk/drivers/rtc/rtc-ds3234.c @@ -189,7 +189,7 @@ static const struct rtc_class_ops ds3234_rtc_ops = { .set_time = ds3234_set_time, }; -static int __devinit ds3234_probe(struct spi_device *spi) +static int ds3234_probe(struct spi_device *spi) { struct rtc_device *rtc; unsigned char tmp; @@ -249,7 +249,7 @@ static int __devinit ds3234_probe(struct spi_device *spi) return 0; } -static int __devexit ds3234_remove(struct spi_device *spi) +static int __exit ds3234_remove(struct spi_device *spi) { struct ds3234 *chip = platform_get_drvdata(spi); struct rtc_device *rtc = chip->rtc; diff --git a/trunk/drivers/rtc/rtc-s3c.c b/trunk/drivers/rtc/rtc-s3c.c index f59277bbedaa..910bc704939c 100644 --- a/trunk/drivers/rtc/rtc-s3c.c +++ b/trunk/drivers/rtc/rtc-s3c.c @@ -455,8 +455,6 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev) s3c_rtc_setfreq(&pdev->dev, 1); - device_init_wakeup(&pdev->dev, 1); - /* register RTC and exit */ rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops, @@ -509,7 +507,7 @@ static int s3c_rtc_resume(struct platform_device *pdev) #define s3c_rtc_resume NULL #endif -static struct platform_driver s3c2410_rtc_driver = { +static struct platform_driver s3c2410_rtcdrv = { .probe = s3c_rtc_probe, .remove = __devexit_p(s3c_rtc_remove), .suspend = s3c_rtc_suspend, @@ -525,12 +523,12 @@ static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics static int __init s3c_rtc_init(void) { printk(banner); - return platform_driver_register(&s3c2410_rtc_driver); + return platform_driver_register(&s3c2410_rtcdrv); } static void __exit s3c_rtc_exit(void) { - platform_driver_unregister(&s3c2410_rtc_driver); + platform_driver_unregister(&s3c2410_rtcdrv); } module_init(s3c_rtc_init); diff --git a/trunk/drivers/s390/net/qeth_core_main.c b/trunk/drivers/s390/net/qeth_core_main.c index 52d26592c72c..7de410d5be4a 100644 --- a/trunk/drivers/s390/net/qeth_core_main.c +++ b/trunk/drivers/s390/net/qeth_core_main.c @@ -3025,7 +3025,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, int offset) { - int length = skb->len; + int length = skb->len - offset; int length_here; int element; char *data; @@ -3037,7 +3037,6 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, if (offset >= 0) { data = skb->data + offset; - length -= offset; first_lap = 0; } diff --git a/trunk/drivers/s390/net/qeth_l2_main.c b/trunk/drivers/s390/net/qeth_l2_main.c index 1b1e80336d2c..955ba7a31b90 100644 --- a/trunk/drivers/s390/net/qeth_l2_main.c +++ b/trunk/drivers/s390/net/qeth_l2_main.c @@ -373,6 +373,8 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); qeth_set_allowed_threads(card, 0, 1); + if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) + return -ERESTARTSYS; if (card->read.state == CH_STATE_UP && card->write.state == CH_STATE_UP && (card->state == CARD_STATE_UP)) { @@ -449,15 +451,12 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card, netif_rx(skb); break; case QETH_HEADER_TYPE_OSN: - if (card->info.type == QETH_CARD_TYPE_OSN) { - skb_push(skb, sizeof(struct qeth_hdr)); - skb_copy_to_linear_data(skb, hdr, + skb_push(skb, sizeof(struct qeth_hdr)); + skb_copy_to_linear_data(skb, hdr, sizeof(struct qeth_hdr)); - len = skb->len; - card->osn_info.data_cb(skb); - break; - } - /* else unknown */ + len = skb->len; + card->osn_info.data_cb(skb); + break; default: dev_kfree_skb_any(skb); QETH_DBF_TEXT(TRACE, 3, "inbunkno"); @@ -976,6 +975,12 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); + if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { + PRINT_WARN("set_online of card %s interrupted by user!\n", + CARD_BUS_ID(card)); + return -ERESTARTSYS; + } + recover_flag = card->state; rc = ccw_device_set_online(CARD_RDEV(card)); if (rc) { @@ -1086,7 +1091,11 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev, if (card->dev && netif_carrier_ok(card->dev)) netif_carrier_off(card->dev); recover_flag = card->state; - qeth_l2_stop_card(card, recovery_mode); + if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) { + PRINT_WARN("Stopping card %s interrupted by user!\n", + CARD_BUS_ID(card)); + return -ERESTARTSYS; + } rc = ccw_device_set_offline(CARD_DDEV(card)); rc2 = ccw_device_set_offline(CARD_WDEV(card)); rc3 = ccw_device_set_offline(CARD_RDEV(card)); diff --git a/trunk/drivers/s390/net/qeth_l3_main.c b/trunk/drivers/s390/net/qeth_l3_main.c index ed59fedd5922..99547dea44de 100644 --- a/trunk/drivers/s390/net/qeth_l3_main.c +++ b/trunk/drivers/s390/net/qeth_l3_main.c @@ -2064,6 +2064,8 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); qeth_set_allowed_threads(card, 0, 1); + if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) + return -ERESTARTSYS; if (card->read.state == CH_STATE_UP && card->write.state == CH_STATE_UP && (card->state == CARD_STATE_UP)) { @@ -3047,6 +3049,11 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); + if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { + PRINT_WARN("set_online of card %s interrupted by user!\n", + CARD_BUS_ID(card)); + return -ERESTARTSYS; + } recover_flag = card->state; rc = ccw_device_set_online(CARD_RDEV(card)); @@ -3163,7 +3170,11 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev, if (card->dev && netif_carrier_ok(card->dev)) netif_carrier_off(card->dev); recover_flag = card->state; - qeth_l3_stop_card(card, recovery_mode); + if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) { + PRINT_WARN("Stopping card %s interrupted by user!\n", + CARD_BUS_ID(card)); + return -ERESTARTSYS; + } rc = ccw_device_set_offline(CARD_DDEV(card)); rc2 = ccw_device_set_offline(CARD_WDEV(card)); rc3 = ccw_device_set_offline(CARD_RDEV(card)); diff --git a/trunk/drivers/s390/net/qeth_l3_sys.c b/trunk/drivers/s390/net/qeth_l3_sys.c index c144b9924d52..210ddb639748 100644 --- a/trunk/drivers/s390/net/qeth_l3_sys.c +++ b/trunk/drivers/s390/net/qeth_l3_sys.c @@ -121,6 +121,9 @@ static ssize_t qeth_l3_dev_route6_show(struct device *dev, if (!card) return -EINVAL; + if (!qeth_is_supported(card, IPA_IPV6)) + return sprintf(buf, "%s\n", "n/a"); + return qeth_l3_dev_route_show(card, &card->options.route6, buf); } @@ -132,6 +135,10 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev, if (!card) return -EINVAL; + if (!qeth_is_supported(card, IPA_IPV6)) { + return -EOPNOTSUPP; + } + return qeth_l3_dev_route_store(card, &card->options.route6, QETH_PROT_IPV6, buf, count); } diff --git a/trunk/drivers/usb/class/usbtmc.c b/trunk/drivers/usb/class/usbtmc.c index 8e74657f106c..543811f6e6e8 100644 --- a/trunk/drivers/usb/class/usbtmc.c +++ b/trunk/drivers/usb/class/usbtmc.c @@ -133,7 +133,7 @@ static int usbtmc_release(struct inode *inode, struct file *file) static int usbtmc_ioctl_abort_bulk_in(struct usbtmc_device_data *data) { - u8 *buffer; + char *buffer; struct device *dev; int rv; int n; diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c index e1b42626d04d..fc9018e72a09 100644 --- a/trunk/drivers/usb/core/hcd.c +++ b/trunk/drivers/usb/core/hcd.c @@ -106,9 +106,6 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock); /* used when updating an endpoint's URB list */ static DEFINE_SPINLOCK(hcd_urb_list_lock); -/* used to protect against unlinking URBs after the device is gone */ -static DEFINE_SPINLOCK(hcd_urb_unlink_lock); - /* wait queue for synchronous unlinks */ DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue); @@ -1379,25 +1376,10 @@ static int unlink1(struct usb_hcd *hcd, struct urb *urb, int status) int usb_hcd_unlink_urb (struct urb *urb, int status) { struct usb_hcd *hcd; - int retval = -EIDRM; - unsigned long flags; + int retval; - /* Prevent the device and bus from going away while - * the unlink is carried out. If they are already gone - * then urb->use_count must be 0, since disconnected - * devices can't have any active URBs. - */ - spin_lock_irqsave(&hcd_urb_unlink_lock, flags); - if (atomic_read(&urb->use_count) > 0) { - retval = 0; - usb_get_dev(urb->dev); - } - spin_unlock_irqrestore(&hcd_urb_unlink_lock, flags); - if (retval == 0) { - hcd = bus_to_hcd(urb->dev->bus); - retval = unlink1(hcd, urb, status); - usb_put_dev(urb->dev); - } + hcd = bus_to_hcd(urb->dev->bus); + retval = unlink1(hcd, urb, status); if (retval == 0) retval = -EINPROGRESS; @@ -1546,17 +1528,6 @@ void usb_hcd_disable_endpoint(struct usb_device *udev, hcd->driver->endpoint_disable(hcd, ep); } -/* Protect against drivers that try to unlink URBs after the device - * is gone, by waiting until all unlinks for @udev are finished. - * Since we don't currently track URBs by device, simply wait until - * nothing is running in the locked region of usb_hcd_unlink_urb(). - */ -void usb_hcd_synchronize_unlinks(struct usb_device *udev) -{ - spin_lock_irq(&hcd_urb_unlink_lock); - spin_unlock_irq(&hcd_urb_unlink_lock); -} - /*-------------------------------------------------------------------------*/ /* called in any context */ diff --git a/trunk/drivers/usb/core/hcd.h b/trunk/drivers/usb/core/hcd.h index 9465e70f4dd0..2dcde61c465e 100644 --- a/trunk/drivers/usb/core/hcd.h +++ b/trunk/drivers/usb/core/hcd.h @@ -232,7 +232,6 @@ extern void usb_hcd_flush_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); extern void usb_hcd_disable_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); -extern void usb_hcd_synchronize_unlinks(struct usb_device *udev); extern int usb_hcd_get_frame_number(struct usb_device *udev); extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index b19cbfcd51da..9b3f16bd12cb 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -659,9 +659,6 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2); schedule_delayed_work(&hub->init_work, msecs_to_jiffies(delay)); - - /* Suppress autosuspend until init is done */ - to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; return; /* Continues at init2: below */ } else { hub_power_on(hub, true); @@ -1432,7 +1429,6 @@ void usb_disconnect(struct usb_device **pdev) */ dev_dbg (&udev->dev, "unregistering device\n"); usb_disable_device(udev, 0); - usb_hcd_synchronize_unlinks(udev); usb_unlock_device(udev); diff --git a/trunk/drivers/usb/core/urb.c b/trunk/drivers/usb/core/urb.c index 4342bd9c3bb6..f2638009a464 100644 --- a/trunk/drivers/usb/core/urb.c +++ b/trunk/drivers/usb/core/urb.c @@ -474,12 +474,6 @@ EXPORT_SYMBOL_GPL(usb_submit_urb); * indicating that the request has been canceled (rather than any other * code). * - * Drivers should not call this routine or related routines, such as - * usb_kill_urb() or usb_unlink_anchored_urbs(), after their disconnect - * method has returned. The disconnect function should synchronize with - * a driver's I/O routines to insure that all URB-related activity has - * completed before it returns. - * * This request is always asynchronous. Success is indicated by * returning -EINPROGRESS, at which time the URB will probably not yet * have been given back to the device driver. When it is eventually @@ -556,9 +550,6 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb); * This routine may not be used in an interrupt context (such as a bottom * half or a completion handler), or when holding a spinlock, or in other * situations where the caller can't schedule(). - * - * This routine should not be called by a driver after its disconnect - * method has returned. */ void usb_kill_urb(struct urb *urb) { @@ -597,9 +588,6 @@ EXPORT_SYMBOL_GPL(usb_kill_urb); * This routine may not be used in an interrupt context (such as a bottom * half or a completion handler), or when holding a spinlock, or in other * situations where the caller can't schedule(). - * - * This routine should not be called by a driver after its disconnect - * method has returned. */ void usb_poison_urb(struct urb *urb) { @@ -634,9 +622,6 @@ EXPORT_SYMBOL_GPL(usb_unpoison_urb); * * this allows all outstanding URBs to be killed starting * from the back of the queue - * - * This routine should not be called by a driver after its disconnect - * method has returned. */ void usb_kill_anchored_urbs(struct usb_anchor *anchor) { @@ -666,9 +651,6 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs); * this allows all outstanding URBs to be poisoned starting * from the back of the queue. Newly added URBs will also be * poisoned - * - * This routine should not be called by a driver after its disconnect - * method has returned. */ void usb_poison_anchored_urbs(struct usb_anchor *anchor) { @@ -690,7 +672,6 @@ void usb_poison_anchored_urbs(struct usb_anchor *anchor) spin_unlock_irq(&anchor->lock); } EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs); - /** * usb_unlink_anchored_urbs - asynchronously cancel transfer requests en masse * @anchor: anchor the requests are bound to @@ -699,9 +680,6 @@ EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs); * from the back of the queue. This function is asynchronous. * The unlinking is just tiggered. It may happen after this * function has returned. - * - * This routine should not be called by a driver after its disconnect - * method has returned. */ void usb_unlink_anchored_urbs(struct usb_anchor *anchor) { diff --git a/trunk/drivers/usb/serial/usb-serial.c b/trunk/drivers/usb/serial/usb-serial.c index 794b5ffe4397..8be3f39891c7 100644 --- a/trunk/drivers/usb/serial/usb-serial.c +++ b/trunk/drivers/usb/serial/usb-serial.c @@ -281,7 +281,6 @@ static void serial_close(struct tty_struct *tty, struct file *filp) if (tty->driver_data) tty->driver_data = NULL; tty_port_tty_set(&port->port, NULL); - tty_kref_put(tty); } } diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index fb9e20e624c1..a2b9ebbef38e 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -333,13 +333,6 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100, "Finecam S5", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), -/* Patch submitted by Jens Taprogge */ -UNUSUAL_DEV( 0x0482, 0x0107, 0x0100, 0x0100, - "Kyocera", - "CONTAX SL300R T*", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE), - /* Reported by Paul Stewart * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, diff --git a/trunk/drivers/video/console/fbcon.c b/trunk/drivers/video/console/fbcon.c index b92947d62ad6..64b3d30027b8 100644 --- a/trunk/drivers/video/console/fbcon.c +++ b/trunk/drivers/video/console/fbcon.c @@ -2118,7 +2118,7 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s height, width); } -static void updatescrollmode(struct display *p, +static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, struct vc_data *vc) { diff --git a/trunk/drivers/video/fbmem.c b/trunk/drivers/video/fbmem.c index 6048b55f2878..cd5f20da738a 100644 --- a/trunk/drivers/video/fbmem.c +++ b/trunk/drivers/video/fbmem.c @@ -1262,8 +1262,8 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case FBIOPUT_CON2FBMAP: arg = (unsigned long) compat_ptr(arg); case FBIOBLANK: - mutex_unlock(&info->lock); - return fb_ioctl(file, cmd, arg); + ret = fb_ioctl(file, cmd, arg); + break; case FBIOGET_FSCREENINFO: ret = fb_get_fscreeninfo(inode, file, cmd, arg); diff --git a/trunk/drivers/video/via/global.h b/trunk/drivers/video/via/global.h index 7543d5f7e309..8e5263c5b812 100644 --- a/trunk/drivers/video/via/global.h +++ b/trunk/drivers/video/via/global.h @@ -38,6 +38,7 @@ #include "iface.h" #include "viafbdev.h" #include "chip.h" +#include "debug.h" #include "accel.h" #include "share.h" #include "dvi.h" @@ -47,10 +48,12 @@ #include "lcd.h" #include "ioctl.h" +#include "viamode.h" #include "via_utility.h" #include "vt1636.h" #include "tblDPASetting.h" #include "tbl1636.h" +#include "viafbdev.h" /* External struct*/ diff --git a/trunk/fs/ecryptfs/crypto.c b/trunk/fs/ecryptfs/crypto.c index 6046239465a1..06db79d05c12 100644 --- a/trunk/fs/ecryptfs/crypto.c +++ b/trunk/fs/ecryptfs/crypto.c @@ -1251,7 +1251,6 @@ struct kmem_cache *ecryptfs_header_cache_2; /** * ecryptfs_write_headers_virt * @page_virt: The virtual address to write the headers to - * @max: The size of memory allocated at page_virt * @size: Set to the number of bytes written by this function * @crypt_stat: The cryptographic context * @ecryptfs_dentry: The eCryptfs dentry @@ -1279,8 +1278,7 @@ struct kmem_cache *ecryptfs_header_cache_2; * * Returns zero on success */ -static int ecryptfs_write_headers_virt(char *page_virt, size_t max, - size_t *size, +static int ecryptfs_write_headers_virt(char *page_virt, size_t *size, struct ecryptfs_crypt_stat *crypt_stat, struct dentry *ecryptfs_dentry) { @@ -1298,7 +1296,7 @@ static int ecryptfs_write_headers_virt(char *page_virt, size_t max, offset += written; rc = ecryptfs_generate_key_packet_set((page_virt + offset), crypt_stat, ecryptfs_dentry, &written, - max - offset); + PAGE_CACHE_SIZE - offset); if (rc) ecryptfs_printk(KERN_WARNING, "Error generating key packet " "set; rc = [%d]\n", rc); @@ -1370,14 +1368,14 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) goto out; } /* Released in this function */ - virt = (char *)get_zeroed_page(GFP_KERNEL); + virt = kzalloc(crypt_stat->num_header_bytes_at_front, GFP_KERNEL); if (!virt) { printk(KERN_ERR "%s: Out of memory\n", __func__); rc = -ENOMEM; goto out; } - rc = ecryptfs_write_headers_virt(virt, PAGE_CACHE_SIZE, &size, - crypt_stat, ecryptfs_dentry); + rc = ecryptfs_write_headers_virt(virt, &size, crypt_stat, + ecryptfs_dentry); if (unlikely(rc)) { printk(KERN_ERR "%s: Error whilst writing headers; rc = [%d]\n", __func__, rc); @@ -1395,7 +1393,8 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) goto out_free; } out_free: - free_page((unsigned long)virt); + memset(virt, 0, crypt_stat->num_header_bytes_at_front); + kfree(virt); out: return rc; } diff --git a/trunk/fs/fat/inode.c b/trunk/fs/fat/inode.c index 2b2eec1283bf..19eafbe3c379 100644 --- a/trunk/fs/fat/inode.c +++ b/trunk/fs/fat/inode.c @@ -175,7 +175,7 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, if (rw == WRITE) { /* - * FIXME: blockdev_direct_IO() doesn't use ->write_begin(), + * FIXME: blockdev_direct_IO() doesn't use ->prepare_write(), * so we need to update the ->mmu_private to block boundary. * * But we must fill the remaining area or hole by nul for diff --git a/trunk/fs/jbd/transaction.c b/trunk/fs/jbd/transaction.c index 60d4c32c8808..d15cd6e7251e 100644 --- a/trunk/fs/jbd/transaction.c +++ b/trunk/fs/jbd/transaction.c @@ -860,6 +860,7 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh) * int journal_get_undo_access() - Notify intent to modify metadata with non-rewindable consequences * @handle: transaction * @bh: buffer to undo + * @credits: store the number of taken credits here (if not NULL) * * Sometimes there is a need to distinguish between metadata which has * been committed to disk and that which has not. The ext3fs code uses diff --git a/trunk/fs/libfs.c b/trunk/fs/libfs.c index e960a8321902..74688598bcf7 100644 --- a/trunk/fs/libfs.c +++ b/trunk/fs/libfs.c @@ -814,7 +814,7 @@ EXPORT_SYMBOL(simple_getattr); EXPORT_SYMBOL(simple_link); EXPORT_SYMBOL(simple_lookup); EXPORT_SYMBOL(simple_pin_fs); -EXPORT_UNUSED_SYMBOL(simple_prepare_write); +EXPORT_SYMBOL(simple_prepare_write); EXPORT_SYMBOL(simple_readpage); EXPORT_SYMBOL(simple_release_fs); EXPORT_SYMBOL(simple_rename); diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index 7efe937a415f..8d3225a78073 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -679,7 +679,8 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start, /* Some parts of this taken from generic_cont_expand, which turned out * to be too fragile to do exactly what we need without us having to - * worry about recursive locking in ->write_begin() and ->write_end(). */ + * worry about recursive locking in ->prepare_write() and + * ->commit_write(). */ static int ocfs2_write_zero_page(struct inode *inode, u64 size) { diff --git a/trunk/fs/splice.c b/trunk/fs/splice.c index 1abab5cee4ba..a1e701c27156 100644 --- a/trunk/fs/splice.c +++ b/trunk/fs/splice.c @@ -731,8 +731,8 @@ ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, }; /* - * The actor worker might be calling ->write_begin and - * ->write_end. Most of the time, these expect i_mutex to + * The actor worker might be calling ->prepare_write and + * ->commit_write. Most of the time, these expect i_mutex to * be held. Since this may result in an ABBA deadlock with * pipe->inode, we have to order lock acquiry here. */ diff --git a/trunk/include/linux/cgroup.h b/trunk/include/linux/cgroup.h index 1164963c3a85..8b00f6643e93 100644 --- a/trunk/include/linux/cgroup.h +++ b/trunk/include/linux/cgroup.h @@ -25,6 +25,7 @@ struct cgroup; extern int cgroup_init_early(void); extern int cgroup_init(void); +extern void cgroup_init_smp(void); extern void cgroup_lock(void); extern bool cgroup_lock_live_group(struct cgroup *cgrp); extern void cgroup_unlock(void); @@ -347,6 +348,8 @@ struct cgroup_subsys { struct cgroupfs_root *root; struct list_head sibling; + + void *private; }; #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; @@ -407,6 +410,7 @@ void cgroup_mm_owner_callbacks(struct task_struct *old, static inline int cgroup_init_early(void) { return 0; } static inline int cgroup_init(void) { return 0; } +static inline void cgroup_init_smp(void) {} static inline void cgroup_fork(struct task_struct *p) {} static inline void cgroup_fork_callbacks(struct task_struct *p) {} static inline void cgroup_post_fork(struct task_struct *p) {} diff --git a/trunk/include/linux/freezer.h b/trunk/include/linux/freezer.h index 5a361f85cfec..8f225339eee9 100644 --- a/trunk/include/linux/freezer.h +++ b/trunk/include/linux/freezer.h @@ -44,6 +44,11 @@ static inline bool should_send_signal(struct task_struct *p) return !(p->flags & PF_FREEZER_NOSIG); } +/* + * Wake up a frozen process + */ +extern int __thaw_process(struct task_struct *p); + /* Takes and releases task alloc lock using task_lock() */ extern int thaw_process(struct task_struct *p); diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index 0dcdd9458f4b..5b248d61430c 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -489,6 +489,13 @@ struct address_space_operations { int (*readpages)(struct file *filp, struct address_space *mapping, struct list_head *pages, unsigned nr_pages); + /* + * ext3 requires that a successful prepare_write() call be followed + * by a commit_write() call - they must be balanced + */ + int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); + int (*commit_write)(struct file *, struct page *, unsigned, unsigned); + int (*write_begin)(struct file *, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata); diff --git a/trunk/include/linux/hid.h b/trunk/include/linux/hid.h index e5780f8c934a..5355ca4b939e 100644 --- a/trunk/include/linux/hid.h +++ b/trunk/include/linux/hid.h @@ -410,7 +410,6 @@ struct hid_output_fifo { #define HID_SUSPENDED 5 #define HID_CLEAR_HALT 6 #define HID_DISCONNECTED 7 -#define HID_STARTED 8 struct hid_input { struct list_head list; diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index fba141d3ca07..396a350b87a6 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -116,8 +116,6 @@ extern int _cond_resched(void); # define might_resched() do { } while (0) #endif -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP - void __might_sleep(char *file, int line); /** * might_sleep - annotation for functions that can sleep * @@ -128,6 +126,8 @@ extern int _cond_resched(void); * be bitten later when the calling function happens to sleep when it is not * supposed to. */ +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP + void __might_sleep(char *file, int line); # define might_sleep() \ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) #else diff --git a/trunk/include/linux/mod_devicetable.h b/trunk/include/linux/mod_devicetable.h index 97b91d1abb43..eb71b45fdf5a 100644 --- a/trunk/include/linux/mod_devicetable.h +++ b/trunk/include/linux/mod_devicetable.h @@ -135,7 +135,6 @@ struct usb_device_id { struct hid_device_id { __u16 bus; - __u16 pad1; __u32 vendor; __u32 product; kernel_ulong_t driver_data diff --git a/trunk/include/linux/resource.h b/trunk/include/linux/resource.h index 40fc7e626082..aaa423a6f3d9 100644 --- a/trunk/include/linux/resource.h +++ b/trunk/include/linux/resource.h @@ -59,10 +59,10 @@ struct rlimit { #define _STK_LIM (8*1024*1024) /* - * GPG2 wants 64kB of mlocked memory, to make sure pass phrases + * GPG wants 32kB of mlocked memory, to make sure pass phrases * and other sensitive information are never written to disk. */ -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) +#define MLOCK_LIMIT (8 * PAGE_SIZE) /* * Due to binary compatibility, the actual resource numbers diff --git a/trunk/include/linux/security.h b/trunk/include/linux/security.h index c13f1cec9abb..f5c4a51eb42e 100644 --- a/trunk/include/linux/security.h +++ b/trunk/include/linux/security.h @@ -1585,7 +1585,6 @@ int security_syslog(int type); int security_settime(struct timespec *ts, struct timezone *tz); int security_vm_enough_memory(long pages); int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); -int security_vm_enough_memory_kern(long pages); int security_bprm_alloc(struct linux_binprm *bprm); void security_bprm_free(struct linux_binprm *bprm); void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); @@ -1821,11 +1820,6 @@ static inline int security_vm_enough_memory(long pages) return cap_vm_enough_memory(current->mm, pages); } -static inline int security_vm_enough_memory_kern(long pages) -{ - return cap_vm_enough_memory(current->mm, pages); -} - static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) { return cap_vm_enough_memory(mm, pages); diff --git a/trunk/include/linux/spi/spi_bitbang.h b/trunk/include/linux/spi/spi_bitbang.h index bf8de281b4ed..b8db32cea1de 100644 --- a/trunk/include/linux/spi/spi_bitbang.h +++ b/trunk/include/linux/spi/spi_bitbang.h @@ -18,9 +18,6 @@ * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(), * and custom setup()/cleanup() methods. */ - -#include - struct spi_bitbang { struct workqueue_struct *workqueue; struct work_struct work; diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index 8856e2d60e9f..d861197f83c7 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -1474,6 +1474,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, * ieee80211_beacon_get - beacon generation function * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. + * @control: will be filled with information needed to send this beacon. * * If the beacon frames are generated by the host system (i.e., not in * hardware/firmware), the low-level driver uses this function to receive @@ -1574,6 +1575,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames * @hw: pointer as obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. + * @control: will be filled with information needed to send returned frame. * * Function for accessing buffered broadcast and multicast frames. If * hardware/firmware does not implement buffering of broadcast/multicast @@ -1621,8 +1623,9 @@ unsigned int ieee80211_hdrlen(__le16 fc); * * @keyconf: the parameter passed with the set key * @skb: the skb for which the key is needed + * @rc4key: a buffer to which the key will be written * @type: TBD - * @key: a buffer to which the key will be written + * @key: TBD */ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, struct sk_buff *skb, @@ -1723,8 +1726,7 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, * @hw: pointer as obtained from ieee80211_alloc_hw(). * @ra: receiver address of the BA session recipient * @tid: the TID to BA on. - * - * Return: success if addBA request was sent, failure otherwise + * @return: success if addBA request was sent, failure otherwise * * Although mac80211/low level driver/user space application can estimate * the need to start aggregation on a certain RA/TID, the session level @@ -1762,8 +1764,7 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, * @ra: receiver address of the BA session recipient * @tid: the TID to stop BA. * @initiator: if indicates initiator DELBA frame will be sent. - * - * Return: error if no sta with matching da found, success otherwise + * @return: error if no sta with matching da found, success otherwise * * Although mac80211/low level driver/user space application can estimate * the need to stop aggregation on a certain RA/TID, the session level diff --git a/trunk/include/sound/soc.h b/trunk/include/sound/soc.h index 5e0189876afd..a1e0357a84d7 100644 --- a/trunk/include/sound/soc.h +++ b/trunk/include/sound/soc.h @@ -28,8 +28,7 @@ */ #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ - {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \ - .invert = xinvert}) + {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert}) #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ {.reg = xreg, .max = xmax, .invert = xinvert}) diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 86b00c53fade..44e9208f9c78 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -401,20 +401,16 @@ config CGROUP_MEM_RES_CTLR depends on CGROUPS && RESOURCE_COUNTERS select MM_OWNER help - Provides a memory resource controller that manages both anonymous - memory and page cache. (See Documentation/controllers/memory.txt) + Provides a memory resource controller that manages both page cache and + RSS memory. Note that setting this option increases fixed memory overhead - associated with each page of memory in the system. By this, - 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory - usage tracking struct at boot. Total amount of this is printed out - at boot. + associated with each page of memory in the system by 4/8 bytes + and also increases cache misses because struct page on many 64bit + systems will not fit into a single cache line anymore. Only enable when you're ok with these trade offs and really - sure you need the memory resource controller. Even when you enable - this, you can set "cgroup_disable=memory" at your boot option to - disable memory resource controller and you can avoid overheads. - (and lose benefits of memory resource contoller) + sure you need the memory resource controller. This config option also selects MM_OWNER config option, which could in turn add some fork/exit overhead. diff --git a/trunk/init/do_mounts_md.c b/trunk/init/do_mounts_md.c index 4d42f450b590..4c87ee1fe5d3 100644 --- a/trunk/init/do_mounts_md.c +++ b/trunk/init/do_mounts_md.c @@ -1,4 +1,4 @@ -#include + #include #include diff --git a/trunk/kernel/cgroup_freezer.c b/trunk/kernel/cgroup_freezer.c index 7fa476f01d05..e95056954498 100644 --- a/trunk/kernel/cgroup_freezer.c +++ b/trunk/kernel/cgroup_freezer.c @@ -162,13 +162,9 @@ static int freezer_can_attach(struct cgroup_subsys *ss, struct task_struct *task) { struct freezer *freezer; + int retval; - /* - * Anything frozen can't move or be moved to/from. - * - * Since orig_freezer->state == FROZEN means that @task has been - * frozen, so it's sufficient to check the latter condition. - */ + /* Anything frozen can't move or be moved to/from */ if (is_task_frozen_enough(task)) return -EBUSY; @@ -177,7 +173,13 @@ static int freezer_can_attach(struct cgroup_subsys *ss, if (freezer->state == CGROUP_FROZEN) return -EBUSY; - return 0; + retval = 0; + task_lock(task); + freezer = task_freezer(task); + if (freezer->state == CGROUP_FROZEN) + retval = -EBUSY; + task_unlock(task); + return retval; } static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task) @@ -188,9 +190,8 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task) freezer = task_freezer(task); task_unlock(task); - spin_lock_irq(&freezer->lock); BUG_ON(freezer->state == CGROUP_FROZEN); - + spin_lock_irq(&freezer->lock); /* Locking avoids race with FREEZING -> THAWED transitions. */ if (freezer->state == CGROUP_FREEZING) freeze_task(task, true); @@ -275,18 +276,25 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) return num_cant_freeze_now ? -EBUSY : 0; } -static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) +static int unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) { struct cgroup_iter it; struct task_struct *task; cgroup_iter_start(cgroup, &it); while ((task = cgroup_iter_next(cgroup, &it))) { - thaw_process(task); + int do_wake; + + task_lock(task); + do_wake = __thaw_process(task); + task_unlock(task); + if (do_wake) + wake_up_process(task); } cgroup_iter_end(cgroup, &it); - freezer->state = CGROUP_THAWED; + + return 0; } static int freezer_change_state(struct cgroup *cgroup, @@ -296,22 +304,27 @@ static int freezer_change_state(struct cgroup *cgroup, int retval = 0; freezer = cgroup_freezer(cgroup); - spin_lock_irq(&freezer->lock); - update_freezer_state(cgroup, freezer); if (goal_state == freezer->state) goto out; - - switch (goal_state) { + switch (freezer->state) { case CGROUP_THAWED: - unfreeze_cgroup(cgroup, freezer); + retval = try_to_freeze_cgroup(cgroup, freezer); break; + case CGROUP_FREEZING: + if (goal_state == CGROUP_FROZEN) { + /* Userspace is retrying after + * "/bin/echo FROZEN > freezer.state" returned -EBUSY */ + retval = try_to_freeze_cgroup(cgroup, freezer); + break; + } + /* state == FREEZING and goal_state == THAWED, so unfreeze */ case CGROUP_FROZEN: - retval = try_to_freeze_cgroup(cgroup, freezer); + retval = unfreeze_cgroup(cgroup, freezer); break; default: - BUG(); + break; } out: spin_unlock_irq(&freezer->lock); diff --git a/trunk/kernel/freezer.c b/trunk/kernel/freezer.c index 2f4936cf7083..ba6248b323ef 100644 --- a/trunk/kernel/freezer.c +++ b/trunk/kernel/freezer.c @@ -121,16 +121,6 @@ void cancel_freezing(struct task_struct *p) } } -static int __thaw_process(struct task_struct *p) -{ - if (frozen(p)) { - p->flags &= ~PF_FROZEN; - return 1; - } - clear_freeze_flag(p); - return 0; -} - /* * Wake up a frozen process * @@ -140,6 +130,16 @@ static int __thaw_process(struct task_struct *p) * refrigerator() could call frozen_process(), in which case the task would be * frozen and no one would thaw it. */ +int __thaw_process(struct task_struct *p) +{ + if (frozen(p)) { + p->flags &= ~PF_FROZEN; + return 1; + } + clear_freeze_flag(p); + return 0; +} + int thaw_process(struct task_struct *p) { task_lock(p); diff --git a/trunk/kernel/profile.c b/trunk/kernel/profile.c index 9830a037d8db..a9e422df6bf6 100644 --- a/trunk/kernel/profile.c +++ b/trunk/kernel/profile.c @@ -102,7 +102,7 @@ int profile_setup(char *str) __setup("profile=", profile_setup); -int __ref profile_init(void) +int profile_init(void) { int buffer_bytes; if (!prof_on) diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index 4530fc654455..105217da5c82 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1144,8 +1144,7 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid) struct task_struct * p; for_each_process(p) { - if (task_pid_vnr(p) > 1 && - !same_thread_group(p, current)) { + if (p->pid > 1 && !same_thread_group(p, current)) { int err = group_send_sig_info(sig, info, p); ++count; if (err != -EPERM) diff --git a/trunk/kernel/trace/Kconfig b/trunk/kernel/trace/Kconfig index b58f43bec363..e0cea282e0c5 100644 --- a/trunk/kernel/trace/Kconfig +++ b/trunk/kernel/trace/Kconfig @@ -8,6 +8,7 @@ config NOP_TRACER config HAVE_FUNCTION_TRACER bool + select NOP_TRACER config HAVE_DYNAMIC_FTRACE bool @@ -27,7 +28,6 @@ config TRACING select RING_BUFFER select STACKTRACE select TRACEPOINTS - select NOP_TRACER menu "Tracers" diff --git a/trunk/kernel/trace/ftrace.c b/trunk/kernel/trace/ftrace.c index 4a39d24568c8..7618c528756b 100644 --- a/trunk/kernel/trace/ftrace.c +++ b/trunk/kernel/trace/ftrace.c @@ -1339,14 +1339,6 @@ void __init ftrace_init(void) } #else - -static int __init ftrace_nodyn_init(void) -{ - ftrace_enabled = 1; - return 0; -} -device_initcall(ftrace_nodyn_init); - # define ftrace_startup() do { } while (0) # define ftrace_shutdown() do { } while (0) # define ftrace_startup_sysctl() do { } while (0) diff --git a/trunk/lib/dynamic_printk.c b/trunk/lib/dynamic_printk.c index d83660fd6fdd..d640f87bdc9e 100644 --- a/trunk/lib/dynamic_printk.c +++ b/trunk/lib/dynamic_printk.c @@ -402,8 +402,6 @@ static int __init dynamic_printk_init(void) iter->logical_modname, iter->flag_names, iter->hash, iter->hash2); } - if (dynamic_enabled == DYNAMIC_ENABLED_ALL) - set_all(true); return 0; } module_init(dynamic_printk_init); @@ -413,7 +411,7 @@ static int __init dynamic_printk_setup(char *str) { if (str) return -ENOENT; - dynamic_enabled = DYNAMIC_ENABLED_ALL; + set_all(true); return 0; } /* Use early_param(), so we can get debug output as early as possible */ diff --git a/trunk/mm/filemap.c b/trunk/mm/filemap.c index f3e5f8944d17..ab8553658af3 100644 --- a/trunk/mm/filemap.c +++ b/trunk/mm/filemap.c @@ -2029,8 +2029,48 @@ int pagecache_write_begin(struct file *file, struct address_space *mapping, { const struct address_space_operations *aops = mapping->a_ops; - return aops->write_begin(file, mapping, pos, len, flags, + if (aops->write_begin) { + return aops->write_begin(file, mapping, pos, len, flags, pagep, fsdata); + } else { + int ret; + pgoff_t index = pos >> PAGE_CACHE_SHIFT; + unsigned offset = pos & (PAGE_CACHE_SIZE - 1); + struct inode *inode = mapping->host; + struct page *page; +again: + page = __grab_cache_page(mapping, index); + *pagep = page; + if (!page) + return -ENOMEM; + + if (flags & AOP_FLAG_UNINTERRUPTIBLE && !PageUptodate(page)) { + /* + * There is no way to resolve a short write situation + * for a !Uptodate page (except by double copying in + * the caller done by generic_perform_write_2copy). + * + * Instead, we have to bring it uptodate here. + */ + ret = aops->readpage(file, page); + page_cache_release(page); + if (ret) { + if (ret == AOP_TRUNCATED_PAGE) + goto again; + return ret; + } + goto again; + } + + ret = aops->prepare_write(file, page, offset, offset+len); + if (ret) { + unlock_page(page); + page_cache_release(page); + if (pos + len > inode->i_size) + vmtruncate(inode, inode->i_size); + } + return ret; + } } EXPORT_SYMBOL(pagecache_write_begin); @@ -2039,9 +2079,32 @@ int pagecache_write_end(struct file *file, struct address_space *mapping, struct page *page, void *fsdata) { const struct address_space_operations *aops = mapping->a_ops; + int ret; - mark_page_accessed(page); - return aops->write_end(file, mapping, pos, len, copied, page, fsdata); + if (aops->write_end) { + mark_page_accessed(page); + ret = aops->write_end(file, mapping, pos, len, copied, + page, fsdata); + } else { + unsigned offset = pos & (PAGE_CACHE_SIZE - 1); + struct inode *inode = mapping->host; + + flush_dcache_page(page); + ret = aops->commit_write(file, page, offset, offset+len); + unlock_page(page); + mark_page_accessed(page); + page_cache_release(page); + + if (ret < 0) { + if (pos + len > inode->i_size) + vmtruncate(inode, inode->i_size); + } else if (ret > 0) + ret = min_t(size_t, copied, ret); + else + ret = copied; + } + + return ret; } EXPORT_SYMBOL(pagecache_write_end); @@ -2163,6 +2226,174 @@ struct page *__grab_cache_page(struct address_space *mapping, pgoff_t index) } EXPORT_SYMBOL(__grab_cache_page); +static ssize_t generic_perform_write_2copy(struct file *file, + struct iov_iter *i, loff_t pos) +{ + struct address_space *mapping = file->f_mapping; + const struct address_space_operations *a_ops = mapping->a_ops; + struct inode *inode = mapping->host; + long status = 0; + ssize_t written = 0; + + do { + struct page *src_page; + struct page *page; + pgoff_t index; /* Pagecache index for current page */ + unsigned long offset; /* Offset into pagecache page */ + unsigned long bytes; /* Bytes to write to page */ + size_t copied; /* Bytes copied from user */ + + offset = (pos & (PAGE_CACHE_SIZE - 1)); + index = pos >> PAGE_CACHE_SHIFT; + bytes = min_t(unsigned long, PAGE_CACHE_SIZE - offset, + iov_iter_count(i)); + + /* + * a non-NULL src_page indicates that we're doing the + * copy via get_user_pages and kmap. + */ + src_page = NULL; + + /* + * Bring in the user page that we will copy from _first_. + * Otherwise there's a nasty deadlock on copying from the + * same page as we're writing to, without it being marked + * up-to-date. + * + * Not only is this an optimisation, but it is also required + * to check that the address is actually valid, when atomic + * usercopies are used, below. + */ + if (unlikely(iov_iter_fault_in_readable(i, bytes))) { + status = -EFAULT; + break; + } + + page = __grab_cache_page(mapping, index); + if (!page) { + status = -ENOMEM; + break; + } + + /* + * non-uptodate pages cannot cope with short copies, and we + * cannot take a pagefault with the destination page locked. + * So pin the source page to copy it. + */ + if (!PageUptodate(page) && !segment_eq(get_fs(), KERNEL_DS)) { + unlock_page(page); + + src_page = alloc_page(GFP_KERNEL); + if (!src_page) { + page_cache_release(page); + status = -ENOMEM; + break; + } + + /* + * Cannot get_user_pages with a page locked for the + * same reason as we can't take a page fault with a + * page locked (as explained below). + */ + copied = iov_iter_copy_from_user(src_page, i, + offset, bytes); + if (unlikely(copied == 0)) { + status = -EFAULT; + page_cache_release(page); + page_cache_release(src_page); + break; + } + bytes = copied; + + lock_page(page); + /* + * Can't handle the page going uptodate here, because + * that means we would use non-atomic usercopies, which + * zero out the tail of the page, which can cause + * zeroes to become transiently visible. We could just + * use a non-zeroing copy, but the APIs aren't too + * consistent. + */ + if (unlikely(!page->mapping || PageUptodate(page))) { + unlock_page(page); + page_cache_release(page); + page_cache_release(src_page); + continue; + } + } + + status = a_ops->prepare_write(file, page, offset, offset+bytes); + if (unlikely(status)) + goto fs_write_aop_error; + + if (!src_page) { + /* + * Must not enter the pagefault handler here, because + * we hold the page lock, so we might recursively + * deadlock on the same lock, or get an ABBA deadlock + * against a different lock, or against the mmap_sem + * (which nests outside the page lock). So increment + * preempt count, and use _atomic usercopies. + * + * The page is uptodate so we are OK to encounter a + * short copy: if unmodified parts of the page are + * marked dirty and written out to disk, it doesn't + * really matter. + */ + pagefault_disable(); + copied = iov_iter_copy_from_user_atomic(page, i, + offset, bytes); + pagefault_enable(); + } else { + void *src, *dst; + src = kmap_atomic(src_page, KM_USER0); + dst = kmap_atomic(page, KM_USER1); + memcpy(dst + offset, src + offset, bytes); + kunmap_atomic(dst, KM_USER1); + kunmap_atomic(src, KM_USER0); + copied = bytes; + } + flush_dcache_page(page); + + status = a_ops->commit_write(file, page, offset, offset+bytes); + if (unlikely(status < 0)) + goto fs_write_aop_error; + if (unlikely(status > 0)) /* filesystem did partial write */ + copied = min_t(size_t, copied, status); + + unlock_page(page); + mark_page_accessed(page); + page_cache_release(page); + if (src_page) + page_cache_release(src_page); + + iov_iter_advance(i, copied); + pos += copied; + written += copied; + + balance_dirty_pages_ratelimited(mapping); + cond_resched(); + continue; + +fs_write_aop_error: + unlock_page(page); + page_cache_release(page); + if (src_page) + page_cache_release(src_page); + + /* + * prepare_write() may have instantiated a few blocks + * outside i_size. Trim these off again. Don't need + * i_size_read because we hold i_mutex. + */ + if (pos + bytes > inode->i_size) + vmtruncate(inode, inode->i_size); + break; + } while (iov_iter_count(i)); + + return written ? written : status; +} + static ssize_t generic_perform_write(struct file *file, struct iov_iter *i, loff_t pos) { @@ -2263,7 +2494,10 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, struct iov_iter i; iov_iter_init(&i, iov, nr_segs, count, written); - status = generic_perform_write(file, &i, pos); + if (a_ops->write_begin) + status = generic_perform_write(file, &i, pos); + else + status = generic_perform_write_2copy(file, &i, pos); if (likely(status >= 0)) { written += status; diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index de14ac21e5b5..74f4d158022e 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -175,8 +175,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) /* Don't let a single process grow too big: leave 3% of the size of this process for other processes */ - if (mm) - allowed -= mm->total_vm / 32; + allowed -= mm->total_vm / 32; /* * cast `allowed' as a signed long because vm_committed_space diff --git a/trunk/mm/nommu.c b/trunk/mm/nommu.c index 7695dc850785..2696b24f2bb3 100644 --- a/trunk/mm/nommu.c +++ b/trunk/mm/nommu.c @@ -1454,8 +1454,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) /* Don't let a single process grow too big: leave 3% of the size of this process for other processes */ - if (mm) - allowed -= mm->total_vm / 32; + allowed -= current->mm->total_vm / 32; /* * cast `allowed' as a signed long because vm_committed_space diff --git a/trunk/mm/shmem.c b/trunk/mm/shmem.c index 0ed075215e5f..d38d7e61fcd0 100644 --- a/trunk/mm/shmem.c +++ b/trunk/mm/shmem.c @@ -161,8 +161,8 @@ static inline struct shmem_sb_info *SHMEM_SB(struct super_block *sb) */ static inline int shmem_acct_size(unsigned long flags, loff_t size) { - return (flags & VM_ACCOUNT) ? - security_vm_enough_memory_kern(VM_ACCT(size)) : 0; + return (flags & VM_ACCOUNT)? + security_vm_enough_memory(VM_ACCT(size)): 0; } static inline void shmem_unacct_size(unsigned long flags, loff_t size) @@ -179,8 +179,8 @@ static inline void shmem_unacct_size(unsigned long flags, loff_t size) */ static inline int shmem_acct_block(unsigned long flags) { - return (flags & VM_ACCOUNT) ? - 0 : security_vm_enough_memory_kern(VM_ACCT(PAGE_CACHE_SIZE)); + return (flags & VM_ACCOUNT)? + 0: security_vm_enough_memory(VM_ACCT(PAGE_CACHE_SIZE)); } static inline void shmem_unacct_blocks(unsigned long flags, long pages) diff --git a/trunk/mm/vmalloc.c b/trunk/mm/vmalloc.c index f1cc03bbf6ac..036536945dd9 100644 --- a/trunk/mm/vmalloc.c +++ b/trunk/mm/vmalloc.c @@ -897,8 +897,7 @@ EXPORT_SYMBOL(vm_unmap_ram); * @count: number of pages * @node: prefer to allocate data structures on this node * @prot: memory protection to use. PAGE_KERNEL for regular RAM - * - * Returns: a pointer to the address that has been mapped, or %NULL on failure + * @returns: a pointer to the address that has been mapped, or NULL on failure */ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot) { diff --git a/trunk/net/core/pktgen.c b/trunk/net/core/pktgen.c index a47f5bad110d..99f656d35b4f 100644 --- a/trunk/net/core/pktgen.c +++ b/trunk/net/core/pktgen.c @@ -1973,27 +1973,28 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) /* make sure that we don't pick a non-existing transmit queue */ ntxq = pkt_dev->odev->real_num_tx_queues; - if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { + if (ntxq <= num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU " - "disabled because CPU count (%d) exceeds number " - "of tx queues (%d) on %s\n", num_online_cpus(), ntxq, - pkt_dev->odev->name); + "disabled because CPU count (%d) exceeds number ", + num_online_cpus()); + printk(KERN_WARNING "pktgen: WARNING: of tx queues " + "(%d) on %s \n", ntxq, pkt_dev->odev->name); pkt_dev->flags &= ~F_QUEUE_MAP_CPU; } if (ntxq <= pkt_dev->queue_map_min) { printk(KERN_WARNING "pktgen: WARNING: Requested " - "queue_map_min (zero-based) (%d) exceeds valid range " - "[0 - %d] for (%d) queues on %s, resetting\n", - pkt_dev->queue_map_min, (ntxq ?: 1)- 1, ntxq, - pkt_dev->odev->name); + "queue_map_min (%d) exceeds number of tx\n", + pkt_dev->queue_map_min); + printk(KERN_WARNING "pktgen: WARNING: queues (%d) on " + "%s, resetting\n", ntxq, pkt_dev->odev->name); pkt_dev->queue_map_min = ntxq - 1; } - if (pkt_dev->queue_map_max >= ntxq) { + if (ntxq <= pkt_dev->queue_map_max) { printk(KERN_WARNING "pktgen: WARNING: Requested " - "queue_map_max (zero-based) (%d) exceeds valid range " - "[0 - %d] for (%d) queues on %s, resetting\n", - pkt_dev->queue_map_max, (ntxq ?: 1)- 1, ntxq, - pkt_dev->odev->name); + "queue_map_max (%d) exceeds number of tx\n", + pkt_dev->queue_map_max); + printk(KERN_WARNING "pktgen: WARNING: queues (%d) on " + "%s, resetting\n", ntxq, pkt_dev->odev->name); pkt_dev->queue_map_max = ntxq - 1; } diff --git a/trunk/net/mac80211/rc80211_minstrel_debugfs.c b/trunk/net/mac80211/rc80211_minstrel_debugfs.c index 98f480708050..0b024cd6b809 100644 --- a/trunk/net/mac80211/rc80211_minstrel_debugfs.c +++ b/trunk/net/mac80211/rc80211_minstrel_debugfs.c @@ -94,8 +94,8 @@ minstrel_stats_open(struct inode *inode, struct file *file) prob / 10, prob % 10, mr->last_success, mr->last_attempts, - (unsigned long long)mr->succ_hist, - (unsigned long long)mr->att_hist); + mr->succ_hist, + mr->att_hist); } p += sprintf(p, "\nTotal packet count:: ideal %d " "lookaround %d\n\n", @@ -106,7 +106,7 @@ minstrel_stats_open(struct inode *inode, struct file *file) return 0; } -static ssize_t +static int minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o) { struct minstrel_stats_info *ms; diff --git a/trunk/net/rfkill/rfkill-input.c b/trunk/net/rfkill/rfkill-input.c index bfdade72e066..21124ec0a73d 100644 --- a/trunk/net/rfkill/rfkill-input.c +++ b/trunk/net/rfkill/rfkill-input.c @@ -256,11 +256,6 @@ static struct input_handler rfkill_handler = { static int __init rfkill_handler_init(void) { - unsigned long last_run = jiffies - msecs_to_jiffies(500); - rfkill_wlan.last = last_run; - rfkill_bt.last = last_run; - rfkill_uwb.last = last_run; - rfkill_wimax.last = last_run; return input_register_handler(&rfkill_handler); } diff --git a/trunk/net/sunrpc/xprtsock.c b/trunk/net/sunrpc/xprtsock.c index 9a288d5eea64..0a50361e3d83 100644 --- a/trunk/net/sunrpc/xprtsock.c +++ b/trunk/net/sunrpc/xprtsock.c @@ -249,6 +249,7 @@ struct sock_xprt { void (*old_data_ready)(struct sock *, int); void (*old_state_change)(struct sock *); void (*old_write_space)(struct sock *); + void (*old_error_report)(struct sock *); }; /* @@ -698,8 +699,9 @@ static int xs_tcp_send_request(struct rpc_task *task) case -EAGAIN: xs_nospace(task); break; - case -ECONNREFUSED: case -ECONNRESET: + xs_tcp_shutdown(xprt); + case -ECONNREFUSED: case -ENOTCONN: case -EPIPE: status = -ENOTCONN; @@ -742,6 +744,22 @@ static void xs_tcp_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) xprt_release_xprt(xprt, task); } +static void xs_save_old_callbacks(struct sock_xprt *transport, struct sock *sk) +{ + transport->old_data_ready = sk->sk_data_ready; + transport->old_state_change = sk->sk_state_change; + transport->old_write_space = sk->sk_write_space; + transport->old_error_report = sk->sk_error_report; +} + +static void xs_restore_old_callbacks(struct sock_xprt *transport, struct sock *sk) +{ + sk->sk_data_ready = transport->old_data_ready; + sk->sk_state_change = transport->old_state_change; + sk->sk_write_space = transport->old_write_space; + sk->sk_error_report = transport->old_error_report; +} + /** * xs_close - close a socket * @xprt: transport @@ -765,9 +783,8 @@ static void xs_close(struct rpc_xprt *xprt) transport->sock = NULL; sk->sk_user_data = NULL; - sk->sk_data_ready = transport->old_data_ready; - sk->sk_state_change = transport->old_state_change; - sk->sk_write_space = transport->old_write_space; + + xs_restore_old_callbacks(transport, sk); write_unlock_bh(&sk->sk_callback_lock); sk->sk_no_check = 0; @@ -1179,6 +1196,28 @@ static void xs_tcp_state_change(struct sock *sk) read_unlock(&sk->sk_callback_lock); } +/** + * xs_tcp_error_report - callback mainly for catching RST events + * @sk: socket + */ +static void xs_tcp_error_report(struct sock *sk) +{ + struct rpc_xprt *xprt; + + read_lock(&sk->sk_callback_lock); + if (sk->sk_err != ECONNRESET || sk->sk_state != TCP_ESTABLISHED) + goto out; + if (!(xprt = xprt_from_sock(sk))) + goto out; + dprintk("RPC: %s client %p...\n" + "RPC: error %d\n", + __func__, xprt, sk->sk_err); + + xprt_force_disconnect(xprt); +out: + read_unlock(&sk->sk_callback_lock); +} + /** * xs_udp_write_space - callback invoked when socket buffer space * becomes available @@ -1454,10 +1493,9 @@ static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) write_lock_bh(&sk->sk_callback_lock); + xs_save_old_callbacks(transport, sk); + sk->sk_user_data = xprt; - transport->old_data_ready = sk->sk_data_ready; - transport->old_state_change = sk->sk_state_change; - transport->old_write_space = sk->sk_write_space; sk->sk_data_ready = xs_udp_data_ready; sk->sk_write_space = xs_udp_write_space; sk->sk_no_check = UDP_CSUM_NORCV; @@ -1589,13 +1627,13 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) write_lock_bh(&sk->sk_callback_lock); + xs_save_old_callbacks(transport, sk); + sk->sk_user_data = xprt; - transport->old_data_ready = sk->sk_data_ready; - transport->old_state_change = sk->sk_state_change; - transport->old_write_space = sk->sk_write_space; sk->sk_data_ready = xs_tcp_data_ready; sk->sk_state_change = xs_tcp_state_change; sk->sk_write_space = xs_tcp_write_space; + sk->sk_error_report = xs_tcp_error_report; sk->sk_allocation = GFP_ATOMIC; /* socket options */ diff --git a/trunk/security/security.c b/trunk/security/security.c index c0acfa7177e5..255b08559b2b 100644 --- a/trunk/security/security.c +++ b/trunk/security/security.c @@ -198,23 +198,14 @@ int security_settime(struct timespec *ts, struct timezone *tz) int security_vm_enough_memory(long pages) { - WARN_ON(current->mm == NULL); return security_ops->vm_enough_memory(current->mm, pages); } int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) { - WARN_ON(mm == NULL); return security_ops->vm_enough_memory(mm, pages); } -int security_vm_enough_memory_kern(long pages) -{ - /* If current->mm is a kernel thread then we will pass NULL, - for this specific case that is fine */ - return security_ops->vm_enough_memory(current->mm, pages); -} - int security_bprm_alloc(struct linux_binprm *bprm) { return security_ops->bprm_alloc_security(bprm); diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index b0bf42691047..6d71f9a7ccbb 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -225,13 +225,8 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, kctl.id.iface = ncontrol->iface; kctl.id.device = ncontrol->device; kctl.id.subdevice = ncontrol->subdevice; - if (ncontrol->name) { + if (ncontrol->name) strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); - if (strcmp(ncontrol->name, kctl.id.name) != 0) - snd_printk(KERN_WARNING - "Control name '%s' truncated to '%s'\n", - ncontrol->name, kctl.id.name); - } kctl.id.index = ncontrol->index; kctl.count = ncontrol->count ? ncontrol->count : 1; access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : diff --git a/trunk/sound/pci/ac97/ac97_codec.c b/trunk/sound/pci/ac97/ac97_codec.c index bd510eceff1f..6704acbca8c0 100644 --- a/trunk/sound/pci/ac97/ac97_codec.c +++ b/trunk/sound/pci/ac97/ac97_codec.c @@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device) ac97->dev.bus = &ac97_bus_type; ac97->dev.parent = ac97->bus->card->dev; ac97->dev.release = ac97_device_release; - dev_set_name(&ac97->dev, "%d-%d:%s", - ac97->bus->card->number, ac97->num, - snd_ac97_get_short_name(ac97)); + snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s", + ac97->bus->card->number, ac97->num, + snd_ac97_get_short_name(ac97)); if ((err = device_register(&ac97->dev)) < 0) { snd_printk(KERN_ERR "Can't register ac97 bus\n"); ac97->dev.bus = NULL; diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index ba1ab737b55f..6447754ae56e 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -64,7 +64,6 @@ static struct hda_vendor_id hda_vendor_ids[] = { { 0x14f1, "Conexant" }, { 0x17e8, "Chrontel" }, { 0x1854, "LG" }, - { 0x1aec, "Wolfson Microelectronics" }, { 0x434d, "C-Media" }, { 0x8384, "SigmaTel" }, {} /* terminator */ diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 35722ec920cb..f080f8ce0ecb 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include "hda_codec.h" @@ -398,9 +397,6 @@ struct azx { /* for pending irqs */ struct work_struct irq_pending_work; - - /* reboot notifier (for mysterious hangup problem at power-down) */ - struct notifier_block reboot_notifier; }; /* driver types */ @@ -1982,28 +1978,6 @@ static int azx_resume(struct pci_dev *pci) #endif /* CONFIG_PM */ -/* - * reboot notifier for hang-up problem at power-down - */ -static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) -{ - struct azx *chip = container_of(nb, struct azx, reboot_notifier); - azx_stop_chip(chip); - return NOTIFY_OK; -} - -static void azx_notifier_register(struct azx *chip) -{ - chip->reboot_notifier.notifier_call = azx_halt; - register_reboot_notifier(&chip->reboot_notifier); -} - -static void azx_notifier_unregister(struct azx *chip) -{ - if (chip->reboot_notifier.notifier_call) - unregister_reboot_notifier(&chip->reboot_notifier); -} - /* * destructor */ @@ -2011,8 +1985,6 @@ static int azx_free(struct azx *chip) { int i; - azx_notifier_unregister(chip); - if (chip->initialized) { azx_clear_irq_pending(chip); for (i = 0; i < chip->num_streams; i++) @@ -2376,7 +2348,6 @@ static int __devinit azx_probe(struct pci_dev *pci, pci_set_drvdata(pci, card); chip->running = 1; power_down_all_codecs(chip); - azx_notifier_register(chip); dev++; return err; diff --git a/trunk/sound/pci/hda/patch_analog.c b/trunk/sound/pci/hda/patch_analog.c index d3fd432cb3ea..2b00c4afdf97 100644 --- a/trunk/sound/pci/hda/patch_analog.c +++ b/trunk/sound/pci/hda/patch_analog.c @@ -3860,7 +3860,6 @@ static const char *ad1884a_models[AD1884A_MODELS] = { static struct snd_pci_quirk ad1884a_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), - SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), {} }; diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index df9b0bc7f878..788fdc6f3264 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -566,8 +566,10 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, nid = codec->slave_dig_outs[smux_idx - 1]; if (spec->cur_smux[smux_idx] == smux->num_items - 1) val = AMP_OUT_MUTE; + if (smux_idx == 0) + nid = spec->multiout.dig_out_nid; else - val = AMP_OUT_UNMUTE; + nid = codec->slave_dig_outs[smux_idx - 1]; /* un/mute SPDIF out */ snd_hda_codec_write_cache(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, val); diff --git a/trunk/sound/pci/ice1712/ice1712.c b/trunk/sound/pci/ice1712/ice1712.c index 58d7cda03de5..5b442383fcda 100644 --- a/trunk/sound/pci/ice1712/ice1712.c +++ b/trunk/sound/pci/ice1712/ice1712.c @@ -2688,13 +2688,12 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, return err; } - if (ice_has_con_ac97(ice)) { + if (ice_has_con_ac97(ice)) err = snd_ice1712_pcm(ice, pcm_dev++, NULL); if (err < 0) { snd_card_free(card); return err; } - } err = snd_ice1712_ac97_mixer(ice); if (err < 0) { @@ -2716,13 +2715,12 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, } } - if (ice_has_con_ac97(ice)) { + if (ice_has_con_ac97(ice)) err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); if (err < 0) { snd_card_free(card); return err; } - } if (!c->no_mpu401) { err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, diff --git a/trunk/sound/pci/intel8x0.c b/trunk/sound/pci/intel8x0.c index 19d3391e229f..c88d1eace1c4 100644 --- a/trunk/sound/pci/intel8x0.c +++ b/trunk/sound/pci/intel8x0.c @@ -2702,7 +2702,6 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = { SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), - SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000), SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), { } /* terminator */ }; diff --git a/trunk/sound/soc/codecs/wm9713.c b/trunk/sound/soc/codecs/wm9713.c index 945b32ed9884..aba402b3c999 100644 --- a/trunk/sound/soc/codecs/wm9713.c +++ b/trunk/sound/soc/codecs/wm9713.c @@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0), SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0), SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0), -SOC_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0), +SOC_SINGLE("ALC Decay Time ", AC97_CODEC_CLASS_REV, 4, 15, 0), SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0), SOC_ENUM("ALC Function", wm9713_enum[6]), SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0), diff --git a/trunk/sound/soc/fsl/mpc5200_psc_i2s.c b/trunk/sound/soc/fsl/mpc5200_psc_i2s.c index 94a02eaa4825..86923299bc10 100644 --- a/trunk/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/trunk/sound/soc/fsl/mpc5200_psc_i2s.c @@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd) struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs; u16 imr; u8 psc_cmd; - unsigned long flags; + long flags; if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) s = &psc_i2s->capture; @@ -699,11 +699,9 @@ static ssize_t psc_i2s_stat_store(struct device *dev, return count; } -static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); -static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, - psc_i2s_stat_store); -static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, - psc_i2s_stat_store); +DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); +DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); +DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); /* --------------------------------------------------------------------- * OF platform bus binding code: @@ -821,8 +819,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op, /* Register the SYSFS files */ rc = device_create_file(psc_i2s->dev, &dev_attr_status); - rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun); - rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun); + rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun); + rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun); if (rc) dev_info(psc_i2s->dev, "error creating sysfs files\n"); diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index a3adbf06b1e5..462e635dfc74 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; int max = mc->max; - unsigned int shift = mc->shift; + unsigned int shift = mc->min; unsigned int rshift = mc->rshift; if (max == 1) diff --git a/trunk/sound/usb/usbquirks.h b/trunk/sound/usb/usbquirks.h index 92115755d98e..69689e79bf79 100644 --- a/trunk/sound/usb/usbquirks.h +++ b/trunk/sound/usb/usbquirks.h @@ -1480,36 +1480,6 @@ YAMAHA_DEVICE(0x7010, "UB99"), } } }, -{ - /* Advanced modes of the Edirol UA-25EX. - * For the standard mode, UA-25EX has ID 0582:00e7, which - * offers only 16-bit PCM at 44.1 kHz and no MIDI. - */ - USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6), - .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { - .vendor_name = "EDIROL", - .product_name = "UA-25EX", - .ifnum = QUIRK_ANY_INTERFACE, - .type = QUIRK_COMPOSITE, - .data = (const struct snd_usb_audio_quirk[]) { - { - .ifnum = 0, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = 1, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = 2, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = -1 - } - } - } -}, /* Guillemot devices */ {