aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_iucv.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-09[S390] hvc_iucv: Limit rate of outgoing IUCV messagesHendrik Brueckner1-37/+174
This patch introduces a send buffer to limit outgoing IUCV messages up to a maximum of 25 IUCV messages per second. If no communication path to a IUCV HVC terminal exist, any data written to the terminal is discarded. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] hvc_iucv: Change IUCV term id and use one device as defaultHendrik Brueckner1-3/+3
The patch renames the IUCV application ID from "ihvc" to "lnxhvc". The device driver allocates one IUCV terminal device (lnxhvc0) as default. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] Use unsigned long long for u64 on 64bit.Heiko Carstens4-10/+6
As requested by Andrew. Same as what sparc did. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] qdio: fix broken pointer in case of CONFIG_DEBUG_FS is disabledJan Glauber1-0/+2
If CONFIG_DEBUG_FS is disabled debugfs_create_file returns -ENODEV instead of zero. Since the return value is stored and used at shutdown to remove existing entries an OOPS may be triggered. Add a check of the debugfs_create_file return value and in case of an error set the entry to NULL so it will be ignored at shutdown. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] vdso: compile fixHeiko Carstens2-2/+4
!CONFIG_SMP: arch/s390/kernel/vdso.c: In function 'vdso_init': arch/s390/kernel/vdso.c:325: error: incompatible type for argument 2 of 'vdso_alloc_per_cpu' Also move the code out of the BUG_ON statement since it won't be executed on !CONFIG_BUG. And that would be a bug. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] remove code for oldselect system callHeiko Carstens2-21/+0
The system call isn't wired up on s390. Just delete the dead code. Also we use the common code sys_ptrace system call, so the sys_ptrace declaration is pointless is well. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09[S390] types: add/fix types.h include in header filesHeiko Carstens8-3/+11
/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>
2009-01-09[S390] dasd: add device attribute to disable blocking on lost pathsHolger Smolinski5-3/+55
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>
2009-01-09[S390] dasd: send change uevents for dasd block devicesStefan Weinhuber1-1/+20
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>
2009-01-09[S390] tape block: fix dependenciesKamalesh Babulal1-1/+1
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>
2009-01-09[S390] asm-s390/posix_types.h: drop __USE_ALL usageMike Frysinger1-4/+0
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>
2009-01-09[S390] gettimeofday.S: removed duplicated #includesHuang Weiyi1-4/+0
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>
2009-01-09[S390] ptrace: no extern declarations for userspaceHeiko Carstens1-2/+5
/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>
2009-01-09ACPICA: hide private headersLen Brown129-349/+349
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPICA: create acpica/ directoryLen Brown124-101/+53
also, delete sleep/ and delete ACPI_CFLAGS from Makefile Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPI: fix build warningLen Brown1-2/+2
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>
2009-01-09ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt"Zhao Yakui5-2/+10
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>
2009-01-09ACPI: Avoid array address overflow when _CST MWAIT hint bits are setZhao Yakui1-1/+3
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>
2009-01-09fujitsu-laptop: Simplify SBLL/SBL2 backlight handlingTony Vroon1-93/+21
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>
2009-01-09fujitsu-laptop: Add BL power, LED control and radio state informationTony Vroon1-33/+272
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>
2009-01-08ACPICA: delete utcache.cLen Brown2-316/+1
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>
2009-01-08ACPICA: delete acdisasm.hLen Brown2-453/+2
it is referenced only #ifdef ACPI_DISASSEMBLER, which is never set by the kernel. Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-08RTC: Remove the BKL.David John1-13/+4
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>
2009-01-08Fix a typo in the development process document.Jonathan Corbet1-3/+3
Reported-by: Aníbal Monsalve Salazar <anibal@debian.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2009-01-08bzip2/lzma: centralize format detectionH. Peter Anvin5-67/+72
Centralize the compression format detection to a common routine in the lib directory, and use it for both initramfs and initrd. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-01-08bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filenameAlain Knaff1-1/+1
Impact: Bug fix Fix gunzip uncompression, so that it also works with files with embedded filenames that are larger than one block. Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-01-08bzip2/lzma: fix constant in decompress_inflateH. Peter Anvin1-1/+1
Impact: Cleanup Fix constant 0x8100 /* 32K */; according to Alain the value 0x8100 was left over test code to test misalignment, the correct value is indeed 0x8000 == 32K. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-01-08libata: clean up the SFF code for coding styleAlan Cox1-65/+67
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08libata: Add 32bit PIO supportAlan Cox7-9/+66
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>
2009-01-08[libata] ahci: Withdraw IGN_SERR_INTERNAL for SB800 SATAShane Huang1-2/+6
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>
2009-01-09md: don't retry recovery of raid1 that fails due to error on source drive.NeilBrown3-3/+13
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>
2009-01-09md: Allow md devices to be created by name.NeilBrown2-18/+102
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>
2009-01-09md: make devices disappear when they are no longer needed.NeilBrown3-12/+67
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>
2009-01-09md: centralise all freeing of an 'mddev' in 'md_free'NeilBrown1-9/+11
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>
2009-01-09md: move allocation of ->queue from mddev_find to md_probeNeilBrown1-11/+17
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>
2009-01-09md: need another print_sb for mdp_superblock_1Cheng Renquan2-6/+62
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>
2009-01-09md: use list_for_each_entry macro directlyCheng Renquan10-94/+60
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>
2009-01-09md: raid0: make hash_spacing and preshift sector-based.Andre Noll2-31/+31
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>
2009-01-09md: raid0: Represent the size of strip zones in sectors.Andre Noll2-14/+14
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>
2009-01-09md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's.Andre Noll1-21/+25
This patch consists only of these trivial changes. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0 create_strip_zones(): Make two local variables sector-based.Andre Noll1-14/+13
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>
2009-01-09md: raid0: Represent zone->zone_offset in sectors.Andre Noll2-7/+7
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>
2009-01-09md: raid0: Represent device offset in sectors.Andre Noll2-6/+5
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>
2009-01-09md: raid0_make_request(): Replace local variable block by sector.Andre Noll1-7/+6
This change already simplifies the code a bit. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0_make_request(): Remove local variable chunk_size.Andre Noll1-4/+3
We might as well use chunk_sects instead. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0_make_request(): Replace chunksize_bits by chunksect_bits.Andre Noll1-5/+5
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>
2009-01-09md: use sysfs_notify_dirent to notify changes to md/sync_action.NeilBrown2-7/+14
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>
2009-01-09md: fix bitmap-on-external-file bug.NeilBrown1-3/+5
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
2009-01-08pata_hpt366: reimplement mode programmingTejun Heo1-65/+44
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>
2009-01-08[libata] pata_hpt3x3: correct _freeze() function declarationJeff Garzik1-2/+2
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>