summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | gbefb: fix section mismatch warningsRandy Dunlap2007-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make 'default_mode' and 'default_var' be __initdata. Fixes these section warnings: WARNING: vmlinux.o(.data+0x128e0): Section mismatch: reference to .init.data:default_mode_CRT (between 'default_mode' and 'default_var') WARNING: vmlinux.o(.data+0x128e4): Section mismatch: reference to .init.data:default_var_CRT (between 'default_var' and 'dev_attr_size') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | rd: fix data corruption on memory pressureChristian Borntraeger2007-11-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen ramdisk based install systems, where some pages of mapped libraries and programs were suddendly zeroed under memory pressure. This should not happen, as the ramdisk avoids freeing its pages by keeping them dirty all the time. It turns out that there is a case, where the VM makes a ramdisk page clean, without telling the ramdisk driver. On memory pressure shrink_zone runs and it starts to run shrink_active_list. There is a check for buffer_heads_over_limit, and if true, pagevec_strip is called. pagevec_strip calls try_to_release_page. If the mapping has no releasepage callback, try_to_free_buffers is called. try_to_free_buffers has now a special logic for some file systems to make a dirty page clean, if all buffers are clean. Thats what happened in our test case. The simplest solution is to provide a noop-releasepage callback for the ramdisk driver. This avoids try_to_free_buffers for ramdisk pages. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Nick Piggin <npiggin@suse.de> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | tle62x0 driver stops ignoring read errorsDavid Brownell2007-11-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tle62x0 driver was ignoring all read errors. This patch makes it pass such errors up the stack, instead of returning bogus data. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | serial: only use PNP IRQ if it's validBjorn Helgaas2007-11-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Luming Yu" <luming.yu@gmail.com> says: There is a "ttyS1 irq is -1" problem observed on tiger4 which cause the serial port broken. It is because that there is __no__ ACPI IRQ resource assigned for the serial port. So the value of the IRQ for the port is never changed since it got initialized to -1. If PNP supplies a valid IRQ, use it. Otherwise, leave port.irq == 0, which means "no IRQ" to the serial core. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yu Luming <luming.yu@intel.com> Acked-by: Matthew Wilcox <matthew@wil.cx> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | i5000_edac: no need to __stringify() KBUILD_BASENAMEDarrick J. Wong2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i5000_edac driver's PCI registration structure has the name ""i5000_edac"" (with extra set of double-quotes) which is probably not intentional. Get rid of __stringify. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Cc: Doug Thompson <norsk5@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | rtc: fall back to requesting only the ports we actually useBjorn Helgaas2007-11-141-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firmware like PNPBIOS or ACPI can report the address space consumed by the RTC. The actual space consumed may be less than the size (RTC_IO_EXTENT) assumed by the RTC driver. The PNP core doesn't request resources yet, but I'd like to make it do so. If/when it does, the RTC_IO_EXTENT request may fail, which prevents the RTC driver from loading. Since we only use the RTC index and data registers at RTC_PORT(0) and RTC_PORT(1), we can fall back to requesting just enough space for those. If the PNP core requests resources, this results in typical I/O port usage like this: 0070-0073 : 00:06 <-- PNP device 00:06 responds to 70-73 0070-0071 : rtc <-- RTC driver uses only 70-71 instead of the current: 0070-0077 : rtc <-- RTC_IO_EXTENT == 8 Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | rtc: release correct region in error pathBjorn Helgaas2007-11-141-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The misc_register() error path always released an I/O port region, even if the region was memory-mapped (only mips uses memory-mapped RTC, as far as I can see). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | I/OAT: Add support for version 2 of ioatdma deviceShannon Nelson2007-11-146-145/+779
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for version 2 of the ioatdma device. This device handles the descriptor chain and DCA services slightly differently: - Instead of moving the dma descriptors between a busy and an idle chain, this new version uses a single circular chain so that we don't have rewrite the next_descriptor pointers as we add new requests, and the device doesn't need to re-read the last descriptor. - The new device has the DCA tags defined internally instead of needing them defined statically. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: "Williams, Dan J" <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | raid5: fix unending write sequenceDan Williams2007-11-141-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <debug output from Joel's system> handling stripe 7629696, state=0x14 cnt=1, pd_idx=2 ops=0:0:0 check 5: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800ffcffcc0 written 0000000000000000 check 4: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800fdd4e360 written 0000000000000000 check 3: state 0x1 toread 0000000000000000 read 0000000000000000 write 0000000000000000 written 0000000000000000 check 2: state 0x1 toread 0000000000000000 read 0000000000000000 write 0000000000000000 written 0000000000000000 check 1: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800ff517e40 written 0000000000000000 check 0: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800fd4cae60 written 0000000000000000 locked=4 uptodate=2 to_read=0 to_write=4 failed=0 failed_num=0 for sector 7629696, rmw=0 rcw=0 </debug> These blocks were prepared to be written out, but were never handled in ops_run_biodrain(), so they remain locked forever. The operations flags are all clear which means handle_stripe() thinks nothing else needs to be done. This state suggests that the STRIPE_OP_PREXOR bit was sampled 'set' when it should not have been. This patch cleans up cases where the code looks at sh->ops.pending when it should be looking at the consistent stack-based snapshot of the operations flags. Report from Joel: Resync done. Patch fix this bug. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Joel Bertrand <joel.bertrand@systella.fr> Cc: <stable@kernel.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | atmel_serial build warnings begoneDavid Brownell2007-11-141-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove annoying build warnings about unused variables in atmel_serial, which afflict both AT91 and AVR32 builds. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | dmaengine: fix broken device refcountingHaavard Skinnemoen2007-11-141-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a DMA device is unregistered, its reference count is decremented twice for each channel: Once dma_class_dev_release() and once in dma_chan_cleanup(). This may result in the DMA device driver's remove() function completing before all channels have been cleaned up, causing lots of use-after-free fun. Fix it by incrementing the device's reference count twice for each channel during registration. [dan.j.williams@intel.com: kill unnecessary client refcounting] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | drivers/misc: Move misplaced pci_dev_put'sJulia Lawall2007-11-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move pci_dev_put outside the loops in which it occurs. Within the loop, pci_dev_put is done implicitly by pci_get_device. The problem was detected using the following semantic patch, and corrected by hand. @@ expression dev; expression E; @@ - pci_dev_put(dev) ... when != dev = E - pci_get_device(...,dev) Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | paride: pf driver fixesOndrej Zary2007-11-141-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pf driver for parallel port floppy drives seems to be broken. At least with Imation SuperDisk with EPAT chip, the driver calls pi_connect() and pi_disconnect after each transferred sector. At least with EPAT, this operation is very expensive - causes drive recalibration. Thus, transferring even a single byte (dd if=/dev/pf0 of=/dev/null bs=1 count=1) takes 20 seconds, making the driver useless. The pf_next_buf() function seems to be broken as it returns 1 always (except when pf_run is non-zero), causing the loop in do_pf_read_drq (and do_pf_write_drq) to be executed only once. The following patch fixes this problem. It also fixes swapped descriptions in pf_lock() function and removes DBMSG macro, which seems useless. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | spi: fix error paths on txx9spi_probeAtsushi Nemoto2007-11-141-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some error paths in txx9spi_probe wrongly return 0. This patch fixes them by using the devres interfaces. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | spi: fix double-free on spi_unregister_masterAtsushi Nemoto2007-11-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 49dce689ad4ef0fd1f970ef762168e4bd46f69a3, device_for_each_child iteration hits the master device itself. Do not call spi_unregister_device() for the master device. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: David Brownell <david-b@pacbell.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | acpi: make ACPI_PROCFS default to yAndrew Morton2007-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zillions of people are getting my-battery-monitor-doesnt-work problems (including me). Lessen the damage by making ACPI_PROCFS default to on. Cc: Len Brown <lenb@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | 8250_pnp: add support for "LG C1 EXPRESS DUAL" machinesDamian Jurd2007-11-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following is an extra entry to enable the touch screen on the new LG C1 EXPRESS DUAL machine. Cc: Russell King <rmk@arm.linux.org.uk> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | video/sis/: fix negative array indexAdrian Bunk2007-11-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the possible usage of a negative value as an array index spotted by the Coverity checker. sisfb_validate_mode() could return a negative error code and we must check for that prior to using its return value as an array index. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | lguest_user.c: fix memory leakAdrian Bunk2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a memory leak spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | LXFB: use the correct MSR number for panel supportJordan Crouse2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A relatively recent version of the Geode LX datasheet listed the wrong address for one of the MSRs that controls TFT panels, resulting in breakage. This patch corrects the MSR address. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | drivers/video/s1d13xxxfb.c: fix build as module with dbgStanislav Brabec2007-11-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached patch fixes two compilation problems of s1d13xxxfb.c: - Fixes outdated dbg() message to fix compilation error with debugging enabled. - Do not read kernel command line options when compiled as module. Signed-off-by: Stanislav Brabec <utx@penguin.cz> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | oProfile: oops when profile_pc() returns ~0LUPhilippe Elie2007-11-143-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instruction pointer returned by profile_pc() can be a random value. This break the assumption than we can safely set struct op_sample.eip field to a magic value to signal to the per-cpu buffer reader side special event like task switch ending up in a segfault in get_task_mm() when profile_pc() return ~0UL. Fixed by sanitizing the sampled eip and reject/log invalid eip. Problem reported by Sami Farin, patch tested by him. Signed-off-by: Philippe Elie <phil.el@wanadoo.fr> Tested-by: Sami Farin <safari-kernel@safari.iki.fi> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | uvesafb: fix warnings about unused variables on non-x86Frank Lichtenheld2007-11-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variables that are only used in #ifdef CONFIG_X86 should also only be declared there. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Cc: Michal Januszewski <spock@gentoo.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | chipsfb: uses/depends on PCIRandy Dunlap2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chipsfb uses PCI interfaces and should depend on PCI. CC drivers/video/chipsfb.o drivers/video/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/chipsfb.c:378: error: implicit declaration of function 'pci_request_region' drivers/video/chipsfb.c:435: error: implicit declaration of function 'pci_release_region' make[2]: *** [drivers/video/chipsfb.o] Error 1 make[1]: *** [drivers/video] Error 2 make: *** [drivers] Error 2 !CONFIG_PCI causes the build to fail. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | cm40x0_cs.c: fix debug macrosPascal Terjan2007-11-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PCMCIA_DEBUG is set, cm40x0_cs.c and cm4000_cs.c don't build because the definition of reader_to_dev uses a non-existent handle field of the struct pcmcia_device in the call to handle_to_dev. As handle_to_dev works on struct pcmcia_device, the fix is quite trivial. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | serial: add PNP ID for Davicom ISA 33.6K modemBjorn Helgaas2007-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should resolve these bug reports of the modem not working: http://bugzilla.kernel.org/show_bug.cgi?id=4355 http://www.linuxquestions.org/questions/linux-newbie-8/connect-script-failed-on-ppp-go-123975/ I don't have hardware to test this, but the initial report in the kernel bugzilla indicates that this change fixed the problem. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Dmitry Vavilov <vavilov@ihep.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | W1: fix memset size errorLi Zefan2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size argument passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | drivers/video/ps3fb: fix memset size errorLi Zefan2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | rtc-ds1307 exports NVRAMDavid Brownell2007-11-142-2/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export the NVRAM on DS1307 and DS1338 chips, like several of the other drivers do for such combination RTC-and-NVRAM chips. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | RTCs: handle NVRAM betterDavid Brownell2007-11-144-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several of the RTC drivers are exporting binary "nvram" files in sysfs. Such NVRAM (or on many systems, EEPROM) data is often initialized during system manufacture to hold data about identity (serial numbers, Ethernet addresses, etc), configuration, calibration, and so forth. This patch improves integrity and security of those files: - Correctly initializes the size in one of the two cases where that was not yet being done. - Improves system security/integrity by making this state not be world-writable by default. Letting arbitrary userspace code mangle such state by default is at least Not A Good Thing; and it could sometimes be worse, depending on the particular data that might be corrupted. (I disregard the paranoiac "don't let anyone read it either" approach. Anyone storing passwords in such memory doesn't really care about security.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Torsten Ertbjerg Rasmussen <tr@newtec.dk> Cc: Mark Zhan <rongkai.zhan@windriver.com> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | rtc_hctosys expects RTCs in UTC (doc)David Brownell2007-11-142-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RTC "hctosys" mechanism expects that RTC clock will use UTC, not local time (e.g. PST). Say so in Kconfig and in the kernel message. (Strictly speaking, the RTC clock should be tracking the POSIX epoch. That's not worth going into here. Goofing timezones means clocks are wrong by many hours; the POSIX-v-UTC differences just cost seconds.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | Fix Oops in toshiba_acpi error return pathAndrey Borzenkov2007-11-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When backlight_device_register() fails, return after undo initialization, do not try to use pointer that just was reset to NULL This fixes this oops: [ 1595.177672] [<c010480a>] show_trace_log_lvl+0x1a/0x30 [ 1595.177706] [<c01052a2>] show_trace+0x12/0x20 [ 1595.177718] [<c0105305>] dump_stack+0x15/0x20 [ 1595.177728] [<c01c9375>] kobject_shadow_add+0x125/0x1c0 [ 1595.177754] [<c01c941a>] kobject_add+0xa/0x10 [ 1595.177764] [<c0239a37>] device_add+0x97/0x5d0 [ 1595.177776] [<c0239f82>] device_register+0x12/0x20 [ 1595.177786] [<dfd912df>] backlight_device_register+0x9f/0x110 [backlight] [ 1595.177814] [<df861117>] toshiba_acpi_init+0x117/0x15e [toshiba_acpi] [ 1595.177834] [<c013e28d>] sys_init_module+0xfd/0x14e0 [ 1595.177871] [<c0104112>] sysenter_past_esp+0x5f/0x99 [ 1595.177883] ======================= [ 1595.177890] Could not register toshiba backlight device [ 1595.177985] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004 ... [ 1595.394097] EIP: 0060:[<df861143>] Not tainted VLI [ 1595.394101] EFLAGS: 00010282 (2.6.23-rc9-1avb #24) [ 1595.480081] EIP is at toshiba_acpi_init+0x143/0x15e [toshiba_acpi] Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Cc: John Belmonte <toshiba_acpi@memebeam.org> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | | ide: remove stale/incorrect comment from setup-pci.cBartlomiej Zolnierkiewicz2007-11-131-5/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | it821x/jmicron: fix return value of {it821x,jmicron}_init_one()Bartlomiej Zolnierkiewicz2007-11-132-4/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | ide: don't BUG() on unsupported transfer modesBartlomiej Zolnierkiewicz2007-11-134-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead of OOPS-ing for unsupported modes in ->set_dma_mode methods. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()Bartlomiej Zolnierkiewicz2007-11-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use drive->select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd() (the obsolete bits 7 and 5 of the Device register need to be set). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | ide: add missing HOB bit clearing to ide_dump_ata_status()Bartlomiej Zolnierkiewicz2007-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | ide-pmac: skip conservative PIO "downgrade"Bartlomiej Zolnierkiewicz2007-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can skip conservative PIO "downgrade" (PIO3 becomes PIO2 etc.) on PMAC. Problem reported by Mikael. Cc: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | ide: BLK_DEV_IDECD help: remove outdated noteAdrian Bunk2007-11-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LILO version 16 was released on 26-02-1995 (sic), so telling people to not use older versions no longer has any value. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | | cmd64x: don't clear the other channel's interruptSergei Shtylyov2007-11-131-2/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to not clear the other IDE channel's interrupt when clearing an IDE interrupt via the MRDMODE register. Thanks to Bart for finding a coding mistake. Bart: This fixes regression from commit 66602c83dcb6a5d82772d88ae7a32cd4a1213528 ("cmd64x: use interrupt status from MRDMODE register (take 2)"). Extra thanks to Martin for reporting and bisecting the issue. From: Sergei Shtylyov <sshtylyov@ru.mvista.com> Tested-by: Martin Rogge <marogge@onlinehome.de> Tested-by: Milan Kocian <milon@wq.cz> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | | | Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds2007-11-1311-189/+983
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: hwmon: (i5k_amb) Convert macros to C functions hwmon: (w83781d) Add missing curly braces hwmon: (abituguru3) Identify ABit IP35 Pro as such hwmon: (f75375s) pwmX_mode sysfs files writable for f75375 variant hwmon: (f75375s) On n2100 systems, set fans to full speed on boot hwmon: (f75375s) Allow setting up fans with platform_data hwmon: (f75375s) Add new style bindings hwmon: (lm70) Convert semaphore to mutex hwmon: (applesmc) Add support for Mac Pro 2 x Quad-Core hwmon: (abituguru3) Add support for 2 new motherboards hwmon: (ibmpex) Change printk to dev_{info,err} macros hwmon: (i5k_amb) New memory temperature sensor driver hwmon: (f75375s) fix pwm mode setting hwmon: (ibmpex.c) fix NULL dereference hwmon: (sis5595) Split sis5595_attributes_opt hwmon: (sis5595) Add individual alarm files hwmon: (w83627hf) push nr+1 offset into *_REG_FAN macros and simplify hwmon: (w83627hf) hoist nr-1 offset out of show-store-temp-X hwmon: Add power meter spec to Documentation/hwmon/sysfs-interface
| * | | | hwmon: (i5k_amb) Convert macros to C functionsDarrick J. Wong2007-11-081-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | akpm objected to some of the macros, so convert them into functions. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (w83781d) Add missing curly bracesJean Delvare2007-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing curly braces cause an if statement to be evaluated when it shouldn't. It happens to be harmless, but that's still worth fixing. Thanks to Riku Voipio for reporting. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-By: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (abituguru3) Identify ABit IP35 Pro as suchHans de Goede2007-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the identification string for motherboards with an id of 0x001A from unknown to "Abit IP35 Pro". Thanks to James Scott who has an Abit IP35 Pro. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (f75375s) pwmX_mode sysfs files writable for f75375 variantRiku Voipio2007-11-081-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix value check in set_pwm_mode(). Instead of checking for chip variant there, make pwmX_mode sysfs nodes only writable on f75375 variant. Signed-off-by: Riku Voipio <riku.voipio@movial.fi> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (f75375s) Allow setting up fans with platform_dataRiku Voipio2007-11-081-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow initializing fans on systems where BIOS does not do that by default. - define f75375s_platform_data in new file f75375s.h - if platform_data was provided, set fans accordingly in f75375_init() - split set_pwm_enable() to a sysfs callback and directly usable set_pwm_enable_direct() Signed-off-by: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (f75375s) Add new style bindingsRiku Voipio2007-11-081-26/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the example of David Brownell's work on lm75: - Create a second driver struct, using new-style driver binding methods. - Rename the old driver struct as f75375_legacy_driver. - Make the legacy bind/unbind logic delegate all its work. Signed-off-by: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (lm70) Convert semaphore to mutexMatthias Kaehlcke2007-11-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (applesmc) Add support for Mac Pro 2 x Quad-CoreRené Rebe2007-11-081-6/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least the 2x Quad-Core Apple Mac Pro appears to have some over-heat protection which suddenly powers off the whole box under load. This adds support for the fans and temerature sensors in the Mac Pro - later some "windwarm" a-like code should probably monitor the values. For now manually tweaking the fans prevents the sudden shutdown for me. cd /sys/devices/platform/applesmc.768 for x in fan{1,2,3,4}; do echo 1 > ${x}_manual echo 1285 > ${x}_output done Two sensors are 0, while four are 129 °C, those might be removed again, later. Signed-off-by: René Rebe <rene@exactcode.de> Cc: Nicolas Boichat <nicolas@boichat.ch> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | | | hwmon: (abituguru3) Add support for 2 new motherboardsHans de Goede2007-11-081-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-of-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
OpenPOWER on IntegriCloud