Heiko Carstens [Fri, 9 Jan 2009 11:14:52 +0000 (12:14 +0100)]
[S390] types: add/fix types.h include in header files
/include/asm/chpid.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/chsc.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/cmb.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/dasd.h:195: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/kvm.h:16: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/kvm.h:30: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/qeth.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/schid.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Holger Smolinski [Fri, 9 Jan 2009 11:14:51 +0000 (12:14 +0100)]
[S390] dasd: add device attribute to disable blocking on lost paths
When the connection between host and storage server is lost, the
dasd device driver usually blocks all I/O on affected devices and
waits for them to reappear. In some setups however it would be
better if the I/O is returned as error so that device can be
recovered by some other means, eg. in a raid or multipath setup.
Signed-off-by: Holger Smolinski <Holger.Smolinski@de.ibm.com>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Stefan Weinhuber [Fri, 9 Jan 2009 11:14:50 +0000 (12:14 +0100)]
[S390] dasd: send change uevents for dasd block devices
When a DASD device enters or leaves the 'online' state we need to
trigger change events for the respective disk and partitions.
These extra events are needed because when disk and partitions are
first added, udev rules that try to read disk labels or other data
may fail as the disk may not yet be ready.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Kamalesh Babulal [Fri, 9 Jan 2009 11:14:49 +0000 (12:14 +0100)]
[S390] tape block: fix dependencies
CC drivers/s390/char/tape_block.o
In file included from drivers/s390/char/tape_block.c:24:
drivers/s390/char/tape.h:159: warning: 'struct request' declared inside
parameter list
Adding the dependency of CONFIG_BLOCK to CONFIG_S390_TAPE_BLOCK.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Mike Frysinger [Fri, 9 Jan 2009 11:14:48 +0000 (12:14 +0100)]
[S390] asm-s390/posix_types.h: drop __USE_ALL usage
Bring s390 in line with all the other ports. Not sure how s390 missed
this change as all the other arches were being updated ...
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: linux390@de.ibm.com
CC: linux-s390@vger.kernel.org
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Huang Weiyi [Fri, 9 Jan 2009 11:14:47 +0000 (12:14 +0100)]
[S390] gettimeofday.S: removed duplicated #includes
Removed duplicated #include's in arch/s390/kernel/vdso32/gettimeofday.S
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Fri, 9 Jan 2009 11:14:46 +0000 (12:14 +0100)]
[S390] ptrace: no extern declarations for userspace
/include/asm/ptrace.h:275: extern's make no sense in userspace
/include/asm/ptrace.h:279: extern's make no sense in userspace
/include/asm/ptrace.h:280: extern's make no sense in userspace
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Len Brown [Fri, 9 Jan 2009 09:01:26 +0000 (04:01 -0500)]
Merge branch 'drivers-platform' into release
Conflicts:
drivers/misc/Kconfig
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 08:41:08 +0000 (03:41 -0500)]
Merge branch 'simplify_PRT' into release
Conflicts:
drivers/acpi/pci_irq.c
Note that this merge disables
e1d3a90846b40ad3160bf4b648d36c6badad39ac
pci, acpi: reroute PCI interrupt to legacy boot interrupt equivalent
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 08:39:43 +0000 (03:39 -0500)]
Merge branch 'linus' into release
Len Brown [Fri, 9 Jan 2009 08:38:15 +0000 (03:38 -0500)]
Merge branch 'suspend' into release
Len Brown [Fri, 9 Jan 2009 08:37:48 +0000 (03:37 -0500)]
Merge branch 'misc' into release
Conflicts:
include/acpi/acpixf.h
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 08:37:26 +0000 (03:37 -0500)]
Merge branch 'fujitsu-laptop' into release
Len Brown [Fri, 9 Jan 2009 08:37:20 +0000 (03:37 -0500)]
Merge branch 'fluff' into release
Len Brown [Fri, 9 Jan 2009 08:37:11 +0000 (03:37 -0500)]
Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and 'bugzilla-12257' into release
Len Brown [Fri, 9 Jan 2009 08:36:59 +0000 (03:36 -0500)]
Merge branch 'battery' into release
Len Brown [Fri, 9 Jan 2009 08:36:53 +0000 (03:36 -0500)]
Merge branch 'asus-eeepc' into release
Len Brown [Fri, 9 Jan 2009 08:36:32 +0000 (03:36 -0500)]
Merge branch 'alarm' into release
Len Brown [Fri, 9 Jan 2009 05:30:03 +0000 (00:30 -0500)]
ACPICA: hide private headers
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 05:13:17 +0000 (00:13 -0500)]
ACPICA: create acpica/ directory
also, delete sleep/ and delete ACPI_CFLAGS from Makefile
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 07:10:16 +0000 (02:10 -0500)]
ACPI: fix build warning
when CONFIG_RTC_DRV_CMOS=m
and thus !defined(HAVE_ACPI_LEGACY_ALARM)
drivers/acpi/proc.c:85: warning: ‘cmos_bcd_read’ declared ‘static’ but
never defined
Signed-off-by: Len Brown <len.brown@intel.com>
Zhao Yakui [Wed, 17 Dec 2008 08:55:18 +0000 (16:55 +0800)]
ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt"
On some boxes there exist both RSDT and XSDT table. But unfortunately
sometimes there exists the following error when XSDT table is used:
a. 32/64X address mismatch
b. The 32/64X FACS address mismatch
In such case the boot option of "acpi=rsdt" is provided so that
RSDT is tried instead of XSDT table when the system can't work well.
http://bugzilla.kernel.org/show_bug.cgi?id=8246
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
cc:Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Zhao Yakui [Sun, 4 Jan 2009 04:04:21 +0000 (12:04 +0800)]
ACPI: Avoid array address overflow when _CST MWAIT hint bits are set
The Cx Register address obtained from the _CST object is used as the MWAIT
hints if the register type is FFixedHW. And it is used to check whether
the Cx type is supported or not.
On some boxes the following Cx state package is obtained from _CST object:
>{
ResourceTemplate ()
{
Register (FFixedHW,
0x01, // Bit Width
0x02, // Bit Offset
0x0000000000889759, // Address
0x03, // Access Size
)
},
0x03,
0xF5,
0x015E }
In such case we should use the bit[7:4] of Cx address to check whether
the Cx type is supported or not.
mask the MWAIT hint to avoid array address overflow
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by:Venki Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Tony Vroon [Wed, 7 Jan 2009 10:11:24 +0000 (10:11 +0000)]
fujitsu-laptop: Simplify SBLL/SBL2 backlight handling
GBLS and GBLL only differ in the clearing of the GHKS flag, so there is no need
to have two backlight level readouts. Also, per Peter Gruber, the need for the
BLNF check has disappeared.
As a result, cleanups can be made in the code. This has been tested on the both
the S6410 and the S6420 platforms and causes no functionality regressions, on
the console without X or within X. One module parameter to disable the hotkeys
is dropped, as we only ever took one codepath anyway.
Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Peter Gruber <nokos@gmx.net>
Tested-By: Stephen Gildea <stepheng+linux@gildea.com>
Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Len Brown <len.brown@intel.com>
Tony Vroon [Wed, 31 Dec 2008 18:19:59 +0000 (18:19 +0000)]
fujitsu-laptop: Add BL power, LED control and radio state information
The FUNC interface in the Fujitsu-Siemens DSDT was unused until now. It exposes
state information that is now reported in additional platform files (whether the
radios are killed by the hardware switch or operational, whether the machine is
docked and whether the lid is open).
Support for the backlight class is now extended with the ability to power the
backlight on & off. Optional support for the LED class allows the keyboard
headlamps found on the U810 netbook and the Fujitsu logo illumination on the
P8010 notebook to be turned on & off.
This was fed through checkpatch.pl and tested on the S6420, P8010 & U810 platforms.
Signed-off-by: Stephen Gildea <stepheng+linux@gildea.com>
Tested-by: Stephen Gildea <stepheng+linux@gildea.com>
Tested-by: Julian Brown <jules@panic.cs-bristol.org.uk>
Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Peter Gruber <nokos@gmx.net>
Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 04:46:09 +0000 (23:46 -0500)]
ACPICA: delete utcache.c
ACPI_USE_LOCAL_CACHE will never be defined by the Linux kernel,
and thus utcache.c will always be dead code.
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 04:44:17 +0000 (23:44 -0500)]
ACPICA: delete acdisasm.h
it is referenced only #ifdef ACPI_DISASSEMBLER,
which is never set by the kernel.
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Fri, 9 Jan 2009 01:14:59 +0000 (17:14 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits)
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
ext4: Remove "extents" mount option
block: Add Kconfig help which notes that ext4 needs CONFIG_LBD
ext4: Make printk's consistently prefixed with "EXT4-fs: "
ext4: Add sanity checks for the superblock before mounting the filesystem
ext4: Add mount option to set kjournald's I/O priority
jbd2: Submit writes to the journal using WRITE_SYNC
jbd2: Add pid and journal device name to the "kjournald2 starting" message
ext4: Add markers for better debuggability
ext4: Remove code to create the journal inode
ext4: provide function to release metadata pages under memory pressure
ext3: provide function to release metadata pages under memory pressure
add releasepage hooks to block devices which can be used by file systems
ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc
ext4: Init the complete page while building buddy cache
ext4: Don't allow new groups to be added during block allocation
ext4: mark the blocks/inode bitmap beyond end of group as used
ext4: Use new buffer_head flag to check uninit group bitmaps initialization
ext4: Fix the race between read_inode_bitmap() and ext4_new_inode()
ext4: code cleanup
...
Linus Torvalds [Fri, 9 Jan 2009 00:27:31 +0000 (16:27 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (45 commits)
[SCSI] qla2xxx: Update version number to 8.03.00-k1.
[SCSI] qla2xxx: Add ISP81XX support.
[SCSI] qla2xxx: Use proper request/response queues with MQ instantiations.
[SCSI] qla2xxx: Correct MQ-chain information retrieval during a firmware dump.
[SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump.
[SCSI] qla2xxx: Don't pollute kernel logs with ZIO/RIO status messages.
[SCSI] qla2xxx: Don't fallback to interrupt-polling during re-initialization with MSI-X enabled.
[SCSI] qla2xxx: Remove support for reading/writing HW-event-log.
[SCSI] cxgb3i: add missing include
[SCSI] scsi_lib: fix DID_RESET status problems
[SCSI] fc transport: restore missing dev_loss_tmo callback to LLDD
[SCSI] aha152x_cs: Fix regression that keeps driver from using shared interrupts
[SCSI] sd: Correctly handle 6-byte commands with DIX
[SCSI] sd: DIF: Fix tagging on platforms with signed char
[SCSI] sd: DIF: Show app tag on error
[SCSI] Fix error handling for DIF/DIX
[SCSI] scsi_lib: don't decrement busy counters when inserting commands
[SCSI] libsas: fix test for negative unsigned and typos
[SCSI] a2091, gvp11: kill warn_unused_result warnings
[SCSI] fusion: Move a dereference below a NULL test
...
Fixed up trivial conflict due to moving the async part of sd_probe
around in the async probes vs using dev_set_name() in naming.
Linus Torvalds [Fri, 9 Jan 2009 00:04:50 +0000 (16:04 -0800)]
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6:
RTC: Remove the BKL.
Linus Torvalds [Thu, 8 Jan 2009 23:52:13 +0000 (15:52 -0800)]
Merge branch 'docs-next' of git://git.lwn.net/linux-2.6
* 'docs-next' of git://git.lwn.net/linux-2.6:
Fix a typo in the development process document.
Document handling of bad memory
Document RCU and unloadable modules
David John [Thu, 23 Oct 2008 08:25:56 +0000 (13:55 +0530)]
RTC: Remove the BKL.
Remove calls to the BKL since concurrent access is protected
by the spin lock rtc_lock.
Signed-off-by: David John <davidjon@xenontk.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Jonathan Corbet [Thu, 8 Jan 2009 23:32:13 +0000 (16:32 -0700)]
Fix a typo in the development process document.
Reported-by: Aníbal Monsalve Salazar <anibal@debian.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Linus Torvalds [Thu, 8 Jan 2009 22:51:11 +0000 (14:51 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: fix kernel-doc warnings
regulator: catch some registration errors
regulator: Add basic DocBook manual
regulator: Fix some kerneldoc rendering issues
regulator: Add missing kerneldoc
regulator: Clean up kerneldoc warnings
regulator: Remove extraneous kerneldoc annotations
regulator: init/link earlier
regulator: move set_machine_constraints after regulator device initialization
regulator: da903x: make da903x_is_enabled return 0 or 1
regulator: da903x: add '\n' to error messages
regulator: sysfs attribute reduction (v2)
regulator: code shrink (v2)
regulator: improved mode error checks
regulator: enable/disable refcounting
regulator: struct device - replace bus_id with dev_name(), dev_set_name()
Linus Torvalds [Thu, 8 Jan 2009 22:25:41 +0000 (14:25 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (84 commits)
wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev
net: convert pegasus driver to net_device_ops
bnx2x: Prevent eeprom set when driver is down
net: switch kaweth driver to netdevops
pcnet32: round off carrier watch timer
i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM
wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE
wimax: fix kconfig interactions with rfkill and input layers
wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning
r6040: bump release number to 0.20
r6040: warn about MAC address being unset
r6040: check PHY status when bringing interface up
r6040: make printks consistent with DRV_NAME
gianfar: Fixup use of BUS_ID_SIZE
mlx4_en: Returning real Max in get_ringparam
mlx4_en: Consider inline packets on completion
netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
qeth: convert to net_device_ops
vlan: add neigh_setup
dm9601: warn on invalid mac address
...
Linus Torvalds [Thu, 8 Jan 2009 22:25:00 +0000 (14:25 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
[ARM] fix pxa930_trkball build errors
[ARM] fix netx
[ARM] fix pnx4008
[ARM] fix pxa
[ARM] remove missed CLPS7500 defconfig
[ARM] clps711x: fix warning in
edb7211-mm.c
[ARM] clps711x: fix warning in fortunet
[ARM] fix AT91, davinci, h720x, ks8695, msm, mx2, mx3, netx, omap1, omap2, pxa, s3c
[ARM] Fix realview build
[ARM] 5357/1: Kirkwood: add missing ge01 tclk initialization
[ARM] 5358/1: AT2440EVB: Use new include path of mci.h
[ARM] 5361/1: mv78xx0: fix compilation error
[ARM] 5360/1: Orion: fix compilation error
[ARM] 5359/1: Kirkwood: fix compilation error
[ARM] S3C64XX: Fix EINT group macro definition
[ARM] Ensure CONFIG_SERIAL_SAMSUNG_UARTS is always set.
[ARM] S3C24XX: Add gpio_to_irq implementation
[ARM] S3C24XX: Add gpio_to_irq() facility
[ARM] footbridge:
dc21285.c warning fixes
[ARM] footbridge: add isa_init_irq() to common header
...
Linus Torvalds [Thu, 8 Jan 2009 22:03:34 +0000 (14:03 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md: don't retry recovery of raid1 that fails due to error on source drive.
md: Allow md devices to be created by name.
md: make devices disappear when they are no longer needed.
md: centralise all freeing of an 'mddev' in 'md_free'
md: move allocation of ->queue from mddev_find to md_probe
md: need another print_sb for mdp_superblock_1
md: use list_for_each_entry macro directly
md: raid0: make hash_spacing and preshift sector-based.
md: raid0: Represent the size of strip zones in sectors.
md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's.
md: raid0 create_strip_zones(): Make two local variables sector-based.
md: raid0: Represent zone->zone_offset in sectors.
md: raid0: Represent device offset in sectors.
md: raid0_make_request(): Replace local variable block by sector.
md: raid0_make_request(): Remove local variable chunk_size.
md: raid0_make_request(): Replace chunksize_bits by chunksect_bits.
md: use sysfs_notify_dirent to notify changes to md/sync_action.
md: fix bitmap-on-external-file bug.
Russell King [Thu, 8 Jan 2009 22:01:49 +0000 (22:01 +0000)]
Merge branch 'devel'
Linus Torvalds [Thu, 8 Jan 2009 22:01:36 +0000 (14:01 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: clean up the SFF code for coding style
libata: Add 32bit PIO support
[libata] ahci: Withdraw IGN_SERR_INTERNAL for SB800 SATA
pata_hpt366: reimplement mode programming
[libata] pata_hpt3x3: correct _freeze() function declaration
libata: Add special ata_pio_need_iordy() handling for Compact Flash.
pata_platform: __pata_platform_remove() shouldn't be in discard section
sata_sil24: remove unused sil24_port_multiplier
[libata] ahci: Add SATA GEN3 related messages
ata_piix: save, use saved and restore IOCFG
pata_ali: Fix and workaround for FIFO DMA bug
pata_ali: force initialise a few bits
pata_hpt3x3: Workarounds for chipset
Russell King [Thu, 8 Jan 2009 22:01:34 +0000 (22:01 +0000)]
Merge branch 'next-footbridge' of git://aeryn.fluff.org.uk/bjdooks/linux
Alan Cox [Mon, 5 Jan 2009 14:16:13 +0000 (14:16 +0000)]
libata: clean up the SFF code for coding style
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alan Cox [Mon, 5 Jan 2009 14:16:39 +0000 (14:16 +0000)]
libata: Add 32bit PIO support
This matters for some controllers and in one or two cases almost doubles
PIO performance. Add a bmdma32 operations set we can inherit and activate
it for some controllers
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Shane Huang [Tue, 30 Dec 2008 02:53:41 +0000 (10:53 +0800)]
[libata] ahci: Withdraw IGN_SERR_INTERNAL for SB800 SATA
There is an issue in ATI SB600/SB700 SATA that PxSERR.E should not be
set on some conditions, which will lead to many SATA ODD error messages.
commit
55a61604cd1354e1783364e1c901034f2f474b7d is the workaround.
Since SB800 fixed this HW issue, IGN_SERR_INTERNAL should be withdrawn
for SB800.
Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
NeilBrown [Thu, 8 Jan 2009 21:31:11 +0000 (08:31 +1100)]
md: don't retry recovery of raid1 that fails due to error on source drive.
If a raid1 has only one working drive and it has a sector which
gives an error on read, then an attempt to recover onto a spare will
fail, but as the single remaining drive is not removed from the
array, the recovery will be immediately re-attempted, resulting
in an infinite recovery loop.
So detect this situation and don't retry recovery once an error
on the lone remaining drive is detected.
Allow recovery to be retried once every time a spare is added
in case the problem wasn't actually a media error.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:10 +0000 (08:31 +1100)]
md: Allow md devices to be created by name.
Using sequential numbers to identify md devices is somewhat artificial.
Using names can be a lot more user-friendly.
Also, creating md devices by opening the device special file is a bit
awkward.
So this patch provides a new option for creating and naming devices.
Writing a name such as "md_home" to
/sys/modules/md_mod/parameters/new_array
will cause an array with that name to be created. It will appear in
/sys/block/ /proc/partitions and /proc/mdstat as 'md_home'.
It will have an arbitrary minor number allocated.
md devices that a created by an open are destroyed on the last
close when the device is inactive.
For named md devices, they will not be destroyed until the array
is explicitly stopped, either with the STOP_ARRAY ioctl or by
writing 'clear' to /sys/block/md_XXXX/md/array_state.
The name of the array must start 'md_' to avoid conflict with
other devices.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:10 +0000 (08:31 +1100)]
md: make devices disappear when they are no longer needed.
Currently md devices, once created, never disappear until the module
is unloaded. This is essentially because the gendisk holds a
reference to the mddev, and the mddev holds a reference to the
gendisk, this a circular reference.
If we drop the reference from mddev to gendisk, then we need to ensure
that the mddev is destroyed when the gendisk is destroyed. However it
is not possible to hook into the gendisk destruction process to enable
this.
So we drop the reference from the gendisk to the mddev and destroy the
gendisk when the mddev gets destroyed. However this has a
complication.
Between the call
__blkdev_get->get_gendisk->kobj_lookup->md_probe
and the call
__blkdev_get->md_open
there is no obvious way to hold a reference on the mddev any more, so
unless something is done, it will disappear and gendisk will be
destroyed prematurely.
Also, once we decide to destroy the mddev, there will be an unlockable
moment before the gendisk is unlinked (blk_unregister_region) during
which a new reference to the gendisk can be created. We need to
ensure that this reference can not be used. i.e. the ->open must
fail.
So:
1/ in md_probe we set a flag in the mddev (hold_active) which
indicates that the array should be treated as active, even
though there are no references, and no appearance of activity.
This is cleared by md_release when the device is closed if it
is no longer needed.
This ensures that the gendisk will survive between md_probe and
md_open.
2/ In md_open we check if the mddev we expect to open matches
the gendisk that we did open.
If there is a mismatch we return -ERESTARTSYS and modify
__blkdev_get to retry from the top in that case.
In the -ERESTARTSYS sys case we make sure to wait until
the old gendisk (that we succeeded in opening) is really gone so
we loop at most once.
Some udev configurations will always open an md device when it first
appears. If we allow an md device that was just created by an open
to disappear on an immediate close, then this can race with such udev
configurations and result in an infinite loop the device being opened
and closed, then re-open due to the 'ADD' even from the first open,
and then close and so on.
So we make sure an md device, once created by an open, remains active
at least until some md 'ioctl' has been made on it. This means that
all normal usage of md devices will allow them to disappear promptly
when not needed, but the worst that an incorrect usage will do it
cause an inactive md device to be left in existence (it can easily be
removed).
As an array can be stopped by writing to a sysfs attribute
echo clear > /sys/block/mdXXX/md/array_state
we need to use scheduled work for deleting the gendisk and other
kobjects. This allows us to wait for any pending gendisk deletion to
complete by simply calling flush_scheduled_work().
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:09 +0000 (08:31 +1100)]
md: centralise all freeing of an 'mddev' in 'md_free'
md_free is the .release handler for the md kobj_type.
So it makes sense to release all the objects referenced by
the mddev in there, rather than just prior to calling kobject_put
for what we think is the last time.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:08 +0000 (08:31 +1100)]
md: move allocation of ->queue from mddev_find to md_probe
It is more balanced to just do simple initialisation in mddev_find,
which allocates and links a new md device, and leave all the
more sophisticated allocation to md_probe (which calls mddev_find).
md_probe already allocated the gendisk. It should allocate the
queue too.
Signed-off-by: NeilBrown <neilb@suse.de>
Cheng Renquan [Thu, 8 Jan 2009 21:31:08 +0000 (08:31 +1100)]
md: need another print_sb for mdp_superblock_1
md_print_devices is called in two code path: MD_BUG(...), and md_ioctl
with PRINT_RAID_DEBUG. it will dump out all in use md devices
information;
However, it wrongly processed two types of superblock in one:
The header file <linux/raid/md_p.h> has defined two types of superblock,
struct mdp_superblock_s (typedefed with mdp_super_t) according to md with
metadata 0.90, and struct mdp_superblock_1 according to md with metadata
1.0 and later,
These two types of superblock are very different,
The md_print_devices code processed them both in mdp_super_t, that would
lead to wrong informaton dump like:
[ 6742.345877]
[ 6742.345887] md: **********************************
[ 6742.345890] md: * <COMPLETE RAID STATE PRINTOUT> *
[ 6742.345892] md: **********************************
[ 6742.345896] md1: <ram7><ram6><ram5><ram4>
[ 6742.345907] md: rdev ram7, SZ:
00065472 F:0 S:1 DN:3
[ 6742.345909] md: rdev superblock:
[ 6742.345914] md: SB: (V:0.90.0) ID:<
42ef13c7.
598c059a.
5f9f1645.
801e9ee6> CT:
4919856d
[ 6742.345918] md: L5 S00065472 ND:4 RD:4 md1 LO:2 CS:65536
[ 6742.345922] md: UT:
4919856d ST:1 AD:4 WD:4 FD:0 SD:0 CSUM:
b7992907 E:
00000001
[ 6742.345924] D 0: DISK<N:0,(1,8),R:0,S:6>
[ 6742.345930] D 1: DISK<N:1,(1,10),R:1,S:6>
[ 6742.345933] D 2: DISK<N:2,(1,12),R:2,S:6>
[ 6742.345937] D 3: DISK<N:3,(1,14),R:3,S:6>
[ 6742.345942] md: THIS: DISK<N:3,(1,14),R:3,S:6>
...
[ 6742.346058] md0: <ram3><ram2><ram1><ram0>
[ 6742.346067] md: rdev ram3, SZ:
00065472 F:0 S:1 DN:3
[ 6742.346070] md: rdev superblock:
[ 6742.346073] md: SB: (V:1.0.0) ID:<
369aad81.
00000000.
00000000.
00000000> CT:
9a322a9c
[ 6742.346077] md: L-
1507699579 S976570180 ND:48 RD:0 md0 LO:65536 CS:196610
[ 6742.346081] md: UT:
00000018 ST:0 AD:131048 WD:0 FD:8 SD:0 CSUM:
00000000 E:
00000000
[ 6742.346084] D 0: DISK<N:-1,(-1,-1),R:-1,S:-1>
[ 6742.346089] D 1: DISK<N:-1,(-1,-1),R:-1,S:-1>
[ 6742.346092] D 2: DISK<N:-1,(-1,-1),R:-1,S:-1>
[ 6742.346096] D 3: DISK<N:-1,(-1,-1),R:-1,S:-1>
[ 6742.346102] md: THIS: DISK<N:0,(0,0),R:0,S:0>
...
[ 6742.346219] md: **********************************
[ 6742.346221]
Here md1 is metadata 0.90.0, and md0 is metadata 1.2
After some more code to distinguish these two types of superblock, in this patch,
it will generate dump information like:
[ 7906.755790]
[ 7906.755799] md: **********************************
[ 7906.755802] md: * <COMPLETE RAID STATE PRINTOUT> *
[ 7906.755804] md: **********************************
[ 7906.755808] md1: <ram7><ram6><ram5><ram4>
[ 7906.755819] md: rdev ram7, SZ:
00065472 F:0 S:1 DN:3
[ 7906.755821] md: rdev superblock (MJ:0):
[ 7906.755826] md: SB: (V:0.90.0) ID:<
3fca7a0d.
a612bfed.
5f9f1645.
801e9ee6> CT:
491989f3
[ 7906.755830] md: L5 S00065472 ND:4 RD:4 md1 LO:2 CS:65536
[ 7906.755834] md: UT:
491989f3 ST:1 AD:4 WD:4 FD:0 SD:0 CSUM:
00fb52ad E:
00000001
[ 7906.755836] D 0: DISK<N:0,(1,8),R:0,S:6>
[ 7906.755842] D 1: DISK<N:1,(1,10),R:1,S:6>
[ 7906.755845] D 2: DISK<N:2,(1,12),R:2,S:6>
[ 7906.755849] D 3: DISK<N:3,(1,14),R:3,S:6>
[ 7906.755855] md: THIS: DISK<N:3,(1,14),R:3,S:6>
...
[ 7906.755972] md0: <ram3><ram2><ram1><ram0>
[ 7906.755981] md: rdev ram3, SZ:
00065472 F:0 S:1 DN:3
[ 7906.755984] md: rdev superblock (MJ:1):
[ 7906.755989] md: SB: (V:1) (F:0) Array-ID:<
5fbcf158:55aa:5fbe:9a79:
1e939880dcbd>
[ 7906.755990] md: Name: "DG5:0" CT:
1226410480
[ 7906.755998] md: L5 SZ130944 RD:4 LO:2 CS:128 DO:24 DS:131048 SO:8 RO:0
[ 7906.755999] md: Dev:
00000003 UUID:
9194d744:87f7:a448:85f2:
7497b84ce30a
[ 7906.756001] md: (F:0) UT:
1226410480 Events:0 ResyncOffset:-1 CSUM:
0dbcd829
[ 7906.756003] md: (MaxDev:384)
...
[ 7906.756113] md: **********************************
[ 7906.756116]
this md0 (metadata 1.2) information dumping is exactly according to struct
mdp_superblock_1.
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Dan Williams <dan.j.williams@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Cheng Renquan [Thu, 8 Jan 2009 21:31:08 +0000 (08:31 +1100)]
md: use list_for_each_entry macro directly
The rdev_for_each macro defined in <linux/raid/md_k.h> is identical to
list_for_each_entry_safe, from <linux/list.h>, it should be defined to
use list_for_each_entry_safe, instead of reinventing the wheel.
But some calls to each_entry_safe don't really need a safe version,
just a direct list_for_each_entry is enough, this could save a temp
variable (tmp) in every function that used rdev_for_each.
In this patch, most rdev_for_each loops are replaced by list_for_each_entry,
totally save many tmp vars; and only in the other situations that will call
list_del to delete an entry, the safe version is used.
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:08 +0000 (08:31 +1100)]
md: raid0: make hash_spacing and preshift sector-based.
This patch renames the hash_spacing and preshift members of struct
raid0_private_data to spacing and sector_shift respectively and
changes the semantics as follows:
We always have spacing = 2 * hash_spacing. In case
sizeof(sector_t) > sizeof(u32) we also have sector_shift = preshift + 1
while sector_shift = preshift = 0 otherwise.
Note that the values of nb_zone and zone are unaffected by these changes
because in the sector_div() preceeding the assignement of these two
variables both arguments double.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:07 +0000 (08:31 +1100)]
md: raid0: Represent the size of strip zones in sectors.
This completes the block -> sector conversion of struct strip_zone.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:07 +0000 (08:31 +1100)]
md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's.
This patch consists only of these trivial changes.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:07 +0000 (08:31 +1100)]
md: raid0 create_strip_zones(): Make two local variables sector-based.
current_offset and curr_zone_offset stored the corresponding offsets
as 1K quantities. Rename them to current_start and curr_zone_start
to match the naming of struct strip_zone and store the offsets as
sector counts.
Also, add KERN_INFO to the printk() affected by this change to make
checkpatch happy.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:07 +0000 (08:31 +1100)]
md: raid0: Represent zone->zone_offset in sectors.
For the same reason as in the previous patch, rename it from zone_offset
to zone_start.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:06 +0000 (08:31 +1100)]
md: raid0: Represent device offset in sectors.
Rename zone->dev_offset to zone->dev_start to make sure all users
have been converted.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:06 +0000 (08:31 +1100)]
md: raid0_make_request(): Replace local variable block by sector.
This change already simplifies the code a bit.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:06 +0000 (08:31 +1100)]
md: raid0_make_request(): Remove local variable chunk_size.
We might as well use chunk_sects instead.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Andre Noll [Thu, 8 Jan 2009 21:31:06 +0000 (08:31 +1100)]
md: raid0_make_request(): Replace chunksize_bits by chunksect_bits.
As ffz(~(2 * x)) = ffz(~x) + 1, we have
chunksect_bits = chunksize_bits + 1.
Fixup all users accordingly.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:05 +0000 (08:31 +1100)]
md: use sysfs_notify_dirent to notify changes to md/sync_action.
There is no compelling need for this, but sysfs_notify_dirent is a
nicer interface and the change is good for consistency.
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 8 Jan 2009 21:31:05 +0000 (08:31 +1100)]
md: fix bitmap-on-external-file bug.
commit
a2ed9615e3222645007fc19991aedf30eed3ecfd
fixed a bug with 'internal' bitmaps, but in the process broke
'in a file' bitmaps. So they are broken in 2.6.28
This fixes it, and needs to go in 2.6.28-stable.
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
Tejun Heo [Thu, 8 Jan 2009 21:29:20 +0000 (16:29 -0500)]
pata_hpt366: reimplement mode programming
Reimplement mode programming logic of pata_hpt366 such that it's
identical to that of IDE hpt366 driver. The differences were...
* pata_hpt366 used 0xCFFF8FFFF to mask pio modes and 0x3FFFFFFF dma
modes. IDE hpt366 uses 0xC1F8FFFF for PIO, 0x303800FF for MWDMA and
0x30070000 for UDMA.
* pata_hpt366 doesn't set 0x08000000 for PIO unless it's already set
and always turns it on for MWDMA/UDMA. IDE hpt366 doesn't bother
with the bit. It always uses what was there.
* IDE hpt366 always clears 0xC0000000. pata_hpt366 doesn't.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jeff Garzik [Thu, 8 Jan 2009 21:28:21 +0000 (16:28 -0500)]
[libata] pata_hpt3x3: correct _freeze() function declaration
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
David Daney [Wed, 10 Dec 2008 23:39:12 +0000 (15:39 -0800)]
libata: Add special ata_pio_need_iordy() handling for Compact Flash.
According to the Compact Flash specification r4.1, PIO modes 5 and 6
do not use iordy.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Sonic Zhang [Wed, 7 Jan 2009 16:37:12 +0000 (00:37 +0800)]
pata_platform: __pata_platform_remove() shouldn't be in discard section
--
UPD include/linux/compile.h
`___pata_platform_remove' referenced in section `__ksymtab_gpl' of
drivers/built-in.o: defined in discarded section `.devexit.text' of
drivers/built-in.o
make: *** [.tmp_vmlinux1] Error 1
--
__pata_platform_remove() should not be in discarded section
__pata_platform_remove(struct device *dev) is invoked in both
pata_platform.c and pata_of_platform.c by reomve function defined in
discarded section ".devexit.text". An exported function should not be put
into discarded section.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Grant Grundler [Wed, 7 Jan 2009 02:26:40 +0000 (11:26 +0900)]
sata_sil24: remove unused sil24_port_multiplier
AFAICT, struct sil24_port_multiplier isn't used anywhere. Remove it.
Signed-off-by: Grant Grundler <grundler@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Shane Huang [Tue, 30 Dec 2008 03:00:37 +0000 (11:00 +0800)]
[libata] ahci: Add SATA GEN3 related messages
The present AHCI driver seems to support SATA GEN 3 speed, but the related
messages should be modified.
Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Tejun Heo [Fri, 2 Jan 2009 03:04:48 +0000 (12:04 +0900)]
ata_piix: save, use saved and restore IOCFG
Certain ACPI implementations mess up IOCFG on _STM making libata
detect cable type incorrectly after a suspend/resume cycle. This
patch makes ata_piix save IOCFG on attach, use the saved value for
things which aren't dynamic and restore it on detach so that the next
driver also gets the BIOS initialized value.
This patch contains the following changes.
* makes ich_pata_cable_detect() use saved_iocfg.
* make piix_iocfg_bit18_quirk() take @host and use saved_iocfg.
* hpriv allocation moved upwards to save iocfg before doing anything
else.
This fixes bz#11879. Andreas Mohr reported and diagnosed the problem.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alan Cox [Mon, 5 Jan 2009 14:13:53 +0000 (14:13 +0000)]
pata_ali: Fix and workaround for FIFO DMA bug
In very obscure cases this can cause problems. We need to help the hardware
out a bit to avoid DMA problems on a reset.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alan Cox [Mon, 5 Jan 2009 14:13:22 +0000 (14:13 +0000)]
pata_ali: force initialise a few bits
We can't assume some of the setup here on non x86 boxes.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Alan Cox [Mon, 5 Jan 2009 14:12:51 +0000 (14:12 +0000)]
pata_hpt3x3: Workarounds for chipset
Correct the DMA bit flags (UDMA and MWDMA were swapped)
Add workarounds so that we clear ERR and INTR bits before issuing a DMA
Add workarounds so that we stop a live DMA before touching the CTL register
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Arjan van de Ven [Thu, 8 Jan 2009 20:35:11 +0000 (12:35 -0800)]
async: make async_synchronize_full() more serializing
turns out that there are real problems with allowing async
tasks that are scheduled from async tasks to run after
the async_synchronize_full() returns.
This patch makes the _full more strict and a complete
synchronization. Later I might need to add back a lighter
form of synchronization for other uses.. but not right now.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rodolfo Giometti [Thu, 8 Jan 2009 19:50:15 +0000 (19:50 +0000)]
leds: ledtrig-timer - on deactivation hardware blinking should be disabled
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 20:56:57 +0000 (12:56 -0800)]
wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev
Reported by Randy Dunlap from a warning in the v2.6.29 merge window
tree as of 2009/1/8.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Richard Purdie [Thu, 8 Jan 2009 20:52:37 +0000 (20:52 +0000)]
backlight: Rename the corgi backlight driver to generic
The corgi backlight driver is really generic code. This rename makes
this a lot clearer and completes the partial rename made a while ago.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Mike Rapoport [Wed, 3 Dec 2008 08:48:52 +0000 (08:48 +0000)]
backlight: add support for Toppoly TDO35S series to tdo24m lcd driver
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Randy Dunlap [Thu, 8 Jan 2009 19:50:23 +0000 (11:50 -0800)]
regulator: fix kernel-doc warnings
Fix kernel-doc warnings in regulator/driver.h:
Warning(linux-next-
20090108//include/linux/regulator/driver.h:95): Excess struct/union/enum/typedef member 'set_current' description in 'regulator_ops'
Warning(linux-next-
20090108//include/linux/regulator/driver.h:95): Excess struct/union/enum/typedef member 'get_current' description in 'regulator_ops'
Warning(linux-next-
20090108//include/linux/regulator/driver.h:124): No description found for parameter 'irq'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Liam Girdwood <lrg@slimlogic.co.uk>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Wed, 31 Dec 2008 12:54:19 +0000 (12:54 +0000)]
regulator: catch some registration errors
Prevent registration of duplicate "struct regulator" names.
They'd be unavailable, and clearly indicate something wrong.
[Edited to remove check for NULL consumer device until we have a
solution for things like cpufreq -- broonie]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 31 Dec 2008 12:52:44 +0000 (12:52 +0000)]
regulator: Add basic DocBook manual
Add a basic DocBook manual for the regulator API. This is much more
skeletal than the existing text documentation, the main benefit is to
provide a skeleton for automatic generation of a manual based on the
kerneldoc for the API.
Since large portions of the text are lifted from the existing text format
documentation written by Liam Girdwood much of the credit belongs to
him.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 31 Dec 2008 12:52:43 +0000 (12:52 +0000)]
regulator: Fix some kerneldoc rendering issues
There are some minor textual changes in here as well, mostly to enable()
and disable() but the primary goal of these changes is to fix
misrenderings of the kerneldoc documentation for the regulator API.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 31 Dec 2008 12:52:42 +0000 (12:52 +0000)]
regulator: Add missing kerneldoc
This is only the documentation that the kerneldoc system warns about.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 31 Dec 2008 12:52:41 +0000 (12:52 +0000)]
regulator: Clean up kerneldoc warnings
Remove kerneldoc warnings that don't relate to missing documentation,
mostly by renaming parameters in the documentation to match their
actual names.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 31 Dec 2008 12:52:40 +0000 (12:52 +0000)]
regulator: Remove extraneous kerneldoc annotations
Some of the internal structures have no kerneldoc but the ** at the start
of the comment marking them for documentation. Remove the annotation
until some is added.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Tue, 2 Dec 2008 05:50:13 +0000 (21:50 -0800)]
regulator: init/link earlier
Move regulator earlier in link sequence.
The regulator core currently initializes as a core_initcall() to be
available early ... but then it links way late, throwing away that
benefit, so regulators available at e.g. subsys_initcall() are not
available to subsystems which need to use them.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport [Tue, 25 Nov 2008 12:53:53 +0000 (14:53 +0200)]
regulator: move set_machine_constraints after regulator device initialization
Calling set_machine_constraints before regulator device initialization
causes crash when constraints have apply_uV set.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport [Tue, 25 Nov 2008 08:19:52 +0000 (10:19 +0200)]
regulator: da903x: make da903x_is_enabled return 0 or 1
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport [Mon, 24 Nov 2008 16:43:00 +0000 (18:43 +0200)]
regulator: da903x: add '\n' to error messages
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Wed, 12 Nov 2008 01:39:02 +0000 (17:39 -0800)]
regulator: sysfs attribute reduction (v2)
Clean up the sysfs interface to regulators by only exposing the
attributes that can be properly displayed. For example: when a
particular regulator method is needed to display the value, only
create that attribute when that method exists.
This cleaned-up interface is much more comprehensible. Most
regulators only support a subset of the possible methods, so
often more than half the attributes would be meaningless. Many
"not defined" values are no longer necessary. (But handling
of out-of-range values still looks a bit iffy.)
Documentation is updated to reflect that few of the attributes
are *always* present, and to briefly explain why a regulator may
not have a given attribute.
This adds object code, about a dozen bytes more than was removed
by the preceding patch, but saves a bunch of per-regulator data
associated with the now-removed attributes. So there's a net
reduction in memory footprint.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Wed, 12 Nov 2008 01:38:53 +0000 (17:38 -0800)]
regulator: code shrink (v2)
Shrink regulator core by removing duplication in attribute printing
and probe() cleanup paths. Saves about 340 bytes (object) on ARM.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Sun, 16 Nov 2008 19:46:56 +0000 (11:46 -0800)]
regulator: improved mode error checks
Minor bugfixes in handling of regulator modes:
- have the routine verifying regulator modes check against
the set of legal modes (!);
- have regulator_set_optimum_mode() verify the return value
of regulator_ops.get_optimum_mode(), like drms_uA_update();
- one call to regulator_ops.set_mode() treated zero as a
failure code; make this consistent with other callers.
Both regulator_set_mode() and regulator_set_optimum_mode() now
require valid_ops_mask to include REGULATOR_CHANGE_MODE; that
seems like a bugfix too.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David Brownell [Sun, 16 Nov 2008 19:44:46 +0000 (11:44 -0800)]
regulator: enable/disable refcounting
Make the <linux/regulator.h> framework treat enable/disable call
pairs like the <linux/clk.h> and <linux/interrupt.h> frameworks do:
they're refcounted, so that different parts of a driver don't need
to put work into coordination that frameworks normally handle.
It's a minor object code shrink.
It also makes the regulator_is_disabled() kerneldoc say what it's
actually returning: return value is not a refcount, and may report
an error (e.g. I/O error from I2C).
It also fixes some minor regulator_put() goofage: removing unlocked
access to the enable state. (But still not making regulator put/get
match the refcounting pattern they invoke.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Kay Sievers [Sun, 2 Nov 2008 02:55:10 +0000 (03:55 +0100)]
regulator: struct device - replace bus_id with dev_name(), dev_set_name()
This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".
To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.
We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.
We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.
Thanks,
Kay
From: Kay Sievers <kay.sievers@vrfy.org>
Subject: regulator: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Oliver Neukum [Thu, 8 Jan 2009 19:22:25 +0000 (11:22 -0800)]
net: convert pegasus driver to net_device_ops
This converts the pegasus driver to use of the new net_device_ops structure
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Thu, 8 Jan 2009 19:21:43 +0000 (11:21 -0800)]
bnx2x: Prevent eeprom set when driver is down
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Oliver Neukum [Thu, 8 Jan 2009 19:20:22 +0000 (11:20 -0800)]
net: switch kaweth driver to netdevops
This converts the kaweth ethernet USB driver to netdevops.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 8 Jan 2009 19:17:13 +0000 (11:17 -0800)]
pcnet32: round off carrier watch timer
The link check watchdog timer on this driver fires every two seconds, but
since not aligned it causes extra wakeups. It is more important on this
driver than most because it is the hardware that is emulated by default
when using network interfaces on VMware.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 19:08:25 +0000 (11:08 -0800)]
i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM
Current code was assuming PM was always enabled, which is not
correct. Code which accesses members in the struct usb_device that are
dependant on CONFIG_PM must be protected the same.
Reported by Randy Dunlap from a build error in the linux-next tree on
07/01/2009.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 19:08:01 +0000 (11:08 -0800)]
wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE
Current WiMAX rfkill code is missing the case where rfkill is compiled
in as modules and works only when rfkill is compiled in. This is not
correct. Fixed to test for CONFIG_RFKILL or CONFIG_RKILL_MODULE.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 19:07:36 +0000 (11:07 -0800)]
wimax: fix kconfig interactions with rfkill and input layers
WiMAX can work without RFKILL, but it was missing a check to make sure
RFKILL is not being made a module with wimax compiled into the
kernel. This caused failed builds in s390, where CONFIG_INPUT is
always off.
When RFKILL is enabled, the code uses the input layer to report
hardware switch changes; thus, if RFKILL is enabled, INPUT has to be
too. It also needs to display some message when INPUT is disabled that
explains why WiMAX is not selectable.
(issues found by Randy Dunlap in the linux-next tree).
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 19:06:48 +0000 (11:06 -0800)]
wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning
Reported by Randy Dunlap:
> Also, this warning needs to be fixed:
>
> linux-next-
20090106/net/wimax/id-table.c:133: warning: ISO C90
> forbids mixed declarations and code
Move the return on #defined(CONFIG_BUG) below the variable
declarations so it doesn't violate ISO C90.
On wimax_id_table_release() we want to do a debug check if CONFIG_BUG
is enabled. However, we also want the debug code to be always compiled
to ensure there is no bitrot. It will be optimized out by the compiler
when CONFIG_BUG is disabled.
Added a note to the function header stating this.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>