commit 91525300baf162e83e923b09ca286f9205e21522 Merge: 991dee5... 9c5e710... Author: Linus Torvalds Date: Mon Jan 28 08:15:24 2008 +1100 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (54 commits) MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic [Blackfin] arch: remove old I2C BF54x porting. [Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it. [Blackfin] arch: fix bug kernel boot message: memory information is not reasonable [Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver [Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up [Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core. [Blackfin] arch: Add proper SW System Reset delay sequence [Blackfin] arch: Update copyright date [Blackfin] arch: GPIO API cleanup and anomaly update [Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface [Blackfin] arch: Initial checkin of the memory protection support. [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option [Blackfin] arch: Add some comments - fix semicolons [Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/ [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted [Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel [Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on [Blackfin] arch: update to latest anomaly sheets ... commit 991dee591a99d035796a8c194eb1796cc020e142 Author: Kalle Pokki Date: Sun Jan 27 18:14:52 2008 +0100 i2c-bfin-twi: Register adapter with a specific bus number All the users of this driver explicitly specify the I2C bus numbers to be used in their platform data. Make the driver respect that. Signed-off-by: Kalle Pokki Cc: Bryan Wu Signed-off-by: Jean Delvare commit 8b798c4d16b762d15f4055597ff8d87f73b35552 Author: Manuel Lauss Date: Sun Jan 27 18:14:52 2008 +0100 i2c-au1550: Convert to platform driver Convert the i2c-au1550 bus driver to platform driver, and register a platform device for the Alchemy Db/Pb series of boards. Signed-off-by: Manuel Lauss Signed-off-by: Jean Delvare commit 91f27958d686da713c3b0a1dc205288898e44124 Author: Manuel Lauss Date: Sun Jan 27 18:14:52 2008 +0100 i2c-au1550: properly terminate zero-byte transfers Zero-bytes transfers would leave the bus transaction unfinished (no i2c stop is sent), with the following transfer actually sending the slave address to the previously addressed device, resulting in weird device failures (e.g. reset minute register values in my RTC). This patch instructs the controller to send an I2C STOP right after the slave address in case of a zero-byte transfer. Signed-off-by: Manuel Lauss Signed-off-by: Jean Delvare commit 4bd28ebda2d48f16c1f16ff936a6927a4ef2194d Author: Jon Smirl Date: Sun Jan 27 18:14:52 2008 +0100 mpc-i2c: Propagate error values properly Propagate the error values returned by i2c_wait() instead of overriding them with a meaningless -1. Signed-off-by: Jon Smirl Signed-off-by: Jean Delvare commit e9f1373b643887f63878d1169b310c9acc534cd5 Author: David Brownell Date: Sun Jan 27 18:14:52 2008 +0100 i2c: Add i2c_new_dummy() utility This adds a i2c_new_dummy() primitive to help work with devices that consume multiple addresses, which include many I2C eeproms and at least one RTC. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit 0b987dcd3ae5626ac006fbbe366e9a8415b303df Author: Jean Delvare Date: Sun Jan 27 18:14:52 2008 +0100 i2c: Drop legacy locking in i2c_new_probed_device It is no longer required to hold adapter->clist_lock to call i2c_check_addr. Signed-off-by: Jean Delvare Cc: David Brownell commit 9ddced16bb901415ac46058a55bb842a7df8cc68 Author: Jean Delvare Date: Sun Jan 27 18:14:51 2008 +0100 i2c: Limit locking scope in i2c_detach_client We only need to hold adapter->clist_lock when we touch the client list. Signed-off-by: Jean Delvare commit 86ec5ec872566dda74848e09904bb5380cab962e Author: David Brownell Date: Sun Jan 27 18:14:51 2008 +0100 i2c-remove-redundant-i2c_client-list.patch This goes on top of the patch removing most i2c_adapter.clients usage, updating i2c_attach_client: - Don't call device_register() while holding clist_lock. This removes a self-deadlock when on the i2c_driver.probe() path, for drivers that need to attach new devices (e.g. dummies). - Remove a redundant address check. The driver model core does this as a consequence of guaranteeing unique names. - Move the "device registered" diagnostic so that it never lies; previously, on error paths it would falsely report success. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit 961f80f9c0c0f7c45d7818f9c9969dfaa9e4463d Author: Jean Delvare Date: Sun Jan 27 18:14:51 2008 +0100 i2c: Drivers stop using the redundant client list The redundant i2c client list maintained by i2c-core is going away soon, so drivers should stop using it now. Instead, they can use the standard iterator provided by the device driver model (device_for_each_child). Signed-off-by: Jean Delvare Cc: David Brownell Cc: Michael Hunold commit 9b766b814d6a5f31ca1e9da1ebc08164b9352941 Author: David Brownell Date: Sun Jan 27 18:14:51 2008 +0100 i2c: Stop using the redundant client list The i2c_adapter.clients list of i2c_client nodes duplicates driver model state. This patch starts removing that list, letting us remove most existing users of those i2c-core lists. * The core I2C code now iterates over the driver model's list instead of the i2c-internal one in some places where it's safe: - Passing a command/ioctl to each client, a mechanims used almost exclusively by DVB adapters; - Device address checking, in both i2c-core and i2c-dev. * Provide i2c_verify_client() to use with driver model iterators. * Flag the relevant i2c_adapter and i2c_client fields as deprecated, to help prevent new users from appearing. For the moment the list needs to stick around, since some issues show up when deleting devices created by legacy I2C drivers. (They don't follow standard driver model rules. Removing those devices can cause self-deadlocks.) Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit 0d227a7e724460bddcd603a1feb672267bcb0d6c Author: Jean Delvare Date: Sun Jan 27 18:14:51 2008 +0100 i2c-viapro: Add support for the VT8237S Add support for another variant of the VT8237. I couldn't test I2C block support but I assume it is present as well. Signed-off-by: Jean Delvare commit 9b7389c0edb94a2623f21a6ac90afae63f201e73 Author: Jean Delvare Date: Sun Jan 27 18:14:51 2008 +0100 i2c-piix4: Drop redundant PCI function number check Checking the PCI function number doesn't add any value, and it makes adding dynamic IDs to the driver more difficult. Drop this check. Signed-off-by: Jean Delvare commit 0f07a24b4baf14859fde39b29bcc6fe279d18109 Author: Jean Delvare Date: Sun Jan 27 18:14:51 2008 +0100 i2c: Let the user specify PCI driver data through new_id The i2c-amd756 and i2c-viapro drivers make use of the driver_data field of the PCI device ID. When adding device IDs dynamically (by writing to the new_id sysfs file) you cannot set the value of this field by default. It has to be allowed explicitly. Do that, and check the value so that the user can't crash the kernel accidentally. Signed-off-by: Jean Delvare Acked-by: Greg Kroah-Hartman commit b7a3670131c7662415fa799700fc0bdfe90a54b6 Author: Mike Rapoport Date: Sun Jan 27 18:14:50 2008 +0100 i2c-pxa: Add polling transfer Add polling I2C transfer implementation for PXA I2C. This is needed for cases where I2C transactions have to occur at times interrups are disabled. Signed-off-by: Mike Rapoport Acked-by: eric miao Signed-off-by: Jean Delvare commit cea443a81c9c6257bf2d00f1392f7d1d4ce03b75 Author: Mike Rapoport Date: Sun Jan 27 18:14:50 2008 +0100 i2c: Support i2c_transfer in atomic contexts Allow i2c_transfer to be called in contexts where sleeping is not allowed. It is the reponsability of the caller to ensure that the underlying i2c bus driver will not sleep either. Signed-off-by: Mike Rapoport Signed-off-by: Jean Delvare commit 5271071b20dee56c01b6b9d8e275611403d3d383 Author: Jean Delvare Date: Sun Jan 27 18:14:50 2008 +0100 i2c-sibyte: Remove the bus scan module parameter The implementation is unsafe, and anyway one can achieve the same from userspace using i2c-dev + i2cdetect. Also tag i2c_sibyte_add_bus __init. Signed-off-by: Jean Delvare Cc: Ralf Baechle commit 7bca0871ca332ad5373a0fd26886e3cfbafa822c Author: Jean Delvare Date: Sun Jan 27 18:14:50 2008 +0100 i2c: Discard unused driver IDs Discard all I2C driver IDs that aren't used anywhere. That's not just a couple of them, but more like 49 or one quarter of all defined IDs! And this is just a first pass, next will come all IDs that are set but never used, or used but never set. Signed-off-by: Jean Delvare commit 6342064cad7a28d10504128d028bc4ba379d489d Author: Jean Delvare Date: Sun Jan 27 18:14:50 2008 +0100 i2c-i801: Implement I2C block read support I2C block read is supported since the ICH5. I couldn't get it to work using the block buffer, so it's using the old-style byte-by-byte mode for now. Note: I'm also updating the driver author... The i2c-i801 driver was really written by Mark Studebaker, even though he based his work on the i2c-piix4 driver which was written by Philip Edelbrock. Signed-off-by: Jean Delvare commit a0921b6c07dfbb59ac2d497e96438adaf4940f16 Author: Jean Delvare Date: Sun Jan 27 18:14:50 2008 +0100 i2c-i801: Clear special mode bits as needed Clear special mode bits (PEC, block buffer) at driver load time, you never know in which state the device was left by its last user. Also make sure that we reset the block buffer mode at the end of every transaction, not only when PEC was used. Signed-off-by: Jean Delvare commit 369f6f4aec5315012ff5d951e0179f860c35c181 Author: Jean Delvare Date: Sun Jan 27 18:14:50 2008 +0100 i2c-i801: More explicit names for chip features Use separate flags with explicit names to describe the features of the ICH chip. Signed-off-by: Jean Delvare commit ae7b0497b8280ad5ecfe7bd045c5106f35950c8a Author: Jean Delvare Date: Sun Jan 27 18:14:49 2008 +0100 i2c-i801: Document which chip support what feature Provide a clearer documentation of which additional features each ICH chip support, and which of these the driver supports. Signed-off-by: Jean Delvare commit 6d16bfb5e81d3925a7efb38b5cc3e0021b57d03a Author: David Brownell Date: Sun Jan 27 18:14:49 2008 +0100 i2c/tps65010: move header to Move the tps65010 header file from the OMAP arch directory to the more generic directory, and remove the spurious dependency of this driver on OMAP. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit caada32afe0d181b1dc36ab3fc29628582776e09 Author: Jean Delvare Date: Sun Jan 27 18:14:49 2008 +0100 i2c: Rename main mutex Rename the main mutex in i2c-core from core_lists to core_lock. This makes more sense now that the redundant lists are gone. Signed-off-by: Jean Delvare commit 026526f5afcd421dce110f53e4c4e2b9e78753c2 Author: Jean Delvare Date: Sun Jan 27 18:14:49 2008 +0100 i2c: Drop redundant i2c_driver.list i2c_driver.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare Acked-by: David Brownell commit 87c6c22945e5d68eb96dd1e5cb26185253cd5b9d Author: Jean Delvare Date: Sun Jan 27 18:14:48 2008 +0100 i2c: Drop redundant i2c_adapter.list i2c_adapter.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare Acked-by: David Brownell commit e48d33193d94175f012c3ed606a1d1e574ed726a Author: Jean Delvare Date: Sun Jan 27 18:14:48 2008 +0100 i2c: Change prototypes of refcounting functions Use more standard prototypes for i2c_use_client() and i2c_release_client(). The former now returns a pointer to the client, and the latter no longer returns anything. This matches what all other subsystems do. Signed-off-by: Jean Delvare Cc: David Brownell commit bdc511f438f6ca40307e06edda00331e6ac0f813 Author: Jean Delvare Date: Sun Jan 27 18:14:48 2008 +0100 i2c: Use the driver model reference counting Don't implement our own reference counting mechanism for i2c clients when the driver model already has one. Signed-off-by: Jean Delvare Cc: David Brownell commit 0f79b72e45da68bf542a63a08f9c924b91b507e7 Author: Jean Delvare Date: Sun Jan 27 18:14:47 2008 +0100 i2c: Deprecate drivers for I2C buses on video adapters The framebuffer drivers for these pieces of hardware include support for the DDC/I2C buses, so there is no need for separate drivers. Signed-off-by: Jean Delvare commit 2caeac810423556a5ee787d5cb7aa902fda13bb4 Author: Jean Delvare Date: Sun Jan 27 18:14:47 2008 +0100 i2c: Don't uselessly set i2c_adapter.retries I2C adapter drivers are supposed to handle retries on nack by themselves if they do, so there's no point in setting .retries if they don't. As this retry mechanism is going away (at least in its current form), clean this up now so that we don't get build failures later. Signed-off-by: Jean Delvare commit 05c7abaeb344975a3257366a52368a4866aa518d Author: Jean Delvare Date: Sun Jan 27 18:14:47 2008 +0100 i2c: Kill rogue driver IDs I2C driver IDs are optional, so if you don't need one, just omit it. Signed-off-by: Jean Delvare commit 2cdddeb8d7dd42dc1847b110228a626d25a1e468 Author: Jean Delvare Date: Sun Jan 27 18:14:47 2008 +0100 i2c: normal_i2c can be made const (remaining drivers) Signed-off-by: Jean Delvare commit 922539a0a3c44e3b8dcf1025910f08e1940ba49f Author: Jean Delvare Date: Sun Jan 27 18:14:47 2008 +0100 i2c: normal_i2c can be made const (rtc drivers) Signed-off-by: Jean Delvare Acked-by: Alessandro Zummo commit bfb6df24facfde7ec6191edbba798777efb3c375 Author: Mark M. Hoffman Date: Sun Jan 27 18:14:46 2008 +0100 i2c: Constify client address data This patch allows much of the I2C client address data to move from initdata into text. Signed-off-by: Mark M. Hoffman Signed-off-by: Jean Delvare commit 6408a8338c63e2beb50e8128814cbc1170390d3a Author: Jean Delvare Date: Sun Jan 27 18:14:46 2008 +0100 i2c-algo-pcf: Delete broken 10-bit address support The 10-bit address support in i2c-algo-pcf is so heavily broken that it can't have ever been used. Nobody ever complained, so I'll take it that nobody needs it. Let's just delete it. Signed-off-by: Jean Delvare commit bf3e2d1d9b860591f3f204aa66d6a3c30058818d Author: David Brownell Date: Sun Jan 27 18:14:46 2008 +0100 i2c-algo-bit: Fix NAK/ARB comments Update comments and logging on return path for byte writes. NAK is an error, to be reported or optionally ignored. Timeouts are always errors. Lost arbitration is not currently handled, so don't even list it as an option in the error message. Don't return bogus EFAULT code for inappropriate NAK; EIO is better, there is no bad userspace address in question. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit cf978ab2846d86709802f38c80d1d53da364bf51 Author: David Brownell Date: Sun Jan 27 18:14:46 2008 +0100 i2c-algo-bit: Whitespace fixes (+ NAK/ARB comments) Fix *LOTS* of whitespace goofs and checkpatch.pl warnings, strangely parenthesized ternary expressions, and other CodingStyle glitches. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit 59d70df025473931c500d6d60510798e4bfa3279 Author: eric miao Date: Sun Jan 27 18:14:46 2008 +0100 i2c-pxa: Remove hardcoded #ifdef and use cpu_is_pxa27x remove #ifdef CONFIG_PXA27x .. #endif and use cpu_is_pxaXXXX() macros so that a single binary can support PXA25x/PXA27x/PXA3xx at run-time. Signed-off-by: eric miao Signed-off-by: Jean Delvare commit 7e8b99251be8b6f992baa88e3a6ba3c4ae01660b Author: Adrian Bunk Date: Sun Jan 27 18:14:46 2008 +0100 i2c: some overdue driver removal This patch contains the overdue removal of three I2C drivers. [JD: In fact only i2c-ixp4xx can be removed at the moment, the other two platforms don't implement the generic GPIO layer yet.] Signed-off-by: Adrian Bunk Signed-off-by: Jean Delvare commit 5a4a2387717ec57ec2a9154beb281e09c19fc26e Author: Michael-Luke Jones Date: Sun Jan 27 18:14:46 2008 +0100 ixp4xx-i2c-gpio Migrate all ixp4xx devices to the bitbanging I2C bus driver utilizing the arch-neutral GPIO API (linux/i2c-gpio.h). Tested by the nslu2-linux and openwrt projects in public firmware releases. Signed-off-by: Michael-Luke Jones Acked-by: Rod Whitby Signed-off-by: Jean Delvare commit eee87d3196c9a7ac3422f4298e2250ca68d791c1 Author: Adrian Bunk Date: Sun Jan 27 18:14:45 2008 +0100 i2c: the scheduled I2C RTC driver removal This patch contains the scheduled removal of legacy I2C RTC drivers with replacement drivers. Signed-off-by: Adrian Bunk Signed-off-by: Jean Delvare commit 569be443e3c1329fc6725988004f5d8a32fe3be5 Author: Jean Delvare Date: Sun Jan 27 18:14:45 2008 +0100 i2c-stub: Use a single array for byte and word operations This mimics the behavior of actual SMBus chips better. Signed-off-by: Jean Delvare Cc: Mark M. Hoffman commit b3af547e197fa3ca648d148dd8d36befe989e5a0 Author: Jean Delvare Date: Sun Jan 27 18:14:45 2008 +0100 i2c-stub: Mention the existence of an helper script There's a new script named i2c-stub-from-dump that can be very helpful when working with the i2c-stub driver. Signed-off-by: Jean Delvare commit 1b3e5baa8850947b2cc15f323783ddb04dc4bffa Author: Rodolfo Giometti Date: Sun Jan 27 18:14:45 2008 +0100 i2c/tsl2550: Add power management added Signed-off-by: Rodolfo Giometti Signed-off-by: Jean Delvare commit 5864ae03ca982fb60bedeebfd67562db37c1ee6a Author: Bart Van Assche Date: Sun Jan 27 18:14:45 2008 +0100 i2c: Add support for the PCF8575 chip Signed-off-by: Bart Van Assche Signed-off-by: Jean Delvare commit 217bcec4425cdc8fb90ce688eb4d5b5140713046 Author: Stefan Roese Date: Sun Jan 27 18:14:45 2008 +0100 i2c-ibm_iic: Whitespace cleanup Signed-off-by: Stefan Roese Signed-off-by: Jean Delvare commit ccf60d8571f0e606b5dacf213696b7a57fe2d890 Author: Olof Johansson Date: Sun Jan 27 18:14:44 2008 +0100 i2c-pasemi: use i2c_add_numbered_adapter() Use numbered adapter registration to always have the same hardware bus show up at the same number. PWRficient 1682M has three buses, they are all on the same PCI device but different functions. So do the simple thing and register them based on function number. Future products, if having a different number of busses, are expected to have similar behaviour w.r.t. device/function layout. Signed-off-by: Olof Johansson Signed-off-by: Jean Delvare commit 541b6a7a69fadda82f313bd2176e7756db2b5b43 Author: Jean Delvare Date: Sun Jan 27 18:14:44 2008 +0100 i2c-nforce2: The nForce2 can do block transactions My guess is that all the chips supported by this driver support block transactions and reset, but for now we play it safe and only list the ones for which this was actually tested. Signed-off-by: Jean Delvare Cc: Oleg Ryjkov commit 326e96b92306b7af24a3608ec01156cba17a3fc1 Author: Ingo Molnar Date: Sun Jan 27 08:03:54 2008 +0100 printk: revert ktime_get() timestamps revert 19ef9309273d26cb005cb23e6a370353dca91099. Kevin Winchester reported a lockup during X startup an bisected it to this commit. Reported-by: Kevin Winchester Signed-off-by: Ingo Molnar commit ef3f2de2b5496f721b12f21a157e19eac816394b Merge: 1c7c2cd... 366781c... Author: Linus Torvalds Date: Sat Jan 26 23:01:20 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] DFS build fixes [CIFS] DFS support: provide shrinkable mounts [CIFS] Do not log path names in lookup errors [CIFS] DFS support patchset: Added mountdata [CIFS] Forgot to add two new files from previous commit [CIFS] DNS name resolution helper upcall for cifs [CIFS] fix checkpatch warnings in fs/cifs/inode.c [CIFS] hold ses sem on tcp session reconnect during mount [CIFS] Allow setting mode via cifs acl [CIFS] fix unicode string alignment in SPNEGO setup [CIFS] cifs_partialpagewrite() cleanup [CIFS] use krb5 session key from first SMB session after a NegProt [CIFS] redo existing session setup if needed in cifs_mount [CIFS] Only dump SPNEGO key if CONFIG_CIFS_DEBUG2 is set [CIFS] fix SetEA failure to some Samba versions commit 1c7c2cdec3a6b2873439096983794a550d7ff65b Merge: 0444fa7... 7267c33... Author: Linus Torvalds Date: Sat Jan 26 22:54:32 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (63 commits) ide: remove REQ_TYPE_ATA_CMD ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests ide: fix final status check in drive_cmd_intr() ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr() ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2) ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE ide: initialize rq->cmd_type in ide_init_drive_cmd() callers ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2) ide: kill DATA_READY define ide: task_end_request() fix ide: use rq->nr_sectors in task_end_request() ide: remove needless ->cursg clearing from task_end_request() ide: set IDE_TFLAG_IN_* flags before queuing/executing command ide-tape: fix handling of non-special requests in ->end_request method ide: fix final status check in task_in_intr() ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd() ide: fix ->io_32bit race in ide_taskfile_ioctl() cmd64x: remove /proc/ide/cmd64x ide: remove broken disk byte-swapping support ... commit 0444fa78751260b38f0db3418e001bf86593f05f Merge: 69e4d4c... 9d40d2e... Author: Linus Torvalds Date: Sat Jan 26 22:52:53 2008 -0800 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (56 commits) [S390] replace lock_cpu_hotplug with get_online_cpus [S390] usage of s390dbf: shrink number of debug areas to use. [S390] constify function pointer tables. [S390] do local_irq_restore while spinning in spin_lock_irqsave. [S390] add smp_call_function_mask [S390] dasd: fix loop in request expiration handling [S390] Unused field / extern declaration in processor.h [S390] Remove TOPDIR from Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 [S390] single-step cleanup [S390] Move NOTES and BUG_TABLE. [S390] drivers/s390/: Spelling fixes [S390] include/asm-s390/: Spelling fixes [S390] arch/s390/: Spelling fixes [S390] Use diag308 subcodes 3 and 6 for reboot and dump when possible. [S390] vmemmap: allocate struct pages before 1:1 mapping [S390] Initialize sclp_ipl_info [S390] Allocate and free cpu lowcores and stacks when needed/possible. [S390] use LIST_HEAD instead of LIST_HEAD_INIT [S390] Load disabled wait psw instead of stopping cpu on halt. ... commit 69e4d4c3e1cb23fce81deeae08b502d27bad6993 Merge: 9b73e76... b1aa530... Author: Linus Torvalds Date: Sat Jan 26 22:43:56 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6: selinux: fix labeling of /proc/net inodes commit 7267c3377443322588cddaf457cf106839a60463 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:13 2008 +0100 ide: remove REQ_TYPE_ATA_CMD Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 5a9e77af970f14a94482a6d4dca5c48efb70deb2 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:13 2008 +0100 ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 34f5d5ae35240a11846875d76eb935875ab0c366 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:12 2008 +0100 ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests Based on the earlier work by Tejun Heo. Switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests and make ide_wait_cmd() static. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 0455fcc821e87d362f2047922c59c0f378a122b5 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:12 2008 +0100 ide: fix final status check in drive_cmd_intr() Don't check for READY_STAT bit being set for PIO-in protocol (makes the final status check in drive_cmd_intr() match the one in task_in_intr()). Also fix function name reported by ide_error() call while at it. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4d977e43d8ae758434e603cf2455d955f71c77c4 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:12 2008 +0100 ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 18a056feccabdfa9764016a615121b194828bc72 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:12 2008 +0100 ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2) Don't enable local IRQs for PIO-in protocol in driver_cmd_intr(). While at it: * Remove redundant rq->cmd_type check. * Read status register after enabling local IRQs for no-data protocol. v2: * Re-add DRQ=1 check lost in v1 (noticed by Sergei). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 852738f39258deafb3d89c187cb1a4050820d555 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:12 2008 +0100 ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE Based on the previous work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 145b75e9aedbe36c55e45da8564dcd0814bdd89e Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:11 2008 +0100 ide: initialize rq->cmd_type in ide_init_drive_cmd() callers * Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and set_pio_mode() (other callers were aleady over-riding rq->cmd_type). * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 2624565caacedd740fce7803fe2c162842aa5df4 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:11 2008 +0100 ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2) Use wait_drive_not_busy() in drive_cmd_intr(). v2: * Fix wait_drive_not_busy() comment (noticed by Sergei). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4906f3b4cddc3e4d62955ed386598561f95602c0 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:11 2008 +0100 ide: kill DATA_READY define Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4d7a984bdcbdda69fc6b2a4a655415140270aa7b Author: Tejun Heo Date: Sat Jan 26 20:13:11 2008 +0100 ide: task_end_request() fix task_end_request() modified to always call ide_end_drive_cmd() for taskfile requests. Previously, ide_end_drive_cmd() was called only when IDE_TFLAG_FLAGGED was set. Also, ide_dma_intr() is modified to use task_end_request(). Enables TASKFILE ioctls to get valid register outputs on successful completion. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 79f21b84d94c02b941818df282b61f2a5a028722 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:11 2008 +0100 ide: use rq->nr_sectors in task_end_request() Signed-off-by: Bartlomiej Zolnierkiewicz commit 03c3c70ee541c91250e2bff57211d403cb0b7055 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:11 2008 +0100 ide: remove needless ->cursg clearing from task_end_request() Signed-off-by: Bartlomiej Zolnierkiewicz commit 657cc1a8f6cd6a9e2974cba3af9fccd8c25e06ad Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:10 2008 +0100 ide: set IDE_TFLAG_IN_* flags before queuing/executing command * Add IDE_TFLAG_{HOB,TF,DEVICE} defines. * Set IDE_TFLAG_IN_* flags in {do_rw,ide_no_data,ide_raw}_taskfile() users. * Remove no longer needed ->tf_flags setup from ide_end_drive_cmd(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 3687221f28058c40e2c57a286decd0caeac67382 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:10 2008 +0100 ide-tape: fix handling of non-special requests in ->end_request method Signed-off-by: Bartlomiej Zolnierkiewicz commit 73d7de0c818639cf74a32ce3b13a33021414749c Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:10 2008 +0100 ide: fix final status check in task_in_intr() Check for DRQ bit being cleared on the final status check. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 49c746ee6cc791202172483277a249c12ba437d8 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:10 2008 +0100 ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd() ide_dump_status() may set HOB bit before ide_end_drive_cmd() is called. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 35cf2b94d0ecb7034cfa05dd725721538bbb83fc Author: Tejun Heo Date: Sat Jan 26 20:13:10 2008 +0100 ide: fix ->io_32bit race in ide_taskfile_ioctl() In ide_taskfile_ioctl(), there was a race condition involving drive->io_32bit. It was cleared and restored during ioctl requests but there was no synchronization with other requests. So, other requests could execute with the altered ->io_32bit setting or updated drive->io_32bit could be overwritten by ide_taskfile_ioctl(). This patch adds IDE_TFLAG_IO_16BIT flag to indicate to ide_pio_datablock() that 16-bit I/O is needed regardless of drive->io_32bit settting. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 63c4467805c9b23231d8bc9b61305b2013f9fea2 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 cmd64x: remove /proc/ide/cmd64x This belongs to user-space (and only if really needed). text data bss dec hex filename 3874 180 28 4082 ff2 drivers/ide/pci/cmd64x.o.before 2231 180 0 2411 96b drivers/ide/pci/cmd64x.o.after Additionaly to being bloat the code reported incorrect UDMA modes for the reserved values of UDIDETCR0/1 registers. Also while at it remove unused CNTRL_DIS_RA0/1 defines. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 9e47be0c97f7357b80e91dc0632e9cce2eb025e0 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 ide: remove broken disk byte-swapping support Remove broken disk byte-swapping support: - it can cause a data corruption on SMP (or if using PREEMPT on UP) - all data coming from disk are byte-swapped by taskfile_*_data() which results in incorrect identify data being reported by /proc/ide/ and IOCTLs - "hdx=bswap/byteswap" kernel parameter has been broken on m68k host drivers (including Atari/Q40 ones) since 2.5.x days (because of 'hwif' zero-ing) - byte-swapping is limited to PIO transfers (for working with TiVo disks on x86 machines using user-space solutions or dm-byteswap should result in much better performance because DMA can be used) For previous discussions please see: http://www.ussg.iu.edu/hypermail/linux/kernel/0201.0/0768.html http://lkml.org/lkml/2004/2/28/111 [ I have dm-byteswap device mapper target if somebody is interested (patch is for 2.6.4 though but I'll dust it off if needed). ] Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 3a5015cc9d7051ce8e706ef48276d8484aac0c4b Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 ide: add ide_busy_sleep() helper Add ide_busy_sleep() helper and use it in do_probe(), enable_nest() and probe_hwif(). As a nice side-effect this fixes a minor bug in do_probe() (the code was reading status register without any delay). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ce71ed9ba8b558d54c213d372a6cf8b302fa1fa4 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 ide: make CONFIG_IDEPCI_PCIBUS_ORDER visible and deprecate it Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 9ac59226ca95889ad620b0e63c0f700679fee5dd Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 ide: move CONFIG_IDEPCI_PCIBUS_ORDER code to ide-scan-pci.c Signed-off-by: Bartlomiej Zolnierkiewicz commit c99c92c58757985096e2d195dc1631246d99d686 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:09 2008 +0100 ide: print banner message once per controller in m68k host drivers * Print banner message once per controller in m68k host drivers. * Change printk() level to KERN_INFO in buddha, falconide and gayle. * Add banner message to q40ide. This is basically a preparation for the future IDE layer changes. Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Bartlomiej Zolnierkiewicz commit 81ca691981da718727281238b435dcf1528d2fda Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 ide: add ide_set_irq() inline helper There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 4f52a32994f9e05fb8ae1a9ba3f20cd0b55145b7 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled Move setting hwif->sg_max_nents from pmac_ide_setup_device() to pmac_ide_setup_dma(). Acked-by: Benjamin Herrenschmidt Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ce635f605e52a0d47aea5313ba406ada20e6028a Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 rapide: remove write-only hwif->hwif_data Cc: Russell King Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 79127c37aa5d959c9ace40a869386f712b55ac6d Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 ide: use ide_init_port_hw() in setup-pci.c * Move setting hwif->gendev.parent from ide_pci_setup_ports() to ide_hwif_configure(). * Always set hwif->io_ports in ide_hwif_configure(). * Use ide_init_port_hw() in ide_hwif_configure(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 6828fc9a919b06723599192300053ddf6f638c95 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 ide: always use ide_std_init_ports() in setup-pci.c * ide_init_hwif_ports() call in setup-pci.c::ide_hwif_configure() doesn't depend on the default cotrol register offset, default IRQ or ppc_ide_md.ide_init_hwif implementations so ide_std_init_ports() can always be used. * Since 'base' is always non-zero and thus hwif->io_ports[IDE_DATA_OFFSET] is also non-zero always clear hwif->noprobe. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit aa79a2faa01ded0a6a4929dd37c059bef4890838 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:08 2008 +0100 au1xxx-ide: use ide_init_port_hw() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit a42bcc0f2fc380fac81a7ac525a70bbef44bb042 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:07 2008 +0100 au1xxx-ide: au_ide_probe() fixes * hwif->hold is always set in au_ide_probe() (few lines earlier), no need to set it again * hwif->{channel,select_data,config_data} should be always zero * autotune PIO also if CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA is defined Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ade2daf9c6e57845fe83a24e0a9fa1c03c6e91b1 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:07 2008 +0100 ide: make remaining built-in only IDE host drivers modular (take 2) * Make remaining built-in only IDE host drivers modular, add ide-scan-pci.c file for probing PCI host drivers registered with IDE core (special case for built-in IDE and CONFIG_IDEPCI_PCIBUS_ORDER=y) and then take care of the ordering in which all IDE host drivers are probed when IDE is built-in during link time. * Move probing of gayle, falconide, macide, q40ide and buddha (m68k arch specific) host drivers, before PCI ones (no PCI on m68k), ide-cris (cris arch specific), cmd640 (x86 arch specific) and pmac (ppc arch specific). * Move probing of ide-cris (cris arch specific) host driver before cmd640 (x86 arch specific). * Move probing of mpc8xx (ppc specific) host driver before ide-pnp (depends on ISA and none of ppc platform that use mpc8xx supports ISA) and ide-h8300 (h8300 arch specific). * Add "probe_vlb" kernel parameter to cmd640 host driver and update Documentation/ide.txt accordingly. * Make IDE_ARM config option visible so it can also be disabled if needed. * Remove bogus comment from ide.c while at it. v2: * Fix two issues spotted by Sergei: - replace ENOMEM error value by ENOENT in ide-h8300 host driver - fix MODULE_PARM_DESC() in cmd640 host driver Cc: Sergei Shtylyov Cc: Mikael Starvik Cc: Geert Uytterhoeven Cc: Roman Zippel Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz commit 8ac4ce742c66100931b6f2d7a36b0df08bc721fe Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:06 2008 +0100 ide: fix host drivers depending on ide_generic to probe for interfaces (take 2) * Add mpc8xx_ide_probe() to mpc8xx.c and call it from probe_for_hwifs(). * Convert ide_arm, ide-cris, ide-h8300, ide-pnp, buddha, falconide, gayle, macide, q40ide, cmd640 and mpc8xx host drivers to use ide_device_add(). This removes dependency on ide_generic for these drivers so update ide/Kconfig accordingly. v2: * ide_arm build fix (s/ide_device_idx/ide_device_add/) (Thanks to Christoph Lameter for reporting the problem). Cc: Mikael Starvik Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Bartlomiej Zolnierkiewicz commit ac87e41116c229fc1efaac0d17fdbfb2185e4629 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:06 2008 +0100 cmd640: fix dependency on IDE_GENERIC Make BLK_DEV_CMD640 select IDE_GENERIC. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 944000921d41c5aacfda6515ad3a0bbde52f8fa3 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:06 2008 +0100 ide: move ide_arm_init() call from init_ide_data() to ide_init() * Remove ide_init_port_data() call from ide_arm_init() and move ide_arm_init() call from init_ide_data() to ide_init(). This patch is a preparation for the future changes (and as a side-effect makes obsolete "idex=io[,ctl[,irq]]" kernel parameters work for ide_arm). Signed-off-by: Bartlomiej Zolnierkiewicz commit cbb010c180294a5242a7681555c28737d9dd26ab Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:06 2008 +0100 ide: drop 'initializing' argument from ide_register_hw() * Rename init_hwif_data() to ide_init_port_data() and export it. * For all users of ide_register_hw() with 'initializing' argument set hwif->present and hwif->hold are always zero so convert these host drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw() instead (also no need for init_hwif_default() call since the setup done by it gets over-ridden by ide_init_port_hw() call). * Drop 'initializing' argument from ide_register_hw(). Cc: Geert Uytterhoeven Cc: Roman Zippel Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 57c802e84f9c759c3d1794a9dbe81bc10444df62 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:05 2008 +0100 ide: add ide_init_port_hw() helper * Add ide_init_port_hw() helper. * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports() and use ide_init_port_hw(). * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports() and use ide_init_port_hw(). * sgiioc4.c: use ide_init_port_hw(). * pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(), setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw() in pmac_ide_setup_device(). This patch is a preparation for the future changes in the IDE probing code. There should be no functionality changes caused by this patch. Cc: Russell King Cc: Anton Vorontsov Cc: Jeremy Higdon Cc: Benjamin Herrenschmidt Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8f8e8483f667d79739007b25f0e59a540fb9fa51 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:05 2008 +0100 sgiioc4: always init hwif->io_ports 'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true. Cc: Jeremy Higdon Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit b0d5bc27ce995adaafbc114b92fa76815025c94e Author: Olof Johansson Date: Sat Jan 26 20:13:05 2008 +0100 ide: Fix build break caused by "ide: remove ideprobe_init()" Fix build break of powerpc holly_defconfig: In file included from arch/powerpc/platforms/embedded6xx/holly.c:24: include/linux/ide.h:1206: error: 'CONFIG_IDE_MAX_HWIFS' undeclared here (not in a function) There's no need to have a sized array in the prototype, might as well turn it into a pointer. It could probably be argued that large parts of the include file can be covered under #ifdef CONFIG_IDE, but that's a larger undertaking. Signed-off-by: Olof Johansson Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz commit 151575e4644f917d3a9f83c777ac3543284954f8 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:05 2008 +0100 ide: remove ideprobe_init() * Rename ide_device_add() to ide_device_add_all() and make it accept 'u8 idx[MAX_HWIFS]' instead of 'u8 idx[4]' as an argument. * Add ide_device_add() wrapper for ide_device_add_all(). * Convert ide_generic_init() to use ide_device_add_all(). * Remove no longer needed ideprobe_init(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 71518342bfdfbe508ee325ab5e20984ba2da7de2 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:04 2008 +0100 ide: add hwif->chipset fixup to ide_device_add() Add hwif->chipset fixup identical to the one in ideprobe_init() to ide_device_add(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit aae73b4ed721912dbd4909ae5f618080c64594de Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:04 2008 +0100 swarm: set hwif->chipset hwif->chipset should be set if the hwif is claimed by host driver. Cc: Maciej W. Rozycki Signed-off-by: Bartlomiej Zolnierkiewicz commit 23d8e72c3a813f2121878120bc49de2cd390119b Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:04 2008 +0100 rapide: set hwif->chipset hwif->chipset should be set if the hwif is claimed by host driver. Cc: Russell King Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 2e13093a834ddbbf92701d477e69c9018959a82c Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:04 2008 +0100 ide: fix probing for hosts with serialized or IRQ sharing interfaces After hwif_register_devices() IDE devices are ready to be used so the way in which ide_device_add() works currently is racy for hosts with serialized / IRQ sharing interfaces. Fix ide_device_add() by looping over interfaces for probe_hwif(), hwif_init() and hwif_register_devices() operations. Signed-off-by: Bartlomiej Zolnierkiewicz commit ba6560aa45fc498125b07130784ec5ca8a6922a6 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:04 2008 +0100 ide: kill probe_hwif_init() There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 795d74b51a853e1f5f2c81baf6666836a3866f08 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:03 2008 +0100 ide: don't try to unregister interfaces if 'initializing' in ide_register_hw() Host drivers using ide_register_hw() and 'initializing == 1': * ide-pnp - depends on ISA * ide_arm - ARM arch specific - initialized before all other host drivers * ide-cris - CRIS arch specific => IDE_ARCH_OBSOLETE_INIT is not defined - broken * ide-h8300 - H8300 arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI * buddha/q40/gayle/macide/falconide - M68K arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI Since the only host drivers which probe interfaces before the above ones are: * ali14xx/dtc2278/ht6560b/qd65xx/umc8672 - depend on ISA - require IDE_ARCH_OBSOLETE_INIT=y to work * PCI ones - depend on PCI don't try to unregister interfaces if 'initializing == 1' in ide_register_hw() (it is possible that built-in host drivers will claim all IDE interfaces but later ide-pnp host driver will try to unregister them - this change fixes it). Also skip hwif->hold check if 'initializing == 1' since it is set only by: * pmac - PPC && PMAC specific => no ISA * au1xxx-ide - MIPS && SOC_AU1200 specific => no ISA and use ide_find_port() helper to find free ide_hwifs[] slot. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f01393e48c44e30f7c9a36c8b98a07b0232580fe Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:03 2008 +0100 ide: merge ->fixup and ->quirkproc methods * Assign drive->quirk_list in ->quirkproc implementations: - hpt366.c::hpt3xx_quirkproc() - pdc202xx_new.c::pdcnew_quirkproc() - pdc202xx_old.c::pdc202xx_quirkproc() * Make ->quirkproc void. * Move calling ->quirkproc from do_identify() to probe_hwif(). * Convert it821x_fixups() to it821x_quirkproc() in it821x.c. * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove no longer needed drive->present check from is_dev_seagate_sata(). * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif' as an argument. Then convert ide_register_hw() to accept 'quirkproc' argument instead of 'fixup' one. * Remove no longer needed ->fixup method. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 6dd9b8376adbee95ddc321cc83c7f641577e01f6 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:03 2008 +0100 ide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined) * Dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined). * Remove no longer needed DEBUG code from __ide_do_rw_disk(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 15ce926ada545cb078711bd9a18c083c93fa01d7 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:03 2008 +0100 ide: merge ->dma_host_{on,off} methods into ->dma_host_set method Merge ->dma_host_{on,off} methods into ->dma_host_set method which takes 'int on' argument. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f37aaf9edeba3f4ae10d22aefc09c06af9ea39b6 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:02 2008 +0100 ide: move drive->using_dma check to callers of ->dma_host_on method Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8ae60e34dd737ed3bef64b08130478393d9c4e8a Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:02 2008 +0100 atiixp: remove ->dma_host_on and ->dma_host_off methods * Enable/disable UDMA in atiixp_set_dma_mode(). * Remove no longer needed atiixp_dma_host_{on,off}() and save_mdma_mode[]. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz commit 07a085ebd35ba0d4e2d88b9044563661dbca2471 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:01 2008 +0100 ide-cris: fix DMA methods * Rename cris_dma_{on,off}() to cris_dma_host_{on,off}(). * Remove no longer needed ->dma_off_quietly (IDE core has the needed code now). * Make cris_dma_host_on() void. I left fixing ide-cris after "kill dma_on/dma_off_quietly() methods" patch because: * Currently this driver is broken: cris_dma_on() (returns 'int') is assigned to hwif->dma_host_on (returns 'void') so the driver won't build. * ->ide_dma_on method was missing so the driver OOPS-es on attempt to enable DMA. * drive->using_dma was never set/cleared so DMA wouldn't be used anyway. Unfortunately it seems that ide-cris stays broken even after this patch: * V10: needs fixing - ide_init_default_hwifs() should be removed (IDE core no longer uses it) - same for ide_init_hwif_ports() and ide_default_{irq,io_base}() (they shouldn't be needed for ide-cris host driver) * V32: I'm unable to find a place which defines ETRAX_ARCH_V32 but I'm leaving fixing this to CRIS gurus. :) Cc: Mikael Starvik Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4a546e046d562bcd389149591fa5a534c8f832ca Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:01 2008 +0100 ide: remove ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t * Make ide_dma_off_quietly() and __ide_dma_on() always available. * Drop "__" prefix from __ide_dma_on(). * Check for presence of ->dma_host_on instead of ->ide_dma_on. * Convert all users of ->ide_dma_on and ->dma_off_quietly methods to use ide_dma_on() and ide_dma_off_quietly() instead. * Remove no longer needed ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t. * Make ide_dma_on() void. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 378f577f7f75aa18a0eeafb044a491dcd5aeaa3d Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:01 2008 +0100 au1xxx-ide: add ide_toggle_bounce() calls Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Since there is no PCI device there should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit c58096941284ceaea504b2f8c4d146f0f7c86b49 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:00 2008 +0100 icside: add ide_toggle_bounce() calls Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Since there is no PCI device there should be no functionality changes caused by this patch. Cc: Russell King Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit e5efba33289574a08674f7613eb0513bcb44d085 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:00 2008 +0100 sgiioc4: add ide_toggle_bounce() calls Add ide_toggle_bounce() call to ->ide_dma_on/->dma_off_quietly methods so they match generic __ide_dma_on()/ide_dma_off_quietly(). Tested on Altix by Jeremy. Acked-by: Jeremy Higdon Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8704de8f296fcf6a4b2ff6bfd9a63974ad909b3e Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:00 2008 +0100 cy82c693: add ->set_dma_mode method * Fix SWDMA/MWDMA masks in cy82c693_chipset. * Add IDE_HFLAG_CY82C693 host flag and use it in ide_tune_dma() to check whether the DMA should be enabled even if ide_max_dma_mode() fails. * Convert cy82c693_dma_enable() to become cy82c693_set_dma_mode() and remove no longer needed cy82c693_ide_dma_on(). Then set IDE_HFLAG_CY82C693 instead of IDE_HFLAG_TRUST_BIOS_FOR_DMA in cy82c693_chipset. * Bump driver version. As a result of this patch cy82c693 driver will configure and use DMA on all SWDMA0-2 and MWDMA0-2 capable ATA devices instead of relying on BIOS. Signed-off-by: Bartlomiej Zolnierkiewicz commit a530201afed5074dac69b29c519a1df59da97945 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:13:00 2008 +0100 cy82c693: correct DMA modes clipping * Mask device DMA masks by ATA_{S,M}WDMA2 in cy82c693_ide_dma_on(). * Remove clipping of DMA modes by id->tDMA in cy82c693_dma_enable(): - id->tDMA may not be defined on newer devices - id->vendor6/id->tDMA word is in LE endianness (cy82c693 seems to be Alpha specific though) * Bump driver version. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit aea5d375600f132537adf45942c0fbdcd25eb995 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:12:59 2008 +0100 ide: (hopefully) fix VDMA for CS5520 * Set the correct hwif->dma_base for the second channel in ide_get_or_set_dma_base(). * Remove DMA enable code from cs5520_set_pio_mode(), this can be handled by the generic ->dma_host_on method now. * Add VDMA check to ide_config_drive_speed(). * drive->using_dma was never enabled since cs5520 host driver's ->ide_dma_on method overrided the generic ->ide_dma_on (so __ide_dma_on() was never called, drive->using_dma was never set and VDMA was never used since it depends on drive->using_dma). Fix it by using ->dma_host_on method instead of ->ide_dma_on (also add matching ->dma_host_off method). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 29ec683f019608ca0cb6cf69011426ecb5daa69e Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:12:59 2008 +0100 ide-disk: add idedisk_set_doorlock() helper There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7b971df185807ceb358471e16ce8754ccfcc7de9 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:12:59 2008 +0100 serverworks: cleanup ->set_dma_mode method IDE core guarantees that ->set_dma_mode will be called only for DMA modes set in SWDMA/MWDMA/UDMA masks. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 08590556d65b2611c5821bc532ca30db776e6044 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:12:59 2008 +0100 sl82c105: remove no longer needed ->selectproc method * Program register 0x40 in sl82c105_resetproc(). * Remove no longer needed sl82c105_selectproc() and pci_set_drvdata() calls. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 6ae8b1efcc83103f2e323c9486f56a8671ca1880 Author: Bartlomiej Zolnierkiewicz Date: Sat Jan 26 20:12:58 2008 +0100 sl82c105: program DMA/PIO timings in ->dma_start/->ide_dma_end * Program DMA timings in sl82c105_dma_start() (->dma_start method) before starting DMA transfer. * Add sl82c105_dma_end() (->ide_dma_end method) to switch back to PIO timings when DMA transfer is complete. * In sl82c105_set_pio_mode() program timings regardless of ->using_dma setting and in sl82c105_set_dma_mode() only cache the new timings. * Remove no longer needed sl82c105_{ide_dma_on,off_quietly}(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 9d40d2e3955185b69c264583d080eb3defcb05a0 Author: Martin Schwidefsky Date: Sat Jan 26 14:11:31 2008 +0100 [S390] replace lock_cpu_hotplug with get_online_cpus Git commit 86ef5c9a8edd78e6bf92879f32329d89b2d55b5a forgot a few lock_cpu_hotplug/unlock_cpu_hotplug pairs in arch/s390/kernel/smp.c Signed-off-by: Martin Schwidefsky commit 361f494d4e62ee5f7a971bf34945deeb69392159 Author: Peter Tiedemann Date: Sat Jan 26 14:11:30 2008 +0100 [S390] usage of s390dbf: shrink number of debug areas to use. Signed-off-by: Peter Tiedemann commit 5c81cdbeff72e7fc2eb62ee5dc26197e54f9a06c Author: Jan Engelhardt Date: Sat Jan 26 14:11:29 2008 +0100 [S390] constify function pointer tables. Signed-off-by: Jan Engelhardt Signed-off-by: Martin Schwidefsky commit 894cdde26b538c77b9943bc72f0570abf6e58e37 Author: Hisashi Hifumi Date: Sat Jan 26 14:11:28 2008 +0100 [S390] do local_irq_restore while spinning in spin_lock_irqsave. In s390's spin_lock_irqsave, interrupts remain disabled while spinning. In other architectures like x86 and powerpc, interrupts are re-enabled while spinning if IRQ is not masked before spin_lock_irqsave is called. The following patch re-enables interrupts through local_irq_restore while spinning for a lock acquisition. This can improve system response. [heiko.carstens@de.ibm.com: removed saving of pc] Signed-off-by: Hisashi Hifumi Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit dab5209cd878c146d9f6923f061d1c2725ff210f Author: Carsten Otte Date: Sat Jan 26 14:11:27 2008 +0100 [S390] add smp_call_function_mask This patch adds the s390 variant for smp_call_function_mask(). The implementation is pretty straight forward using the wrapper __smp_call_function_map() which already takes a cpumask_t argument. Signed-off-by: Carsten Otte Signed-off-by: Martin Schwidefsky commit 7dc1da9ffae5a344f7115d019e2be069d3e1bb8d Author: Stefan Haberland Date: Sat Jan 26 14:11:26 2008 +0100 [S390] dasd: fix loop in request expiration handling Add time to the 'expires' value to avoid a loop caused by the cqr termination function Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky commit 028fed8233b669e03def295a4e632b1b933720f9 Author: Martin Schwidefsky Date: Sat Jan 26 14:11:25 2008 +0100 [S390] Unused field / extern declaration in processor.h Remove extern declaration of non-existent last_task_used_math and remove unused field error_code from the thread_struct. Signed-off-by: Martin Schwidefsky commit 53360fb19672e9ca94d769694a18f46f6e0612a9 Author: WANG Cong Date: Sat Jan 26 14:11:24 2008 +0100 [S390] Remove TOPDIR from Makefile This patch removes TOPDIR from arch/s390/kernel/Makefile. Cc: Sam Ravnborg Signed-off-by: WANG Cong Signed-off-by: Martin Schwidefsky commit 8e09f21574ea3028d5629e5de759e0b196c690c5 Author: Stefan Weinhuber Date: Sat Jan 26 14:11:23 2008 +0100 [S390] dasd: add hyper PAV support to DASD device driver, part 1 Parallel access volumes (PAV) is a storage server feature, that allows to start multiple channel programs on the same DASD in parallel. It defines alias devices which can be used as alternative paths to the same disk. With the old base PAV support we only needed rudimentary functionality in the DASD device driver. As the mapping between base and alias devices was static, we just had to export an identifier (uid) and could leave the combining of devices to external layers like a device mapper multipath. Now hyper PAV removes the requirement to dedicate alias devices to specific base devices. Instead each alias devices can be combined with multiple base device on a per request basis. This requires full support by the DASD device driver as now each channel program itself has to identify the target base device. The changes to the dasd device driver and the ECKD discipline are: - Separate subchannel device representation (dasd_device) from block device representation (dasd_block). Only base devices are block devices. - Gather information about base and alias devices and possible combinations. - For each request decide which dasd_device should be used (base or alias) and build specific channel program. - Support summary unit checks, which allow the storage server to upgrade / downgrade between base and hyper PAV at runtime (support is mandatory). Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit 0ac30be461084f30ad6e22c6b91347e880ed41aa Author: Roland McGrath Date: Sat Jan 26 14:11:22 2008 +0100 [S390] single-step cleanup Signed-off-by: Roland McGrath Signed-off-by: Martin Schwidefsky commit ea29ee16e6ea908c830e70516d440828fd9129a8 Author: Martin Schwidefsky Date: Sat Jan 26 14:11:21 2008 +0100 [S390] Move NOTES and BUG_TABLE. Move the NOTES and BUG_TABLE section in the linker script to the read-only sections right after the text section. Signed-off-by: Martin Schwidefsky commit 5d67d164e6e2e7310cf4b682c418d70d59295eaf Author: Joe Perches Date: Sat Jan 26 14:11:20 2008 +0100 [S390] drivers/s390/: Spelling fixes Signed-off-by: Joe Perches Signed-off-by: Martin Schwidefsky commit 5800266a7811afeba205e771dcad79023331011b Author: Joe Perches Date: Sat Jan 26 14:11:19 2008 +0100 [S390] include/asm-s390/: Spelling fixes Signed-off-by: Joe Perches Signed-off-by: Martin Schwidefsky commit c2e3bbac72d5a954bf60c5fabeb7c82ec310035e Author: Joe Perches Date: Sat Jan 26 14:11:18 2008 +0100 [S390] arch/s390/: Spelling fixes Signed-off-by: Joe Perches Signed-off-by: Martin Schwidefsky commit 48657d223d403af676696d313b421368f5e2208a Author: Michael Holzheu Date: Sat Jan 26 14:11:17 2008 +0100 [S390] Use diag308 subcodes 3 and 6 for reboot and dump when possible. This patch fixes a problem with the following scenario: 1. Linux booted from DASD "A" 2. Reboot from DASD "B" using "/sys/firmware/reipl/ccw/device" 3. Reboot DASD "B" Without this patch in step 3 on newer s390 systems under LPAR instead of DASD "B", DASD "A" will be booted. The reason is that in step 2 we use CCW reipl and in step 3 we use DIAG308 (subcode 3) reipl. DIAG308 does not notice the CCW reipl and still thinks that it has to reboot DASD "A". Before applying this fix, ensure to have MCF RJ9967101E or z9 GA3 base driver installed. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit a2fd64d6aaf498756f700eb1d07818efee046733 Author: Christian Borntraeger Date: Sat Jan 26 14:11:16 2008 +0100 [S390] vmemmap: allocate struct pages before 1:1 mapping We have seen an oops in an OOM situation, where show_mem tried to access the struct page of a dcss segment. The vmemmap code has already created the 1:1 mapping but failed allocating the struct pages. In the OOM case, show_mem now walks the memory. It uses pfn_valid to detect if it may access the struct page. In the case described above, the mapping was established and pfn_valid returned true. As the struct pages were not allocated, the kernel oopsed. We have to ensure that we have created the struct pages, before we add a mapping pointing to the pages. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit d09293aee9fd0f9f291fa3a0e4ca5012f514d083 Author: Michael Holzheu Date: Sat Jan 26 14:11:15 2008 +0100 [S390] Initialize sclp_ipl_info The sclp ipl information has not been initialized. Therefore the ipl loadparm and the "has_dump" flag have not been set correctly. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 1cb6bb4bbdfd7b6bbdd148c4a34c02066339806d Author: Heiko Carstens Date: Sat Jan 26 14:11:14 2008 +0100 [S390] Allocate and free cpu lowcores and stacks when needed/possible. No need to preallocate the per cpu lowcores and stacks. Savings are 28-32k per offline cpu. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit c11ca97ee9d2ed593ab7b5523def7787b46f398f Author: Denis Cheng Date: Sat Jan 26 14:11:13 2008 +0100 [S390] use LIST_HEAD instead of LIST_HEAD_INIT single list_head variable initialized with LIST_HEAD_INIT could almost always can be replaced with LIST_HEAD declaration, this shrinks the code and looks better. Signed-off-by: Denis Cheng Signed-off-by: Martin Schwidefsky commit c654749777e8624187b53fbb94cea91a7bf74347 Author: Michael Holzheu Date: Sat Jan 26 14:11:12 2008 +0100 [S390] Load disabled wait psw instead of stopping cpu on halt. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 99ca4e582d4a4088969681efff97be44d98421a1 Author: Michael Holzheu Date: Sat Jan 26 14:11:11 2008 +0100 [S390] kernel: Shutdown Actions Interface In case of a kernel panic it is currently possible to specify that a dump should be created, the system should be rebooted or stopped. Virtual sysfs files under the directory /sys/firmware/ are used for that configuration. In addition to that, there are kernel parameters 'vmhalt', 'vmpoff' and 'vmpanic', which can be used to specify z/VM commands, which are automatically executed in case of halt, power off or a kernel panic. This patch combines both functionalities and allows to specify the z/VM CP commands also via sysfs attributes. In addition to that, it enhances the existing handling of shutdown triggers (e.g. halt or panic) and associated shutdown actions (e.g. dump or reipl) and makes it more flexible. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit ceb3dfbae1d3faacaedfc64c913fd18cd3624f72 Author: Joe Perches Date: Sat Jan 26 14:11:10 2008 +0100 [S390] drivers/s390: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Martin Schwidefsky commit cfe7381cea542248766808e7de9a9e7bceecce1a Author: Joe Perches Date: Sat Jan 26 14:11:09 2008 +0100 [S390] arch/s390: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Martin Schwidefsky commit de3e0da1270bccb046885fbf1baa9140721de7e0 Author: Stefan Haberland Date: Sat Jan 26 14:11:08 2008 +0100 [S390] dasd: fix return value of dasd_generic_probe() Using the return value of ccw_device_set_online as return value for dasd_generic_probe() causes the DASD to fail setting online Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky commit 3f5615e012b4593943bbc2a6c3ce150bb33e1966 Author: Jan Glauber Date: Sat Jan 26 14:11:07 2008 +0100 [S390] crypto: move s390 Kconfig options. Move s390 crypto Kconfig options to drivers/crypto/Kconfig to have all hardware crypto devices in one place. This also makes messing up the kernel source tree easier for some people. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 81ef16e763bb899053e06f6050603a305456a085 Author: Heiko Carstens Date: Sat Jan 26 14:11:06 2008 +0100 [S390] Remove appldata include from sysctl_check.c Forgot to remove this when removing the appldata binary sysctls. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 48483b3290988952a593c6e66ca354c19f1a4350 Author: Heiko Carstens Date: Sat Jan 26 14:11:05 2008 +0100 [S390] Get rid of additional_cpus kernel parameter. It caused only a lot of confusion. From now on cpu hotplug of up to NR_CPUS will work by default. If somebody wants to limit that then the possible_cpus parameter can be used. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 519580fc179be6d06a40edd918747bd5f0e1b899 Author: Heiko Carstens Date: Sat Jan 26 14:11:04 2008 +0100 [S390] Use new style spinlock initializer in __RWSEM_INITIALIZER. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 3b4beb31759765efdda9f9431aebfedf828bbfe0 Author: Heiko Carstens Date: Sat Jan 26 14:11:03 2008 +0100 [S390] Remove owner_pc member from raw_spinlock_t. Used to contain the address of the holder of the lock. But since the spinlock code is not inlined anymore all locks contain the same address anyway. And since in addtition nobody complained about that for ages its obviously unused. So remove it. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 9f4b0ba81f158df459fa2cfc98ab1475c090f29c Author: Heiko Carstens Date: Sat Jan 26 14:11:02 2008 +0100 [S390] Get rid of HOLES_IN_ZONE requirement. Align everything to MAX_ORDER so we can get rid of the extra checks. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 5c699714d01ac358c58be9943234081b36b69cdd Author: Heiko Carstens Date: Sat Jan 26 14:11:01 2008 +0100 [S390] Print kernel version in dump_stack() and show_regs(). Also print PREEMPT and/or SMP if the kernel was configured that way. Makes s390 look a bit more like other architectures. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 5fd9c6e214547a32d3da6ee4284c79004d667bc8 Author: Christian Borntraeger Date: Sat Jan 26 14:11:00 2008 +0100 [S390] Change vmalloc defintions Currently the vmalloc area starts at a dynamic address depending on the memory size. There was also an 8MB security hole after the physical memory to catch out-of-bounds accesses. We can simplify the code by putting the vmalloc area explicitely at the top of the kernel mapping and setting the vmalloc size to a fixed value of 128MB/128GB for 31bit/64bit systems. Part of the vmalloc area will be used for the vmem_map. This leaves an area of 96MB/1GB for normal vmalloc allocations. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 8ffd74a0924e4e04f6455eb2d2187a9564678d01 Author: Martin Schwidefsky Date: Sat Jan 26 14:10:59 2008 +0100 [S390] Avoid warnings in tlblush.h Signed-off-by: Martin Schwidefsky commit 6f457e1a149eb39ee58d51913e8023fc27c52806 Author: Martin Schwidefsky Date: Sat Jan 26 14:10:58 2008 +0100 [S390] Fix tlb flushing with idte. The clear-by-asce operation of the idte instruction gets an asce (address-space-control-element) as argument to specify which TLBs need to get flushed. The current code passes a plain pointer to the start of the pgd without the additional bits which would make the pointer an asce. The current machines don't mind the difference but a future model might want to use the designation type control bits in the asce as a filter for the TLBs to flush. Signed-off-by: Martin Schwidefsky commit 4b28a8fe78bd593cdc4454cf28af71ca9556914d Author: Heiko Carstens Date: Sat Jan 26 14:10:57 2008 +0100 [S390] sclp: convert channel path configure code to use sync interface. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 08d07968277cd898c88bf12b7720d89c02c4f139 Author: Heiko Carstens Date: Sat Jan 26 14:10:56 2008 +0100 [S390] Standby cpu activation/deactivation. Add a new interface so that cpus can be put into standby state and configured state. Only offline cpus can be put into standby state or configured state. For that the new percpu sysfs attribute "configure" must be used. To put a cpu in standby state a "0" must be written to the attribute. In order to switch it into configured state a "1" must be written to the attribute. Only cpus in configured state can be brought online. In addition this patch introduces a static mapping of physical to logical cpus. As a result only the sysfs directories of present cpus will be created. To scan for new cpus the new sysfs attribute "rescan" must be used. Writing to /sys/devices/system/cpu/rescan will trigger a rescan of cpus and will create directories for new cpus. On IPL only configured cpus will be used. And on reboot/shutdown all cpus will remain in their current state (configured/standby). Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit c05ffc4f2b208da8ba7d3a9b5ab886c76f8939b5 Author: Michael Ernst Date: Sat Jan 26 14:10:55 2008 +0100 [S390] sclp: sysfs interface for SCLP cpi Signed-off-by: Michael Ernst Signed-off-by: Martin Schwidefsky commit dfa77f611ff295598e218aa0eb6efa73a5cf26d0 Author: Ursula Braun Date: Sat Jan 26 14:10:54 2008 +0100 [S390] qdio: set QDIO_ACTIVATE_TIMEOUT to 5s Current definition of QDIO_ACTIVATE_TIMEOUT results in value 0. Thus it may cause endless wait in function qdio_activate(). Signed-off-by: Ursula Braun Signed-off-by: Martin Schwidefsky commit 8d08be928eb9e90f1456d34aa0712fa9038674e0 Author: Sebastian Ott Date: Sat Jan 26 14:10:53 2008 +0100 [S390] qdio: Remove double checked value. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 90ab133603d066e850fc9ed297b6eb52f888dd25 Author: Peter Oberparleiter Date: Sat Jan 26 14:10:52 2008 +0100 [S390] cio: introduce timed recovery procedure Add a timed recovery procedure to reactivate ccw devices in cases where HW/VM events are not sufficient to allow for proper recovery of reappearing channel paths. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 808e48882316dd4a325cd1cc382516945edad77d Author: Michael Ernst Date: Sat Jan 26 14:10:51 2008 +0100 [S390] cio: memory leak in cio processing Allocated kernel memory for locks is not freed in case of subchannel found to be invalid. Signed-off-by: Michael Ernst Signed-off-by: Martin Schwidefsky commit 1a908c735aed44c8bbed303371202e416813b271 Author: Cornelia Huck Date: Sat Jan 26 14:10:50 2008 +0100 [S390] cio: Fix ungroup vs. machine check race in ccwgroup. There are two ways for a ccwgroup device to be unregistered: Via the ungroup attribute, or when on of the slave devices is killed by a machine check. As we have to unregister the ccwgroup device via a callback, we'll now have to check whether it hasn't been already unregistered because of a machine check. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 46258ab5e42eed5cbe20a83b732d6538c49ea2fe Author: Cornelia Huck Date: Sat Jan 26 14:10:49 2008 +0100 [S390] cio: Delete timer in ccw_device_verify_done(). Make sure pending timers are always deleted, even if we don't go through ccw_device_done(). Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit e82a1567e4b22eb035da2499d20ddd573c9acf75 Author: Peter Oberparleiter Date: Sat Jan 26 14:10:48 2008 +0100 [S390] cio: reduce cpu utilization during device scan Minimize calls to cpu intensive function get_subchannel_by_schid() by introducing function for_each_subchannel_staged() which temporarily caches the information about registered subchannels in a bitmap. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 4beee64685e116b01c47655daf6d88df87e053c8 Author: Cornelia Huck Date: Sat Jan 26 14:10:47 2008 +0100 [S390] cio: Set driver->owner on css, ccw and ccwgroup busses. Set the owner field in the embedded struct device_driver to the value provided in the {css,ccw,ccwgroup}_driver. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit db6a64238a927777e6e7b251927313f186455b1c Author: Cornelia Huck Date: Sat Jan 26 14:10:46 2008 +0100 [S390] cio: Use dev_{g,s}et_drvdata(). Also define helpers sch_{g,s}et_cdev() to make the intention more clear. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit b279a4f56d5476a0b9b0a97397f7a7bbe00b9b2f Author: Cornelia Huck Date: Sat Jan 26 14:10:45 2008 +0100 [S390] cio: I/O subchannel specific fields. Some fields may be !0 only for I/O subchannels. Add some checks where required. Also adapt cio_enable_subchannel() to make the caller specify the intparm, which makes it more generic. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 4e8e56c6713398f417317d449f50c08bf2756c66 Author: Peter Oberparleiter Date: Sat Jan 26 14:10:44 2008 +0100 [S390] cio: Extend adapter interrupt interface. From: Cornelia Huck Change the adapter interrupt interface in order to allow multiple adapter interrupt handlers to be registered. Indicators are now allocated by cio instead of the device driver. The qdio parts have been Acked-by: Ursula Braun Signed-off-by: Peter Oberparleiter Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit cd6b4f27b9bb2a6a5ec82b96b87c85421257be6c Author: Cornelia Huck Date: Sat Jan 26 14:10:43 2008 +0100 [S390] cio: Introduce subchannel->private. Introduce a private pointer in struct subchannel to store per-subchannel type data (cannot use dev->priv since this is already used for something else). Create a new header io_sch.h for I/O subchannel specific structures and instructions. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit bc698bcf8897363732226dc9ecba044771679996 Author: Cornelia Huck Date: Sat Jan 26 14:10:42 2008 +0100 [S390] cio: Cleanup debug feature usage. Cleanup cio_debug.h. Also make CIO_DEBUG add the "cio:" prefix to the printk string so that it isn't needed for the debug feature. Fix outdated comments for cio_debug_init() and clean it up. Enlarge cio_crw to the same size as cio_msg so we may actually find some relevant information there. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 25b7bb5838ab81b68a9de72df577103d8b4aba3c Author: Cornelia Huck Date: Sat Jan 26 14:10:41 2008 +0100 [S390] cio: Add css_driver_{register,unregister}. Add wrapper functions for driver_register and driver_unregister so that css drivers don't need to muck with struct device_driver directly. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 98c13c283a4e8b7f844f1f470abd7c756248fcc4 Author: Cornelia Huck Date: Sat Jan 26 14:10:40 2008 +0100 [S390] cio: Reset sch->driver. sch->driver needs to be reset to NULL on failed probe and after remove. We also need to check for sch->driver on shutdown. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 602b20f2bf335d0d5fce11cb2ade22aa74e7ba25 Author: Cornelia Huck Date: Sat Jan 26 14:10:39 2008 +0100 [S390] cio: css_driver: Use consistent parameters. Make all callbacks in css_driver take a struct subchannel (and not a struct device). Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 084325d80418adf4d75b10a9ceff1348f2e09163 Author: Cornelia Huck Date: Sat Jan 26 14:10:38 2008 +0100 [S390] cio: Use helpers instead of container_of(). - Introduce to_cssdriver. - Use to_xxx instead of container_of where possible. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 14ff56bbb3422cc465a12e81f5e1b5f06168aeda Author: Sebastian Ott Date: Sat Jan 26 14:10:37 2008 +0100 [S390] cio: Dump ccw device information in case of timeout. Information about a ccw device will be dumped in case of a ccw timeout. This can be enabled with the kernel parameter ccw_timeout_log. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 661ca0da3e1fa60c9e56f995fd83772ffa9ffe90 Author: Sebastian Ott Date: Sat Jan 26 14:10:36 2008 +0100 [S390] Cleanup in Documentation/kernel-parameters.txt. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 9b73e76f3cf63379dcf45fcd4f112f5812418d0a Merge: 50d9a12... 23c3e29... Author: Linus Torvalds Date: Fri Jan 25 17:19:08 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ... commit b1aa5301b9f88a4891061650c591fb8fe1c1d1da Author: Stephen Smalley Date: Fri Jan 25 13:03:42 2008 -0500 selinux: fix labeling of /proc/net inodes The proc net rewrite had a side effect on selinux, leading it to mislabel the /proc/net inodes, thereby leading to incorrect denials. Fix security_genfs_sid to ignore extra leading / characters in the path supplied by selinux_proc_get_sid since we now get "//net/..." rather than "/net/...". Signed-off-by: Stephen Smalley Signed-off-by: James Morris commit 50d9a126240f9961cfdd063336bbeb91f77a7dce Merge: 29bd17a... 946fef4... Author: Linus Torvalds Date: Fri Jan 25 17:15:23 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] hifn795x: Disallow built-in hifn795x when HW_RANDOM is m commit 29bd17af7d8ffc16bb5eb286947495c166ea826e Merge: 2ba14a0... 2fe5c1d... Author: Linus Torvalds Date: Fri Jan 25 17:11:13 2008 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (31 commits) ocfs2: clean up bh null checks ocfs2: document access rules for blocked_lock_list configfs: file.c fix possible recursive locking configfs: dir.c fix possible recursive locking configfs: Remove EXPERIMENTAL ocfs2: bump version number ocfs2/dlm: Clear joining_node on hearbeat node down ocfs2: convert byte order of constant instead of variable ocfs2: Update default cluster timeouts ocfs2: printf fixes ocfs2: Use generic_file_llseek ocfs2: Safer read_inline_data() ocfs2: Silence false lockdep warnings [PATCH 2/2] ocfs2: cluster aware flock() [PATCH 1/2] ocfs2: add flock lock type ocfs2: Local alloc window size changeable via mount option ocfs2: Support commit= mount option ocfs2: Add missing permission checks [PATCH 2/2] ocfs2: Implement group add for online resize [PATCH 1/2] ocfs2: Add group extend for online resize ... commit 2ba14a017a4ba8d2266316f481d4ad7400073d18 Merge: 99f1c97... a984f58... Author: Linus Torvalds Date: Fri Jan 25 17:08:28 2008 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (67 commits) fix drivers/ata/sata_fsl.c double-decl [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() pata_legacy: Merge winbond support ata_generic: Cenatek support pata_winbond: error return pata_serverworks: Fix cable types and cosmetics pata_mpc52xx: remove un-needed assignment libata: fix off-by-one in error categorization ahci: factor out AHCI enabling and enable AHCI before reading CAP ata_piix: implement SIDPR SCR access ata_piix: convert to prepare - activate initialization libata: factor out ata_pci_activate_sff_host() from ata_pci_one() [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() pata_legacy: resychronize with upstream changes and resubmit [libata] pata_legacy: typo fix [libata] pata_winbond: update for new ->data_xfer hook pata_pcmcia: convert to new data_xfer prototype libata annotations and fixes libata: use dev_driver_string() instead of "libata" in libata-sff.c ata_piix: kill unused constants and flags ... commit 2fe5c1d7eb88830b09c863a4b5b3279dc120f3af Author: Mark Fasheh Date: Wed Jan 23 18:35:31 2008 -0800 ocfs2: clean up bh null checks If we know a buffer_head is non-null, then brelse() is unnecessary and put_bh() can be used instead. Also, an explicit check for NULL is unnecessary when using brelse(). This patch only covers buffer_head_io.c and resize.c, which have recently added code which exhibits this problem. Signed-off-by: Mark Fasheh commit 7ec373cf33533af6c50828a62f6b305c2d7fa931 Author: Mark Fasheh Date: Wed Jan 23 16:54:48 2008 -0800 ocfs2: document access rules for blocked_lock_list ocfs2_super->blocked_lock_list and ocfs2_super->blocked_lock_count have some usage restrictions which aren't immediately obvious to anyone reading the code. It's a good idea to document this so that we avoid making costly mistakes in the future. Signed-off-by: Mark Fasheh commit 116ba5d5ea1a5789a8c14b1087014007cada363b Author: Joonwoo Park Date: Wed Dec 26 12:09:57 2007 +0900 configfs: file.c fix possible recursive locking configfs_register_subsystem() with default_groups triggers recursive locking. it seems that mutex_lock_nested is needed. ============================================= [ INFO: possible recursive locking detected ] 2.6.24-rc6 #145 --------------------------------------------- swapper/1 is trying to acquire lock: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_add_file+0x2e/0x70 but task is already holding lock: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130 other info that might help us debug this: 1 lock held by swapper/1: #0: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130 stack backtrace: Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #145 [] show_trace_log_lvl+0x1a/0x30 [] show_trace+0x12/0x20 [] dump_stack+0x6e/0x80 [] __lock_acquire+0xe62/0x1120 [] lock_acquire+0x82/0xa0 [] mutex_lock_nested+0x98/0x2e0 [] configfs_add_file+0x2e/0x70 [] configfs_create_file+0x2c/0x40 [] configfs_attach_item+0x139/0x220 [] configfs_attach_group+0x14/0x140 [] configfs_attach_group+0xc9/0x140 [] configfs_register_subsystem+0xc6/0x130 [] init_netconsole+0x2b6/0x300 [] kernel_init+0x142/0x320 [] kernel_thread_helper+0x7/0x14 ======================= Signed-off-by: Joonwoo Park Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit ba611edfe406be745be95c332990c8e908c026c3 Author: Joonwoo Park Date: Wed Dec 26 12:09:57 2007 +0900 configfs: dir.c fix possible recursive locking configfs_register_subsystem() with default_groups triggers recursive locking. it seems that mutex_lock_nested is needed. ============================================= [ INFO: possible recursive locking detected ] 2.6.24-rc6 #141 --------------------------------------------- swapper/1 is trying to acquire lock: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_attach_group+0x4f/0x190 but task is already holding lock: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130 other info that might help us debug this: 1 lock held by swapper/1: #0: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130 stack backtrace: Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #141 [] show_trace_log_lvl+0x1a/0x30 [] show_trace+0x12/0x20 [] dump_stack+0x6e/0x80 [] __lock_acquire+0xe62/0x1120 [] lock_acquire+0x82/0xa0 [] mutex_lock_nested+0x98/0x2e0 [] configfs_attach_group+0x4f/0x190 [] configfs_register_subsystem+0xc6/0x130 [] init_netconsole+0x2b6/0x300 [] kernel_init+0x142/0x320 [] kernel_thread_helper+0x7/0x14 ======================= Signed-off-by: Joonwoo Park Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 02ac0499c0e3c62f2e2bf61a13870b36ea103564 Author: Joel Becker Date: Mon Dec 31 13:56:47 2007 -0800 configfs: Remove EXPERIMENTAL configfs has been alive and kicking for a while now. It underpins some non-EXPERIMENTAL subsystems, such as OCFS2's cluster stack. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 0e5ae032030387bf0926aa980f2105646ead2b47 Author: Mark Fasheh Date: Tue Nov 6 15:52:58 2007 -0800 ocfs2: bump version number Bump the printed version to 1.5.0. This helps us quickly identify which version of Ocfs2 a bug filer is running. Signed-off-by: Mark Fasheh commit 2d4b1cbb44f5557727c35895a83f82d023573fa9 Author: Tao Ma Date: Thu Jan 10 15:20:55 2008 +0800 ocfs2/dlm: Clear joining_node on hearbeat node down Currently the process of dlm join contains 2 steps: query join and assert join. After query join, the joined node will set its joining_node. So if the joining node happens to panic before the 2nd step, the joined node will fail to clear its joining_node flag because that node isn't in the domain map. It at least cause 2 problems. 1. All the new join request will fail. So no new node can mount the volume. 2. The joined node can't umount the volume since during the umount process it has to wait for the joining_node to be unknown. So the umount will be hanged. The solution is to clear the joining_node before we check the domain map. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 4092d49f705aa19750c39758fa1be767e162c48d Author: Marcin Slusarz Date: Tue Dec 25 15:52:59 2007 +0100 ocfs2: convert byte order of constant instead of variable Convert byte order of constant instead of variable it will be done at compile time vs run time. Remove unused le32_and_cpu. Signed-off-by: Marcin Slusarz Signed-off-by: Mark Fasheh commit 17104683d262fc6ab58488c4a3f0415012acc636 Author: Sunil Mushran Date: Tue Nov 6 16:10:23 2007 -0800 ocfs2: Update default cluster timeouts Lots of people are having trouble with the default timeouts, which are too low. These new values are derived from an informal survey taken on ocfs2-users, as well as data from bug reports. This should reduce the amount of cluster disconnects and subsequent fencing seen during normal workloads. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 634bf74d1e8a8d06727505ea4eb73e780d7aa246 Author: Jan Kara Date: Wed Dec 19 15:25:42 2007 +0100 ocfs2: printf fixes Explicitely convert loff_t to long long in printf. Just for sure... Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 32c3c0e2e515197ad240f5104116254975e6bbce Author: Jan Kara Date: Wed Dec 19 15:24:52 2007 +0100 ocfs2: Use generic_file_llseek We should use generic_file_llseek() and not default_llseek() so that s_maxbytes gets properly checked when seeking. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit d2849fb294d92d6eee0a811c688f1ecb39d26800 Author: Jan Kara Date: Wed Dec 19 15:24:09 2007 +0100 ocfs2: Safer read_inline_data() In ocfs2_read_inline_data() we should store file size in loff_t. Although the file size should fit in 32 bits we cannot be sure in case filesystem is corrupted. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 5fa0613ea58a80f69852b242337121bd39dc798e Author: Jan Kara Date: Fri Jan 11 00:11:45 2008 +0100 ocfs2: Silence false lockdep warnings Create separate lockdep lock classes for system file's i_mutexes. They are used to guard allocations and similar things and thus rank differently than i_mutex of a regular file or directory. Signed-off-by: Jan Kara Signed-off-by: Mark Fasheh commit 53fc622b9e829c8e632e45ef8c14f054388759c1 Author: Mark Fasheh Date: Thu Dec 20 16:49:04 2007 -0800 [PATCH 2/2] ocfs2: cluster aware flock() Hook up ocfs2_flock(), using the new flock lock type in dlmglue.c. A new mount option, "localflocks" is added so that users can revert to old functionality as need be. Signed-off-by: Mark Fasheh commit cf8e06f1a860d8680d6bb4ac8ec7d7724988e46f Author: Mark Fasheh Date: Thu Dec 20 16:43:10 2007 -0800 [PATCH 1/2] ocfs2: add flock lock type This adds a new dlmglue lock type which is intended to back flock() requests. Since these locks are driven from userspace, usage rules are much more liberal than the typical Ocfs2 internal cluster lock. As a result, we can't make use of most dlmglue features - lock caching and lock level optimizations in particular. Additionally, userspace is free to deadlock itself, so we have to deal with that in the same way as the rest of the kernel - by allowing a signal to abort a lock request. In order to keep ocfs2_cluster_lock() complexity down, ocfs2_file_lock() does it's own dlm coordination. We still use the same helper functions though, so duplicated code is kept to a minimum. Signed-off-by: Mark Fasheh commit 2fbe8d1ebe004425b4f7b8bba345623d2280be82 Author: Sunil Mushran Date: Thu Dec 20 14:58:11 2007 -0800 ocfs2: Local alloc window size changeable via mount option Local alloc is a performance optimization in ocfs2 in which a node takes a window of bits from the global bitmap and then uses that for all small local allocations. This window size is fixed to 8MB currently. This patch allows users to specify the window size in MB including disabling it by passing in 0. If the number specified is too large, the fs will use the default value of 8MB. mount -o localalloc=X /dev/sdX /mntpoint Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit d147b3d630edef1d34de6ea819787a1ac1b8603b Author: Mark Fasheh Date: Wed Nov 7 14:40:36 2007 -0800 ocfs2: Support commit= mount option Mostly taken from ext3. This allows the user to set the jbd commit interval, in seconds. The default of 5 seconds stays the same, but now users can easily increase the commit interval. Typically, this would be increased in order to benefit performance at the expense of data-safety. Signed-off-by: Mark Fasheh commit 0957f00796157564281ea6ff2cea7ef4f897775a Author: Mark Fasheh Date: Tue Dec 18 18:58:18 2007 -0800 ocfs2: Add missing permission checks Check that an online resize is being driven by a user with permission to change system resource limits. Signed-off-by: Mark Fasheh commit 7909f2bf835376a20d6dbf853eb459a27566eba2 Author: Tao Ma Date: Tue Dec 18 15:47:25 2007 +0800 [PATCH 2/2] ocfs2: Implement group add for online resize This patch adds the ability for a userspace program to request that a properly formatted cluster group be added to the main allocation bitmap for an Ocfs2 file system. The request is made via an ioctl, OCFS2_IOC_GROUP_ADD. On a high level, this is similar to ext3, but we use a different ioctl as the structure which has to be passed through is different. During an online resize, tunefs.ocfs2 will format any new cluster groups which must be added to complete the resize, and call OCFS2_IOC_GROUP_ADD on each one. Kernel verifies that the core cluster group information is valid and then does the work of linking it into the global allocation bitmap. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit d659072f736837e56b6433d58e5315ad1d4d5ccf Author: Tao Ma Date: Tue Dec 18 15:47:03 2007 +0800 [PATCH 1/2] ocfs2: Add group extend for online resize This patch adds the ability for a userspace program to request an extend of last cluster group on an Ocfs2 file system. The request is made via ioctl, OCFS2_IOC_GROUP_EXTEND. This is derived from EXT3_IOC_GROUP_EXTEND, but is obviously Ocfs2 specific. tunefs.ocfs2 would call this for an online-resize operation if the last cluster group isn't full. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 23c3e290fb9ce38cabc2822b47583fc8702411bf Author: Hans de Goede Date: Sun Jan 20 11:27:29 2008 +0100 [SCSI] usbstorage: use last_sector_bug flag universally This patch sets the last_sector_bug flag to 1 for all USB disks. This is needed to makes the cardreader on various HP multifunction printers work. Since the performance impact is negible we set this flag for all USB disks to avoid an unusual_devs.h nightmare. Signed-off-by: Hans de Goede Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit 7f68fc28219be3b44ef4132f95c6506ff3e806b5 Author: Tao Ma Date: Tue Dec 18 15:46:37 2007 +0800 ocfs2: Reserve ioctl range We need to reserve at least two ioctls for online-resize. Reserve a small range of ioctls for Ocfs2 use in Documentation/ioctl-number.txt. This should give us enough room for future growth. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit e9d578a8f279d5e7d1e903f436aefc76ba330b43 Author: Tao Ma Date: Tue Dec 18 15:46:10 2007 +0800 ocfs2: Initalize bitmap_cpg of ocfs2_super to be the maximum. This value is initialized from global_bitmap->id2.i_chain.cl_cpg. If there is only 1 group, it will be equal to the total clusters in the volume. So as for online resize, it should change for all the nodes in the cluster. It isn't easy and there is no corresponding lock for it. bitmap_cpg is only used in 2 areas: 1. Check whether the suballoc is too large for us to allocate from the global bitmap, so it is little used. And now the suballoc size is 2048, it rarely meet this situation and the check is almost useless. 2. Calculate which group a cluster belongs to. We use it during truncate to figure out which cluster group an extent belongs too. But we should be OK if we increase it though as the cluster group calculated shouldn't change and we only ever have a small bitmap_cpg on file systems with a single cluster group. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh commit 946fef4e14ebc2f14ab05f54789843621fe87f60 Author: Herbert Xu Date: Sat Jan 26 09:48:44 2008 +1100 [CRYPTO] hifn795x: Disallow built-in hifn795x when HW_RANDOM is m Currently it is possible to select HW_RANDOM as a module and have hifn795x built-in. This causes a build problem because hifn795x will then call hwrng_register which isn't built-in. This patch introduces a new config option to control the hifn795x RNG which lets us avoid this problem. Signed-off-by: Herbert Xu commit 1252c434e39dc60ca9e8ed682f3e04930e2c08de Author: Mark Fasheh Date: Tue Oct 30 12:09:03 2007 -0700 ocfs2: Documentation update Remove 'readpages' from the list in ocfs2.txt. Instead of having two identical lists, I just removed the list in the OCFS2 section of fs/Kconfig and added a pointer to Documentation/filesystems/ocfs2.txt. Signed-off-by: Mark Fasheh commit 628a24f5bdf31b795d596eaed71670579b96a9aa Author: Mark Fasheh Date: Tue Oct 30 12:08:32 2007 -0700 ocfs2: Readpages support Add ->readpages support to Ocfs2. This is rather trivial - all it required is a small update to ocfs2_get_block (for mapping full extents via b_size) and an ocfs2_readpages() function which partially mirrors ocfs2_readpage(). Signed-off-by: Mark Fasheh commit d69a3ad6a0e47b2aa9b2b2ddfd385752132a4d34 Author: Joel Becker Date: Fri Oct 5 14:31:44 2007 -0700 dlm: Split lock mode and flag constants into a sharable header. This allows others to use the DLM constants without being tied to the function API of fs/dlm. Signed-off-by: Joel Becker Signed-off-by: Steven Whitehouse Signed-off-by: David Teigland Signed-off-by: Mark Fasheh commit e63aecb651ba73dffc62f9608ee1b7ae2a0ffd4b Author: Mark Fasheh Date: Thu Oct 18 15:30:42 2007 -0700 ocfs2: Rename ocfs2_meta_[un]lock Call this the "inode_lock" now, since it covers both data and meta data. This patch makes no functional changes. Signed-off-by: Mark Fasheh commit c934a92d05b549dd2f25db72c5fc3cb9dcf1b611 Author: Mark Fasheh Date: Thu Oct 18 15:23:46 2007 -0700 ocfs2: Remove data locks The meta lock now covers both meta data and data, so this just removes the now-redundant data lock. Combining locks saves us a round of lock mastery per inode and one less lock to ping between nodes during read/write. We don't lose much - since meta locks were always held before a data lock (and at the same level) ordered writeout mode (the default) ensured that flushing for the meta data lock also pushed out data anyways. Signed-off-by: Mark Fasheh commit f1f540688eae66c274ff1c1133b5d9c687b28f58 Author: Mark Fasheh Date: Thu Oct 18 15:13:59 2007 -0700 ocfs2: Add data downconvert worker to inode lock In order to extend inode lock coverage to inode data, we use the same data downconvert worker with only a small modification to only do work for regular files. Signed-off-by: Mark Fasheh commit 34d024f84345807bf44163fac84e921513dde323 Author: Mark Fasheh Date: Mon Sep 24 15:56:19 2007 -0700 ocfs2: Remove mount/unmount votes The node maps that are set/unset by these votes are no longer relevant, thus we can remove the mount and umount votes. Since those are the last two remaining votes, we can also remove the entire vote infrastructure. The vote thread has been renamed to the downconvert thread, and the small amount of functionality related to managing it has been moved into fs/ocfs2/dlmglue.c. All references to votes have been removed or updated. Signed-off-by: Mark Fasheh commit 99f1c97dbdb30e958edfd1ced0ae43df62504e07 Merge: b31fde6... 8176d29... Author: Linus Torvalds Date: Fri Jan 25 14:41:24 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (81 commits) RDMA/cxgb3: Fix the T3A workaround checks IB/ipath: Remove unnecessary cast IPoIB: Constify seq_operations function pointer tables RDMA/cxgb3: Mark QP as privileged based on user capabilities RDMA/cxgb3: Fix page shift calculation in build_phys_page_list() RDMA/cxgb3: Flush the receive queue when closing IB/ipath: Trivial simplification of ipath_make_ud_req() IB/mthca: Update latest "native Arbel" firmware revision IPoIB: Remove redundant check of netif_queue_stopped() in xmit handler IB/ipath: Add mappings from HW register to PortInfo port physical state IB/ipath: Changes to support PIO bandwidth check on IBA7220 IB/ipath: Minor cleanup of unused fields and chip-specific errors IB/ipath: New sysfs entries to control 7220 features IB/ipath: Add new chip-specific functions to older chips, consistent init IB/ipath: Remove unused MDIO interface code IB/ehca: Prevent RDMA-related connection failures on some eHCA2 hardware IB/ehca: Add "port connection autodetect mode" IB/ehca: Define array to store SMI/GSI QPs IB/ehca: Remove CQ-QP-link before destroying QP in error path of create_qp() IB/iser: Add change_queue_depth method ... commit 6f7b056ea9c6fa978c79ca626eff43549df94dbb Author: Mark Fasheh Date: Mon Sep 24 15:09:41 2007 -0700 ocfs2: Remove fs dependency on ocfs2_heartbeat module Now that the dlm exposes domain information to us, we don't need generic node up / node down callbacks. And since the DLM is only telling us when a node goes down unexpectedly, we no longer need to optimize away node down callbacks via the umount map. Signed-off-by: Mark Fasheh commit 6561168cb442be8d2769dce663870b6a28573e16 Author: Mark Fasheh Date: Fri Sep 7 11:11:10 2007 -0700 ocfs2_dlm: Call node eviction callbacks from heartbeat handler With this, a dlm client can take advantage of the group protocol in the dlm to get full notification whenever a node within the dlm domain leaves unexpectedly. Signed-off-by: Mark Fasheh commit 8176d297c73a06e6076c9c31f6404047567f6324 Author: Steve Wise Date: Thu Jan 24 16:30:16 2008 -0600 RDMA/cxgb3: Fix the T3A workaround checks Correctly work around T3A issues by checking "hwtype != T3A" instead of "hwtype == T3B". This will be needed for new hardware types. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit f7fca1e8a8eeb6660396327b48995e3d9a7b6dc2 Author: Jan Engelhardt Date: Tue Jan 22 20:45:30 2008 +0100 IB/ipath: Remove unnecessary cast Signed-off-by: Jan Engelhardt Signed-off-by: Roland Dreier commit 1cf18d5aab5144866cb5221250905623b03a32a9 Author: Jan Engelhardt Date: Tue Jan 22 20:45:30 2008 +0100 IPoIB: Constify seq_operations function pointer tables Signed-off-by: Jan Engelhardt Signed-off-by: Roland Dreier commit c6b5b5047417c1becb5e48e748e3acb3801079a1 Author: Steve Wise Date: Mon Jan 21 14:42:13 2008 -0600 RDMA/cxgb3: Mark QP as privileged based on user capabilities This is needed to support zero-stag properly. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit d08ca26ceec4dfbcfdbada4ad728db742ccaecd1 Author: Steve Wise Date: Mon Jan 21 14:42:11 2008 -0600 RDMA/cxgb3: Fix page shift calculation in build_phys_page_list() The existing logic incorrectly maps this buffer list: 0: addr 0x10001000, size 0x1000 1: addr 0x10002000, size 0x1000 To this bogus page list: 0: 0x10000000 1: 0x10002000 The shift calculation must also take into account the address of the first entry masked by the page_mask as well as the last address+size rounded up to the next page size. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 856b5925047d73a85557203d124d62c5eea1fbd3 Author: Steve Wise Date: Mon Jan 21 14:42:09 2008 -0600 RDMA/cxgb3: Flush the receive queue when closing - for kernel mode cqs, call event notification handler when flushing. - flush QP when moving from RTS -> CLOSING. - fix logic to identify a kernel mode qp. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 4e1e93a4189a98cfb0e24865f7f44470ae5f805e Author: Ralph Campbell Date: Fri Jan 25 14:17:44 2008 -0800 IB/ipath: Trivial simplification of ipath_make_ud_req() Move the increment of s_hdrwords into the existing if block that tests if we're doing a send with immediate, to save one test of the opcode. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 950529e5c6efda8a6d3090a8fef9b904c833397a Author: Roland Dreier Date: Fri Jan 25 14:17:44 2008 -0800 IB/mthca: Update latest "native Arbel" firmware revision Signed-off-by: Roland Dreier commit 48fe5e594c979177b7f20affd027be56e8ea2767 Author: Krishna Kumar Date: Thu Nov 15 10:35:37 2007 +0530 IPoIB: Remove redundant check of netif_queue_stopped() in xmit handler qdisc_run() now tests for queue_stopped() before calling __qdisc_run(), and the same check is done in every iteration of __qdisc_run(), so another check is not required in the driver xmit. This means that ipoib_start_xmit() no longer needs to test netif_queue_stopped(); the test was added to fix earlier kernels, where the networking stack did not guarantee that the xmit method of an LLTX driver would not be called after the queue was stopped, but current kernels do provide this guarantee. To validate, I put a debug in the TX_BUSY path which never hit with 64 threads running overnight exercising this code a few 100 million times. Signed-off-by: Krishna Kumar Signed-off-by: Roland Dreier commit 3d68ea32611095c7e09409ac1b2a56da22fd5eb7 Author: Ralph Campbell Date: Thu Jan 10 00:50:41 2008 -0800 IB/ipath: Add mappings from HW register to PortInfo port physical state Add new mappings from port physical state (a HW register value) to the IB SubnGet(PortInfo) port physical state. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 6ac50727bda29e961385e4c40318dadbb5730193 Author: Dave Olson Date: Thu Aug 9 03:11:38 2007 -0700 IB/ipath: Changes to support PIO bandwidth check on IBA7220 The IBA7220 uses a count-based triggering mechanism, and therefore can't use the same bandwidth verification mechanism as older chips. To support the 7220, allow enabling and disabling armlaunch errors on application request. Minor robustness improvements as well. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit ddb70c83a5ce439271f1699e52a97785a8b45b81 Author: Dave Olson Date: Tue Jan 8 01:51:46 2008 -0800 IB/ipath: Minor cleanup of unused fields and chip-specific errors Clean up some unused header fields, minor related cleanup. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 359193ef433061515fe24d57e5bd5a1318d71bc3 Author: Michael Albaugh Date: Tue Jan 8 00:37:34 2008 -0800 IB/ipath: New sysfs entries to control 7220 features IBA7220 includes many more configurable IB settings. Getting/setting these is now grouped into a pair of chip specific functions accessed via function pointers. Provide sysfs access to these settings. Signed-off-by: Michael Albaugh Signed-off-by: Roland Dreier commit c4bce8032ef4368063c84d665b19804878d63e7c Author: Dave Olson Date: Tue Jan 8 02:36:46 2008 -0800 IB/ipath: Add new chip-specific functions to older chips, consistent init This adds the new (sometimes empty) chip-specific functions to the older chips, and makes the initialization and related functions consistent across all 3 chips. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 7387273307139ebf8d7f7fb3bb79d1ca48bd71d6 Author: Dave Olson Date: Tue Jan 8 23:16:17 2008 -0800 IB/ipath: Remove unused MDIO interface code This code has been unused for some time, but still had leftovers from when it was used. Signed-off-by: Dave Olson commit 2ec8e662416cc9a171cdfe3d75e1ff00ba757859 Author: Joachim Fenkes Date: Thu Jan 17 15:07:24 2008 +0100 IB/ehca: Prevent RDMA-related connection failures on some eHCA2 hardware Some HW revisions of eHCA2 may cause an RC connection to break if they received RDMA Reads over that connection before. This can be prevented by assuring that, after the first RDMA Read, the QP receives a new RDMA Read every few million link packets. Include code into the driver that inserts an empty (size 0) RDMA Read into the message stream every now and then if the consumer doesn't post them frequently enough. Signed-off-by: Joachim Fenkes Signed-off-by: Roland Dreier commit bbdd267ef2796e96b461b8447b2026ce06e6ec4b Author: Hoang-Nam Nguyen Date: Thu Jan 17 15:05:45 2008 +0100 IB/ehca: Add "port connection autodetect mode" This patch enhances ehca with a capability to "autodetect" the ports being connected physically. In order to utilize that function the module option nr_ports must be set to -1 (default is 2 - two ports). This feature is experimental and will made the default later. More detail: If the user connects only one port to the switch, current code requires 1) port one to be connected and 2) module option nr_ports=1 to be given. If autodetect is enabled, ehca will not wait at creation of the GSI QP for the respective port to become active. Since firmware does not accept modify_qp() while the port is down at initialization, we need to cache all calls to modify_qp() for the SMI/GSI QP and just return a good return code. When a port is activated and we get a PORT_ACTIVE event, we replay the cached modify-qp() parms and re-trigger any posted recv WRs. Only then do we forward the PORT_ACTIVE event to registered clients. The result of this autodetect patch is that all ports will be accessible by the users. Depending on their respective cabling only those ports that are connected properly will become operable. If a user tries to modify a regular QP of a non-connected port, modify_qp() will fail. Furthermore, ibv_devinfo should show the port state accordingly. Note that this patch primarily improves the loading behaviour of ehca. If the cable is removed while the driver is operating and plugged in again, firmware will handle that properly by sending an appropriate async event. Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit b8b50e353b85bc3c791dd2b99370ac300ebcd186 Author: Hoang-Nam Nguyen Date: Thu Jan 17 15:04:32 2008 +0100 IB/ehca: Define array to store SMI/GSI QPs Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit 0c86e280fe8a08d4ae30b77e46a1e7da28d756c9 Author: Hoang-Nam Nguyen Date: Thu Jan 17 15:03:55 2008 +0100 IB/ehca: Remove CQ-QP-link before destroying QP in error path of create_qp() Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit 6410627eb9804e541b83d220c8e914ce64475b31 Author: Erez Zilber Date: Thu Jan 17 11:53:17 2008 +0200 IB/iser: Add change_queue_depth method Add a .change_queue_depth handler to the scsi_host_template in the iSER driver. iscsi_change_queue_depth was added to iscsi_tcp in order to solve the problem of queue depth which was too high for some targets. It is also applicable for iSER. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit a4ef1451dfba92f51934e8331f634497b9ed3393 Author: Erez Zilber Date: Thu Jan 17 11:51:58 2008 +0200 IB/iser: Print information about unhandled RDMA CM events Some RDMA CM events are not supported or not handled in iSER. This patch adds some info (printk) for the user about them. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit a3cd7d9070be417a21905c997ee32d756d999b38 Author: Olaf Kirch Date: Wed Jan 16 18:37:16 2008 +0100 IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRs When a FMR is released via ib_fmr_pool_unmap(), the FMR usually ends up on the free_list rather than the dirty_list (because we allow a certain number of remappings before actually requiring a flush). However, ib_fmr_batch_release() only looks at dirty_list when flushing out old mappings. This means that when ib_fmr_pool_flush() is used to force a flush of the FMR pool, some dirty FMRs that have not reached their maximum remap count will not actually be flushed. Fix this by flushing all FMRs that have been used at least once in ib_fmr_batch_release(). Signed-off-by: Olaf Kirch Signed-off-by: Roland Dreier commit a656eb758fc6e6a42659ecf5ba34a5c5a2aeec17 Author: Olaf Kirch Date: Wed Jan 16 18:36:27 2008 +0100 IB/fmr_pool: Flush serial numbers can get out of sync Normally, the serial numbers for flush requests and flushes executed for an FMR pool should be in sync. However, if the FMR pool flushes dirty FMRs because the dirty_watermark was reached, we wake up the cleanup thread and let it do its stuff. As a side effect, the cleanup thread increments pool->flush_ser, which leaves it one higher than pool->req_ser. The next time the user calls ib_flush_fmr_pool(), the cleanup thread will be woken up, but ib_flush_fmr_pool() won't wait for the flush to complete because flush_ser is already past req_ser. This means the FMRs that the user expects to be flushed may not have all been flushed when the function returns. Fix this by telling the cleanup thread to do work exclusively by incrementing req_ser, and by moving the comparison of dirty_len and dirty_watermark into ib_fmr_pool_unmap(). Signed-off-by: Olaf Kirch commit 2fe7e6f7c9f55eac24c5b3cdf56af29ab9b0ca81 Author: Roland Dreier Date: Fri Jan 25 14:15:42 2008 -0800 IB/umad: Simplify and fix locking In addition to being overly complex, the locking in user_mad.c is broken: there were multiple reports of deadlocks and lockdep warnings. In particular it seems that a single thread may end up trying to take the same rwsem for reading more than once, which is explicitly forbidden in the comments in . To solve this, we change the locking to use plain mutexes instead of rwsems. There is one mutex per open file, which protects the contents of the struct ib_umad_file, including the array of agents and list of queued packets; and there is one mutex per struct ib_umad_port, which protects the contents, including the list of open files. We never hold the file mutex across calls to functions like ib_unregister_mad_agent(), which can call back into other ib_umad code to queue a packet, and we always hold the port mutex as long as we need to make sure that a device is not hot-unplugged from under us. This even makes things nicer for users of the -rt patch, since we remove calls to downgrade_write() (which is not implemented in -rt). Signed-off-by: Roland Dreier commit cf9542aa923982428fbf6a6f815c32ae2c3da8c7 Author: Roland Dreier Date: Fri Jan 25 14:15:42 2008 -0800 IB/ipath: Fix some sparse warnings about shadowed symbols There are a few places in the ipath driver where a variable is re-declared within a block where it is already in scope. Most of these extra declarations can simply be removed, since the variable from the outer scope is used in a way so that it does not need to keep its variable across the block with the re-declaration. Signed-off-by: Roland Dreier commit 1d6e658e8e3247fcf0fa90c40fdfebf2e85a610e Author: Roland Dreier Date: Fri Jan 25 14:15:42 2008 -0800 RDMA/cxgb3: Endianness annotation for irs field t3_rdma_init_wr.irs is a big-endian field, so declare it as __be32. This fixes one sparse warning. Signed-off-by: Roland Dreier commit 1a7d2dce4169ed42310926a5675fffd0986caa26 Author: Anton Blanchard Date: Mon Oct 15 00:49:07 2007 -0500 IB/ehca: Use round_jiffies() for EQ polling timer Use round_jiffies() to align ehca's 1-second timer with other timers and potentially save power by sleeping cores for longer. Signed-off-by: Anton Blanchard Acked-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit 5851bb893e5bb87150817c180ccddcf4e78db1b6 Author: Sean Hefty Date: Fri Jan 4 10:47:12 2008 -0800 RDMA/cma: Override default responder_resources with user value By default, the responder_resources parameter is set to that received in a connection request. The passive side may override this value when accepting the connection. Use the value provided by the passive side when transitioning the QP to RTR state, rather than the value given in the connect request. Without this change, the RTR transition may fail if the passive side supports fewer responder_resources than that in the request. For code consistency and to protect against QP destruction, restructure overriding initiator_depth to match how responder_resources is set. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 1f813ca830f51ed404195750bdba86c41a8050ba Author: Dave Olson Date: Sun Jan 6 21:12:38 2008 -0800 IB/ipath: Drop support for the original QHT7040 board The original QHT7040 had significant performance issues so there was an additional check in the driver for a newer serial number. Support for the small quantities of that board shipped has been dropped, so this patch removes the special checks to simplify the code. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 7da0498e7f0eb022107811b9d41697298329f6b4 Author: Arthur Jones Date: Sun Jan 6 21:12:38 2008 -0800 IB/ipath: Add ipath_read_ireg() abstraction Different chips have different width interrupt status registers, so add a flag and accessor function to decide which width register read to use. Signed-off-by: Arthur Jones Signed-off-by: Roland Dreier commit 4ea61b548bc93fb87cec6f52059851076e2ff54d Author: Ralph Campbell Date: Sun Jan 6 21:12:38 2008 -0800 IB/ipath: Add flag and handling for chips with swapped register bug The 6110 had a bug that caused some registers to be swapped; it was fixed for the 7220 (and didn't affect the 6120 because it had fewer registers). This adds a flag and related code to handle that, and includes some minor cleanups in the same area. Signed-off-by: Ralph Campbell commit 60948a415859cb859e24f0dfe739069d66577466 Author: Ralph Campbell Date: Sun Jan 6 21:02:34 2008 -0800 IB/ipath: Port config has on-chip effects for 7220 The number of configured ports for the 7220 changes the number of eager TIDs available per port, for all but port 0 (kernel port) which remains constant, so add a field to give port0 count separate from the portdata structure. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit a18e26ae442001de62f6b84a923e8613347dc35f Author: Ralph Campbell Date: Sun Jan 6 21:02:34 2008 -0800 IB/ipath: Allow more flexible user register alignments User registers have different alignments on different chips (4KB on older, 64KB on 7220). Allow mapping the user registers on kernels with page sizes up to 64K. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 9e2ef36b5a83b3c8ec1153382559dff410cc4341 Author: Dave Olson Date: Sun Jan 6 21:02:34 2008 -0800 IB/ipath: Clean up some comments Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 3029fcc3d44530601f19fd8f551ac195d3a918d7 Author: Ralph Campbell Date: Sun Jan 6 21:02:34 2008 -0800 IB/ipath: Export hardware counters more consistently Various hardware counters are exported via the ipath file system (since it is binary data). The old file format was very dependent on the HW offsets for these registers. Newer HCA chips can have different counters at different offsets. This patch adds a level of indirection to make the file format consistent across HCAs. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 6c719cae0b91f577738dfb4007baee28f03e48a5 Author: Ralph Campbell Date: Sun Jan 6 21:02:33 2008 -0800 IB/ipath: MAD performance sampling registers support Add support for QLogic HCAs which have hardware performance sampling registers for PortSamplesControl and PortSamplesResult MADs. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 7aa54bd730df1468c90ae84b56ade7f322b44de7 Author: David Dillow Date: Mon Jan 7 18:23:41 2008 -0500 IB/srp: Add identifying information to log messages When you have multiple targets, it gets really confusing when you try to track down who did a reset when there is no identifying information in the log message, especially when the same extension ID is mapped through two different local IB ports. So, add an identifier that can be used to track back to which local IB port/remote target pair is the one having problems. Signed-off-by: David Dillow Acked-by: Pete Wyckoff Signed-off-by: Roland Dreier commit 586a693448676de5174e752426ced69ec79ab174 Author: Pradeep Satyanarayana Date: Fri Dec 21 13:08:23 2007 -0800 IPoIB/CM: Enable SRQ support on HCAs that support fewer than 16 SG entries Some HCAs (such as ehca2) support SRQ, but only support fewer than 16 SG entries for SRQs. Currently IPoIB/CM implicitly assumes all HCAs will support 16 SG entries for SRQs (to handle a 64K MTU with 4K pages). This patch removes that restriction by limiting the maximum MTU in connected mode to what the maximum number of SRQ SG entries allows. This patch addresses Signed-off-by: Pradeep Satyanarayana Signed-off-by: Roland Dreier commit fff09a8e6e726f0752254e1f46f7224e3bebb302 Author: David Dillow Date: Wed Dec 19 17:09:15 2007 -0500 IB/srp: Enable SG list chaining By default, the SCSI mid-layer seems to send down 512KB requests (sg_tablesize = 256), with some requests occasionally combined. By allowing the mid-layer to chain requests, we can easily grow to 1024KB or larger -- I've tested 4096KB I/O requests with no problems. I looked through the DMA paths on the hardware drivers to ensure they could take advantage of the SG chaining, and it seems that every one except ipath uses the system's DMA routines, which have been converted to handle chaining. ipath looks like it should be OK, but I have no way to test it. Signed-off-by: David Dillow [ Tested on ipath. - Roland ] Signed-off-by: Roland Dreier commit 8cba2077325b361dedf058c7dfc6c33691422497 Author: David Dillow Date: Wed Dec 19 17:08:43 2007 -0500 IB/srp: Respect target credit limit The current SRP initiator will send requests even if it has no credits available. The results of sending extra requests are vendor specific, but on some devices, overrunning credits will cost 85% of peak performance -- e.g. 100 MB/s vs 720 MB/s. Other devices may just drop the requests. This patch will tell the SCSI midlayer to queue requests if there are fewer than two credits remaining, and will not issue a task management request if there are no credits remaining. The mid-layer will retry the queued command once an outstanding command completes. The patch also removes the unlikely() in __srp_get_tx_iu(), as it is not at all unlikely to hit this limit under heavy load. Signed-off-by: David Dillow Signed-off-by: Roland Dreier commit a9e527e3f9f4510e9f3450ca3bc51bc3ef2854fd Author: Rolf Manderscheid Date: Mon Dec 10 13:38:41 2007 -0700 IPoIB: improve IPv4/IPv6 to IB mcast mapping functions An IPoIB subnet on an IB fabric that spans multiple IB subnets can't use link-local scope in multicast GIDs. The existing routines that map IP/IPv6 multicast addresses into IB link-level addresses hard-code the scope to link-local, and they also leave the partition key field uninitialised. This patch adds a parameter (the link-level broadcast address) to the mapping routines, allowing them to initialise both the scope and the P_Key appropriately, and fixes up the call sites. The next step will be to add a way to configure the scope for an IPoIB interface. Signed-off-by: Rolf Manderscheid Signed-off-by: Roland Dreier commit 755807a296f77ca7c31dc000afdfe1e5172bbf72 Author: Dave Olson Date: Thu Dec 6 00:28:02 2007 -0800 IB/ipath: Changes for fields moving from devdata to portdata This patch moves some arrays that were defined per-device to be variables defined in the per context data structure, thus avoiding extra kzalloc() calls. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit d8274869d742c3d8082e1428de47e54d12104928 Author: Dave Olson Date: Fri Dec 21 01:50:59 2007 -0800 IB/ipath: Generalize some xxx_SHIFT macros In preparation for upcoming chips that have different values for INFINIPATH_R_PORTENABLE_SHIFT, INFINIPATH_R_INTRAVAIL_SHIFT, INFINIPATH_R_TAILUPD_SHIFT, and portcfg_shift, remove the shared #defines and use device-specific variables instead. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit c59a80aca0bfc491d90534ed5606d5493eca24a3 Author: Ralph Campbell Date: Thu Dec 20 02:43:23 2007 -0800 IB/ipath: kreceive uses portdata rather than devdata kreceive is now portdata * instead of devdata * and other kreceive related cleanups.... Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit d65708f3a766116662ff9bac81088d52a49901f4 Author: Ralph Campbell Date: Fri Dec 21 16:47:04 2007 -0800 IB/ipath: Cleanup ipath_get_egrbuf() Remove an unused parameter and fix up the comment. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit cc65edcf0c174eff4367cfbc594a2f33c0d477fa Author: Ralph Campbell Date: Fri Dec 14 19:22:34 2007 -0800 IB/ipath: Fix RNR NAK handling This patch fixes a couple of minor problems with RNR NAK handling: - The insertion sort was causing extra delay when inserting ahead vs. behind an existing entry on the list. - A resend of a first packet of a message which is still not ready, needs another RNR NAK (i.e., it was suppressed when it shouldn't). - Also, the resend tasklet doesn't need to be woken up unless the ACK/NAK actually indicates progress has been made. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit e57d62a14775c9d37195debe837431c75168ef69 Author: Hoang-Nam Nguyen Date: Thu Dec 20 15:06:33 2007 +0100 IB/ehca: Forward event client-reregister-required to registered clients This patch allows ehca to forward event client-reregister-required to registered clients. One such event is generated by a switch eg. after its reboot. Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit b3226184af6c13c9d5d38f13f0ef8e03f718bbf7 Author: Roland Dreier Date: Fri Jan 25 14:15:34 2008 -0800 IB/mlx4: Micro-optimize mlx4_ib_poll_one() Rather than byte-swapping cqe->g_mlpath_rqpn each time we extract a field from it, byte-swap it once into a temporary variable. This results in smaller, better code -- eg, on 32-bit x86: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5) function old new delta mlx4_ib_poll_cq 1188 1183 -5 Signed-off-by: Roland Dreier commit e57895d38991036f9ccf193b70fc5ebd5f6e6dc9 Author: Adrian Bunk Date: Tue Jan 1 15:47:10 2008 +0200 IB/mthca: Remove MSI support as scheduled Remove MSI support from the mthca driver, as scheduled. There is no reason to use MSI instead of MSI-X, since MSI-X performs better. No one has spoken up since MSI support was deprecated in commit f6be6fbe ("IB/mthca: Schedule MSI support for removal"), so apparently the MSI support is unused. Signed-off-by: Adrian Bunk Signed-off-by: Roland Dreier commit 38dc732f47948b9f91ae846806159a16aab1015f Author: Oliver Pinter Date: Fri Jan 25 14:15:32 2008 -0800 IB/iser: Typo fix (s/destory/destroy/) Signed-off-by: Oliver Pinter Signed-off-by: Roland Dreier commit bd5d7a8585bb196a03655b25d2ec6395a491cd01 Author: Erez Zilber Date: Fri Jan 25 14:15:32 2008 -0800 IB/iser: update URLs of iSER docs Signed-off-by: Erez Zilber commit 88314e4dda1e158aabce76429ef4d017b48f8b92 Author: Sean Hefty Date: Wed Nov 14 00:29:50 2007 -0800 RDMA/cma: add support for rdma_migrate_id() This is based on user feedback from Doug Ledford at RedHat: Events that occur on an rdma_cm_id are reported to userspace through an event channel. Connection request events are reported on the event channel associated with the listen. When the connection is accepted, a new rdma_cm_id is created and automatically uses the listen event channel. This is suboptimal where the user only wants listen events on that channel. Additionally, it may be desirable to have events related to connection establishment use a different event channel than those related to already established connections. Allow the user to migrate an rdma_cm_id between event channels. All pending events associated with the rdma_cm_id are moved to the new event channel. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 45d9478da106c749203056f56e94d0e370dfac87 Author: Vladimir Sokolovsky Date: Fri Dec 7 20:32:03 2007 -0800 RDMA/cma: Reenable device removal on passive side Enable conn_id remove on the passive side after connection establishment. This corrects an issue where the IB driver can't be unloaded after running applications over RDS. The 'dev_remove' counter does not reach 0 for established connections on the passive side. This problem is limited to device removal, and only occurs on the passive side if there are established connections. Signed-off-by: Vladimir Sokolovsky Reviewed-by: Sean Hefty Signed-off-by: Roland Dreier commit b61d92d8ae6aa13b17d1c31e69d123879cec2ee2 Author: Sean Hefty Date: Fri Nov 30 17:30:18 2007 -0800 IB/mad: Fix incorrect access to items on local_list In cancel_mads(), MADs are moved from the wait_list and local_list to a cancel_list for processing. However, the structures on these two lists are not the same. The wait_list references struct ib_mad_send_wr_private, but local_list references struct ib_mad_local_private. Cancel_mads() treats all items moved to the cancel_list as struct ib_mad_send_wr_private. This leads to a system crash when requests are moved from the local_list to the cancel_list. Fix this by leaving local_list alone. All requests on the local_list have completed are just awaiting processing by a queued worker thread. Bug (crash) reported by Dotan Barak . Problem with local_list access reported by Robert Reynolds . Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 9af57b7a2702f2cdf6ae499612e90b0f84bcb393 Author: Sean Hefty Date: Mon Jul 16 21:49:35 2007 -0700 IB/cm: Add basic performance counters Add performance/debug counters to track sent/received messages, retries, and duplicates. Counters are tracked per CM message type, per port. The counters are always enabled, so intrusive state tracking is not done. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 4fc8cd4919428f9b86f0b65e2f3245a1c186737f Author: Sean Hefty Date: Tue Nov 27 00:11:04 2007 -0800 IB/mad: Report number of times a mad was retried To allow ULPs to tune timeout values and capture retry statistics, report the number of times that a mad send operation was retried. For RMPP mads, report the total number of times that the any portion (send window) of the send operation was retried. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 547af76521b3fd4b9ec5c9a9975a17eadb95e6f6 Author: Sean Hefty Date: Mon Oct 22 21:52:54 2007 -0700 IB/multicast: Report errors on multicast groups if P_key changes P_key changes can invalidate multicast groups. Report errors on all multicast groups affected by a pkey change. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 94545e8c51fbf01d1c1cda7e6d017598d41e840a Author: Joe Perches Date: Mon Dec 17 11:30:36 2007 -0800 IB: Spelling fixes in comments Signed-off-by: Joe Perches Signed-off-by: Roland Dreier commit 5920869f1ec263fee4255ec71d333c118406a419 Author: Jack Morgenstein Date: Mon Dec 10 05:25:23 2007 +0200 mlx4_core: Fix max_eqs masking in QUERY_DEV_CAP log_max_eqs is a 4-bit field, not a 3-bit field in the response to the QUERY_DEV_CAP FW command, so we should mask with 0xf instead of 0x7 when reading it. Found by Yossi Leybovitch of Mellanox. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 3c8450860ba9d6279dbc969633eacf99161860d9 Author: Nick Piggin Date: Thu Dec 13 15:58:57 2007 -0800 IB/ipath: Convert from .nopage to .fault Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Roland Dreier commit a2f76cd69f4913079cad10670f8520ffe07f4067 Author: Ralph Campbell Date: Fri Nov 2 17:40:36 2007 -0700 IB/ipath: Add the work completion error code to the QP error debug output Add the work completion error code to the QP error debug output. This makes it easier to determine the cause of the error. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 2f01a7001131bbf3ce1e39252bf72aea2da034df Author: Arthur Jones Date: Wed Oct 17 18:18:29 2007 -0700 IB/ipath: Better comment for rmb() in ipath_intr() An internal code review found the comment here lacking -- update it with more specifics of how and why the rmb() is there. Signed-off-by: Arthur Jones Signed-off-by: Roland Dreier commit 6276980138292056aab162f7eb98afe5243b2976 Author: Ralph Campbell Date: Mon Nov 26 23:44:15 2007 -0800 IB/ipath: Fix comments for ipath_create_srq() During a code review, someone noticed the comments didn't match the code. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 733d12813bd36ed7c727686ac1164f92f87a14a2 Author: Ralph Campbell Date: Thu Nov 8 19:53:01 2007 -0800 IB/ipath: Fix error returned from ib_resize_cq if new size smaller than # entries The gen2_basic tests check for the errno value when a CQ is resized smaller than the number of outstanding completions queue on the CQ. This patch changes ib_ipath to return EINVAL which is what ib_mthca returns and what gen2_basic expects. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit e342c119172f87f2d812bccfd0283f62e1bc1c2a Author: John Gregor Date: Wed Sep 5 01:57:14 2007 -0700 IB/ipath: Fix sendctrl locking Code review pointed out that the locking around uses of ipath_sendctrl and kr_sendctrl were, in several places, incorrect and/or inconsistent. Signed-off-by: John Gregor Signed-off-by: Roland Dreier commit 9ab4295d1d9ab10a249aea002060685f935a528c Author: Ralph Campbell Date: Fri Oct 12 20:48:06 2007 -0700 IB/ipath: Remove dead code for user process waiting for send buffer At one point in time there was code to allow a user process to wait for a send buffer if none were available. This feature was never used and most of the code was removed. This removes some missed unused code. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 457fe7b8a6822907cbe65897dc81b83d9df5bcbf Author: Steve Wise Date: Mon Nov 26 11:28:46 2007 -0600 RDMA/cxgb3: Support version 5.0 firmware The 5.0 firmware now supports translating sgls in recv work requests, so remove the host driver logic currently doing the translation. Note: this change requires 5.0 firmware. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 7f049f2f4259e4a5c213720df1ce0c2ca095641a Author: Steve Wise Date: Mon Nov 26 11:28:44 2007 -0600 RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call Currently the call into cxgb3 to get the driver info is not serialized. The iw_cxgb3 module needs to hold the rtnl_lock around the ethtool ops call like dev_ioctl() does. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 908cf9a565348b5a6d765d120cb189a568ea4883 Author: Joe Perches Date: Mon Nov 19 17:48:11 2007 -0800 drivers/infiniband: Add missing "space" Add missing spaces in the middle of format strings. Signed-off-by: Joe Perches Signed-off-by: Roland Dreier commit 2c45688faed1b19583c388694025e39001b68c8d Author: Matthias Kaehlcke Date: Thu Nov 15 15:23:25 2007 -0800 IB/ipath: Convert ipath_eep_sem semaphore to a mutex Signed-off-by: Matthias Kaehlcke Acked-by: Michael Albaugh Tested-by: Arthur Jones Signed-off-by: Andrew Morton Signed-off-by: Roland Dreier commit 727792da2bc22e2ce125faef84aeca3b3e2f4a90 Author: Steve Welch Date: Tue Oct 23 15:06:10 2007 -0700 IB/mad: Enable loopback of DR SMP responses from userspace The local loopback of an outgoing DR SMP response is limited to those that originate at the driver specific SMA implementation during the driver specific process_mad() function. This patch enables a returning DR SMP originating in userspace (or elsewhere) to be delivered to the local managment stack. In this specific case the driver process_mad() function does not consume or process the MAD, so a reponse mad has not be created and the original MAD must manually be copied to the MAD buffer that is to be handed off to the local agent. Signed-off-by: Steve Welch Acked-by: Hal Rosenstock Signed-off-by: Roland Dreier commit f9b403532235520ec248c024f621efcaf6ba7b93 Author: Ralph Campbell Date: Tue Oct 23 15:07:41 2007 -0700 IB/ipath: Enable loopback of DR SMP responses from userspace This patch is in response to reviewing a patch to the core MAD processing which fixes loopback of directed route packets to/from user level MAD agents. This change enables the core code to work for ib_ipath by fixing the return code from the ipath process_mad method. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 3828ff457a694f97f88f6978bea428199df0a690 Author: Ralph Campbell Date: Tue Oct 23 15:04:15 2007 -0700 IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler() In ib_mad_recv_done_handler(), the response pointer is checked for NULL after allocating it. It is then checked again in the local process_mad() path but there is no possibility of it changing in between. Signed-off-by: Ralph Campbell Acked-by: Hal Rosenstock Signed-off-by: Roland Dreier commit 8d8293cfb38b042835eeded7c1d90f75ca243e87 Author: Steve Wise Date: Mon Oct 29 11:34:05 2007 -0500 RDMA/iwcm: Set initiator depth and responder resources to device max values Set the initiator depth and responder resources to the device max values for new connect request events in the iWARP connection manager. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit e193e3326c521eea6a0221e945627ae5e3274910 Author: Dave Olson Date: Wed Oct 10 05:10:35 2007 -0700 IB/ipath: Improve interrupt handler cache footprint Improve interrupt handler cache footprint by noinline'ing error functions that are rarely called. Signed-off-by: Dave Olson Signed-off-by: Roland Dreier commit 68e995a295720439ad2bf8677114cdf9d262d905 Author: Pradeep Satyanarayana Date: Fri Jan 25 14:15:24 2008 -0800 IPoIB/cm: Add connected mode support for devices without SRQs Some IB adapters (notably IBM's eHCA) do not implement SRQs (shared receive queues). The current IPoIB connected mode support only works on devices that support SRQs. Fix this by adding support for using the receive queue of each connected mode receive QP. The disadvantage of this compared to using an SRQ is that it means a full queue of receives must be posted for each remote connected mode peer, which means that total memory usage is potentially much higher than when using SRQs. To manage this, add a new module parameter "max_nonsrq_conn_qp" that limits the number of connections allowed per interface. The rest of the changes are fairly straightforward: we use a table of struct ipoib_cm_rx to hold all the active connections, and put the table index of the connection in the high bits of receive WR IDs. This is needed because we cannot rely on the struct ib_wc.qp field for non-SRQ receive completions. Most of the rest of the changes just test whether or not an SRQ is available, and post receives or find received packets in the right place depending on the answer. Cleaning up dead connections actually becomes simpler, because we do not have to do the "last WQE reached" dance that is required to destroy QPs attached to an SRQ. We just move the QP to the error state and wait for all pending receives to be flushed. Signed-off-by: Pradeep Satyanarayana [ Completely rewritten and split up, based on Pradeep's work. Several bugs fixed and no doubt several bugs introduced. - Roland ] Signed-off-by: Roland Dreier commit efcd99717f76c6d19dd81203c60fe198480de522 Author: Roland Dreier Date: Fri Jan 25 14:15:24 2008 -0800 IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list() Factor out the code for going through the rx_reap list of struct ipoib_cm_rx and freeing each one. This consolidates the code duplicated between ipoib_cm_dev_stop() and ipoib_cm_rx_reap() and reduces the risk of error when adding additional accounting. Signed-off-by: Roland Dreier commit 7b3687df66cab4ecd6efb42cfa0c7de60cc4e3b9 Author: Roland Dreier Date: Fri Jan 25 14:15:24 2008 -0800 IPoIB/cm: Factor out ipoib_cm_create_srq() Factor out the code to create an SRQ and allocate the receive ring in ipoib_cm_dev_init() into a new function ipoib_cm_create_srq(). This will make the code neater when support for devices that don't implement SRQs is added. Signed-off-by: Roland Dreier commit 1efb61444ca3a598dfafb7a6c573c5d5d42d3432 Author: Roland Dreier Date: Fri Jan 25 14:15:24 2008 -0800 IPoIB/cm: Factor out ipoib_cm_free_rx_ring() Factor out the code to unmap/free skbs and free the receive ring in ipoib_cm_dev_cleanup() into a new function ipoib_cm_free_rx_ring(). This function will be called from a couple of other places when support for devices that don't implement SRQs is added. Signed-off-by: Roland Dreier commit 2337f80941ac22f747ce6fd2c7a79e91d911a3ce Author: Roland Dreier Date: Tue Oct 23 19:57:54 2007 -0700 IPoIB: Trivial formatting cleanups Fix whitespace blunders, convert "foo* bar" to "foo *bar", etc. Signed-off-by: Roland Dreier commit 657c2f2cbccbac88689ac5174fc13dd3f9aece34 Author: Roland Dreier Date: Fri Jan 25 14:15:21 2008 -0800 IB/ipath: Fix crash on unload introduced by sysfs changes Commit 23b9c1ab ("Infiniband: make ipath driver use default driver groups.") introduced a bug in the ipath driver where ipath_device_create_group() fell through into the error path, even on success, which meant that the sysfs groups it created would always get removed right away. This made ipath_device_remove_group() hit the BUG_ON() in sysfs_remove_group() when it tried to remove those groups a second time. Correct the return path so that the groups stick around until they are supposed to be cleaned up. Signed-off-by: Roland Dreier commit b31fde6db2b76a9f7f59bf016652b46cff43f8da Merge: f31c338... a999337... Author: Linus Torvalds Date: Fri Jan 25 13:59:51 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (509 commits) V4L/DVB (7078): radio: fix sf16fmi section mismatch V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check V4L/DVB (7075): Make a local function static V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel V4L/DVB (7073): DiB7070: Reception quality improved V4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM V4L/DVB (7071): DiB0700: Start streaming the right way V4L/DVB (7070): Fix some tuning problems V4L/DVB (7069): Support for myTV.t V4L/DVB (7068): Add support for WinTV Nova-T-CE driver V4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500 V4L/DVB (7066): ASUS My Cinema U3000 Mini DVBT Tuner V4L/DVB (7065): Artec T14BR patches V4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware V4L/DVB (7062): radio-si570x: Some fixes and new USB ID addition V4L/DVB (7061): radio-si470x: Some cleanups V4L/DVB (7060): em28xx: remove has_tuner V4L/DVB (7059): cx88: Ensure the tuner is reset correctly V4L/DVB (7058): IR corrections for the Pinnacle 800i V4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners ... commit f31c338675872875e24f124af0689131b0c72600 Merge: 0008bf5... 61a368c... Author: Linus Torvalds Date: Fri Jan 25 13:57:26 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (67 commits) ide: remove redundant DMA blacklist check from __ide_dma_on() ide: cleanup ide_set_dma() ide: remove redundant ->ide_dma_on call from set_using_dma() sc1200: move DMA timings to timing tables ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag sis5513: factor out UDMA programming code pdc202xx_new: move PIO programming code to pdcnew_set_pio_mode() ide: make 'extra' field in struct ide_port_info u8 ide: kill duplicate code in ide_dump_{ata,atapi}_status() ide-disk: use ide_get_lba_addr() ide: printk fix ide: add ide_tf_read() helper ide: fix registers loading order in ide_dump_ata_status() ide-disk: use do_rw_taskfile() (take 2) ide-disk: add ide_tf_set_cmd() helper ide-disk: extend timeout for PIO-in commands ide: remove 'handler' field from ide_task_t (take 2) ide: use ->data_phase to set ->handler in do_rw_taskfile() ide: convert do_rw_taskfile() to use ->data_phase ide: merge flagged_taskfile() into do_rw_taskfile() ... commit 0008bf54408d4c0637c24d34642f1038c299be95 Merge: 2d94dfc... 6d08259... Author: Linus Torvalds Date: Fri Jan 25 13:42:32 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: (96 commits) sched: keep total / count stats in addition to the max for sched, futex: detach sched.h and futex.h sched: fix: don't take a mutex from interrupt context sched: print backtrace of running tasks too printk: use ktime_get() softlockup: fix signedness sched: latencytop support sched: fix goto retry in pick_next_task_rt() timers: don't #error on higher HZ values sched: monitor clock underflows in /proc/sched_debug sched: fix rq->clock warps on frequency changes sched: fix, always create kernel threads with normal priority debug: clean up kernel/profile.c sched: remove the !PREEMPT_BKL code sched: make PREEMPT_BKL the default debug: track and print last unloaded module in the oops trace debug: show being-loaded/being-unloaded indicator for modules sched: rt-watchdog: fix .rlim_max = RLIM_INFINITY sched: rt-group: reduce rescheduling hrtimer: unlock hrtimer_wakeup ... commit 61a368c216897aa3bbee35b3f2e6db76ec73fad0 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:19 2008 +0100 ide: remove redundant DMA blacklist check from __ide_dma_on() ->ide_dma_on method is called only after successful ide_dma_check() call (ide_dma_check()->ide_tune_dma() checks DMA blacklist) or if drive->using_dma has been previously enabled for a given device (->ide_dma_on is the only place which sets drive->using_dma to '1'). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7b905994ce0bd332afc5ebc30ce9afa60d23c6e2 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:19 2008 +0100 ide: cleanup ide_set_dma() * ->dma_off_quietly is always called before ide_set_dma() so the call can be moved inside ide_set_dma(). * ide_dma_check() doesn't touch hardware so ->dma_off_quietly call for 'rc == -1' case is redundant, remove it. * '0' and '-1' are the only values returned by ide_dma_check() so remove dead code for other cases. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 23b1bd459c9e8a925381960f0b69ac85468c3af1 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:19 2008 +0100 ide: remove redundant ->ide_dma_on call from set_using_dma() ide_set_dma() calls ->ide_dma_on method itself and returns zero only if ->ide_dma_on call succeeded. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4eed504d140319d6c1c7e0a5b7a9bf41dabf7cea Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:18 2008 +0100 sc1200: move DMA timings to timing tables Based on pata_sc1200.c. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4db90a145292327b95b03f6dcd3352327235cc36 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:18 2008 +0100 ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag * Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:18 2008 +0100 sis5513: factor out UDMA programming code * Factor out UDMA programming code from sis_set_dma_mode() to per chipset family helpers: sis_{ata33,ata133}_program_udma_timings(). * Add sis_program_udma_timings() helper. * Remove unneeded casts to 'unsigned long'. * Minor cleanups. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ad4ba7dcef285c92a6856e0dd9feb780c1a79b87 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:18 2008 +0100 pdc202xx_new: move PIO programming code to pdcnew_set_pio_mode() * Move PIO programming code from pdcnew_set_mode() to pdcnew_set_pio_mode(). * Rename pdcnew_set_mode() to pdcnew_set_dma_mode(). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 3071a9d00b8684899d93f368e670c4de0293df29 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:17 2008 +0100 ide: make 'extra' field in struct ide_port_info u8 The maximum value used currently for 'extra' field in struct ide_port_info is 240. Make 'extra' u8 so it packs nicely together with enablebits[] and 'chipset' fields (ide_pci_enablebit_t is 3 bytes and hwif_chipset_t is 1 byte). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit e62925dd26ef9594b8e4b9380b3211f6dae4ab96 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:17 2008 +0100 ide: kill duplicate code in ide_dump_{ata,atapi}_status() * Move the common code from ide_dump_{ata,atapi}_status() to ide_dump_status(). * ide_dump_{ata,atapi}_status() -> ide_dump_{ata,atapi}_error(). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit a501633c7d44087e806597d3a213d735346edd51 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:17 2008 +0100 ide-disk: use ide_get_lba_addr() * Export ide_get_lba_addr(). * Convert idedisk_{read_native,set}_max_address() to use ide_get_lba_addr(). * Remove incorrect comment from idedisk_read_native_max_address() (noticed by Sergei). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 1c904fcfbb0d8eef92ef42b1da378b4714143e46 Author: Andrew Morton Date: Fri Jan 25 22:17:17 2008 +0100 ide: printk fix power4: drivers/ide/ide-lib.c: In function `ide_dump_sector': drivers/ide/ide-lib.c:516: warning: long long unsigned int format, u64 arg (arg 2) We don't know what type is used to implement u64 hence it must always be cast when printed. Signed-off-by: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz commit c2b57cdc1d2976444d451a2a2e43e11b61ed0638 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:17 2008 +0100 ide: add ide_tf_read() helper * Factor out code reading taskfile registers from ide_end_drive_cmd() to the new ide_tf_read() helper. * Add IDE_TFLAG_IN_* taskfile flags to indicate the need to load particular IDE taskfile register in ide_tf_read(). * Update ide_end_drive_cmd() to set respective IDE_TFLAG_IN_* taksfile flags. * Add ide_get_lba_addr() for getting LBA sector address from taskfile struct. * Factor out code getting sector address from ide_dump_ata_status() to the new ide_dump_sector() function. * Convert ide_dump_sector() to use ide_tf_read() and ide_get_lba_addr(). * Remove no longer needed ide_read_24(). The only change in functionality caused by this patch is that ide_dump_ata_status() no longer prints "high"/"low" parts of LBA48 sector address (of course LBA48 sector address is still printed). Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d32444771b154c3ec37ebf6439004653560c2411 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:17 2008 +0100 ide: fix registers loading order in ide_dump_ata_status() Fix registers loading order in ide_dump_ata_status()/ide_read_24(). Load registers in this order: * IDE_SECTOR_REG * IDE_LCYL_REG * IDE_HCYL_REG * IDE_SELECT_REG It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f6e29e35cc0f9facf2eb0b0454f9b09021b5aa6f Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide-disk: use do_rw_taskfile() (take 2) * Add IDE_TFLAG_DMA_PIO_FALLBACK taskfile flag to indicate the need to skip loading taskfile registers in do_rw_taskfile(). * Export do_rw_taskfile(). * Convert __ide_do_rw_disk() to use do_rw_taskfile(). * Unexport ide_tf_load(). * Unexport {pre_task_out,task_in}_intr() and make it static. * Remove incorrect comment about do_rw_taskfile() from . There should be no functionality changes caused by this patch. v2: * Add missing blk_fs_request() check to task_dma_ok() (for VDMA). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ba76ae3883ad9faa32a6b35271c6a407d6c96ca9 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide-disk: add ide_tf_set_cmd() helper * Add ide_tf_set_cmd() helper for selecting/setting command and data phase (note: DMA data phases are there for completness, they are not required ATM). * Set IDE_TFLAG_WRITE taskfile flag for write requests in __ide_do_rw_disk(). * Convert __ide_do_rw_disk() to use the new ide_tf_set_cmd() helper. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit c52ea915d7fdc96819964b32eb124b5ccd22b9af Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide-disk: extend timeout for PIO-in commands s/WAIT_CMD/WAIT_WORSTCASE/ to make the timeout the same as in do_rw_taskfile() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 57d7366b78b74a9eef873e8212c03d8c2033a764 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide: remove 'handler' field from ide_task_t (take 2) * Add IDE_TFLAG_CUSTOM_HANDLER taskfile flag and use it for internal requests which require custom handlers. Check the flag in do_rw_taskfile() and set handler accordingly. * Cleanup ide_init_{specify,restore,setmult}_cmd() and rename it to ide_tf_set_{specify,restore,setmult}_cmd(). * Make {set_geometry,recal,set_multmode}_intr() static. * Remove no longer needed 'handler' field from ide_task_t. v2: * 'handler' in do_rw_taskfile() must be set to NULL initially. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 1192e528e064ebb9a578219731d2b0f78ca3c1ec Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide: use ->data_phase to set ->handler in do_rw_taskfile() * Use ->data_phase to set ->handler in do_rw_taskfile() instead of setting ->handler in callers of ide_raw_taskfile()/do_rw_taskfile(). * Unexport task_no_data_intr() and make it static. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 10d90157c83d4b6743c9063c36f9e7f27aa254b6 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:16 2008 +0100 ide: convert do_rw_taskfile() to use ->data_phase * Use task->data_phase in do_rw_taskfile() to decide what to do. * task->prehandler is only used by TASKFILE[_MULTI]_OUT so just use pre_task_out_intr() directly and remove no longer needed 'prehandler' field from ide_task_t. * Remove no longer needed ide_pre_handler_t type. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 1edee60e9d994f2b9a79b1333be39790683541fe Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:15 2008 +0100 ide: merge flagged_taskfile() into do_rw_taskfile() Based on the earlier work by Tejun Heo. task->data_phase == TASKFILE_MULTI_{IN,OUT} vs drive->mult_count == 0 check is needed also for ide_taskfile_ioctl() requests that don't have IDE_TFLAG_FLAGGED taskfile flag set. Cc: Tejun Heo Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit a7bbd20b50fb12b3a604c396b3d8a3449a43edcc Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:15 2008 +0100 ide-disk: guarantee 400ns delay after writing command register Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit cf77249ee1a37aab37f39ea1dde9a53c23693655 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:15 2008 +0100 ide-disk: fix __ide_do_rw_disk() to use ->OUTBSYNC Fix __ide_do_rw_disk() to use ->OUTBSYNC instead of ->OUTB (needed for pmac and scc_pata host drivers). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7c0e26661dd104aaeb1391063cc986ddc0ac4aa4 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:14 2008 +0100 sc1200: remove pointless hwif lookup loop Save PCI regs values for both IDE ports in one buffer, in order to eliminate a needless and ugly loop across all hwifs, searching for our PCI device. Partially based on the previous patch by Jeff Garzik. Cc: Jeff Garzik Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz commit 866e2ec9ce525de0e7c10d02ead8d85af27adffd Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:14 2008 +0100 ide: remove 'tf_in_flags' field from ide_task_t * Add IDE_TFLAG_IN_DATA taskfile flag to indicate the need of reading IDE_DATA_REG in ide_end_drive_cmd(). Set the new flag in ide_taskfile_ioctl() if ->in_flags.b.data is set. * Add IDE_TFLAG_FLAGGED_SET_IN_FLAGS taskfile flag to indicate the need of modifying ->in_flags in ide_taskfile_ioctl(). Set the new flag in flagged_taskfile() and move the code modifying ->tf_in_flags to ide_taskfile_ioctl(). While at it remove the bogus comment: ->tf_in_flags (except .b.data) have no effect on selection of registers to read. * Remove no longer needed 'tf_in_flags' field from ide_task_t. As the result we finally have the internals of HDIO_DRIVE_TASKFILE ioctl separated from the core IDE code. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ac026ff254b32915bb14ba97a23b4019d137f181 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:14 2008 +0100 ide: remove 'command_type' field from ide_task_t * Add 'data_buf' and 'nsect' variables in ide_taskfile_ioctl() to cache data buffer pointer and number of sectors to transfer (this allows us to have only one ide_diag_taskfile() call). * Add IDE_TFLAG_WRITE taskfile flag and use it to check whether the REQ_RW request flag should be set. * Move ->command_type handling from ide_diag_taskfile() to ide_taskfile_ioctl() and use ->req_cmd instead of ->command_type. * Add 'nsect' parameter to ide_raw_taskfile(). * Merge ide_diag_taskfile() into ide_raw_taskfile(). * Initialize ->data_phase explicitly in idedisk_prepare_flush(), ide_start_power_step() and ide_disk_special(). * Remove no longer needed 'command_type' field from ide_task_t. * Add #ifndef/#endif __KERNEL__ to around no longer used by kernel IDE_DRIVE_TASK_* and TASKFILE_* defines. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7299a3918442dc9a5abb71b9f65b1dd17637c8c0 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:14 2008 +0100 ide: remove hwif->intrproc Given that: * hpt366.c::hpt3xx_intrproc() is the only user of hwif->intrproc * hpt366.c::hpt3xx_quirkproc() sets drive->quirk_list to 1 for quirky drives which is a value unique to hpt366 host driver we can remove hwif->intproc and just check for drive->quirk_list == 1 in ide_do_request(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f919790f8c929ab1b392ad1a0c2e1b53337b5071 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:13 2008 +0100 ide: remove SELECT_INTERRUPT() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit cd3dbc99da337f2130f3cb2691fbb65c8bf22337 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:13 2008 +0100 ide: remove QUIRK_LIST() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 2fc573881957337c4ea1c84b92d2f27d076cad57 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:13 2008 +0100 ide: add ide_pktcmd_tf_load() helper Add ide_pktcmd_tf_load() helper and convert ATAPI device drivers to use it. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 932aead6d21b631b2058255981824008a6eae32e Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:13 2008 +0100 ide-{floppy,tape,scsi}: fix register loading order when issuing packet command Load IDE_BCOUNTL_REG before IDE_BCOUNTH_REG when issuing packet command. It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 3a6a3549afe7dfe212b6384106bec957bb393f3a Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:13 2008 +0100 ide-cd: fix register loading order in cdrom_start_packet_command() Load IDE_CONTROL_REG before other registers in cdrom_start_packet_command(). It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). While at it move misplaced FIXME comment in the right place. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8e7657ae0f56c14882e53ffdae8055c2b1624de1 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:12 2008 +0100 ide: remove atapi_ireason_t (take 3) Remove atapi_ireason_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible) v2: * v1 had CD and IO bits reversed in many places. * Use CD and IO defines from . v3: * Fix incorrect "(ireason & IO) == test_bit()". (Noticed by Sergei) Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 790d1239898d4f893112280decd344d90f43ee96 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:12 2008 +0100 ide: remove ata_nsector_t, ata_data_t and atapi_bcount_t Remove ata_nsector_t, ata_data_t (unused) and atapi_bcount_t. While at it: * replace 'HWIF(drive)' by 'hwif' Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit e5f9f5a89a01abc2b9c09747452aeb9218d6bffd Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:12 2008 +0100 ide: remove atapi_feature_t Remove atapi_feature_t. While at it: * replace 'HWIF(drive)' by 'hwif' Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 0e38a66a1e69821ab57a06d5a7b11f0df9275bf4 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:12 2008 +0100 ide: remove atapi_error_t (take 2) Remove atapi_error_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' v2: * Add {ILI,EOM,LFS}_ERR defines to . Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 22c525b976778cce5bb6f8fdcc70046168c54b1a Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:11 2008 +0100 ide: remove ata_status_t and atapi_status_t Remove ata_status_t (unused) and atapi_status_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible) Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 6a2144146aa2e0eb60e48ba73ac0e1c51346edf6 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:11 2008 +0100 ide: CPU endianness doesn't matter for special_t special_t is used only internally by the IDE subsystem (it isn't related to hardware registers and isn't exported to the user-space). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 918337a85366ad0f1c4c08ebe45e4fb1e3a3c15f Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:11 2008 +0100 ide-floppy: remove dead code Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 29ed2a5f8c4380959f18e9cbaff13bc61e09889c Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:11 2008 +0100 ide: remove REQ_TYPE_ATA_TASK Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 14b89ef9814614f18a1fcae51e601e7e16a82ef7 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:11 2008 +0100 ide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 813a0eb233ee67d7166241a8b389b6a76f2247f9 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:10 2008 +0100 ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 1f2564b8b56b305ab9acf5d387abca950180dff6 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:10 2008 +0100 ide: extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests Extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests from WAIT_CMD (10sec) to WAIT_WORSTCASE (30sec, already used for REQ_TYPE_ATA_TASKFILE). Signed-off-by: Bartlomiej Zolnierkiewicz commit a3bbb9d882dc94fe3a1361596ab9ce55d84059ea Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:10 2008 +0100 ide: remove unnecessary writes to HOB taskfile registers * Set taskfile flags for REQ_TYPE_ATA_TASKFILE requests before adding the request to the queue. * Cleanup execute_drive_cmd(). * Remove unnecessary writes to HOB taskfile registers when using LBA48 disk for the following cases: - Power Management requests (WIN_FLUSH_CACHE[_EXT], WIN_STANDBYNOW1, WIN_IDLEIMMEDIATE commands) - special commands (WIN_SPECIFY, WIN_RESTORE, WIN_SETMULT) - Host Protected Area support (WIN_READ_NATIVE_MAX, WIN_SET_MAX) - /proc/ide/ SMART support (WIN_SMART with SMART_ENABLE, SMART_READ_VALUES and SMART_READ_THRESHOLDS subcommands) - write cache enabling/disabling in ide-disk (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_WCACHE) - write cache flushing in ide-disk (WIN_FLUSH_CACHE[_EXT]) - acoustic management in ide-disk (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_AAM) - door (un)locking in ide-disk (WIN_DOORLOCK, WIN_DOORUNLOCK) - /proc/ide/hd?/identify support (WIN_IDENTIFY) - ACPI _GTF taskfiles Signed-off-by: Bartlomiej Zolnierkiewicz commit 868e672ac8db650dde695a5707a6caf5a757e7d9 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:10 2008 +0100 ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests * Use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests in ide_end_drive_cmd() to decide whether we need to read HOB taskfile registers. * Update execute_drive_cmd() accordingly. This is a preparation for the next patch which removes unnecessary writes to HOB taskfile registers for some ATA commands. Signed-off-by: Bartlomiej Zolnierkiewicz commit 807e35d695690011faa1ce3ad67dfc23c1e39bdc Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:10 2008 +0100 ide: use ide_tf_load() in execute_drive_cmd() * Add IDE_TFLAG_OUT_DEVICE taskfile flag to indicate the need of writing the Device register and handle it in ide_tf_load(). Update ide_tf_load() and {do_rw,flagged}_taskfile() users accordingly. * Use struct ide_taskfile and ide_tf_load() in execute_drive_cmd(). * Make the debugging code dump all taskfile registers for both REQ_ATA_TYPE_{CMD,TASK} requests and move it to ide_tf_load() so it also covers REQ_ATA_TYPE_TASKFILE requests. There should be no functionality changes caused by this patch (unless DEBUG is defined). Signed-off-by: Bartlomiej Zolnierkiewicz commit 54688aa372cbc83c4361bfb9236f9bfe02168e19 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:09 2008 +0100 ide: remove ide_cmd() helper * Remove ide_cmd() helper. * Clear nIEN and call SELECT_MASK() before writing taskfile registers. Signed-off-by: Bartlomiej Zolnierkiewicz commit 21d535c91362a1a3bbb299b2e7214c1a6971ef95 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:09 2008 +0100 ide: execute_drive_cmd() cleanup * Rename 'args' variable in 'if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)' block to 'task'. * execute_drive_cmd() is used only for REQ_TYPE_ATA_{CMD,TASK,TASKFILE} so we can move the common code out from 'if (rq->cmd_type == REQ_TYPE_ATA_CMD)' and 'if (rq->cmd_type == REQ_TYPE_ATA_TASK)' blocks. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 6dd87233bccc6416dac3b78ac912fd017918efe6 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:09 2008 +0100 ide: fix registers loading order for IDE_NSECTOR_REG in execute_drive_cmd() Move loading of IDE_NSECTOR_REG from ide_cmd() to execute_drive_cmd() (load the IDE_NSECTOR_REG just after IDE_FEATURE_REG). This also allows us to drop 'nsect' argument from ide_cmd() and simplify execute_drive_cmd() code for REQ_TYPE_ATA_CMD case a bit. It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Signed-off-by: Bartlomiej Zolnierkiewicz commit 46f26c362d5109459f04f99e93fc0413d88516c8 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:09 2008 +0100 ide: fix registers loading order for WIN_SMART in execute_drive_cmd() Fix registers loading order for REQ_TYPE_ATA_CMD request with WIN_SMART command in execute_drive_cmd() (load IDE_FEATURE_REG and IDE_SECTOR_REG before loading IDE_LCYL_REG and IDE_HCYL_REG). It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d3bb03438c58b2a00f07a59175d4156a9952d825 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:08 2008 +0100 ide-tape: remove dead USE_IOTRACE code Signed-off-by: Bartlomiej Zolnierkiewicz commit 4ee06b7e677da4c75f2fcc5fd850543852d18bf2 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:08 2008 +0100 ide: remove stale ide.h "configuration options" Remove stale ide.h "configuration options": * INITIAL_MULT_COUNT - always defined to 0 * SUPPORT_SLOW_DATA_PORTS - unused * OK_TO_RESET_CONTROLLER - always defined to 1 * DISABLE_IRQ_NOSYNC - always defined to 0 Leave SUPPORT_VLB_SYNC (defined to 0 for CRIS and FRV, otherwise to 1) for now but disallow overriding it by . There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f1ca6d37f991347b87d86430db42e2ab139d1b1d Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:08 2008 +0100 ide: remove CONFIG_IDEPCI_SHARE_IRQ config option We can safely remove CONFIG_IDEPCI_SHARE_IRQ and always support PCI IRQ sharing. Signed-off-by: Bartlomiej Zolnierkiewicz commit 7b5da4be3718c6b4cd771fb82e3e481b04790f0e Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:08 2008 +0100 ide: remove IRQF_DISABLED from IRQ flags for IDE IRQ handler IRQF_DISABLED is not needed because the first thing that ide_intr() (IDE IRQ handler) does is calling spin_lock_irqsave() which disables local IRQs (IRQ unmasking is later handled by drive->unmask). kernel/irq/handle.c: irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action) ... if (!(action->flags & IRQF_DISABLED)) local_irq_enable_in_hardirq(); do { ret = action->handler(irq, action->dev_id); if (ret == IRQ_HANDLED) status |= action->flags; retval |= ret; action = action->next; } while (action); ... drivers/ide/ide-io.c: irqreturn_t ide_intr (int irq, void *dev_id) ... spin_lock_irqsave(&ide_lock, flags); ... spin_unlock(&ide_lock); ... if (drive->unmask) local_irq_enable_in_hardirq(); ... Signed-off-by: Bartlomiej Zolnierkiewicz commit d26805fd025abe1ab8785b23a7942cfb6ceffd75 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:07 2008 +0100 ide-pmac: fix pmac_ide_init_hwif_ports() * pmac_ide_init_hwif_ports() can be called by ide_init_hwif_ports() (through ppc_ide_md.ide_init_hwif hook) for non IDE PMAC interfaces. If this is the case the hw->io_ports[] should be already setup by ide_init_hwif_ports()->ide_std_init_ports() so remove redundant code from pmac_ide_init_hwif_ports(). As side-effect this change fixes ctl_addr == 0 special handling in ide_init_hwif_ports(). * Fix misleading comment while at it. Cc: Benjamin Herrenschmidt Cc: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit 74095a91ed02f6727b62d4416be00a041f2d7436 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:07 2008 +0100 ide: use do_rw_taskfile() in flagged_taskfile() Based on the earlier work by Tejun Heo. * Move setting IDE_TFLAG_LBA48 taskfile flag from do_rw_taskfile() function to the callers. * Add IDE_TFLAG_FLAGGED taskfile flag for flagged taskfiles coming from ide_taskfile_ioctl(). Check it instead of ->tf_out_flags.all. * Add IDE_TFLAG_OUT_DATA taskfile flag to indicate the need to load IDE data register in ide_tf_load(). * Add IDE_TFLAG_OUT_* taskfile flags to indicate the need to load particular IDE taskfile registers in ide_tf_load(). * Update do_rw_taskfile() and ide_tf_load() users to set respective IDE_TFLAG_OUT_* taksfile flags. * Add task_dma_ok() helper. * Use IDE_TFLAG_FLAGGED taskfile flag to select HIHI mask in ide_tf_load(). * Use do_rw_taskfile() in flagged_taskfile(). * Remove no longer needed 'tf_out_flags' field from ide_task_t. There should be no functionality changes caused by this patch. Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit 9a3c49be5c5f7388eefb712be9a383904140532e Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:07 2008 +0100 ide: add ide_no_data_taskfile() helper * Add ide_no_data_taskfile() helper and convert ide_raw_taskfile() w/ NO DATA protocol users to use it instead. * Set ->data_phase explicitly in ide_no_data_taskfile() (TASKFILE_NO_DATA is defined as 0x0000). * Unexport task_no_data_intr(). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 9e42237f26cf517a3f682505f03a3a8d89b3b35d Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:07 2008 +0100 ide: add ide_tf_load() helper Based on the earlier work by Tejun Heo. * Add 'tf_flags' field (for taskfile flags) to ide_task_t. * Add IDE_TFLAG_LBA48 taskfile flag for LBA48 taskfiles. * Add IDE_TFLAG_NO_SELECT_MASK taskfile flag for __ide_do_rw_disk() which doesn't use SELECT_MASK() (looks like a bug but it requires some more investigation). * Split off ide_tf_load() helper from do_rw_taskfile(). * Convert __ide_do_rw_disk() to use ide_tf_load(). There should be no functionality changes caused by this patch. Cc: Tejun Heo Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 2bd06b23e2a099abbf550202f62cd433e01f83e7 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:06 2008 +0100 ide-disk: use struct ide_taskfile in __ide_do_rw_disk() Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d00e42dd26bbda6a39aead6a47c59221e03a08f8 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:06 2008 +0100 ide-disk: fix taskfile registers loading order in __ide_do_rw_disk() Load IDE_SECTOR_REG after IDE_FEATURE_REG and IDE_NSECTOR_REG when using CHS. This patch is basically a preparation for the next one which converts __ide_do_rw_disk() to use struct ide_taskfile. It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Signed-off-by: Bartlomiej Zolnierkiewicz commit 7a3b7512d0d7e78353e99f4538eb6d3354019d92 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:06 2008 +0100 ide-disk: merge LBA28 and LBA48 Host Protected Area support code (take 2) * Merge idedisk_{read_native,set}_max_address_ext() into idedisk_{read_native,set}_max_address(). v2: * Remove LBA48 code leftover from idedisk_read_native_max_address() ('high' variable initialization). (Noticed by Sergei). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 650d841d9e053a618dd8ce753422f91b493cf2f6 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:06 2008 +0100 ide: add struct ide_taskfile (take 2) * Don't set write-only ide_task_t.hobRegister[6] and ide_task_t.hobRegister[7] in idedisk_set_max_address_ext(). * Add struct ide_taskfile and use it in ide_task_t instead of tfRegister[] and hobRegister[]. * Remove no longer needed IDE_CONTROL_OFFSET_HOB define. * Add #ifndef/#endif __KERNEL__ around definitions of {task,hob}_struct_t. While at it: * Use ATA_LBA define for LBA bit (0x40) as suggested by Tejun Heo. v2: * Add missing newlines. (Noticed by Sergei) * Use ~ATA_LBA instead of 0xBF. (Noticed by Sergei) * Use unnamed unions for error/feature and status/command. (Suggested by Sergei). There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz commit cd2a2d969761c26542095c01324201ca0b3ee896 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:06 2008 +0100 ide: remove task_ioreg_t typedef (take 2) Remove task_ioreg_t typedef from the kernel code (but leave it in for #ifndef/#endif __KERNEL__ case). While at it also move sata_ioreg_t typedef under #ifndef/#endif __KERNEL__. v2: Remove name of the second parameter from ide_execute_command() declaration. (Noticed by Sergei). Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 1c029fd658baa2442e8e51dc9c819301cad95777 Author: Bartlomiej Zolnierkiewicz Date: Fri Jan 25 22:17:05 2008 +0100 ide: remove ->dma_master field from ide_hwif_t (take 5) * Convert cmd64x, hpt366 and pdc202xx_old host drivers to use pci_resource_start(hwif->pci_dev, 4) instead of hwif->dma_master. * Remove no longer needed ->dma_master field from ide_hwif_t. v2: * Use the more readable 'hwif->dma_base - (hwif->channel * 8)' instead of pci_resource_start(hwif->pci_dev, 4). v3: * Use hwif->extra_base in hpt366/pdc20xx_old + some cosmetic fixups over v2 (suggested by Sergei). v4: * Correct offsets in hpt3xxn_set_clock(). v5: * Use hwif->extra_base in hpt366 for _real_ this time. (Noticed by Sergei) Acked-by: Sergei Shtylyov Cc: Jeff Garzik Signed-off-by: Bartlomiej Zolnierkiewicz commit 866664d79f6a920af07e6503f64366f4c5b2d41f Author: Sergei Shtylyov Date: Fri Jan 25 22:17:05 2008 +0100 hpt366: merge set_dma_mode() methods Group the array of pointers to the timing tables with the timing register masks which allows us to merge HPT36x/HPT37x set_dma_mode() methods into one. Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit a488f34e0dc7180f35fe48a60596fc82fe69d3ef Author: Sergei Shtylyov Date: Fri Jan 25 22:17:05 2008 +0100 hpt366: kill set_dma_mode() method wrapper There's no reason to keep the set_dma_mode() method wrapper for two different chip families, so get rid of it... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ceb1b2c583a9503e3ae68c4e7c652637971e3768 Author: Sergei Shtylyov Date: Fri Jan 25 22:17:04 2008 +0100 hpt366: change timing register masks Since PIO autotuning is now done always, there's no need anymore to program the taskfile timings also on DMA modes, so change the IDE timing register masks accordingly, "inverting the polarity" of the masks while at it... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit b5e1a4e2869af5ffaa102535ad63d184d86e66ec Author: Aristeu Rozanski Date: Fri Jan 25 22:17:04 2008 +0100 ide-io: set REQ_FAILED when drive is dead Currently it's possible to ide-cd to set an incorrect blocksize by reading garbage if the drive is dead: ide_cd_probe() -> cdrom_read_toc() -> cdrom_read_capacity() -> cdrom_queue_packet_command() -> ide_do_drive_cmd() -> ide_do_request() -> start_request() on start_request(): /* bail early if we've exceeded max_failures */ if (drive->max_failures && (drive->failures > drive->max_failures)) { goto kill_rq; } (...) kill_rq: ide_kill_rq(drive, rq); return ide_stopped; ide_kill_rq() and the next calls won't set REQ_FAILED on rq->cmd_flags and thus cdrom_queue_packet_command() won't return an error. then: stat = cdrom_queue_packet_command(drive, &req); if (stat == 0) { *capacity = 1 + be32_to_cpu(capbuf.lba); *sectors_per_frame = be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS; } cdrom_read_capacity() ends believing capbuf is valid but in fact it's just uninitialized data. back to cdrom_read_toc(): /* Try to get the total cdrom capacity and sector size. */ stat = cdrom_read_capacity(drive, &toc->capacity, §ors_per_frame, sense); if (stat) toc->capacity = 0x1fffff; set_capacity(info->disk, toc->capacity * sectors_per_frame); /* Save a private copy of te TOC capacity for error handling */ drive->probed_capacity = toc->capacity * sectors_per_frame; blk_queue_hardsect_size(drive->queue, sectors_per_frame << SECTOR_BITS); that will set drive->queue->hardsect_size to be the random value. hardsect_size is used to calculate inode->i_blkbits. later on, on a read path: void create_empty_buffers(struct page *page, unsigned long blocksize, unsigned long b_state) { struct buffer_head *bh, *head, *tail; head = alloc_page_buffers(page, blocksize, 1); bh = head; do { bh->b_state |= b_state; tail = bh; bh = bh->b_this_page; } while (bh); tail->b_this_page = head; alloc_page_buffers() will return NULL if blocksize > 4096. blocksize is calculed based on inode->i_blkbits. that will trigger a null dereference on create_empty_buffers(). Signed-off-by: Aristeu Rozanski Cc: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit a999337b49fcdd2c4a475e97e4b8337ebdfa4abf Author: Randy Dunlap Date: Wed Jan 23 02:39:39 2008 -0300 V4L/DVB (7078): radio: fix sf16fmi section mismatch isapnp_fmi_probe() is only called by fmi_init(), which is __init, so isapnp_fmi_probe() can also be __init. media/radio/radio-sf16fmi.c: WARNING: vmlinux.o(.text+0x994e19): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') WARNING: vmlinux.o(.text+0x994e22): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') WARNING: vmlinux.o(.text+0x994e3a): Section mismatch: reference to .init.data:id_table (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') Signed-off-by: Randy Dunlap Acked-by: Sam Ravnborg Signed-off-by: Mauro Carvalho Chehab commit 386900781205d203c1141d3e2dae759f1b531193 Author: Akinobu Mita Date: Mon Jan 21 12:15:19 2008 -0300 V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check This patch moves the subsystem ID and subsystem vendor ID check from probing function to the PCI generic function by describing subsystem IDs in pci_device_id table. This enables to add new PCI IDs to a device driver pci_ids table at runtime by new_id file in sysfs pci driver tree. Signed-off-by: Akinobu Mita Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit 4a2b108379743405bc488eaef6a75080aa1bbba4 Author: Patrick Boettcher Date: Fri Jan 25 07:32:58 2008 -0300 V4L/DVB (7075): Make a local function static Make a local function static Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 904a82e3e27b57a2518f7575c0cab9b6aaddc422 Author: Patrick Boettcher Date: Fri Jan 25 07:31:58 2008 -0300 V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel Tuning problem for 7Mhz channels fixes Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 3cb2c39ded029b8572cf7625b8042e9984d63c2c Author: Patrick Boettcher Date: Fri Jan 25 07:25:20 2008 -0300 V4L/DVB (7073): DiB7070: Reception quality improved Removing two bugs to improve sensitivity for DiB7070 and Dib7000P with MT2266. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit c52344fdc49665a4eeef24236750b49637d6982f Author: Olivier DANET Date: Fri Jan 25 06:50:07 2008 -0300 V4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM Here is a patch for Hauppage Nova-T-Stick and Nova-T-500 users. It sets the MT2060 IF1 frequency according to the calibration values stored in the EEPROM. It is supposed to enhance the signal quality, but, hey, there is no guarantee. Feedbacks would be much appreciated, to know whether it deserves being applied. Signed-off-by: Olivier DANET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit a162abb06bda3f38750a208e85e27f419798aa79 Author: Patrick Boettcher Date: Fri Jan 25 06:37:57 2008 -0300 V4L/DVB (7071): DiB0700: Start streaming the right way There was a mistake in the way how to start the streaming in the dib0700. This patch fixes that. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 853ea132c75ff2c4e3c3aaf61bf3ef5779774dbc Author: Soeren Moch Date: Fri Jan 25 06:27:06 2008 -0300 V4L/DVB (7070): Fix some tuning problems The attached patch solves all my vdr tuning problems on a dib7000p nova-t stick as far as I could check within the last weekend. It disables streaming while tuning, like that the number of faulty TS packets is reduced. Signed-off-by: Soeren Moch Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 13b83b5d516abe2610ae7812267d7d322050bf68 Author: Darren Salt Date: Fri Jan 25 06:20:02 2008 -0300 V4L/DVB (7069): Support for myTV.t Here's a roll-up which provides support for both this and the myTV.t. Signed-off-by: Darren Salt Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit c7637b1a31bb0470e1247f1923a323c90927ac37 Author: Tim Taubert Date: Fri Jan 25 06:16:36 2008 -0300 V4L/DVB (7068): Add support for WinTV Nova-T-CE driver Add support for WinTV Nova-T-CE driver Signed-off-by: Tim Taubert Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 3a0311c6c539bd022a65d298355471aacbd7a618 Author: Jose Alberto Reguero Date: Fri Jan 25 06:05:16 2008 -0300 V4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500 This patch fix autoserach in the Hauppauge NOVA-T 500. Signed-off-by: Jose Alberto Reguero Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 132c3188433bcb149ee764be1ca9a69f6d719dfe Author: Daniel Gimpelevich Date: Fri Jan 25 06:02:42 2008 -0300 V4L/DVB (7066): ASUS My Cinema U3000 Mini DVBT Tuner Adding support for ASUS My Cinema U3000 Mini DVBT Tuner Signed-off-by: Daniel Gimpelevich Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 7999a8161d06326f3c4cb797fcf0de8b2eb08253 Author: Yousef Lamlum Date: Fri Jan 25 05:51:48 2008 -0300 V4L/DVB (7065): Artec T14BR patches Added Artec T14BR support Signed-off-by: Yousef Lamlum Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 5ea60531c1c6164788ea7d6efecdf575adc543ff Author: Steven Toth Date: Thu Jan 24 22:29:46 2008 -0300 V4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware xc5000: Fix OOPS caused by missing firmware. Signed-off-by: Chaogui Zhang Acked-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 2fb8840663cf0e476549104a2c09caa0fb3b4bc9 Author: Tobias Lorenz Date: Fri Jan 25 05:14:57 2008 -0300 V4L/DVB (7062): radio-si570x: Some fixes and new USB ID addition - avoid poss. locking when doing copy_to_user which may sleep - RDS is automatically activated on read now - code cleaned of unnecessary rds_commands - USB Vendor/Product ID for ADS/Tech FM Radio Receiver verified (thanks to Guillaume RAMOUSSE) Signed-off-by: Tobias Lorenz Signed-off-by: Mauro Carvalho Chehab commit 8bf5e5ca394441e56f68300dc4e7b26b79ddfe0b Author: Tobias Lorenz Date: Fri Jan 25 04:19:48 2008 -0300 V4L/DVB (7061): radio-si470x: Some cleanups - code reordered to avoid function prototypes - switch/case defaults are now more user-friendly - unified comment style - applied all checkpatch.pl v1.12 suggestions except the warning about the too long lines with bit comments - renamed FMRADIO to RADIO to cut line length (checkpatch.pl) Signed-off-by: Tobias Lorenz Signed-off-by: Mauro Carvalho Chehab commit ed086314f4e41eb90a9107c7fb2737230686f668 Author: Mauro Carvalho Chehab Date: Thu Jan 24 06:59:20 2008 -0300 V4L/DVB (7060): em28xx: remove has_tuner has_tuner flag doesn't make much sense, since tuner_type=TUNER_ABSENT means the same thing. Having two ways to say that a tuner is not present is not nice, since it may lead to bad setups. In fact, with the previous code, if a device were using has_tuner=0, but the user forces a tuner, with modprobe option tuner=type, the modprobe option won't work. Also, tveeprom returns TUNER_ABSENT, when tuner is unknown or absent. So, with the previous logic, in this case, the driver should set has_tuner=0, or has_tuner=1 otherwise. Instead of adding several additional tests and setups, better just to remove .has_tuner. Signed-off-by: Mauro Carvalho Chehab commit 72e04f720f23cfa8d4400d832784f3a424379227 Author: Steven Toth Date: Tue Jan 22 01:03:10 2008 -0300 V4L/DVB (7059): cx88: Ensure the tuner is reset correctly Previous patches assume the tuner was on a different gpio. This patch corrects this. Signed-off-by: Steven Toth Signed-off-by: Chaogui Zhang Signed-off-by: Mauro Carvalho Chehab commit 9121106a7f149f9702ed7c2ac0d86e9feb54ede8 Author: Steven Toth Date: Tue Jan 22 01:00:33 2008 -0300 V4L/DVB (7058): IR corrections for the Pinnacle 800i IR corrections for the Pinnacle 800i Signed-off-by: Steven Toth Signed-off-by: Chaogui Zhang Signed-off-by: Mauro Carvalho Chehab commit 1641002bf56c1da265f2c49ea1c29baba997e63b Author: Michael Krufky Date: Mon Jan 21 12:01:34 2008 -0300 V4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners We already know that the XC5000 tuner can only be located at i2c address 0x61, 0x62, 0x63 or 0x64 We shouldn't display this warning if the XC5000 tuner is present. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 0f2ce9834246519e483e89dbc7225fe1fcbd30a8 Author: Michael Krufky Date: Mon Jan 21 10:55:37 2008 -0300 V4L/DVB (7055): make tuner names consistent with standard cases Change TDA9887 to tda9887. TDA8290 shall reflect the actual hardware present in its name, ie: tda8295+18271 tda8290+8275a Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 8cb9329309cfc6c922f46bfe05ed6f40d5b1cb56 Author: Luca Olivetti Date: Sun Jan 20 17:56:43 2008 -0300 V4L/DVB (7054): ansonic branded dvb-t usb stick support in the af9005 driver Marcos Melero (marcosmelero at gmail.com) reported he could make his dvb-t usb stick work with the af9005 driver by changing the device ids (10b9:6000). The stick is branded "Ansonic" (one of the brands of a spanish chain of supermarkets) with no other identification of the model. Since neither Marcos nor me know the OEM for the stick, in the attached patch I used Ansonic for the ids/description. Signed-off-by: Luca Olivetti Signed-off-by: Mauro Carvalho Chehab commit ed73683f06475531fb39e7ae9afe3011e4c5f8c1 Author: Michael Krufky Date: Sat Jan 19 17:41:04 2008 -0300 V4L/DVB (7052): tda18271: when tuning digital, the analog demod must be tri-stated Call analog_ops.standby during tda18271_set_params, to put the tda8295 in tri-state when tuning digital channels. Otherwise the tda8295 will interfere with the signal coming from the tda18271 into the digital demodulator. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 3473e342d79be938497a31caedd3c4e8d562485f Author: Mauro Carvalho Chehab Date: Mon Jan 7 10:45:47 2008 -0300 V4L/DVB (7051): Cleans up error handling on or51xxx_attach state is already NULL. Reviewed-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 4e8a23ea3c1333561f8d0f5daee53feee3e85b8a Author: Michael Krufky Date: Thu Jan 17 14:54:53 2008 -0300 V4L/DVB (7047): fix broken build when CONFIG_USB_SI470X is set Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4917019d190d9809287308c4866cbc47d6c1000b Author: Steven Toth Date: Tue Jan 15 21:57:14 2008 -0300 V4L/DVB (7046): Finalise support for the Pinnacle HD 8000i Correctly set the atatch structures, enable IR, configure the xc5000 tuner includes. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 73c993a8294077ae1b724286da8ac323c25d90db Author: Steven Toth Date: Sat Jan 5 17:08:05 2008 -0300 V4L/DVB (7045): xc5000: Small amount of cleanup and commenting xc5000: Small amount of cleanup and commenting, just for clarification. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 8c70017f5793e68ea48085a65008d713c9a85dde Author: Steven Toth Date: Sat Jan 5 16:55:45 2008 -0300 V4L/DVB (7044): XC5000: Fix support for HVR1500Q broken by patch 1 From Zhang: This patch fixes support for the HVR1500Q which was broken when the xc5000 analog patch was added. Patch committed as-is, cleanups to follows .... Steve Signed-off-by: Chaogui Zhang Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 60464da8b1ed8d7c19563f58cadb0ca990448a36 Author: Steven Toth Date: Sat Jan 5 16:53:01 2008 -0300 V4L/DVB (7043): New card supported(partially): Pinnacle 800i From Zhang: This patch continues the support for the Pinnacle HD 800i. Patch committed as-is, cleanups to follow ... Steve Signed-off-by: Chaogui Zhang Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 27c685a4b09b5e391023d769cddb97e4fcb3b9e1 Author: Steven Toth Date: Sat Jan 5 16:50:14 2008 -0300 V4L/DVB (7042): xc5000: Tuner analog support From Zhang: This an updated patch that adds analog support for the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i card (patches to follow). Patch commited as-is, cleanup to follow ... Steve. Signed-off-by: Chaogui Zhang Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit dfc1c08aab447d49230dacb390d3f2263584d28f Author: Steven Toth Date: Tue Jan 15 21:35:22 2008 -0300 V4L/DVB (7041): s5h1409: Bug fix for parallel support Parallel support was not working with the s5h1409 and the Pinnacle HD800i. This patch fixes the demodulator driver and ensures that all existing s5h1409 based products configure the demodulator correctly. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 387d447776484b6e1d08973337aa4c834ea7c6bc Author: Mauro Carvalho Chehab Date: Tue Jan 15 11:25:10 2008 -0300 V4L/DVB (7039): Reorder headers The backports weren't tested, but compile fine. Signed-off-by: Mauro Carvalho Chehab commit 78656acdcf4852547a29e929a1b7a98d5ac65f17 Author: Tobias Lorenz Date: Mon Jan 14 21:55:27 2008 -0300 V4L/DVB (7038): USB radio driver for Silicon Labs Si470x FM Radio Receivers this patch adds a new driver for the Silicon Labs Si470x FM Radio Receiver. It should also work for the identical ADS/Tech FM Radio Receiver (formerly Instant FM Music) as soon as I find out the USB Vendor and Product ID. The driver is inspired by several other USB and radio drivers, but mainly from the D-Link DSB-R100 USB radio (dsbr100.c). The USB stick currently has an Si4701 FM RDS radio receiver. But the other Si470x devices are pin and register compatible, so that in the future the driver can easily be patched to support these too. Therefore I named the driver radio-si470x and the configuration option usb-si470x. The driver itself just provides the control function over the radio. For getting audio back, the device support the USB audio class, which is implemented in the already existing driver. I tested the driver in the last days, until it now satisfies all my functionality and robustness requirements. The application I used for testing was kradio. Signed-off-by: Tobias Lorenz Signed-off-by: Mauro Carvalho Chehab commit 438468359e1db16a7d1925fc4f2519a044bbf7dd Author: Zoltan Devai Date: Mon Jan 14 13:24:38 2008 -0300 V4L/DVB (7037): Fix build breakage of the bttv driver, when advanced debugging is not enabled Signed-off-by: Zoltan Devai Signed-off-by: Mauro Carvalho Chehab commit f37fdf3ff744bffc35a8f1b9d7d655d8d88a0404 Author: Julia Lawall Date: Tue Jan 1 18:08:10 2008 -0300 V4L/DVB (7036): radio: Use video_device_release rather than kfree The file drivers/media/video/videodev.c defines both video_device_alloc and video_device_release. These are essentially just kzmalloc and kfree, respectively, but it seems better to use video_device_release, as done in the other media files, rather than kfree, in case the implementation some day changes. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // @@ type T,T1,T2; identifier E; statement S; expression x1,x2,x3; int ret; @@ T E; ... * E = video_device_alloc(...); if (E == NULL) S ... when != video_device_release(...,(T1)E,...) when != if (E != NULL) { ... video_device_release(...,(T1)E,...); ...} when != x1 = (T1)E when != E = x3; when any if (...) { ... when != video_device_release(...,(T2)E,...) when != if (E != NULL) { ... video_device_release(...,(T2)E,...); ...} when != x2 = (T2)E ( * return; | * return ret; ) } // Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab commit a2a9b1eceb50993ef9e126dffc2f678fd6602158 Author: Julia Lawall Date: Fri Jan 11 22:03:42 2008 -0300 V4L/DVB (7035): drivers/media/common: Add missing video_device_release Video_device_alloc returns the result of a kzalloc. In this case, the value is stored in a local variable which is not copied elsewhere before the point of the error return (video_register_device does not save its first argument anywhere if it returns a negative value). Thus, a video_device_release it needed before the error return. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // @@ type T,T1,T2; identifier E; statement S; expression x1,x2,x3; int ret; @@ T E; ... * E = video_device_alloc(...); if (E == NULL) S ... when != video_device_release(...,(T1)E,...) when != if (E != NULL) { ... video_device_release(...,(T1)E,...); ...} when != x1 = (T1)E when != E = x3; when any if (...) { ... when != video_device_release(...,(T2)E,...) when != if (E != NULL) { ... video_device_release(...,(T2)E,...); ...} when != x2 = (T2)E ( * return; | * return ret; ) } // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton CC: Oliver Endriss CC: Michael Hunold Signed-off-by: Mauro Carvalho Chehab commit bc835d80d9cd912cfa8beb6ad4549cd8160d3601 Author: Michael Krufky Date: Mon Jan 14 11:10:54 2008 -0300 V4L/DVB (7032): tda18271: tda18271_cal_on_startup should be declared static This module option variable is only handled within the file tda18271-fe.c - Declare this variable as static. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 99beeee9e927bf0c8d62e462a2fda86fa2c1450b Author: Michael Krufky Date: Sun Jan 13 20:02:52 2008 -0300 V4L/DVB (7030): Kconfig: add missing selections for VIDEO_PVRUSB2 VIDEO_PVRUSB2 must select: VIDEO_SAA711X, VIDEO_CX25840, VIDEO_MSP3400, and VIDEO_WM8775 Signed-off-by: Michael Krufky Acked-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 0f96251e7bfb2b2798f35e70efaa54bae65bfb9c Author: Michael Krufky Date: Sun Jan 13 22:01:07 2008 -0300 V4L/DVB (7029): tda18271: provide a choice whether to perform rf cal on init or on first tune If module option "cal" is set to 1, the ~22 sec rf tracking filter calibration sequence will be invoked on startup. Otherwise, the calibration will take place during the first tune. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 839c6c96d05894815b7af0dff22b710ce5a4373a Author: Michael Krufky Date: Sun Jan 13 18:29:44 2008 -0300 V4L/DVB (7028): tda18271: test RF_CAL_OK to see if we need additional RF calibration Test RF_CAL_OK to see if we need to perform the RF tracking filter calibration after returning from standby. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 518d87399baee908b0353bc0ef7d41c3c46295ec Author: Michael Krufky Date: Sun Jan 13 17:01:01 2008 -0300 V4L/DVB (7027): tda18271: put the device in standby mode during sleep() Add function, tda18271_set_standby_mode. During sleep, enter standby mode with slave tuner output enabled, loop through on and xtal oscillator on. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6bfa6657246013bf999fecda0874105441f6ecb5 Author: Michael Krufky Date: Mon Jan 7 00:51:48 2008 -0300 V4L/DVB (7026): tda18271: report when the RF tracking filter calibration has completed Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6200bbaa5bd8b6751931364dfa4aa1cdd5efa686 Author: Thierry MERLE Date: Thu Jan 10 18:20:34 2008 -0300 V4L/DVB (7024): usbvision: YUV to RGB conversion fixes All YUV to RGB conversions in usbvision were reverted (conversion to BGR but saying RGB to the application) Signed-off-by: Thierry MERLE Acked-by: Dwaine Garden Signed-off-by: Mauro Carvalho Chehab commit 1f8d30083abc17897b897787c39d446eb9d99fe0 Author: Mauro Carvalho Chehab Date: Sun Jan 13 19:40:30 2008 -0300 V4L/DVB (7023): Fix a regresion left by changeset 7e65d6e8f6df Changeset 7e65d6e8f6df removed a very bad hack on mmap(). However, the fixes weren't considering usermap and overlay memory models. This were breaking direct reading from /dev/video?, used mostly by mpeg aware drivers. Thanks to Steven Toth for reporting the issue and bissecting it. Signed-off-by: Mauro Carvalho Chehab commit dfd8c04ec14b88bc2849e62d6ff9e36f31352b60 Author: Mauro Carvalho Chehab Date: Sun Jan 13 19:36:11 2008 -0300 V4L/DVB (7022): Fix timestamp presentation on vivi driver Due to date overflow, vivi were not working fine anymore. Signed-off-by: Mauro Carvalho Chehab commit c8793b035df7b18997d1cf34254064dac166f009 Author: Mauro Carvalho Chehab Date: Sun Jan 13 15:42:17 2008 -0300 V4L/DVB (7021): Move all board specific configuration to em28xx-cards.c This cleanup moves the board-specific configurations to em28xx-cards.c. Signed-off-by: Mauro Carvalho Chehab commit 15b9becc68793209a2afd6c580bf71a71fee90a6 Author: Mauro Carvalho Chehab Date: Sun Jan 13 12:02:20 2008 -0300 V4L/DVB (7020): Add USB ID for a newer variant of Hauppauge WinTV USB2 Thanks to Jeroen Janssen Signed-off-by: Mauro Carvalho Chehab commit ec16dae5453eafd1586f35c4ec1ef854e5a808e0 Author: Jaime Velasco Juan Date: Sat Jan 12 06:48:14 2008 -0300 V4L/DVB (7019): V4L: add support for Syntek DC1125 webcams This driver supports cameras with USB ID 174f:a311 or 05e1:0501, and the ov965x sensors. These devices are found in some Asus laptops and probably somewhere else. It is based on the stk11xx driver written by Nicolas Vivien Signed-off-by: Jaime Velasco Juan Signed-off-by: Mauro Carvalho Chehab commit b6667e5fb8c478e65768fdb18fa6576ac1634068 Author: Hermann Pitton Date: Sat Jan 12 14:43:48 2008 -0300 V4L/DVB (7017): saa7134: add MSI TV@nywhere Plus with the older tda8275 tuner Thanks go to Mark Schultz for the initial contribution and to Dean Hilkewich for testing it again. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab commit a28cb828ef9ba6669be738dd9affbaba65cc07fb Author: Hermann Pitton Date: Sat Jan 12 14:31:03 2008 -0300 V4L/DVB (7016): saa7134: remove the Avermedia Super 007 from eeprom detection saa7134: remove the Avermedia Super 007 from eeprom detection The card made it into the Philips' Tigers eeprom detection and falls through. Since it has attracted already others to follow, which are wrongly identified as TIGER_S then, move it to the usual analog initialization. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab commit 4513fc696e273d64ea32f2366748aed810316ecc Author: Steven Toth Date: Sat Jan 12 11:36:36 2008 -0300 V4L/DVB (7014): cx23885: dprintk macro cleanup Added missing do { } while (0) Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit d685a483b8c92e3d0580b6c28e2ed531391c8c46 Author: Brett T. Warden Date: Thu Jan 10 04:33:31 2008 -0300 V4L/DVB (7013): bw-qcam: add module parameter 'force_init' to skip polite auto-detection prior to direct initialization Setting force_init=1 bypasses the friendly auto-detection by polling the status register, and instead attempts to initialize the qcam directly. Not friendly to other parallel devices, but much more reliable than the auto-detection. Signed-off-by: Brett T. Warden Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit a19602f26a24c32e491108b49790b106a6351f24 Author: Steven Toth Date: Thu Jan 10 11:43:18 2008 -0300 V4L/DVB (7011): cx23885: Cleanup of compiler defines and warnings Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 21a78091921915cd1afd0edb2940dd726edefe9b Author: Steven Toth Date: Thu Jan 10 04:38:59 2008 -0300 V4L/DVB (7010): cx23885: Small cleanup cx23885: Small cleanup Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit e47f30b140333525ea682ec672641b470da1e599 Author: Steven Toth Date: Thu Jan 10 04:25:59 2008 -0300 V4L/DVB (7009): cx23885: Video and VBI related files cx23885: Video and VBI related files. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit a57ed8a1f7381aa7e1bec6c55d5f119706f2982d Author: Steven Toth Date: Thu Jan 10 03:43:11 2008 -0300 V4L/DVB (7008): s5h1409: Ensure the silicon is initialized during attach If not it impacts on analog tuner quality. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 7b8880140ff6aec6a5bec7929b03ce0b96a7c79a Author: Steven Toth Date: Thu Jan 10 03:40:49 2008 -0300 V4L/DVB (7007): cx23885: Add basic video support for the HVR1800 This enabled basic preview NTSC and PAL support for the HVR1800. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit c771261330c90b7c77f686a1aa0fb4f756e07b5f Author: Steven Toth Date: Thu Jan 10 02:24:27 2008 -0300 V4L/DVB (7006): cx23885: Track the board clock frequency and allow overrides The cx23885/6/8 all have different clock rates, this patch allows the core to compensate, and developers to allow vendor specific overrides. This patches will be used by future analog video and encoder patches. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 69ad6e56bade948793957a295b3bf1376cffdf65 Author: Steven Toth Date: Thu Jan 10 02:16:41 2008 -0300 V4L/DVB (7005): cx23885: SRAM reallocation prior to analog video implementation We need to clear space large enough for the video and encoder fifos. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 5206d6ec36e2c66090c3c02c95b8d70c356a9ad3 Author: Steven Toth Date: Thu Jan 10 02:09:27 2008 -0300 V4L/DVB (7004): cx23885: Ensure HVR1800 TDA8295A is reset fully on module load Failure to do this means that a full system reboot is required if the part hangs. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 0ac5881aefc2dab8b3535c2e44fee6628acaf787 Author: Steven Toth Date: Thu Jan 10 02:06:35 2008 -0300 V4L/DVB (7003): cx23885: Add support for device revision detection Each version of the cx23885/7/8 silicon has different build revs. We'll use this internal revision to work around bugs and known issues in the video and encoder related patches. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit f234081bc564c69eb0e2cd4e957ad1cbae4a6144 Author: Steven Toth Date: Thu Jan 10 01:22:39 2008 -0300 V4L/DVB (7002): cx25840: Add basic CX23885 AVCore support The cx23885/7/8 PCIe bridge has an internal AVCore modelled on the cx2584x family. Many of the registers positions are identical but some moved. The register values are also different because the different bridges run at different clock rates. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit d05051c82e0e8ff748e9c9a06a061bda3ad656e5 Author: Mauro Carvalho Chehab Date: Thu Jan 10 07:33:03 2008 -0300 V4L/DVB (6997): Replace a very dirty hack on videobuf for a clean wait_event In order to videobuf_iolock to work, mmap_mapper should be called first. Otherwise, an OOPS is generated. On some cases, .mmap file handler used to took some time to be called. On those situations, mmap_mmapper() were called after iolock. This patch properly waits for mmap_mapper to be called, otherwise generating an error. Signed-off-by: Mauro Carvalho Chehab commit c6243d9c3de82e46467c88898db45ca14b6843a0 Author: Thierry MERLE Date: Wed Jan 9 17:34:53 2008 -0300 V4L/DVB (6995): ubvision: add adjust_X_Offset/adjust_Y_Offset parms Add adjust_X_Offset/adjust_Y_Offset module parameters to allow users to tune X and Y picture offsets for their almost-working tuners without repetitive recompilation. Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit eeec4b3853a8af0cd2b42af24b9e8fd0e0ef1f8a Author: Thierry MERLE Date: Wed Jan 9 17:33:53 2008 -0300 V4L/DVB (6994): usbvision: add Pinnacle Studio PCTV USB (NTSC) FM V3 Add the "Pinnacle Studio PCTV USB (NTSC) FM" device. This is the third occurrence of the same device designation... Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit e9ca1c79f2868d26c3e74ff3f20d5fa7d30724c5 Author: Mauro Carvalho Chehab Date: Wed Jan 9 21:35:56 2008 -0300 V4L/DVB (6993): Fix CARDLIST.saa7134 Signed-off-by: Mauro Carvalho Chehab commit 6d8ea8621f49a1cc486de4bf893db9743d0577bf Author: hermann pitton Date: Mon Jan 7 22:36:09 2008 -0300 V4L/DVB (6992): saa7134: remove Beholder devices without eeprom from auto detection As in the past, we should not allow to auto detect like this, since all saa7130 and saa7134 cards without eeprom will be detected as such Beholder cards then. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab commit 006ed1ecf2c62659e5dd902350a7eb209b8a5257 Author: Michael Krufky Date: Wed Jan 9 10:44:27 2008 -0300 V4L/DVB (6989): tda18271: clean up chip id logic in tda829x_release This test is easier to read. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit cf04d29c4868a783b3e994e4a19f78ce22ba2d93 Author: Michael Krufky Date: Wed Jan 9 00:34:30 2008 -0300 V4L/DVB (6988): tda18271: give calibration debug a separate debug mask We don't usually want to see the calibration debug messages, but sometimes it is useful. Assign it to a separate debug mask. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit c353f42f752d9b47661ff83b947986f6de948b61 Author: Michael Krufky Date: Tue Jan 8 10:38:10 2008 -0300 V4L/DVB (6987): tda18271: add support for fm radio Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit a4f263b587573f47cc6bc7ad85e5f650169d48f6 Author: Michael Krufky Date: Sun Jan 6 15:52:56 2008 -0300 V4L/DVB (6986): tda18271: share state between analog and digital tuner instances Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit b3d98135aa6e462d7e3f42a86d12483a9003a4da Author: Mauro Carvalho Chehab Date: Mon Jan 7 09:30:31 2008 -0300 V4L/DVB (6981): Fix bugzillas 9686 and 9691 IR were not working for Winfast XP 2000 TV. Gabor Nyekhelyi wrote a hack some time ago: http://marc.info/?l=linux-video&m=116362609323281&w=2 This patch fixes CodingStyle and commits the hack. I suspect that the proper solution would be to find the proper mask_keydown for this IR. Anyway, better to have this patch as a workaround. Thanks to Stafan Talpalaru for pointing the issue. CC: Gabor Nyekhelyi CC: Stafan Talpalaru Signed-off-by: Mauro Carvalho Chehab commit 8d316bf54b2a1965f9460d0ad9d80850d2c7afb3 Author: Michael Krufky Date: Sun Jan 6 15:31:35 2008 -0300 V4L/DVB (6979): tda18271: use a mutex to protect state in critical sections Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit ccbac9bb174db457181f5f58fecf9cbc3020ea1d Author: Michael Krufky Date: Sun Jan 6 00:55:21 2008 -0300 V4L/DVB (6978): tda18271: store frequency and bandwidth after successful tune Store last tuned frequency & bandwidth after successful tune. Clean up tune functions -- remove pointer to tune function in state structure, instead call tune function based on priv->id. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 09f83c4fc06b02597ad4458c2a6675b0872f0b5c Author: Michael Krufky Date: Sat Jan 5 20:00:09 2008 -0300 V4L/DVB (6977): tda18271: clean up calibration initialization procedures Always initialize registers during attach. Perform IR Calibration during init if needed. Perform RF Calibration during init if needed for C2, only. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 98512f7b36ec412ea0461e9aab8f16c882df055d Author: Andrew Morton Date: Mon Jan 7 05:24:51 2008 -0300 V4L/DVB (6976): drivers/media/radio/radio-sf16fmr2.c: fix error handling video_register_device() returns -EFOO on errr, not -1. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9699 Reported-By: Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 1434bc0cbb842ed71eada244ac46185e3b17e4e2 Author: Mauro Carvalho Chehab Date: Mon Jan 7 05:20:04 2008 -0300 V4L/DVB (6975): Add missing entry for Beholder BeholdTV 407 Acked-by: Andrey J. Melnikov Signed-off-by: Mauro Carvalho Chehab commit 616f8878bc5b5b2276f1941643d9ca7c88690305 Author: Mauro Carvalho Chehab Date: Mon Jan 7 05:18:36 2008 -0300 V4L/DVB (6974): Fix codingStyle Signed-off-by: Mauro Carvalho Chehab commit e8018c9e78b0ff4bb0290e46f4045fb4ea589ae8 Author: Andrey J. Melnikoff (TEMHOTA) Date: Mon Jan 7 05:17:39 2008 -0300 V4L/DVB (6973): Add Beholder TV 401/405/407/409/505/507/609/M6 support This patch updates cardlist for Beholder TV tuners: old models (with GPIO ir) 401, 403, 405, 407, 409, 505, 507 and add support for 607, 609, M6 cards with new i2c-ir. Signed-off-by: Igor Kuznetsov Signed-off-by: Andrey J. Melnikov Signed-off-by: Mauro Carvalho Chehab commit 3f4dfe2acf4ffed48395e69166531d8925eb106a Author: Mauro Carvalho Chehab Date: Sun Jan 6 09:54:17 2008 -0300 V4L/DVB (6970): Request snd-usb-audio for devices with Audio Class support Before this patch, only Vendor Class audio support were loaded. This means that older em28xx devices won't have digital audio support loaded. This patch changes the logic to auto load eighter snd-usb-audio, for devices with USB Audio Class or em28xx-alsa, for devices with USB Vendor Class. Signed-off-by: Mauro Carvalho Chehab commit a4950134d46f0b83745f05ea37987785a3905eba Author: Mauro Carvalho Chehab Date: Sun Jan 6 09:45:44 2008 -0300 V4L/DVB (6969): Avoid causing regressions for non-HVR950 boards Only HVR950 has analog_gpio configured. It makes no sense to set gpio to 0 for other boards. Better to add a test, while this var is not set for all xc3028 devices. Signed-off-by: Mauro Carvalho Chehab commit 11fcd4703004fc8c9030ba45dda8ad74a431d235 Author: Michael Krufky Date: Thu Oct 25 02:01:10 2007 -0300 V4L/DVB (6967): pvrusb2: add support for Hauppauge WinTV PVR-USB2 Model 75xxx Create a device description and enable autodetection for Hauppauge WinTV PVR-USB2 Model 75xxx Signed-off-by: Michael Krufky Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit d2c932a1f7aca16727ce6670c5eccb0a4e2b47a5 Author: Michael Krufky Date: Sat Jan 5 15:42:54 2008 -0300 V4L/DVB (6965): tda18271: fix analog tuning regression caused by earlier changeset An earlier patch, "tda18271: fail table lookups if frequency is out of range" broke analog support on certain hardware. This patch fixes that problem, by allowing the RF_CAL byte to be set to the maximum value, in cases of the frequency being out of range. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 0e1fab90a8a76e09b669d3159ec910eab7ee97d6 Author: Michael Krufky Date: Thu Jan 3 01:40:47 2008 -0300 V4L/DVB (6964): tda18271: document debug level and configuration parameters Document debug level module options and tda18271_config attach-time parameters. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2ba65d517b91ebb30f4f2a88f1e1beeabd8d8ee6 Author: Michael Krufky Date: Thu Jan 3 01:17:45 2008 -0300 V4L/DVB (6963): tda18271: store IF frequency in a u16 instead of u32 Store IF Frequency in a u16 instead of a u32. Multiply by 1000 before use. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f21e0d7f0513e743b14df3197fdeeb9a9b7edbb2 Author: Michael Krufky Date: Wed Jan 2 03:01:54 2008 -0300 V4L/DVB (6962): tda18271: allow device-specific configuration of IF frequency and std bits Allow drivers to pass device-specific configuration parameters during attach. If these parameters are omitted, default values will be used. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 59067f7ed491ec95e6e9033e35e1ae726cff3cee Author: Michael Krufky Date: Wed Jan 2 01:58:26 2008 -0300 V4L/DVB (6961): tda18271: move common code to tda18271-common.c Move some common code to a new file to make this easier to look at. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 255b5113b4ed683898a24e381155c081f03411f7 Author: Michael Krufky Date: Tue Jan 1 22:52:09 2008 -0300 V4L/DVB (6960): tda18271: add support for NXP TDA18271HD/C2 Tested successfully with QAM256 digital cable. Analog television is limping, needs more work. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit dec9ccceef9bfd5f3cccc79e90b09f6c31ed3279 Author: Michael Krufky Date: Wed Jan 2 01:35:46 2008 -0300 V4L/DVB (6959): tda18271: add MODULE_VERSION version 0.1 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 95af8a26cba55222d6a1beda7970431b4fbbbdd6 Author: Michael Krufky Date: Tue Jan 1 18:31:34 2008 -0300 V4L/DVB (6958): tda18271: clean up function tda18271_set_analog_params make set_analog_params function look consistent with set_params function Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 33f25b42753f464c5927e8b828352333780c14bd Author: Michael Krufky Date: Sat Dec 29 21:46:01 2007 -0300 V4L/DVB (6957): tda18271: fail table lookups if frequency is out of range Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 0be4375410f1ecc917f3c0caf8f98908d357c93f Author: Mauro Carvalho Chehab Date: Sat Jan 5 17:22:01 2008 -0300 V4L/DVB (6956): Add Radio support for em28xx Signed-off-by: Mauro Carvalho Chehab commit 3abee53e4402b6ae39e1e610f9ef94eb74097138 Author: Mauro Carvalho Chehab Date: Sat Jan 5 17:01:41 2008 -0300 V4L/DVB (6955): Properly implement 12MHz I2S support Signed-off-by: Mauro Carvalho Chehab commit 0f6dac18ccc6fb0c95f3e0269e60239661c9b4c5 Author: Mauro Carvalho Chehab Date: Sat Jan 5 16:47:16 2008 -0300 V4L/DVB (6954): There isn't a MTS radio firmware Try to load non-MTS firmware instead. Signed-off-by: Mauro Carvalho Chehab commit e545d6e2760b51163da141caffd288572c2db08d Author: Mauro Carvalho Chehab Date: Sat Jan 5 16:37:04 2008 -0300 V4L/DVB (6953): Fix radio set frequency logic Signed-off-by: Mauro Carvalho Chehab commit d7448a8d9d06ca2ca4fd1f17404450ecba8bea3a Author: Mauro Carvalho Chehab Date: Sat Jan 5 09:59:03 2008 -0300 V4L/DVB (6952): Add code for autoloading em28xx-alsa, if needed Older em28xx devices does implement standard Audio Class. However, on newer devices, this were replaced by a Vendor Class. This patch autodetects that an em28xx lacks Audio Class and auto-loads em28xx-alsa, for the devices that implements only a Vendor Class. For devices with Audio Class, snd-usb-audio module will provide an ALSA interface. This patch uses the request_module_async function as defined on cx88-mpeg.c, originally wrote by Markus Rechberger. Signed-off-by: Mauro Carvalho Chehab commit 6d79468dd8537530f4150e76ed9b4b63f80571c6 Author: Mauro Carvalho Chehab Date: Sat Jan 5 09:57:31 2008 -0300 V4L/DVB (6951): Integrates em28xx-audio.c into em28xx kernel module Also fixes the remaining CodingStyle issues that Lindent didn't fix. Signed-off-by: Mauro Carvalho Chehab commit 1a6f11e0e8db9e76ef34bc6731d5291e4df1ba37 Author: Mauro Carvalho Chehab Date: Sat Jan 5 09:56:24 2008 -0300 V4L/DVB (6950): Lindent em28xx-audio.c Signed-off-by: Mauro Carvalho Chehab commit a52932b405f23082f78ff12f4dd3e1741fcaab6f Author: Markus Rechberger Date: Sat Jan 5 09:55:47 2008 -0300 V4L/DVB (6949): Adds em28xx-audio module em28xx-audio module exports em28xx Vendor Class audio as an -alsa driver. This module were written based on usbaudio driver by Markus Rechberger. Recently, he acked to allow us to merge it on kernel: http://lists-archives.org/video4linux/20408-supporting-prolink-pixelview-405-dvd-maker.html Thanks to Markus Rechberger Signed-off-by: Mauro Carvalho Chehab commit 74f38a82376fb1b289d0957429ba45349f0cad62 Author: Mauro Carvalho Chehab Date: Sat Jan 5 09:54:58 2008 -0300 V4L/DVB (6948): HVR950 requires additional settings for audio to properly work Thanks to Markus Rechberger for retriving those commands. Also, MTS firmware is required for audio to work on HVR950. Signed-off-by: Mauro Carvalho Chehab commit 539c96d0fd86bfdcfac75c88b74aa5798439293d Author: Mauro Carvalho Chehab Date: Sat Jan 5 09:53:54 2008 -0300 V4L/DVB (6947): Improve audio setup handling It is possible to select audio inputs via em28xx or via ac97 functions. This patch allows configuring a board to use either one way. It also do some cleanups at audio setup configurations. Signed-off-by: Mauro Carvalho Chehab commit 6596a4f6032f13f1bef47550fcf1d4134cd978a4 Author: Mauro Carvalho Chehab Date: Tue Jan 1 14:43:02 2008 -0300 V4L/DVB (6944): Fix in-kernel ivtv compilation Due to tuner-xc2028.h, some extra directories should be added at .h search. Signed-off-by: Mauro Carvalho Chehab commit a594dcba943a2edc484ed83f694c27306bf5e28e Author: Mauro Carvalho Chehab Date: Mon Dec 31 02:29:46 2007 -0300 V4L/DVB (6938): Add a tool for extracting xc3028 version 2.7 firmware This tool allows the extraction of xc3028 v2.7 firmware from HVR 12x0 file. Signed-off-by: Mauro Carvalho Chehab commit 29a7b4cb44336a8ef85cb1d283dc6efd4cf0fa12 Author: Michael Krufky Date: Thu Dec 27 22:22:16 2007 -0300 V4L/DVB (6936): cx23885: update model matrix for Hauppauge HVR1500 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit b00fff0be5655614bb18a4b1d6e33b27c56c6f7e Author: Michael Krufky Date: Thu Dec 27 22:19:31 2007 -0300 V4L/DVB (6935): cx23885: add missing subsystem IDs for Hauppauge HVR1500 Retail Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 68370cf94e2511aeda3b7cb8490692570a8c9dab Author: Michael Krufky Date: Thu Dec 27 22:02:38 2007 -0300 V4L/DVB (6934): cx23885: update model matrix for Hauppauge HVR1250 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6a0a962cbc2c52fad556692eabda563a01c9966c Author: Michael Krufky Date: Thu Dec 27 21:47:50 2007 -0300 V4L/DVB (6933): cx23885: update model matrix for Hauppauge HVR1800 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6ccb8cfbb94cc82144a92a6a28a754d9772b3aa8 Author: Michael Krufky Date: Thu Dec 27 21:46:34 2007 -0300 V4L/DVB (6932): cx23885: add missing subsystem ID for Hauppauge HVR1800 Retail Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 71bc9bd96b342cd29bbeaa4c83b8d37759ff22d7 Author: Steven Toth Date: Thu Dec 27 14:33:30 2007 -0300 V4L/DVB (6930): xc5000: Removed erroneous defines Basic cleanup. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit b92bf0f6a94b73a1b8bd0023b1fa642d13b01a76 Author: Michael Krufky Date: Tue Dec 25 18:54:22 2007 -0300 V4L/DVB (6928): tda18271: break calculation functions out of tda18271_tune Break out the following new functions from tda18271_tune: tda18271_calc_bp_filter tda18271_calc_km tda18271_calc_rf_band tda18271_calc_gain_taper tda18271_calc_ir_measure tda18271_calc_rf_cal Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 182519f4c99f73f376323580dda494d986b4760b Author: Michael Krufky Date: Tue Dec 25 15:10:11 2007 -0300 V4L/DVB (6927): tda18271: improve printk macros Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2f27dfc98cc0a183be9e3c2fc0da0450b85e5fde Author: Michael Krufky Date: Tue Dec 25 00:39:37 2007 -0300 V4L/DVB (6926): tda18271: consolidate table lookup functions Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit d37142102a2adaa3391a384ea6a780afb5804789 Author: Michael Krufky Date: Mon Dec 24 14:38:41 2007 -0300 V4L/DVB (6925): tda18271: move state structures to tda18271-priv.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7686b574a1507ecf5fd7c419b43f26222668aa4d Author: Michael Krufky Date: Mon Dec 24 21:03:52 2007 -0300 V4L/DVB (6924): tda18271: fix whitespace in tda18271_ir_measure Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 926bf3ca937461123b98ff2ba8c3409f5b4c05b5 Author: Michael Krufky Date: Mon Dec 24 14:14:03 2007 -0300 V4L/DVB (6923): tda18271: remove extraneous debug We don't need to do a dbg_info during tda18271_attach anymore, since the tda18271_get_id function will call dbg_info with the same information and more. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 8574ac690eab730a3ff735177af1d52e45e36c8b Author: Michael Krufky Date: Mon Dec 24 15:49:33 2007 -0300 V4L/DVB (6921): include/media/v4l2-i2c-drv.h must #include Fix the following compiler error: v4l2-i2c-drv.h:72: error: implicit declaration of function 'v4l2_i2c_attach' Also, prevent multiple inclusions of v4l2-i2c-drv.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 67d52e29032dd2f21d4080331f47a21205f337f6 Author: Michael Krufky Date: Mon Dec 24 16:05:39 2007 -0300 V4L/DVB (6920): tuner: fix backwards logic in check for set_config tuner-core was checking if analog_ops->set_config is set. If set, it would complain that it isn't. Fix this backwards logic to the proper behavior. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit de7234bb05a8498c5092385d3f1dd9e73cd332d0 Author: Michael Krufky Date: Wed Dec 26 13:04:08 2007 -0300 V4L/DVB (6919): Kconfig: VIDEO_CX23885 must select DVB_TUNER_XC5000 if !DVB_FE_CUSTOMIZE Everybody forgets to add the Kconfig stuff after they add new card support :-/ Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 3e509c76047781525c38fde1e0fa244470c7663c Author: Hans Verkuil Date: Mon Dec 24 10:41:47 2007 -0300 V4L/DVB (6917): ivtv: small textual update Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d998cc6a6d8e7da19ecadded55e373a84b1b4463 Author: Jean Delvare Date: Sat Dec 22 18:28:22 2007 -0300 V4L/DVB (6915): ivtv: drop an incorrect comment Signed-off-by: Jean Delvare Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9134be0376e7527afa4f2574253ff02ca80d5b47 Author: Mauro Carvalho Chehab Date: Thu Dec 27 22:28:31 2007 -0300 V4L/DVB (6914): Fix a few issues at the bttv conversion bttv driver is working as previously. An additional gain of about 1,5Kb were obtained with the driver conversion to vidioc_ioctl2: text data bss dec hex filename 89208 40244 57556 187008 2da80 old/bttv.ko 88960 38740 57556 185256 2d3a8 new/bttv.ko (measured on a x86_64) Signed-off-by: Mauro Carvalho Chehab commit 04a94d3ca25030d7c1fa27f3db3b90eb5a7985b0 Author: Mauro Carvalho Chehab Date: Thu Dec 27 22:23:34 2007 -0300 V4L/DVB (6913): Preserve the previous order to make easier to check the conversion Signed-off-by: Mauro Carvalho Chehab commit e5ae3db461f2de1f4fb455bc73c059c0b97b1230 Author: Mauro Carvalho Chehab Date: Thu Dec 27 22:22:59 2007 -0300 V4L/DVB (6912): Replace vidioc_ to bttv_ Since there are a few vidioc_ functions that were exported, rename those functions to bttv_ in order to avoid poluting namespace. The other functions were also renamed, to standardize inside the driver. Signed-off-by: Mauro Carvalho Chehab commit 402aa76aa5e57801b4db5ccf8c7beea9f580bb1b Author: Douglas Schilling Landgraf Date: Thu Dec 27 22:20:58 2007 -0300 V4L/DVB (6911): Converted bttv to use video_ioctl2 Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 4041f1a58774249f5f26163e68b844521ece1fb4 Author: Michael Krufky Date: Mon Dec 24 04:52:08 2007 -0300 V4L/DVB (6909): cx23885: fix bad use count caused by tda18271 being probed by tda8290 Don't allow the tda8290 module to probe and attach the tuner module, causing incorrect use counts when using dvb_attach. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit c90762799c42df203fc2c9c1a2ac39f154f8faca Author: Michael Krufky Date: Mon Dec 24 04:36:14 2007 -0300 V4L/DVB (6908): tda8290: add the option not to probe for tuners passed into tda829x_config Prevent the tda8290 module from probing for tuners during tda829x_attach, by passing: .probe_tuner = TDA829X_DONT_PROBE, ...in struct tda829x_config Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit fe0bf6d783d8057bd3dd0dd69613a390d6986c47 Author: Michael Krufky Date: Mon Dec 24 05:05:05 2007 -0300 V4L/DVB (6907): tda18271: create separate calc_pll functions Consolidate duplicated code by creating functions: tda18271_calc_main_pll tda18271_calc_cal_pll Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f0bd504fb91c8929bfbacbad759a8e3fe572589f Author: Michael Krufky Date: Mon Dec 24 04:35:21 2007 -0300 V4L/DVB (6906): tda18271: rename tda18271_calc_* functions to tda18271_lookup_* Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 49e7aaf0ff14a270f3c481ab200dcf361c4155a5 Author: Michael Krufky Date: Mon Dec 24 04:15:20 2007 -0300 V4L/DVB (6905): tda18271: check ID register during attach Identify the silicon during attach, return NULL if unsupported device. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7e946c8a4242e3ed944cececddd3f2294299ed65 Author: Michael Krufky Date: Mon Dec 24 03:47:30 2007 -0300 V4L/DVB (6904): tda18271: divider byte 1, bit 7 is always 0 Bit 7 of both Main Divider byte 1 and Cal Divider byte 1 is always zero. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 994fc28b6cd087cf6ef8d3ebd4eeef97c8194e4e Author: Matthias Schwarzott Date: Mon Dec 24 07:12:55 2007 -0300 V4L/DVB (6903): mt312: CodingStyle fix Fixes all occurences of assignment in if checkpatch marks them as ERROR. Signed-off-by: Matthias Schwarzott Reviewed-by: Andreas Oberritter Signed-off-by: Mauro Carvalho Chehab commit 478f42292df86a618afbe3c22d11cf08c036d413 Author: Michael Krufky Date: Sat Dec 22 17:56:25 2007 -0300 V4L/DVB (6901): Kconfig: VIDEO_CX23885 selects TUNER_TDA8290 and DVB_TDA18271 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 3ba71d2194500d1a9fef1b8491b9e0c168e7d46e Author: Michael Krufky Date: Fri Dec 7 01:40:36 2007 -0300 V4L/DVB (6900): cx23885: enable EZ-QAM mode for Hauppauge WinTV HVR-1800 Add module option 'alt_tuner' disabled by default. When set to one, the dvb_frontend of HVR1800 will consist of: s5h1409 demod + tda18271 tuner When set zero (default), the dvb_frontend of HVR1800 will consist of: s5h1409 demod + mt2131 tuner If the tda18271 is used in digital mode, you will not be able to tune an analog channel at the same time. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4cd8a7bd65a29c5b7833de177622cb2534d5e868 Author: Michael Krufky Date: Sat Dec 22 16:59:08 2007 -0300 V4L/DVB (6899): Kconfig: VIDEO_CX23885 must select TUNER_XC2028 if !DVB_FE_CUSTOMIZE Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 07b4a835d42d6d59e84cbafdc8b7090f97d7b67a Author: Michael Krufky Date: Tue Dec 18 01:09:11 2007 -0300 V4L/DVB (6898): cx23885: add support for Hauppauge WinTV HVR-1500 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit ef207feddf826f099562b239543c447e68991b84 Author: Chris Pascoe Date: Sun Dec 2 09:30:55 2007 -0300 V4L/DVB (6897): xc2028: ignore HAS_IF during specific S-Code type searches If we are selecting the S-Code firmware to load by name, then we must mask off the HAS_IF bit during the search. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 0e614cd1a5a09b36a3b6d0fff8a08a97800d3cce Author: Hans Verkuil Date: Fri Dec 21 21:33:36 2007 -0300 V4L/DVB (6896): ivtv: add XC2028 support for Club3D cards Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f51451b516eeb19d3c1ea311ee8845fc80b5135 Author: Michael Krufky Date: Fri Dec 21 16:20:23 2007 -0300 V4L/DVB (6894): xc5000: fix build warning Fix the following build warning: xc5000.c:560: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' On many architectrues size_t is unsigned long, and may not be printed with %d. Use %Zu instead. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7972f9880c8c812332a56da7cfa4523d01ea310b Author: Michael Krufky Date: Fri Dec 21 16:12:09 2007 -0300 V4L/DVB (6893): tuner-xc2028: fix xc2028_attach function xc2028_attach was returning an integer when disabled from the build, where it should instead be returning NULL. Declare xc2028_attach as type dvb_frontend * instead of void *. The prototype declaration must be marked as extern in the header. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit fb6d8e2c7fe1667d8ce057e333b18deb91191be5 Author: Michael Krufky Date: Fri Dec 21 16:00:45 2007 -0300 V4L/DVB (6892): xc5000: fix build when DVB_TUNER_XC5000 is disabled Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 26501a703d9eca3b42d793d2e2553c33744097b9 Author: Michael Krufky Date: Fri Dec 21 14:28:46 2007 -0300 V4L/DVB (6890): tda18271: fix typo in RF tracking filter calibration We want to set bits 1 & 2 on easy programming byte 4, not extended byte 4. Thanks to David Wong for pointing this out. Signed-off-by: Michael Krufky Cc: David Wong Signed-off-by: Mauro Carvalho Chehab commit 2800b439e090aa06194dbbfb939cd259b74c42a3 Author: Steven Toth Date: Thu Dec 20 01:20:38 2007 -0300 V4L/DVB (6888): Add Hauppauge tuner type 150 defintion Add Hauppauge tuner type 150 defintion. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 6df9366857335c6406659ce31554b103a00c3b96 Author: Steven Toth Date: Thu Dec 20 01:17:15 2007 -0300 V4L/DVB (6887): Avoid 'unknown model' message for the HVR1500-Q Avoid 'unknown model' message for the HVR1500-Q Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit e12671cf0c3c8460dfa3ab945023803612827fb7 Author: Steven Toth Date: Thu Dec 20 01:14:43 2007 -0300 V4L/DVB (6886): xc5000: Cleanups of types, result codes etc This translates much of the xceive coding style, adds some result codes and generally cleans up whitespace and function arguments. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit d1987d55a1eda774dfbab240a432607c17241d07 Author: Steven Toth Date: Tue Dec 18 01:57:06 2007 -0300 V4L/DVB (6885): Add support for the Hauppauge HVR1500Q The express card ATSC/QAM tuner. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit aacb9d31ee65c0685745ca4dfc7cdd24f8b7d92b Author: Steven Toth Date: Tue Dec 18 01:55:51 2007 -0300 V4L/DVB (6884): Add support for the Xceive xc5000 silicon tuner This is an all formats tuner, QAM, ATSC, DVB-T and others. Only ATSC and QAM have been tested. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 2426a27e4d25cf932ce73aa84a085ee94b4189a8 Author: Michael Krufky Date: Fri Dec 21 11:34:45 2007 -0300 V4L/DVB (6882): dvb_frontend: release analog demod in dvb_frontend_detach Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit bc3e5c7fc20d3c09667067878fb7a55dd9fc041d Author: Michael Krufky Date: Fri Dec 21 11:18:32 2007 -0300 V4L/DVB (6881): include struct analog_demod_ops directly inside struct dvb_frontend Rather than using a pointer, include struct analog_demod_ops directly inside struct dvb_frontend. This will allow us to use dvb_attach in the future, along with removing the need to check the ops structure before having to check the pointer to the method being called. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 9ad89f0104314786138d580ab2c1119e7e470f56 Author: Michael Krufky Date: Fri Dec 21 03:00:59 2007 -0300 V4L/DVB (6880): kill tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 807ffe8df23e1977d4e702697a08047f346eb974 Author: Michael Krufky Date: Fri Dec 21 02:55:43 2007 -0300 V4L/DVB (6879): move struct analog_tuner_ops into dvb_frontend.h struct analog_tuner_ops no longer has any dependencies specific to v4l2, so we can move this into dvb_frontend.h with the rest of the tuning structures. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit b624aa86cd92b32d66653609e4896f54c0d6111d Author: Michael Krufky Date: Thu Dec 20 23:19:14 2007 -0300 V4L/DVB (6878): tuner: remove extraneous variable declaration tuner_count is already declared as "extern unsigned const int" in -- Remove it from tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit d536c9df41f5e47a37e22b46ea98451ce8134e55 Author: Michael Krufky Date: Tue Dec 18 10:42:33 2007 -0300 V4L/DVB (6875): tuner-xc2028: ATSC requires 1.75 MHz tuning offset In my testing yesterday, I was using a scan file tailored specifically for a unique test situation -- As it turns out, this scan file was bad, and I will use the one included inside dvb-apps for testing for now on. I've tested with other ATSC tuners just to confirm, using: us-ATSC-center-frequencies-8VSB Anyhow, as it turns out, the tuner-xc2028 *does* require a tuning offset for ATSC. Even though the linux-dvb api passes in center frequencies from userspace, apparantly the xceive firmware is already factoring in the tuning offset to center. In order to make the device function using the same scan files / channels.conf configurations as other atsc devices, we must offset by 1.75 MHz. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 0b6a3342a645208feaab76332f1eee33e1688bd5 Author: Matthias Schwarzott Date: Fri Dec 21 08:58:09 2007 -0300 V4L/DVB (6874): removes duplicated KERN_DEBUG flags from dprintk calls in mt312.c do { \ if (debug) printk(KERN_DEBUG "mt312: " args); \ } while (0) So no caller need to specify KERN_DEBUG. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab commit 89f6475857b89e956a8bcfef64944409ce4173b4 Author: Matthias Schwarzott Date: Fri Dec 21 08:56:44 2007 -0300 V4L/DVB (6873): Fixes issues listed by checkpatch Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab commit 6fb377f85cb8c2c1580ce8b134c887a7b53c7aa9 Author: Hans Verkuil Date: Tue Dec 18 19:40:44 2007 -0300 V4L/DVB (6869): cs5345: new i2c driver Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b394def21e7d3bd02aeee5570473582ce7984ec Author: Hans Verkuil Date: Tue Dec 18 19:27:31 2007 -0300 V4L/DVB (6868): i2c-id.h: add I2C_DRIVERID_CS5345 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9fad368b6dff95b8b009a6b8eed42a549a05b263 Author: Hans Verkuil Date: Wed Dec 12 10:23:52 2007 -0300 V4L/DVB (6867): saa7127: CodingStyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d52c7385ec8d4d2081b0db47e309723ce3eae816 Author: Hans Verkuil Date: Wed Dec 12 08:25:18 2007 -0300 V4L/DVB (6866): msp3400: CodingStyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35df38c015866b3c28bfb1914b14eba92086cdd1 Author: Hans Verkuil Date: Wed Dec 12 07:40:54 2007 -0300 V4L/DVB (6865): vp27smpx: CodingStyle cleanup Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79f998a71b9bca5a16b0b8c30e5c0c849705a5ec Author: Hans Verkuil Date: Wed Dec 12 07:34:15 2007 -0300 V4L/DVB (6864): upd64031a: CodingStyle cleanup Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c9fc8de546134d021de58c7ade6f025c9d1da1c Author: Hans Verkuil Date: Wed Dec 12 07:30:02 2007 -0300 V4L/DVB (6863): upd64083: CodingStyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f69d419a0bdf4cd2551200b6777a226fea527d1a Author: Hans Verkuil Date: Wed Dec 12 07:24:27 2007 -0300 V4L/DVB (6862): ivtv: really remove i2c legacy support from drivers that no longer need it For some reason the include header wasn't changed from v4l2-i2c-drv-legacy.h to v4l2-i2c-drv.h in the previous patch. This is now corrected. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ea48c13ad0e5626b827bd7076c22df1a352e3983 Author: Hans Verkuil Date: Wed Dec 12 07:04:58 2007 -0300 V4L/DVB (6861): cx2341x: command argument should be u32 instead of int Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f19a73d620c5412e2413b778f4dad21febdd6115 Author: Hans Verkuil Date: Wed Dec 12 06:50:20 2007 -0300 V4L/DVB (6860): tveeprom: CodingStyle cleanup Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5412c8204f8c4f733acef511979fe1a738b74767 Author: Hans Verkuil Date: Wed Dec 12 06:21:58 2007 -0300 V4L/DVB (6859): tveeprom: add support for Hauppauge models 74xxx Thanks to Steve Toth from Hauppauge with providing me with the information needed to add support for these models. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ac510e6097368695ddff20918ab5822823b548e Author: Mauro Carvalho Chehab Date: Tue Dec 18 00:30:52 2007 -0300 V4L/DVB (6858): Fix offset for ATSC ATSC works with offset=0 Signed-off-by: Mauro Carvalho Chehab commit 5e3c5967da48b54e5d4ee528b51b565e2f7a3178 Author: Chris Pascoe Date: Sat Dec 15 03:31:09 2007 -0300 V4L/DVB (6857): cx23885: correctly join I2C writes and reads from same address When an I2C message specifies a write then a read from the same I2C address, we need to tell the chip to not release the bus between the message parts. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit bc514710889ebb975be9e84ca9c04f698225b656 Author: Chris Pascoe Date: Sat Dec 15 03:24:00 2007 -0300 V4L/DVB (6856): zl10353: improve tuning parameters and update register map Some more I2C traces and a experimentation with register values on both the ZL10353 and MT352 mean that I can now guess at what more of the ZL10353 registers do. Guess at the registers' names (based on the equivalent names in MT352) and update set_parameters/get_parameters with the new knowledge. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 3dfefc50ff45744ffb97ce0bf9c213a3fb6d5d3d Author: Chris Pascoe Date: Sun Dec 2 10:07:06 2007 -0300 V4L/DVB (6855): xc2028: select DTV78 firmware if tuning 7MHz VHF / 8MHz UHF It seems that the DTV78 firmware is intended for use in locations where VHF channels have 7MHz bandwidth and UHF channels have 8MHz bandwidth. If we switch to DTV78 firmware when we detect this condition, we can avoid firmware reloads when switching between VHF and UHF transponders. Place the state for this in the control structure so that card drivers can hint to us to use DTV78 firmware from the first tuning attempt. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 897b842296f1285a6b58e9170f7017022e2e2603 Author: Chris Pascoe Date: Sun Dec 2 09:39:18 2007 -0300 V4L/DVB (6854): xc2028: be more specific about when applying offset for 7MHz channels We have been inserting a mystery 500kHz offset for tuning 7MHz channels, however some experimentation reveals it is only needed under certain conditions with specific firmware combinations. Document these and only apply the offset when we know it is required. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 9ca01e780f8966a7a94f88ef5c54f340e117abea Author: Chris Pascoe Date: Sun Dec 2 06:54:17 2007 -0300 V4L/DVB (6853): xc2028: check HAS_IF flag against table When searching for the right S-Code table to load, check the HAS_IF flag against the firmware we are checking instead of against the the "type" requested. We already ignore the scode type requested if the caller passed an int_freq; this makes the search by frequency consistent with that behaviour. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit ad35ce9e3e03b1515c8581bababb0e64d05cf1ad Author: Chris Pascoe Date: Sun Dec 2 06:36:42 2007 -0300 V4L/DVB (6852): xc2028: s-code offset should not modify internal control structure Don't modify the control structure that was provided at attach when applying an offset to the S-Code, otherwise it will be incorrect on subsequent tunes. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit e026268870b5f05a3f74b37816d96ed3b19a9e33 Author: Chris Pascoe Date: Sun Dec 2 06:30:50 2007 -0300 V4L/DVB (6851): xc2028: include int_freq in firmware version display Add "int_freq" to the debugging output when selecting firmware and the HAS_IF flag when dumping firmware during load. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit aec2aef267203d9ac06ce3508682c0aa81a069dc Author: Aurelien Jarno Date: Mon Dec 17 13:49:17 2007 -0300 V4L/DVB (em28xx): Add support for Pinnacle Dazzle DVC 100 The patch below adds the "Pinnacle Dazzle DVC 100" to the list of cards supported by the em28xx driver. As the configuration is the same as the DVC 90 one, it simply adds a new USB ID to the list of devices supported by the DVC 90 configuration. Signed-off-by: Aurelien Jarno Signed-off-by: Mauro Carvalho Chehab commit 9e7e85ebaeba22979209268423f5aae8a352df4c Author: Akinobu Mita Date: Mon Dec 17 14:26:29 2007 -0300 V4L/DVB (6848): bttv: check pci_register_driver() error Check pci_register_driver() error in module_init. Signed-off-by: Akinobu Mita Signed-off-by: Mauro Carvalho Chehab commit 71021d2601c54eee6df3afaf79aed430b17e1366 Author: Michael Krufky Date: Mon Dec 17 09:49:33 2007 -0300 V4L/DVB (6846): tda9887: initialize mode to T_STANDBY at startup Ensure that the audio is muted at attach-time Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit dabe61565e3b02bc4a841f317896536068f94e63 Author: Michael Krufky Date: Mon Dec 17 01:21:08 2007 -0300 V4L/DVB (6845): tuner: remove unneeded #includes from tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f7f427e4cc6078e23078dcd7f321676e0b0f544c Author: Michael Krufky Date: Sun Dec 16 22:02:26 2007 -0300 V4L/DVB (6844): tuner: remove struct tuner from tuner-driver.h struct tuner holds state for tuner-core, only -- move it into tuner-core.c Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 790ba18ec7a5f15c854f52835b0e6f39de2369dd Author: Michael Krufky Date: Sun Dec 16 21:20:21 2007 -0300 V4L/DVB (6843): tda9887: use printk macros from tuner-i2c.h replace tda9887_info and tda9887_dbg printk macros with tuner_info and tuner_dbg, defined in tuner-i2c.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 8ca4083b50752d588f8b8b1e5e5776fb17d00304 Author: Michael Krufky Date: Sun Dec 16 20:11:46 2007 -0300 V4L/DVB (6842): tda9887: remove dependency on struct tuner Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 91c9d4a16710b047781248a38e7000ce9de324af Author: Michael Krufky Date: Sun Dec 16 20:05:00 2007 -0300 V4L/DVB (6841): tda9887: maintain private state independent of struct tuner Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 710401b837f8849dc9c28385eb5298746b811305 Author: Michael Krufky Date: Sun Dec 16 19:53:32 2007 -0300 V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG Use TUNER_SET_CONFIG to set configuration in tda9887's private state structure, rather than storing tda9887-specific configuration within struct tuner. Update handling of TUNER_SET_CONFIG by tuner-core, to call &t->fe.ops.analog_demod_ops rather than &t->fe.ops.tuner_ops analog_demod_ops.set_config passes the request to tuner_ops.set_config, so this does not break other drivers. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f1c9a281005f714fdc57c830a23f2b6bd6e2b714 Author: Michael Krufky Date: Sun Dec 16 19:27:23 2007 -0300 V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit daae58956bebeab6631ba078669970a27bdfbdbe Author: Michael Krufky Date: Sun Dec 16 19:14:31 2007 -0300 V4L/DVB (6838): tda9887: remove references to struct tuner from printk macros Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 35e420357bd835d43c76d3ab5e35694be0b56f95 Author: Michael Krufky Date: Mon Dec 17 10:54:06 2007 -0300 V4L/DVB (6837): Convert cx88_input.audioroute to a bitfield Prevent us from wasting some extra bytes of memory Thanks to Trent Piepho, for pointing this out. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit d8f69971d8d6c137e42928492f8d469078113db9 Author: Mauro Carvalho Chehab Date: Mon Dec 17 10:35:59 2007 -0300 V4L/DVB (6836): Fix CodingStyle troubles caused by the previous cx88 commits Signed-off-by: Mauro Carvalho Chehab commit 36e05a44756efe562ad1f49ada9bd6a598242828 Author: Frej Drejhammar Date: Mon Nov 5 17:57:11 2007 -0300 V4L/DVB (6834): cx88-video: Enable selection of the WM8775 for cx88 cards The auto selection of pertinent helper chips (VIDEO_HELPER_CHIPS_AUTO) should select the wm8775 driver, which is used by at least one Conexant 2388x based card (Hauppauge HVR-1300), if VIDEO_CX88 is selected. Signed-off-by: Frej Drejhammar Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab commit 66e6fbdf99420efe58685feda0ac1b73b33400e0 Author: Ricardo Cerqueira Date: Tue Oct 16 20:52:08 2007 -0300 V4L/DVB (6833): Don't limit cx88 audio routing to blackbird boards All cx2388 boards need the line-in audio to be routed from an external ADC (refered to as "ADC mode" in the spec sheet), since the chip is uncapable of dealing with baseband audio directly. So... this patch enables normal mode when using the tuner (TV or Radio), and enables ADC mode with any other source. It'll probably only work with boards that have supported ADCs (such as the Wolfson wm9775) Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab commit 6a0bc9a0162d10c551bb916a1a21bfede4db3203 Author: Michael Krufky Date: Sat Oct 13 20:42:45 2007 -0300 V4L/DVB (6832): cx88-blackbird: don't mute audio when stopping the codec We should not mute the audio input when we stop the codec, because it will interfere with the live uncompressed stream. Signed-off-by: Michael Krufky Reviewed-by: Jelle Foks Signed-off-by: Mauro Carvalho Chehab commit 7b27d45bb50498c86aa87e7ef174b2a0f5b6f361 Author: Ricardo Cerqueira Date: Sun Sep 30 13:02:49 2007 -0300 V4L/DVB (6831): Audio routes fix for blackbird boards with the wm8775 ADC Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds. The wm8775 module initializes the audio input at "route 2", which doesn't hold true for all boards. The HVR-1300, for example, uses route 1 for tuner audio, and route 2 for baseband. So we must route the audio to the proper input depending on what video input is being used. Signed-off-by: Ricardo Cerqueira Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4423a9a3395ef652d80d848161444b417f1f78c0 Author: Jelle Foks Date: Mon May 21 14:48:58 2007 -0300 V4L/DVB (6830): cx88-blackbird: remove unnecessary encoder unmute Remove the unnecessary BLACKBIRD_UNMUTE calls to the mpeg encoder in cx88-blackbird.c The encoder is never muted, hence unmuting should then only be necessary once after hardware initialization. I tested this from warm boots and cold boots (with long power down time to ensure the sram in the chip is emptied), and found that after the firmware upload the encoder is apparently not muted, making the unmutes unnecessary. Signed-off-by: Jelle Foks Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit e21a5c68deab7cd300e8502488f844f77e0f26d0 Author: Jelle Foks Date: Mon May 21 14:46:06 2007 -0300 V4L/DVB (6829): cx88-blackbird: remove unnecessary msleep()'s Remove the unnecessary msleep()'s in cx88-blackbird.c Signed-off-by: Jelle Foks Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f9e54e0c84da869ad9bc372fb4eab26d558dbfc2 Author: Jelle Foks Date: Mon May 21 14:36:01 2007 -0300 V4L/DVB (6828): cx88-blackbird: audio improvements This patch should fix the 'muted audio' and 'raspy audio' problem for mpeg2 streams out of cx88-blackbird devices. Especially mythtv users would find that the audio would often sound bad (aliased, or 'raspy'), mainly related to channel changes, many (all?) other users would find that there was no audio at all in the mpeg data from the encoder chip, unless the audio was manually unmuted. The patch includes the following modifications: Don't actually start the mpeg2 encoder until the device is read from by the application. Wait until the audio is stable for at least 400ms before starting the mpeg encoder. Mute/Unmute the audio when starting/stopping the mpeg encoder. Stop the mpeg encoder when changing parameters and when changing tuner frequency. Add a variable 'mpeg_active' to struct cx8802_dev to allow tracking of whether or not the mpeg2 encoder is active. Load the firmware on cx88-blackbird driver load. Signed-off-by: Jelle Foks Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4bfae52b69360a966f41ba3308e57a6df41ff8e1 Author: Mauro Carvalho Chehab Date: Sun Dec 16 09:24:30 2007 -0300 V4L/DVB (6827): Auto-selects D2633 for ATSC ATSC standard-specific firmware is D2633 on both v2.5 and v2.7. Better to auto-select this firmware, overriding ctrl.d2633. Signed-off-by: Mauro Carvalho Chehab commit 6b7daa88f23bb23f61977063e3f8ea9598e65e32 Author: Michael Krufky Date: Thu Dec 13 10:11:49 2007 -0300 V4L/DVB (6822): s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless otherwise specified use VSB IF frequency ( 44 / 5.38 MHz ) if qam_if is invalid or unspecified Acked-by: Steven Toth Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2b03238a79295aff30afc3d9a82afa617fd33971 Author: Michael Krufky Date: Thu Dec 13 10:04:10 2007 -0300 V4L/DVB (6821): s5h1409: fix IF frequency configuration On the s5h1409 demod, the IF frequency for VSB is limited to 44 / 5.38 MHz. Hardcode VSB IF frequency within the driver to 44 / 5.38 MHz. QAM IF frequency remains configurable via attach-time configuration. Acked-by: Steven Toth Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 18ff605a18b29ab1b52d31f96e2ecbaf7a042a3e Author: Andrew Morton Date: Wed Dec 12 21:43:57 2007 -0300 V4L/DVB (6818): git-dvb: drivers/media/dvb/frontends/zl10353.c: avoid 64-bit divide Signed-off-by: Andrew Morton Acked-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 6594ad829a98d5a9fe720d8d182a4e50fc81953a Author: Mauro Carvalho Chehab Date: Thu Dec 13 16:15:41 2007 -0300 V4L/DVB (6817): Cleanup kernel thread and provide overrun detection The previous code were a little bit messy. Cleans it up. Signed-off-by: Mauro Carvalho Chehab commit 55862ac9b2e656c35ab1e25d9b162e5bda81281f Author: Mauro Carvalho Chehab Date: Thu Dec 13 16:13:37 2007 -0300 V4L/DVB (6816): Add proper locking for buffer filling Avoids de-alocating buffers before finishing to fill a buffer Signed-off-by: Mauro Carvalho Chehab commit 6c2f990105acd360e83b95b41c60ed8bf25e67fe Author: Mauro Carvalho Chehab Date: Thu Dec 13 13:30:14 2007 -0300 V4L/DVB (6815): Fix vivi internal debug messages Signed-off-by: Mauro Carvalho Chehab commit 1fe934ddfc8e6e5663c0308ae216219be87b8d4f Author: Daniel Walker Date: Wed Dec 12 18:37:54 2007 -0300 V4L/DVB (6812): media: video: usbvision: remove ctrlUrbLock The ctrlUrbLock has all it's users commented out, and so it's unused. This patch removes it. Signed-off-by: Daniel Walker Signed-off-by: Andrew Morton Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit 544e6175330c86ad87abeeb1b048f56bafd96c31 Author: Andrew Morton Date: Wed Dec 12 18:25:23 2007 -0300 V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths-fix Signed-off-by: Andrew Morton Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit 0991112c1c4625323df8a582de1b2f8609922248 Author: Daniel Walker Date: Wed Dec 12 18:22:48 2007 -0300 V4L/DVB (6810): media: video: usbvision: add mutex_unlock() to error paths There are a few error paths which don't unlock the usbvision->lock. So I've added mutex_unlock() calls to fix those paths. Signed-off-by: Daniel Walker Signed-off-by: Andrew Morton Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit 7cd355e7c0c02e499784c77e88720f7cc8f98473 Author: Andrew Morton Date: Wed Dec 12 19:55:49 2007 -0300 V4L/DVB (6809): git-dvb: drivers/media/video/et61x251/et61x251_core.c: fix warnings drivers/media/video/et61x251/et61x251_core.c:390: warning: 'et61x251_i2c_read' defined but not used drivers/media/video/et61x251/et61x251_core.c:397: warning: 'et61x251_i2c_write' defined but not used Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 39b43b1a61f3c4b540b024843e592b14533aa961 Author: Andrew Morton Date: Wed Dec 12 19:27:57 2007 -0300 V4L/DVB (6808): git-dvb: fix build in drivers/media/dvb/frontends/tda18271.h Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 8996b3f3cfa9d21ba9ed31a116d5066e38827878 Author: Mauro Carvalho Chehab Date: Thu Dec 13 06:36:22 2007 -0300 V4L/DVB (6807): fix debug enable The changes at vivi_template make debug option to not work properly. Signed-off-by: Mauro Carvalho Chehab commit 784c668b24dede8acd7044b490a538b5b6cd6b20 Author: Mauro Carvalho Chehab Date: Thu Dec 13 06:35:26 2007 -0300 V4L/DVB (6806): Allow emulating changes of video std by vivi Signed-off-by: Mauro Carvalho Chehab commit 63736784f73e7c38b2bad5ed3ed783dc102ba01e Author: Mauro Carvalho Chehab Date: Thu Dec 13 06:34:12 2007 -0300 V4L/DVB (6805): video std is a bitmask. Better to print in hexa Signed-off-by: Mauro Carvalho Chehab commit 225ba900886f6d2d3447dd5bfdb95217f0619755 Author: Mauro Carvalho Chehab Date: Wed Dec 12 21:46:26 2007 -0300 V4L/DVB (6804): __videobuf_read_start is static Thanks to Jean Delvare for pointing this. Signed-off-by: Mauro Carvalho Chehab commit e435f95ce6468f0240f050e14c9eac93e2fe7e71 Author: Michael Krufky Date: Sun Dec 9 22:23:30 2007 -0300 V4L/DVB (6801): tda18271: pass i2c gate configuration into tda18271_attach() If we pass TDA18271_GATE_DIGITAL into tda18271_attach(), it will always try to use the digital demodulator's i2c gate. If we pass TDA18271_GATE_ANALOG into tda18271_attach(), it will always try to use the analog demodulator's i2c gate. If we pass TDA18271_GATE_AUTO into tda18271_attach(), it will try to use the analog demodulator's i2c gate when tuning in analog mode, and it will try to use the digital demodulator's i2c gate when tuning in digital mode. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7206abbc2d19b6846b879fb266672b40da9961cb Author: Michael Krufky Date: Sun Dec 9 22:13:01 2007 -0300 V4L/DVB (6800): tda18271: use an enum rather than an integer to store analog / digital state Use an enum rather than an integer #define to store analog / digital state. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f6e90a66cde270cd6cc7aa1f4f0650930aa7f6bc Author: Mauro Carvalho Chehab Date: Tue Dec 11 15:01:57 2007 -0300 V4L/DVB (6795): Add EXPORT_SYMBOL_GPL to the saa7134 video control routines Those newer functions are used by saa7134-empress. Adds export for them: +EXPORT_SYMBOL_GPL(saa7134_g_ctrl); +EXPORT_SYMBOL_GPL(saa7134_s_ctrl); +EXPORT_SYMBOL_GPL(saa7134_queryctrl); Signed-off-by: Mauro Carvalho Chehab commit 2c10e8a8985e41addbbbe54b403418c27462f854 Author: Mauro Carvalho Chehab Date: Tue Dec 11 12:56:23 2007 -0300 V4L/DVB (6793): Convert saa7134-empress to video_ioctl2 saa7134 were converted to video_ioctl2, but saa7134_empress weren't. This broke saa7134-empress, since it were dependent of saa7134_common_ioctl. With the conversion, the module had a size decrease of 436 bytes on x86_64: text data bss dec hex filename 5196 4912 4 10112 2780 old/saa7134-empress.ko 4760 4912 4 9676 25cc new/saa7134-empress.ko Signed-off-by: Mauro Carvalho Chehab commit a9622391acbcdb124b55eb674dc5196eb55dc105 Author: Mauro Carvalho Chehab Date: Tue Dec 11 12:05:06 2007 -0300 V4L/DVB (6792): Fix VBI support VBI were broken, since there weren't any function handlers for it. This patch fixes it, by removing the vbi_template, using, instead video_template. This also saves some space at the data segment. Signed-off-by: Mauro Carvalho Chehab commit bfb12e38a8f828bb6394fd4f18010bad86832623 Author: Mauro Carvalho Chehab Date: Tue Dec 11 11:51:53 2007 -0300 V4L/DVB (6791): Rename all vidioc_ to saa7134_ Some functions are used also by saa7134-empress, and need to be exported. To avoid namespace confusion, rename all of them to saa7134_ Signed-off-by: Mauro Carvalho Chehab commit bd2b19a78cb215b67d8d016ea6607f04e48fa523 Author: Michael Krufky Date: Mon Dec 10 16:08:25 2007 -0300 V4L/DVB (6789): tuner: use char *name instead of 128 byte fixed array for demod info Don't waste 128 bytes of memory for a name that might not actually need it. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2dcf84b36c23a2c34207ab650071f9ee33d3c4a2 Author: Michael Krufky Date: Mon Dec 10 11:12:59 2007 -0300 V4L/DVB (6788): tda8290: fix codingstyle, open brace following struct on the same line Fix codingstyle issue discovered after using new checkpatch.pl ERROR: open brace '{' following struct go on the same line 396: FILE: linux/drivers/media/video/tda8290.h:24: +struct tda829x_config +{ Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 864a6b813ab6cb69f3552553899ae443329ecfa9 Author: Michael Krufky Date: Sun Dec 9 17:21:54 2007 -0300 V4L/DVB (6787): tuner: bug-fix: default mode was set to bogus value Fix type inconsistency in t->mode value, causing the following: tuner' 1-0043: freq set: unknown mode: 0x0004! (only visible with tuner debug enabled) Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit a55db8cd7f8a107f3abcb4c803b1873b2be63663 Author: Michael Krufky Date: Sun Dec 9 13:52:51 2007 -0300 V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops Store the analog demodulator name in fe.ops.analog_demod_ops.info.name Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit ab1660503ac3af7febfcf987648509b484d4feda Author: Michael Krufky Date: Sun Dec 9 02:26:48 2007 -0300 V4L/DVB (6785): tda8290: remove dependency on struct tuner - remove dependency of tda8290 module on struct tuner - move tuner_foo printk macros from tuner-driver.h into tuner-core.c - clean up #includes of tuner-i2c.h / tuner-driver.h Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit fa746aee336fedfe25e6945e5967399966948420 Author: Michael Krufky Date: Sun Dec 9 05:16:10 2007 -0300 V4L/DVB (6784): tda8290: prevent possible memory leak Always call tda829x_release if tda829x_attach fails for a reason other than failure to allocate memory for private structure. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit c7919d520f4c9a064ae14bc4dd170c4c12ead2af Author: Michael Krufky Date: Sat Dec 8 17:06:30 2007 -0300 V4L/DVB (6783): tuner: combine set_tv_freq and set_radio_freq into a single set_params method We can tell whether we are tuning television or radio by testing for struct analog_parameters *params->mode == V4L2_TUNER_RADIO There is no longer any need for separate set_tv_freq and set_radio_freq functions in the analog tuner demodulator modules. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6881647cce09931f3d787ab83b5250436427ceb9 Author: Michael Krufky Date: Sat Dec 8 16:25:41 2007 -0300 V4L/DVB (6782): tda8290: access frontend structure directly, where possible Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 14d5deba2737c59444e805c10764d58a3d73e9b2 Author: Richard Knutsson Date: Sat Dec 8 10:35:06 2007 -0300 V4L/DVB (6776): ivtv: Some general fixes Fix "warning: Using plain integer as NULL pointer". Convert 'x < y ? x : y' to use min() instead. Signed-off-by: Richard Knutsson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d130fa8a05ee5f39c786df02dd75d1eebb12633b Author: Mike Isely Date: Sat Dec 8 17:20:06 2007 -0300 V4L/DVB (6773): pvrusb2: rework device descriptor layout The pvrusb2 driver tries to keep all device specific attributes in a single data structure in one source file. This change further cleans up how that table is set up. We now try to group everything together for each specific device, and the number of symbols exported from this module has now been reduced to a single global. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 066bba2d1ccdac2005a64f4c87f8b542744ed94c Author: Mike Isely Date: Sat Dec 8 17:17:44 2007 -0300 V4L/DVB (6772): pvrusb2: Remove obsolete (and misleading) comment Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 577e4023df8e6111bf7c63d182acc967af060054 Author: Mike Isely Date: Sat Dec 8 17:17:09 2007 -0300 V4L/DVB (6771): pvrusb2: Remove old obsolete CONFIG flags for pvrusb2 driver Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 5edfded4811175283c745c9309c9315b721cf674 Author: Mike Isely Date: Sat Dec 8 17:15:55 2007 -0300 V4L/DVB (6770): pvrusb2: Device CONFIG flags for OnAir device support Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 4542783c3733de9a21099cd0c42e1a2392c68a88 Author: Mike Isely Date: Sat Dec 8 17:11:13 2007 -0300 V4L/DVB (6769): pvrusb2: Implement experimental support for OnAir Creator and USB2 devices Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 787f5abb9519fd420c4681a560aabc449632a6c2 Author: Mike Isely Date: Sat Dec 8 17:08:32 2007 -0300 V4L/DVB (6768): pvrusb2: Mark Gotview hardware as having a cx2584x part Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 2a2bfbff3d867c62a49f43266ca993c9c2c2ff28 Author: Hans Verkuil Date: Sat Dec 8 07:43:14 2007 -0300 V4L/DVB (6766): ivtv: remove i2c legacy support from drivers that no longer need it Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d9009201207c4bdce9b95a0bd903b3f087e8eda1 Author: Hans Verkuil Date: Fri Dec 7 21:01:15 2007 -0300 V4L/DVB (6765): ivtv: convert to bus-based i2c API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d1a16a4fc39bd908d85e0b7ce167048200d2d2b Author: Hans Verkuil Date: Fri Dec 7 20:48:29 2007 -0300 V4L/DVB (6764): ivtv: select VIDEO_IR in Kconfig Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e08323f099b5aba28610a856fa7d21d0d86fd4f0 Author: Hans Verkuil Date: Fri Dec 7 20:40:16 2007 -0300 V4L/DVB (6763): ivtv: add AVerMedia EZMaker PCI Deluxe support Add support for the AVerMedia EZMaker PCI Deluxe and update the ivtv cardlist. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0170a48274acbed20b3b8d1f4a6cecd08ae5015e Author: Hans Verkuil Date: Fri Dec 7 20:31:17 2007 -0300 V4L/DVB (6762): ivtv: update version number to 1.2 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2c77314c9444c994087c96eb370b333d57657a7 Author: Mauro Carvalho Chehab Date: Mon Dec 10 10:53:20 2007 -0300 V4L/DVB (6759): CodingStyle fixes Signed-off-by: Mauro Carvalho Chehab commit 543323bcf49422c76cf13755ec4a90564065bb60 Author: Mauro Carvalho Chehab Date: Mon Dec 10 09:33:52 2007 -0300 V4L/DVB (6758): Miscelaneous cleanups Manually fixed all pertinent checkpatch.pl errors inside the source code. Also removed some unused code at the driver and a few minor cleanups. Signed-off-by: Mauro Carvalho Chehab commit 025341d4f0caa58f0e5eddbffd11d44e37cff974 Author: Mauro Carvalho Chehab Date: Mon Dec 10 04:43:38 2007 -0300 V4L/DVB (6755): Avoid troubles when using multiple devices mv_count is a counter used to move the vertical bars. Before this patch, it where a static var. This works fine for just one device. However, when using multiple devices, every device would increment it. This patch moves it to its correct place: struct vivi_dev. So, now, each device has its own data. Signed-off-by: Mauro Carvalho Chehab commit 55712ff7e06b721fbeebd36499bad4a11b7d8327 Author: Mauro Carvalho Chehab Date: Mon Dec 10 04:38:11 2007 -0300 V4L/DVB (6754): Allow vivi to open multiple video devices Now, it is possible to open multiple vivi devices, by using n_devs parameter. This makes vivi driver closer to a real one. Signed-off-by: Mauro Carvalho Chehab commit f905c442e5b19f75fe4e8ce96f2acffa565f2392 Author: Mauro Carvalho Chehab Date: Mon Dec 10 04:07:03 2007 -0300 V4L/DVB (6753): Fix vivi to support non-zero minor node There were a trouble at vivi driver when using non-zero inodes. This where due to not properly preserving the minor inode after calling video_register. Since this driver is a reference for newer drivers, and it is possible to have more than one video device inside the machine, this patch makes vivi to dynamically allocate video_device struct. Thanks to Gregor Jasny for pointing the issue. Also, this patch removes a very anoying (but useless) message of not having a proper release call. CC: Gregor Jasny Signed-off-by: Mauro Carvalho Chehab commit d2761f227162f610d35b9d68564f5c64774be581 Author: Albert Graham Date: Sun Dec 9 09:44:38 2007 -0300 V4L/DVB (6752): saa7134: Enable remote control support for Avermedia M102 This patch enabled the IR remote control for the Avermedia M102 (card=110), which appears to be the same IR as the already supported device on the Avermedia AVerTV GO 007 FM (card=57) model, the code is two one liners which enable the IR for this device (subsystem: 1461:f31e) Signed-off-by: Albert Graham Signed-off-by: Mauro Carvalho Chehab commit d172b8bdab3812a6ad710e4cc78ceea3e8a40cd5 Author: Andrew Morton Date: Fri Dec 7 21:14:43 2007 -0300 V4L/DVB (6749): v4l-nopage-fix dont just copy-and-paste stuff. (compile-tested this time) Signed-off-by: Andrew Morton Cc: Nick Piggin Signed-off-by: Mauro Carvalho Chehab commit 105354a0f0410d4715f38e67d5790dead5dafdad Author: Nick Piggin Date: Fri Dec 7 17:57:38 2007 -0300 V4L/DVB (6748): Subject: v4l: nopage Convert v4l from nopage to fault. Remove redundant vma range checks. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 14e3c152a14cb96b5f584d3885d2aedf1a1353fc Author: Michael Krufky Date: Fri Dec 7 00:33:08 2007 -0300 V4L/DVB (6745): tda18271: remove tuning offset for atsc/qam The tuning request coming in from userspace is already center adjusted, so we should not adjust to center (+1.75mhz) within the driver. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4a56eb3f535f92b0585aa01dba05b3f17a547df0 Author: Hans Verkuil Date: Sun Dec 2 07:03:45 2007 -0300 V4L/DVB (6743): cx25840: fix endianness inconsistency cx25840_read4 reads a little-endian 32-bit value whereas cx25840_write4 writes the 32-bit value as big-endian. Convert write4 to use little-endian as well (that's the correct endianness). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6b1e56763b50f169d8446c43df6adb70f69552db Author: Hans Verkuil Date: Sun Dec 2 06:56:00 2007 -0300 V4L/DVB (6742): ivtv: fix incorrect debug message Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 737bd410e70c3daa02f203dec24351951e89d82f Author: Hans Verkuil Date: Thu Nov 1 13:38:12 2007 -0300 V4L/DVB (6741): cx2341x: codingstyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 574dec611f1578b52dd37df5c95f855a28652e42 Author: Hans Verkuil Date: Thu Nov 1 07:58:17 2007 -0300 V4L/DVB (6740): tlv320aic23b: codingstyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c05de9c971b70a61d81cd2f1c78db85e2632d1c Author: Hans Verkuil Date: Thu Nov 1 07:54:57 2007 -0300 V4L/DVB (6739): cs53l32a: codingstyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 099b8e7361512ebfef2dd51f2e81126cc93c22e9 Author: Hans Verkuil Date: Thu Nov 1 07:45:54 2007 -0300 V4L/DVB (6738): wm8739: codingstyle cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 842441d42de8f22d8f530b19da984df81fed8f7e Author: Hans Verkuil Date: Thu Nov 1 07:35:41 2007 -0300 V4L/DVB (6737): wm8775: codingstyle cleanup Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c85454a5963747fca7d0699e2450f676314c176 Author: Mauro Carvalho Chehab Date: Fri Dec 7 17:34:48 2007 -0300 V4L/DVB (6736): Fix some errors at the video_ioctl2 conversion Signed-off-by: Mauro Carvalho Chehab commit 90bdc14533fa37b86ada57fcf60c634106ddbb3f Author: Mauro Carvalho Chehab Date: Fri Dec 7 17:23:38 2007 -0300 V4L/DVB (6735): Reorder functions to make easier to compare with the previous code After this patch, the order of the functions will be the same as before the patch converting the driver to user video_ioctl2. This makes easier to diff between the previous version and the newer one. Signed-off-by: Mauro Carvalho Chehab commit 8f61ae2f4ff698c7cd83b1f17b1ca2ecfc7f0696 Author: Douglas Schilling Landgraf Date: Fri Dec 7 17:09:53 2007 -0300 V4L/DVB (6734): Converted saa7134-video to use video_ioctl2 Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 863c86dd7e014e645207fd16f4e06bc223567984 Author: Oliver Neukum Date: Mon Dec 3 06:48:43 2007 -0300 V4L/DVB (6732): dsbr100 violates DMA coherency rules Signed-off-by: Oliver Neukum Signed-off-by: Mauro Carvalho Chehab commit e1ba33df0cbc6a7ab339dc093f37825775b9caca Author: Richard Knutsson Date: Sun Dec 2 14:47:01 2007 -0300 V4L/DVB (6731): ivtv: Remove a invalid shadow-variable Remove the shadowing 'struct v4l2_chip_ident *chip', since it already exists and makes the if-statement useless. Signed-off-by: Richard Knutsson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5d2bf930a2f4586a3e19318ed821a34193c4b7cd Author: Michael Krufky Date: Sun Dec 2 17:37:38 2007 -0300 V4L/DVB (6728): tda18271: fix register dump format Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit b5f3e1e153b60f7bc338cdd6eefacd59c2dfb375 Author: Michael Krufky Date: Sun Dec 2 16:36:05 2007 -0300 V4L/DVB (6727): tda18271: convert table lookup loops to functions Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit aaeccba68a60eedee5fe90f9e1478367b1f97345 Author: Michael Krufky Date: Sun Dec 2 11:03:57 2007 -0300 V4L/DVB (6726): tda18271: set image rejection validity Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 293da0ec468addf891856e9ffee88af2fd00e25a Author: Michael Krufky Date: Sun Dec 2 02:45:04 2007 -0300 V4L/DVB (6725): tda18271: improve debug flexibility converted debug module option to an or-able setting. 1 = info 2 = table map values 4 = register dumps Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 1457263e9df6911384c474532a49d1b25bc9d248 Author: Michael Krufky Date: Sun Dec 2 02:32:49 2007 -0300 V4L/DVB (6724): tda18271: remove duplicated code Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit efce841093589bfef571a07e18e5446def9e04b4 Author: Michael Krufky Date: Sat Dec 1 17:40:16 2007 -0300 V4L/DVB (6723): tda18271: only force init once during attach Once the image rejection calibration procedure has been successful, we should not initialize the tuner registers again. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2b057e8dc6cc8318956fef92b77a4e86985e84d9 Author: Ian Armstrong Date: Tue Nov 13 19:15:25 2007 -0300 V4L/DVB (6719): ivtv: ivtv-yuv clean-up + source cropping bug-fix ivtv-yuv code clean up & reformat. Includes minor changes to some debug lines. Also fixes a bug found during the reformatting, which would cause the incorrect amount of yuv data to be sent to the card if source cropping coordinates were used. Apart from the bug-fix, there should be no functional difference to the previous version. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 368f080b6870e65d43c346e085e8f81ade5d3e07 Author: Ian Armstrong Date: Mon Nov 5 14:30:03 2007 -0300 V4L/DVB (6718): ivtv: ivtv yuv format description correction The driver was incorrectly reporting that it supported YUV 4:2:2 output, when it is actually YUV 4:2:0. Though I believe the hardware can be pushed to 4:2:2, we don't currently support that. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 77aded6ba51f01335840ce8e18b413067810b68e Author: Ian Armstrong Date: Mon Nov 5 14:27:09 2007 -0300 V4L/DVB (6717): ivtv: Initial merge of video48 yuv handling into the IVTV_IOC_DMA_FRAME framework Previously, all yuv data written to /dev/video48 had only basic support with no double buffering to avoid display tearing. With this patch, yuv frames written to video48 are now handled by the existing IVTV_IOC_DMA_FRAME framework. As such, the frames are hardware buffered to avoid tearing, and honour scaling mode & field order options. Unlike the proprietary IVTV_IOC_DMA_FRAME ioctl, all parameters are controlled by the V4L2 API. Due to mpeg & yuv output restrictions being different, their V4L2 output controls have been separated. To control the yuv output, the V4L2 calls must be done via video48. If the ivtvfb module is loaded, there will be one side effect to this merge. The yuv output window will be constrained to the visible framebuffer area. In the event that a virtual framebuffer size is being used, the limit to the output size will be the virtual dimensions, but only the portion that falls within the currently visible area of the framebuffer will be shown. Like the IVTV_IOC_DMA_FRAME ioctl, the supplied frames must be padded to 720 pixels wide. However the height must only be padded up the nearest multiple of 32. This would mean an image of 102 lines must be padded to 128. As long as the true source image size is given, the padding will not be visible in the final output. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b5c1c8e71eb8fe2297a5884db59108e3c8b44c5 Author: Ian Armstrong Date: Mon Oct 22 14:24:26 2007 -0300 V4L/DVB (6716): ivtv: yuv interlace mode change Interlace mode selection code moved into the frame setup phase, so it's now run before the frame is loaded into a hardware buffer. Given that it can affect how a new frame is displayed, it was a bit stupid running it after the frame was already visible. A few stray interlace related variables which were linked to individual frames have now been moved into the yuv_frame_info struct. This means that all variables linked to a specific frame are in the same place & not scattered. Minor code reformatting in areas touched by the above changes. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 406c8b0ff0891ace87440bcb298a91c1927f9ae5 Author: Ian Armstrong Date: Sun Oct 21 08:33:59 2007 -0300 V4L/DVB (6715): ivtv: Remove unnecessary register update To reduce the number of display register accesses, the yuv code keeps track of the current video settings. Should there be a change in any single parameter, it will update the associated display registers to ensure everything is displayed correctly. The existing check also looks at the field order for the video. This is not required, since field reversal does not require any display register changes. This patch removes the field order from the check. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 166983cdfbb2779bec98de89927669ed4c9ff8f2 Author: Ian Armstrong Date: Sun Oct 21 08:09:10 2007 -0300 V4L/DVB (6714): ivtv: yuv frame parameter fix Inadvertently missed a line when converting code to new hardware buffering method. In some circumstances, this would lead to a frame being displayed using parameters belonging to another frame. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a3e5f5e2dfb50bebca24329e5377d804c6e3eb1b Author: Ian Armstrong Date: Sat Oct 20 14:52:55 2007 -0300 V4L/DVB (6713): ivtv: ivtv_yuv_prep_frame breakup and yuv hardware buffer changes ivtv_yuv_prep_frame is split in smaller code blocks. Modified yuv buffer handling on the PVR350 itself. We now cycle through all 8 hardware buffers. With this patch in place, driver behaviour should remain unchanged from the existing release. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c240ad00af78228726e6301ad6ffc54d3adce2a0 Author: Ian Armstrong Date: Tue Oct 16 03:21:46 2007 -0300 V4L/DVB (6712): ivtv: ivtv yuv stream handling change Currently the yuv output stream buffer is divided into blocks whose size depend on the broadcast standard selected during the driver init phase. However, the standard can be changed after the init phase. This effectively breaks the yuv output stream handler, since it relies on the different yuv planes being block aligned. This patch changes the setup, so that the block size is always the same. The decoder dma function has been modified to cope with the fact that the second yuv plane may no longer be block aligned. The start of the yuv frame must still be at the beginning of a block, so the stream write function has also been modified to ensure this is always true. Also, the stream write function will now initiate a yuv dma transfer as soon as a full frame is ready. It will not wait until the current write request has completed, or the stream buffer becomes full. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9de982d3117a3f83e4e7b14016a1df25b4a693d6 Author: Mike Isely Date: Mon Dec 3 02:10:04 2007 -0300 V4L/DVB (6710): pvrusb2: Recognize ATSC video standard bit values Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 3d290bdb283c9dc897c5fd160fe3d07ead426c45 Author: Mike Isely Date: Mon Dec 3 01:47:12 2007 -0300 V4L/DVB (6709): pvrusb2: minor rework for default video standard handling pvrusb2: When a per-device-type default video standard is declared, handle it in such a way that it can be correctly and unambiguously reported in the system log. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 4ca7f7092815cad5cb3a9377dce211202fe4b328 Author: Mike Isely Date: Mon Dec 3 01:45:26 2007 -0300 V4L/DVB (6708): pvrusb2: Expand comment in device attributes description Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit e802c14b91e3fddd50652270756124a69e550113 Author: Mike Isely Date: Mon Dec 3 01:44:43 2007 -0300 V4L/DVB (6707): pvrusb2: Remove use of volatile in pipeline control state machine pvrusb2: Eliminate use of volatile in pipeline control state variables. These were all cases of paranoia; upon further review the overall mechanism employed here should not require use of volatile. This had originally been done out of paranoia, and I have since been convinced that the paranoia is not required. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 26e33048aad0486c98155b1406037f02fe70cb1b Author: Mike Isely Date: Mon Dec 3 01:43:23 2007 -0300 V4L/DVB (6706): pvrusb2: Remove use of volatile in command sequencer pvrusb2: Remove use of volatile for command sequencer; these variables are set by interrupt-context code and we check their state in such a manner that there should be no race conditions. This had originally been done out of paranoia, and I have since been convinced that the paranoia is not required. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 6a540254966f8a01de0f7c78a27db17458c2d8f5 Author: Mike Isely Date: Sun Dec 2 23:51:34 2007 -0300 V4L/DVB (6705): pvrusb2: Implement default standard selection based on device type This adds a default video standard setting to the pvr2_device_desc structure for describing device types. With this change it is possible to set a reasonable default standard based on device type. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit ea2562d94fade3d6ee9b22ed5addbbdba697d22a Author: Roel Kluin <12o3l@tiscali.nl> Date: Sun Dec 2 23:04:57 2007 -0300 V4L/DVB (6703): pvrusb2: Change division to bit-or for tveeprom standards Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 482cb9a75ba5df68f4bcbe806c838eaf28af34c0 Author: Michael Krufky Date: Tue Nov 27 16:58:33 2007 -0300 V4L/DVB (6702): pvrusb2: fix typo in comments Firmware file name(s) for 24xxx devices Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 9e2e3aeb2d2c8bf64b04e1f5747f1d9842df43de Author: Mike Isely Date: Mon Nov 26 02:14:23 2007 -0300 V4L/DVB (6701): pvrusb2: Enable support for "GOTVIEW USB2.0 DVD2" hardware This changeset allows the pvrusb2 driver to operate a new device type ("GOTVIEW USB2.0 DVD2"). Changes amount to defining a new routing scheme for the device and adding appropriate table entries into pvrusb2-devattr.c. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 65bd80fe18b6abb63776746646321b41b44d70a7 Author: Mike Isely Date: Mon Nov 26 02:11:38 2007 -0300 V4L/DVB (6700): pvrusb2: Soften the crashed encoder warning message The pvrusb2 driver has been successfully recovering from a crashed encoder now for over 2 years. I think it's time to reduce the perceived severity of the warning message. While I'd still very much like to stop these crashes, the recovery logic is solid enough that the problem is effectively benign. No point in panicing the users over it. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 056d1a899201f02777a35a32f8e6c9a2aac63f63 Author: Mike Isely Date: Mon Nov 26 02:09:42 2007 -0300 V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attribute For Hauppauge 24xxx devices, the IR receiver is a custom piece of logic that is very specific to the device. The pvrusb2 driver can virtualize this to make it look like a more normal IR receiver found in other Hauppauge devices. The decision of whether or not to enable this virtualization however is a device-specific attribute, thus this changeset. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit f5174af201f2e22c101bb02d06343e4bc5f056de Author: Mike Isely Date: Mon Nov 26 02:07:26 2007 -0300 V4L/DVB (6698): pvrusb2: Implement signal routing schemes The exact routing of video and audio signals within a device is a device-specific attribute. Hauppauge devices do it one way; other types of device may route things differently. Unfortunately it is rather impractical to define chip-specific routing at the device attribute level, so instead what happens here is that "schemes" are defined. Each chip level interface implements its part of a given scheme and the scheme as a whole is made into a device specific attribute controlled via a table entry in pvrusb2-devattr.c. The only scheme defined here is for Hauppauge devices, but clearly this opens the door for other possibilities to follow. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit aaf7884db395332ae8474f3ea5bcdd39c0a941ea Author: Mike Isely Date: Mon Nov 26 02:04:11 2007 -0300 V4L/DVB (6697): pvrusb2: Existence of Hauppauge ROM is a device-specific attribute Arrange so that the pvrusb2 driver can optionally work without a Hauppauge ROM being present - which is fairly important for devices that happen to not come from Hauppauge. The expected existence of a Hauppauge ROM is now a device attribute. The tuner type is now also a device attribute, which is consulted if there is no ROM. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 56dcbfa0d5a46f137df5047ae8f3aab30f59954e Author: Mike Isely Date: Mon Nov 26 02:00:51 2007 -0300 V4L/DVB (6696): pvrusb2: Miscellaneous tweaks for controlling tuner type and video standard Correctly mark when a tuner type is set. Report more faithfully information about known supported device video standards. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 78a47101ac0ac75019a740d62c70ccb16ff7c7c1 Author: Mike Isely Date: Mon Nov 26 01:58:20 2007 -0300 V4L/DVB (6695): pvrusb2: Implement functions to pass descriptive hardware info Implement additional pvrusb2 device info table entries for a device identifier and a device description. Export this information via the driver's internal API. Make this information available via the sysfs driver interface. Also propagate this information into the v4l2 capability structure. An app can now retrieve and report a descriptive string about the particular type of hardware device it is operating. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit f66fbd71f24f5f0264bb8526cfb91ea5c6219f50 Author: Mike Isely Date: Mon Nov 26 01:55:07 2007 -0300 V4L/DVB (6694): pvrusb2: Remove obsolete global hardware type enumeration Device-specific driver behavior is now defined by generic device characteristics rather than by specific device model information. With this change, the hardware type field can go away, thus this change. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit f8bcec6d1814862e299e2a32ff9dbb0be0ff6ceb Author: Mike Isely Date: Mon Nov 26 02:30:20 2007 -0300 V4L/DVB (6693): pvrusb2: Add pvrusb2-devattr.o to driver build Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 989eb154eafad00c3b5039a3eca03e108dac1df8 Author: Mike Isely Date: Mon Nov 26 01:53:12 2007 -0300 V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place The pvrusb2 driver currently supports two variants of the Hauppauge PVR USB2. However there are other hardware types potentially supportable, but the driver at the moment is not structured to make it easy to describe these minor variations. This changeset is the first set of changes to make such additional device support possible. Device attributes are held in several tables all contained within pvrusb2-devattr.c; all other device-specific driver behavior now derives from these tables. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 681c739944018d80dbcf7f19997eba97676c7116 Author: Mike Isely Date: Mon Nov 26 01:48:52 2007 -0300 V4L/DVB (6691): pvrusb2: Rework pipeline state control This is a new implementation for video pipeline control within the pvrusb2 driver. Actual start/stop of the pipeline is moved to the driver's kernel thread. Pipeline stages are controlled autonomously based on surrounding pipeline or application control state. Kernel thread management is also cleaned up and moved into the internal control structure of the driver, solving a set up / tear down race along the way. Better failure recovery is implemented with this new control strategy. Also with this change comes better control of the cx23416 encoder, building on additional information learned about the peculiarities of controlling this part (this information was the original trigger for this rework). With this change, overall encoder stability should be considerably improved. Yes, this is a large change for this driver, but due to the nature of the feature being worked on, the changes are fairly pervasive and would be difficult to break into smaller pieces with any semblence of step-wise stability. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 493977f016f2ff52fdca38d031c7211b4da658fd Author: Brandon Philips Date: Fri Nov 30 22:37:28 2007 -0300 V4L/DVB (6688): V4L: fix copy and paste error in dprintk for videobuf-vmalloc.c Signed-off-by: Brandon Philips Signed-off-by: Mauro Carvalho Chehab commit cc76466b310f61e71ac10778781fdbdb97d333fd Author: Hermann Pitton Date: Wed Nov 28 21:54:35 2007 -0300 V4L/DVB (6687): saa7134: add mute support for radio/analog-in on MD9717 and MD7134 Currently the saa7134 chips only have mute support for the TV input. Cards with mute from external audio muxes are already fine on the other inputs and some recent tuners mute at least the radio on exit. But these mostly hybrid tuners are not fully backward compatible, since they must power down and mute regardless. For some included above, the MD7134 knows several, to switch on mute/automute to the TV input is functional and backward compatible for the applications, except that the tuners with tda9887 always mute on exit. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab commit 102df6a785bd5ff22b0ca745f3107ab9780fc30b Author: Michel Lespinasse Date: Mon Nov 26 18:57:10 2007 -0300 V4L/DVB (6685): ir-keymaps.c: extra keys on winfast Y04G0033 remote This change adds support for 4 extra keys on the remote currently being shipped by leadtek with their "WinFast TV2000 XP/Expert" and "WinFast PVR2000" cards. The remote P/N seems to be Y04G0033 and you can see a picture of it here: http://lespinasse.org/y04g0033.jpg The extra keys are at the bottom and are labeled MCE +VOL, -VOL, +CH, -CH. I chose to map them to the F21-F24 keycodes, following the precedent of ir_codes_gotview7135[], so as to differentiate these 'MCE' keys from the other +VOL, -VOL, +CH, -CH 'arrow' keys higher up on the remote. Signed-off-by: Michel Lespinasse Signed-off-by: Mauro Carvalho Chehab commit 5c15648a42016eebb9870dc3af44e94bca4f3604 Author: Mauro Carvalho Chehab Date: Sun Dec 2 00:02:18 2007 -0300 V4L/DVB (6683): Fix DVB compatibility DVB-S is not supported. Also, there are some QAM6 firmwares for xc3028, but it is reported that this doesn't work fine. Thanks to Manu Abraham, Michael Krufky and Patrick Boettcher for their insights. Signed-off-by: Mauro Carvalho Chehab commit 54465b082cc86921aa7d7b638d75803e6d919f25 Author: Michael Krufky Date: Fri Nov 23 18:14:53 2007 -0300 V4L/DVB (6681): tda18271: rename 'debug' to 'tda18271_debug' Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6ca04de36b05aaf2f8122d0e566940969c6df801 Author: Michael Krufky Date: Fri Nov 23 16:52:15 2007 -0300 V4L/DVB (6680): tda18271: move tda18271_map tables to a separate source file Move tda18271_map tables to a separate source file, to improve code readability and ease maintenance. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 63c254805e38bad4c64b5f5b0e135a2a357fa0bf Author: Michael Krufky Date: Fri Nov 23 15:08:11 2007 -0300 V4L/DVB (6679): tda8290: force tuner init after attach Force tuner init after attach, then sleep until use. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 22ee1250bd41534552c61be13994fd12d1ee1318 Author: Michael Krufky Date: Thu Nov 22 17:13:00 2007 -0300 V4L/DVB (6678): tda18271: define init callback Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 63806eeb61dcdf30fdbf488babff98aea2ca3f08 Author: Mauro Carvalho Chehab Date: Sun Nov 25 19:29:22 2007 -0300 V4L/DVB (6677): Fix xc2028 driver for non OFDM A previous patch implemented support for non-OFDM digital TV. However, the previous bandwidth ofdm parameter were left at the code by mistake. Thanks to Michael Krufky and Patrick Boettcher for noticing this mistake. Signed-off-by: Mauro Carvalho Chehab commit 66c2d53db28276fe49b49745230b7ac8d8fd5f47 Author: Mauro Carvalho Chehab Date: Sun Nov 25 19:26:36 2007 -0300 V4L/DVB (6676): Improve s-code support s-code tables are related to IF frequency used for video demodulation. The s-codes for analog are automatically loaded, according with video standard. However, for digital, they will depend on the IF of the demoduler chip. IF of the demoduler. Before this patch, only a few IF's where possible to use. This patch allows selecting any IF defined at firmware file. Signed-off-by: Mauro Carvalho Chehab commit b542dfdc9f6e6eaf3cc2ede27dbaf50425f8b4b5 Author: Mauro Carvalho Chehab Date: Sat Nov 24 11:07:12 2007 -0300 V4L/DVB (6675): Allow selecting the proper SCode table for DTV Signed-off-by: Mauro Carvalho Chehab commit d04aa54a27f7bc6f051e55c47abbc0a1db1718bc Author: Mauro Carvalho Chehab Date: Sat Nov 24 10:47:03 2007 -0300 V4L/DVB (6674): Add support for other DTV types Signed-off-by: Mauro Carvalho Chehab commit d74cb25e427e2ef979107cbed67d39eba53a6b0f Author: Mauro Carvalho Chehab Date: Sat Nov 24 10:20:15 2007 -0300 V4L/DVB (6672): Add support for radio Signed-off-by: Mauro Carvalho Chehab commit 00deff1a076dc1cf6743813657623626720bf0f5 Author: Mauro Carvalho Chehab Date: Sat Nov 24 10:13:42 2007 -0300 V4L/DVB (6671): Avoids checking digital/analog at check_firmware Since check_firmware is called via analog or digital set freq routines, move type selection to those routines. This avoids having several if's at the code, and simplifies the source code. A sideback effect is that implementing radio and other dvb types will become simpler. Signed-off-by: Mauro Carvalho Chehab commit f36224d3992a7734349cdd6289ff73c3d007ce09 Author: Maxim Levitsky Date: Tue Oct 23 00:58:59 2007 -0300 V4L/DVB (6670): V4L: saa7134: tvaudio cleanups move some tv-audio initialization code out of tvaudio thread, and call it on resume too. Signed-off-by: Maxim Levitsky Signed-off-by: Mauro Carvalho Chehab commit 5c01203fd289214ae3062dab4039fcbab4b2b84f Author: Maxim Levitsky Date: Sun Nov 4 18:21:25 2007 -0300 V4L/DVB (6669): Add few missing bits of code to saa7134_resume First the saa7134_initdev waits between saa7134_hwinit1 and saa7134_hwinit2 , thus it is probably wise to do the same in saa7134_resume some hardware probably needs this. Call saa7134_irq_video_signalchange in .resume like in saa7134_resume to make saa7134_resume mirror perfectly the saa7134_initdev although this call isn't strictly necessary in the saa7134_initdev, but it won't harm anyway. Signed-off-by: Maxim Levitsky Signed-off-by: Mauro Carvalho Chehab commit 3203cb86d22c63504f8368151029bf9dad014ddb Author: Maxim Levitsky Date: Sun Nov 4 19:34:23 2007 -0300 V4L/DVB (6668): Fix theoretical races between IRQ handler and .suspend/resume *dev->insuspend = 1 should be set before synchronize_irq *ACK interrupts after synchronize_irq, to make sure there aren't pending interrupts. *Add barrier before we restart interrupts so the handler will 100% see the dev->insuspend Signed-off-by: Maxim Levitsky Signed-off-by: Mauro Carvalho Chehab commit 0d65cd4f2bfe70872e4218d9d35d37a7000d6739 Author: Maxim Levitsky Date: Sun Nov 4 17:59:28 2007 -0300 V4L/DVB (6667): Fix access to configuration space while in D3 pci_save_state should be called before pci_set_power_state and pci_restore_state after pci_set_power_state Signed-off-by: Maxim Levitsky Signed-off-by: Mauro Carvalho Chehab commit 91821ff3f958c16bf84d02258dd79da792c66ca8 Author: Hans Verkuil Date: Sun Dec 2 09:35:33 2007 -0300 V4L/DVB (6665b): add ivtv to MAINTAINERS Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c5efc1778387de98d5348666e7bc4396c9a5404 Author: Adrian Bunk Date: Sun Nov 25 19:04:47 2007 -0300 V4L/DVB (6665a): finish the VID_HARDWARE_* removal This patch removes a few remainders of the VID_HARDWARE_* removal. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab 643d01fb38b6f376cced035549f4e193018776e7 commit c23f5949c0eeec328c872f29c8f4c233e73c3c4d Author: Mauro Carvalho Chehab Date: Fri Nov 23 14:22:14 2007 -0300 V4L/DVB (6665): Fix CodingStyle thanks to checkpatch.pl Signed-off-by: Mauro Carvalho Chehab commit 5a9dfc34fcee89ca399cf201a0904675e87c9576 Author: Mauro Carvalho Chehab Date: Fri Nov 23 14:20:24 2007 -0300 V4L/DVB (6664): Add missing USB ID's at CARDLIST.em28xx Signed-off-by: Mauro Carvalho Chehab commit cca83798119c92a3086af9e8a0419360c63aeadd Author: Mauro Carvalho Chehab Date: Thu Nov 22 11:47:18 2007 -0300 V4L/DVB (6662): Fix standard selection for PAL Not all 8MHz firmware are marked with F8MHz. Signed-off-by: Mauro Carvalho Chehab commit 2800ae9cd669db0fc9993cbefae02f181343c295 Author: Mauro Carvalho Chehab Date: Thu Nov 22 12:48:04 2007 -0300 V4L/DVB (6661): Remove firmware reload hack for analog On some cases, xc2028/xc3028 wents into "turn off" mode. It seems that this happens when very weak signals are tuned. To solve this, specific standard reaload were done previously. Christopher patches changed this behavior to a complete firmware reload. This patch removes the hack. A much cleaner solution for this trouble is just to sent a xc2028/3028 software reset. Signed-off-by: Mauro Carvalho Chehab commit 71a2ee37e8851f430d72daea0722908512d57f79 Author: Mauro Carvalho Chehab Date: Thu Nov 22 12:19:37 2007 -0300 V4L/DVB (6660): Allow fully configuring xc3028 during xc2028_attach xc3028 can be used on some DTV only designs (for example, DVB-S boards). Before this patch, a DTV only board would need to call set_tuner_config callback. This patch allows to optionally pass a xc3028_ctrl parameter, via xc3028_config struct, fully initializing the driver for DTV. Signed-off-by: Mauro Carvalho Chehab commit 5add9a6f3c90680f89b4694e81025d2aed9559af Author: Mauro Carvalho Chehab Date: Thu Nov 22 12:08:53 2007 -0300 V4L/DVB (6659): Convert MTS to bitfield Xc2028.3028 has two type of firmwares: audio-standard specific ones and baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares. It seems that the option to use MTS or a standard-specific audio decoding depends on the way xc2028/3028 is connected. Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS firmware, this patch converts it to a bitfield that can be shared with other proprieties of xc2028/3028. Signed-off-by: Mauro Carvalho Chehab commit a5e9fe149afb0fdf0de4729f1b0d203d4ac14906 Author: Mauro Carvalho Chehab Date: Fri Nov 23 11:36:18 2007 -0300 V4L/DVB (6658): Sets a default std, if not specified Some drivers call set_frequency before selecting the video standard. Before this patch, an invalid standard ID could be assumed. Signed-off-by: Mauro Carvalho Chehab commit c71d4bc512dda42069c70219bd00315a91550367 Author: Mauro Carvalho Chehab Date: Thu Nov 22 11:47:18 2007 -0300 V4L/DVB (6657): Fix standard selection for PAL/M, PAL/N, PAL/Nc and NTSC Those standards use 6 MHz firmware. Signed-off-by: Mauro Carvalho Chehab commit a1dcd9de648c8cf21abaeca7f77885665eed4117 Author: Chris Pascoe Date: Tue Nov 20 08:17:54 2007 -0300 V4L/DVB (6656): zl10353: store frequencies in 0.1kHz to eliminate rounding errors Whilst reanalysing my formulas I realised it was no longer possible to get the right values for a 36.1667MHz IF due to rounding problems. Storing frequencies in units of 0.1kHz makes it possible to calculate these again correctly. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 702a67624e4bc9c7056418b576af928940b7dbb9 Author: Chris Pascoe Date: Tue Nov 20 03:34:11 2007 -0300 V4L/DVB (6655): Add support for MT352-based DViCO FusionHDTV DVB-T NANO devices There are at least three variants of the DViCO FusionHDTV DVB-T NANO that share the same USB device ID. The first (ZL10353 w/ firmware in ROM) is already supported; the latter two both require firmware and have either an MT352 or ZL10353 demodulator, and have a different IR receiver from the first. This introduces a new identify_state that can tell the difference between a "warm" device which is running the embedded firmware, and a "cold" device that needs us to upload firmware to it before it will work. We patch the uploaded device ID (like we do for other bluebird devices) to make it easy to identify the particular device variant when it reattaches. NB: These devices use a different firmware file from previous bluebird devices. You need a new firmware file to make this work. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit c6e62a3a398d62e8ae366ac1465911db0ac7fc0b Author: Chris Pascoe Date: Tue Nov 20 02:49:41 2007 -0300 V4L/DVB (6654): mt352: support oversampled IF input Rework the input frequency calculation so that it produces the right values when the ADC oversamples the IF input. This means MT352 devices can now process a near-zero IF (according to the, specs 4.57MHz is supported with the default crystal). Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 5ccaf905015c83a9b28e8496b4504b9b8dc25a80 Author: Chris Pascoe Date: Tue Nov 20 01:53:31 2007 -0300 V4L/DVB (6653): Add support for the DViCO FusionHDTV NANO2 w/ZL10353 and firmware Add support for the DViCO FusionHDTV DVB-T NANO with zl10353 demodulator and firmware in ROM on the device. Again, this is based on the great work of Mike Krufky with my modifications to use the in-tree XC2028 driver. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 1ad0b796a3fa3d1c1a7d16be7c70b626da2940a9 Author: Chris Pascoe Date: Mon Nov 19 23:43:13 2007 -0300 V4L/DVB (6652): xc2028: try non-8MHZ init1 firmware When loading init1 firmware, there may not be an 8MHz specific version. Load the non-8MHz version if it exists. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 11a9eff9b66b1cf860faa84084328d798d18834c Author: Chris Pascoe Date: Mon Nov 19 23:18:36 2007 -0300 V4L/DVB (6651): xc2028: mask off type correctly when searching for standard-specific types When searching for standard-specific analog firmware, only certain type bits are valid, much like for DTV. Mask them off when finding the firmware to load. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 47bd5bc6486a5288aa3002533c24c8e9e564f9ac Author: Chris Pascoe Date: Mon Nov 19 23:11:37 2007 -0300 V4L/DVB (6650): xc2028: base firmwares should have std0 When loading BASE firmware, we must use std = 0. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit aeb012bbf460171b75ba17dc064a543f7256521f Author: Chris Pascoe Date: Mon Nov 19 21:57:10 2007 -0300 V4L/DVB (6649): Add support for the DViCO FusionHDTV Dual Digital 4 Add support for DViCO's Dual Digital 4 with xc3028 tuner, zl10353 DVB-T demodulator and a new-style I2C IR remote control receiver. This would not have been possible without the work of and advice from Mike Krufky, who originally got the Dual Digital 4 and second-gen DVB-T NANO devices working with the out-of-tree XC3028 driver. I converted it to use the in-tree XC3028 driver (after making it suitable for our use), and added the IR remote control support based on his advice. NB: a firmware package is required to use this device. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 45819c381fc4fb342dc091f30eef4b56193e34d5 Author: Chris Pascoe Date: Mon Nov 19 11:41:20 2007 -0300 V4L/DVB (6648): xc2028: add sleep hook Add sleep method to enable putting the tuner into standby mode. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 8bf799a6217f6336fb95f37bf1b130003404bd7b Author: Chris Pascoe Date: Mon Nov 19 11:35:45 2007 -0300 V4L/DVB (6647): xc2028: retry firmware load if tuner does not respond In practice, the tuner occasionally fails to respond correctly after a firmware load. Retry the firmware load if the firmware/hardware version we read back from the tuner after programming does not match what we expect. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit e0f0b37a3e624440b1b0e8a5978b367895226e75 Author: Chris Pascoe Date: Mon Nov 19 11:22:03 2007 -0300 V4L/DVB (6646): xc2028: rework firmware (re)loading process Define a list of valid "firmware types" for each combination of BASE, DTV and SCODEs. By masking the appropriate firmware bits off we can just use one "type" for the firmware searching and also flag when we are looking for a BASE, DTV or SCODE type firmware. This makes it much easier to track if we need to change device modes or flash an individual firmware part. Add a structure to remember what firmware properties we have. This contains the currently loaded/wanted base firmware (type), video std (id), video std requested (std_req), scode file and number in use. Incorporate said structure into the tuner private data. When checking whether the current firmware needs to be reloaded, first figure out exactly what "type" of firmware we want (base, std and scode), and then proceed to load the appropriate matching base, std-specific and scode records iff there are any changes required. This removes guesswork from the process because we no longer need to individually code a check for every tuning parameter's interactions. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 59a636e50f339f91880b3a1e395829c43cc6541a Author: Chris Pascoe Date: Mon Nov 19 10:23:17 2007 -0300 V4L/DVB (6645): xc2028: allow selection of D2633 firmware Add a bit to select D2633 DTV firmware to struct xc2028_ctrl, so that it can be enabled via .set_config. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit d7b22c5cfef28d21051331622f9595993a083cc4 Author: Chris Pascoe Date: Mon Nov 19 10:12:45 2007 -0300 V4L/DVB (6644): xc2028: use correct offset into scode firmware When validating and loading SCODE firmware we need to take into account the two-byte size header before each entry. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit b1535293dc816f01b0934718c370f9533c7d635e Author: Chris Pascoe Date: Mon Nov 19 10:04:06 2007 -0300 V4L/DVB (6643): xc2028: use best match instead of first partial match during firmware selection Rather than picking the first video standard firmware that supports any of the standards that the user has requested, try to select one that supports as many of them as possible. This improves the likelihood that the firmware we select will support the user's desired TV standard. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 0a196b6fa9b42a2bb49733b37565aaaa97ffb07f Author: Chris Pascoe Date: Mon Nov 19 09:29:59 2007 -0300 V4L/DVB (6642): xc2028: don't duplicate max_len in priv There is no need to duplicate the max_len field from the ctrl structure in the private data. If we use it directly from priv->ctrl, we can memcpy the structure (apart from strings) to reduce maintenance as it grows. Enforce a minimum max_len length of 8 data bytes (+ 1 address byte) as seems to be required by the tuner. Also, use kstrdup instead of open coding the string duplication. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit a44f1c43dfa98e2eb763968890157bfaf9001add Author: Chris Pascoe Date: Mon Nov 19 06:35:26 2007 -0300 V4L/DVB (6641): xc2028: correct tuner offset for 7MHz DTV 7MHz bandwidth DVB-T needs an adjusted offset at the PLL to ensure the IF output is correctly centered. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit ddf1c5f1d78c1ce30a7e6b2447670fc0e103bb62 Author: Chris Pascoe Date: Mon Nov 19 06:33:16 2007 -0300 V4L/DVB (6640): xc2028: correctly select 8MHz firmware We were using priv->bandwidth to select the base firmware to load, not the requested bandwidth value, oops. Also, 7MHz Digital TV needs 8MHz base firmware loaded. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 2ce4b3aa7c3c199466ae9f5ed32ea177912c8c3a Author: Chris Pascoe Date: Mon Nov 19 06:20:17 2007 -0300 V4L/DVB (6639): xc2028: correct divisor length The frequency divisor should only be four bytes long. Also, display the frequency and divisor correctly in the debug output. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 06fd82dc7bdc6045bf8d6c1438d2a33ffb1cf337 Author: Chris Pascoe Date: Mon Nov 19 06:06:08 2007 -0300 V4L/DVB (6638): xc2028: firmware loading cleanup Hold the private lock over set_config and set priv->firm_size to 0 after a failed firmware load to prevent firmware accidentally being freed on us. Clean up the firmware load/error messages somewhat and rename priv->version to priv->firm_version to make it clear which "version" it is. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit b32f9fb962d593e3c5a61092a79434714f405ef5 Author: Chris Pascoe Date: Mon Nov 19 04:53:50 2007 -0300 V4L/DVB (6637): xc2028: add missing break Add break to stop us from following the default failure path even upon success. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit aa501be989f5df58c4732d5eb1989e5ca6479d90 Author: Chris Pascoe Date: Mon Nov 19 04:45:38 2007 -0300 V4L/DVB (6636): xc2028: protect device list Protect refcount changes and modifications to xc2028_list with a mutex. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 91240dd92474d4124f80b00e6200052b275a99a1 Author: Chris Pascoe Date: Mon Nov 19 04:38:53 2007 -0300 V4L/DVB (6635): xc2028: v4l2_std_id needs to be long long to display completely Cast v4l2_std_id variables to unsigned long long so they will printk properly. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 3157ecef3bce47df74427d6656fa8592bfe8d2d7 Author: Chris Pascoe Date: Mon Nov 19 04:34:29 2007 -0300 V4L/DVB (6634): xc2028: error messages missing whitespace Fix some missing spaces in errors that may be emitted during attach failure. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 7d58d1117ec02f5fe22ddd03ca08fe2a8c777ea2 Author: Chris Pascoe Date: Mon Nov 19 04:31:58 2007 -0300 V4L/DVB (6633): xc2028: make register reads atomic Issuing register reads as a separate address write and data read transactions means that other I2C activity could occur in between and state could get out of sync. Issue both the write and read in a single transaction so that the i2c layer can prevent other users accessing the bus until we are complete. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit e155d908f72cc429b538c101ee8ffcd10a44b69b Author: Chris Pascoe Date: Mon Nov 19 04:16:47 2007 -0300 V4L/DVB (6632): xc2028: fix inverted logic in audio standard check strcasecmp returns 0 on match, not true. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 47cc5b78102b4e9993ea1c054b4f077cf7aac7db Author: Chris Pascoe Date: Mon Nov 19 04:14:23 2007 -0300 V4L/DVB (6631): xc2028: eliminate i2c macro side-effects The I2C macros have side effects and send_seq could cause a return from a function with a mutex held. Change them to behave like real functions. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 794604c3efb511b74fb664af72c5dd7046e91075 Author: Chris Pascoe Date: Mon Nov 19 03:55:45 2007 -0300 V4L/DVB (6630): zl10353: calculate input frequency register instead of using hardcoded value Now we know the zl10353's correct ADC clock, we can calculate the input frequency registers correctly instead of just blindly setting them. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 58d834ea89664b41e6e21ed2d8dc5680d0dd76b6 Author: Chris Pascoe Date: Mon Nov 19 03:32:06 2007 -0300 V4L/DVB (6628): zl10353: Improve support for boards without a tuner on secondary i2c Issue FSM_GO instead of TUNER_GO if there is no tuner attached to the secondary i2c bus. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit a644e4a3e95f8ca6eca019c92d8dfde101150687 Author: Chris Pascoe Date: Mon Nov 19 03:05:09 2007 -0300 V4L/DVB (6627): CXUSB: handle write then read from different address The path to perform a read immediately after a write was not checking that the address being read from was the same as the one that was written. Handling this case correctly should mean that we now can handle more than two i2c messages at a time. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 272479d7ab067344d118e7633b624bf98f8896f3 Author: Chris Pascoe Date: Mon Nov 19 03:01:22 2007 -0300 V4L/DVB (6626): CXUSB: support only-read i2c requests Any i2c read request that was not immediately preceded by a write request was incorrectly taking the write path. Add the capability to handle individual read requests. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 13e001dfe3aeb9e7b05445af76e5b47235e81285 Author: Chris Pascoe Date: Mon Nov 19 02:48:27 2007 -0300 V4L/DVB (6625): CXUSB: i2c transfer failure notification The i2c master_xfer routine should return a negative result if not all transfers completed successfully. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit b17f109df1cd9fe1009501d59e466701106590d7 Author: Chris Pascoe Date: Mon Nov 19 02:42:44 2007 -0300 V4L/DVB (6624): CXUSB: return control message transfer result to caller Callers to cxusb_ctrl_msg currently do not receive any indication that their transfer failed. Return the true return code from dvb_usb_generic_{rw,write}. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 166fb6b4721f9dd8eca3755517671154aa1eaaba Author: Adrian Bunk Date: Wed Nov 21 19:55:52 2007 -0300 V4L/DVB (6623): remove saa7134-oss The saa7134-oss is deprecated for quite some time, it's the only remaining OSS user outside of sound/oss/, and considering how few and what kind of soundcards are left supported by OSS I hardly see any use cases left. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 255c1887ccca6cde4a2eac231623b925bf621540 Author: Michael Krufky Date: Thu Nov 22 14:40:25 2007 -0300 V4L/DVB (6622): tda827x: prevent possible NULL pointer dereference in tda827xa_lna_gain If tda827x_config hasn't been defined, exit the function. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 3b0c453aa78be253b4414cd337c9975f91e2c894 Author: Michael Krufky Date: Sun Nov 18 14:15:42 2007 -0300 V4L/DVB (6621): tda827x: fix NULL pointer dereference during tda827x_probe_version Fix the following oops: [ 750.807586] CPU: 1 [ 750.807587] EIP: 0060:[] Tainted: P VLI [ 750.807589] EFLAGS: 00010296 (2.6.22-14-generic #1) [ 750.807599] EIP is at tda827x_probe_version+0xc3/0x130 [tda827x] [ 750.807603] eax: 00000000 ebx: f5a45a00 ecx: 00000000 edx: 00000001 [ 750.807607] esi: f9de05ac edi: e9b897e0 ebp: ed8015ac esp: ed735f58 [ 750.807611] ds: 007b es: 007b fs: 00d8 gs: 0000 ss: 0068 [ 750.807615] Process kdvb-fe-1 (pid: 10662, ti=ed734000 task=d3b76530 task.ti=ed734000) [ 750.807618] Stack: f9e23972 00000038 ed735fd0 00010060 41ae0001 ed735f73 88b89608 e9b89608 [ 750.807629] e9b89608 ed801400 f9dde338 e9b89608 f9b2a46b 000000ae 00000a18 d3b76640 [ 750.807639] fffffffc f9b2bad6 00000003 f4433e68 e962b8c0 f4433e64 00000292 ed735fd0 [ 750.807649] Call Trace: [ 750.807653] [] tda10046_init+0x2d2/0x6c0 [tda1004x] [ 750.807700] [] tda827x_initial_init+0x8/0x20 [tda827x] [ 750.807713] [] dvb_frontend_init+0x2b/0x60 [dvb_core] [ 750.807745] [] dvb_frontend_thread+0x66/0x2f0 [dvb_core] [ 750.807780] [complete+64/96] complete+0x40/0x60 [ 750.807805] [] dvb_frontend_thread+0x0/0x2f0 [dvb_core] [ 750.807822] [kthread+66/112] kthread+0x42/0x70 [ 750.807828] [kthread+0/112] kthread+0x0/0x70 [ 750.807841] [kernel_thread_helper+7/16] kernel_thread_helper+0x7/0x10 [ 750.807869] ======================= [ 750.807872] Code: 8b 74 24 20 8b 7c 24 24 83 c4 28 c3 8b 0d 00 0c de f9 85 c9 75 42 be e0 04 de f9 81 c7 0c 01 00 00 b9 33 00 00 00 f3 a5 8b 43 08 40 14 50 e3 dd f9 8b 5c 24 1c 31 c0 8b 74 24 20 8b 7c 24 24 [ 750.807925] EIP: [] tda827x_probe_version+0xc3/0x130 [tda827x] SS:ESP 0068:ed735f58 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 5efab70958186d2bd63ab27b9465fce202352143 Author: Michael Krufky Date: Thu Nov 22 14:15:34 2007 -0300 V4L/DVB (6620): kconfig: VIDEO_SAA7134 must select VIDEO_TVEEPROM The ability to read Hauppauge eeprom's was recently added to saa7134, so we must build the tveeprom module. Thanks to Matthias Schwarzott for pointing this out. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 122d15888a8aa95fb6ca32eb1307c3e3337f1a38 Author: Aidan Thornton Date: Tue Nov 20 15:25:08 2007 -0300 V4L/DVB (6619): Use MTS firmware for the HVR-900 The HVR-900 requires the MTS version of the xc3028 firmware in order to get any sound. The below patch selects this firmware variant on HVR-900 cards, as well as splitting the HVR-950 into its own entry (since I don't know if it uses the MTS variant and it will have to be split off eventually anyway). Signed-off-by: Aidan Thornton Signed-off-by: Mauro Carvalho Chehab commit 11645cc370c1af0f6bc9ef7440d452def9580790 Author: Joe Perches Date: Mon Nov 19 22:48:15 2007 -0300 V4L/DVB (6618): drivers/media/dvb: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab commit ac9bb7f5167d53207893a783a2f722cd6e6ed78f Author: Joe Perches Date: Tue Nov 20 09:00:35 2007 -0300 V4L/DVB (6617): drivers/media/video: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab commit 13d97010ed0850fd7803563a2b9d92a56bb4aa35 Author: Joe Perches Date: Mon Nov 19 22:48:16 2007 -0300 V4L/DVB (6616): drivers/media/radio: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab commit ef8c1888b32132ae48553a8ce00d5858ec3e9b51 Author: Mauro Carvalho Chehab Date: Fri Nov 16 16:28:21 2007 -0300 V4L/DVB (6614): Fix driver for i386 architectures Signed-off-by: Mauro Carvalho Chehab commit 2d4c0ac60dbcdee83da5bdebc661c2c145938d8a Author: Mauro Carvalho Chehab Date: Fri Nov 16 09:43:19 2007 -0300 V4L/DVB (6613): Fix: add a missing continue statement Signed-off-by: Mauro Carvalho Chehab commit 5403bbae9bfebe1f2df3a022c83e54f70906cefe Author: Michel Ludwig Date: Fri Nov 16 07:49:49 2007 -0300 V4L/DVB (6612): Allow RESET_CLK callback and avoids unneeded loading TM5600/TM6000 needs clock reset during firmware load. This patch adds the capability of caling a callback method for this. Also, avoids uneeded firmware loads. Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit a37b4c9bc87a74ed5003c385eae264fc0acf6b35 Author: Michel Ludwig Date: Fri Nov 16 07:46:14 2007 -0300 V4L/DVB (6611): Change xc2028_attach method to make easier for DVB Removes uneeded parameters and adds an structure for passing the parameters This patch is co-authored by Mauro Carvalho Chehab. Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit 2fc580ffeb551066f769934e3a4717d721d0a559 Author: Michel Ludwig Date: Fri Nov 16 07:19:35 2007 -0300 V4L/DVB (6610): Fix a wrong typecast Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit 993efa7133985597eb48fb486c661010ab08b525 Author: Michael Krufky Date: Thu Nov 15 10:34:33 2007 -0300 V4L/DVB (6607): saa7134: add support for reading Hauppauge eeprom Increased size of dev->eedata from 128 to 256, since the Hauppauge data begins at byte 128. This has been tested on boards with smaller eeproms, and caused no problems. Added comments to distinguish between the various versions of the HVR1110. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit ddf12227c3f8413d09c54f85e6642f79312f1430 Author: Michael Krufky Date: Thu Nov 15 10:01:11 2007 -0300 V4L/DVB (6606): saa7134: add autodetection support for alternate subids of Hauppauge HVR1110 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit a82200fb59e7d12a1365199d9fe350bbf74255e4 Author: Mauro Carvalho Chehab Date: Thu Nov 15 11:58:00 2007 -0300 V4L/DVB (6605): Add a modprobe option to manually select audio standard While there's no public API to define audio standard, adds a hack option for select them. This is needed only for NICAM and A2 firmwares, since AM, BTSC and EAIJ are already properly handled, on firmware version 2.7. Signed-off-by: Mauro Carvalho Chehab commit d6964aa8d4a418d69da1652121940fabc6b5d591 Author: Brandon Philips Date: Tue Nov 6 20:23:08 2007 -0300 V4L/DVB (6603): V4L: videobuf: convert streaming and reading to bitfields Signed-off-by: Brandon Philips Signed-off-by: Mauro Carvalho Chehab commit 0fc0686e64d21a6abded96af2b1a895dfa8b2530 Author: Brandon Philips Date: Tue Nov 6 20:02:36 2007 -0300 V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_ s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g s/STATE_PREPARED/VIDEOBUF_PREPARED/g s/STATE_QUEUED/VIDEOBUF_QUEUED/g s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g s/STATE_DONE/VIDEOBUF_DONE/g s/STATE_ERROR/VIDEOBUF_ERROR/g s/STATE_IDLE/VIDEOBUF_IDLE/g Signed-off-by: Brandon Philips Signed-off-by: Mauro Carvalho Chehab commit 1414becf15da1701b0c45e9c82b1f120cb676a36 Author: Mauro Carvalho Chehab Date: Thu Nov 15 10:45:19 2007 -0300 V4L/DVB (6598): Fix standard name Signed-off-by: Mauro Carvalho Chehab commit 83fb340b3184875a63564ea174350b1d1b081874 Author: Mauro Carvalho Chehab Date: Thu Nov 15 09:44:30 2007 -0300 V4L/DVB (6595): Corrects printk lines Make the driver less verbose by default. It adds a debug parameter to make the driver more verbose. Also, error messages were using KERN_ERR level, instead of KERN_INFO. A few printk messages were reviewed to make them more clear. Signed-off-by: Mauro Carvalho Chehab commit 98883cdcb5884bd0f7a89ac36b7170404127b3ea Author: Mauro Carvalho Chehab Date: Thu Nov 15 09:35:44 2007 -0300 V4L/DVB (6594): Add tuner_err macro Some tuners, like xc3028, need to print error messages. Instead of declaring local macros, create a tuner global macro for printing tuner errors. To preserve CodingStyle on all tuner_macros, a few CodingStyle violations were fixed at the other macros: - lines with more than 80 columns - two statements at the same line The patch also removes the CodingStyle violation of having emacs declarations inside de source code (CodingStyle chapter 18). Signed-off-by: Mauro Carvalho Chehab commit f380e1d2c9a1ff82a89ec68850ce53094359000e Author: Mauro Carvalho Chehab Date: Thu Nov 15 08:43:53 2007 -0300 V4L/DVB (6593): Fix scode table loading Xceive 2028/3028 has a concept of scode/dcode. Scode is a table of 16 values (each with 12 bytes i2c sequence). Dcode is the entry of Scode table that should be used, given a certain frequency. The idea is that, depending on what frequency is selected, and according with a country-based (or standard-based?) table, the Xceive should be "hacked" to fine-tune that specific frequency. By default, Scode=0 is used, for undefined frequencies. Also, Scode=0 seems to be the most used value. This patch adds the capability of selecting a scode. However, extra work will be needed to allow auto-selecting the proper scode, for a given set of frequencies. I'm not sure what would be the proper way for implementing the dcode selection. Signed-off-by: Mauro Carvalho Chehab commit 43efe70253dd13b2d22ee51bb474ece25b3b41b1 Author: Mauro Carvalho Chehab Date: Wed Nov 14 19:30:28 2007 -0300 V4L/DVB (6592): Add the capability to work with more complete firmwares Firmware version 2.7 has other firmware types. This patch adds the capability for the driver to work with those newer types. Signed-off-by: Mauro Carvalho Chehab commit ddef2dcc4ead7a9412533202a42c40648e620f43 Author: Luca Risolia Date: Mon Nov 12 11:42:54 2007 -0300 V4L/DVB (6591): Adds support for MT9V111 on sn9c102 Adds a new image sensor to the sn9c102 driver. Signed-off-by: Luca Risolia Signed-off-by: Mauro Carvalho Chehab commit 542794be2caf46b5fe95cbb7cd878d884597647e Author: Olivier DANET Date: Mon Nov 12 10:48:51 2007 -0300 V4L/DVB (6590): Adding support for VHF with MT2266-devices MT2266 : - support for VHF - Minor enhancements Signed-off-by: Olivier DANET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 67053a409af94ac3d67e0ef0651c42c8c10f5394 Author: dominik Date: Sat Nov 10 19:23:31 2007 -0300 V4L/DVB (6589): Gigabyte u7000 usb dvb-t support Signed-off-by: dominik Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 48e6a0173162690533951cd72b3edaa2e1605716 Author: Jaroslav Barton Date: Sat Nov 10 19:17:45 2007 -0300 V4L/DVB (6588): Leadtek Winfast DTV Dongle remote control Add remote controller support for Leadtek Winfast DTV Dongle based on DiB7700P, MT2060 and using last drivers (6040:6a79c243aecc), firmware dvb-usb-dib0700-03-pre1.fw Signed-off-by: Jaroslav Barton Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 7d497f8afa80128bb99a425a6d7a766a863128a5 Author: Mauro Carvalho Chehab Date: Sun Nov 11 14:15:34 2007 -0300 V4L/DVB (6587): Cleanup at tv norm selection With the conversion to the vidio_ioctl2, tvnorms array is not required anymore. Also, removed some code from V4L1 time (VIDEO_MODE_foo), specied at the non-used video_decoder.h. Signed-off-by: Mauro Carvalho Chehab commit cb77d010221e66c63f4a71546fed73be9b12b9a3 Author: Mauro Carvalho Chehab Date: Sun Nov 11 13:23:54 2007 -0300 V4L/DVB (6586): Remove some dead code and make drive fully V4L2 compatible There were some vestiges of an old V4L1 I2C driver that were called by em28xx. This patch removes this dead code, and replaces videodev.h to videodev2.h Now, this driver doesn't require V4L1 anymore. Signed-off-by: Mauro Carvalho Chehab commit 195a4ef627e110cd468a69fdb973548e6914577a Author: Mauro Carvalho Chehab Date: Sun Nov 11 13:17:17 2007 -0300 V4L/DVB (6585): Convert em28xx to video_ioctl2 Uses the newer ioctl handler at videodev. This patch also cleans up some bad logic at the driver and do CodingStyle and other cleanups at the resulting driver. Also, since VIDIOCMBUF were not working, the V4L1 compat code were removed. The compat code will eventually be re-inserted, if we find a clean way for implementing compatibility with the old API. Signed-off-by: Mauro Carvalho Chehab commit 9e31ced888d1ca49ec5be51ef295e3ce994366c4 Author: Mauro Carvalho Chehab Date: Sun Nov 11 01:13:49 2007 -0300 V4L/DVB (6584): Fix read() method Backport read() fixes from Markus Rechberger. Signed-off-by: Mauro Carvalho Chehab commit a225452ef80a7bd894fd2dfd01a4973d444152f4 Author: Mauro Carvalho Chehab Date: Sun Nov 11 01:08:26 2007 -0300 V4L/DVB (6583): Fix em28xx read stream locking On some situations, closing an streaming application and re-opening were returning -EBUSY. Uses the same locking schema also present on cx88. Signed-off-by: Mauro Carvalho Chehab commit a3a048cea301baba5d451991074a85dc20a8f228 Author: Mauro Carvalho Chehab Date: Sat Nov 10 22:21:01 2007 -0300 V4L/DVB (6582): Fix em28xx to allow multiple open Allows shared access support for em28xx. Just one userspace application is allowed to get stream. The other(s) application(s) can change V4L2 controls, set video standards, etc. This patch were splited from Markus Rechberger's tree and backported to 2.6.17 by Pádraig Brady. The original patch were ported to the latest em28xx version and had CodingStyle corrected to solve the issues pointed by scripts/checkpatch.pl. Thanks to Pádraig Brady for pointing this. Signed-off-by: Mauro Carvalho Chehab commit 2c94a674e059e89252d58da655efa4e798be4d48 Author: Sakari Ailus Date: Tue Oct 30 05:52:52 2007 -0300 V4L/DVB (6580): Set slave's master before master's attach call. V4L: Int if: Set slave's master before attach, remove master argument The master also now gets its own pointer from slave's structure. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 53133afbeeb177487a907fdc2edf18f857497641 Author: Adrian Bunk Date: Mon Nov 5 14:07:06 2007 -0300 V4L/DVB (6578): dvb-usb: make some debug vars static This patch makes some needlessly global debug variables static. opera1.h became so small that I removed it. Signed-off-by: Adrian Bunk Reviewed-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit f760d618ab385e1c4060f1bfebc335971a5b79f4 Author: Adrian Bunk Date: Mon Nov 5 14:07:26 2007 -0300 V4L/DVB (6577): et61x251/: make 5 functions static This patch makes the following needlessly global functions in et61x251_core.c static: - et61x251_read_reg() - et61x251_i2c_try_read() - et61x251_i2c_try_write() - et61x251_i2c_read() - et61x251_i2c_write() Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit a2fbaa519befdb3db2485116518f3af55be604e6 Author: Adrian Bunk Date: Mon Nov 5 14:07:22 2007 -0300 V4L/DVB (6576): cx88-mpeg.c: make 4 functions static This patch makes the following needlessly global functions static: - cx8802_init_common() - cx8802_fini_common() - cx8802_suspend_common() - cx8802_resume_common() Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 39e75cfedf5b40116136894241ca1182089f3637 Author: Adrian Bunk Date: Mon Nov 5 14:07:20 2007 -0300 V4L/DVB (6575): cx23885/: cleanups This patch contains the following cleanups: - make the following needlessly global code static: - cx23885-core.c: struct cx23885_sram_channels[] - cx23885-core.c: struct cx23887_sram_channels[] - cx23885-core.c: cx23885_wakeup() - cx23885-core.c: cx23885_sram_channel_setup() - cx23885-core.c: cx23885_sram_channel_dump() - cx23885-core.c: cx23885_risc_disasm() - cx23885-core.c: cx23885_shutdown() - cx23885-core.c: cx23885_reset() - cx23885-core.c: cx23885_dev_unregister() - cx23885-core.c: cx23885_risc_databuffer() - cx23885-core.c: cx23885_risc_stopper() - #if 0 the following unused functions: - cx23885-core.c: cx23885_risc_buffer() - cx23885-core.c: cx23885_cancel_buffers() - remove the following unused EXPORT_SYMBOL's: - cx23885-cards.c: cx23885_boards - cx23885-i2c.c: cx23885_call_i2c_clients Signed-off-by: Adrian Bunk Reviewed-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 9695a49839353bdaff79fe27399be2eb72585223 Author: Adrian Bunk Date: Mon Nov 5 14:07:18 2007 -0300 V4L/DVB (6574): common/ir-functions.c: make a function static ir_rc5_decode() can become static. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 6fce7fcd6d062f7acb423c5d6a190f2977454640 Author: Adrian Bunk Date: Mon Nov 5 14:06:52 2007 -0300 V4L/DVB (6573): unexport flexcop_reset_block_300 This patch removes the unused EXPORT_SYMBOL(flexcop_reset_block_300). Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 5e7361a143e94f85cd5f885782592fa835a3d001 Author: Adrian Bunk Date: Mon Nov 5 14:06:47 2007 -0300 V4L/DVB (6572): dvb-usb/vp702x.c: cleanups This patch contains the following cleanups: - make the needlessly global vp702x_usb_out_op() static - #if 0 the unused vp702x_power_ctrl() Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit ad1ce84047a39aec735ef0d5efe29b845bea3262 Author: Adrian Bunk Date: Mon Nov 5 14:06:41 2007 -0300 V4L/DVB (6571): dvb-usb/gp8psk.c: #if 0 gp8psk_bcm4500_reload() This patch #if 0's the unused gp8psk_bcm4500_reload() Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 67b24c78839067729b660116ba394568cd136130 Author: Adrian Bunk Date: Mon Nov 5 14:06:38 2007 -0300 V4L/DVB (6570): core/dvb_ringbuffer.c: remove unused exports This patch removes the following unused EXPORT_SYMBOL's: - dvb_ringbuffer_flush - dvb_ringbuffer_pkt_write - dvb_ringbuffer_pkt_read - dvb_ringbuffer_pkt_dispose - dvb_ringbuffer_pkt_next Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit b00ef4b8d8c29bfb5f6f92ee60bc04b604f36ef2 Author: Adrian Bunk Date: Mon Nov 5 14:06:31 2007 -0300 V4L/DVB (6569): bt8xx/dst.c: make code static This patch makes the following needlessly global code static: - dst_gpio_outb() - dst_gpio_inb() - rdc_8820_reset() - dst_pio_enable() - dst_command() - struct tuner_list[] Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit c80296d755df29167deafa53e612644a95b40c6e Author: Roel Kluin <12o3l@tiscali.nl> Date: Tue Nov 6 10:25:16 2007 -0300 V4L/DVB (6564): Move check before lock Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Andrew Morton CC: Antti Palosaari CC: Carl Lundqvist CC: Aapo Tahkola Signed-off-by: Mauro Carvalho Chehab commit bbe1e0ba527a18e1ddda2eabb9da369e5bcf556e Author: Michael Krufky Date: Mon Nov 5 09:54:42 2007 -0300 V4L/DVB (6563): tda8290: optimize for loop in tda829x_probe function Thanks to Trent Piepho for pointing this out. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 98ae127cae56b99f2282d73399e0e1ca7dc13bc9 Author: Mauro Carvalho Chehab Date: Mon Nov 5 09:30:39 2007 -0300 V4L/DVB (6562): Make HVR900 to use also tveeprom Hauppauge firmwares can be decoded using tveeprom. This patch adds HVR-900 as a tveeprom client. It also adds xc3028 tuner entry to tveeprom. Signed-off-by: Mauro Carvalho Chehab commit 80b522085a2c870ba0c0bdf2415cc925d7c86ca5 Author: Mauro Carvalho Chehab Date: Mon Nov 5 09:07:13 2007 -0300 V4L/DVB (6561): Fix xc2028 get register functions and calls The status registers require a dword for setting register. Fix it on all occurrences, and at xc3028_get_reg. Also, improves the hardware/firmware detection printk. Signed-off-by: Mauro Carvalho Chehab commit f8b6030ccca06bf0d45d9b0908caac9b624a9beb Author: Mauro Carvalho Chehab Date: Mon Nov 5 08:42:55 2007 -0300 V4L/DVB (6560): Fix a bug when setting tuner type Tuner-type were correctly filled only by the hint function. Signed-off-by: Mauro Carvalho Chehab commit b873e1a3ccf9e04d2de85db0d510ec4b793fe569 Author: Mauro Carvalho Chehab Date: Mon Nov 5 08:41:50 2007 -0300 V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg Signed-off-by: Mauro Carvalho Chehab commit e7a2bc8a756e5c0adc6804dd7702442a06174b74 Author: Hans Verkuil Date: Thu Nov 1 06:19:39 2007 -0300 V4L/DVB (6557): tea5767: remove unnecessary warning Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9dd659de9fbd1687c6175053c6453db5b932f152 Author: Hans Verkuil Date: Sun Nov 4 11:03:36 2007 -0300 V4L/DVB (6556): tuner: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 92de1f16d15a30831d1685949aeb76c99032ef23 Author: Hans Verkuil Date: Sun Nov 4 10:53:09 2007 -0300 V4L/DVB (6555): tuner: reorder functions to prepare for i2c conversion Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 159ffe77cd9b1cd7c80c416b5635bdad7e3d7d55 Author: Hans Verkuil Date: Sun Nov 4 10:42:42 2007 -0300 V4L/DVB (6553): tuner: replace default_mode_mask The default_mode_mask global is replaced by a list of tuner structs. The tuner driver now walks that list to see which radio and/or tv tuner devices are registered to a given i2c adapter. The default_mode_mask global had to go since this is no longer supported with the new bus-based I2C API. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a818e1c8f7fcb42866a8630c508caddaa8edb331 Author: Michael Krufky Date: Sun Nov 4 11:03:22 2007 -0300 V4L/DVB (6551): tda8290: rule out tda988x before detecting tda8290/tda8295 To ensure prevention of detecting a tda9885/6/7 as a tda8290 or tda8295, we will rule out the tda988x before testing the tda8290 / tda8295 id registers. We read 8 bytes from the chip. If they are all equal, then it is not a tda829x, or some other error has occurred. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 1f3a4e328549cb85aa032c4ee5dfda7886754154 Author: Michael Krufky Date: Sun Nov 4 10:51:28 2007 -0300 V4L/DVB (6550): tda8290: return -ENODEV on probe failures Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 232fcefb55e67cf38176a1e5c188a04694445f11 Author: Mauro Carvalho Chehab Date: Fri Jan 25 11:01:41 2008 -0200 V4L/DVB(6548b) Fix compilation for em28xx From: Mauro Carvalho Chehab In file included from drivers/media/video/em28xx/em28xx-i2c.c:31: drivers/media/video/tuner-xc2028.h:10:26: error: dvb_frontend.h: No such file or directory In file included from drivers/media/video/em28xx/em28xx-i2c.c:31: drivers/media/video/tuner-xc2028.h:32: warning: 'struct dvb_frontend' declared inside parameter list drivers/media/video/tuner-xc2028.h:32: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Mauro Carvalho Chehab commit e3e97fe61f25aa36b96afe2f16a915dd966c70b0 Author: Mauro Carvalho Chehab Date: Fri Jan 25 11:01:40 2008 -0200 V4L/DVB(6548a) Fix compilation for TDA8290 From: Mauro Carvalho Chehab drivers/media/video/tda8290.c:27:21: error: tda827x.h: No such file or directory drivers/media/video/tda8290.c:28:22: error: tda18271.h: No such file or directory drivers/media/video/tda8290.c:52: error: field 'cfg' has incomplete type drivers/media/video/tda8290.c: In function 'tda829x_find_tuner': drivers/media/video/tda8290.c:590: error: implicit declaration of function 'tda18271_attach' drivers/media/video/tda8290.c:598: error: implicit declaration of function 'tda827x_attach' Signed-off-by: Mauro Carvalho Chehab commit d2ba055d3b7ca7694af38a735f00850363ee9417 Author: Mauro Carvalho Chehab Date: Sun Nov 4 08:32:42 2007 -0300 V4L/DVB (6546): Add comments for the hint methods Signed-off-by: Mauro Carvalho Chehab commit fad7b958e753e18ff443786360f7846da50a3085 Author: Sascha Sommer Date: Sun Nov 4 08:06:48 2007 -0300 V4L/DVB (6545): em28xx: autodetect Cinergy 200 USB and VGear PocketTV Adds autodetection support for the Cinergy200 USB and the VGear PocketTV. Whenever a usb device with generic empia em2800 usb ids is detected the device gets scanned for connected i2c devices. If the device list matches an em2800 device in the device list the model id gets changed accordingly. Signed-off-by: Sascha Sommer Signed-off-by: Mauro Carvalho Chehab commit f1f32849d65ab1eacfedbabb624876ac06c1af9f Author: Michael Krufky Date: Sat Nov 3 22:14:54 2007 -0300 V4L/DVB (6543): tda8290: enable probing of tda8295 Prevent the tda8295 from falsely being detected as a tda9887 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 9b15c0251ba9d20dd88a69b2c607a2f2e5f0133a Author: Mauro Carvalho Chehab Date: Sat Nov 3 22:04:33 2007 -0300 V4L/DVB (6541): Add V-Gear PocketTV to Cardlist.em28xx Signed-off-by: Mauro Carvalho Chehab commit 4362559d826b369df41fc74df4c5db6061962dce Author: Sascha Sommer Date: Sat Nov 3 15:05:07 2007 -0300 V4L/DVB (6539): em28xx: add support for vgear pockettv attached patch adds support for the vgear pockettv. It seems to require a write to another register for audio to work. I checked my old cinergydrv and we did the same register write there. I therefore enabled it for all em2800 based devices. Signed-off-by: Sascha Sommer Signed-off-by: Mauro Carvalho Chehab commit 5a80415bcabf2b59e8c34db6e743c54582cfd3c2 Author: Sascha Sommer Date: Sat Nov 3 21:22:38 2007 -0300 V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different threads at the same time The attached patch modifies the em28xx driver so that there can be ioctls from multiple different threads. This is necessary for capture apps like MPlayer that use different threads for capturing and channel tuning. Now the locking is only done for the ioctls that change properties of the device or access the i2c bus. It also removes some locks that look unnecessary: In em28xx_init_dev: the videodevice is not registered yet so nothing can access the hardware meanwhile, the device struct is not assigned to the interface yet so no race with disconnect is possible In em28xx_release_resources: it gets only called when dev->lock is already held Signed-off-by: Sascha Sommer Signed-off-by: Mauro Carvalho Chehab commit ea4fd5679b258d8ae85124a47b587a53ba6409de Author: Mauro Carvalho Chehab Date: Sat Nov 3 21:21:57 2007 -0300 V4L/DVB (6537): Add entry for Pixelview Prolink PlayTV USB 2.0 Signed-off-by: Mauro Carvalho Chehab commit 03910cc39035d27f4c85c8ad2a236cc5c9456127 Author: Mauro Carvalho Chehab Date: Sat Nov 3 21:20:59 2007 -0300 V4L/DVB (6536): Add a hint for boards without unique USB ID This patch adds a function to allow trying to detect boards that shares the generic IDs. The current detection method is based at eeprom checksum. Signed-off-by: Mauro Carvalho Chehab commit 3dbd85ba36ff74af87550e76f5765a768b108409 Author: Mauro Carvalho Chehab Date: Sat Nov 3 08:07:07 2007 -0300 V4L/DVB (6535): Fix: Adds the generic PCI IDs for em28xx Signed-off-by: Mauro Carvalho Chehab commit 7d070e26a868bd72f0d32189e0f3ceba47d2db82 Author: Mauro Carvalho Chehab Date: Thu Nov 1 21:52:58 2007 -0300 V4L/DVB (6519): Fix HVR900/HVR950 entry - Television is now default; - Add HVR950 name at the entry. Signed-off-by: Mauro Carvalho Chehab commit ab0b9fc67c2370e813ccd5d83bca8db320e67eeb Author: Mauro Carvalho Chehab Date: Thu Nov 1 17:47:42 2007 -0300 V4L/DVB (6517): CodingStyle fixup Used scripts/Lindent + manual check + scripts/checkpatch.pl Signed-off-by: Mauro Carvalho Chehab commit 352fae1dffe2d0d04949e579d03667377a176cff Author: Mauro Carvalho Chehab Date: Thu Nov 1 16:56:26 2007 -0300 V4L/DVB (6516): Allow faster loading by using 64 bytes block by em28xx i2c write Signed-off-by: Mauro Carvalho Chehab commit 8ae1fe2a0935afa878b8a506633fea45a8b00293 Author: Trent Piepho Date: Thu Nov 1 01:16:05 2007 -0300 V4L/DVB (6508): ttpci: Rework Kconfig menus and Makefile The ttpci Kconfig file has bugs that cause it to fail in certain Kconfig situations. The basic problem is that it selects certain drivers, but does not depend on the dependencies of those drivers. See http://article.gmane.org/gmane.comp.video.video4linux/35072 Using the Kconfig file also has some annoyances. For instance one can't turn off AV7110 support unless you go down several options and first turn off budget-patch support. Normally user selectable drivers are not forced on like this. The "AV7110 cards with Budget Patch" option is disabled if "Budget cards" isn't on. Normally a driver appears nested under a driver it depends on, but since drivers that don't depend on "Budget cards" are between the two options, the config programs can't display the tree correctly. The Makefile has an issue too. Some modules, ttpci-eeprom and budget-core, appear in the Makefile under several different config symbols. If more than one of these symbols is on, they will get added the to list of objects multiple times. The normal convention is to have a config symbol just the common object(s) and have the users of the that object either depend on or select that config symbol. This patch fixes all these issues. ttpci-eepom is under a new config symbol, and so is the budget-core module. The four different budget card types appear as sub-drivers under a main "SAA7146 DVB cards" option. Turning on budget-patch doesn't force AV7110. Drivers using SAA7146_VV have the necessary VIDEO_DEV dependency, so that it isn't possible to select SAA7146_VV without V4L being on. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 00405f8f11d3064c4af6fe826d8287863a453e7f Author: Trent Piepho Date: Thu Nov 1 01:16:04 2007 -0300 V4L/DVB (6507): bttv: whitespace cleanup Someone wasn't using the v4l-dvb commit scripts and so didn't run the automatic whitespace cleaner on their code. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 58a44040b4937c7d16b79a1b3048992eeac9853b Author: Marco Schluessler Date: Wed Oct 31 01:20:42 2007 -0300 V4L/DVB (6497): saa7146/budget*/dvb-ttpci: Remove V4L1 code Remove V4L1 code. Signed-off-by: Marco Schluessler Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit c5d857d5d3a7cfe355d93916fc094035c85147f7 Author: Marco Schluessler Date: Wed Oct 31 00:44:22 2007 -0300 V4L/DVB (6496): saa7146_vv.h: remove wrong include remove wrong include Signed-off-by: Marco Schluessler Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit 241020d19ee9da29171d989ff876c657e4b938b5 Author: Michael Krufky Date: Tue Oct 30 09:46:10 2007 -0300 V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency Alter the tuner_foo printk macros to indicate which module is generating the message. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4942744f93884cb462400c66258c0013bea65dcf Author: Michael Krufky Date: Tue Oct 30 09:44:12 2007 -0300 V4L/DVB (6491): tuner: prevent repeated "type set" message unless debug is enabled The tuner sub-module will usually log its type during its _attach() function, then tuner-core reports which type was attached when control is returned. In most cases, we expect to see the same message reported from both locations. We only need to see this second message if debug is enabled. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7a06f3f2aab797a12f28cf0f4504ec4e346e97f9 Author: Hans Verkuil Date: Tue Oct 30 06:00:05 2007 -0300 V4L/DVB (6490): Remove EXPERIMENTAL from several i2c drivers Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fdef464a7fdcc0f5905d380b2065fec7715bc95d Author: Hans Verkuil Date: Tue Oct 30 05:55:58 2007 -0300 V4L/DVB (6489): ivtv: add support for AVerMedia PVR-150 Plus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2a1774d9c8b866db65853fd1a17e5f472dd5cf2 Author: Hans Verkuil Date: Tue Oct 30 05:50:03 2007 -0300 V4L/DVB (6488): ivtv: add ASUS Falcon2 support Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 05e997197e459a03df577ba49c34c1820957ee4a Author: Hans Verkuil Date: Tue Oct 30 05:41:54 2007 -0300 V4L/DVB (6487): i2c-id: add M52790 driver ID Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 761dacd25d9e9be2358df21a0f086bbb4cf1c789 Author: Hans Verkuil Date: Tue Oct 30 05:41:25 2007 -0300 V4L/DVB (6486): m52790: add new Mitsubishi A/V switch i2c driver This driver is used by the ASUS Falcon2 cx23416-based cards. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4be2f47054fb12a5868838770595e8d3a02e60f2 Author: Douglas Schilling Landgraf Date: Mon Oct 29 00:44:55 2007 -0300 V4L/DVB (6483): ivtv-streams: make file_operations const Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit bdd36658fe7cce3b7dbb6ffb72ad0c9500d57e7a Author: Douglas Schilling Landgraf Date: Mon Oct 29 00:37:07 2007 -0300 V4L/DVB (6482): zr364: make file_operations const zr364: make file_operations const Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit c7ac61c4693da113fd067ccfa4246df1e8a5c75e Author: Douglas Schilling Landgraf Date: Sun Oct 28 23:41:19 2007 -0300 V4L/DVB (6481): radio-gemtek: make file_operations const make file_operations const Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 073ad9a00c653ac4a1668c324dd132c9996473f1 Author: Randy Dunlap Date: Mon Oct 29 15:19:45 2007 -0300 V4L/DVB (6480): bttv: uses input functions, should depend on INPUT Several media drivers use input_(*) functions so they need to depend on the INPUT config symbol. drivers/built-in.o: In function `bttv_input_fini': linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:346: undefined reference to `input_unregister_device' drivers/built-in.o: In function `bttv_input_init': linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:204: undefined reference to `input_allocate_device' linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:335: undefined reference to `input_free_device' linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:321: undefined reference to `input_register_device' linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:335: undefined reference to `input_free_device' Signed-off-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab commit 983d214e08010c7b3c1997dc9cab7fa0984446f0 Author: Mauro Carvalho Chehab Date: Mon Oct 29 23:44:18 2007 -0300 V4L/DVB (6477): Properly fill MODULE_AUTHOR Most of the driver were written by Mauro Carvalho Chehab. DTV parts were added by Michel Ludwig. Reviewed-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit 6c362c8e58da972728a3666a0a00b9c2f1574e1f Author: Mauro Carvalho Chehab Date: Mon Oct 29 23:36:12 2007 -0300 V4L/DVB (6476): Add support for analog tv on HVR-950 This patch adds USB ID for HVR-950. It also adds the callback for handling firmware loading. Thanks to Markus Reichberger for the reset commands. Signed-off-by: Mauro Carvalho Chehab commit 1808a698a87366f9d82945270355c2139df0a16d Author: Mauro Carvalho Chehab Date: Mon Oct 29 17:38:59 2007 -0300 V4L/DVB (6475): Fix some troubles at list handling - priv->count were wrong. Should be incremented since the first usage; - forgot to use list_del() to remove the driver; - Release memory if an error occurs during _attach Thanks to Aidan Thornton for pointing this. Signed-off-by: Mauro Carvalho Chehab commit 882876bf9780fac570184b719a76140a1b1e4178 Author: Mauro Carvalho Chehab Date: Mon Oct 29 11:33:18 2007 -0300 V4L/DVB (6474): Add support for tuner-xc2028 Signed-off-by: Mauro Carvalho Chehab commit 48aa336a842ad3bd4f031f14fb6d06b0274c38f9 Author: Mauro Carvalho Chehab Date: Mon Oct 29 11:33:18 2007 -0300 V4L/DVB (6473): Prevents double tuner registering Signed-off-by: Mauro Carvalho Chehab commit 690c544cf849e627d3f40a71633d0caf5c33eafe Author: Mauro Carvalho Chehab Date: Mon Oct 29 11:33:18 2007 -0300 V4L/DVB (6472): Re-inserts xc2028 attach code, fixing its parameters I2C bus redesign changed i2c parameters. This patch re-adds tuner xc2028 attach function, replacing the parameters to the newer syntax. Signed-off-by: Mauro Carvalho Chehab commit 1cba97d71dca1a3c22b4d7f97893249817036215 Author: Hans Verkuil Date: Fri Sep 14 05:13:54 2007 -0300 V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct The bus-based I2C subsystem allocates the i2c_client struct. So if in order to be able to convert the tuner to the bus-based I2C API the embedded i2c_client struct must be removed from the tuner struct and replaced with a pointer. Signed-off-by: Hans Verkuil Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 1a156045ab06b2cce8cf46e7bf53da26ab33b084 Author: Mauro Carvalho Chehab Date: Mon Oct 29 11:33:18 2007 -0300 V4L/DVB (6470): Avoid breaking compilation The next patchset series will change i2c structs inside tuner. This patch avoids breaking bissect, by commenting the still unused tuner xc2028. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 0b5f4a12e628893624b478523fb4e2708c605710 Author: Michael Krufky Date: Sat Oct 27 13:09:16 2007 -0300 V4L/DVB (6469): tuner: remove TUNER_PHILIPS_TDA8295 TUNER_PHILIPS_TDA8290 will autodetect a TDA8290 or a TDA8295, so we don't need this separate entry anymore. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 8c125f2ceb3ec1ba01e96fffd8558ef163b40fe8 Author: Michael Krufky Date: Sat Oct 27 02:00:57 2007 -0300 V4L/DVB (6468): tda8290: auto-detect tda8290 or tda8295 Consolidate tda8290_attach() and tda8295_attach() into a single function, tda829x_attach(), which will detect chip combinations tda8290 or tda8295 with tda8275, tda8275a or tda18271. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 393bf5573269979aa3fb55d1bdd0db4fcb288f99 Author: Hans Verkuil Date: Tue Sep 18 03:22:32 2007 -0300 V4L/DVB (6467): v4l2-common: minor cleanups Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a2e521e85c04af3511af3ea8971efb4ef8bde533 Author: Hans Verkuil Date: Mon Sep 17 05:13:45 2007 -0300 V4L/DVB (6466): v4l2-i2c-drv: first call remove, then detach client The remove driver function expects that the client is still attached to the driver, so do the detach after calling remove(). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 188f3457c21ac7869005021b56b4578293c644bb Author: Hans Verkuil Date: Sun Sep 16 10:47:15 2007 -0300 V4L/DVB (6465): Use correct error codes when chip is not recognized If the chip isn't recognized, then the correct errors should be returned. The v4l2_i2c_attach() utility function will return 0 for all errors except -ENOMEM to provide proper compatibility support for the old I2C probing function. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6235168db8ed96c587e566be0dd72a77ca212693 Author: Hans Verkuil Date: Fri Sep 14 05:03:17 2007 -0300 V4L/DVB (6464): tlv320aic23b: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2b14e0314631bac6388c4501f3103ab5af22c0f0 Author: Hans Verkuil Date: Fri Sep 14 04:58:31 2007 -0300 V4L/DVB (6463): upd64031a: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 266669776c12b92bab6e0bba4b3124ae920df194 Author: Hans Verkuil Date: Fri Sep 14 04:58:06 2007 -0300 V4L/DVB (6462): upd64083: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 08e140544029192a123cc2cbf28edeb5d5462ad2 Author: Hans Verkuil Date: Fri Sep 14 04:50:44 2007 -0300 V4L/DVB (6461): tvaudio: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 88307eb3c69c80a705072e68463d8f72005fc027 Author: Hans Verkuil Date: Fri Sep 14 04:49:16 2007 -0300 V4L/DVB (6460): v4l2-i2c-drv: add legacy_probe function pointer Some devices do complicated tests whether the device can be probed or not. Add a legacy_probe function pointer to support that. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a39275a3f2fc6fbdb876f5121d67d4b13310c5b Author: Hans Verkuil Date: Thu Sep 13 11:44:47 2007 -0300 V4L/DVB (6459): cx25840: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e8e6b99184aa8cf72c5a28bf2a64f6d81473b1ca Author: Hans Verkuil Date: Thu Sep 13 11:30:38 2007 -0300 V4L/DVB (6458): cs53l23a: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79518dafd59a812bb390f201c6f18a8f875fcffb Author: Hans Verkuil Date: Thu Sep 13 11:28:59 2007 -0300 V4L/DVB (6457): msp3400: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 77566dd724f118b332b5dbf62eedc869f1263f22 Author: Hans Verkuil Date: Thu Sep 13 11:21:51 2007 -0300 V4L/DVB (6456): saa7127: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fbaa3d0db482ae55fc054b9446c1ecf699754054 Author: Hans Verkuil Date: Thu Sep 13 11:19:39 2007 -0300 V4L/DVB (6455): saa7115: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45eea27624d4dacd36c2167f75e2510ee5d4ab26 Author: Hans Verkuil Date: Thu Sep 13 11:11:44 2007 -0300 V4L/DVB (6454): vp27smpx: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49457cc2792a63512112434534ecfdd3d4c66e93 Author: Hans Verkuil Date: Thu Sep 13 11:10:07 2007 -0300 V4L/DVB (6453): wm8739: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d9a53aa9024e507df01f257494956e906a92c864 Author: Hans Verkuil Date: Thu Sep 13 11:08:25 2007 -0300 V4L/DVB (6452): wm8775: convert to bus-based I2C API Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ffbc6559493c64d6194c92d856196fdaeb8a5fb Author: Hans Verkuil Date: Wed Sep 12 08:32:50 2007 -0300 V4L/DVB (6451): v4l2: add support for bus-based I2C drivers Two new headers were added: one for I2C drivers that are only used by V4L2 drivers converted to the new bus-based I2C API, and one that can be used by both converted and unconverted drivers (at the expense of some additional overhead). To support the legacy I2C API a helper function was added to v4l2-common.c. These headers take care of all the 'boilerplate' code that all V4L2 I2C drivers have in common and will automatically support the bus-based I2C API introduced in kernel 2.6.22. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5ef4730d1bfe5be71ce54d927c510ad5da968854 Author: Michael Krufky Date: Sat Oct 27 02:17:19 2007 -0300 V4L/DVB (6450): tda9887: add missing module license This module was always GPL, and will remain GPL Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 7d11c53c5d909d866dee0ce5db2d6ca1c422edca Author: Michael Krufky Date: Wed Oct 24 09:55:54 2007 -0300 V4L/DVB (6449): tda18271: clean up i2c_gate handling Call analog_demod_ops->i2c_gate_ctrl when in analog tuning mode, and frontend_ops.i2c_gate_ctrl when in digital tuning mode. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit a72dd305f99f6c6e4eff01478ae53fc80ce98fb1 Author: Michael Krufky Date: Wed Oct 24 09:30:17 2007 -0300 V4L/DVB (6448): tda8290: fill i2c_gate_ctrl callback Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2be1b48fd27a3b6878db034288ed571b03df3a5c Author: Michael Krufky Date: Wed Oct 24 09:23:17 2007 -0300 V4L/DVB (6447): tuner: add i2c_gate_ctrl function to struct analog_tuner_ops In some designs, the tuner silicon may be on an i2c bus behind an i2c gate, controlled by the analog demodulator. We already have a method to control such i2c gates when they are controlled by the digital demodulator, but in some hybrid designs, there may be an i2c gate controlled by each demodulator. For example, when in analog tuning mode, one would access the tuner by opening the i2c gate controlled by the analog demodulator, while when in digital tuning mode, one would access the tuner by opening the i2c gate controlled by the digital demodulator. We must add this callback function to analog_tuner_ops in order to handle such configurations. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 6f998742f09a7116f1232cebc87a814e3aca639a Author: Michael Krufky Date: Wed Oct 24 01:00:24 2007 -0300 V4L/DVB (6446): tda18271: clean up debug macros Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4524c1aba5449d3519d1545f8106811eb73fc72c Author: Michael Krufky Date: Mon Oct 22 18:15:39 2007 -0300 V4L/DVB (6445): tuner-core: improve comments inside function fe_release() Explain who is responsible for freeing analog_demod_priv Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit af3b0f3f01d299c46837a408e1b9510b8c304e43 Author: Michael Krufky Date: Mon Oct 22 18:03:29 2007 -0300 V4L/DVB (6444): tuner-core: remove excessive parenthesis Convert all instances of "if ((ops) && (ops->foo))" to "if (ops && ops->foo)" Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 31c9584c0b071dfa7a75db6e21cc727f728f97b0 Author: Michael Krufky Date: Sun Oct 21 20:48:48 2007 -0300 V4L/DVB (6443): make tda9887 build selectable via Kconfig Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5c82f4497b46e9c3877618bc36661a4abbf9c646 Author: Michael Krufky Date: Mon Oct 22 01:10:39 2007 -0300 V4L/DVB (6442): move std if setting from tda8290 to tda827x Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1b29cedab9e69a6e4c9bba5f1981437b62be7bea Author: Michael Krufky Date: Mon Oct 22 01:44:03 2007 -0300 V4L/DVB (6441): tuner: clean up ops checking in tuner_status function Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4e9154b8a77d0f0f8f06857162823905612a50d7 Author: Michael Krufky Date: Sun Oct 21 19:39:50 2007 -0300 V4L/DVB (6440): tuner: convert analog tuner demod sub-modules to dvb_frontend interface Convert tda9887 and tda8290/5 to dvb_frontend interface Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 482b498d7a1eb0e445657fb55d2bc6d4871c0ef5 Author: Michael Krufky Date: Mon Oct 22 00:12:16 2007 -0300 V4L/DVB (6439): dvb_frontend: codingstyle cleanups thanks to checkpatch.pl Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 16f291684c50497cc92e83f01d354fae187d1f18 Author: Michael Krufky Date: Sun Oct 21 15:22:25 2007 -0300 V4L/DVB (6438): tuner: move analog_demod_priv into struct dvb_frontend Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2be32ac8017d1bcb293f8c11c046ff654991385 Author: Michael Krufky Date: Sun Oct 21 14:35:21 2007 -0300 V4L/DVB (6437): tuner: clear analog_demod_ops on release Clear analog_demod_ops on release. Fix test for analog_demod_ops after tuner attach. Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1dde7a4fa2b197d298c3f1b97a7f78fd1c3a1bda Author: Michael Krufky Date: Sun Oct 21 13:40:56 2007 -0300 V4L/DVB (6436): tuner: move analog_tuner_ops into dvb_frontend_ops Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5bea1cd3871351d70cc7624af138f8aa68b7be77 Author: Michael Krufky Date: Mon Oct 22 09:56:38 2007 -0300 V4L/DVB (6435): tda8290: add support for NXP TDA18271 tuner and TDA8295 analog demod Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon. TDA8295 + TDA8275a not yet tested. TDA8290 + TDA18271 not yet supported. Digital mode of TDA18271 not yet tested & needs more work. Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce1f8bdb0cbe9c5f57cf0256ef75fce06152547f Author: Michael Krufky Date: Mon Oct 22 00:28:50 2007 -0300 V4L/DVB (6434): tda827x: fix GPL export on attach function EXPORT_SYMBOL should have been EXPORT_SYMBOL_GPL Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 746d9732dbd5b95c3ba36230e2814fa2c391a311 Author: Michael Krufky Date: Sat Aug 25 19:08:45 2007 -0300 V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module Add analog tuning support to tda827x dvb_frontend tuner module. Convert tda8290 module back to native tuner interface. The tda8290 analog demodulator will be handled the same way as tda9887. The tuner.ko module (tuner-core) will pass commands to tda8290 via the tuner_operations interface. tda8290 will communicate with tda827x via the dvb_frontend interface, while passing a pointer to a private data structure. Signed-off-by: Michael Krufky Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit de3fe21ba2fdc0733ad4e555b95121baeba7fcd5 Author: Mauro Carvalho Chehab Date: Wed Oct 24 09:22:08 2007 -0300 V4L/DVB (6431): Improve firmware format Signed-off-by: Mauro Carvalho Chehab commit 215b95baf969c6f895969f0a4ae0479954fba7cd Author: Mauro Carvalho Chehab Date: Tue Oct 23 15:24:06 2007 -0300 V4L/DVB (6430): Convert tuner-xc2028 driver to the newer hybrid approach This changeset converts tuner-xc2028 to the newer hybrid approach. It also prevents creating twice the xc3028 private struct by both DVB and V4L parts. Signed-off-by: Mauro Carvalho Chehab commit 3b20532c791399182bd04f0fcc70b60a95637fa5 Author: Mauro Carvalho Chehab Date: Thu Sep 27 18:27:03 2007 -0300 V4L/DVB (6429): Avoid having two tuner commands happening at the same time Signed-off-by: Mauro Carvalho Chehab commit ff7326d4f09aee7fc0416d3b3d6f7106d0961f1f Author: Michel Ludwig Date: Fri Jul 27 08:24:39 2007 -0300 V4L/DVB (6428): Make the naming of the DTV firmware files more consistent Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit d4e7668104f7f17fa093121bf13e9728b88da57d Author: Mauro Carvalho Chehab Date: Wed Jul 18 23:14:25 2007 -0300 V4L/DVB (6427): Some cleanups at tuner-xc2028 driver Signed-off-by: Mauro Carvalho Chehab commit 2e4160ca8046e3c35277bed62b2c180427d57dd7 Author: Mauro Carvalho Chehab Date: Wed Jul 18 13:33:23 2007 -0300 V4L/DVB (6426): Some fixes on tuner-xc2028 Signed-off-by: Mauro Carvalho Chehab commit 701672eb7387390bff43f0c979026dd317836626 Author: Michel Ludwig Date: Wed Jul 18 10:29:10 2007 -0300 V4L/DVB (6425): Add experimental DVB frontend tuner interface to xc2028/3028 Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit c2622e5f8ec0c53794fa33488477f07250c3e452 Author: Michel Ludwig Date: Wed Jul 18 10:26:38 2007 -0300 V4L/DVB (6424): Improve tuner-xc2028 script Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab commit 6cb45879dca84c667996d65a12880db6705a2b0e Author: Mauro Carvalho Chehab Date: Tue Oct 2 11:57:03 2007 -0300 V4L/DVB (6423): Add tuner-xc2028 driver Add support for Xceive XC2028/XC3028 tuner driver Signed-off-by: Mauro Carvalho Chehab commit 12466577853b0d057f4416f4c7020e544f3a4209 Author: Mauro Carvalho Chehab Date: Wed Oct 24 11:08:20 2007 -0300 V4L/DVB (6422): Add the pending entries for xc2028/3028 based boards Also replaces all occurrences of TUNER_XCEIVE_XC3028 to TUNER_XC2028. Some work is still may be required to make sure that non-tm6000 drivers will be capable of using tuner-xc2028. Signed-off-by: Mauro Carvalho Chehab commit 07533b6a8097c6fdb17fb154725757b64238a8d9 Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:53:11 2006 -0300 V4L/DVB (6421): Make Kconfig reflect the changes at audio helper modules Signed-off-by: Mauro Carvalho Chehab commit 5eba35714e0dfa5618b438cfe46037f22133badc Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:53:10 2006 -0300 V4L/DVB (6420): V4L2 conversion for tda9875 from V4L1 API Signed-off-by: Mauro Carvalho Chehab commit 7a00d45cf017172c74d15bad0f9f14720efd69dd Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:53:09 2006 -0300 V4L/DVB (6419): V4L2 port of tda7432 from V4L1 api Signed-off-by: Mauro Carvalho Chehab commit dc3d75da05c3ff2dd6510c32a11deacced49d1a1 Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:53:08 2006 -0300 V4L/DVB (6418): Converted tvaudio from V4L1 to V4L2 V4L1 ioctls were replaced to V4L2 were applicable. The older ones already implemented were removed. Signed-off-by: Mauro Carvalho Chehab commit 155c6ab9ed255745758b6aa0f266e4d40aa32a21 Author: Nickolay V. Shmyrev Date: Fri Aug 25 16:53:07 2006 -0300 V4L/DVB (6417): Report detected sound carrier into rxsubchans Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit 4b9b936f278163614543d66f8e8c93d5484dd148 Author: Nickolay V. Shmyrev Date: Fri Aug 25 16:53:04 2006 -0300 V4L/DVB (6416): Split hooks on volume and audio mode and rework their handling Also convert audio_mode_gpio functions from audio_hook Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit 40c6e683a238c561db00c4fdfead43cb3b19d75f Author: Nickolay V. Shmyrev Date: Fri Oct 26 17:21:30 2007 -0300 V4L/DVB (6415): Restructurize volume hook and drop unused mute hook Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit de5bec6bb57e88db7efa49c6f7de0794ae67d06a Author: Nickolay V. Shmyrev Date: Fri Oct 26 17:15:19 2007 -0300 V4L/DVB (6414): Remove bass, treble and balance from audio hook since they are unused Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit 5b261016f04eb5df1e1e652794f1f4d7dd072566 Author: Nickolay V. Shmyrev Date: Fri Aug 25 16:53:02 2006 -0300 V4L/DVB (6413): Forward VIDIOCGAUDIO and VIDIOCSAUDIO through v4l1-compat Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit c2806d03c090a1bf9c8c94bbecb92242b57469f3 Author: Mauro Carvalho Chehab Date: Fri Oct 26 16:54:54 2007 -0300 V4L/DVB (6412): Audio hooks moved to another file Signed-off-by: Mauro Carvalho Chehab commit c96dd0710685a0932c16ecc351621af3fe0cb2c7 Author: Mauro Carvalho Chehab Date: Fri Oct 26 16:51:47 2007 -0300 V4L/DVB (6411): remove V4L1 from being compiled when V4L2 only is selected Signed-off-by: Mauro Carvalho Chehab commit e84619b17440ccca4e4db7583d126c4189b987e5 Author: Nickolay V. Shmyrev Date: Fri Oct 26 11:01:08 2007 -0300 V4L/DVB (6410): Partial conversion from V4L1 to V4L2 This is part of the old V4L1->V4L2 bttv patch, ported to current tree by Mauro Carvalho Chehab Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit 302f61ad5db0e6a4c265e1f6454c102e2283a926 Author: Nickolay V. Shmyrev Date: Fri Oct 26 10:53:21 2007 -0300 V4L/DVB (6409): Cleanup: removed i2c_vidiocschan This is part of the old V4L1->V4L2 bttv patch, ported to current tree by Mauro Carvalho Chehab Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit 012cf21975e8ccc2d57859413b336087f7f98763 Author: Nickolay V. Shmyrev Date: Fri Aug 25 16:52:54 2006 -0300 V4L/DVB (6408): Cleanup: Removed obsoleted code from bttv-cards This is part of the old V4L1->V4L2 bttv patch, ported to current tree by Mauro Carvalho Chehab Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab commit e92adc2c39aaaa0129b7b97584784a8ba9da9ec4 Author: Steven Toth Date: Thu Sep 20 01:44:27 2007 -0300 V4L/DVB (6404): cx23885: i2c 16bit reg/val read/write fix Fix i2c reads and writes of 16bit register address / values Signed-off-by: Steven Toth Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 289d4d2f0746715ada41e0945116eb3d62d5f35c Author: Matthias Kaehlcke Date: Wed Oct 24 17:31:15 2007 -0300 V4L/DVB (6400): usbvision: Convert the usbvision->lock semaphore to the mutex API Convert the usbvision->lock semaphore to the mutex API Signed-off-by: Matthias Kaehlcke Reviewed-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab commit b02044d81fc028d4fef1c65f9b179a0aec091f0b Author: Adrian Bunk Date: Wed Oct 24 13:23:14 2007 -0300 V4L/DVB (6399): saa7134/: make 2 functions static saa7134_buffer_requeue() and set_tvnorm() can become static. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 55c88610fe974c95a62e495305a7386aaac3df39 Author: Mauro Carvalho Chehab Date: Fri Oct 19 06:59:33 2007 -0300 V4L/DVB (6386): Add support for radio on CX88_BOARD_MSI_TVANYWHERE_MASTER This board has some special tea5767 configuration. Basically, radio XTAL uses a different frequency than the other supported radios. It uses a 13 MHz XTAL. This patch adds the proper radio gpio and tea5767 configurations for the board. Also, with PAL/BG, the board requires some special init for tda9887: port1=0 port2=0 qss=1 Thanks to Serge Kolotylo and MIDImaster for their help on identifying the proper needs for this driver. Signed-off-by: Mauro Carvalho Chehab commit 0e1165e8d05ef4a530001ea4ac5ff0df78129dd2 Author: Mauro Carvalho Chehab Date: Thu Oct 18 20:10:07 2007 -0300 V4L/DVB (6385): Adds the capability of configuring tea5767 support tea5767 has several possible configurations. Before the patch, the driver were assuming the more common configuration. However, some newer cards, like MSI @nyware Master requires other configurations, like de-activating a gpio port and changing chip Xtal. This patch adds the capability of altering device configuration at runtime. This may also be used later to activate some features like auto-mute when signal is weak. Signed-off-by: Mauro Carvalho Chehab commit 7f1711234e6a21c153e892758d9d82c333ab37ac Author: Mauro Carvalho Chehab Date: Thu Oct 18 19:56:47 2007 -0300 V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG Currently, the only tuner-specific device that allows special configurations is tda9887. However, tea5767 also may require some special configurations (for example, to specify a different Xtal freq). This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl (TUNER_SET_CONFIG). The newer one allows specifying what tuner is appliable to a configuration set, and allows an arbitrary configuration struct. Signed-off-by: Mauro Carvalho Chehab commit 2d94dfc8c38edf63e91e48fd55c3a8822b6a9ced Merge: b47711b... 5c5e32c... Author: Linus Torvalds Date: Fri Jan 25 12:20:32 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: mount options: fix jfs JFS: simplify types to get rid of sparse warning JFS: FIx one more plain integer as NULL pointer warning JFS: Remove defconfig ptr comparison to 0 JFS: use DIV_ROUND_UP where appropriate Remove unnecessary kmalloc casts in the jfs filesystem JFS is missing a memory barrier JFS: Make sure special inode data is written after journal is flushed JFS: clear PAGECACHE_TAG_DIRTY for no-write pages commit 6d082592b62689fb91578d0338d04a9f50991990 Author: Arjan van de Ven Date: Fri Jan 25 21:08:35 2008 +0100 sched: keep total / count stats in addition to the max for Right now, the linux kernel (with scheduler statistics enabled) keeps track of the maximum time a process is waiting to be scheduled. While the maximum is a very useful metric, tracking average and total is equally useful (at least for latencytop) to figure out the accumulated effect of scheduler delays. The accumulated effect is important to judge the performance impact of scheduler tuning/behavior. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar commit 286100a6cf1c1f692e5f81d14b364ff12b7662f5 Author: Alexey Dobriyan Date: Fri Jan 25 21:08:34 2008 +0100 sched, futex: detach sched.h and futex.h Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar commit 5973e5b954848c63855a357ad4ff39882e3904f7 Author: Peter Zijlstra Date: Fri Jan 25 21:08:34 2008 +0100 sched: fix: don't take a mutex from interrupt context print_cfs_stats is callable from interrupt context (sysrq), hence it should not take mutexes. Change it to use RCU since the task group data is RCU freed anyway. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 5fb5e6de55860a99c2d8fe7e0c8222d5c53d8464 Author: Nick Piggin Date: Fri Jan 25 21:08:34 2008 +0100 sched: print backtrace of running tasks too The attached patch is something really simple that can sometimes help in getting more info out of a hung system. Signed-off-by: Ingo Molnar commit 19ef9309273d26cb005cb23e6a370353dca91099 Author: Ingo Molnar Date: Fri Jan 25 21:08:34 2008 +0100 printk: use ktime_get() printk timestamps: use ktime_get(). Some platforms have a functioning clocksource function only after they are done with early bootup, so delay this until out of SYSTEM_BOOTING state. it's also inherently safe now, as any bugs in this area will be caught by the printk recursion checks. Signed-off-by: Ingo Molnar commit 90739081ef8d5495d50abba9c5d333be9acd872a Author: Ingo Molnar Date: Fri Jan 25 21:08:34 2008 +0100 softlockup: fix signedness fix softlockup tunables signedness. mark tunables read-mostly. Signed-off-by: Ingo Molnar commit 9745512ce79de686df354dc70a8d1a74d801892d Author: Arjan van de Ven Date: Fri Jan 25 21:08:34 2008 +0100 sched: latencytop support LatencyTOP kernel infrastructure; it measures latencies in the scheduler and tracks it system wide and per process. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar commit 326587b840785c60f5dc18557235a23bafefd620 Author: Dmitry Adamushko Date: Fri Jan 25 21:08:34 2008 +0100 sched: fix goto retry in pick_next_task_rt() looking at it one more time: (1) it looks to me that there is no need to call sched_rt_ratio_exceeded() from pick_next_rt_entity() - [ for CONFIG_FAIR_GROUP_SCHED ] queues with rt_rq->rt_throttled are not within this 'tree-like hierarchy' (or whatever we should call it :-) - there is also no need to re-check 'rt_rq->rt_time > ratio' at this point as 'rt_rq->rt_time' couldn't have been increased since the last call to update_curr_rt() (which obviously calls sched_rt_ratio_esceeded()) well, it might be that 'ratio' for this rt_rq has been re-configured (and the period over which this rt_rq was active has not yet been finished)... but I don't think we should really take this into account. (2) now pick_next_rt_entity() must never return NULL, so let's change pick_next_task_rt() accordingly. Signed-off-by: Dmitry Adamushko Signed-off-by: Ingo Molnar commit e118adef232e637a8f091c1ded2fbf44fcf3ecc8 Author: Pavel Machek Date: Fri Jan 25 21:08:34 2008 +0100 timers: don't #error on higher HZ values For some crazy reason (trying to work around hw problem in i810) I wanted to use HZ around 4000. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit cc203d2422004498909c4886d1b94a2e388d973e Author: Guillaume Chazarain Date: Fri Jan 25 21:08:34 2008 +0100 sched: monitor clock underflows in /proc/sched_debug We monitor clock overflows, let's also monitor clock underflows. Signed-off-by: Guillaume Chazarain Signed-off-by: Ingo Molnar commit 782daeee3d596282bfee4cd9e976c86be0e194a8 Author: Guillaume Chazarain Date: Fri Jan 25 21:08:33 2008 +0100 sched: fix rq->clock warps on frequency changes sched: fix rq->clock warps on frequency changes Fix 2bacec8c318ca0418c0ee9ac662ee44207765dd4 (sched: touch softlockup watchdog after idling) that reintroduced warps on frequency changes. touch_softlockup_watchdog() calls __update_rq_clock that checks rq->clock for warps, so call it after adjusting rq->clock. Signed-off-by: Guillaume Chazarain Signed-off-by: Ingo Molnar commit 4f05b98d54b140ed3c5851d5d5156e9918c6305d Author: Michal Schmidt Date: Fri Jan 25 21:08:33 2008 +0100 sched: fix, always create kernel threads with normal priority Ensure that the kernel threads are created with the usual nice level and affinity even if kthreadd's properties were changed from the default by root. Signed-off-by: Michal Schmidt Signed-off-by: Ingo Molnar commit 1ad82fd547c716f96e544b477e0bdbfa2d647529 Author: Paolo Ciarrocchi Date: Fri Jan 25 21:08:33 2008 +0100 debug: clean up kernel/profile.c Before: total: 25 errors, 13 warnings, 602 lines checked After: total: 0 errors, 2 warnings, 601 lines checked No code changed: kernel/profile.o: text data bss dec hex filename 3048 236 24 3308 cec profile.o.before 3048 236 24 3308 cec profile.o.after md5: 2501d64748a4d350dffb11203e2a5182 profile.o.before.asm 2501d64748a4d350dffb11203e2a5182 profile.o.after.asm Signed-off-by: Paolo Ciarrocchi Signed-off-by: Ingo Molnar commit 6478d8800b75253b2a934ddcb734e13ade023ad0 Author: Ingo Molnar Date: Fri Jan 25 21:08:33 2008 +0100 sched: remove the !PREEMPT_BKL code remove the !PREEMPT_BKL code. this removes 160 lines of legacy code. Signed-off-by: Ingo Molnar commit 58b8a73ab8becfcaea84abc2a06038281efa4c8a Author: Ingo Molnar Date: Fri Jan 25 21:08:33 2008 +0100 sched: make PREEMPT_BKL the default make PREEMPT_BKL the default. precursor to removal of the !PREEMPT_BKL code. Signed-off-by: Ingo Molnar commit e14af7eeb47ea96c52741c5e5fa010d33daf6973 Author: Arjan van de Ven Date: Fri Jan 25 21:08:33 2008 +0100 debug: track and print last unloaded module in the oops trace Based on a suggestion from Andi: In various cases, the unload of a module may leave some bad state around that causes a kernel crash AFTER a module is unloaded; and it's then hard to find which module caused that. This patch tracks the last unloaded module, and prints this as part of the module list in the oops trace. Right now, only the last 1 module is tracked; I expect that this is enough for the vast majority of cases where this information matters; if it turns out that tracking more is important, we can always extend it to that. [ mingo@elte.hu: build fix ] Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar commit 21aa9280b9f4e9e68d3fa8990df6c9d7fd71f994 Author: Arjan van de Ven Date: Fri Jan 25 21:08:33 2008 +0100 debug: show being-loaded/being-unloaded indicator for modules It's rather common that an oops/WARN_ON/BUG happens during the load or unload of a module. Unfortunatly, it's not always easy to see directly which module is being loaded/unloaded from the oops itself. Worse, it's not even always possible to ask the bug reporter, since there are so many components (udev etc) that auto-load modules that there's a good chance that even the reporter doesn't know which module this is. This patch extends the existing "show if it's tainting" print code, which is used as part of printing the modules in the oops/BUG/WARN_ON to include a "+" for "being loaded" and a "-" for "being unloaded". As a result this extension, the "taint_flags()" function gets renamed to "module_flags()" (and takes a module struct as argument, not a taint flags int). Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar commit 5a52dd50091b6a6e710a1293db741028f8cc5aac Author: Peter Zijlstra Date: Fri Jan 25 21:08:32 2008 +0100 sched: rt-watchdog: fix .rlim_max = RLIM_INFINITY Remove the curious logic to set it_sched_expires in the future. It useless because rt.timeout wouldn't be incremented anyway. Explicity check for RLIM_INFINITY as a test programm that had a 1s soft limit and a inf hard limit would SIGKILL at 1s. This is because RLIM_INFINITY+d-1 is d-2. Signed-off-by: Peter Zijlsta CC: Michal Schmidt Signed-off-by: Ingo Molnar commit 1020387f5f3b52929b387103cf976321981f8e26 Author: Peter Zijlstra Date: Fri Jan 25 21:08:32 2008 +0100 sched: rt-group: reduce rescheduling Only reschedule if the new group has a higher prio task. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 37bb6cb4097e29ffee970065b74499cbf10603a3 Author: Peter Zijlstra Date: Fri Jan 25 21:08:32 2008 +0100 hrtimer: unlock hrtimer_wakeup hrtimer_wakeup creates a base->lock rq->lock lock dependancy. Avoid this by switching to HRTIMER_CB_IRQSAFE_NO_SOFTIRQ which doesn't hold base->lock. This fully untangles hrtimer locks from the scheduler locks, and allows hrtimer usage in the scheduler proper. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit d3d74453c34f8fd87674a8cf5b8a327c68f22e99 Author: Peter Zijlstra Date: Fri Jan 25 21:08:31 2008 +0100 hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback Currently all highres=off timers are run from softirq context, but HRTIMER_CB_IRQSAFE_NO_SOFTIRQ timers expect to run from irq context. Fix this up by splitting it similar to the highres=on case. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 2d44ae4d7135b9aee26439b3523b43473381bc5f Author: Peter Zijlstra Date: Fri Jan 25 21:08:31 2008 +0100 hrtimer: clean up cpu->base locking tricks In order to more easily allow for the scheduler to use timers, clean up the locking a bit. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 48d5e258216f1c7713633439beb98a38c7290649 Author: Peter Zijlstra Date: Fri Jan 25 21:08:31 2008 +0100 sched: rt throttling vs no_hz We need to teach no_hz about the rt throttling because its tick driven. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 614ee1f61f667b02165c1ae0c1357048dc6d94a0 Author: Mike Galbraith Date: Fri Jan 25 21:08:30 2008 +0100 sched: pull_rt_task() cleanup "goto out" is an odd way to spell "skip". Signed-off-by: Mike Galbraith Signed-off-by: Ingo Molnar commit 6f505b16425a51270058e4a93441fe64de3dd435 Author: Peter Zijlstra Date: Fri Jan 25 21:08:30 2008 +0100 sched: rt group scheduling Extend group scheduling to also cover the realtime classes. It uses the time limiting introduced by the previous patch to allow multiple realtime groups. The hard time limit is required to keep behaviour deterministic. The algorithms used make the realtime scheduler O(tg), linear scaling wrt the number of task groups. This is the worst case behaviour I can't seem to get out of, the avg. case of the algorithms can be improved, I focused on correctness and worst case. [ akpm@linux-foundation.org: move side-effects out of BUG_ON(). ] Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit fa85ae2418e6843953107cd6a06f645752829bc0 Author: Peter Zijlstra Date: Fri Jan 25 21:08:29 2008 +0100 sched: rt time limit Very simple time limit on the realtime scheduling classes. Allow the rq's realtime class to consume sched_rt_ratio of every sched_rt_period slice. If the class exceeds this quota the fair class will preempt the realtime class. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 8f4d37ec073c17e2d4aa8851df5837d798606d6f Author: Peter Zijlstra Date: Fri Jan 25 21:08:29 2008 +0100 sched: high-res preemption tick Use HR-timers (when available) to deliver an accurate preemption tick. The regular scheduler tick that runs at 1/HZ can be too coarse when nice level are used. The fairness system will still keep the cpu utilisation 'fair' by then delaying the task that got an excessive amount of CPU time but try to minimize this by delivering preemption points spot-on. The average frequency of this extra interrupt is sched_latency / nr_latency. Which need not be higher than 1/HZ, its just that the distribution within the sched_latency period is important. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 02b67cc3ba36bdba351d6c3a00593f4ec550d9d3 Author: Herbert Xu Date: Fri Jan 25 21:08:28 2008 +0100 sched: do not do cond_resched() when CONFIG_PREEMPT Why do we even have cond_resched when real preemption is on? It seems to be a waste of space and time. remove cond_resched with CONFIG_PREEMPT on. Signed-off-by: Ingo Molnar commit 03319ec8b06849051747a17aa2a0f9aba9277980 Author: Ingo Molnar Date: Fri Jan 25 21:08:28 2008 +0100 sched: documentation, whitespace fixes whitespace fixes. Signed-off-by: Ingo Molnar commit 78f2c7db6068fd6ef75b8c120f04a388848eacb5 Author: Peter Zijlstra Date: Fri Jan 25 21:08:27 2008 +0100 sched: SCHED_FIFO/SCHED_RR watchdog timer Introduce a new rlimit that allows the user to set a runtime timeout on real-time tasks their slice. Once this limit is exceeded the task will receive SIGXCPU. So it measures runtime since the last sleep. Input and ideas by Thomas Gleixner and Lennart Poettering. Signed-off-by: Peter Zijlstra CC: Lennart Poettering CC: Michael Kerrisk CC: Ulrich Drepper Signed-off-by: Ingo Molnar commit fa717060f1ab7eb6570f2fb49136f838fc9195a9 Author: Peter Zijlstra Date: Fri Jan 25 21:08:27 2008 +0100 sched: sched_rt_entity Move the task_struct members specific to rt scheduling together. A future optimization could be to put sched_entity and sched_rt_entity into a union. Signed-off-by: Peter Zijlstra CC: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit 8eb703e4f33488bf75829564d51d427e17f7cd4c Author: Pavel Emelyanov Date: Fri Jan 25 21:08:26 2008 +0100 uids: merge multiple error paths in alloc_uid() into one There are already 4 error paths in alloc_uid() that do incremental rollbacks. I think it's time to merge them. This costs us 8 lines of code :) Maybe it would be better to merge this patch with the previous one, but I remember that some time ago I sent a similar patch (fixing the error path and cleaning it), but I was told to make two patches in such cases. Signed-off-by: Pavel Emelyanov Acked-by: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit dc938520d2bf343b239795cfa24e4f44649358dc Author: Gregory Haskins Date: Fri Jan 25 21:08:26 2008 +0100 sched: dynamically update the root-domain span/online maps The baseline code statically builds the span maps when the domain is formed. Previous attempts at dynamically updating the maps caused a suspend-to-ram regression, which should now be fixed. Signed-off-by: Gregory Haskins CC: Gautham R Shenoy Signed-off-by: Ingo Molnar commit f85d6c7168887e6659f4d00fa5f34fa23dbde1bb Author: Paul E. McKenney Date: Fri Jan 25 21:08:25 2008 +0100 Preempt-RCU: update RCU Documentation. This patch updates the RCU documentation to reflect preemptible RCU as well as recent publications. Signed-off-by: Paul E. McKenney Signed-off-by: Gautham R Shenoy Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit eaf649e9fe6685f4c5a392cd0e16df5fd6660b7c Author: Paul E. McKenney Date: Fri Jan 25 21:08:25 2008 +0100 Preempt-RCU: CPU Hotplug handling This patch allows preemptible RCU to tolerate CPU-hotplug operations. It accomplishes this by maintaining a local copy of a map of online CPUs, which it accesses under its own lock. Signed-off-by: Gautham R Shenoy Signed-off-by: Paul E. McKenney Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e260be673a15b6125068270e0216a3bfbfc12f87 Author: Paul E. McKenney Date: Fri Jan 25 21:08:24 2008 +0100 Preempt-RCU: implementation This patch implements a new version of RCU which allows its read-side critical sections to be preempted. It uses a set of counter pairs to keep track of the read-side critical sections and flips them when all tasks exit read-side critical section. The details of this implementation can be found in this paper - http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf and the article- http://lwn.net/Articles/253651/ This patch was developed as a part of the -rt kernel development and meant to provide better latencies when read-side critical sections of RCU don't disable preemption. As a consequence of keeping track of RCU readers, the readers have a slight overhead (optimizations in the paper). This implementation co-exists with the "classic" RCU implementations and can be switched to at compiler. Also includes RCU tracing summarized in debugfs. [ akpm@linux-foundation.org: build fixes on non-preempt architectures ] Signed-off-by: Gautham R Shenoy Signed-off-by: Dipankar Sarma Signed-off-by: Paul E. McKenney Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e0ecfa7917cafe72f4a75f87e8bb5d8d51dc534f Author: Paul E. McKenney Date: Fri Jan 25 21:08:24 2008 +0100 Preempt-RCU: fix rcu_barrier for preemptive environment. Fix rcu_barrier() to work properly in preemptive kernel environment. Also, the ordering of callback must be preserved while moving callbacks to another CPU during CPU hotplug. Signed-off-by: Gautham R Shenoy Signed-off-by: Dipankar Sarma Signed-off-by: Paul E. McKenney Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 01c1c660f4b8086cad7a62345fd04290f3d82c8f Author: Paul E. McKenney Date: Fri Jan 25 21:08:24 2008 +0100 Preempt-RCU: reorganize RCU code into rcuclassic.c and rcupdate.c This patch re-organizes the RCU code to enable multiple implementations of RCU. Users of RCU continues to include rcupdate.h and the RCU interfaces remain the same. This is in preparation for subsequently merging the preemptible RCU implementation. Signed-off-by: Gautham R Shenoy Signed-off-by: Dipankar Sarma Signed-off-by: Paul E. McKenney Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit c2d727aa2ff17a1c8e5ed1e5e231bb8579b27e82 Author: Dipankar Sarma Date: Fri Jan 25 21:08:23 2008 +0100 Preempt-RCU: Use softirq instead of tasklets for This patch makes RCU use softirq instead of tasklets. It also adds a memory barrier after raising the softirq inorder to ensure that the cpu sees the most recently updated value of rcu->cur while processing callbacks. The discussion of the related theoretical race pointed out by James Huang can be found here --> http://lkml.org/lkml/2007/11/20/603 Signed-off-by: Gautham R Shenoy Signed-off-by: Steven Rostedt Signed-off-by: Dipankar Sarma Reviewed-by: Steven Rostedt Signed-off-by: Ingo Molnar commit c49443c538c1bbf50eda27e4a3711e9fc15176b0 Author: Gregory Haskins Date: Fri Jan 25 21:08:23 2008 +0100 sched: remove some old cpuset logic We had support for overlapping cpuset based rto logic in early prototypes that is no longer used, so remove it. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit cdc8eb984ce47a7c90a049f45229f7b0d59ba781 Author: Gregory Haskins Date: Fri Jan 25 21:08:23 2008 +0100 sched: RT-balance, only adjust overload state when changing The overload set/clears were originally idempotent when this logic was first implemented. But that is no longer true due to the addition of the atomic counter and this logic was never updated to work properly with that change. So only adjust the overload state if it is actually changing to avoid getting out of sync. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit cb46984504048db946cd551c261df4e70d59a8ea Author: Steven Rostedt Date: Fri Jan 25 21:08:22 2008 +0100 sched: RT-balance, add new methods to sched_class Dmitry Adamushko found that the current implementation of the RT balancing code left out changes to the sched_setscheduler and rt_mutex_setprio. This patch addresses this issue by adding methods to the schedule classes to handle being switched out of (switched_from) and being switched into (switched_to) a sched_class. Also a method for changing of priorities is also added (prio_changed). This patch also removes some duplicate logic between rt_mutex_setprio and sched_setscheduler. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 9a897c5a6701bcb6f099f7ca20194999102729fd Author: Steven Rostedt Date: Fri Jan 25 21:08:22 2008 +0100 sched: RT-balance, replace hooks with pre/post schedule and wakeup methods To make the main sched.c code more agnostic to the schedule classes. Instead of having specific hooks in the schedule code for the RT class balancing. They are replaced with a pre_schedule, post_schedule and task_wake_up methods. These methods may be used by any of the classes but currently, only the sched_rt class implements them. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 4bf0b77158d581c952af237aec79d0604b78fe27 Author: Peter Zijlstra Date: Fri Jan 25 21:08:21 2008 +0100 sched: remove do_div() from __sched_slice() Yanmin Zhang noticed a nice optimization: p = l * nr / nl, nl = l/g -> p = g * nr which eliminates a do_div() from __sched_period(). Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 5d2f5a616d65e3c08acde3195694c4ab8afbc1b7 Author: Dmitry Adamushko Date: Fri Jan 25 21:08:21 2008 +0100 sched: get rid of 'new_cpu' in try_to_wake_up() Clean-up try_to_wake_up(). Get rid of the 'new_cpu' variable in try_to_wake_up() [ that's, one #ifdef section less ]. Also remove a few redundant blank lines. Signed-off-by: Dmitry Adamushko Signed-off-by: Ingo Molnar commit 9ec3b77e11b9398ab40b492c4fde7d8aac04a718 Author: Dmitry Adamushko Date: Fri Jan 25 21:08:21 2008 +0100 sched: no need for 'affine wakeup' balancing No need to do a check for 'affine wakeup and passive balancing possibilities' in select_task_rq_fair() when task_cpu(p) == this_cpu. I guess, this part got missed upon introduction of per-sched_class select_task_rq() in try_to_wake_up(). Signed-off-by: Dmitry Adamushko Signed-off-by: Ingo Molnar commit 32525d022ad52a5c14e80e130260431e16e294b6 Author: Ingo Molnar Date: Fri Jan 25 21:08:20 2008 +0100 sched: whitespace cleanups in topology.h whitespace cleanups in topology.h. Signed-off-by: Ingo Molnar commit 52d853431e8d9dc17ba94792123a3fe2bc039831 Author: Ingo Molnar Date: Fri Jan 25 21:08:20 2008 +0100 sched: reactivate fork balancing reactivate fork balancing. Signed-off-by: Ingo Molnar commit b913176917399e92e6f741672038c73d7ce93be5 Author: Ingo Molnar Date: Fri Jan 25 21:08:19 2008 +0100 sched: add credits for RT balancing improvements add credits for RT balancing improvements. Signed-off-by: Ingo Molnar commit 0eab9146571dfa9b50ea952ec2ab27d591f26b63 Author: Ingo Molnar Date: Fri Jan 25 21:08:19 2008 +0100 sched: style cleanup, #2 style cleanup of various changes that were done recently. no code changed: text data bss dec hex filename 26399 2578 48 29025 7161 sched.o.before 26399 2578 48 29025 7161 sched.o.after Signed-off-by: Ingo Molnar commit d7876a08db50895ed9808ede4a259cccf65eba47 Author: Ingo Molnar Date: Fri Jan 25 21:08:19 2008 +0100 sched: remove unused JIFFIES_TO_NS() macro remove unused JIFFIES_TO_NS() macro. Signed-off-by: Ingo Molnar commit bdd7c81b4973e72b670eff6b5725bab189b723d6 Author: Ingo Molnar Date: Fri Jan 25 21:08:18 2008 +0100 sched: fix sched_rt.c:join/leave_domain fix build bug in sched_rt.c:join/leave_domain and make them only be included on SMP builds. Signed-off-by: Ingo Molnar commit 637f50851b57a32f7ec67c50fc16f1601ab1a87a Author: Gregory Haskins Date: Fri Jan 25 21:08:18 2008 +0100 sched: only balance our RT tasks within our domain We move the rt-overload data as the first global to per-domain reclassification. This limits the scope of overload related cache-line bouncing to stay with a specified partition instead of affecting all cpus in the system. Finally, we limit the scope of find_lowest_cpu searches to the domain instead of the entire system. Note that we would always respect domain boundaries even without this patch, but we first would scan potentially all cpus before whittling the list down. Now we can avoid looking at RQs that are out of scope, again reducing cache-line hits. Note: In some cases, task->cpus_allowed will effectively reduce our search to within our domain. However, I believe there are cases where the cpus_allowed mask may be all ones and therefore we err on the side of caution. If it can be optimized later, so be it. Signed-off-by: Gregory Haskins CC: Christoph Lameter Signed-off-by: Ingo Molnar commit 57d885fea0da0e9541d7730a9e1dcf734981a173 Author: Gregory Haskins Date: Fri Jan 25 21:08:18 2008 +0100 sched: add sched-domain roots We add the notion of a root-domain which will be used later to rescope global variables to per-domain variables. Each exclusive cpuset essentially defines an island domain by fully partitioning the member cpus from any other cpuset. However, we currently still maintain some policy/state as global variables which transcend all cpusets. Consider, for instance, rt-overload state. Whenever a new exclusive cpuset is created, we also create a new root-domain object and move each cpu member to the root-domain's span. By default the system creates a single root-domain with all cpus as members (mimicking the global state we have today). We add some plumbing for storing class specific data in our root-domain. Whenever a RQ is switching root-domains (because of repartitioning) we give each sched_class the opportunity to remove any state from its old domain and add state to the new one. This logic doesn't have any clients yet but it will later in the series. Signed-off-by: Gregory Haskins CC: Christoph Lameter CC: Paul Jackson CC: Simon Derr Signed-off-by: Ingo Molnar commit 7f51f298204ec0528422cd9b23feac12612c5665 Author: Ingo Molnar Date: Fri Jan 25 21:08:17 2008 +0100 sched: clean up schedule_balance_rt() clean up schedule_balance_rt(). Signed-off-by: Ingo Molnar commit 80bf3171dcdf0f5d236e2e48afe2a95c7ce23879 Author: Ingo Molnar Date: Fri Jan 25 21:08:17 2008 +0100 sched: clean up pull_rt_task() clean up pull_rt_task(). Signed-off-by: Ingo Molnar commit 00597c3ed78e424bdafff123565c078d8b6088cf Author: Ingo Molnar Date: Fri Jan 25 21:08:16 2008 +0100 sched: remove leftover debugging remove leftover debugging. Signed-off-by: Ingo Molnar commit 6e1938d3ad58c940ec4119d387dd92a787cb238c Author: Ingo Molnar Date: Fri Jan 25 21:08:16 2008 +0100 sched: remove rt_overload() remove rt_overload() - it's an unnecessary indirection. Signed-off-by: Ingo Molnar commit 84de4274893691aa8c471a1f7336d51e555d23a0 Author: Ingo Molnar Date: Fri Jan 25 21:08:15 2008 +0100 sched: clean up kernel/sched_rt.c clean up whitespace damage and missing comments in kernel/sched_rt.c. Signed-off-by: Ingo Molnar commit deeeccd41bd94a9db133d7b923f9a7479a47305d Author: Ingo Molnar Date: Fri Jan 25 21:08:15 2008 +0100 sched: clean up overlong line in kernel/sched_debug.c clean up overlong line in kernel/sched_debug.c. Signed-off-by: Ingo Molnar commit 4df64c0bfb7e0e260d10ebc005f7d0ba1308eed7 Author: Ingo Molnar Date: Fri Jan 25 21:08:15 2008 +0100 sched: clean up find_lock_lowest_rq() clean up find_lock_lowest_rq(). Signed-off-by: Ingo Molnar commit 79064fbf75796c4c6a53e40729dbe52f789a91fd Author: Ingo Molnar Date: Fri Jan 25 21:08:14 2008 +0100 sched: clean up pick_next_highest_task_rt() clean up pick_next_highest_task_rt(). Signed-off-by: Ingo Molnar commit 0d1311a536a0face6267e7346223f2e68b002018 Author: Steven Rostedt Date: Fri Jan 25 21:08:14 2008 +0100 sched: RT-balance on new task rt-balance when creating new tasks. Signed-off-by: Ingo Molnar commit 610bf05645a7ac6ea104a474e328eeaaea148870 Author: Steven Rostedt Date: Fri Jan 25 21:08:13 2008 +0100 sched: RT-balance, optimize cpu search This patch removes several cpumask operations by keeping track of the first of the CPUS that is of the lowest priority. When the search for the lowest priority runqueue is completed, all the bits up to the first CPU with the lowest priority runqueue is cleared. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 06f90dbd7610d51549004ea9c2ada337831eb292 Author: Gregory Haskins Date: Fri Jan 25 21:08:13 2008 +0100 sched: RT-balance, optimize We can cheaply track the number of bits set in the cpumask for the lowest priority CPUs. Therefore, compute the mask's weight and use it to skip the optimal domain search logic when there is only one CPU available. Signed-off-by: Gregory Haskins Signed-off-by: Ingo Molnar commit 17b3279b48835eb522d842eae16f541da3729c8a Author: Gregory Haskins Date: Fri Jan 25 21:08:13 2008 +0100 sched: break out early if RT task cannot be migrated We don't need to bother searching if the task cannot be migrated Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e1f47d891c0f00769d6d40ac5740f943e998d089 Author: Steven Rostedt Date: Fri Jan 25 21:08:12 2008 +0100 sched: RT-balance, avoid overloading This patch changes the searching for a run queue by a waking RT task to try to pick another runqueue if the currently running task is an RT task. The reason is that RT tasks behave different than normal tasks. Preempting a normal task to run a RT task to keep its cache hot is fine, because the preempted non-RT task may wait on that same runqueue to run again unless the migration thread comes along and pulls it off. RT tasks behave differently. If one is preempted, it makes an active effort to continue to run. So by having a high priority task preempt a lower priority RT task, that lower RT task will then quickly try to run on another runqueue. This will cause that lower RT task to replace its nice hot cache (and TLB) with a completely cold one. This is for the hope that the new high priority RT task will keep its cache hot. Remeber that this high priority RT task was just woken up. So it may likely have been sleeping for several milliseconds, and will end up with a cold cache anyway. RT tasks run till they voluntarily stop, or are preempted by a higher priority task. This means that it is unlikely that the woken RT task will have a hot cache to wake up to. So pushing off a lower RT task is just killing its cache for no good reason. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit a22d7fc187ed996b66d8439db27b2303f79a8e7b Author: Gregory Haskins Date: Fri Jan 25 21:08:12 2008 +0100 sched: wake-balance fixes We have logic to detect whether the system has migratable tasks, but we are not using it when deciding whether to push tasks away. So we add support for considering this new information. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 6e1254d2c41215da27025add8900ed187bca121d Author: Gregory Haskins Date: Fri Jan 25 21:08:11 2008 +0100 sched: optimize RT affinity The current code base assumes a relatively flat CPU/core topology and will route RT tasks to any CPU fairly equally. In the real world, there are various toplogies and affinities that govern where a task is best suited to run with the smallest amount of overhead. NUMA and multi-core CPUs are prime examples of topologies that can impact cache performance. Fortunately, linux is already structured to represent these topologies via the sched_domains interface. So we change our RT router to consult a combination of topology and affinity policy to best place tasks during migration. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 318e0893ce3f524ca045f9fd9dfd567c0a6f9446 Author: Gregory Haskins Date: Fri Jan 25 21:08:10 2008 +0100 sched: pre-route RT tasks on wakeup In the original patch series that Steven Rostedt and I worked on together, we both took different approaches to low-priority wakeup path. I utilized "pre-routing" (push the task away to a less important RQ before activating) approach, while Steve utilized a "post-routing" approach. The advantage of my approach is that you avoid the overhead of a wasted activate/deactivate cycle and peripherally related burdens. The advantage of Steve's method is that it neatly solves an issue preventing a "pull" optimization from being deployed. In the end, we ended up deploying Steve's idea. But it later dawned on me that we could get the best of both worlds by deploying both ideas together, albeit slightly modified. The idea is simple: Use a "light-weight" lookup for pre-routing, since we only need to approximate a good home for the task. And we also retain the post-routing push logic to clean up any inaccuracies caused by a condition of "priority mistargeting" caused by the lightweight lookup. Most of the time, the pre-routing should work and yield lower overhead. In the cases where it doesnt, the post-router will bat cleanup. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 2de0b4639f4b1b6bfe31f795e5855f041f177170 Author: Gregory Haskins Date: Fri Jan 25 21:08:10 2008 +0100 sched: RT balancing: include current CPU It doesn't hurt if we allow the current CPU to be included in the search. We will just simply skip it later if the current CPU turns out to be the lowest. We will use this later in the series Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 07b4032c9e505e2a1fbe7703aff64a153c3249be Author: Gregory Haskins Date: Fri Jan 25 21:08:10 2008 +0100 sched: break out search for RT tasks Isolate the search logic into a function so that it can be used later in places other than find_locked_lowest_rq(). Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e7693a362ec84bb5b6fd441d8a8b4b9d568a7a0c Author: Gregory Haskins Date: Fri Jan 25 21:08:09 2008 +0100 sched: de-SCHED_OTHER-ize the RT path The current wake-up code path tries to determine if it can optimize the wake-up to "this_cpu" by computing load calculations. The problem is that these calculations are only relevant to SCHED_OTHER tasks where load is king. For RT tasks, priority is king. So the load calculation is completely wasted bandwidth. Therefore, we create a new sched_class interface to help with pre-wakeup routing decisions and move the load calculation as a function of CFS task's class. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 697f0a487f294e634a342764472b79375bb3158a Author: Gregory Haskins Date: Fri Jan 25 21:08:09 2008 +0100 sched: clean up this_rq use in kernel/sched_rt.c "this_rq" is normally used to denote the RQ on the current cpu (i.e. "cpu_rq(this_cpu)"). So clean up the usage of this_rq to be more consistent with the rest of the code. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 73fe6aae84400e2b475e2a1dc4e8592cd3ed6e69 Author: Gregory Haskins Date: Fri Jan 25 21:08:07 2008 +0100 sched: add RT-balance cpu-weight Some RT tasks (particularly kthreads) are bound to one specific CPU. It is fairly common for two or more bound tasks to get queued up at the same time. Consider, for instance, softirq_timer and softirq_sched. A timer goes off in an ISR which schedules softirq_thread to run at RT50. Then the timer handler determines that it's time to smp-rebalance the system so it schedules softirq_sched to run. So we are in a situation where we have two RT50 tasks queued, and the system will go into rt-overload condition to request other CPUs for help. This causes two problems in the current code: 1) If a high-priority bound task and a low-priority unbounded task queue up behind the running task, we will fail to ever relocate the unbounded task because we terminate the search on the first unmovable task. 2) We spend precious futile cycles in the fast-path trying to pull overloaded tasks over. It is therefore optimial to strive to avoid the overhead all together if we can cheaply detect the condition before overload even occurs. This patch tries to achieve this optimization by utilizing the hamming weight of the task->cpus_allowed mask. A weight of 1 indicates that the task cannot be migrated. We will then utilize this information to skip non-migratable tasks and to eliminate uncessary rebalance attempts. We introduce a per-rq variable to count the number of migratable tasks that are currently running. We only go into overload if we have more than one rt task, AND at least one of them is migratable. In addition, we introduce a per-task variable to cache the cpus_allowed weight, since the hamming calculation is probably relatively expensive. We only update the cached value when the mask is updated which should be relatively infrequent, especially compared to scheduling frequency in the fast path. Signed-off-by: Gregory Haskins Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit c7a1e46aa9782a947cf2ed506245d43396dbf991 Author: Steven Rostedt Date: Fri Jan 25 21:08:07 2008 +0100 sched: disable standard balancer for RT tasks Since we now take an active approach to load balancing, we don't need to balance RT tasks via the normal task balancer. In fact, this code was found to pull RT tasks away from CPUS that the active movement performed, resulting in large latencies. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 4642dafdf93dc7d66ee33437b93a5e6b8cea20d2 Author: Steven Rostedt Date: Fri Jan 25 21:08:07 2008 +0100 sched: push RT tasks from overloaded CPUs This patch adds pushing of overloaded RT tasks from a runqueue that is having tasks (most likely RT tasks) added to the run queue. TODO: We don't cover the case of waking of new RT tasks (yet). Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit f65eda4f789168ba5ff3fa75546c29efeed19f58 Author: Steven Rostedt Date: Fri Jan 25 21:08:07 2008 +0100 sched: pull RT tasks from overloaded runqueues This patch adds the algorithm to pull tasks from RT overloaded runqueues. When a pull RT is initiated, all overloaded runqueues are examined for a RT task that is higher in prio than the highest prio task queued on the target runqueue. If another runqueue holds a RT task that is of higher prio than the highest prio task on the target runqueue is found it is pulled to the target runqueue. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 4fd29176b7cd24909f8ceba2105cb3ae2857b90c Author: Steven Rostedt Date: Fri Jan 25 21:08:06 2008 +0100 sched: add rt-overload tracking This patch adds an RT overload accounting system. When a runqueue has more than one RT task queued, it is marked as overloaded. That is that it is a candidate to have RT tasks pulled from it. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e8fa136262e1121288bb93befe2295928ffd240d Author: Steven Rostedt Date: Fri Jan 25 21:08:05 2008 +0100 sched: add RT task pushing This patch adds an algorithm to push extra RT tasks off a run queue to other CPU runqueues. When more than one RT task is added to a run queue, this algorithm takes an assertive approach to push the RT tasks that are not running onto other run queues that have lower priority. The way this works is that the highest RT task that is not running is looked at and we examine the runqueues on the CPUS for that tasks affinity mask. We find the runqueue with the lowest prio in the CPU affinity of the picked task, and if it is lower in prio than the picked task, we push the task onto that CPU runqueue. We continue pushing RT tasks off the current runqueue until we don't push any more. The algorithm stops when the next highest RT task can't preempt any other processes on other CPUS. TODO: The algorithm may stop when there are still RT tasks that can be migrated. Specifically, if the highest non running RT task CPU affinity is restricted to CPUs that are running higher priority tasks, there may be a lower priority task queued that has an affinity with a CPU that is running a lower priority task that it could be migrated to. This patch set does not address this issue. Note: checkpatch reveals two over 80 character instances. I'm not sure that breaking them up will help visually, so I left them as is. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 764a9d6fe4b52995c8aba277e3634385699354f4 Author: Steven Rostedt Date: Fri Jan 25 21:08:04 2008 +0100 sched: track highest prio task queued This patch adds accounting to each runqueue to keep track of the highest prio task queued on the run queue. We only care about RT tasks, so if the run queue does not contain any active RT tasks its priority will be considered MAX_RT_PRIO. This information will be used for later patches. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 63489e45e265f64c368882be1f01c42dec5d984c Author: Steven Rostedt Date: Fri Jan 25 21:08:03 2008 +0100 sched: count # of queued RT tasks This patch adds accounting to keep track of the number of RT tasks running on a runqueue. This information will be used in later patches. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 82a1fcb90287052aabfa235e7ffc693ea003fe69 Author: Ingo Molnar Date: Fri Jan 25 21:08:02 2008 +0100 softlockup: automatically detect hung TASK_UNINTERRUPTIBLE tasks this patch extends the soft-lockup detector to automatically detect hung TASK_UNINTERRUPTIBLE tasks. Such hung tasks are printed the following way: ------------------> INFO: task prctl:3042 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message prctl D fd5e3793 0 3042 2997 f6050f38 00000046 00000001 fd5e3793 00000009 c06d8264 c06dae80 00000286 f6050f40 f6050f00 f7d34d90 f7d34fc8 c1e1be80 00000001 f6050000 00000000 f7e92d00 00000286 f6050f18 c0489d1a f6050f40 00006605 00000000 c0133a5b Call Trace: [] schedule_timeout+0x6d/0x8b [] schedule_timeout_uninterruptible+0x15/0x17 [] msleep+0x10/0x16 [] sys_prctl+0x30/0x1e2 [] sysenter_past_esp+0x5f/0xa5 ======================= 2 locks held by prctl/3042: #0: (&sb->s_type->i_mutex_key#5){--..}, at: [] do_fsync+0x38/0x7a #1: (jbd_handle){--..}, at: [] journal_start+0xc7/0xe9 <------------------ the current default timeout is 120 seconds. Such messages are printed up to 10 times per bootup. If the system has crashed already then the messages are not printed. if lockdep is enabled then all held locks are printed as well. this feature is a natural extension to the softlockup-detector (kernel locked up without scheduling) and to the NMI watchdog (kernel locked up with IRQs disabled). [ Gautham R Shenoy : CPU hotplug fixes. ] [ Andrew Morton : build warning fix. ] Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven commit d0d23b5432fe61229dd3641c5e94d4130bc4e61b Author: Ingo Molnar Date: Fri Jan 25 21:08:02 2008 +0100 cpu-hotplug: fix build on !CONFIG_SMP fix build on !CONFIG_SMP. Signed-off-by: Ingo Molnar commit 95402b3829010fe1e208f44e4a158ccade88969a Author: Gautham R Shenoy Date: Fri Jan 25 21:08:02 2008 +0100 cpu-hotplug: replace per-subsystem mutexes with get_online_cpus() This patch converts the known per-subsystem mutexes to get_online_cpus put_online_cpus. It also eliminates the CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE hotplug notification events. Signed-off-by: Gautham R Shenoy Signed-off-by: Ingo Molnar commit 86ef5c9a8edd78e6bf92879f32329d89b2d55b5a Author: Gautham R Shenoy Date: Fri Jan 25 21:08:02 2008 +0100 cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use get_online_cpus and put_online_cpus instead as it highlights the refcount semantics in these operations. The new API guarantees protection against the cpu-hotplug operation, but it doesn't guarantee serialized access to any of the local data structures. Hence the changes needs to be reviewed. In case of pseries_add_processor/pseries_remove_processor, use cpu_maps_update_begin()/cpu_maps_update_done() as we're modifying the cpu_present_map there. Signed-off-by: Gautham R Shenoy Signed-off-by: Ingo Molnar commit d221938c049f4845da13c8593132595a6b9222a8 Author: Gautham R Shenoy Date: Fri Jan 25 21:08:01 2008 +0100 cpu-hotplug: refcount based cpu hotplug This patch implements a Refcount + Waitqueue based model for cpu-hotplug. Now, a thread which wants to prevent cpu-hotplug, will bump up a global refcount and the thread which wants to perform a cpu-hotplug operation will block till the global refcount goes to zero. The readers, if any, during an ongoing cpu-hotplug operation are blocked until the cpu-hotplug operation is over. Signed-off-by: Gautham R Shenoy Signed-off-by: Paul Jackson [For !CONFIG_HOTPLUG_CPU ] Signed-off-by: Ingo Molnar commit 6b2d7700266b9402e12824e11e0099ae6a4a6a79 Author: Srivatsa Vaddagiri Date: Fri Jan 25 21:08:00 2008 +0100 sched: group scheduler, fix fairness of cpu bandwidth allocation for task groups The current load balancing scheme isn't good enough for precise group fairness. For example: on a 8-cpu system, I created 3 groups as under: a = 8 tasks (cpu.shares = 1024) b = 4 tasks (cpu.shares = 1024) c = 3 tasks (cpu.shares = 1024) a, b and c are task groups that have equal weight. We would expect each of the groups to receive 33.33% of cpu bandwidth under a fair scheduler. This is what I get with the latest scheduler git tree: Signed-off-by: Ingo Molnar -------------------------------------------------------------------------------- Col1 | Col2 | Col3 | Col4 ------|---------|-------|------------------------------------------------------- a | 277.676 | 57.8% | 54.1% 54.1% 54.1% 54.2% 56.7% 62.2% 62.8% 64.5% b | 116.108 | 24.2% | 47.4% 48.1% 48.7% 49.3% c | 86.326 | 18.0% | 47.5% 47.9% 48.5% -------------------------------------------------------------------------------- Explanation of o/p: Col1 -> Group name Col2 -> Cumulative execution time (in seconds) received by all tasks of that group in a 60sec window across 8 cpus Col3 -> CPU bandwidth received by the group in the 60sec window, expressed in percentage. Col3 data is derived as: Col3 = 100 * Col2 / (NR_CPUS * 60) Col4 -> CPU bandwidth received by each individual task of the group. Col4 = 100 * cpu_time_recd_by_task / 60 [I can share the test case that produces a similar o/p if reqd] The deviation from desired group fairness is as below: a = +24.47% b = -9.13% c = -15.33% which is quite high. After the patch below is applied, here are the results: -------------------------------------------------------------------------------- Col1 | Col2 | Col3 | Col4 ------|---------|-------|------------------------------------------------------- a | 163.112 | 34.0% | 33.2% 33.4% 33.5% 33.5% 33.7% 34.4% 34.8% 35.3% b | 156.220 | 32.5% | 63.3% 64.5% 66.1% 66.5% c | 160.653 | 33.5% | 85.8% 90.6% 91.4% -------------------------------------------------------------------------------- Deviation from desired group fairness is as below: a = +0.67% b = -0.83% c = +0.17% which is far better IMO. Most of other runs have yielded a deviation within +-2% at the most, which is good. Why do we see bad (group) fairness with current scheuler? ========================================================= Currently cpu's weight is just the summation of individual task weights. This can yield incorrect results. For ex: consider three groups as below on a 2-cpu system: CPU0 CPU1 --------------------------- A (10) B(5) C(5) --------------------------- Group A has 10 tasks, all on CPU0, Group B and C have 5 tasks each all of which are on CPU1. Each task has the same weight (NICE_0_LOAD = 1024). The current scheme would yield a cpu weight of 10240 (10*1024) for each cpu and the load balancer will think both CPUs are perfectly balanced and won't move around any tasks. This, however, would yield this bandwidth: A = 50% B = 25% C = 25% which is not the desired result. What's changing in the patch? ============================= - How cpu weights are calculated when CONFIF_FAIR_GROUP_SCHED is defined (see below) - API Change - Two tunables introduced in sysfs (under SCHED_DEBUG) to control the frequency at which the load balance monitor thread runs. The basic change made in this patch is how cpu weight (rq->load.weight) is calculated. Its now calculated as the summation of group weights on a cpu, rather than summation of task weights. Weight exerted by a group on a cpu is dependent on the shares allocated to it and also the number of tasks the group has on that cpu compared to the total number of (runnable) tasks the group has in the system. Let, W(K,i) = Weight of group K on cpu i T(K,i) = Task load present in group K's cfs_rq on cpu i T(K) = Total task load of group K across various cpus S(K) = Shares allocated to group K NRCPUS = Number of online cpus in the scheduler domain to which group K is assigned. Then, W(K,i) = S(K) * NRCPUS * T(K,i) / T(K) A load balance monitor thread is created at bootup, which periodically runs and adjusts group's weight on each cpu. To avoid its overhead, two min/max tunables are introduced (under SCHED_DEBUG) to control the rate at which it runs. Fixes from: Peter Zijlstra - don't start the load_balance_monitor when there is only a single cpu. - rename the kthread because its currently longer than TASK_COMM_LEN Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit a183561567b5446d3362b4839bd4f744f4b2af1e Author: Srivatsa Vaddagiri Date: Fri Jan 25 21:08:00 2008 +0100 sched: introduce a mutex and corresponding API to serialize access to doms_curarray doms_cur[] array represents various scheduling domains which are mutually exclusive. Currently cpusets code can modify this array (by calling partition_sched_domains()) as a result of user modifying sched_load_balance flag for various cpusets. This patch introduces a mutex and corresponding API (only when CONFIG_FAIR_GROUP_SCHED is defined) which allows a reader to safely read the doms_cur[] array w/o worrying abt concurrent modifications to the array. The fair group scheduler code (introduced in next patch of this series) makes use of this mutex to walk thr' doms_cur[] array while rebalancing shares of task groups across cpus. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit 58e2d4ca581167c2a079f4ee02be2f0bc52e8729 Author: Srivatsa Vaddagiri Date: Fri Jan 25 21:08:00 2008 +0100 sched: group scheduling, change how cpu load is calculated This patch changes how the cpu load exerted by fair_sched_class tasks is calculated. Load exerted by fair_sched_class tasks on a cpu is now a summation of the group weights, rather than summation of task weights. Weight exerted by a group on a cpu is dependent on the shares allocated to it. This version of patch has a minor impact on code size, but should have no runtime/functional impact for !CONFIG_FAIR_GROUP_SCHED. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit ec2c507fe8c8fa3c04fc6cb99a382a965c477379 Author: Srivatsa Vaddagiri Date: Fri Jan 25 21:07:59 2008 +0100 sched: group scheduling, minor fixes Minor bug fixes for the group scheduler: - Use a mutex to serialize add/remove of task groups and also when changing shares of a task group. Use the same mutex when printing cfs_rq debugging stats for various task groups. - Use list_for_each_entry_rcu in for_each_leaf_cfs_rq macro (when walking task group list) Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit 93f992ccc008dd4030381caeebb252e85e66684b Author: Srivatsa Vaddagiri Date: Fri Jan 25 21:07:59 2008 +0100 sched: group scheduling code cleanup Minor cleanups: - Fix coding style - remove obsolete comment Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Ingo Molnar commit 86faf39d0fc04272b05fab1db6d683f3ac7199d1 Author: Ingo Molnar Date: Fri Jan 25 21:07:59 2008 +0100 sched: remove printk_clock references from ia64 remove remaining printk_clock references from ia64. Signed-off-by: Ingo Molnar commit b842271fbb9c8b5fd0e1c3e1895a3b67ba5bcc54 Author: Ingo Molnar Date: Fri Jan 25 21:07:59 2008 +0100 sched: remove printk_clock() printk_clock() is obsolete - it has been replaced with cpu_clock(). Signed-off-by: Ingo Molnar commit d713f519332e029d43eca8462629314eee1ded86 Author: Ingo Molnar Date: Fri Jan 25 21:07:58 2008 +0100 sched: fix CONFIG_PRINT_TIME's reliance on sched_clock() Stefano Brivio reported weird printk timestamp behavior during CPU frequency changes: http://bugzilla.kernel.org/show_bug.cgi?id=9475 fix CONFIG_PRINT_TIME's reliance on sched_clock() and use cpu_clock() instead. Reported-and-bisected-by: Stefano Brivio Signed-off-by: Ingo Molnar commit 32a76006683f7b28ae3cc491da37716e002f198e Author: Ingo Molnar Date: Fri Jan 25 21:07:58 2008 +0100 printk: make printk more robust by not allowing recursion make printk more robust by allowing recursion only if there's a crash going on. Also add recursion detection. I've tested it with an artificially injected printk recursion - instead of a lockup or spontaneous reboot or other crash, the output was a well controlled: [ 41.057335] SysRq : <2>BUG: recent printk recursion! [ 41.057335] loglevel0-8 reBoot Crashdump show-all-locks(D) tErm Full kIll saK showMem Nice powerOff showPc show-all-timers(Q) unRaw Sync showTasks Unmount shoW-blocked-tasks also do all this printk-debug logic with irqs disabled. Signed-off-by: Ingo Molnar Reviewed-by: Nick Piggin commit 366ca51f30de1cbb5b356c70b7bb22051c558e41 Author: James Bottomley Date: Fri Jan 18 10:47:01 2008 -0600 [SCSI] libsas: abstract STP task status into a function Break out the frame processor for STP tasks from aic94xx so they can be shared by other SAS HBA's Original patch from Jeff Garzik Signed-off-by: James Bottomley commit 1292500b159c00a8fece072b004f154e6fda9f48 Author: Frederik Deweerdt Date: Wed Jan 16 17:19:08 2008 +0100 [SCSI] ultrastor: clean up inline asm warnings To: linux-kernel@vger.kernel.org Cc: bunk@kernel.org Subject: [trivial patch] scsi/ultrastor: clean up inline asm warnings Hi, Compiling latest mainline with gcc 4.2.1 spews the following warnings: drivers/scsi/ultrastor.c: In function 'find_and_clear_bit_16': drivers/scsi/ultrastor.c:303: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c: At top level: drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c: In function 'ultrastor_queuecommand': drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register The following patch fixes it by using the '+' operator on the (*field) operand, marking it as read-write to gcc. I diffed the two resulting .s, and gcc produced the same code. This was tested with gcc 4.2.1 and gcc 3.4.3 Signed-off-by: Frederik Deweerdt Cc: Adrian Bunk Signed-off-by: James Bottomley commit b47711bfbcd4eb77ca61ef0162487b20e023ae55 Merge: 7556afa... 2e08c0c... Author: Linus Torvalds Date: Fri Jan 25 08:44:29 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6: selinux: make mls_compute_sid always polyinstantiate security/selinux: constify function pointer tables and fields security: add a secctx_to_secid() hook security: call security_file_permission from rw_verify_area security: remove security_sb_post_mountroot hook Security: remove security.h include from mm.h Security: remove security_file_mmap hook sparse-warnings (NULL as 0). Security: add get, set, and cloning of superblock security information security/selinux: Add missing "space" commit 7556afa0e0e436cad4f560ee83e5fbd5dac9359a Merge: e07dd2a... d6c49a7... Author: Linus Torvalds Date: Fri Jan 25 08:40:02 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6: [AVR32] extint: Set initial irq type to low level [AVR32] extint: change set_irq_type() handling [AVR32] NMI debugging [AVR32] constify function pointer tables [AVR32] ATNGW100: Update defconfig [AVR32] ATSTK1002: Update defconfig [AVR32] Kconfig: Choose daughterboard instead of CPU [AVR32] Add support for ATSTK1003 and ATSTK1004 [AVR32] Clean up external DAC setup code [AVR32] ATSTK1000: Move gpio-leds setup to setup.c [AVR32] Add support for AT32AP7001 and AT32AP7002 [AVR32] Provide more CPU information in /proc/cpuinfo and dmesg [AVR32] Oprofile support [AVR32] Include instrumentation menu Disable VGA text console for AVR32 architecture [AVR32] Enable debugging only when needed ptrace: Call arch_ptrace_attach() when request=PTRACE_TRACEME [AVR32] Remove redundant try_to_freeze() call from do_signal() [AVR32] Drop GFP_COMP for DMA memory allocations commit e07dd2ad305f6b29b47d713600aa8b722ef2a9f7 Merge: eba0e31... 7bc5c41... Author: Linus Torvalds Date: Fri Jan 25 08:39:18 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (56 commits) [GFS2] Allow journal recovery on read-only mount [GFS2] Lockup on error [GFS2] Fix page_mkwrite truncation race path [GFS2] Fix typo [GFS2] Fix write alloc required shortcut calculation [GFS2] gfs2_alloc_required performance [GFS2] Remove unneeded i_spin [GFS2] Reduce inode size by moving i_alloc out of line [GFS2] Fix assert in log code [GFS2] Fix problems relating to execution of files on GFS2 [GFS2] Initialize extent_list earlier [GFS2] Allow page migration for writeback and ordered pages [GFS2] Remove unused variable [GFS2] Fix log block mapper [GFS2] Minor correction [GFS2] Eliminate the no longer needed sd_statfs_mutex [GFS2] Incremental patch to fix compiler warning [GFS2] Function meta_read optimization [GFS2] Only fetch the dinode once in block_map [GFS2] Reorganize function gfs2_glmutex_lock ... commit eba0e319c12fb098d66316a8eafbaaa9174a07c3 Merge: df8dc74... 15e7b44... Author: Linus Torvalds Date: Fri Jan 25 08:38:25 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (125 commits) [CRYPTO] twofish: Merge common glue code [CRYPTO] hifn_795x: Fixup container_of() usage [CRYPTO] cast6: inline bloat-- [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long [CRYPTO] tcrypt: Make xcbc available as a standalone test [CRYPTO] xcbc: Remove bogus hash/cipher test [CRYPTO] xcbc: Fix algorithm leak when block size check fails [CRYPTO] tcrypt: Zero axbuf in the right function [CRYPTO] padlock: Only reset the key once for each CBC and ECB operation [CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h [CRYPTO] salsa20-asm: Remove unnecessary dependency on CRYPTO_SALSA20 [CRYPTO] tcrypt: Add select of AEAD [CRYPTO] salsa20: Add x86-64 assembly version [CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version) [CRYPTO] gcm: Introduce rfc4106 [CRYPTO] api: Show async type [CRYPTO] chainiv: Avoid lock spinning where possible [CRYPTO] seqiv: Add select AEAD in Kconfig [CRYPTO] scatterwalk: Handle zero nbytes in scatterwalk_map_and_copy [CRYPTO] null: Allow setkey on digest_null ... commit df8dc74e8a383eaf2d9b44b80a71ec6f0e52b42e Merge: 556a169... 4a3ad20... Author: Linus Torvalds Date: Fri Jan 25 08:34:42 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 This can be broken down into these major areas: - Documentation updates (language translations and fixes, as well as kobject and kset documenatation updates.) - major kset/kobject/ktype rework and fixes. This cleans up the kset and kobject and ktype relationship and architecture, making sense of things now, and good documenation and samples are provided for others to use. Also the attributes for kobjects are much easier to handle now. This cleaned up a LOT of code all through the kernel, making kobjects easier to use if you want to. - struct bus_type has been reworked to now handle the lifetime rules properly, as the kobject is properly dynamic. - struct driver has also been reworked, and now the lifetime issues are resolved. - the block subsystem has been converted to use struct device now, and not "raw" kobjects. This patch has been in the -mm tree for over a year now, and finally all the issues are worked out with it. Older distros now properly work with new kernels, and no userspace updates are needed at all. - nozomi driver is added. This has also been in -mm for a long time, and many people have asked for it to go in. It is now in good enough shape to do so. - lots of class_device conversions to use struct device instead. The tree is almost all cleaned up now, only SCSI and IB is the remaining code to fix up... * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (196 commits) Driver core: coding style fixes Kobject: fix coding style issues in kobject c files Kobject: fix coding style issues in kobject.h Driver core: fix coding style issues in device.h spi: use class iteration api scsi: use class iteration api rtc: use class iteration api power supply : use class iteration api ieee1394: use class iteration api Driver Core: add class iteration api Driver core: Cleanup get_device_parent() in device_add() and device_move() UIO: constify function pointer tables Driver Core: constify the name passed to platform_device_register_simple driver core: fix build with SYSFS=n sysfs: make SYSFS_DEPRECATED depend on SYSFS Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init kobject: add sample code for how to use ksets/ktypes/kobjects kobject: add sample code for how to use kobjects in a simple manner. kobject: update the kobject/kset documentation kobject: remove old, outdated documentation. ... commit 556a169dab38b5100df6f4a45b655dddd3db94c1 Author: Pekka Enberg Date: Fri Jan 25 08:20:51 2008 +0200 slab: fix bootstrap on memoryless node If the node we're booting on doesn't have memory, bootstrapping kmalloc() caches resorts to fallback_alloc() which requires ->nodelists set for all nodes. Fix that by calling set_up_list3s() for CACHE_CACHE in kmem_cache_init(). As kmem_getpages() is called with GFP_THISNODE set, this used to work before because of breakage in 2.6.22 and before with GFP_THISNODE returning pages from the wrong node if a node had no memory. So it may have worked accidentally and in an unsafe manner because the pages would have been associated with the wrong node which could trigger bug ons and locking troubles. Tested-by: Mel Gorman Tested-by: Olaf Hering Reviewed-by: Christoph Lameter Signed-off-by: Pekka Enberg [ With additional one-liner by Olaf Hering - Linus ] Signed-off-by: Linus Torvalds commit eb36f4fc019835cecf0788907f6cab774508087b Author: Karsten Keil Date: Fri Jan 25 11:55:28 2008 +0100 fix oops on rmmod capidrv Fix overwriting the stack with the version string (it is currently 10 bytes + zero) when unloading the capidrv module. Safeguard against overwriting it should the version string grow in the future. Should fix Kernel Bug Tracker Bug 9696. Signed-off-by: Gerd v. Egidy Acked-by: Karsten Keil Signed-off-by: Linus Torvalds commit 93a38fa2dd83fcaf65b2327fff65e364472388f9 Author: Vegard Nossum Date: Thu Jan 24 23:02:52 2008 +0100 [SCSI] aic7xxx: fix firmware build This patch adds the proper $(obj) and $(src) prefixes to dependency rules in aic7xxx makefile. Without this patch, there is a remote possibility that parallel make with a different output directory can fail. Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax. Fixed up patch to survive "make drivers/scsi/ -j" with BUILD_FIRMWARE enable. /Sam Signed-off-by: Vegard Nossum Signed-off-by: Sam Ravnborg Acked-by: Hannes Reinecke Signed-off-by: James Bottomley commit a119ee8ee3045bf559d4cf02d72b112f3de2a15b Author: Salyzyn, Mark Date: Thu Jan 24 07:40:10 2008 -0800 [SCSI] aacraid: fib context lock for management ioctls Alan noticed the lack of locking surrounding the driver's dealings with the fib context managed by the trio of ioctls that are used by the RAID management applications to retrieve Adapter Initiated FIBs. I merely expanded the fib lock to include the fib context. There have been no field reports of any issues generally because the applications are relatively static and do not come and go often enough to stress this area. I bloated this patch a little with some space junk. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 5aa22af3d089123df954693d1f911323307d41f7 Author: FUJITA Tomonori Date: Thu Jan 24 17:24:52 2008 +0900 [SCSI] ch: remove forward declarations This moves ch_template and changer_fops structs to the end of file and removes forward declarations. This also removes some trailing whitespace. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit da707c54c3424b4b50d4352c2103867284ba6724 Author: FUJITA Tomonori Date: Thu Jan 24 17:24:50 2008 +0900 [SCSI] ch: fix device minor number management bug ch_probe uses the total number of ch devices as minor. ch_probe: ch->minor = ch_devcount; ... ch_devcount++; Then ch_remove decreases ch_devcount: ch_remove: ch_devcount--; If you have two ch devices, sch0 and sch1, and remove sch0, ch_devcount is 1. Then if you add another ch device, ch_probe tries to create sch1. So you get a warning and fail to create sch1: Jan 24 16:01:05 nice kernel: sysfs: duplicate filename 'sch1' can not be created Jan 24 16:01:05 nice kernel: WARNING: at fs/sysfs/dir.c:424 sysfs_add_one() Jan 24 16:01:05 nice kernel: Pid: 2571, comm: iscsid Not tainted 2.6.24-rc7-ga3d2c2e8-dirty #1 Jan 24 16:01:05 nice kernel: Jan 24 16:01:05 nice kernel: Call Trace: Jan 24 16:01:05 nice kernel: [] sysfs_add_one+0x54/0xbd Jan 24 16:01:05 nice kernel: [] create_dir+0x4f/0x87 Jan 24 16:01:05 nice kernel: [] sysfs_create_dir+0x35/0x4a Jan 24 16:01:05 nice kernel: [] kobject_get+0x12/0x17 Jan 24 16:01:05 nice kernel: [] kobject_add+0xf3/0x1a6 Jan 24 16:01:05 nice kernel: [] class_device_add+0xaa/0x39d Jan 24 16:01:05 nice kernel: [] class_device_create+0xcb/0xfa Jan 24 16:01:05 nice kernel: [] printk+0x4e/0x56 Jan 24 16:01:05 nice kernel: [] sysfs_ilookup_test+0x0/0xf Jan 24 16:01:05 nice kernel: [] :ch:ch_probe+0xbe/0x61a (snip) This patch converts ch to use a standard minor number management way, idr like sg and bsg. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 366781c19635d861f43ff5e03388a3873ec912d9 Author: Steve French Date: Fri Jan 25 10:12:41 2008 +0000 [CIFS] DFS build fixes Also includes a few minor changes suggested by Christoph Signed-off-by: Steve French commit 7bc5c414fe6627ec518c82d154c796f0981f5b02 Author: Abhijith Das Date: Fri Jan 18 14:06:37 2008 -0600 [GFS2] Allow journal recovery on read-only mount This patch allows gfs2 to perform journal recovery even if it is mounted read-only. Strictly speaking, a read-only mount should not be writing to the filesystem, but we do this only to perform journal recovery. A read-only mount will fail if we don't recover the dirty journal. Also, when gfs2 is used as a root filesystem, it will be mounted read-only before being mounted read-write during the boot sequence. A failed read-only mount will panic the machine during bootup. Signed-off-by: Abhijith Das Signed-off-by: Steven Whitehouse commit 1b8177ec1e779bcc3ed89419ff7c80dbc3dcc489 Author: Bob Peterson Date: Sat Jan 19 21:50:24 2008 -0600 [GFS2] Lockup on error I spotted this bug while I was digging around. Looks like it could cause a lockup in some rare error condition. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit b7fe2e391ee7b711d6dfd6a694d60c4f21113cbb Author: Steven Whitehouse Date: Thu Jan 17 15:12:03 2008 +0000 [GFS2] Fix page_mkwrite truncation race path There was a bug in the truncation/invalidation race path for ->page_mkwrite for gfs2. It ought to return 0 so that the effect is the same as if the page was truncated at any of the other points at which the page_lock is dropped. This will result in the restart of the whole page fault path. If it was due to a real truncation (as opposed to an invalidate because we let a glock go) then the ->fault path will pick that up when it gets called again. Signed-off-by: Steven Whitehouse commit 3e5cd0877e6d2f059dc36b8206cb7e93938151db Author: Bob Peterson Date: Wed Jan 16 08:45:39 2008 -0600 [GFS2] Fix typo This patch fixes a minor typo. Surprisingly, it still compiled. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 1af535727bbf68e1da7ac232de47315da4c66ade Author: Steven Whitehouse Date: Wed Jan 16 14:24:05 2008 +0000 [GFS2] Fix write alloc required shortcut calculation The comparison was being made against the wrong quantity. Signed-off-by: Steven Whitehouse commit 05220535196d413db434527a3edcba79b7187df8 Author: Bob Peterson Date: Fri Jan 11 13:44:50 2008 -0600 [GFS2] gfs2_alloc_required performance This is a small I/O performance enhancement to gfs2. (Actually, it is a rework of an earlier version I got wrong). The idea here is to check if the write extends past the last block in the file. If so, the function can save itself a lot of time and trouble because it knows an allocate will be required. Benchmarks like iozone should see better performance. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 598278bd4808ed81b0e6fa445458a7d549f72a32 Author: Bob Peterson Date: Fri Jan 11 13:31:12 2008 -0600 [GFS2] Remove unneeded i_spin This patch removes a vestigial variable "i_spin" from the gfs2_inode structure. This not only saves us memory (>300000 of these in memory for the oom test) it also saves us time because we don't have to spend time initializing it (i.e. slightly better performance). Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 6dbd822487d0a9f14432cb4680415b80656b63a2 Author: Steven Whitehouse Date: Thu Jan 10 15:18:55 2008 +0000 [GFS2] Reduce inode size by moving i_alloc out of line It is possible to reduce the size of GFS2 inodes by taking the i_alloc structure out of the gfs2_inode. This patch allocates the i_alloc structure whenever its needed, and frees it afterward. This decreases the amount of low memory we use at the expense of requiring a memory allocation for each page or partial page that we write. A quick test with postmark shows that the overhead is not measurable and I also note that OCFS2 use the same approach. In the future I'd like to solve the problem by shrinking down the size of the members of the i_alloc structure, but for now, this reduces the immediate problem of using too much low-memory on x86 and doesn't add too much overhead. Signed-off-by: Steven Whitehouse commit ac39aadd0440ae696e6dacaa8006ce1737b17008 Author: Steven Whitehouse Date: Thu Jan 10 14:49:43 2008 +0000 [GFS2] Fix assert in log code Although the values were all being calculated correctly, there was a race in the assert due to the way it was using atomic variables. This changes the value we assert on so that we get the same effect by testing a different variable. This prevents the assert triggering when it shouldn't. Signed-off-by: Steven Whitehouse commit 9656b2c14c6ee0806c90a6be41dec71117fc8f50 Author: Steven Whitehouse Date: Tue Jan 8 08:14:30 2008 +0000 [GFS2] Fix problems relating to execution of files on GFS2 This patch fixes a couple of problems which affected the execution of files on GFS2. The first is that there was a corner case where inodes were not always uptodate at the point at which permissions checks were being carried out, this was resulting in refusal of execute permission, but only on the first lookup, subsequent requests worked correctly. The second was a problem relating to incorrect updating of file sizes which was introduced with the write_begin/end code for GFS2 a little while back. Signed-off-by: Steven Whitehouse Cc: Abhijith Das commit 0811a127cb83ad2e0355e5e3e30164d7ef0f2d65 Author: Bob Peterson Date: Thu Jan 3 09:24:53 2008 -0600 [GFS2] Initialize extent_list earlier Here is a patch for the latest upstream GFS2 code: The journal extent map needs to be initialized sooner than it currently is. Otherwise failed mount attempts (e.g. not enough journals, etc.) may panic trying to access the uninitialized list. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit e5d9dc278c7f79c220e4506cc1ade2efa2ca73fd Author: Steven Whitehouse Date: Thu Jan 3 11:31:38 2008 +0000 [GFS2] Allow page migration for writeback and ordered pages To improve performance on NUMA, we use the VM's standard page migration for writeback and ordered pages. Probably we could also do the same for journaled data, but that would need a careful audit of the code, so will be the subject of a later patch. Signed-off-by: Steven Whitehouse commit 65a6290998f3d38b5c5e84423ae9e08bdd957095 Author: Steven Whitehouse Date: Wed Jan 2 10:16:56 2008 +0000 [GFS2] Remove unused variable The go_drop_th function is never called or referenced. Signed-off-by: Steven Whitehouse commit ff91cc9bb41b62bc4ea7d5ced396fabf97539df9 Author: Steven Whitehouse Date: Fri Dec 14 14:04:34 2007 +0000 [GFS2] Fix log block mapper A missing offset in the calculation. Signed-off-by: Steven Whitehouse commit fa3742fa8545df20e54aa0953a1873cca3a9bd92 Author: Bob Peterson Date: Wed Dec 12 17:52:13 2007 -0600 [GFS2] Minor correction This is a small correction to my previously posted patch1. It just changes a divide to a shift. It's faster and doesn't introduce odd dependencies on 32-bit compiles. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit c3f60b6e3a7667f78a63b15cf09655ecfca757fc Author: Bob Peterson Date: Wed Dec 12 11:44:41 2007 -0600 [GFS2] Eliminate the no longer needed sd_statfs_mutex This patch eliminates the unneeded sd_statfs_mutex mutex but preserves the ordering as discussed. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit b3513fca7e41965d85125c9770ce5f8fd4ff509a Author: Bob Peterson Date: Wed Dec 12 09:24:08 2007 -0600 [GFS2] Incremental patch to fix compiler warning Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 15c7cee7995a9013f1b2f31a15b70e1d2e8ae501 Author: Bob Peterson Date: Tue Dec 11 19:29:17 2007 -0600 [GFS2] Function meta_read optimization This patch optimizes function gfs2_meta_read. Basically, gfs2_meta_wait was being called regardless of whether a disk read was requested. This just pulls that wait into the if that triggers the read. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit b0d5fd307463405fe1f57494fbb37f810715ed6d Author: Bob Peterson Date: Tue Dec 11 19:16:09 2007 -0600 [GFS2] Only fetch the dinode once in block_map Function gfs2_block_map was often looking up the disk inode twice. This optimizes it so that only does it once. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 398bbe68321947f6763fbc259a01eb548ce19408 Author: Bob Peterson Date: Tue Dec 11 19:13:54 2007 -0600 [GFS2] Reorganize function gfs2_glmutex_lock This patch optimizes the function gfs2_glmutex_lock. The basic theory is: Why bother initializing a holder, setting up wait bits and then waiting on them, if you know the glock can be yours. So the holder stuff is placed inside the if checking if the glock is locked. This one needs careful scrutiny because changing anything to do with locking should strike terror into one's heart. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 5fdc2eeb5d1d3800367f471690b01fcd1fd5b963 Author: Bob Peterson Date: Tue Dec 11 19:00:16 2007 -0600 [GFS2] Run through full bitmaps quicker in gfs2_bitfit I eliminated the passing of an unused parameter into gfs2_bitfit called rgd. This also changes the gfs2_bitfit code that searches for free (or used) blocks. Before, the code was trying to check for bytes that indicated 4 blocks in the undesired state. The problem is, it was spending more time trying to do this than it actually was saving. This version only optimizes the case where we're looking for free blocks, and it checks a machine word at a time. So on 32-bit machines, it will check 32-bits (16 blocks) and on 64-bit machines, it will check 64-bits (32 blocks) at a time. The compiler optimizes that quite well and we save some time, especially when running through full bitmaps (like the bitmaps allocated for the journals). There's probably a more elegant or optimized way to do this, but I haven't thought of it yet. I'm open to suggestions. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 0d0868bde33273a200b33e54f4fad6099ad0c566 Author: Bob Peterson Date: Tue Dec 11 18:51:25 2007 -0600 [GFS2] Get rid of useless "found" variable in quota.c This just eliminates an unused variable from the quota code. Not likely to be a time saver. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit da6dd40d59fa9617ed697b90114e197036901632 Author: Bob Peterson Date: Tue Dec 11 18:49:21 2007 -0600 [GFS2] Journal extent mapping This patch saves a little time when gfs2 writes to the journals by keeping a mapping between logical and physical blocks on disk. That's better than constantly looking up indirect pointers in buffers, when the journals are several levels of indirection (which they typically are). Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit e9e1ef2b6ee401d7c1e1eb38052857b4b206d172 Author: Bob Peterson Date: Mon Dec 10 14:13:27 2007 -0600 [GFS2] Remove function gfs2_get_block This patch is just a cleanup. Function gfs2_get_block() just calls function gfs2_block_map reversing the last two parameters. By reversing the parameters, gfs2_block_map() may be called directly and function gfs2_get_block may be eliminated altogether. Since this function is done for every block operation, this streamlines the code and makes it a little bit more efficient. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit 2066b58b0a038d7aedd24133677efb8856cac3a1 Author: David Teigland Date: Thu Dec 6 09:35:25 2007 -0600 [GFS2] use pid for plock owner for nfs clients The fl_owner is that of lockd when posix locks arrive from nfs clients, so it can't be used to distinguish between lock holders. Use fl_pid as owner instead; it's the pid of the process on the nfs client. Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse commit dbee2199c37336e89060fbe9abdfd1ca8454372a Author: Steven Whitehouse Date: Fri Nov 30 08:17:15 2007 +0000 [GFS2] Remove unused variable Signed-off-by: Steven Whitehouse commit 292c8c14cace19c94c6abe25506310239daf949e Author: Abhijith Das Date: Thu Nov 29 14:13:54 2007 -0600 [GFS2] patch to check for recursive lock requests in gfs2_rename code path A certain scenario in the rename code path triggers a kernel BUG() because it accidentally does recursive locking The first lock is requested to unlink an already existing inode (replacing a file) and the second lock is requested when the destination directory needs to alloc some space. It is rare that these two events happen during the same rename call, and even more rare that these two instances try to lock the same rgrp. It is, however, possible. https://bugzilla.redhat.com/show_bug.cgi?id=404711 Signed-off-by: Abhijith Das Signed-off-by: Steven Whitehouse commit c97bfe4351771675963e02f34d31e206fd2d7150 Author: Wendy Cheng Date: Thu Nov 29 17:56:51 2007 -0500 [GFS2] Remove lock methods for lock_nolock protocol GFS2 supports two modes of locking - lock_nolock for single node filesystem and lock_dlm for cluster mode locking. The gfs2 lock methods are removed from file operation table for lock_nolock protocol. This would allow VFS to handle posix lock and flock logics just like other in-tree filesystems without duplication. Signed-off-by: S. Wendy Cheng Signed-off-by: Steven Whitehouse commit bcd405599faa16cf32a3d3f1ce6a1e12cb37fede Author: Fabio M. Di Nitto Date: Wed Nov 28 16:22:09 2007 +0100 [GFS2] Remove unrequired code Signed-off-by: Fabio M. Di Nitto Signed-off-by: Steven Whitehouse commit 6a69a23f7df18f39e4a084e10b62ff4a144b05a5 Author: Fabio Massimo Di Nitto Date: Tue Nov 27 06:16:42 2007 +0100 [GFS2] Fix build warnings Hi Steven, Steven Whitehouse wrote: > Hi, > > Now in the -nmw git tree. Thanks, > > Steve. > > On Wed, 2007-11-21 at 11:54 -0600, Ryan O'Hara wrote: this patch introduces a bunch of build warnings by leaving around struct inode *inode = &ip->i_inode; The patch in attachment cleans them up. Please apply. Signed-off-by: Fabio Massimo Di Nitto Signed-off-by: Steven Whitehouse commit 002ef1dc63ded14507c110d3cf83d0c3f51374ab Author: Ryan O'Hara Date: Wed Nov 21 11:54:54 2007 -0600 [GFS2] remove unnecessary permission checks Remove read/write permission() checks from xattr operations. VFS layer is already handling permission for xattrs via the xattr_permission() call, so there is no need for gfs2 to check permissions. Futhermore, using permission() for SELinux xattrs ops is incorrect. Signed-off-by: Ryan O'Hara Signed-off-by: Steven Whitehouse commit 1a2781cfa5ed8eb82bb311d684f268c1822dae69 Author: Fabio Massimo Di Nitto Date: Fri Nov 16 09:50:40 2007 +0000 [GFS2] Fix runtime issue with UP kernels The issue is indeed UP vs SMP and it is totally random. spin_is_locked() is a bad assertion because there is no correct answer on UP. on UP spin_is_locked() has to return either one value or another, always. This means that in my setup I am lucky enough to trigger the issue and your you are lucky enough not to. the patch in attachment removes the bogus calls to BUG_ON and according to David (in CC and thanks for the long explanation on the problem) we can rely upon things like lockdep to find problem that might be trying to catch. Signed-off-by: Fabio M. Di Nitto Cc: David S. Miller Signed-off-by: Steven Whitehouse commit 00c134756c5ad570a1ad3d6f93a67fc9c25a67ea Author: David Teigland Date: Thu Nov 15 09:01:13 2007 -0600 [GFS2] tidy up error message Print error with log_error() to be consistent with others. Signed-off-by: David Teigland Signed-off-by: Fabio M. Di Nitto Signed-off-by: Steven Whitehouse commit 0b7580c786a5feda6291fe68ead3a1b92b6b35b8 Author: Fabio Massimo Di Nitto Date: Thu Nov 15 13:48:52 2007 +0000 [GFS2] Check for installation of mount helpers for DLM mounts The patch is a fix to abort mount if the mount.gfs* and possible umount.* are missing from /sbin. While we do what we can to guarantee that they are installed properly in userland (CVS HEAD), we want to make sure that mount still aborts properly. The only sign of missing helpers is that lock_dlm will receive no mount options at all. According to David the problem does not exist for lock_nolock as the helpers are not required. The patch has been tested for both gfs and gfs2 and it works as expected. The lack of mount.gfs* will generate an error that is propagated to mount: oot@node1:~# mount -t gfs2 /dev/nbd2 /mnt/ mount: wrong fs type, bad option, bad superblock on /dev/nbd2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so [ 3513.303346] GFS2: fsid=: Trying to join cluster "lock_dlm", "gutsy:gfs2" [ 3513.304546] DLM/GFS2/GFS ERROR: (u)mount helpers are not installed properly! [ 3513.306290] GFS2: fsid=: can't mount proto=lock_dlm, table=gutsy:gfs2, hostdata= You might want to notice that it will also avoid mount to hang or fail silently or with strange errors that will require the cluster to reboot/restart before you can actually mount the filesystem again. Signed-off-by: Fabio M. Di Nitto Signed-off-by: Steven Whitehouse commit e35b921185728850c5db3b5d5b356178f931a157 Author: Steven Whitehouse Date: Fri Nov 9 10:07:21 2007 +0000 [GFS2] Don't periodically update the jindex We only care about the content of the jindex in two cases, one is when we mount the fs and the other is when we need to recover another journal. In both cases we have to update the jindex anyway, so there is no point in updating it periodically between times, so this removes it to simplify gfs2_logd. Signed-off-by: Steven Whitehouse commit ec69b188837a347769e187997d040e84a683b38a Author: Steven Whitehouse Date: Fri Nov 9 10:01:41 2007 +0000 [GFS2] Move gfs2_logd into log.c This means that we can mark gfs2_ail1_empty static and prepares the way for further changes. Signed-off-by: Steven Whitehouse commit fd041f0b4045db8646b36d393cbb274db60649f5 Author: Steven Whitehouse Date: Thu Nov 8 14:55:03 2007 +0000 [GFS2] Use atomic_t for journal free blocks counter This patch changes the counter which keeps track of the free blocks in the journal to an atomic_t in preparation for the following patch which will update the log reservation code. Signed-off-by: Steven Whitehouse commit 2bcd610d2fdea608a8fdac32788fc35a32a2327c Author: Steven Whitehouse Date: Thu Nov 8 14:25:12 2007 +0000 [GFS2] Don't add glocks to the journal The only reason for adding glocks to the journal was to keep track of which locks required a log flush prior to release. We add a flag to the glock to allow this check to be made in a simpler way. This reduces the size of a glock (by 12 bytes on i386, 24 on x86_64) and means that we can avoid extra work during the journal flush. Signed-off-by: Steven Whitehouse commit 8cbc4342478311c2a85260a7ca54d96cb7f71f7b Author: David Teigland Date: Wed Nov 7 09:03:56 2007 -0600 [GFS2] check kthread_should_stop when waiting Use wait_event_interruptible() in the lock_dlm thread instead of an open coded equivalent, and include a kthread_should_stop() check in the wait test so we don't miss a kthread_stop(). Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse commit c7227e46423a57b4df27a2d75b5869bd3ae654d0 Author: Bob Peterson Date: Fri Nov 2 09:37:15 2007 -0500 [GFS2] Given device ID rather than s_id in "id" sysfs file This patch changes the /sys/fs/gfs2//id file to give the device id "major:minor" rather than the s_id. That enables gfs2_tool to match devices properly (by id, not name) when locating the tuning files. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse commit e589665eb97b297412fb16b4c1737a01a91db903 Author: Steven Whitehouse Date: Fri Nov 2 09:14:31 2007 +0000 [GFS2] Remove flags no longer required The HIF_MUTEX and HIF_PROMOTE flags were set on the glock holders depending upon which of the two waiters lists they were going to be queued upon. They were then tested when the holders were taken off the lists to ensure that the right type of holder was being dequeued. Since we are already using separate lists, there doesn't seem a lot of point having these flags as well, and since setting them and testing them is in the fast path for locking and unlocking glock, this patch removes them. Signed-off-by: Steven Whitehouse commit 3042a2ccd68d2b609d283219e51cba363aa35c1d Author: Steven Whitehouse Date: Fri Nov 2 08:39:34 2007 +0000 [GFS2] Reorder writeback for glock sync Previously we were doing (write data, wait for data, write metadata, wait for metadata). After this patch we so (write metadata, write data, wait for data, wait for metadata) which should be more efficient. Also I noticed that the drop_bh and xmote_bh functions were almost identical. In fact the only difference was a single test, and that test is such that in the drop_bh case, it would always evaluate to the correct result. As such we can use the xmote_bh functions in all the places where we were using the drop_bh function and remove the drop_bh functions. Signed-off-by: Steven Whitehouse commit 52d4c74b08bf859f698ddb4e8a43c0dc8d4a0685 Author: Steven Whitehouse Date: Thu Nov 1 09:34:14 2007 +0000 [GFS2] Add sync_page to metadata address space operations This set of address space operations was missing a sync_page operation. Signed-off-by: Steven Whitehouse commit c2932e03dbcfe7ea9052953dbd5f3157183c1e9b Author: Steven Whitehouse Date: Thu Nov 1 09:26:54 2007 +0000 [GFS2] Remove "reclaim limit" This call to reclaim glocks is not needed, and in particular we don't want it in the fast path for locking glocks. The limit was entirely arbitrary anyway and we can't expect users to adjust things like this, the remaining code will do the right thing on its own. Signed-off-by: Steven Whitehouse commit 60b0d0877986b8fa70148f06055422d2ed858e88 Author: Steven Whitehouse Date: Wed Oct 31 14:24:33 2007 +0000 [GFS2] Remove unused variables These haven't been used for some time, remove them. Signed-off-by: Steven Whitehouse commit 47e83b509127f5e83ae5d93afd5c7cb9241acc38 Author: Steven Whitehouse Date: Thu Oct 18 11:15:50 2007 +0100 [GFS2] Use correct include file in ops_address.c Something changed in the upstream kernel, and it needs this one-liner to allow ops_address.c to build. Signed-off-by: Steven Whitehouse commit c41d4f09f13671f98ba4b82fdc94420cdc09be08 Author: Steven Whitehouse Date: Wed Oct 17 14:05:41 2007 +0100 [GFS2] Don't hold page lock when starting transaction This is an addendum to the new AOPs work which moves the point at which we take the page lock so that we don't get it until the last possible moment. This resolves a conflict between starting transactions and the page lock. Signed-off-by: Steven Whitehouse commit b8e7cbb65bcc99630e123422c6829ce3c0fcdf14 Author: Steven Whitehouse Date: Wed Oct 17 09:04:24 2007 +0100 [GFS2] Add writepages for GFS2 jdata This patch resolves a lock ordering issue where we had been getting a transaction lock in the wrong order with respect to the page lock. By using writepages rather than just writepage, it is then possible to start a transaction before locking the page, and thus matching the locking order elsewhere in the code. Signed-off-by: Steven Whitehouse commit 9ff8ec32e58875022447af619bec6e5aee7c77e4 Author: Steven Whitehouse Date: Fri Sep 28 13:49:05 2007 +0100 [GFS2] Split gfs2_writepage into three cases This patch splits gfs2_writepage into separate functions for each of the three cases: writeback, ordered and journalled. As a result it becomes a lot easier to see what each one is doing. The common code is moved into gfs2_writepage_common. This fixes a performance bug where we were doing more work than strictly required in the ordered write case. Signed-off-by: Steven Whitehouse commit 5561093e2cac9f7d2a77e39cc689b8d2b7f9b2bc Author: Steven Whitehouse Date: Wed Oct 17 08:47:38 2007 +0100 [GFS2] Introduce gfs2_set_aops() Just like ext3 we now have three sets of address space operations to cover the cases of writeback, ordered and journalled data writes. This means that the individual operations can now become less complicated as we are able to remove some of the tests for file data mode from the code. Signed-off-by: Steven Whitehouse commit bf36a713169432643d4fc7eeb4e0ace96d791d26 Author: Steven Whitehouse Date: Wed Oct 17 08:35:19 2007 +0100 [GFS2] Add gfs2_is_writeback() This adds a function "gfs2_is_writeback()" along the lines of the existing "gfs2_is_jdata()" in order to clean up the code and make the various tests for the inode mode more obvious. It also fixes the PageChecked() logic where we were resetting the flag too early in the case of an error path. Signed-off-by: Steven Whitehouse commit e7e36f143565d14950055c893cfaf4400ad64d34 Author: Steven Whitehouse Date: Tue Oct 16 11:47:04 2007 +0100 [GFS2] Remove unused field in struct gfs2_inode Removes a field that is not used. Signed-off-by: Steven Whitehouse commit f91a0d3e24e4b0198be5fae20d45a35c40d1efce Author: Steven Whitehouse Date: Mon Oct 15 16:29:05 2007 +0100 [GFS2] Remove useless i_cache from inodes The i_cache was designed to keep references to the indirect blocks used during block mapping so that they didn't have to be looked up continually. The idea failed because there are too many places where the i_cache needs to be freed, and this has in the past been the cause of many bugs. In addition there was no performance benefit being gained since the disk blocks in question were cached anyway. So this patch removes it in order to simplify the code to prepare for other changes which would otherwise have had to add further support for this feature. Signed-off-by: Steven Whitehouse commit 3cc3f710ce0effe397b830826a1a081fa81f11c7 Author: Steven Whitehouse Date: Mon Oct 15 15:40:33 2007 +0100 [GFS2] Use ->page_mkwrite() for mmap() This cleans up the mmap() code path for GFS2 by implementing the page_mkwrite function for GFS2. We are thus able to use the generic filemap_fault function for our ->fault() implementation. This now means that shared writable mappings will be much more efficiently shared across the cluster if there is a reasonable proportion of read activity (the greater proportion, the better). As a side effect, it also reduces the size of the code, removes special cases from readpage and readpages, and makes the code path easier to follow. Signed-off-by: Steven Whitehouse commit 51ff87bdd9f21a5d3672517b75d25ab5842d94a8 Author: Steven Whitehouse Date: Mon Oct 15 14:42:35 2007 +0100 [GFS2] Clean up internal read function As requested by Christoph, this patch cleans up GFS2's internal read function so that it no longer uses the do_generic_mapping_read function. This function is obsolete and GFS2 is the last user of it. As a side effect the internal read code gets smaller and easier to read and gfs2_readpage is split into two. One function has the locking and the other function has the rest of the logic. Signed-off-by: Steven Whitehouse Cc: Christoph Hellwig commit cc7e79b168a552152299bd8a8254dc099aacc993 Author: Wendy Cheng Date: Fri Oct 5 00:27:58 2007 -0400 [GFS2] Handle multiple glock demote requests Fix a race condition where multiple glock demote requests are sent to a node back-to-back. This patch does a check inside handle_callback() to see whether a demote request is in progress. If true, it sets a flag to make sure run_queue() will loop again to handle the new request, instead of erronously setting gl_demote_state to a different state. Signed-off-by: S. Wendy Cheng Signed-off-by: Steven Whitehouse commit d6c49a7a78fc841418bbd58bda504076f80ec51d Author: Haavard Skinnemoen Date: Thu Jan 24 16:56:53 2008 +0100 [AVR32] extint: Set initial irq type to low level David Brownell pointed out a mismatch in the avr32 extint code: > I noticed a small glitch that's not fixed by this patch: the > initial type is falling edge, but IRQ_TYPE_NONE is mapped to > IRQ_TYPE_LEVEL_LOW. Potentially surprising. Fix it by setting the initial type (and handler) to low level, matching the meaning of IRQ_TYPE_NONE. Signed-off-by: Haavard Skinnemoen commit e4f586f280bbfa05c68f99df2db981356ee30533 Author: David Brownell Date: Tue Dec 18 20:50:28 2007 -0800 [AVR32] extint: change set_irq_type() handling Update the AVR32 EIC code to use the new __set_irq_handler_unlocked() call, getting rid of one more instance of this widespread problem. Signed-off-by: David Brownell Signed-off-by: Haavard Skinnemoen commit e7ba176b47db2ed53f258a6b4fe9d9fc6fa437a9 Author: Haavard Skinnemoen Date: Wed Oct 10 14:58:29 2007 +0200 [AVR32] NMI debugging Change the NMI handler to use the die notifier chain to signal anyone who cares. Add a simple "nmi debugger" which hooks into this chain and that may dump registers, task state, etc. when it happens. Signed-off-by: Haavard Skinnemoen commit f6135d12db4bed3b992052020f1c50d749cd8dc6 Author: Jan Engelhardt Date: Tue Jan 22 20:41:37 2008 +0100 [AVR32] constify function pointer tables Signed-off-by: Jan Engelhardt Signed-off-by: Haavard Skinnemoen commit 00625723428c23748668ca225e199a2c674c63f7 Author: Haavard Skinnemoen Date: Wed Jan 9 23:21:15 2008 +0100 [AVR32] ATNGW100: Update defconfig Signed-off-by: Haavard Skinnemoen commit f141035decdf8e3ce498991deee3984cb47426bf Author: Haavard Skinnemoen Date: Wed Jan 9 22:45:05 2008 +0100 [AVR32] ATSTK1002: Update defconfig Turn off a few useless options, enable a few useful ones and enable quite a few new drivers. Signed-off-by: Haavard Skinnemoen commit e8897bfef2b056a527df21b25b602c59dbbad67a Author: Haavard Skinnemoen Date: Thu Nov 29 11:15:15 2007 +0100 [AVR32] Kconfig: Choose daughterboard instead of CPU Remove the CPU selection menu and instead let it be selected by the board or daughterboard option. Add daughterboard selection for ATSTK1000 (this was previously determined based on CPU type.) Signed-off-by: Haavard Skinnemoen commit 78693e47a285dbfafabc85a42797660e4fe2967b Author: Haavard Skinnemoen Date: Mon Oct 29 17:03:26 2007 +0100 [AVR32] Add support for ATSTK1003 and ATSTK1004 ATSTK1003 and ATSTK1004 are CPU daughterboards for ATSTK1000 featuring the AT32AP7001 and AT32AP7002 CPUs, respectively. Signed-off-by: Haavard Skinnemoen commit 64d81052671bc2e66efd46251883f5e8e3043db9 Author: Haavard Skinnemoen Date: Mon Oct 29 16:24:09 2007 +0100 [AVR32] Clean up external DAC setup code Reduce the ridiculous amount of #ifdef clutter in atstk1002.c a bit by moving all the extdac stuff into its own function and providing an empty stub for the case when it isn't wanted. Signed-off-by: Haavard Skinnemoen commit f4c41b2689eec03bd4f8145a08903862673e002b Author: Haavard Skinnemoen Date: Mon Oct 29 16:02:51 2007 +0100 [AVR32] ATSTK1000: Move gpio-leds setup to setup.c There may be other boards than STK1002 that want to use the leds on STK1000. Move it to stk1000 common code to make it easier to reuse. Signed-off-by: Haavard Skinnemoen commit 438ff3f3cc33833206a48492e9d6674e4e82bed8 Author: Haavard Skinnemoen Date: Mon Oct 29 15:28:07 2007 +0100 [AVR32] Add support for AT32AP7001 and AT32AP7002 These are derivatives of the AT32AP7000 chip, which means that most of the code stays the same. Rename a few files, functions, definitions and config symbols to reflect that they apply to all AP700x chips, and exclude some platform devices from chips where they aren't present. Signed-off-by: Haavard Skinnemoen commit 281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b Author: Haavard Skinnemoen Date: Fri Dec 7 10:21:02 2007 +0100 [AVR32] Provide more CPU information in /proc/cpuinfo and dmesg Add the following fields to /proc/cpuinfo: * chip type and revision (from the JTAG chip id) * cpu MHz (from clk_get_rate()) * features (from the CONFIG0 register) Also rename "cpu family" to "cpu arch" and "cpu type" to "cpu core" to remove some ambiguity. Show chip type and revision at bootup, and clarify that the other kinds of IDs that we're already printing are for the cpu core and architecture. Rename "AP7000" to "AP7" since that's the name of the core. Signed-off-by: Haavard Skinnemoen commit 2853ce5ecefe9d9ca119f33db0c23a3f075e35d9 Author: Haavard Skinnemoen Date: Wed Jan 4 17:26:23 2006 +0100 [AVR32] Oprofile support This adds the necessary architecture code to run oprofile on AVR32 using the performance counters documented by the AVR32 Architecture Manual. Signed-off-by: Haavard Skinnemoen Acked-by: Philippe Elie commit a7f5bf9b95ace39cd8b61e8c9ca1035966779ed1 Author: Haavard Skinnemoen Date: Wed Oct 31 15:22:34 2007 +0100 [AVR32] Include instrumentation menu Remove KPROBES option from Kconfig.debug and include kernel/Kconfig.instrumentation. Signed-off-by: Haavard Skinnemoen commit 9e4e980b027c892b02a73d6ea0d01c197b818a32 Author: Hans-Christian Egtvedt Date: Mon Dec 3 10:43:28 2007 +0100 Disable VGA text console for AVR32 architecture This patch disables the VGA text console for AVR32 architecture since it does not provide the vga.h include file. AVR32 users should use framebuffer console instead if they need a console on an attached display. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Haavard Skinnemoen commit 13b54a50525a9685065684e1e11258d27dd27bdf Author: Haavard Skinnemoen Date: Tue Nov 27 13:50:45 2007 +0100 [AVR32] Enable debugging only when needed Keep track of processes being debugged (including the kernel itself) and turn the OCD system on and off as appropriate. Since enabling debugging turns off some optimizations in the CPU core, this fixes the issue that enabling KProbes support or simply running a program under gdbserver will reduce system performance significantly until the next reboot. The CPU performance will still be reduced for all processes while a process is being debugged, but this is a lot better than reducing the performance forever. Signed-off-by: Haavard Skinnemoen commit 6ea6dd93c9454cc9521134f907bc970d09f460e4 Author: Haavard Skinnemoen Date: Tue Nov 27 13:02:40 2007 +0100 ptrace: Call arch_ptrace_attach() when request=PTRACE_TRACEME arch_ptrace_attach() is a hook that allows the architecture to do book-keeping after a ptrace attach. This patch adds a call to this hook when handling a PTRACE_TRACEME request as well. Currently only one architecture, m32r, implements this hook. When called, it initializes a number of debug trap slots in the ptraced task's thread struct, and it looks to me like this is the right thing to do after a PTRACE_TRACEME request as well, not only after PTRACE_ATTACH. Please correct me if I'm wrong. I want to use this hook on AVR32 to turn the debugging hardware on when a process is actually being debugged and keep it off otherwise. To be able to do this, I need to intercept PTRACE_TRACEME and PTRACE_ATTACH, as well as PTRACE_DETACH and thread exit. The latter two can be handled by existing hooks. Signed-off-by: Haavard Skinnemoen commit 7f0f616bb093823b70855685cf085d39a8784818 Author: Haavard Skinnemoen Date: Wed Nov 28 14:51:44 2007 +0100 [AVR32] Remove redundant try_to_freeze() call from do_signal() get_signal_to_deliver() will call try_to_freeze(), so there's no point in do_signal() doing it as well. Signed-off-by: Haavard Skinnemoen commit 3611553ef985ef7c5863c8a94641738addd04cff Author: Haavard Skinnemoen Date: Thu Jul 5 17:08:09 2007 +0200 [AVR32] Drop GFP_COMP for DMA memory allocations dma_alloc_coherent wants to split pages after allocation in order to reduce the memory footprint. This does not work well with GFP_COMP pages, so drop this flag before allocation. This patch was forward-ported from BSP 2.0 Signed-off-by: Haavard Skinnemoen commit 4a3ad20ccd8f4d2a0535cf98fa83f7b561ba59a9 Author: Greg Kroah-Hartman Date: Thu Jan 24 22:50:12 2008 -0800 Driver core: coding style fixes Fix up a number of coding style issues in the drivers/base/ directory that have annoyed me over the years. checkpatch.pl is now very happy. Signed-off-by: Greg Kroah-Hartman commit e374a2bfebf359f846216336de91670be40499da Author: Greg Kroah-Hartman Date: Thu Jan 24 21:59:04 2008 -0800 Kobject: fix coding style issues in kobject c files Clean up the kobject.c and kobject_uevent.c files to follow the proper coding style rules. Signed-off-by: Greg Kroah-Hartman commit 79a6ee42fd81be9abc6bdab08f932875924b26a5 Author: Greg Kroah-Hartman Date: Thu Jan 24 21:27:06 2008 -0800 Kobject: fix coding style issues in kobject.h Finally clean up the odd spaces and other mess in kobject.h Signed-off-by: Greg Kroah-Hartman commit d462943afee8bff610258a82dba666e8ab72c9c8 Author: Greg Kroah-Hartman Date: Thu Jan 24 21:04:46 2008 -0800 Driver core: fix coding style issues in device.h Finally clean up the odd spaces and other mess in device.h Signed-off-by: Greg Kroah-Hartman commit 5ed2c832ed256b18d90c2462369c62fd79312e6c Author: Dave Young Date: Tue Jan 22 15:14:18 2008 +0800 spi: use class iteration api Convert to use the class iteration api. Signed-off-by: Dave Young Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9c7701088a61cc0cf8a6e1c68d1e74e3cc2ee0b7 Author: Dave Young Date: Tue Jan 22 14:01:34 2008 +0800 scsi: use class iteration api Convert to use the class iteration api. Signed-off-by: Dave Young Cc: James Bottomley Signed-off-by: Greg Kroah-Hartman commit 71da890509fec13d54329485bf5e4ac16b992bb6 Author: Dave Young Date: Tue Jan 22 14:00:34 2008 +0800 rtc: use class iteration api Convert to use the class iteration api. Signed-off-by: Dave Young Cc: Alessandro Zummo Signed-off-by: Greg Kroah-Hartman commit 443cad920a1c6894da3de917ce02a194cc6d80ea Author: Dave Young Date: Tue Jan 22 13:58:22 2008 +0800 power supply : use class iteration api Convert to use the class iteration api. Signed-off-by: Dave Young Cc: Anton Vorontsov Cc: David Woodhouse Signed-off-by: Greg Kroah-Hartman commit 73cf60232ef16e1f8a64defa97214a1722db1e6c Author: Dave Young Date: Tue Jan 22 13:56:32 2008 +0800 ieee1394: use class iteration api Convert to use the class iteration api. Signed-off-by: Dave Young Cc: Stefan Richter Signed-off-by: Greg Kroah-Hartman commit fd04897bb20be29d60f7e426a053545aebeaa61a Author: Dave Young Date: Tue Jan 22 15:27:08 2008 +0800 Driver Core: add class iteration api Add the following class iteration functions for driver use: class_for_each_device class_find_device class_for_each_child class_find_child Signed-off-by: Dave Young Acked-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 63b6971a0876b744e2fcf3c9df15d130501e1deb Author: Cornelia Huck Date: Mon Jan 21 16:09:44 2008 +0100 Driver core: Cleanup get_device_parent() in device_add() and device_move() Make setup_parent() void as get_device_parent() will always return either a valid kobject or NULL. Introduce cleanup_glue_dir() to drop reference grabbed on "glue" directory by get_device_parent(). Use it for cleanup in device_move() and device_add() on errors. This should fix the refcounting problem reported in http://marc.info/?l=linux-kernel&m=120052487909200&w=2 Signed-off-by: Cornelia Huck Cc: Dave Young Cc: Gabor Gombas Cc: Tejun Heo Cc: Al Viro Cc: Marcel Holtmann Cc: David Miller Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 4f0146919be6bff47b5ea97252bcec0286e4dd19 Author: Jan Engelhardt Date: Tue Jan 22 20:50:54 2008 +0100 UIO: constify function pointer tables Signed-off-by: Jan Engelhardt Signed-off-by: Greg Kroah-Hartman commit ae72cddb2338bc36b991674a56a7bf70ae104d9e Author: Stephen Rothwell Date: Fri Jan 11 17:24:53 2008 +1100 Driver Core: constify the name passed to platform_device_register_simple This name is just passed to platform_device_alloc which has its parameter declared const. Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 92b421416f8194aec87b1439487b5544e9ac8187 Author: Randy Dunlap Date: Mon Dec 31 10:05:43 2007 -0800 driver core: fix build with SYSFS=n When SYSFS=n and MODULES=y, build ends with: linux-2.6.24-rc6-mm1/drivers/base/module.c: In function 'module_add_driver': linux-2.6.24-rc6-mm1/drivers/base/module.c:49: error: 'module_kset' undeclared (first use in this function) make[3]: *** [drivers/base/module.o] Error 1 Below is one possible fix. Build-tested with all 4 config combinations of SYSFS & MODULES. Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 9148fe8767dc8612b2e66d11126744d6436cc94e Author: Randy Dunlap Date: Mon Dec 31 10:05:34 2007 -0800 sysfs: make SYSFS_DEPRECATED depend on SYSFS Make SYSFS_DEPRECATED depend on SYSFS since files that check CONFIG_SYSFS_DEPRECATED don't check for CONFIG_SYSFS first. Also don't prompt user about SYSFS_DEPRECATED if SYSFS=n. Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit db1118a460c7bfd20278955cbf56c0b283a9701f Author: Denis Cheng Date: Thu Dec 6 02:24:40 2007 +0800 Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init LIST_HEAD has been widely used, so switch to this simpler method. Signed-off-by: Denis Cheng Signed-off-by: Greg Kroah-Hartman commit 44bfe16e1083d66f97a5289e359c52ee2c8b19a7 Author: Greg Kroah-Hartman Date: Tue Nov 27 11:28:26 2007 -0800 kobject: add sample code for how to use ksets/ktypes/kobjects This is a more complex example showing how to create a kset and a ktype and some default attributes for a group of kobjects. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 40efcb05f213180b7cc8fd8d963377305f236c28 Author: Greg Kroah-Hartman Date: Tue Nov 27 11:28:26 2007 -0800 kobject: add sample code for how to use kobjects in a simple manner. This is a simple kobject module, showing how to use kobj_attributes in basic and more complex ways. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 36d78d6c5b50ba945bbdee9bf1d8daac00154e02 Author: Greg Kroah-Hartman Date: Tue Nov 27 11:28:26 2007 -0800 kobject: update the kobject/kset documentation This provides a much-needed kobject and kset documentation update. Thanks to Kay Sievers, Alan Stern, Jonathan Corbet, Randy Dunlap, Jan Engelhardt, and others for reviewing and providing help with this document. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 5008743dc7f98dd1ad4f20f4d7ff0b479e78895d Author: Greg Kroah-Hartman Date: Tue Nov 27 11:28:26 2007 -0800 kobject: remove old, outdated documentation. As we are replacing the documentation, it's easier to do this in a two stage pass, delete the old file and add the new one. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00 Author: Kay Sievers Date: Thu Dec 20 02:09:39 2007 +0100 Driver core: change sysdev classes to use dynamic kobject names All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 528a4bf1d5ffed310d26fc1d82d45c02949f71cf Author: Greg Kroah-Hartman Date: Thu Dec 20 08:13:05 2007 -0800 Kobject: remove kobject_unregister() as no one uses it anymore There are no in-kernel users of kobject_unregister() so it should be removed. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 78a2d906b40fe530ea800c1e873bfe8f02326f1e Author: Greg Kroah-Hartman Date: Thu Dec 20 08:13:05 2007 -0800 Kobject: convert remaining kobject_unregister() to kobject_put() There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 197b12d6796a3bca187f22a8978a33d51e2bcd79 Author: Greg Kroah-Hartman Date: Thu Dec 20 08:13:05 2007 -0800 Kobject: convert fs/* from kobject_unregister() to kobject_put() There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit c10997f6575f476ff38442fa18fd4a0d80345f9d Author: Greg Kroah-Hartman Date: Thu Dec 20 08:13:05 2007 -0800 Kobject: convert drivers/* from kobject_unregister() to kobject_put() There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 38a382ae5dd4f4d04e3046816b0a41836094e538 Author: Greg Kroah-Hartman Date: Thu Dec 20 08:13:05 2007 -0800 Kobject: convert arch/* from kobject_unregister() to kobject_put() There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7a6a41615bfb2f03ce797bc24104c50b42c935e5 Author: Greg Kroah-Hartman Date: Sat Dec 22 21:18:25 2007 -0800 Modules: remove unneeded release function Now that kobjects properly clean up their name structures, no matter if they have a release function or not, we can drop this empty module kobject release function too (it was needed prior to this because of the way we handled static kobject names, we based the fact that if a release function was present, then we could safely free the name string, now we are more smart about things and only free names we have previously set.) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 0f4dafc0563c6c49e17fe14b3f5f356e4c4b8806 Author: Kay Sievers Date: Wed Dec 19 01:40:42 2007 +0100 Kobject: auto-cleanup on final unref We save the current state in the object itself, so we can do proper cleanup when the last reference is dropped. If the initial reference is dropped, the object will be removed from sysfs if needed, if an "add" event was sent, "remove" will be send, and the allocated resources are released. This allows us to clean up some driver core usage as well as allowing us to do other such changes to the rest of the kernel. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 12e339ac6e31a34fe42396aec8fb1c0b43caf61e Author: Greg Kroah-Hartman Date: Tue Apr 9 12:14:34 2002 -0700 Kset: remove kset_add function No one is calling this anymore, so just remove it and hard-code the one internal-use of it. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 6d06adfaf82d154023141ddc0c9de18b6a49090b Author: Greg Kroah-Hartman Date: Wed Dec 19 11:26:50 2007 -0800 Kobject: remove kobject_register() The function is no longer used by anyone in the kernel, and it prevents the proper sending of the kobject uevent after the needed files are set up by the caller. kobject_init_and_add() can be used in its place. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit f9cb074bff8e762ef24c44678a5a7d907f82fbeb Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: rename kobject_init_ng() to kobject_init() Now that the old kobject_init() function is gone, rename kobject_init_ng() to kobject_init() to clean up the namespace. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e1543ddf739b22a8c4218716ad50c26b3e147403 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: remove kobject_init() as no one uses it anymore The old kobject_init() function is on longer in use, so let us remove it from the public scope (kset mess in the kobject.c file still uses it, but that can be cleaned up later very simply.) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b2d6db5878a0832659ed58476357eea2db915550 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: rename kobject_add_ng() to kobject_add() Now that the old kobject_add() function is gone, rename kobject_add_ng() to kobject_add() to clean up the namespace. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 9e7bbccd0290e720e0874443932869c55f63d5a8 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: remove kobject_add() as no one uses it anymore The old kobject_add() function is on longer in use, so let us remove it from the public scope (kset mess in the kobject.c file still uses it, but that can be cleaned up later very simply.) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit ac3c8141f62f357169980ec21b7be6d29964a394 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert kernel/module.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 649316b25b148e57c8ef71748fc69fa6db276ad1 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert drivers/md/md.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Neil Brown Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d5a379f77bc79c0a78b26f8c0159f55c8b11d68b Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert block/ll_rw_blk.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Jens Axboe Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 29e3dd0df1b9556170ce90484a9d1a2ff9104ea7 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert block/elevator.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Jens Axboe Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit edfaa7c36574f1bf09c65ad602412db9da5f96bf Author: Kay Sievers Date: Mon May 21 22:08:01 2007 +0200 Driver core: convert block from raw kobjects to core devices This moves the block devices to /sys/class/block. It will create a flat list of all block devices, with the disks and partitions in one directory. For compatibility /sys/block is created and contains symlinks to the disks. /sys/class/block |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1 |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10 |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5 |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6 |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7 |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8 |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9 `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 /sys/block/ |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 09f82ea92822a7bbb7e816508abbda47ed54a77f Author: Alan Stern Date: Mon Nov 19 10:53:40 2007 -0500 Kobject: drop child->parent ref at unregistration This patch (as1015) reverts changes that were made to the driver core about four years ago. The intent back then was to avoid certain kinds of invalid memory accesses by leaving kernel objects allocated as long as any of their children were still allocated. The original and correct approach was to wait only as long as any children were still _registered_; that's what this patch reinstates. This fixes a problem in the SCSI core made visible by the class_device to regular device conversion: A reference loop (scsi_device holds reference to request_queue, which is the child of a gendisk, which is the child of the scsi_device) prevents the data structures from being released, even though they are deregistered okay. It's possible that this change will cause a few bugs to surface, things that have been hidden for several years. They can be fixed easily enough by having the child device take an explicit reference to the parent whenever needed. Signed-off-by: Alan Stern Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 97c146ef075dc40ae34407c03d3860fc3850b8e8 Author: Kay Sievers Date: Thu Nov 29 23:46:11 2007 +0100 sysfs: fix /sys/module/*/holders after sysfs logic change Sysfs symlinks now require fully registered kobjects as a target, otherwise the call to create a symlink will fail. Here we register the kobject before we request the symlink in the holders directory. Signed-off-by: Kay Sievers Cc: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit da231fd5d113ab6da5dab7a2d2c38d0a540f939c Author: Kay Sievers Date: Wed Nov 21 17:29:15 2007 +0100 Driver core: fix class glue dir cleanup logic We should remove the glue directory between the class and the bus device _after_ we sent out the 'remove' event for the device, otherwise the parent relationship is no longer valid, and composing the path with deleted sysfs entries will not work. Cc: Alan Stern Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit ef2c51746dc89c2326ce522f8fb8a57695780e75 Author: Alan Stern Date: Fri Nov 16 11:57:28 2007 -0500 Driver core: fix race in __device_release_driver This patch (as1013) was suggested by David Woodhouse; it fixes a race in the driver core. If a device is unregistered at the same time as its driver is unloaded, the driver's code pages may be unmapped while the remove method is still running. The calls to get_driver() and put_driver() were intended to prevent this, but they don't work if the driver's module count has already dropped to 0. Instead, the patch keeps the device on the driver's list until after the remove method has returned. This forces the necessary synchronization to occur. Signed-off-by: Alan Stern Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman commit c8e90d822bff3e0502d004facedb05859f98055f Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/base/bus to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7dc72b2842381684b864750af31a5fb168dec764 Author: Greg Kroah-Hartman Date: Wed Nov 28 23:49:41 2007 -0800 Driver core: clean up debugging messages The driver core debugging messages are a mess. This provides a unified message that makes them actually useful. The format for new kobject debug messages should be: driver/bus/class: 'OBJECT_NAME': FUNCTION_NAME: message.\n Note, the class code is not changed in this patch due to pending patches in my queue that this would conflict with. A later patch will clean them up. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e5dd12784617f0f1fae5f96a7fac1ec4c49fadbe Author: Greg Kroah-Hartman Date: Wed Nov 28 15:59:15 2007 -0800 Driver core: move the static kobject out of struct driver This patch removes the kobject, and a few other driver-core-only fields out of struct driver and into the driver core only. Now drivers can be safely create on the stack or statically (like they currently are.) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit c63469a3985a9771c18a916b8d42845d044ea0b1 Author: Greg Kroah-Hartman Date: Wed Nov 28 12:23:18 2007 -0800 Driver core: move the driver specific module code into the driver core The module driver specific code should belong in the driver core, not in the kernel/ directory. So move this code. This is done in preparation for some struct device_driver rework that should be confined to the driver core code only. This also lets us keep from exporting these functions, as no external code should ever be calling it. Thanks to Andrew Morton for the !CONFIG_MODULES fix. Signed-off-by: Greg Kroah-Hartman commit cbe9c595f1de2e2a98403be2c14bfbc2486e84c4 Author: Greg Kroah-Hartman Date: Wed Dec 19 15:54:39 2007 -0400 Driver: add driver_add_kobj for looney iseries_veth driver The iseries driver wants to hang kobjects off of its driver, so, to preserve backwards compatibility, we need to add a call to the driver core to allow future changes to work properly. Hopefully no one uses this function in the future and the iseries_veth driver authors come to their senses so I can remove this hack... Cc: Dave Larson Cc: Santiago Leon Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 23b9c1ab5baf368a32b7242bf110ef1f48700d04 Author: Greg Kroah-Hartman Date: Tue Dec 4 22:53:16 2007 -0800 Infiniband: make ipath driver use default driver groups. Make the ipath driver use the new driver functions so that it does not touch the sysfs portion of the driver structure. We also remove the redundant symlink from the device back to the driver, as it is already in the sysfs tree. Any userspace tools should be using the standard symlink, not some driver specific one. Cc: Roland Dreier Cc: Bryan O'Sullivan Cc: Arthur Jones Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 0478b83adb0269033221dc063d1185a224681ee8 Author: Cornelia Huck Date: Wed Dec 5 12:50:31 2007 +0100 zfcp: Use device_driver default attribute groups. CC: Swen Schillig Signed-off-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 5b88feb134e0a7413cb9cb6ba677943615ca56cc Author: Cornelia Huck Date: Wed Dec 5 12:50:28 2007 +0100 netiucv: Use device_driver default attribute groups. CC: Ursula Braun Signed-off-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 57c745340a60c51d2b9af3d4dcf7e0ede284855b Author: Cornelia Huck Date: Wed Dec 5 12:50:23 2007 +0100 driver core: Introduce default attribute groups. This is lot like default attributes for devices (and indeed, a lot of the code is lifted from there). Signed-off-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 2b937303188807b498d1a3163f60305f0941538e Author: Greg Kroah-Hartman Date: Wed Nov 28 12:23:18 2007 -0800 PCI: remove foolish code from pci-driver.c The PCI bus should not be trying to declare its own attribute type. Especially as this code could never ever be called because the driver core overwrites the driver kobject type to be its own internal type. Delete all of this code as it was never being used and is not correct. Also update my copyright on the file while I'm touching things there. Signed-off-by: Greg Kroah-Hartman commit 03d43b19b9f56c1d18bc8f2f7890534fbe6a285d Author: Greg Kroah-Hartman Date: Wed Nov 28 12:23:18 2007 -0800 PCI: use proper call to driver_create_file Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman commit 2344c6de6b6f2a4b07e4416aac9522d23e00d7bc Author: Greg Kroah-Hartman Date: Wed Nov 28 12:23:18 2007 -0800 PCMCIA: use proper call to driver_create_file Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman commit 15147ffd57576fc00a23ad8a020ff46493a4f924 Author: Greg Kroah-Hartman Date: Wed Nov 28 12:23:18 2007 -0800 USB: use proper call to driver_create_file Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman commit c6f7e72a3f4641095ade9ded287d910c980c6148 Author: Greg Kroah-Hartman Date: Thu Nov 1 19:41:16 2007 -0700 driver core: remove fields from struct bus_type struct bus_type is static everywhere in the kernel. This moves the kobject in the structure out of it, and a bunch of other private only to the driver core fields are now moved to a private structure. This lets us dynamically create the backing kobject properly and gives us the chance to be able to document to users exactly how to use the struct bus_type as there are no fields they can improperly access. Thanks to Kay for the build fixes on this patch. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b249072ee6897fe4f8d461c7bb4b926223263c28 Author: Greg Kroah-Hartman Date: Thu Nov 1 19:41:16 2007 -0700 driver core: add way to get to bus device klist This allows an easier way to get to the device klist associated with a struct bus_type (you have three to choose from...) This will make it easier to move these fields to be dynamic in a future patch. The only user of this is the PCI core which horribly abuses this interface to rearrange the order of the pci devices. This should be done using the existing bus device walking functions, but that's left for future patches. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 0fed80f7a63abd7168907267af69ee31f6bcf301 Author: Greg Kroah-Hartman Date: Thu Nov 1 19:41:16 2007 -0700 driver core: add way to get to bus kset This allows an easier way to get to the kset associated with a struct bus_type (you have three to choose from...) This will make it easier to move these fields to be dynamic in a future patch. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit cc972e896b303f453f5893ecf8eca0d0e395ab64 Author: Greg Kroah-Hartman Date: Thu Nov 1 13:31:26 2007 -0700 driver core: remove owner field from struct bus_type This isn't used by anything in the driver core, and by no one in the 204 different usages of it in the kernel tree. Remove this field so no one gets any idea that it is needed to be used. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e32cc7366d88eeba12d22272a73dd83fb570ccb0 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert net/bridge/br_if.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Stephen Hemminger Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 1eada11c88251e0a30ce5690d2607bb4293b3564 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert mm/slub.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Christoph Lameter Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit cf15126b3d4511e06e5299781ab74922590900be Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert kernel/user.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e43b9192c59402685bd1f809068dd13aa5931570 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert kernel/params.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a5815ddf26aa8208d4ad79b4fba5e6bf7d5ba688 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert fs/char_dev.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 78be3d2f574bf8a9886550ad07b8124b194badb8 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert drivers/net/iseries_veth.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kyle A. Lucke Cc: David Gibson Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 9990513c1ef040528c4e38163a073089d39c7903 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert drivers/base/core.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 60728d62e4d273776e9ef9704f9ff8e8a248a8a1 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: convert drivers/base/class.c to use kobject_init/add_ng() This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 52840bd628707979b5bbcce3c506786d3a69dba0 Author: Greg Kroah-Hartman Date: Mon Dec 17 23:05:35 2007 -0700 Kobject: the cris iop_fw_load.c code is broken This code is really really really broken. So much so that it's almost impossible to fix with a simple patch, so just comment out the offending registration with the kobject core, and mark the driver as broken. The problem is that the code is trying to register a "raw" struct device, which is not allowed. struct device is only for use within the driver model. This is being done to try to use the firmware layer which wants a struct device. To properly fix this, use something easy, like a platform device, which is a struct device and can be used for this kind of thing. Cc: Mikael Starvik Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 542eb75a27616bdde95c8d3764e0ab703579f8b5 Author: Greg Kroah-Hartman Date: Wed Dec 19 09:23:20 2007 -0800 Kobject: change arch/x86/kernel/cpu/mcheck/mce_amd_64.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Jacob Shin Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a521cf209c6e7042f85b2c5b16da3ffa8004fb7b Author: Greg Kroah-Hartman Date: Wed Dec 19 09:23:20 2007 -0800 Kobject: change arch/x86/kernel/cpu/mcheck/mce_amd_64.c to use kobject_create_and_add Make this kobject dynamic and convert it to not use kobject_register, which is going away. Cc: Jacob Shin Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 3830c62fef49f8bb1b2f353c7fb9469e3d038f5d Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/md/md.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Neil Brown Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit c199790a8bc90c91b88ad1205dee2955401cff81 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change arch/ia64/kernel/topology.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Tony Luck Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 73f368cf679babef42e54f0fe19270040ac9d4d7 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kyle McMartin Cc: Matthew Wilcox Cc: Grant Grundler Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 8dde2a96c146cc0491beec41fe3bf0477a1f15aa Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/net/ibmveth.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Dave Larson Cc: Santiago Leon Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d48b335256cd75fcb1a4abb3ce8136d8d9c931cc Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change arch/sh/kernel/cpu/sh4/sq.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 89c426066462263c90957c37af29765855516b83 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/block/pktcdvd.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Jens Axboe Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a77aa28a2db3d134dd387f0f05cd6b6717fb1d28 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/acpi/system.c to use kobject_create_and_add Stop using kobject_register for this static kobject, as it's overkill. This way is much simpler. Cc: Len Brown Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 5b3f355d8fef95901505e924818b3031092453c2 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change arch/x86/kernel/cpu/intel_cacheinfo.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Ashok Raj Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 61030bfb79148b12b661580c8e3c2adfe1d9fc9e Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/base/sys.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 64dbcac3a16d0d22045b2c80d7f208196575486a Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/pci/hotplug/pci_hotplug_core.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kristen Carlson Accardi Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 94f57f33680922197581b127b3badde7ef658258 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/cpuidle/sysfs.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Shaohua Li Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b2ed215a3338b8b16187be8d136153054118a41e Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/edac to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Acked-by: Doug Thompson Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 038c5b3e412b0b751cb4b1507506bad3c7ffefae Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/cpufreq/cpufreq.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Dominik Brodowski Cc: Ashok Raj Cc: Jacob Shin Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d6d292c451e0ffe715fff36dc3a1129868258fa3 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/firmware/efivars.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Matt Domsch Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit dd002e807486f9858147c073069a37ba625baad8 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/firmware/edd.c to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Matt Domsch Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 35be0681983752116a8161ad3b30e830963108a4 Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change drivers/infiniband to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Roland Dreier Cc: Sean Hefty Cc: Hal Rosenstock Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 901195ed7f4b2f30dc5a36271887939c5d7bfb9f Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change GFS2 to use kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Steven Whitehouse Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 43b98c4a66760d18d4056beed4078a8dbad193cc Author: Greg Kroah-Hartman Date: Mon Dec 17 15:54:39 2007 -0400 Kobject: change net/bridge to use kobject_create_and_add The kobject in the bridge code is only used for registering with sysfs, not for any lifespan rules. This patch changes it to be only a pointer and use the simpler api for this kind of thing. Cc: Stephen Hemminger Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 81e7c6a636c81d9eeaeaa732bfbace44535fab00 Author: Greg Kroah-Hartman Date: Tue Dec 4 22:41:54 2007 +0000 UIO: fix kobject usage The uio kobject code is "wierd". This patch should hopefully fix it up to be sane and not leak memory anymore. Cc: Kay Sievers Cc: Thomas Gleixner Cc: Benedikt Spranger Signed-off-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman commit 9f66fa2a4690a16da0dbaae2f44ddfc313802504 Author: Greg Kroah-Hartman Date: Wed Nov 28 23:49:41 2007 -0800 kobject: clean up debugging messages The kobject debugging messages are a mess. This provides a unified message that makes them actually useful. The format for new kobject debug messages should be: kobject: 'KOBJECT_NAME' (ADDRESS): FUNCTION_NAME: message.\n Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit cfb36fff45e3997b8044c81045fc4869ba5f281a Author: Greg Kroah-Hartman Date: Wed Nov 28 10:46:22 2007 -0800 kobject: grab the kset reference in kobject_add, not kobject_init kobject_init should not be grabing any references, but only initializing the object. This patch fixes this, and makes the lock hold-time shorter for when a kset is present in the kobject. The current kernel tree has been audited to verify that this change should be safe. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d76e15fb20eeb7632ef38876a884fe3508b2c01d Author: Greg Kroah-Hartman Date: Tue Nov 27 11:28:26 2007 -0800 driver core: make /sys/power a kobject /sys/power should not be a kset, that's overkill. This patch renames it to power_kset and fixes up all usages of it in the tree. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 37b0c020343080241984d978981d6caf877b278a Author: Greg Kroah-Hartman Date: Mon Nov 26 22:11:55 2007 -0800 driver core: clean up device_shutdown device_shutdown does not need to be in a separate file. Move it into the driver core file where it belongs. This also moves us one more step closer to making devices_kset static, now only the crazy sysdevs are keeping that from happening... Signed-off-by: Greg Kroah-Hartman commit 822a89ed1ea0f7a2d8079307426fbeeac0370138 Author: Greg Kroah-Hartman Date: Tue Nov 20 13:56:21 2007 -0800 driver core: clean up shutdown.c shutdown.c had some stuff it did not need, including a duplicate extern in the power.h file. This cleans up all of that. Signed-off-by: Greg Kroah-Hartman commit c829a5b49858a83cc7bb5e1e730796575f5bb261 Author: Greg Kroah-Hartman Date: Wed Nov 7 13:56:19 2007 -0800 kobject: convert parisc/pdc_stable to use kobject_create Using a kset for this simple directory is an overkill. Cc: Kay Sievers Cc: Thibaut VARENE Cc: Matthew Wilcox Cc: Grant Grundler Cc: Kyle McMartin Signed-off-by: Greg Kroah-Hartman commit bc87d2fe7a1190f1c257af8a91fc490b1ee35954 Author: Greg Kroah-Hartman Date: Wed Nov 7 13:56:19 2007 -0800 kobject: convert efivars to use kobject_create Using a kset for this simple directory is an overkill. Cc: Kay Sievers Cc: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit 6e90aa972dda8ef86155eefcdbdc8d34165b9f39 Author: Greg Kroah-Hartman Date: Tue Nov 6 15:08:08 2007 -0800 kobject: convert ecryptfs to use kobject_create Using a kset for this trivial directory is an overkill. Cc: Kay Sievers Cc: Mike Halcrow Cc: Phillip Hellewell Signed-off-by: Greg Kroah-Hartman commit f55842f2329f4b3a3a6bb98b005bca3cc851d38a Author: Greg Kroah-Hartman Date: Tue Nov 6 15:03:30 2007 -0800 kobject: clean up rpadlpar horrid sysfs abuse rpadlpar pci hotplug driver was doing some pretty bad stuff with the sysfs files. This cleans up the logic to be sane and gets rid of the gratuitous kset that is not needed for a simple directory like this. Note, this patch is not even build tested, let alone run-time tested. Someone with access to this hardware and can test would be greatly appreciated. Cc: Kay Sievers Cc: John Rose Cc: Badari Pulavarty Cc: Kamalesh Babulal Signed-off-by: Greg Kroah-Hartman commit 2fb9113b974c3c7c43e76647bd5077238e274e1c Author: Greg Kroah-Hartman Date: Tue Nov 6 15:03:30 2007 -0800 kobject: remove subsystem_(un)register functions These functions are no longer used and are the last remants of the old subsystem crap. So delete them for good. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 0ff21e46630abce11fdaaffabd72bbd4eed5ac2c Author: Greg Kroah-Hartman Date: Tue Nov 6 10:36:58 2007 -0800 kobject: convert kernel_kset to be a kobject kernel_kset does not need to be a kset, but a much simpler kobject now that we have kobj_attributes. We also rename kernel_kset to kernel_kobj to catch all users of this symbol with a build error instead of an easy-to-ignore build warning. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 5c03c7ab886859eb195440dbb6ccb8c30c4e84cc Author: Greg Kroah-Hartman Date: Fri Nov 2 16:19:59 2007 -0700 kset: remove decl_subsys macro This macro is no longer used. ksets should be created dynamically with a call to kset_create_and_add() not declared statically. Yes, there are 5 remaining static struct kset usages in the kernel tree, but they will be fixed up soon. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 830d3cfb16728e2496edc2985ad8f68025135e37 Author: Greg Kroah-Hartman Date: Tue Nov 6 10:36:58 2007 -0800 kset: convert block_subsys to use kset_create Dynamically create the kset instead of declaring it statically. We also rename block_subsys to block_kset to catch all users of this symbol with a build error instead of an easy-to-ignore build warning. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit c60b71787982cefcf9fa09aa281fa8c4c685d557 Author: Greg Kroah-Hartman Date: Fri Nov 2 16:19:59 2007 -0700 kset: convert ocfs2 to use kset_create Dynamically create the kset instead of declaring it statically. Also use the new kobj_attribute which cleans up this file a _lot_. Cc: Kay Sievers Cc: Mark Fasheh Cc: Kurt Hackel Signed-off-by: Greg Kroah-Hartman commit f62ed9e33b3ccff54d66b08f82d11940bb9e269b Author: Greg Kroah-Hartman Date: Mon Nov 5 13:16:15 2007 -0800 firmware: change firmware_kset to firmware_kobj There is no firmware "subsystem" it's just a directory in /sys that other portions of the kernel want to hook into. So make it a kobject not a kset to help alivate anyone who tries to do some odd kset-like things with this. Cc: Kay Sievers Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 15f2f9b3a9db65aaf908fe7ee17bbe262ae3550f Author: Greg Kroah-Hartman Date: Fri Nov 2 16:19:59 2007 -0700 firmware: remove firmware_(un)register() These functions are no longer called or needed, so we can remove them. As I rewrote the whole firmware.c file, add my copyright. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 99e0d2fc6c60ca44f56203eeda9fc0e07b508f06 Author: Greg Kroah-Hartman Date: Fri Nov 2 16:19:59 2007 -0700 kobject: convert /sys/firmware/acpi/ to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers Cc: Len Brown Signed-off-by: Greg Kroah-Hartman commit 9651d350ab2c1b9ef1875be2a9def1c375e6503f Author: Greg Kroah-Hartman Date: Fri Nov 2 16:19:59 2007 -0700 kset: convert edd to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Matt Domsch Signed-off-by: Greg Kroah-Hartman commit 000f2a4d8cfc1e1cbc0aa98136015e7ae7719b46 Author: Kay Sievers Date: Fri Nov 2 13:47:53 2007 +0100 Driver Core: kill subsys_attribute and default sysfs ops Remove the no longer needed subsys_attributes, they are all converted to the more sensical kobj_attributes. There is no longer a magic fallback in sysfs attribute operations, all kobjects which create simple attributes need explicitely a ktype assigned, which tells the core what was intended here. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 4443d07fcfab39c4d2d9d7711cff983f15b374fc Author: Greg Kroah-Hartman Date: Fri Nov 2 15:25:00 2007 -0700 kset: convert parisc/pdc_stable.c to use kset_create Dynamically create the kset instead of declaring it statically. This makes the kobject attributes now work properly that I broke in the previous patch. Cc: Kay Sievers Cc: Thibaut VARENE Cc: Matthew Wilcox Cc: Grant Grundler Cc: Kyle McMartin Signed-off-by: Greg Kroah-Hartman commit 7f548217860a7cf8a345d87792a07512450dfbff Author: Greg Kroah-Hartman Date: Fri Nov 2 15:25:00 2007 -0700 kobject: convert parisc/pdc_stable to kobj_attr interface This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. NOTE, this needs the next patch in the series in order to work properly. This will build, but the sysfs files will not properly operate. Cc: Kay Sievers Cc: Thibaut VARENE Cc: Matthew Wilcox Cc: Grant Grundler Cc: Kyle McMartin Signed-off-by: Greg Kroah-Hartman commit d91885bef25be2bab686bed082a5d82e358333b9 Author: Greg Kroah-Hartman Date: Fri Nov 2 17:17:00 2007 -0400 kset: convert s390 ipl.c to use kset_create Dynamically create the kset instead of declaring it statically. This makes the kobject attributes now work properly that I broke in the previous patch. Cc: Kay Sievers Cc: Michael Holzheu Cc: Heiko Carstens Cc: Volker Sameske Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 9b949165bd4a86c536cb92a9ce4367effbde9079 Author: Greg Kroah-Hartman Date: Fri Nov 2 17:17:00 2007 -0400 kobject: convert s390 ipl.c to kobj_attr interface This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. NOTE, this needs the next patch in the series in order to work properly. This will build, but the sysfs files will not properly operate. Thanks to Cornelia for the build fix on this patch. Cc: Kay Sievers Cc: Michael Holzheu Cc: Heiko Carstens Cc: Volker Sameske Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 79393fc46ede43451a500a132e5de9856f5a4c83 Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 kobject: convert pseries/power.c to kobj_attr interface This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. Cc: Kay Sievers Cc: Manish Ahuja Signed-off-by: Greg Kroah-Hartman commit 851324c6ffdf94976b4a925d0684a4faa993b9ca Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 kobject: convert arm/mach-omap1/pm.c to kobj_attr interface This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. Cc: Kay Sievers Cc: Cliff Brake Cc: Dirk Behme Signed-off-by: Greg Kroah-Hartman commit 66ac831e03879c3c7dae76f793e6094e407081d2 Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 kset: convert efivars to use kset_create for the vars sub-subsystem. Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit 89a07e34b16d9dcdf0a9ada3ca0c9a506b490c8f Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 kset: convert efivars to use kset_create for the efi subsystem. Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit 9e5f7f9abe18a4f134585a2de016974cbda80539 Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 firmware: export firmware_kset so that people can use that instead of the braindead firmware_register interface Needed for future firmware subsystem cleanups. In the end, the firmware_register/unregister functions will be deleted entirely, but we need this symbol so that subsystems can migrate over. Cc: Kay Sievers Cc: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit 334c6307543a2b8af730a422f466d5f9442b606a Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 kobject: convert efivars to kobj_attr interface This cleans up a lot of code and gets rid of a unneeded macro, and gets us one step closer to deleting the deprecated subsys_attr code. Cc: Kay Sievers Cc: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit 97fa5bb74c26fda93757b94ed248f5dabd4ad3d7 Author: Greg Kroah-Hartman Date: Wed Nov 7 13:56:19 2007 -0800 efivars: make new_var and del_var binary sysfs files These files should not be "normal" sysfs files as they really are binary ones. This patch makes them binary files and saves code in doing so. Cc: Kay Sievers Tested-by: Matt Domsch Cc: Matt Tolentino Signed-off-by: Greg Kroah-Hartman commit af6370ea9268443351d6e931c702dc8162a1c8a1 Author: Greg Kroah-Hartman Date: Fri Nov 2 13:20:40 2007 -0700 ecryptfs: remove version_str file from sysfs This file violates the one-value-per-file sysfs rule. If you all want it added back, please do something like a per-feature file to show what is present and what isn't. Cc: Kay Sievers Cc: Mike Halcrow Cc: Phillip Hellewell Signed-off-by: Greg Kroah-Hartman commit eb41d9465cdafee45e0cb30f3b7338646221908e Author: Kay Sievers Date: Fri Nov 2 13:47:53 2007 +0100 fix struct user_info export's sysfs interaction Clean up the use of ksets and kobjects. Kobjects are instances of objects (like struct user_info), ksets are collections of objects of a similar type (like the uids directory containing the user_info directories). So, use kobjects for the user_info directories, and a kset for the "uids" directory. On object cleanup, the final kobject_put() was missing. Cc: Dhaval Giani Cc: Srivatsa Vaddagiri Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 386f275f5d097758f867bc99ddeaeb7a03b6b190 Author: Kay Sievers Date: Fri Nov 2 13:47:53 2007 +0100 Driver Core: switch all dynamic ksets to kobj_sysfs_ops Switch all dynamically created ksets, that export simple attributes, to kobj_attribute from subsys_attribute. Struct subsys_attribute will be removed. Signed-off-by: Kay Sievers Cc: Mike Halcrow Cc: Phillip Hellewell Signed-off-by: Greg Kroah-Hartman commit 23b5212cc7422f475b82124334b64277b5b43013 Author: Kay Sievers Date: Fri Nov 2 13:47:53 2007 +0100 Driver Core: add kobj_attribute handling Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no need for special kset operations, we want to be able to use simple attribute operations at any kobject, not only ksets. The whole concept of any default sysfs attribute operations will go away with the upcoming removal of subsys_sysfs_ops. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 6dcec2511ff55b4abaca7ad3433011a7c04c2430 Author: Greg Kroah-Hartman Date: Thu Nov 1 13:31:26 2007 -0700 kset: convert struct bus_device->drivers to use kset_create Dynamically create the kset instead of declaring it statically. Having 3 static kobjects in one structure is not only foolish, but ripe for nasty race conditions if handled improperly. We also rename the field to catch any potential users of it (not that there should be outside of the driver core...) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 3d8995963dfec66ef6270e729bf75903e9043f9d Author: Greg Kroah-Hartman Date: Thu Nov 1 13:31:26 2007 -0700 kset: convert struct bus_device->devices to use kset_create Dynamically create the kset instead of declaring it statically. Having 3 static kobjects in one structure is not only foolish, but ripe for nasty race conditions if handled improperly. We also rename the field to catch any potential users of it (not that there should be outside of the driver core...) Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 039a5dcd2fc45188a2d522df630db4f7ef903a0f Author: Greg Kroah-Hartman Date: Thu Nov 1 10:39:50 2007 -0700 kset: convert /sys/power to use kset_create Dynamically create the kset instead of declaring it statically. We also rename power_subsys to power_kset to catch all users of the variable and we properly export it so that people don't have to guess that it really is present in the system. The pseries code is wierd, why is it createing /sys/power if CONFIG_PM is disabled? Oh well, stupid big boxes ignoring config options... Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7405c1e15edfe43b137bfbc5882f1af34d6d414d Author: Greg Kroah-Hartman Date: Thu Nov 1 10:39:50 2007 -0700 kset: convert /sys/module to use kset_create Dynamically create the kset instead of declaring it statically. We also rename module_subsys to module_kset to catch all users of the variable. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 081248de0a0288a0ce4e1447a07ccf56aa4fae01 Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kset: move /sys/slab to /sys/kernel/slab /sys/kernel is where these things should go. Also updated the documentation and tool that used this directory. Cc: Kay Sievers Acked-by: Christoph Lameter Signed-off-by: Greg Kroah-Hartman commit 27c3a314d55b810f3b51902d1d815c714a7afbd2 Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kset: convert slub to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Christoph Lameter Signed-off-by: Greg Kroah-Hartman commit aade4041aa60a3ed335391ba308458e26f2dbc0a Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kset: convert /sys/devices/system to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 9b477705360c16198d7a4bd73d199f5a957585b0 Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kobject: convert s390 hypervisor to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Thanks to Cornelia for the build fix. Cc: Kay Sievers Cc: Michael Holzheu Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman commit 2d72fc00a1fb055e6127ccd30cac3f0eafaa98d0 Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kobject: convert /sys/hypervisor to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. We also rename hypervisor_subsys to hypervisor_kset to catch all users of the variable. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 881c6cfd7c5edfe6129006e2404654bfe5911050 Author: Greg Kroah-Hartman Date: Thu Nov 1 09:29:06 2007 -0600 kset: convert /sys/devices to use kset_create Dynamically create the kset instead of declaring it statically. We also rename devices_subsys to devices_kset to catch all users of the variable. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b0d78e5549b44b3d64bf8b3ffe95280025ed102e Author: Greg Kroah-Hartman Date: Mon Oct 29 23:22:26 2007 -0500 kset: convert drivers/base/firmware.c to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 443dbf9007854ef2892226615e23b60a35b89697 Author: Greg Kroah-Hartman Date: Mon Oct 29 23:22:26 2007 -0500 kset: convert drivers/base/class.c to use kset_create Dynamically create the kset instead of declaring it statically. The class_obj subsystem is not yet converted as it is more complex and should be going away soon with the removal of class_device from the kernel tree. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 59a548338ac6c9d7549c54278d0f724088585928 Author: Greg Kroah-Hartman Date: Mon Oct 29 23:22:26 2007 -0500 kset: convert drivers/base/bus.c to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit bd35b93d8049ab47b5bfaf6b10ba39badf21d1c3 Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kset: convert kernel_subsys to use kset_create Dynamically create the kset instead of declaring it statically. We also rename kernel_subsys to kernel_kset to catch all users of this symbol with a build error instead of an easy-to-ignore build warning. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e5e38a86c0bbe8475543f10f0a48393a45df5182 Author: Greg Kroah-Hartman Date: Mon Oct 29 23:22:26 2007 -0500 kset: remove decl_subsys_name The last user of this macro (pci hotplug core) is now switched over to using a dynamic kset, so this macro is no longer needed at all. Cc: Kay Sievers Cc: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 81ace5cd8fcb55e144f496af40d4275b03252456 Author: Greg Kroah-Hartman Date: Mon Oct 29 23:22:26 2007 -0500 kset: convert pci hotplug to use kset_create_and_add This also renames pci_hotplug_slots_subsys to pcis_hotplug_slots_kset catch all current users with a build error instead of a build warning which can easily be missed. Cc: Kay Sievers Cc: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit d405936b322220dc5cca9d2b58ef1911ae8efec9 Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kset: convert dlm to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Steven Whitehouse Signed-off-by: Greg Kroah-Hartman commit 136a27507fd09006973f11b17ca971d4c176a06a Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kset: convert gfs2 dlm to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Steven Whitehouse Signed-off-by: Greg Kroah-Hartman commit 9bec101a0c38d559a8c95b44d850cd09a7b4edef Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kset: convert gfs2 to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Steven Whitehouse Signed-off-by: Greg Kroah-Hartman commit 00d2666623368ffd39afc875ff8a2eead2a0436c Author: Greg Kroah-Hartman Date: Mon Oct 29 14:17:23 2007 -0600 kobject: convert main fs kobject to use kobject_create This also renames fs_subsys to fs_kobj to catch all current users with a build error instead of a build warning which can easily be missed. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 917e865df7eb020f20ffc2b4204f282a587df94f Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kset: convert ecryptfs to use kset_create Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers Cc: Mike Halcrow Cc: Phillip Hellewell Signed-off-by: Greg Kroah-Hartman commit 3794491d0c4b6355c55b0379f003900e57666a97 Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kobject: convert configfs to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers Signed-off-by: Joel Becker Signed-off-by: Greg Kroah-Hartman commit 191e186bd0589e28496745275157323a6f7902ca Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kobject: convert debugfs to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 69d8e1389551b107b1a8ec70c280cb7a56096666 Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kobject: convert securityfs to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers Acked-by: Chris Wright Signed-off-by: Greg Kroah-Hartman commit 5c89e17e9c2bc03ed16320967832b33b174e6234 Author: Greg Kroah-Hartman Date: Mon Oct 29 20:13:17 2007 +0100 kobject: convert fuse to use kobject_create We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers Cc: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman commit 43968d2f1648f4dc92437dc0363a3e88377445b3 Author: Greg Kroah-Hartman Date: Mon Nov 5 22:24:43 2007 -0800 kobject: get rid of kobject_kset_add_dir kobject_kset_add_dir is only called in one place so remove it and use kobject_create() instead. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 4ff6abff832fbc6cb1d769f6106c841bc2b09f63 Author: Greg Kroah-Hartman Date: Mon Nov 5 22:24:43 2007 -0800 kobject: get rid of kobject_add_dir kobject_create_and_add is the same as kobject_add_dir, so drop kobject_add_dir. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 3f9e3ee9dc3605e5c593b5d708494571fb0d3970 Author: Greg Kroah-Hartman Date: Mon Nov 5 13:16:15 2007 -0800 kobject: add kobject_create_and_add function This lets users create dynamic kobjects much easier. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b727c702896f88d2ff6c3e03bd011d7c3dffe3e1 Author: Greg Kroah-Hartman Date: Thu Sep 27 14:48:53 2007 -0700 kset: add kset_create_and_add function Now ksets can be dynamically created on the fly, no static definitions are required. Thanks to Miklos for hints on how to make this work better for the callers. And thanks to Kay for finding some stupid bugs in my original version and pointing out that we need to handle the fact that kobject's can have a kset as a parent and to handle that properly in kobject_add(). Cc: Kay Sievers Cc: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman commit 12d03da7c19366268bdbc9fb0cd08d719c0cc283 Author: Greg Kroah-Hartman Date: Tue Oct 16 10:11:44 2007 -0600 kobject: remove kobj_set_kset_s as no one is using it anymore What a confusing name for a macro... Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 3514faca19a6fdc209734431c509631ea92b094e Author: Greg Kroah-Hartman Date: Tue Oct 16 10:11:44 2007 -0600 kobject: remove struct kobj_type from struct kset We don't need a "default" ktype for a kset. We should set this explicitly every time for each kset. This change is needed so that we can make ksets dynamic, and cleans up one of the odd, undocumented assumption that the kset/kobject/ktype model has. This patch is based on a lot of help from Kay Sievers. Nasty bug in the block code was found by Dave Young Cc: Kay Sievers Cc: Dave Young Signed-off-by: Greg Kroah-Hartman commit c11c4154e7ff4cebfadad849b1e22689d759c3f4 Author: Greg Kroah-Hartman Date: Mon Dec 3 21:31:08 2007 -0800 kobject: add kobject_init_and_add function Also add a kobject_init_and_add function which bundles up what a lot of the current callers want to do all at once, and it properly handles the memory usages, unlike kobject_register(); Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 244f6cee9a928103132a722292bfa0eb84114b07 Author: Greg Kroah-Hartman Date: Mon Dec 3 21:31:08 2007 -0800 kobject: add kobject_add_ng function This is what the kobject_add function is going to become. Add this to the kernel and then we can convert the tree over to use it. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit e86000d042d23904bbb609af2f8618a541cf129b Author: Greg Kroah-Hartman Date: Mon Dec 3 21:31:08 2007 -0800 kobject: add kobject_init_ng function This is what the kobject_init function is going to become. Add this to the kernel and then we can convert the tree over to use it. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 18041f4775688af073d9b3ab0ffc262c1847e60b Author: Greg Kroah-Hartman Date: Mon Dec 3 21:31:08 2007 -0800 kobject: make kobject_cleanup be static No one except the kobject core calls it so make the function static. Signed-off-by: Greg Kroah-Hartman commit 663a47430b361f863b515752a97166a7a4b92d35 Author: Greg Kroah-Hartman Date: Thu Nov 29 18:32:47 2007 -0500 kobject: fix up kobject_set_name to use kvasprintf Kay pointed out that kobject_set_name was being very stupid, doing two allocations for every call, when it should just be using the kernel function kvasprintf() instead. This change adds the internal kobject_set_name_vargs() function, which other follow-on patches will be using. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 15f2bbb28e96e20149548926e5b08551ba140b14 Author: Greg Kroah-Hartman Date: Mon Dec 3 21:16:20 2007 -0700 kobject: convert icom to use kref, not kobject The IBM icom serial driver is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Ryan S. Arnold Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit f7eb12c626d4375faf03039261546bd19c1325fd Author: Greg Kroah-Hartman Date: Wed Nov 28 10:46:22 2007 -0800 kobject: convert hvcs to use kref, not kobject hvcs is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Ryan S. Arnold Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 12b20ded6f980d9161b1c6b062560b65a7295e1c Author: Greg Kroah-Hartman Date: Wed Nov 28 10:46:22 2007 -0800 kobject: convert hvc_console to use kref, not kobject hvc_console is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Ryan S. Arnold Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a045171f875cd61f690981a78ab98fbd137c938b Author: Greg Kroah-Hartman Date: Mon Dec 3 21:16:20 2007 -0700 kobject: convert ibmasm to use kref, not kobject The IBM asm driver is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Max Asböck Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d7b37889650bb316f5c4ad4b0569ba897120d70d Author: Jiri Slaby Date: Wed Nov 21 14:55:19 2007 -0800 sysfs: remove SPIN_LOCK_UNLOCKED SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Cc: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit 2f90a851800e88436873c8d27238cf219b9ef48e Author: Kay Sievers Date: Thu Nov 1 20:20:52 2007 +0100 sysfs: create optimal relative symlink targets Instead of walking from the source down to the root of sysfs, and back to the target, we stop at the first directory the source and the target share. This link: /devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/ep_81 pointed to: ../../../../../devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0/usb_endpoint/usbdev2.1_ep81 now it just points to: usb_endpoint/usbdev1.1_ep81 Thanks to Denis Cheng for bringing this up, and sending the initial patch. CC: Denis Cheng Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7b8712e563df4fefc25d3107fa3fb3abb7331ff4 Author: Emil Medve Date: Tue Oct 30 14:37:14 2007 -0500 driver core: Make the dev_*() family of macros in device.h complete Removed duplicates defined elsewhere Signed-off-by: Emil Medve Signed-off-by: Greg Kroah-Hartman commit 30a468b1c1b9911ae515ff8972ee10c50cca3021 Author: Greg Kroah-Hartman Date: Mon Oct 15 15:01:24 2007 -0700 ecryptfs: clean up attribute mess It isn't that hard to add simple kset attributes, so don't go through all the gyrations of creating your own object type and show and store functions. Just use the functions that are already present. This makes things much simpler. Note, the version_str string violates the "one value per file" rule for sysfs. I suggest changing this now (individual files per type supported is one suggested way.) Cc: Michael A. Halcrow Cc: Michael C. Thompson Cc: Tyler Hicks Signed-off-by: Greg Kroah-Hartman commit 02ff82cac7ee7351d2649c4a3568f12e4e0fe534 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 cosa: Convert from class_device to device for cosa sync driver struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: Jan "Yenya" Kasprzak Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7dd817d083b6fc103b9ea4f2b4f4a1c6a09e29a0 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 tifm: Convert from class_device to device for TI flash media Signed-off-by: Tony Jones Cc: Alex Dubov Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 6013c12be8313b3205b41912d965b03f3b06147d Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 pktcdvd: Convert from class_device to device for block/pktcdvd struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: Peter Osterlund Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit aa2758261469374b598e2a6a2702e000a6ab2fbb Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 paride: Convert from class_device to device for block/paride struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: Tim Waugh Cc: Jens Axboe Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a98894ab02bc9a3e2dc8cccab55d7ed200d3b05f Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 mtd: Convert from class_device to device for MTD/mtdchar struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: David Woodhouse Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 0c55445f201841bfd6c658c47df8311b6722f002 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 MCP_UCB1200: Convert from class_device to device struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: Russell King Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 68db2bc98cc1594a1cc487755aff4340fd4f1611 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 adb: Convert from class_device to device struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones Cc: Joshua Thompson Cc: Benjamin Herrenschmidt Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit d78b03683a6f96645d265abdd5c556547dc76d70 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 ISDN: Convert from class_device to device for ISDN capi Signed-off-by: Tony Jones Cc: Kay Sievers Acked-by: Karsten Keil Signed-off-by: Greg Kroah-Hartman commit dbc1272ed4a9ce45ecc50e7ea7d52e7413eb1a4f Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 IDE: Convert from class_device to device for ide-tape Signed-off-by: Tony Jones Cc: Gadi Oxman Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 891f78ea833edd4a1e524e15bfe297a7a84d81a0 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 DMA: Convert from class_device to device for DMA engine Signed-off-by: Tony Jones Signed-off-by: Dan Williams Cc: Shannon Nelson Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 62ca8792560e5bd7dc09f54ed3523a7864f416c7 Author: Kay Sievers Date: Tue Sep 25 02:03:03 2007 +0200 coda: convert struct class_device to struct device Signed-off-by: Kay Sievers Cc: Tony Jones Cc: Jan Harkes Signed-off-by: Greg Kroah-Hartman commit 7ea7ed01ff741918532978b30f6f226ed6f78476 Author: Tony Jones Date: Tue Sep 25 02:03:03 2007 +0200 aoechr: Convert from class_device to device Signed-off-by: Tony Jones Cc: Jens Axboe Cc: Sam Hopkins Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 41ca28ab2abd76dc203e2c3a7cd609607cb927c3 Author: Evgeniy Polyakov Date: Mon Dec 10 23:03:43 2007 +0300 kref: add kref_set() This adds kref_set() to the kref api for future use by people who really know what they are doing with krefs... From: Evgeniy Polyakov Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 775b64d2b6ca37697de925f70799c710aab5849a Author: Rafael J. Wysocki Date: Sat Jan 12 20:40:46 2008 +0100 PM: Acquire device locks on suspend This patch reorganizes the way suspend and resume notifications are sent to drivers. The major changes are that now the PM core acquires every device semaphore before calling the methods, and calls to device_add() during suspends will fail, while calls to device_del() during suspends will block. It also provides a way to safely remove a suspended device with the help of the PM core, by using the device_pm_schedule_removal() callback introduced specifically for this purpose, and updates two drivers (msr and cpuid) that need to use it. Signed-off-by: Alan Stern Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit 7a83d456a86d559a6347115d206d23774bc152d9 Author: Greg Kroah-Hartman Date: Wed Oct 24 21:52:56 2007 -0700 kobject: remove incorrect comment in kobject_rename As pointed out by Kay. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit b1c7192df1b089ed654c76fbf14d7f7dbf4b9616 Author: Robert P. J. Day Date: Wed Nov 7 04:09:46 2007 -0500 Documentation: Replace obsolete "driverfs" with "sysfs". Signed-off-by: Robert P. J. Day commit 20fd1e3bea554620d489f3542496639c1babe0b3 Author: Frank Seidel Date: Fri Nov 9 14:49:23 2007 +0100 nozomi driver This is a driver to control the cardbus wireless data card that works on 3g networks. Greg Kroah-Hartman did the initial driver cleanup. Thanks to Arnaud Patard for help with bugfixing. Thanks to Alan Cox for a lot of tty fixes. Thanks to Satyam Sharma for fixing buildbreakage. Thanks to Frank Seidel for a lot of bugfixes and rewriting to make it a sane Linux driver Thanks to Jiri Slaby for a lot bugfixes, cleanups and rewrites that make it much more readable. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Frank Seidel Signed-off-by: Jiri Slaby commit 9fd5b1c906a9b4b0efb24cb2b4d20c678ff26122 Author: Jean Delvare Date: Tue Jan 8 18:11:24 2008 +0100 sysfs: Fix a copy-n-paste typo in comment Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 463e526083fdaa284eaea45b53bb917ed3c72900 Author: Zhang Le Date: Tue Jan 8 00:59:16 2008 +0800 Chinese: add translation of Codingstyle Signed-off-by: Zhang Le Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 22033d38bca82a4a511450562086c69f5dc457ee Author: Li Yang Date: Wed Oct 24 01:04:21 2007 +0800 Chinese: add translation of sparse.txt Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit c642ecf874028c9f41d18d59a9d663c2a954cc45 Author: Bryan Wu Date: Wed Oct 24 01:00:23 2007 +0800 Chinese: add translation of volatile-considered-harmful.txt Signed-off-by: Bryan Wu Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 6941ee8896bfc462c3e3ad113c769a57ecbf3b2a Author: TripleX Chung Date: Wed Oct 24 00:57:24 2007 +0800 Chinese: add translation of stable_kernel_rules.txt Signed-off-by: TripleX Chung Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit d1a1d45142ed3969b3cc3964f81e4249f9e49fbf Author: Dave Young Date: Wed Oct 24 01:14:29 2007 +0800 Chinese: add translation of oops-tracing.txt Signed-off-by: Dave Young Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 09792200e465db0861dee25bdecfc55278907ed3 Author: Li Yang Date: Wed Oct 24 00:51:11 2007 +0800 Chinese: add translation of SubmittingDrivers Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 12428e7626378dec7968cd4f5df9aab2ee58e735 Author: TripleX Chung Date: Wed Oct 24 00:46:43 2007 +0800 Chinese: add translation of SubmittingPatches Signed-off-by: TripleX Chung Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 5dae82cc186da487cf33d7f5648a9ab3e02eaee4 Author: Li Yang Date: Tue Oct 23 21:58:51 2007 +0800 Chinese: Change man-pages maintainer address in HOWOTO The email address of the man-pages maintainer has changed. Cc: Michael Kerrisk Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 24277db3894941026662743e400e77c68c4a9e92 Author: Li Yang Date: Wed Jul 25 02:43:32 2007 +0800 Chinese: rephrase English introduction in HOWTO Rephrase the introduction as suggested by Jesper Juhl. Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 6b2cb91efce215c3c34b1b79b15f30e860761a3e Author: Li Yang Date: Wed Jul 25 02:03:06 2007 +0800 Chinese: Add the known_regression URI to the HOWTO Update translation for commit be3884943674f8ee7656b1d8b71c087ec900c836. Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 6d5ae0deb1641bf615eafd8fef64218e10cb2fd0 Author: Igor Mammedov Date: Fri Jan 25 03:28:31 2008 +0000 [CIFS] DFS support: provide shrinkable mounts Signed-off-by: Igor Mammedov Signed-off-by: Steve French commit 2e08c0c1c3977a5ddc88887dd3af1b26c433e9d0 Author: Eamon Walsh Date: Thu Jan 24 15:30:52 2008 -0500 selinux: make mls_compute_sid always polyinstantiate This patch removes the requirement that the new and related object types differ in order to polyinstantiate by MLS level. This allows MLS polyinstantiation to occur in the absence of explicit type_member rules or when the type has not changed. Potential users of this support include pam_namespace.so (directory polyinstantiation) and the SELinux X support (property polyinstantiation). Signed-off-by: Eamon Walsh Acked-by: Stephen Smalley Signed-off-by: James Morris commit 1996a10948e50e546dc2b64276723c0b64d3173b Author: Jan Engelhardt Date: Wed Jan 23 00:02:58 2008 +0100 security/selinux: constify function pointer tables and fields Constify function pointer tables and fields. Signed-off-by: Jan Engelhardt Signed-off-by: James Morris commit 63cb34492351078479b2d4bae6a881806a396286 Author: David Howells Date: Tue Jan 15 23:47:35 2008 +0000 security: add a secctx_to_secid() hook Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. Signed-off-by: Paul Moore Acked-by: Stephen Smalley Signed-off-by: James Morris commit c43e259cc756ece387faae849af0058b56d78466 Author: James Morris Date: Sat Jan 12 22:05:48 2008 +1100 security: call security_file_permission from rw_verify_area All instances of rw_verify_area() are followed by a call to security_file_permission(), so just call the latter from the former. Acked-by: Eric Paris Signed-off-by: James Morris commit bced95283e9434611cbad8f2ff903cd396eaea72 Author: H. Peter Anvin Date: Sat Dec 29 16:20:25 2007 -0800 security: remove security_sb_post_mountroot hook The security_sb_post_mountroot() hook is long-since obsolete, and is fundamentally broken: it is never invoked if someone uses initramfs. This is particularly damaging, because the existence of this hook has been used as motivation for not using initramfs. Stephen Smalley confirmed on 2007-07-19 that this hook was originally used by SELinux but can now be safely removed: http://marc.info/?l=linux-kernel&m=118485683612916&w=2 Cc: Stephen Smalley Cc: James Morris Cc: Eric Paris Cc: Chris Wright Signed-off-by: H. Peter Anvin Signed-off-by: James Morris commit 42d7896ebc5f7268b1fe6bbd20f2282e20ae7895 Author: James Morris Date: Wed Dec 26 15:12:37 2007 +1100 Security: remove security.h include from mm.h Remove security.h include from mm.h, as it is only needed for a single extern declaration, and pulls in all kinds of crud. Fine-by-me: David Chinner Acked-by: Eric Paris Signed-off-by: James Morris commit 88c3f7a8f2c86be264d326cf6f49a3e8c30d13a6 Author: Richard Knutsson Date: Sat Dec 8 12:02:48 2007 +0100 Security: remove security_file_mmap hook sparse-warnings (NULL as 0). Fixing: CHECK mm/mmap.c mm/mmap.c:1623:29: warning: Using plain integer as NULL pointer mm/mmap.c:1623:29: warning: Using plain integer as NULL pointer mm/mmap.c:1944:29: warning: Using plain integer as NULL pointer Signed-off-by: Richard Knutsson Signed-off-by: James Morris commit c9180a57a9ab2d5525faf8815a332364ee9e89b7 Author: Eric Paris Date: Fri Nov 30 13:00:35 2007 -0500 Security: add get, set, and cloning of superblock security information Adds security_get_sb_mnt_opts, security_set_sb_mnt_opts, and security_clont_sb_mnt_opts to the LSM and to SELinux. This will allow filesystems to directly own and control all of their mount options if they so choose. This interface deals only with option identifiers and strings so it should generic enough for any LSM which may come in the future. Filesystems which pass text mount data around in the kernel (almost all of them) need not currently make use of this interface when dealing with SELinux since it will still parse those strings as it always has. I assume future LSM's would do the same. NFS is the primary FS which does not use text mount data and thus must make use of this interface. An LSM would need to implement these functions only if they had mount time options, such as selinux has context= or fscontext=. If the LSM has no mount time options they could simply not implement and let the dummy ops take care of things. An LSM other than SELinux would need to define new option numbers in security.h and any FS which decides to own there own security options would need to be patched to use this new interface for every possible LSM. This is because it was stated to me very clearly that LSM's should not attempt to understand FS mount data and the burdon to understand security should be in the FS which owns the options. Signed-off-by: Eric Paris Acked-by: Stephen D. Smalley Signed-off-by: James Morris commit 19c5fc198c369bb00f3ed9716ef40648865d8d94 Author: Joe Perches Date: Mon Nov 19 17:53:44 2007 -0800 security/selinux: Add missing "space" Add missing space. Signed-off-by: Joe Perches Signed-off-by: James Morris commit 5c5e32ceeb6b64496a1842d5d99e4ac8d20166c4 Author: Miklos Szeredi Date: Thu Jan 24 16:13:21 2008 -0600 mount options: fix jfs Add iocharset= and errors= options to /proc/mounts for jfs filesystems. Signed-off-by: Miklos Szeredi Signed-off-by: Dave Kleikamp commit a3d2c2e8f5e01e185013d8f944c0a26fdc558ad8 Author: FUJITA Tomonori Date: Wed Jan 23 23:34:35 2008 +0900 [SCSI] ch: handle class_device_create failure properly When class_device_create fails, ch_probe needs to fail too. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit a43cf0f3511585493e3c948f7ec62f659486d0b3 Author: Randy Dunlap Date: Tue Jan 22 21:39:33 2008 -0800 [SCSI] NCR5380: fix section mismatch Many release() methods that are not __exit or __devexit call this __devexit function, so remove its "__devexit" attribute. scsi/g_NCR5380.c: WARNING: vmlinux.o(.text+0xadaf8c): Section mismatch: reference to .exit.text:NCR5380_exit (between 'generic_NCR5380_release_resources' and 'generic_NCR5380_biosparam') WARNING: vmlinux.o(.text+0xadd18c): Section mismatch: reference to .exit.text:NCR5380_exit (between 'generic_NCR5380_release_resources' and 'generic_NCR5380_biosparam') scsi/pas16.c, seagate.c: WARNING: vmlinux.o(.text+0xb29e91): Section mismatch: reference to .exit.text:NCR5380_exit (between 'pas16_release' and 'seagate_st0x_info') t128.c: WARNING: vmlinux.o(.text+0xb2a774): Section mismatch: reference to .exit.text:NCR5380_exit (between 't128_release' and 't128_biosparam') dtc.c, sym2/sym_fw.c: WARNING: vmlinux.o(.text+0xb2f215): Section mismatch: reference to .exit.text:NCR5380_exit (between 'dtc_release' and 'sym_fw1_patch') Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit 53474c042c0e1be39557474c945ad4a8e653ad46 Author: Tony Battersby Date: Tue Jan 22 15:25:49 2008 -0500 [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices The patch "[SCSI] sg: use idr to replace static arrays" in 2.6.24-rc1 causes a bogus line to appear in /proc/scsi/sg/devices containing "-1 -1 -1 -1 -1 -1 -1 -1 -1" when there are no SCSI devices in the system. In 2.6.23, /proc/scsi/sg/devices is empty when there are no SCSI devices in the system. A similar problem exists with /proc/scsi/sg/device_strs. The following patch restores the behavior of 2.6.23. Signed-off-by: Tony Battersby Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit 90c18f3c280f80e0bfbab7c1fc4b282842ccb853 Author: Erez Zilber Date: Tue Jan 22 12:06:25 2008 +0200 [SCSI] IB/iSER: add logical unit reset support eh_device_reset_handler was already added to scsi_host_template in iscsi_tcp, and is now added also for iscsi_iser. Signed-off-by: Erez Zilber Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 5b7f16804ad90e7f7a10c05b6a2e782598d9745a Author: James Bottomley Date: Sun Jan 20 09:28:24 2008 -0600 [SCSI] don't use __GFP_DMA for sense buffers if not required Only hosts which actually have ISA DMA requirements need sense buffers coming out of ZONE_DMA, so only use the __GFP_DMA flag for that case to avoid allocating this scarce resource if it's not necessary. [tomo: fixed slab leak in failure case] Acked-by: FUJITA Tomonori Signed-off-by: James Bottomley commit de25deb18016f66dcdede165d07654559bb332bc Author: FUJITA Tomonori Date: Wed Jan 16 13:32:17 2008 +0900 [SCSI] use dynamically allocated sense buffer This removes static array sense_buffer in scsi_cmnd and uses dynamically allocated sense_buffer (with GFP_DMA). The reason for doing this is that some architectures need cacheline aligned buffer for DMA: http://lkml.org/lkml/2007/11/19/2 The problems are that scsi_eh_prep_cmnd puts scsi_cmnd::sense_buffer to sglist and some LLDs directly DMA to scsi_cmnd::sense_buffer. It's necessary to DMA to scsi_cmnd::sense_buffer safely. This patch solves these issues. __scsi_get_command allocates sense_buffer via kmem_cache_alloc and attaches it to a scsi_cmnd so everything just work as before. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit b30c2fc1113edfb2371427c10503ff942b0a0370 Author: James Bottomley Date: Sun Jan 20 09:09:40 2008 -0600 [SCSI] scsi.h: add macro for enclosure bit of inquiry data The macro tells us whether the device is (or contains) an enclosure device. Signed-off-by: James Bottomley commit a0899d4df534d2bcf671b0f647b809842309a9ae Author: Hans de Goede Date: Sun Jan 20 11:12:26 2008 +0100 [SCSI] sd: add fix for devices with last sector access problems This patch adds a new scsi_device flag (last_sector_bug) for devices which contain a bug where the device crashes when the last sector is read in a larger then 1 sector read. This is for example the case with sdcards in the HP PSC1350 printer cardreader and in the HP PSC1610 printer cardreader. Signed-off-by: Hans de Goede Signed-off-by: James Bottomley commit b523381e325366cc54a2548df418c2a427b2f2ee Author: James Bottomley Date: Fri Jan 18 17:47:56 2008 -0600 [SCSI] fix pcmcia compile problem This patch commit 8ae732a91df051aba6820068a47b631a06599d84 Author: Tejun Heo Date: Fri Dec 7 22:36:23 2007 +0900 [SCSI] make pcmcia directory use obj-y|m instead of subdir-y|m Moved the scsi Makefile into conformance, but also caused the pcmcia subdirectory to get built in for the first time, leading to duplicate symbols in an allyesconfig build. Since evidently no-one relies on these being built in, fix this by ensuring they can only be built as modules. Acked-by: Tejun Heo Signed-off-by: James Bottomley commit cb1042f285c2168bd8cf10aca0e24802e682252b Author: Salyzyn, Mark Date: Thu Jan 17 09:25:07 2008 -0800 [SCSI] aacraid: add Voodoo Lite class of cards. The cards being added are supported in a limited sense already through family matching, but we needed to add some functionality to the driver to expose selectively the physical drives. These Physical drives are specifically marked to not be part of any array and thus are declared JBODs (Just a Bunch Of Drives) for generic SCSI access. We report that this is the second patch in a set of two, but merely depends on the stand-alone functionality of the first patch which adds in that case the ability to report a driver feature flag via sysfs. We leverage that functionality by reporting that this driver now supports this new JBOD feature for the controller so that the array management applications may react accordingly and guide the user as they manage the controller. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 2ca39c48ea0d2fd265479d0b62f2ac8878900360 Author: Salyzyn, Mark Date: Thu Jan 17 09:24:56 2008 -0800 [SCSI] aacraid: add new driver features flags Feature enhancement, adding a 'flags' entry that will reside in the host controller's tree, with a newline separated list of arbitrary ascii named features that indicate whether the combination of driver and controller has support for said feature. Breaking from the one-line output typical of sysfs entries, newline was added to tailor for grep, or simple gets line by line string match within an application. I added one for a compiler time check for existence of debug print output, one for an optional manifest defined enhanced status reporting in the logs, and one for runtime reporting whether the controller and driver supports arrays larger than 2TB. Adaptec's storage management software uses the last flag to determine whether to make available the creation of arrays larger than 2TB, otherwise a warning is posted. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 0c27f5bd00aba65a2a3313859ebce1c77c90000e Author: Andrew Vasquez Date: Thu Jan 17 09:02:20 2008 -0800 [SCSI] qla2xxx: Update version number to 8.02.00-k7. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit c48339decceec8e011498b0fc4c7c7d8b2ea06c1 Author: Seokmann Ju Date: Thu Jan 17 09:02:19 2008 -0800 [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. There is a case where 54xx HBA loads MID firmware as it use 24xx firmware. In this case, the driver should issue MBC_MID_INITIALIZE FIRMWARE even though the HBA doesn't support NPIV. This patch make changes in the driver so that could behave accordingly. Signed-off-by: Seokmann Ju Signed-off-by: James Bottomley commit fc44765f5a232d451fa58a04606b254ac257b429 Author: Andrew Vasquez Date: Thu Jan 17 09:02:18 2008 -0800 [SCSI] qla2xxx: Correct late-memset() of EFT buffer. Original code would clear the buffer after the firmware had already been initialized to use the buffer, thus potentially and inadvertantly clearing data previously DMA'd by the firmware. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit df613b96077cee826b14089ae6e75eeabf71faa3 Author: Andrew Vasquez Date: Thu Jan 17 09:02:17 2008 -0800 [SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support. FCE support enables the firmware to record FC extended link services and basic link services frames which have been transmitted and received by the ISP. This allows for a limited view of the FC traffic through the ISP without using a FC analyzer. This can be useful in situations where a physical connection to the FC bus is not possible. The driver exports this information in two ways -- first, via a debugfs node exported for all supported ISPs under: /qla2xxx/qla2xxx_/fce where a read of the 'fce' file will provide a snapshot of the firmware's FCE buffer; and finally, the FCE buffer will be extracted during a firmware-dump scenario. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 00b6bd25166e2a4bad23c614c10c55993bb2489e Author: Andrew Vasquez Date: Thu Jan 17 09:02:16 2008 -0800 [SCSI] qla2xxx: Trace-Control naming cleanups. In preparation for FCE (Fibre Channel Event) tracing support. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit a824ebb37c1a1c5fd8e19b47bf5c14cb7b419b48 Author: Adrian Bunk Date: Thu Jan 17 09:02:15 2008 -0800 [SCSI] qla2xxx: Code cleanups. - make the following needlessly global code static: - qla_attr.c: qla24xx_vport_delete() - qla_attr.c: qla24xx_vport_disable() - qla_mid.c: qla24xx_allocate_vp_id() - qla_mid.c: qla24xx_find_vhost_by_name() - qla_mid.c: qla2x00_do_dpc_vp() - qla_os.c: struct qla2x00_driver_template - qla_os.c: qla2x00_stop_timer() - qla_os.c: qla2x00_mem_alloc() - qla_os.c: qla2x00_mem_free() - qla_sup.c: qla2x00_lock_nvram_access() - qla_sup.c: qla2x00_unlock_nvram_access() - qla_sup.c: qla2x00_get_nvram_word() - qla_sup.c: qla2x00_write_nvram_word() - #if 0 the following unused global functions: - qla_mbx.c: qla2x00_system_error() - qla_os.c: remove some unneeded function prototypes - removed unused functions: - qla_dbg.c: qla2x00_dump_pkt() - qla_mbx.c: qla2x00_get_serdes_params() - qla_mbx.c: qla2x00_get_idma_speed() - qla_mbx.c: qla24xx_get_vp_database() - qla_mbx.c: qla24xx_get_vp_entry() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Small modifications and Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 50db6b134c31351a03cec9d2a7f9e61f63a5ce9f Author: Seokmann Ju Date: Thu Jan 17 09:02:14 2008 -0800 [SCSI] qla2xxx: Add a filter to compare port_name against the physical on vport creation. During vport creation, there was a possibility to get create a vport with same port_name as pport. A new filter has added to compare given port_name with the port_name of the pport. Signed-Off-by: Seokmann Ju Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 0b05a1f0d68bf4714c37aa7843c31df1866b017a Author: Marcus Barrow Date: Thu Jan 17 09:02:13 2008 -0800 [SCSI] qla2xxx: Use completion routines. Instead of abusing the semaphore interfaces for mailbox command completions. Additional cleanups and Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit a4722cf24d7a0dfa0874d49f61b053a6459761bf Author: Andrew Vasquez Date: Thu Jan 17 09:02:12 2008 -0800 [SCSI] qla2xxx: Don't schedule the DPC routine to perform an issue-lip request. As the driver depends on the DPC routine to handle bottom-half loop resynchronization in order to recover from the issue-lip request. The issue_lip call is sleeping context capable, so just issue the reset function there. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit da7429f9ab5ba939cec37d07ef7f6a630fe48421 Author: Andrew Vasquez Date: Thu Jan 17 09:02:11 2008 -0800 [SCSI] qla2xxx: Restrict MSI/MSI-X enablement on select ISP2432-type HBAs. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 6f13fd57cd84c06cea6c4b6d61517a4350820a9f Author: Andrew Vasquez Date: Thu Jan 17 09:02:10 2008 -0800 [SCSI] qla2xxx: Wait for FLASH write-protection to complete after a write. Some flash parts have a slow enable write-protection (WP) operation whereby subsequent FLASH accesses would fail if the WP operation had not completed. Software now polls the SPI's status-register for WP completion. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 3776541d8a46347a4924353a192c6ce4a3d04e2e Author: Andrew Vasquez Date: Thu Jan 17 09:02:09 2008 -0800 [SCSI] qla2xxx: Fix for 32-bit platforms with 64-bit resources. The driver stores the contents of PCI resources into unsigned long's before ioremapping. This breaks on 32-bit platforms which support 64-bit MMIO resources. Correct code by removing the temporary variables used during MMIO PIO mapping and using resource_size_t where applicable. Also correct a small typo in a printk() where the wrong region number was displayed. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 43ef058010c79a967195539bbcdeee8c5b24219d Author: Andrew Vasquez Date: Thu Jan 17 09:02:08 2008 -0800 [SCSI] qla2xxx: Retrieve additional HBA port statistics from recent ISPs. HBAs supporting these additional counters include ISP24xx and ISP25xx type boards. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 4733fcb1fe4d64402a8bd18cec766e8b8ad25eee Author: Andrew Vasquez Date: Thu Jan 17 09:02:07 2008 -0800 [SCSI] qla2xxx: Consolidate duplicate sense-data handling codes. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit fd66c1b4e491a2a17d7a420fa38fd04b0e8d36c1 Author: Kai Makisara Date: Thu Jan 17 22:45:22 2008 +0200 [SCSI] st: convert to unlocked_ioctl Convert st to unlocked_ioctl. The necessary locking was already in place. Signed-off-by: Kai Makisara Signed-off-by: James Bottomley commit 8ce3eca4dc8161e030a055bde94cde28476e0894 Author: Salyzyn, Mark Date: Wed Jan 16 07:39:06 2008 -0800 [SCSI] aacraid: remove pigs in space I was amazed at how much embedded space was present in the aacraid driver source files. Just selected five files from the set to clean up for now and the attached patch swelled to 73K in size! - Removed trailing space or tabs - Removed spaces embedded within tabs - Replaced leading 8 spaces with tabs - Removed spaces before ) - Removed ClusterCommand as it was unused (noticed it as one triggered by above) - Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION. - Replaced a long series of spaces with tabs - Replaced some simple if...defined() with ifdef/ifndef Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit d07e03610ca1f4be373f32ad5b25ac00dbdb867d Author: FUJITA Tomonori Date: Tue Jan 15 13:18:00 2008 +0900 [SCSI] sg: handle class_device_create failure properly Signed-off-by: FUJITA Tomonori Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit a24484f281dda11e4fc0041a51907d3564da3d7f Author: FUJITA Tomonori Date: Tue Jan 15 13:17:47 2008 +0900 [SCSI] sg: set class_data after success If cdev_add fails in sg_add, sg_remove crashes since class_data is bogus. Signed-off-by: FUJITA Tomonori Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit d814c5173c671cf2c88d4e07db01b13312467ecd Author: Salyzyn, Mark Date: Mon Jan 14 11:04:40 2008 -0800 [SCSI] dpt_i2o: use constant instead of bare value 0x02 becomes SAM_STAT_CHECK_CONDITION Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit f7fea185d2998dc4c902ec47834ab6db28fe0029 Author: Mathieu Segaud Date: Mon Jan 14 15:43:18 2008 +0100 [SCSI] ch: Convert to use unlocked_ioctl As of now, compat_ioctl already runs without the BKL, whereas ioctl runs with the BKL. This patch first converts changer_fops to use a .unlocked_ioctl member. It applies the same locking rationale than ch_ioctl_compat() uses to ch_ioctl(). Signed-off-by: Mathieu Segaud Reviewed-by: Matthew Wilcox Signed-off-by: James Bottomley commit eaa3e22e8d32bf7a6176f04efad90f4a5aa67f58 Author: Andi Kleen Date: Sun Jan 13 17:41:43 2008 +0100 [SCSI] sg: Only print SCSI data direction warning once for a command When I use cdparanoia my logs get spammed a lot by printk: 464 messages suppressed. sg_write: data in/out 30576/30576 bytes for SCSI command 0xbe--guessing data in; program cdparanoia not setting count and/or reply_len properly printk: 1078 messages suppressed. and many more of those. With this patch the message is only printed once for a command in a row. v1->v2: Prevent rate limit messages too (pointed out by jejb) Signed-off-by: Andi Kleen Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit d496f94d22d1491ffb25f4000e85f7a4ecf7f2c4 Author: Alan Cox Date: Wed Nov 7 23:58:10 2007 +0000 [SCSI] aacraid: fix security weakness Actually there are several but one is trivially fixed 1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list but needs to 2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB 3. It is possible to construct an attack via the SRB ioctls where the user obtains assorted elevated privileges. Various approaches are possible, the trivial ones being things like writing to the raw media via scsi commands and the swap image of other executing programs with higher privileges. So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating ones. This is a bandaid fix for #3 but probably the ioctls should grow their own capable checks. The other two bugs need someone competent in that driver to fix them. Signed-off-by: Alan Cox Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 3ace426f9575dd112252d72baaee4554fcb2e450 Author: Salyzyn, Mark Date: Mon Jan 14 07:25:33 2008 -0800 [SCSI] aacraid: replace ' Signed-off-by: James Bottomley commit b80ca4f7ee36c26d300c5a8f429e73372d153379 Author: FUJITA Tomonori Date: Sun Jan 13 15:46:13 2008 +0900 [SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 94aa5e5f6251ca0e1d77e083f8c2f9f40ee548c5 Author: FUJITA Tomonori Date: Sun Jan 13 15:46:12 2008 +0900 [SCSI] aic7xxx_old, eata_pio, ips, libsas: don't zero out sense_buffer in queuecommand LLDs don't need to zero out scsi_cmnd::sense_buffer in queuecommand since scsi-ml does. This is a preparation of the future changes to allocate the sense_buffer only when necessary. Many LLDs zero out the sense_buffer before touching it on the error case. This patch lets them alone for now because new APIs for them would be added later on. Signed-off-by: FUJITA Tomonori Acked-by: "Salyzyn, Mark" Signed-off-by: James Bottomley commit 382db811a8cc1427efabdc959cd1aeef8685ffa6 Author: Randy Dunlap Date: Thu Jan 10 14:33:16 2008 -0800 [SCSI] megaraid: fix section mismatch Change megaraid_pci_driver_g variable name so that it matches the modpost whitelist that allows pointers to init text/data. WARNING: vmlinux.o(.data+0x1a8e30): Section mismatch: reference to .init.text:megaraid_probe_one (between 'megaraid_pci_driver_g' and 'class_device_attr_megaraid_mbox_app_hndl') Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit cc75e8ab6f262a3ea60e8d8268f48da5365f2823 Author: FUJITA Tomonori Date: Sun Jan 13 02:20:18 2008 +0900 [SCSI] libsas: fix sense_buffer overrun Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 3bc8070fb75b33151791fb54ca36ae5abcc8b8df Author: Salyzyn, Mark Date: Fri Jan 11 13:46:24 2008 -0800 [SCSI] aacraid: SMC vendor identification Due to an internal limit associated with the AdapterTypeText field, SMC required a product ID that overloaded the combined vendor and product ID. A decision was made to ship the SMC products without a vendor string dropping the defacto space that used to delineate vendor and product to boot. To correct this, we needed to adjust the code in the driver to parse out the vendor and product strings for the adapter. We match of 'AOC' in the AdapterTypeText, if so we set the vendor to SMC and place the entire AdapterTypeText into the product field. This only affects the cosmetic presentation of the Adapter vendor and product in the logs and in sysfs. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 0995ad382df77b438d0c1e4f93ff349aa2eb9caf Author: Salyzyn, Mark Date: Fri Jan 11 11:56:07 2008 -0800 [SCSI] aacraid: respond to enclosure service events Added support to respond to enclosure service events (controller AIFs) to add, online or offline physical targets reported to sg. Also added online and offlining of arrays. Removed an automatic variable definition in a sub block that hid an earlier definition, determined to be inert as the sub-block use did not interfere. Bumped the driver versioning to stamp the addition of this feature. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit d9aa3af09cdc5d3ae0e67bed4107bcf7e25b9f31 Author: Krzysztof Helt Date: Fri Jan 11 21:50:46 2008 +0100 [SCSI] sym53c8xx: fixes two bugs related to chip reset This patch fixes two bugs pointed by James Bottomley: 1. the if (!sym_data->io_reset). That variable is only ever filled by a stack based completion. If we find it non empty it means this code has been entered twice and we have a severe problem, so that should just become a BUG_ON(sym_data->io_reset). 2. sym_data->io_reset should be set to NULL before the routine is exited otherwise the PCI recovery code could end up completing what will be a bogus pointer into the stack. Big thanks to James Bottomley for help with the patch. Signed-off-by: Krzysztof Helt Signed-off-by: James Bottomley commit 3a0086a80ab7c2f1adb0e9b2a6fc82632979cec5 Author: Salyzyn, Mark Date: Fri Jan 11 11:46:44 2008 -0800 [SCSI] aacraid: add call to flush_kernel_dcache_page Some architectures require a call to flush_kernel_dcache_page for processor spoofed DMA operations. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 984621b4379cccbd0330e10622021a3cfe464ad5 Author: Prakash, Sathya Date: Fri Jan 11 14:42:17 2008 +0530 [SCSI] mpt fusion: Fix for module unload problem in flash less controller environment This patch fixes the module unload problem in flash less 1030 controller environment where firmware download boot functionality is invoked. The problem is due to the firmware download is being done in the reverse order, which this patch solves by insureing the download occurs to the last controller being reset. signed-off-by: Sathya Prakash Signed-off-by: James Bottomley commit 32cfe344b002b4d6fe6852a006a9ef3c9ccdb545 Author: James Smart Date: Fri Jan 11 01:53:33 2008 -0500 [SCSI] lpfc 8.2.4 : Update lpfc driver version to 8.2.4 Update lpfc driver version to 8.2.4 Signed-off-by: James Smart Signed-off-by: James Bottomley commit fa4066b672821d24cb7180b8d0434b01a7043172 Author: James Smart Date: Fri Jan 11 01:53:27 2008 -0500 [SCSI] lpfc 8.2.4 : Rework misplaced reference taking on node structure Rework misplaced reference taking on node structure Signed-off-by: James Smart Signed-off-by: James Bottomley commit c95d6c6c2b0a303a113fd468efce7430d5b20eac Author: James Smart Date: Fri Jan 11 01:53:23 2008 -0500 [SCSI] lpfc 8.2.4 : Enhance debugfs use Enhance debugfs to dump HBA SLIM as well as Host SLIM Signed-off-by: James Smart Signed-off-by: James Bottomley commit 9c2face68782d5b7a322df6aade0512b47d29f10 Author: James Smart Date: Fri Jan 11 01:53:18 2008 -0500 [SCSI] lpfc 8.2.4 : Fix Unsolicited Data items Fix Drivers Unsolicited CT command handling - we did not handle multiframe sequences well. Fix error due to delay in replenishing buffers for unsolicited data. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 83108bd3826310def1e49330558467406c46b970 Author: James Smart Date: Fri Jan 11 01:53:09 2008 -0500 [SCSI] lpfc 8.2.4 : Add additional sysfs and module parameters Made link speed and link topology modifiable via sysfs Make scatter gather Segment Count into a module parameter. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 8a4df120b0712a12134d0d9435ccaec1c12b07a7 Author: Tomohiro Kusumi Date: Fri Jan 11 01:53:00 2008 -0500 [SCSI] lpfc 8.2.4 : Make lpfc legacy I/O port free This is a patch written by Tomohiro Kusumi and submitted to linux-scsi: http://marc.info/?l=linux-scsi&m=118673720712152&w=2 The original patch comment: This patch makes Emulex lpfc driver legacy I/O port free. It has already been acked quite long time ago. So I resubmit the patch. http://lkml.org/lkml/2006/11/22/28 Current lpfc driver is already using pci_select_bars() and pci_enable_device_bars() when the PCI bus has been reset. So I think this patch should also be acked. Signed-off-by: Tomohiro Kusumi Signed-off-by: James Smart Signed-off-by: James Bottomley commit 0937282036d9ae798e02c9c69a8b2ef044048855 Author: James Smart Date: Fri Jan 11 01:52:54 2008 -0500 [SCSI] lpfc 8.2.4 : Miscellaneous Fixes Miscellaneous Fixes: - Fix a couple of sparse complaints - Reset the FCP recovery flag when the node is not a FCP2 device. - Speed up offline prep delays - Fixed a memory leak in lpfc_mem_alloc failure path - Fixed external loopback test. - Fixed error code returned from the driver when HBA is over heated. - Correct Max NPIV vport to limits read from adapter - Add missing locks around fc_flag and FC_NEEDS_REG_VPI - Add missing hba ids for device identification - Added support for SET_VARIABLE and MBX_WRITE_WWN mailbox commands - Changed all temperature event messages from warning to error - Fix reporting of link speed when link is down - Added support for MBX_WRITE_WWN mailbox command - Change del_timer_sync() in ISR to del_timer() in interrupt handler - Correct instances of beXX_to_cpu() that should be cpu_to_beXX() - Perform target flush before releasing node references on module unload - Avoid bogus devloss_tmo messages when driver unloads - Fix panic when HBA generates ERATT interupt - Fix mbox race condition and a workaround on back-to-back mailbox commands - Force NPIV off for pt2pt mode between 2 NPorts - Stop worker thread before removing fc_host. - Fix up discovery timeout error case due to missing clear_la - Tighten mailbox polling code to speed up detection of fast completions - Only allow DUMP_MEMORY if adapter offline due to overtemp errors - Added extended error information to the log messages in chip init. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 13815c8344a238c204e4f4339b22dc4833c6df0f Author: James Smart Date: Fri Jan 11 01:52:48 2008 -0500 [SCSI] lpfc 8.2.4 : Add parameters to enable and disable heartbeat and hba resets Add parameters to enable and disable heartbeat and hba resets Signed-off-by: James Smart Signed-off-by: James Bottomley commit fa61a54e48efc8e5c7a6d4680ad8ceb74a5fca84 Author: James Smart Date: Fri Jan 11 01:52:42 2008 -0500 [SCSI] lpfc 8.2.4 : Correct abort handler logic Correct Abort handler logic. It was unconditionally waiting a minimum of 2 seconds rather than looking for abort completion. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 0ff10d46cf0a373c9c855a23cc9383ba4030d8d2 Author: James Smart Date: Fri Jan 11 01:52:36 2008 -0500 [SCSI] lpfc 8.2.4 : Miscellaneous Discovery/ELS Fixes Miscellaneous Discovery/ELS Fixes: - Delay free's of ELS requests if adapter reject conditions - Fix concurrent PLOGI vs ADISC state handling - Add retry mechanism for GFF_ID - Correct some illegal state transitions around RSCN timeouts - Fix missing return in FAN handling Signed-off-by: James Smart Signed-off-by: James Bottomley commit b18268fc631034882f5f3dd93daa248a3bfdd085 Author: Salyzyn, Mark Date: Tue Jan 8 14:07:57 2008 -0800 [SCSI] aacraid: improve queue balancing The adapter queue is divided up equally to all the arrays to prevent command starvation to any individual array. On the other hand, physical targets are only granted a queue depth of one each. The code prior to this patch used to deal with the incremental discovery of targets, but the driver knows how many arrays are present prior to the scan so this knowledge is used to generate a better estimate for the queue depth. Remove the capability of 'physical=0' from preventing access to the class of adapters that have the RAID/SCSI mode of operation since none of the physicals on the SCSI channel are candidates ever for an array. As always, the user can override this default queue depth policy by making the appropriate adjustments utilizing sysfs. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit b6ef70f33ca2a3084b4fea12414550724a9114dc Author: Salyzyn, Mark Date: Tue Jan 8 13:26:43 2008 -0800 [SCSI] aacraid: OS panic after Adapter panic (hardening). In experiments in the lab we managed to trigger an Adapter firmware panic (BlinkLED) coincidentally while several pass-through ioctl command from the management software were outstanding on a bug only present on a class of RAID Adapters that require a hardware reset rather than a commanded reset. The net result was an attempt to time out the management software command as if it came from the SCSI layer resulting in an OS panic. Adapters that use commanded reset, management commands are returned failed by the Adapter correctly. The adapter firmware panic that resulted in this condition was also resolved, and there were no adapters in the field with this specific firmware bug so we do not expect any field reports. This is a rare or unlikely corner condition, and no reports have ever been forwarded from the field. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 6dcd4a7fe5dfaace2763187d6941e700a8bc6f27 Author: Salyzyn, Mark Date: Tue Jan 8 13:08:04 2008 -0800 [SCSI] aacraid: fix multiple definition of automatic variable warning. The 'entry' automatic variable was defined at the top and within a block that uses it, removed the definition from the block that uses it. Some cosmetic changes were made while in the same file. This patch should be inert. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit a3940da5e6fe8b833eecdbca3fac9456b4204d6e Author: Salyzyn, Mark Date: Tue Jan 8 12:48:25 2008 -0800 [SCSI] aacraid: fix big endian issues Big endian systems issues discovered in the aacraid driver. Somewhat reverses a patch from November 7th of last year that removed swap operations because they formerly were being assigned to an u8 array when they should have been assigned to an le32 array. This patch is largely inert for any little endian processor architecture. It resolves a bug in delivering the BlinkLED AIF event to registered applications when the adapter or associated hardware was reset due to ill health. A rare corner case occurrence, also largely unnoticed by any as it was a new (untested!) feature. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 06a43d1725f59a0f5e043bd06081c44ae528098e Author: Salyzyn, Mark Date: Tue Jan 8 12:32:00 2008 -0800 [SCSI] aacraid: variable redefinition hides earlier warning The parameter 'info' is reused, renamed the second to sinfo to represent supplemental adapter info, to suppress compile warning message. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 17eaaceef52b1ce5ca061d49a1ff9ae56ccce1e1 Author: Salyzyn, Mark Date: Tue Jan 8 12:23:49 2008 -0800 [SCSI] aacraid: add sysfs report of RAID level Report the RAID level string for the SCSI device representing the array. Report is in /sys/class/scsi_device/#:#:#:#/device/level. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 95e852e1ef165560e85d3012127068c8f08b19a1 Author: Salyzyn, Mark Date: Tue Jan 8 12:01:07 2008 -0800 [SCSI] aacraid: add parameter to control FUA and SYNCHRONIZE_CACHE policy aacraid.cache parameter, Disable Queue Flush commands: bit 0 - Disable FUA in WRITE SCSI commands bit 1 - Disable SYNCHRONIZE_CACHE SCSI command bit 2 - Disable only if Battery not protecting adapter supplied Cache e.g.: aacraid.cache=7 will disable the FUA and SYNCHRONIZE_CACHE commands if the adapter has reported that it's cache is battery backed up. This parameter permits experimentation with tradeoffs between performance and caching policy. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley commit 9b161a4d3e83518323ce13822e55de70c630aa65 Author: James Bottomley Date: Sat Jan 5 10:18:27 2008 -0600 [SCSI] scsi_transport_spi: convert to attribute groups This conversion makes full use of the is_visible() callback on attribute groups. Now, each device appears only with its capability flags in the transport class directory. Previously each device appeared with the capability of the host, so this is a functionality improvement. Converting to attribute groups allows us to sweep away most of the home grown #defines that were effectively doing the same thing. Signed-off-by: James Bottomley commit d4acd722b7bb5f48b9fc3848e8c2a845b100d84f Author: James Bottomley Date: Wed Oct 31 09:38:04 2007 -0500 [SCSI] sysfs: add filter function to groups This patch allows the various users of attribute_groups to selectively allow the appearance of group attributes. The primary consumer of this will be the transport classes in which we currently have elaborate attribute selection algorithms to do this same thing. Acked-by: Greg KH Signed-off-by: James Bottomley commit d52b3815a52456dcf1a45fbc344e23bb643b2bda Author: James Bottomley Date: Sat Jan 5 09:38:30 2008 -0600 [SCSI] add missing transport configure points for target and host While trying to convert the SPI transport class to attribute groups, I discovered that we don't actually have any transport configure points for either the target or the host. This patch adds these missing transport class triggers. The host one is simply done after the add, the target one tries to be more clever and add it after devices may have been placed on the target (so the device configure will have set up the target parameters). Signed-off-by: James Bottomley commit fd1109711d7f76126e7cef947999f139b198dc15 Author: James Bottomley Date: Wed Jan 2 18:48:47 2008 -0600 [SCSI] attribute_container: update to use the group interface This patch is the beginning of moving the attribute_containers to use attribute groups exclusively. The attr element is now deprecated and will eventually be removed (along with all the hand rolled code for doing exactly what attribute groups do) when all the consumers are converted to attribute groups. Acked-by: Greg Kroah-Hartman Signed-off-by: James Bottomley commit 11f24fbdf511cf588c3a18e3208ee02d85db0020 Author: James Bottomley Date: Wed Jan 2 18:44:05 2008 -0600 [SCSI] sysfs: fix the sysfs_add_file_to_group interfaces I can't see a reason why these shouldn't work on every group. However, they only seem to work on named groups. This patch allows the group functions to work on anonymous groups (those with NULL names). Acked-by: Tejun Heo Acked-by: Kay Sievers Acked-by: Greg Kroah-Hartman Signed-off-by: James Bottomley commit d0ad3bc97c06fba5d37b4ca03c03b7eeeda39c47 Author: James Bottomley Date: Tue Jan 22 13:43:48 2008 -0600 [SCSI] libata: fix corruption induced by relaxed DMA alignment in SCSI Hugh Dickens noticed that SMART commands issued from user space can end up corupting memory. The problem occurs if the buffer used to read data spans two pages. The reason is that the PIO sector routines in libata are expecting physically contiguous pages when they do sector operations, so the left overs on the second page go into the next physically adjacent page rather than the next page in the sg mapping. Fix this by enforcing strict 512 byte alignment on all buffers from userspace. Acked-by: Hugh Dickins Acked-by: Jeff Garzik Signed-off-by: James Bottomley commit a984f58dd97f22f5113700322fed311a0ee29947 Author: akpm@linux-foundation.org Date: Thu Jan 17 11:33:52 2008 -0800 fix drivers/ata/sata_fsl.c double-decl drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg': drivers/ata/sata_fsl.c:337: error: redeclaration of 'si' with no linkage drivers/ata/sata_fsl.c:326: error: previous declaration of 'si' was here Reported-by: Olof Johansson Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 7ccd720da3857c21ea893448aaf73620cfe1d27e Author: James Bottomley Date: Thu Jan 17 11:56:24 2008 -0600 [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() Signed-off-by: Jeff Garzik commit b832548773b0cd98216534caa31b9ed7607c4e76 Author: Alan Cox Date: Sat Jan 19 15:47:23 2008 +0000 pata_legacy: Merge winbond support This puts winbond VLB in with the other ISA/VLB support and means we can lose pata_winbond.c. With all the VLB/ISA probe in one space (and out of the core libata) this makes legacy probing work sanely. Also switch to devm_ for resource handling on the ports post probe Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 5e8f757cb2e0f67bf43f71d5180a8bf0ab3484eb Author: Alan Cox Date: Sat Jan 19 16:07:58 2008 +0000 ata_generic: Cenatek support Not much to do here. It's an ata memory as disk. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 3e9b90265e9ab191c8f7e072fd0abf05824d2f1b Author: Alan Cox Date: Sat Jan 19 15:53:55 2008 +0000 pata_winbond: error return If no device is active return an error not zero. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 0f069788c32ea7af108c6032dfb0594cc718bde8 Author: Alan Cox Date: Sat Jan 19 15:52:56 2008 +0000 pata_serverworks: Fix cable types and cosmetics Minor tidying up. Only real change is to return UNK not 80 wire when we don't know the cable type. This didn't use to matter but with Tejun's reworking of cable detection it may. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 0eaea364edec4132fe42ef33fe87edb15f00507b Author: Alan Cox Date: Sat Jan 19 15:48:59 2008 +0000 pata_mpc52xx: remove un-needed assignment ata_irq is always assigned so does not need to be initialised to zero. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 75f9cafc2d24a1cf44d7c3f3e5b4f7a393afcf71 Author: Tejun Heo Date: Thu Jan 3 01:21:14 2008 +0900 libata: fix off-by-one in error categorization ATA_ECAT_DUBIOUS_BASE was too high by one and thus all DUBIOUS error categorizations were wrong. This passed test because only ATA_BUS and UNK_DEV were used during testing and the ones after them - ATA_BUS and an overflowed entry - behaved similarly. This patch fixes the problem by adding DUBIOUS_NONE category and use it as base. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit b710a1f4b34438b624e9c6c2dc8bcf54b0b0ba27 Author: Tejun Heo Date: Sat Jan 5 23:11:57 2008 +0900 ahci: factor out AHCI enabling and enable AHCI before reading CAP Factor out AHCI enabling into ahci_enable_ahci() and enabling AHCI before reading CAP in ahci_save_initial_config() as the spec requires enabling AHCI mode before accessing any other registers. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit c729072459446885c5c200137de1db32da5db4dc Author: Tejun Heo Date: Fri Jan 18 18:36:30 2008 +0900 ata_piix: implement SIDPR SCR access For ICH8, SCRs can be accessed using index and data register pair located at BAR 5. This patch implements support for it such that PHY status, errors and hardreset are available for those controllers. This is the only case where two devices on a PATA channel have access to SCRs and creates a unique problem of mapping two SCRs to one link. Note that this is different from PMP case in that they aren't quite separate links - e.g. softreset resets both devices. This problem is worked around by merging the SCR values. To upper layer, it looks like there is a single link with one set of SCRs but with two devices. This works well enough for PHY event, error reporting and hardreset. Supporting hardreset is important because in rare cases SATA devices fail to recover without it after PHY errors. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 8b09f0da0f873698a7e8b329dfb7b10fd42d5cdf Author: Tejun Heo Date: Fri Jan 18 18:36:29 2008 +0900 ata_piix: convert to prepare - activate initialization ata_piix requires more configuration during initialization than most other SFF compliant controllers and one-go initialzation with ata_pci_one() is too rigid. This patch converts ata_piix to use two step prepare - activate initialization used by other more advanced controllers. This conversion brings the happy side effect of enabling PCI device before accessing PCI configuration registers. Other than that, there shouldn't be any behavior change. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 4e6b79fa61091a0ed9b0af0f573cc257772cd88d Author: Tejun Heo Date: Fri Jan 18 18:36:28 2008 +0900 libata: factor out ata_pci_activate_sff_host() from ata_pci_one() Factor out ata_pci_activate_sff_host() from ata_pci_one(). This does about the same thing as ata_host_activate() but needs to be separate because SFF controllers use different and multiple IRQs in legacy mode. This will be used to make SFF LLD initialization more flexible. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit cadb7345d92628d46cccd3765cc15cb9cd6abccf Author: akpm@linux-foundation.org Date: Tue Jan 15 16:01:52 2008 -0800 [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() Cc: James Bottomley Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit defc9cd826e4a99f550504a744f9407b518828ae Author: Alan Cox Date: Thu Jan 10 14:33:10 2008 -0800 pata_legacy: resychronize with upstream changes and resubmit Update the legacy driver so it can handle VLB ports nicely, and has an internal structure for nailing new ISA/VLB forms in. Anyone got an ALI14xx and a spare day ;) Also adds an "all" parameter so you can load this driver after all the PCI ones in a boot time kernel and tell it to grab anything ST412 compatible even if it is an unknown PCI device. That allows libata to offer the same "just get me a disk somehow" fallback that old IDE did. Obsoletes pata_qdi. Signed-off-by: Alan Cox Cc: Tejun Heo Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit c294f1b32940d5bf853e006b9ccc72629c859749 Author: Andrew Morton Date: Tue Jan 15 15:42:37 2008 -0800 [libata] pata_legacy: typo fix Cc: Jeff Garzik Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 045eeb4f796bf50439cfbf4f165946b648a1a928 Author: Andrew Morton Date: Thu Jan 10 14:33:04 2008 -0800 [libata] pata_winbond: update for new ->data_xfer hook drivers/spi/Kconfig:156:warning: 'select' used by config symbol 'SPI_PXA2XX' refers to undefined symbol 'PXA_SSP' drivers/ata/pata_winbond.c: In function 'winbond_data_xfer': drivers/ata/pata_winbond.c:109: error: 'read' undeclared (first use in this function) drivers/ata/pata_winbond.c:109: error: (Each undeclared identifier is reported only once drivers/ata/pata_winbond.c:109: error: for each function it appears in.) drivers/ata/pata_winbond.c:123: warning: 'return' with a value, in function returning void drivers/ata/pata_winbond.c: At top level: drivers/ata/pata_winbond.c:162: warning: initialization from incompatible pointer type distcc[29718] ERROR: compile drivers/ata/pata_winbond.c on bix/8 failed make[1]: *** [drivers/ata/pata_winbond.o] Error 1 make: *** [drivers/ata/pata_winbond.o] Error 2 Cc: Jeff Garzik Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit f885521f0aa4a4f9d339cf32a4821a56f3f97426 Author: Tejun Heo Date: Wed Jan 2 20:12:47 2008 +0900 pata_pcmcia: convert to new data_xfer prototype While merging data_xfer prototype change, pata_pcmcia was left out. Convert it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 4ca4e439640cd1d3659cbcf60e7a73c2ae0450b3 Author: Al Viro Date: Sun Dec 30 09:32:22 2007 +0000 libata annotations and fixes Signed-off-by: Al Viro Signed-off-by: Jeff Garzik commit 35a10a80daa04b7316d6bac1b1402cc347c35b1e Author: Tejun Heo Date: Fri Jan 4 18:42:21 2008 +0900 libata: use dev_driver_string() instead of "libata" in libata-sff.c libata-sff code used DRV_NAME which is hardcoded to "libata" when requesting resources. Use dev_driver_string() such that low level driver names are used in resource listing. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 723159c58371b860cf6ef38affd19d16290e4898 Author: Tejun Heo Date: Fri Jan 4 18:42:20 2008 +0900 ata_piix: kill unused constants and flags Kill PIIX_FLAG_SCR, PIIX_PORT_ENABLED and PIIX_PORT_PRESENT. These are unused. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 442eacc362c2576aac8ebfd41b99252e28e0f49c Author: Jeff Garzik Date: Wed Dec 19 04:25:10 2007 -0500 libata: make ata_port_queue_task() an internal function ata_port_queue_task() served a single user: ata_pio_task() Rename to ata_pio_queue_task() and un-export it, as nobody outside of libata-core.c uses it. Signed-off-by: Jeff Garzik commit d7b174500e5750099537c7f0bc4873f06b6c1b9a Author: Alan Cox Date: Mon Nov 19 14:43:07 2007 +0000 pata_pcmcia: Minor cleanups and support for dual channel cards Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit c5038fc05d4aa4ae0671776199459690e4c973cb Author: Alan Cox Date: Thu Oct 25 14:21:16 2007 +0100 libata/pata_it821x: Improve handling of poorly compatible emulations Some it821x RAID firmwares return 0 for the err return off both devices. A similar issue occurs with the slave returning 0 not 1 if you plug a gigabyte sata ramdisk into a controller that fakes two SATA ports as master/slave on an SFF channel. The patch does the following - Allow the 'failed diagnostics' case on both master and slave - Move the HORKAGE_DIAGNOSTIC check after ->dev_config This second change also allows IT821x to fix up a problem where we report drive diagnostic failures when in fact the drive is fine but the microcontroller firmware doesn't appear to get it right. IT821x clears the flag again to avoid giving the user bogus warnings about their disk. The other IT821x change is a bit ugly, we slightly abuse the cable type hook to fiddle with the identify data for the devices. We could add a new hook for this but as we have only one offender and no more seeming likely it seems better to keep libata-core clean. Please let this sit in -mm briefly, just in case the relaxed checking breaks some other emulated interface. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit a5df2eabdae7cd7840d59cffe621b3658a3a70cb Author: Alan Cox Date: Mon Oct 15 20:44:11 2007 +0100 pata_pcmcia: Add support for dumb 8bit IDE emulations Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 0bcc65ad78ae517de16b2ca07a2891f49d44d156 Author: Tejun Heo Date: Wed Dec 5 16:43:12 2007 +0900 libata: make qc->nbytes include extra buffers qc->nbytes didn't use to include extra buffers setup by libata core layer and my be odd. This patch makes qc->nbytes include any extra buffers setup by libata core layer and guaranteed to be aligned on 4 byte boundary. This value is to be used to program the host controller. As this represents the actual length of buffer available to the controller and the controller must be able to deal with short transfers for ATAPI commands which can transfer variable length, this shouldn't break any controllers while making problems like rounding-down and controllers choking up on odd transfer bytes much less likely. The unmodified value is stored in new field qc->raw_nbytes. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit ff2aeb1eb64c8a4770a6304f9addbae9f9828646 Author: Tejun Heo Date: Wed Dec 5 16:43:11 2007 +0900 libata: convert to chained sg libata used private sg iterator to handle padding sg. Now that sg can be chained, padding can be handled using standard sg ops. Convert to chained sg. * s/qc->__sg/qc->sg/ * s/qc->pad_sgent/qc->extra_sg[]/. Because chaining consumes one sg entry. There need to be two extra sg entries. The renaming is also for future addition of other extra sg entries. * Padding setup is moved into ata_sg_setup_extra() which is organized in a way that future addition of other extra sg entries is easy. * qc->orig_n_elem is unused and removed. * qc->n_elem now contains the number of sg entries that LLDs should map. qc->mapped_n_elem is added to carry the original number of mapped sgs for unmapping. * The last sg of the original sg list is used to chain to extra sg list. The original last sg is pointed to by qc->last_sg and the content is stored in qc->saved_last_sg. It's restored during ata_sg_clean(). * All sg walking code has been updated. Unnecessary assertions and checks for conditions the core layer already guarantees are removed. Signed-off-by: Tejun Heo Cc: Jens Axboe Signed-off-by: Jeff Garzik commit f92a26365a72333f418abe82700c6030d4a1a807 Author: Tejun Heo Date: Wed Dec 5 16:43:10 2007 +0900 libata: change ATA_QCFLAG_DMAMAP semantics ATA_QCFLAG_DMAMAP was a bit peculiar in that it got set during qc initialization and cleared if DMA mapping wasn't necessary. Make it more straight forward by making the following changes. * Don't set it during initialization. Set it after DMA is actually mapped. * Add BUG_ON() to guarantee that there is data to transfer if DMAMAP is set. This always holds for the current code. The BUG_ON() is for docummentation and sanity check. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 001102d7859be0e7f7b9f2d62b841f2c0f9c2640 Author: Tejun Heo Date: Wed Dec 5 16:43:09 2007 +0900 libata: kill non-sg DMA interface With atapi_request_sense() converted to use sg, there's no user of non-sg interface. Kill non-sg interface. * ATA_QCFLAG_SINGLE and ATA_QCFLAG_SG are removed. ATA_QCFLAG_DMAMAP is used instead. (this way no LLD change is necessary) * qc->buf_virt is removed. * ata_sg_init_one() and ata_sg_setup_one() are removed. Signed-off-by: Tejun Heo Cc: Rusty Russel Signed-off-by: Jeff Garzik commit 55dba3120fbcbea6800f9a18503d25f73212a347 Author: Tejun Heo Date: Wed Dec 5 16:43:07 2007 +0900 libata: update ->data_xfer hook for ATAPI Depending on how many bytes are transferred as a unit, PIO data transfer may consume more bytes than requested. Knowing how much data is consumed is necessary to determine how much is left for draining. This patch update ->data_xfer such that it returns the number of consumed bytes. While at it, it also makes the following changes. * s/adev/dev/ * use READ/WRITE constants for rw indication * misc clean ups Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit ceb0c642624f634c5b4f46b0e22df19be87a2e53 Author: Tejun Heo Date: Wed Dec 5 16:43:06 2007 +0900 libata: add ATAPI_* cmd types and implement atapi_cmd_type() Add ATAPI command types - ATAPI_READ, WRITE, RW_BUF, READ_CD and MISC, and implement atapi_cmd_type() which takes SCSI opcode and returns to which class the opcode belongs. This will be used later to improve ATAPI handling. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 0dc36888d4422140f9eaf50f24953ec109f750a3 Author: Tejun Heo Date: Tue Dec 18 16:34:43 2007 -0500 libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_* ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and ATA_PROT_ATAPI_* are inconsistent causing confusion. Rename them to ATAPI_PROT_* and make them consistent with ATA counterpart. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 537b53c1692960b8b3b0324e886fbe48cb9e5c00 Author: Tejun Heo Date: Wed Dec 5 16:43:04 2007 +0900 cdrom: add more GPCMD_* constants Add GPCMD_* constants for READ_BUFFER, WRITE_12 and WRITE_BUFFER for completeness. These will be used libata. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 0106372db6dc135f300035ce8e93cddd7283a26a Author: Albert Lee Date: Wed Dec 5 16:43:02 2007 +0900 libata: zero xfer length on ATAPI data xfer IRQ is HSM violation Treat zero xfer length as HSM violation. While at it, add unlikely()'s to ATAPI ireason and transfer length checks. tj: Formatted patch and added unlikely()'s. Signed-off-by: Albert Lee Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 93f8fecbe72bc3c121f3605dd198ff39ef358522 Author: Tejun Heo Date: Wed Dec 5 16:43:01 2007 +0900 libata: make atapi_request_sense() use sg atapi_request_sense() is now the only left user of ata_sg_init_one(). Convert it to use sg interface. Signed-off-by: Tejun Heo Cc: Rusty Russel Signed-off-by: Jeff Garzik commit 1973a023a616b40ba33fd0d38b1055c62c88e73d Author: Tejun Heo Date: Wed Dec 5 10:36:13 2007 +0900 libata: convert NCQ test in ata_qc_issue() to ata_is_ncq() I missed one while converting to ata_is_*() protocol test helpers. Convert it. Pointed out by Jeff Garzik. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 40f46f17819c2d199f99addc3278ff2eb11f3cd5 Author: Andrew Morton Date: Thu Dec 13 16:01:38 2007 -0800 pata_hpt37x: checkpatch fixes WARNING: line over 80 characters #70: FILE: drivers/ata/pata_hpt37x.c:850: + struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1); ERROR: else should follow close brace '}' #78: FILE: drivers/ata/pata_hpt37x.c:858: + } + else total: 1 errors, 1 warnings, 100 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit e6a73ab1c8e814ac7b0d69f44fde63299b639489 Author: Andrew Morton Date: Thu Dec 13 16:01:37 2007 -0800 drivers/ata/libata-eh.c: fix printk warning drivers/ata/libata-eh.c: In function `ata_port_pbar_desc': drivers/ata/libata-eh.c:215: warning: long long unsigned int format, long unsigned int arg (arg 4) Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit ce54d1616302117fa98513ae916bb3333e1c02ea Author: Tejun Heo Date: Tue Dec 18 16:33:07 2007 +0900 pata_amd: update mode selection for NV PATAs Cable detection on NV PATA hosts isn't implemented and the CBLID- cable isn't wired according to the sepc either, so both host-side and generic drive-side cable detections are broken. Till now, nv_cable_detect() relied on peeking BIOS and ACPI configurations to upgrade to 80C but this often results in misdetection of 40C cable as 80C. Also, the original implementation was broken in that by the time BIOS configuration is read it has already been cleared by programming PIO0 during reset. This patch reimplements NV mode selection such that... * BIOS configuration value is stored during driver attach and restored on detach. * Cable type is fixed to ATA_CBL_PATA_IGN and mode selection is soley done by nv_mode_filter() which peeks both BIOS and ACPI configurations and filter accordingly. Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit 021ee9a6da1cfc57f6a6c769c3c898bdd4753108 Author: Tejun Heo Date: Tue Dec 18 16:33:06 2007 +0900 libata: reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask() Reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask() and while at it relocate the function below ata_acpi_gtm_xfermask(). New ata_acpi_cbl_80wire() implementation takes @gtm, in both pata_via and pata_amd, use the initial GTM value. Both are trying to peek initial BIOS configuration, so using initial caching value makes sense. This fixes ACPI part of cable detection in pata_amd which previously always returned 0 because configuring PIO0 during reset clears DMA configuration. Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit a0f79b929acaba10d4780acd2543eff20bf4b5b0 Author: Tejun Heo Date: Tue Dec 18 16:33:05 2007 +0900 libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi libata-acpi is using separate timing tables for transfer modes although libata-core has the complete ata_timing table. Implement ata_timing_cycle2mode() to look for matching mode given transfer type and cycle duration and use it in libata-acpi and pata_acpi to replace private timing tables. Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit 5df91a25df08d85700fef5fd59bb1873273e5ef5 Author: Tejun Heo Date: Tue Dec 18 16:33:04 2007 +0900 libata: fix ata_acpi_gtm_xfermask() ata_acpi_gtm_xfermask() as separated out from pacpi_discover_modes() has various bugs. Fix them. * The wrong comparison operator is used when finding for matching cycle resulting totally bogus result. * With the comparion operator fixed, boundary condtion handling is clumsy. * Setting of any DMA mask bit set all bits in PIO mask. * MWDMA and UDMA blocks are swapped. Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit 7c77fa4d51b1480bcec2e898c94d6912fe063c16 Author: Tejun Heo Date: Tue Dec 18 16:33:03 2007 +0900 libata: separate out ata_acpi_gtm_xfermask() from pacpi_discover_modes() Finding out matching transfer mode from ACPI GTM values is useful for other purposes too. Separate out the function and timing tables from pata_acpi::pacpi_discover_modes(). Other than checking shared-configuration bit after doing ata_acpi_gtm() in pacpi_discover_modes() which should be safe, this patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit 9cde9ed151e170f2e2a530f7ec0032dfbe9f443b Author: Tejun Heo Date: Sat Nov 24 21:16:07 2007 +0900 ata_piix: separate controller IDs into separate enum Separate controller IDs into a separate enum as Jeff requested. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 46a671430dfa4ca59c7a69f01326e99edddb21bd Author: Tejun Heo Date: Tue Dec 4 13:33:30 2007 +0900 sata_promise: make pdc_atapi_pkt() use values from qc->tf Make pdc_atapi_pkt() use values from qc->tf instead of creating its own. This is to ease future ATAPI handling changes. Signed-off-by: Tejun Heo Cc: Mikael Pettersson Signed-off-by: Jeff Garzik commit c88f90c3779cd5e710f2acdf59ad2bd0380de98d Author: Tejun Heo Date: Tue Nov 27 19:43:48 2007 +0900 libata: add ATA_CBL_PATA_IGN ATA_CBL_PATA_UNK indicates that the cable type can't be determined from the host side and might be either 80c or 40c. libata applies drive or other generic limit in this case. However, there are controllers where both host and drive side detections are misimplemented and the driver has to rely solely on private method - peeking BIOS or ACPI configuration or using some other private mechanism. This patch adds ATA_CBL_PATA_IGN which tells libata to ignore the cable type completely and just let the LLD determine the transfer mode via host transfer mode masks and ->mode_filter(). Signed-off-by: Tejun Heo Cc: Alan Cox Signed-off-by: Jeff Garzik commit 7dc951aefdc1dc20228691b04867fb6195864d67 Author: Tejun Heo Date: Tue Nov 27 19:43:42 2007 +0900 libata: xfer_mask is unsigned long not unsigned int Jeff says xfer_mask is unsigned long not unsigned int. Convert all xfermask fields and handling functions to deal with unsigned longs. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 9d3501ab962b1506d93974faf8509251b4a85fbc Author: Tejun Heo Date: Tue Nov 27 19:43:41 2007 +0900 libata: kill ata_id_to_dma_mode() ata_id_to_dma_mode() isn't quite generic. The function is basically privately implemented ata_id_xfermask() combined with hardcoded mode printing and configuration which are specific to ata_generic. Kill the function and open code it in generic_set_mode() using generic xfermode handling functions. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 70cd071e4ecc06c985189665af75c108601fd5a3 Author: Tejun Heo Date: Tue Nov 27 19:43:40 2007 +0900 libata: clean up xfermode / PATA timing related stuff * s/ATA_BITS_(PIO|MWDMA|UDMA)/ATA_NR_\1_MODES/g * Consistently use 0xff to indicate invalid transfer mode (0x00 is valid for PIO_SLOW). * Make ata_xfer_mode2mask() return proper mode mask instead of just the highest bit. * Sort ata_timing table in increasing xfermode order and update ata_timing_find_mode() accordingly. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 6357357cae7794dcb89cace758108dec612e7ed5 Author: Tejun Heo Date: Tue Nov 27 19:43:39 2007 +0900 libata: export xfermode / PATA timing related functions Export the following xfermode related functions. * ata_pack_xfermask() * ata_unpack_xfermask() * ata_xfer_mask2mode() * ata_xfer_mode2mask() * ata_xfer_mode2shift() * ata_mode_string() * ata_id_xfermask() * ata_timing_find_mode() These functions will be used later by LLD updates. While at it, change unsigned short @speed to u8 @xfer_mode in ata_timing_find_mode() for consistency. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit f8ab6d8e15a9b978f79aee794c263014c2959dfc Author: Tejun Heo Date: Tue Nov 27 19:43:38 2007 +0900 ata_generic: unindent loop in generic_set_mode() Unindent loop body in generic_set_mode(). This is to ease future change. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit e39eec13ff8c58520d77b5f977b1e0fa067fbd2c Author: Jeff Garzik Date: Sat Dec 1 18:05:39 2007 -0500 [libata] Build fix WRT ata_is_xxx() new API introduction Signed-off-by: Jeff Garzik commit 76326ac1ac1f524014ef36986fed97796b28ec6b Author: Tejun Heo Date: Tue Nov 27 19:28:59 2007 +0900 libata: implement fast speed down for unverified data transfer mode It's very likely that the configured data transfer mode is the wrong one if device fails data transfers right after initial data transfer mode configuration (including NCQ on/off and xfermode). libata EH needs to speed down fast before upper layers give up on probing. This patch implement fast speed down rules to handle such cases better. Error occured while data transfer hasn't been verified trigger fast back-to-back speed down actions until data transfer works. This change will make cable mis-detection and other initial configuration problems corrected before partition scanning code gives up. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 00115e0f5bc3bfdf3f3855ad89c8895f10458f92 Author: Tejun Heo Date: Tue Nov 27 19:28:58 2007 +0900 libata: implement ATA_DFLAG_DUBIOUS_XFER ATA_DFLAG_DUBIOUS_XFER is set whenever data transfer speed or method changes and gets cleared when data transfer command succeeds in the newly configured transfer mode. This will be used to improve speed down logic. Signed-off-by: Tejun Heo commit 663f99b86ac7d4c0eed8c239638da0ea8849288b Author: Tejun Heo Date: Tue Nov 27 19:28:57 2007 +0900 libata: adjust speed down rules Speed down rules were too conservative. Adjust them a bit. * More than 10 timeouts can't happen in 5 minutes as command timeout is 30secs. Lower the limit for rule #1 to 6. * 10 timeouts is too high for rule #3 too. Lower it to 6. * SATAPI can benefit from falling back to PIO too. Allow SATAPI devices to fall back to PIO. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 3884f7b0a8382b89d8ca5da23bd98e3e15fc805b Author: Tejun Heo Date: Tue Nov 27 19:28:56 2007 +0900 libata: clean up EH speed down implementation Clean up EH speed down implementation. * is_io boolean variable is replaced eflags. is_io is ATA_EFLAG_IS_IO. * Error categories now have names. * Better comments. * Reorder 5min and 10min rules in ata_eh_speed_down_verdict() * Use local variable @link to cache @dev->link in ata_eh_speed_down() These changes are to improve readability and ease further changes. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 6f1d1e3a03fd04a9d9c82fd3cf414020097bb142 Author: Tejun Heo Date: Tue Nov 27 19:28:55 2007 +0900 libata: move ata_set_mode() to libata-eh.c Move ata_set_mode() to libata-eh.c. ata_set_mode() is surely an EH action and will be more tightly coupled with the rest of error handling. Move it to libata-eh.c. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 02c05a27e884c9655dae5b1c8bc0cd89c060c43d Author: Tejun Heo Date: Tue Nov 27 19:28:54 2007 +0900 libata: factor out ata_eh_schedule_probe() Factor out ata_eh_schedule_probe() from ata_eh_handle_dev_fail() and ata_eh_recover(). This is to improve maintainability and make future changes easier. In the previous revision, ata_dev_enabled() test was accidentally dropped while factoring out. This problem was spotted by Bartlomiej. Signed-off-by: Tejun Heo Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik commit 405e66b38797875e80669eaf72d313dbb76533c3 Author: Tejun Heo Date: Tue Nov 27 19:28:53 2007 +0900 libata: implement protocol tests Implement protocol tests - ata_is_atapi(), ata_is_nodata(), ata_is_pio(), ata_is_dma(), ata_is_ncq() and ata_is_data() and use them to replace is_atapi_taskfile() and hard coded protocol tests. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit f20ded38aa54b92dd0af32578b8916d0aa2d9e05 Author: Tejun Heo Date: Tue Nov 27 19:28:52 2007 +0900 libata: rearrange ATA_DFLAG_* Area for DFLAGs which are cleared on INIT is full. Extend it by 8 bits. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 11b7becca9425aab50807503c8102b2db9e5ecf0 Author: Jeff Garzik Date: Fri Nov 23 21:12:14 2007 -0500 libata: checkpatch fixes Signed-off-by: Jeff Garzik commit 49f290903935612aadab3899a4aca884c1140348 Author: Tejun Heo Date: Mon Nov 19 16:03:44 2007 +0900 ahci: update PCS programming For intel ones, ahci unconditionally OR'd 0xf to PCS. This isn't correct for the following cases. * ich6/7m's which only implement P0 and P2 (0xf works fine tho) * ich8/9's which have six ports and needs 0x3f to enable all ports This patch updates PCS programming such that... * port_map determined by ahci_save_initial_config() is OR'd instead of 0xf * PCS is updated only if necessary (there are turned off enable bits) port_map is determined from PORTS_IMPL PCI register which is implemented as write or write-once register. If the register isn't programmed, ahci automatically generates it from number of ports, which is good enough for PCS programming. ICH6/7M are probably the only ones where non-contiguous enable bits are necessary && PORTS_IMPL isn't programmed properly but they're proven to work reliably with 0xf anyway. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 51dbd490614e6228e9b2b198bd4f5f76ef961059 Author: Alan Cox Date: Mon Nov 19 14:45:53 2007 +0000 pata_ninja32: Cardbus ATA initial support Lots of work needed to bring it up to scratch but it does work so you can now use the card. That makes it at least useful, especially as the other cardbus cards are usually INIC162x which aren't yet supported well. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 76548eda8c47e50260bc87196d40b26ce7a7bcd6 Author: Alan Cox Date: Mon Nov 19 14:34:56 2007 +0000 libata-sff: tf_load Jeff said he preferred that the SFF tf_load followed the spec and we documented that anyone who needed different overrode it, rather than it using the ->check_status methods. No driver relies on the current behaviour. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit b9f8ab2dafba2dc12dd94e5d2db31d5cf495775f Author: Alan Cox Date: Mon Nov 19 14:33:11 2007 +0000 libata: IORDY handling I believe this version meets all Sergei's objections Correct the logic for when we issue a set features for transfer mode - If the device has IORDY and the controller has IORDY - set the mode - If the device has IORDY and the controller does not - turn IORDY off - If neither has IORDY do nothing Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit bd3adca52bc43b72c75db3e4c7809d47923b154c Author: Shaohua Li Date: Fri Nov 2 09:32:38 2007 +0800 libata-acpi: add ACPI _PSx method ACPI spec (ver 3.0a, p289) requires IDE power on/off executes ACPI _PSx methods. As recently most PATA drivers use libata, this patch adds _PSx method support in libata. ACPI spec doesn't mention if SATA requires the same _PSx method. Signed-off-by: Shaohua Li Acked-by: Len Brown Signed-off-by: Jeff Garzik commit ae8d4ee7ff429136c8b482c3b38ed994c021d3fc Author: Alan Cox Date: Sun Nov 4 22:05:49 2007 -0500 libata: Disable ATA8-ACS proposed Trusted Computing features by default Historically word 48 in the identify data was used to mean 32bit I/O was supported for VLB IDE etc. ATA8 reassigns this word to the Trusted Computing Group, where it is used for TCG features. This means that an ATA8 TCG drive is going to trigger 32bit I/O on some systems which will be funny. Anyway we need to sort this out ready for ATA8 so: - Reorder the ata.h header a bit so the ata_version function occurs early in it - Make dword_io check the ATA version - Add an ATA8 version checking TCG presence test While we are at it the current drafts have a flaw where it may not be possible to disable TCG features at boot (and opt out of the trusted model) as TCG intends because it relies on presence of a different optional feature (DCS). Handle this in software by refusing the TCG commands if libata.allow_tpm is not set. (We must make it possible as some environments such as proprietary VDR devices will doubtless want to use it to lock up content) Finally as with CPRM print a warning so that the user knows they may not be able to full access and use the device. Signed-off-by: Alan Cox commit ffe188dd83e84119516688c822388c8f30a54877 Author: Peter Schwenke Date: Thu Jan 17 23:08:55 2008 +1000 ata_piix: Add Toshiba Satellite R20 and Tecra M6 to broken suspend list. Add Toshiba Satellite R20 and Tecra M6 to broken suspend list. Matt Piermarini reported and provided the M6 patch. This is from OSDL bug 7780. Signed-off-by: Peter Schwenke Cc: Matt Piermarini Acked-by: Tejun Heo Signed-off-by: Jeff Garzik commit ed2b91701d97047fa9970645e43d5e551e261adb Author: Steve French Date: Sun Jan 20 00:30:29 2008 +0000 [CIFS] Do not log path names in lookup errors Andi Kleen noticed that we were logging access denied errors (which is noisy in the dmesg log, and not needed to be logged) and that we were logging path names on that an other errors (e.g. EIO) which we should not be doing. CC: Andi Kleen Signed-off-by: Steve French commit 15e7b4452b72ae890f2fcb027b4c4fa63a1c9a7a Author: Sebastian Siewior Date: Mon Jan 14 17:07:57 2008 +1100 [CRYPTO] twofish: Merge common glue code There is almost no difference between 32 & 64 bit glue code. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 465ff3185e0cb76d46137335a4d21d0d9d3ac8a2 Author: James Bottomley Date: Tue Jan 1 10:00:10 2008 -0600 [SCSI] relax scsi dma alignment This patch relaxes the default SCSI DMA alignment from 512 bytes to 4 bytes. I remember from previous discussions that usb and firewire have sector size alignment requirements, so I upped their alignments in the respective slave allocs. The reason for doing this is so that we don't get such a huge amount of copy overhead in bio_copy_user() for udev. (basically all inquiries it issues can now be directly mapped). Acked-by: Alan Stern Signed-off-by: James Bottomley commit 11c3e689f1c3a73e3af7b0ea767b1b0626da8033 Author: James Bottomley Date: Mon Dec 31 16:37:00 2007 -0600 [SCSI] block: Introduce new blk_queue_update_dma_alignment interface The purpose of this is to allow stacked alignment settings, with the ultimate queue alignment being set to the largest alignment requirement in the stack. The reason for this is so that the SCSI mid-layer can relax the default alignment requirements (which are basically causing a lot of superfluous copying to go on in the SG_IO interface) while allowing transports, devices or HBAs to add stricter limits if they need them. Acked-by: Jens Axboe Signed-off-by: James Bottomley commit 166a72878f76e911f2d1ce4b2310d4403e94be11 Author: FUJITA Tomonori Date: Tue Jan 8 07:59:05 2008 +0900 [SCSI] fix scsi_setup_command_freelist failure path race Looks like that host_cmd_pool_mutex are necessary here. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 210ba1d1724f5c4ed87a2ab1a21ca861a915f734 Author: James Bottomley Date: Sat Jan 5 10:39:51 2008 -0600 [SCSI] sr: update to follow tray status correctly Based on an original patch from: David Martin When trying to get the drive status via ioctl CDROM_DRIVE_STATUS, with no disk it gives CDS_TRAY_OPEN even if the tray is closed. ioctl works as expected with ide-cd driver. Gentoo bug report: http://bugs.gentoo.org/show_bug.cgi?id=196879 Cc: Maarten Bressers Signed-off-by: James Bottomley commit 32e8ae36b8f80372015b88b63c4358a376c9af0f Author: James Bottomley Date: Sun Dec 30 12:37:31 2007 -0600 [SCSI] libsas: don't use made up error codes This is bad for two reasons: 1. If they're returned to outside applications, no-one knows what they mean. 2. Eventually they'll clash with the ever expanding standard error codes. The problem error code in question is ETASK. I've replaced this by ECOMM (communications error on send) a network error code that seems to most closely relay what ETASK meant. Acked-by: Darrick J. Wong Signed-off-by: James Bottomley commit 2d507a01dac338831266b44ccbb01c69e84606ed Author: James Bottomley Date: Sat Dec 29 10:59:53 2007 -0600 [SCSI] libsas, bsg: pass errors through correctly Currently in BSG, errors returned in req->errors aren't passed back to the calling programme (either via SG_IO or via read/write). Fix this, while preserving the SCSI convention of returning status in req->errors. Now update libsas to return errors correctly instead of to ignore them. Acked-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 2d4b63e1505b317d4253cee3f2970792ec6d41cb Author: James Bottomley Date: Sat Dec 29 11:49:53 2007 -0600 [SCSI] libsas: don't treat underrun as an error on SMP tasks All SMP tasks sent through bsg generate messages like: sas: smp_execute_task: task to dev 500605b000001450 response: 0x0 status 0x81 Three times (because the task gets retried). Firstly, don't retry either overrun or underrun (the data buffer isn't going to change size) and secondly, just report the underrun but don't set an error for it. This is necessary so bsg can report back the residual. Signed-off-by: James Bottomley commit b98e66fa0b687149dc3b26179096dc542c7d5001 Author: James Bottomley Date: Fri Dec 28 16:35:17 2007 -0600 [SCSI] libsas: add host SMP processing This adds support for host side SMP processing, via a separate SMP interpreter file. Signed-off-by: James Bottomley commit 38b3167f75c9508156b974d19692c19b78292e2e Author: FUJITA Tomonori Date: Sun Dec 30 19:34:52 2007 +0900 [SCSI] mpt fusion: make mptsas_smp_handler update resid This patch fixes mptsas_smp_handler to update both din_resid or dout_resid on success. bsg can report back the residual. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit fdf234527a070f6fc89f3ec5ee4ae1b263e59939 Author: Christof Schmitt Date: Thu Dec 20 12:30:27 2007 +0100 [SCSI] zfcp: Hold queue lock when checking port/unit handle for task management cmd We need to hold the queue-lock when checking whether we still have a valid unit/port handle for the task management command, i.e whether we can issue this request for this unit/port. If the error recovery is about to close this unit/port, then it competes for the queue-lock. If the close request issued by the error recovery wins, then it is guaranteed that this unit/port has been blocked for other requests. Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit ba1724202aafed4bbc4a239ac6fb433f454fddea Author: Christof Schmitt Date: Thu Dec 20 12:30:26 2007 +0100 [SCSI] zfcp: Hold queue lock when checking port/unit handle for FCP command We need to hold the queue-lock when checking whether we still have a valid unit/port handle for the FCP command, i.e whether we can issue this request for this unit/port. If the error recovery is about to close this unit/port, then it competes for the queue-lock. If the close request issued by the error recovery wins, then it is guaranteed that this unit/port has been blocked for other requests. Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit 3f0ca62add34010241db682e63bb68ba765bf4a9 Author: Christof Schmitt Date: Thu Dec 20 12:30:25 2007 +0100 [SCSI] zfcp: Hold queue lock when checking port handle for ELS command We need to hold the queue-lock when checking whether we still have a valid port handle for the ELS command, i.e whether we can issue this request for this port. If the error recovery is about to close this port, then it competes for the queue-lock. If the close request issued by the error recovery wins, then it is guaranteed that this port has been blocked for other requests. Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit 951f746fece2e24a26853b3872d16e9013b6fe0b Author: Christof Schmitt Date: Thu Dec 20 12:30:24 2007 +0100 [SCSI] zfcp: Hold queue lock when checking port/unit handle for abort command We need to hold the queue-lock when checking whether we still have a valid unit/port handle for the abort command, i.e whether we can issue this request for this unit/port. If the error recovery is about to close this unit/port, then it competes for the queue-lock. If the close request issued by the error recovery wins, then it is guaranteed that this unit/port has been blocked for other requests. Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit 8627533c115c546649693d68fed6a74762c47d51 Author: Christof Schmitt Date: Thu Dec 20 12:30:23 2007 +0100 [SCSI] zfcp: Fix evaluation of port handles in abort handler According to the FSF spec, word 0 (bytes 0-3) has the handle specified with the abort command and word 1 (bytes 4-7) has the handle for the command to be aborted. Fix the if statements that try to compare those. Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit d1ad09db2fd551d49d65ef040591cb9298e70fb6 Author: Heiko Carstens Date: Thu Dec 20 12:30:22 2007 +0100 [SCSI] zfcp: fix use after free bug. zfcp_erp_strategy_check_fsfreq() checks if it is safe to access the fsf_req associated with the erp_action that gets passed. To test if it is safe it accesses the fsf_req in order to get its index into the hash list. This is broken since the fsf_req might be freed already and the read index has no meaning. It could lead to memory corruption. Fix this by introducing a new zfcp_reqlist_find_safe() method which just checks if addresses are equal. This is slower, but only gets called in case of error recovery. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Signed-off-by: Christof Schmitt Signed-off-by: Martin Peschke Signed-off-by: James Bottomley commit bfd90dce248a49ced2b7419ecf78af9f7f37039e Author: Adrian Bunk Date: Tue Dec 11 23:23:31 2007 +0100 [SCSI] megaraid: add __devexit annotation megaraid_remove_one() can become __devexit. Signed-off-by: Adrian Bunk Acked-by: "Patro, Sumant" Signed-off-by: James Bottomley commit 3be38e7a351a88e0fcf1565661cc94d1992fcad9 Author: Roel Kluin <12o3l@tiscali.nl> Date: Thu Nov 15 21:13:46 2007 +0100 [SCSI] atari_NCR5380, sun3_NCR5380: operator precedence fix SR_REQ is defined 0x20, but bitanding has no effect because '!' has a higher priority than '&' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: James Bottomley commit 0033bb477e93f5f6ce9dae7a1f2aa5e5a8ebabd3 Author: Swen Schillig Date: Tue Dec 18 11:16:14 2007 +0100 [SCSI] zfcp: update MAINTAINERS we are planning a major rewrite of the zfcp driver, meaning that a lot of patches will hit the mailing-list in the near future. Since I can't support this additional work-load along with my other responsibilities we are shifting the maintainership to Christof Schmitt as the maintainer and Martin Peschke as the co-maintainer. Please support the two in providing us a new and more stable zfcp environment. Thanks Swen Signed-off-by: James Bottomley commit 103962380ec3d86e675fc735e3e2b2fc8decaae9 Author: Mike Christie Date: Thu Dec 13 12:43:43 2007 -0600 [SCSI] iscsi class: bump version Update version. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit df93ffcd748ce41e7b716c3056ae511939bb745e Author: Mike Christie Date: Thu Dec 13 12:43:42 2007 -0600 [SCSI] iscsi_tcp: fix setting of r2t If we negotiate for X r2ts we have to use only X r2ts. We cannot round up (we could send less though). It is ok to fail if it is not something the driver can handle, so this patch just does that. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 118365721768f29d74718a59895ed7bd3c10b68e Author: vignesh babu Date: Thu Dec 13 12:43:41 2007 -0600 [SCSI] libiscsi: use is_power_of_2 Replacing n & (n - 1) for power of 2 check by is_power_of_2(n) Signed-off-by: vignesh babu Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 4545a88fc1ae2c0cd1da6e35f3adcbc56ff27b07 Author: Mike Christie Date: Thu Dec 13 12:43:40 2007 -0600 [SCSI] iscsi_tcp: hold lock during data rsp processing iscsi_data_rsp needs to hold the sesison lock when it calls iscsi_update_cmdsn. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 66bbe0ce11c7ebe20cd1d4b5d271b2e124e223c5 Author: Mike Christie Date: Thu Dec 13 12:43:39 2007 -0600 [SCSI] iscsi_tcp: enable sg chaining The previous patches converted iscsi_tcp to support sg chaining. This patch sets the proper flags and sets sg_table size to 4096. This allows fs io to be capped at max_sectors, but passthrough IO to be limited by some other part of the kernel. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 4cd49ea1330c946db00a28819b766062716aa857 Author: Mike Christie Date: Thu Dec 13 12:43:38 2007 -0600 [SCSI] libiscsi, iscsi class: set tmf to a safe default and export in sysfs Older tools will not be setting the tmf time outs since they did not exists, so set them to a safe default. And export abort and lu reset timeout values in sysfs. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 7a53dc52a5f218bf306b875bf0610e851d5a8268 Author: Mike Christie Date: Thu Dec 13 12:43:37 2007 -0600 [SCSI] iscsi_tcp: drop session when itt does not match any command A target should never send us a itt that does not match a running task. If it does we do not really know what is coming down after the header, unless we evaluate the hdr and do some guessing sometimes. However, even if we know what is coming we probably do not have buffers for it or we cannot respond (if it is a r2t for example), so just drop the session. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 03766a1d4e4520066d3ed2097bfdf6e606aba828 Author: Olaf Kirch Date: Thu Dec 13 12:43:36 2007 -0600 [SCSI] iscsi_tcp: stop leaking r2t_info's when the incoming R2T is bad iscsi_r2t_rsp checks the incoming R2T for sanity, and if it thinks it's fishy, it will drop it silently. In this case, we leaked an r2t_info object. If we do this often enough, we run into a BUG_ON some time later. Removed r2t wrappers and update patch by Mike Christie Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit a8ac6311cc21d78fa284cd43f56df2063f536bf1 Author: Olaf Kirch Date: Thu Dec 13 12:43:35 2007 -0600 [SCSI] iscsi: convert xmit path to iscsi chunks Convert xmit to iscsi chunks. from michaelc@cs.wisc.edu: Bug fixes, more digest integration, sg chaining conversion and other sg wrapper changes, coding style sync up, and removal of io fields, like pdu_sent, that are not needed. Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 1040c99d9fd9de2bf00efae6d91014f890575bdb Author: Mike Christie Date: Thu Dec 13 12:43:34 2007 -0600 [SCSI] libiscsi: Drop host lock in queuecommand The driver does not need the host lock in queuecommand so drop it. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit c1635cb786dbadd16fd6e6959dd3b41ae2f2831a Author: Mike Christie Date: Thu Dec 13 12:43:33 2007 -0600 [SCSI] libiscsi: clear conn->ctask when task is completed early If the current ctask is failed early, we legt the conn->ctask pointer pointing to a invalid task. When the xmit thread would send data for it, we would then oops. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 9000bcd649b26aef4c35d2941f8a65f05bbb9ee1 Author: Mike Christie Date: Thu Dec 13 12:43:32 2007 -0600 [SCSI] libiscsi: Do not fail commands immediately during logout If the target requests a logout, then we do not want to fail commands to scsi-ml right away. This patch just fails in pending commands for a requeue immediately, and then lets iscsid handle running commands like normal recovery. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit bca1088a8194f4fc850b65ea4f324c15d47d3cc3 Author: FUJITA Tomonori Date: Thu Dec 13 12:43:31 2007 -0600 [SCSI] iscsi_tcp: update the website URL Use open-iscsi.org instead of linux-iscsi.sf.net, which hasn't been updated for ages. Signed-off-by: FUJITA Tomonori Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit f6d5180c78780d63b0577edeb3ce41eeb3e93eea Author: Mike Christie Date: Thu Dec 13 12:43:30 2007 -0600 [SCSI] libiscsi: fix nop handling During root boot and shutdown the target could send us nops. At this time iscsid cannot be running, so the target will drop the session and the boot or shutdown will hang. To handle this and allow us to better control when to check the network this patch moves the nop handling to the kernel. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 2697478903d0ad8bdbf868b1346ae4b891662bb1 Author: Mike Christie Date: Thu Dec 13 12:43:29 2007 -0600 [SCSI] libiscsi: fix shutdown We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 this will not work because the sysfs delete file returns immediately and does not wait for the device removal to complete. This causes a hang if a cache sync is needed during shutdown. Before .21, that approach had other problems, so this patch fixes the shutdown code so that we remove the target and unbind the session before logging out and shut down the session Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit bc436b278776d22eb10e7e75bf3e5257d14550a9 Author: Mike Christie Date: Thu Dec 13 12:43:28 2007 -0600 [SCSI] libiscsi: grab eh_mutex during host reset I thought we may not need the eh mutex during host reset, but that is wrong with the new shutdown code. When start_session_recovery sets the state to terminate then drops the session lock. The scsi eh thread could then grab the session lock see that we are terminating and then return failed to scsi-ml. scsi-ml's eh then owns the command and will do whatever it wants with it. But then the iscsi eh thread could grab the session lock and want to complete the scsi commands that we in the LLD, but it no longer owns them and kaboom. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit d8bf541e657824cb03effd726ac96e2f4dcf58a5 Author: Mike Christie Date: Thu Dec 13 12:43:27 2007 -0600 [SCSI] iscsi class: Use our own workq instead of common system one. There is just too much going on through the common workq and something like a scsi device removal through sysfs affects how long it will take to recover the transport, mark it as failed, or shut it down gracefully. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit b3a7ea8d50f6028964b468d13a095dfb2508b2fb Author: Mike Christie Date: Thu Dec 13 12:43:26 2007 -0600 [SCSI] libiscsi: do not block session during logout There is not need to block the session during logout. Since we are going to fail the commands that were blocked just fail them immediately instead. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 6320377fd94316e58f75d0be6f6e7a644950a4ee Author: Olaf Kirch Date: Thu Dec 13 12:43:25 2007 -0600 [SCSI] libiscsi, iscsi_tcp: iscsi pool cleanup iscsi_pool_init simplified iscsi_pool_init currently has a lot of duplicate kfree() calls it does when some allocation fails. This patch simplifies the code a little by using iscsi_pool_free to tear down the pool in case of an error. iscsi_pool_init also returns a copy of the item array to the caller. Not all callers use this array, so we make it optional. Instead of allocating a second array and return that, allocate just one array, of twice the size. Update users of iscsi_pool_{init,free} This patch drops the (now useless) second argument to iscsi_pool_free, and updates all callers. It also removes the ctask->r2ts array, which was never used anyway. Since the items argument to iscsi_pool_init is now optional, we can pass NULL instead. Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 38ad03de3fd350e683213ddf898a7049534628a8 Author: Boaz Harrosh Date: Thu Dec 13 12:43:24 2007 -0600 [SCSI] libiscsi,iser: patch for AHS support - The default initialization of hdr_max is the minimum - sizeof(struct iscsi_cmd) - Once this patch goes into iser the default initialization at libiscsi can be removed. - This is not yet full support for AHSs at iser end. But it should be easy. Just allocate more space at iser_desc right after iscsi_hdr. Than at transmission time use ctask->hdr_len to retrieve the total size of all iscsi pdu headers. See previous patch at iscsi_tcp.[ch] Signed-off-by: Boaz Harrosh Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 004d6530f83bee43a55b51bb5960db96e7ae0ffa Author: Boaz Harrosh Date: Thu Dec 13 12:43:23 2007 -0600 [SCSI] iscsi_tcp, libiscsi: initial AHS Support at libiscsi generic code - currently code assumes a storage space of pdu header is allocated at llds ctask and is pointed to by iscsi_cmd_task->hdr. Here I add a hdr_max field pertaining to that storage, and an hdr_len that accumulates the current use of the pdu-header. - Add an iscsi_next_hdr() inline which returns the next free space to write new Header at. Also iscsi_next_hdr() is used to retrieve the address at which to write the header-digest. - Add iscsi_add_hdr(length). What the user do is calls iscsi_next_hdr() for address of the new header, than calls iscsi_add_hdr(length) with the size of the new header. iscsi_add_hdr() will check if space is available and update to the new size. length must be padded according to standard. - Add 2 padding inline helpers thanks to Olaf. Current patch does not use them but Following patches will. Also moved definition of ISCSI_PAD_LEN to iscsi_proto.h which had PAD_WORD_LEN that was never used anywhere. - Let iscsi_prep_scsi_cmd_pdu() signal an Error return since now it is possible that it will fail. - I was tired of yet again writing a "this is a digest" comment next to sizeof(__u32) so I defined a new ISCSI_DIGEST_SIZE. Now I don't need any comments. Changed all places that used sizeof(__u32) or "4" in connection to a digest. iscsi_tcp specific code - At struct iscsi_tcp_cmd_task allocate maximum space allowed in standard for all headers following the iscsi_cmd header. and mark it so in iscsi_tcp_session_create() - At iscsi_send_cmd_hdr() retrieve the correct headers size and write header digest at iscsi_next_hdr(). Signed-off-by: Boaz Harrosh Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 7207fea452cfdd2d4e2f4419e2c31f570edbade3 Author: Boaz Harrosh Date: Thu Dec 13 12:43:22 2007 -0600 [SCSI] iscsi: Prettify resid handling and some extra checks - Check to see that OVERFLOW is not negative indicating a bug. - Unify handling of UNDERFLOW and OVERFLOW to the same code. - Also handle BIDI_OVERFLOW. Signed-off-by: Boaz Harrosh Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit da32dd681f7a1a17073c42b375fc23cf73c92155 Author: Olaf Kirch Date: Thu Dec 13 12:43:21 2007 -0600 [SCSI] iscsi_tcp: rewrite recv path Rewrite recv path. Fixes: - data digest processing and error handling. - ahs support. Some fixups by Mike Christie Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 843c0a8a76078cf961b244b839683d0667313740 Author: Mike Christie Date: Thu Dec 13 12:43:20 2007 -0600 [SCSI] libiscsi, iscsi_tcp: add device support This patch adds logical unit reset support. This should work for ib_iser, but I have not finished testing that driver so it is not hooked in yet. This patch also temporarily reverts the iscsi_tcp r2t write out patch. That code is completely rewritten in this patchset. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 8ae732a91df051aba6820068a47b631a06599d84 Author: Tejun Heo Date: Fri Dec 7 22:36:23 2007 +0900 [SCSI] make pcmcia directory use obj-y|m instead of subdir-y|m subdir-y|m isn't supposed to contain modules or built-in components. Change subdir-$(CONFIG_PCMCIA) to obj-$(CONFIG_PCMCIA). Signed-off-by: Tejun Heo Acked-by: Sam Ravnborg Signed-off-by: James Bottomley commit b7d68ca3f055b90bb782bcfcf535f54cead7d7db Author: Denis Cheng Date: Thu Dec 13 16:14:27 2007 -0800 [SCSI] ipr: use LIST_HEAD instead of LIST_HEAD_INIT Signed-off-by: Denis Cheng Acked-by: Brian King Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 230e886e7bd663ff2e83cdeede12d7f09b9d3711 Author: Jeff Garzik Date: Thu Dec 13 16:14:12 2007 -0800 [SCSI] gdth: kill unneeded 'irq' argument Neither gdth_get_status() nor __gdth_interrupt() need their 'irq' argument, so remove it. [akpm@linux-foundation.org: coding style fixes] Signed-off-by: Jeff Garzik Acked-by: Boaz Harrosh Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 736f77deaf6b0bf51eaab1ea5d074adc11b8c7cd Author: Jeff Garzik Date: Thu Dec 13 16:14:13 2007 -0800 [SCSI] sym53c416: kill pointless irq handler loop and test - kill pointless irq handler loop to find base address, it is already passed to irq handler via Scsi_Host. - kill now-pointless !base test. Signed-off-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit baa9aac6a15a1990e9d2d7a5648f53dfccc440ad Author: Jeff Garzik Date: Thu Dec 13 16:14:14 2007 -0800 [SCSI] NCR5380: minor irq handler cleanups * remove unnecessary cast * remove unnecessary use of 'irq' function arg Signed-off-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit fc9b5118823e84b4ed0acddd99c1e453298e103d Author: Andrew Morton Date: Thu Dec 13 16:14:23 2007 -0800 [SCSI] sgiwd93: export sgiwd93_reset() mips allmodconfig: ERROR: "sgiwd93_reset" [drivers/scsi/wd33c93.ko] undefined! Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 94cf6ba11b068b8a8f68a1e88bffb6827e92124b Author: Salyzyn, Mark Date: Thu Dec 13 16:14:18 2007 -0800 [SCSI] aacraid: fix driver failure with Dell PowerEdge Expandable RAID Controller 3/Di As reported in http://bugzilla.kernel.org/show_bug.cgi?id=3D9133 it was discovered that the PERC line of controllers lacked a key 64 bit ScatterGather capable SCSI pass-through function. The adapters are still capable of 64 bit ScatterGather I/O commands, but these two can not be mixed. This problem was exacerbated by the introduction of the SCSI Generic access to the DASD physical devices. The fix for users before this patch is applied is aacraid.dacmode=3D0 on the kernel command line to disable 64 bit I/O. The enclosed patch introduces a new adapter quirk and tries to limp along by enabling pass-through in situations where memory is 32 bit addressable on 64 bit machines, or disable the pass-through functions altogether. I expect that the check for 32 bit addressable memory to be controversial in that it can be incorrect in non-Dell non-Intel systems that PERC would never be installed under, the alternative is to disable pass-through in all cases which could be reported as another regression. Pass-through is used for SCSI Generic access to the physical devices, or for the management applications to properly function. In systems where this patch has disabled pass-through because it is unsupportable in combination with I/O performance, the user can choose to enable pass-through by turning off dacmode (aacraid.dacmode=3D0) or limiting the discovered kernel memory (mem=3D4G) with an associated loss in runtime performance. If we chose instead to turn off 64 bit dacmode for the adapters with this quirk, then this would be reported as another regression. Signed-off-by: Mark Salyzyn Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 00f5970193e22c48f399a2430635d6416b51befe Author: HighPoint Linux Team Date: Thu Dec 13 16:14:26 2007 -0800 [SCSI] hptiop: add more adapter models and other fixes Most code changes were made to support adapters based on Marvell IOP, plus some other fixes. - add more PCI device IDs - support for adapters based on Marvell IOP - fix a result code translation error on big-endian systems - fix resource releasing bug when scsi_host_alloc() fail in hptiop_probe() - update scsi_cmnd.resid when finishing a request - correct some coding style issues [akpm@linux-foundation.org: type fixes] Signed-off-by: HighPoint Linux Team Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit a7ed0448e28ce6154390bf690b8b5c37853732dc Author: Randy Dunlap Date: Mon Oct 29 11:20:35 2007 -0700 [SCSI] aic94xx: fix section mismatches Fix section mismatch warning: WARNING: vmlinux.o(.init.text+0x23be6): Section mismatch: reference to .exit.text:asd_unmap_ha (between 'asd_pci_probe' and 'qla4xxx_module_init') + WARNING: vmlinux.o(.text+0x1ec8a8): Section mismatch: reference to .exit.text:as d_unmap_ioport (between 'asd_unmap_ha' and 'asd_remove_dev_attrs') WARNING: vmlinux.o(.text+0x1ec8b1): Section mismatch: reference to .exit.text:as d_unmap_memio (between 'asd_unmap_ha' and 'asd_remove_dev_attrs') Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit 2551a13e61d3c3df6c2da6de5a3ece78e6d67111 Author: Jeff Garzik Date: Thu Dec 13 16:14:10 2007 -0800 [SCSI] ips: handle scsi_add_host() failure, and other err cleanups Signed-off-by: Jeff Garzik Acked-by: "Salyzyn, Mark" Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 21e1a5f26c437591f67779a97e5cc95ebbb02e90 Author: Jeff Garzik Date: Thu Dec 13 16:14:09 2007 -0800 [SCSI] ips: PCI API cleanups * pass Scsi_Host to ips_remove_device() via pci_set_drvdata(), allowing us to eliminate the ips_ha[] search loop and call ips_release() directly. * call pci_{request,release}_regions() and eliminate individual request/release_[mem_]region() calls * call pci_disable_device(), paired with pci_enable_device() * s/0/NULL/ in a few places * check ioremap() return value Signed-off-by: Jeff Garzik Acked-by: "Salyzyn, Mark" Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 2f277d6a719064f830211d0a0e104a37da2ac116 Author: Jeff Garzik Date: Thu Dec 13 16:14:08 2007 -0800 [SCSI] ips: trim trailing whitespace [akpm@linux-foundation.org: coding style fixes] Signed-off-by: Jeff Garzik Acked-by: "Salyzyn, Mark" Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 8a694cc87a1f9640aac9a9a278a8673e35a5e507 Author: Jeff Garzik Date: Thu Dec 13 16:14:07 2007 -0800 [SCSI] ips: remove ips_ha members that duplicate struct pci_dev members Signed-off-by: Jeff Garzik Acked-by: "Salyzyn, Mark" Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 864473bbbbcbe99e95a57ad496894768cd77a567 Author: Randy Dunlap Date: Mon Oct 29 11:20:40 2007 -0700 [SCSI] sym2: fix section mismatch warning Fix section mismatch warning: WARNING: vmlinux.o(.text+0x1ff3a2): Section mismatch: reference to .exit.text:sym2_remove (between 'sym2_io_error_detected' and 'sym_xpt_done') Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit a6ababd26aac6ef875df2055dcc147ccda2f8364 Author: Adrian Bunk Date: Mon Nov 5 18:07:33 2007 +0100 [SCSI] lpfc: minor cleanups This patch contains the following minor cleanups: - make the following needlessly global functions static: - lpfc_els.c: lpfc_register_new_vport() - lpfc_els.c: lpfc_issue_els_fdisc() - lpfc_els.c: lpfc_issue_fabric_iocb() - lpfc_els.c: lpfc_fabric_abort_vport() - lpfc_hbadisc.c: lpfc_dev_loss_tmo_handler() - lpfc_hbadisc.c: lpfc_mbx_cmpl_clear_la() - lpfc_hbadisc.c: lpfc_disc_flush_list() - lpfc_hbadisc.c: __lpfc_find_node() - lpfc_init.c: lpfc_hb_timeout() - lpfc_init.c: lpfc_block_mgmt_io() - lpfc_sli.c: __lpfc_sli_release_iocbq() - lpfc_sli.c: lpfc_sli_next_hbq_slot() - lpfc_sli.c: lpfc_sli_hbqbuf_init_hbqs() - lpfc_sli.c: lpfc_sli_hbqbuf_find() - lpfc_sli.c: __lpfc_sli_issue_iocb() - #if 0 the following unused global functions: - lpfc_els.c: lpfc_fabric_abort_flogi() - lpfc_hbadisc.c: lpfc_find_node() - lpfc_hbadisc.c: lpfc_findnode_rpi() - remove the unused exports Signed-off-by: Adrian Bunk Acked-by: James Smart Signed-off-by: James Bottomley commit 001aac257cf8adbe90cdcba6e07f8d12dfc8fa6b Author: James Bottomley Date: Sun Dec 2 19:10:40 2007 +0200 [SCSI] sd,sr: add early detection of medium not present The current scsi_test_unit_ready() is updated to return sense code information (in struct scsi_sense_hdr). The sd and sr drivers are changed to interpret the sense code return asc 0x3a as no media and adjust the device status accordingly. Signed-off-by: James Bottomley commit 4a03d90e35bc5273d27301fa669d4b2103196f94 Author: Rusty Russell Date: Mon Nov 19 11:28:48 2007 +1100 [SCSI] BUG_ON() impossible condition in sg list counting If blk_rq_map_sg wrote more than was allocated in the scatterlist, BUG_ON() is probably the right thing to do. [jejb: rejections fixed up] Signed-off-by: Rusty Russell Acked-by: Jens Axboe Signed-off-by: James Bottomley commit a8aae4d3427a5cf7c92b50125e35ea6cb9ba7394 Author: Randy Dunlap Date: Thu Nov 15 11:53:25 2007 +0200 [SCSI] tgt: fix build when dprintk is defined Fix scsi_tgt_lib build when dprintk is defined: Also fix accessors problem when dprintk is defined drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_cmd_destroy': drivers/scsi/scsi_tgt_lib.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int' drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_cmd_done': drivers/scsi/scsi_tgt_lib.c:330: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int' drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_transfer_response': drivers/scsi/scsi_tgt_lib.c:345: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int' drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_init_cmd': drivers/scsi/scsi_tgt_lib.c:368: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int' drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_kspace_exec': drivers/scsi/scsi_tgt_lib.c:499: warning: format '%lu' expects type 'long unsigned int', but argument 9 has type 'unsigned int' drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_kspace_it_nexus_rsp': drivers/scsi/scsi_tgt_lib.c:620: error: 'mid' undeclared (first use in this function) drivers/scsi/scsi_tgt_lib.c:620: error: (Each undeclared identifier is reported only once drivers/scsi/scsi_tgt_lib.c:620: error: for each function it appears in.) make[2]: *** [drivers/scsi/scsi_tgt_lib.o] Error 1 [tomo: > - dprintk("%d %d %llx\n", host_no, result, (unsigned long long) mid); > + dprintk("%d %d\n", host_no, result); 'mid' is a typo. I wanted to do: dprintk("%d %d %llx\n", host_no, result, (unsigned long long)itn_id); The rest looks ok. Thanks, ] Signed-off-by: Randy Dunlap Signed-off-by: Boaz Harrosh Acked-by: FUJITA Tomonori Signed-off-by: James Bottomley commit f3307f7276067e2f8f29a20e3ebe52887e8f9f00 Author: Christoph Hellwig Date: Thu Nov 8 17:27:47 2007 +0000 [SCSI] aacraid: don't assign cpu_to_le32(int) to u8 On Wed, Nov 07, 2007 at 01:51:44PM -0500, Salyzyn, Mark wrote: > Christoph Hellwig [mailto:hch@infradead.org] sez: > > Did anyone run the driver through sparse to see if we have > > more issues like this? > > There are some warnings from sparse, none like this one. I will deal > with the warnings ... Actually there are a lot of endianess warnings, fortunately most of them harmless. The patch below fixes all of them up (including the ones in the patch I replied to), except for aac_init_adapter which is really odd and I don't know what to do. [jejb fixed up rejections and checkpatch issues] Signed-off-by: Christoph Hellwig Acked-by: Mark Salyzyn Signed-off-by: James Bottomley commit 3fb8931645e23785ee406444a782ba03c31d0e71 Author: Andrew Vasquez Date: Mon Nov 12 10:31:00 2007 -0800 [SCSI] qla2xxx: Update version number to 8.02.00-k6. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit f4a8dbc7f6ca8c0a7ec4f112320899b6b77d7e17 Author: Shyam Sundar Date: Mon Nov 12 10:30:59 2007 -0800 [SCSI] qla2xxx: Properly handle Vport state-change-notifications. Drivers do SCRs for each Vport. When something changes in the fabric, firmware generates one interrupt for each RSCN. Based on the current implementation, in each case, we make recursive calls to handle RSCN for physical and each subsequent virtual ports. The fix is to also take into consideration the vp_idx, which is set by the firmware to indicate the vport the RSCN was meant for. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit eb66dc60be5a72bc940458a5adfd400e4d810d49 Author: Andrew Vasquez Date: Mon Nov 12 10:30:58 2007 -0800 [SCSI] qla2xxx: Correct NPIV support for recent ISPs. Firmware will export to software the maximum number of vports supported for any given firmware version and ISP type. Use this information rather than the current hardcoding of limitations within the driver. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 06e23b7470ca7974b0ca8150c5415b55b5ea2a99 Author: Andrew Vasquez Date: Mon Nov 12 10:30:57 2007 -0800 [SCSI] qla2xxx: Don't explicitly read mbx registers while processing a system-error. Callers of qla2x00_async_event() already populate the mb[] array upon invocation, doing so via the appropriate mailbox register accessors. The stale codes removed are leftover-bits kept during the FWI2 transition. Though relatively benign, the extra-reads are not valid for FWI2 boards (ISP24xx and above) and peek into the incorrect regions of registers. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley commit 860784c8a2b077157b6a51fb8749524d0363cc49 Author: Robert Jennings Date: Mon Nov 12 09:00:23 2007 -0600 [SCSI] ibmvscsi: requeue while CRQ closed CRQ send errors that return with H_CLOSED should return with SCSI_MLQUEUE_HOST_BUSY until firmware alerts the client of a CRQ transport event. The transport event will either reinitialize and requeue the requests or fail and return IO with DID_ERROR. To avoid failing the eh_* functions while re-attaching to the server adapter this will retry for a period of time while ibmvscsi_send_srp_event returns SCSI_MLQUEUE_HOST_BUSY. In ibmvscsi_eh_abort_handler() the loop includes the search of the event list. The lock on the hostdata is dropped while waiting to try again after failing ibmvscsi_send_srp_event. The event could have been purged if a login was in progress when the function was called. In ibmvscsi_eh_device_reset_handler() the loop includes the call to get_event_struct() because a failing call to ibmvscsi_send_srp_event() will have freed the event struct. Signed-off-by: Robert Jennings Signed-off-by: Brian King Signed-off-by: James Bottomley commit dc8875e1078961591af4fbf9556c44648bf28d11 Author: Randy Dunlap Date: Thu Nov 15 15:42:30 2007 -0800 [SCSI] docbook and kernel-doc updates - Change title to remove "Mid-Layer" since the doc is about all of the SCSI layers. - Use "SCSI" instead of "scsi" in docbook text. - Use "*/" to end kernel-doc notation blocks. - A few other minor typo fixes. Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit c93ff979a40e99f7229544cc8298c820b8eda17e Author: Randy Dunlap Date: Thu Nov 15 17:07:28 2007 -0800 [SCSI] kernel-doc: use correct function name Use correct function name in kernel-doc. Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit 6af6632a1c1cac169fe7fbedb2f642b4ebb38323 Author: Randy Dunlap Date: Wed Nov 14 16:52:25 2007 -0800 [SCSI] boot options: correct option name and tell where to find docs for it Minor corrections and additions to 'scsi_logging_level', as pointed out by Chuck Ebbert. Also point out the IBM S390-tools 'scsi_logging_level' script. Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley commit 25d7c363f2663fe399e623c9bd819258c9760bdc Author: Tony Battersby Date: Mon Nov 12 10:00:44 2007 -0500 [SCSI] move single_lun flag from scsi_device to scsi_target Some SCSI tape medium changers that need the BLIST_SINGLELUN flag have the medium changer at one LUN and the tape drive at a different LUN. The inquiry string of the tape drive may be different from that of the medium changer. In order for single_lun to be effective, every scsi_device under a given scsi_target must have it set. This means that there needs to be a blacklist entry for BOTH the medium changer AND the tape drive, which is impractical because some medium changers may be paired with a variety of different tape drive models. It makes more sense to put the single_lun flag in scsi_target instead of scsi_device, which causes every device at a given target ID to inherit the single_lun flag from one LUN. This makes it possible to blacklist just the medium changer and not the tape drive. Signed-off-by: Tony Battersby Signed-off-by: James Bottomley commit f28cd7cf8f696eafe42d1632b5a306fbf784d3cd Author: bo yang Date: Fri Nov 9 04:44:56 2007 -0500 [SCSI] megaraid_sas: Update version and changelog Update version and changelog Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit ad84db2e2e1817bb8a29e7c9108eb66bf023d99f Author: bo yang Date: Fri Nov 9 04:40:16 2007 -0500 [SCSI] megaraid_sas: support for poll_mode_io (reduced interrupt) Added module parameter "poll_mode_io" to support for "polling" (reduced interrupt operation). In this mode, IO completion interrupts are delayed. At the end of initiating IOs, the driver schedules for cmd completion if there are pending cmds. A timer-based interrupt has also been added to prevent IO completion from being delayed indefinitely in the case that no new IOs are initiated. Some formatting issues in resume, suspend comment block also corrected Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit 7343eb6570ae3b299e7b5185b139d8335ef60e9b Author: bo yang Date: Fri Nov 9 04:35:44 2007 -0500 [SCSI] megaraid_sas: call cmd completion from reset Driver will call cmd completion routine from Reset path without waiting for cmd completion from isr context. Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit b10c36a57552f03582c0ab3ece04f3cce791922d Author: bo yang Date: Fri Nov 9 04:28:47 2007 -0500 [SCSI] megaraid_sas: use unsigned long for sense_buff ptr MegaRAID utilities expect sense_buff to be of type unsigned long. Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit 14faea9f7fe1e8805629b50cf14a65a85fe4a4fd Author: bo yang Date: Fri Nov 9 04:14:00 2007 -0500 [SCSI] megaraid_sas: check max_sgl reported by FW for setting max_sectors_per_req 1. Setting the max_sectors_per_req based on max SGL supported by the FW. Prior versions calculated this value from controller info's max_sectors_1, max_sectors_2. For certain controllers/FW, this was resulting in a value greater than max SGL supported by the FW. Now we take the min of max sgl from FW and max_sectors calculation. 2. Increased MFI_POLL_TIMEOUT_SECS to 60 seconds from 10. FW may take a max of 60 seconds to respond to the INIT cmd. Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit 31ea7088974c2405e19d72f17c2afb103ef19e02 Author: bo yang Date: Wed Nov 7 12:09:50 2007 -0500 [SCSI] megaraid_sas: add hibernation support Adding hibernation support. suspend, resume routine implemented. Signed-off-by: Bo Yang Signed-off-by: James Bottomley commit 1e6c38cec08f88b0df88a34e80f15492cace74e9 Author: Tony Battersby Date: Fri Nov 9 13:04:35 2007 -0500 [SCSI] 3w-9xxx: fix abysmal write performance on some motherboards The 3ware 9500S-8 SATA RAID controller exhibits terrible write performance when PCI memory-write-and-invalidate is disabled. This is easy to demonstrate by replacing pci_try_set_mwi() in the patch below with pci_clear_mwi(). My benchmarks show the following: MWI disabled: 15 MB/s write, 330 MB/s read MWI enabled: 240 MB/s write, 330 MB/s read Most motherboards will enable MWI without the driver having to set it explicitly, so most people probably wouldn't encounter this problem. For the few motherboards that don't enable it, this patch could give a 16x performance improvement for writing. This issue does not seem to affect the 9550SX controller, but the patch doesn't hurt it either. I haven't tested any of the other 3ware controllers. Signed-off-by: Tony Battersby Acked-by: adam radford Signed-off-by: James Bottomley commit 8ee24023ef43c77cdaea1add00e1e45cc4fc3261 Author: Darrick J. Wong Date: Mon Nov 5 11:52:14 2007 -0800 [SCSI] libsas: Fix various sparse complaints Annotate sas_queuecommand with locking details, and clean up a few more sparse warnings about static/non-static declarations. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley commit 5929faf3334f4c69f3bb02be59d7c127e0cefa1f Author: Darrick J. Wong Date: Mon Nov 5 11:51:17 2007 -0800 [SCSI] libsas: Convert sas_proto users to sas_protocol sparse complains about the mixing of enums in libsas. Since the underlying numeric values of both enums are the same, combine them to get rid of the warning. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley commit e5a69e27cc193f98c9a5a9086e3bf85528170623 Author: Matthias Kaehlcke Date: Sat Oct 27 09:48:46 2007 +0200 [SCSI] megaraid_sas: Convert aen_mutex to the mutex API Signed-off-by: Matthias Kaehlcke Acked-by: Bo Yang Signed-off-by: James Bottomley commit 3ce7c6588637614b00072569679791a04898c790 Author: Boaz Harrosh Date: Sun Sep 9 21:13:42 2007 +0300 [SCSI] imm: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup - Not ready for sg-chaining Signed-off-by: Boaz Harrosh Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: James Bottomley commit 57643c711c3759623e7ac651a4a418858cdaeae5 Author: Boaz Harrosh Date: Sun Sep 9 21:16:58 2007 +0300 [SCSI] ppa: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: James Bottomley commit 74286a3c276bca449f934b2cd921f9bced996e04 Author: James Bottomley Date: Wed Nov 14 18:01:21 2007 -0600 [SCSI] DocBook scsi_midlayer.tmpl->scsi.tmpl Signed-off-by: James Bottomley commit eb44820c28bc9a042e1157b41c677018a8fdfc74 Author: Rob Landley Date: Sat Nov 3 13:30:39 2007 -0500 [SCSI] Add Documentation and integrate into docbook build Add Documentation/DocBook/scsi_midlayer.tmpl, add to Makefile, and update lots of kerneldoc comments in drivers/scsi/*. Updated with comments from Stefan Richter, Stephen M. Cameron, James Bottomley and Randy Dunlap. Signed-off-by: Rob Landley Signed-off-by: James Bottomley commit 3f48985823001c89c9bd5c5e57cc07530578dfcc Author: Christof Schmitt Date: Mon Nov 5 12:37:48 2007 +0100 [SCSI] zfcp: Reduce flood on hba trace Remove tracing for request with a "qualifier" field set in the response. The protocol status qualifier now contains measurement data for "good" commands, so this check would trace every response by default. The fix is to simply remove the "qual" tracing: The responses with an interesting status are also traced as "ferr" or "perr" and all responses can be traced as "norm" with a higher trace level. Signed-off-by: Christof Schmitt Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit 1de1b43b5f0bb536126e31f07ec833e01969ed1c Author: Christof Schmitt Date: Mon Nov 5 12:37:47 2007 +0100 [SCSI] zfcp: Fix deadlock when adding invalid LUN When adding an invalid LUN, there is a deadlock between the add via scsi_scan_target and the slave_destroy handler: The handler waits for the scan to complete, but for an invalid unit, scsi_scan_target directly calls the slave_destroy handler. Fix the deadlock by removing the wait in the slave_destroy handler, it was not necessary anyway. Signed-off-by: Christof Schmitt Signed-off-by: Martin Schwidefsky Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit e39c8877a41e8f70225baeeb74fade8fe3a80d8b Author: Christof Schmitt Date: Mon Nov 5 12:37:46 2007 +0100 [SCSI] zfcp: Remove SCSI devices when removing complete adapter The common I/O layer can call remove a handler to inform zfcp that a device disappeared. The handler zfcp_ccw_remove then removes all unit, port and the adapter data structures. Removing the units requires that the SCSI devices are removed first. Signed-off-by: Christof Schmitt Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit 18edcdbdb2911baa5aaeb0ed781e3424cbf98d64 Author: Christof Schmitt Date: Mon Nov 5 12:37:45 2007 +0100 [SCSI] zfcp: Specify waiting times in ERP in seconds It is not necessary to use jiffies or milliseconds to specify waiting times that last a couple of seconds. Signed-off-by: Christof Schmitt Signed-off-by: Martin Schwidefsky Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit 345bfea5e424f086b654294eddcfa3f8ff92b47f Author: Christof Schmitt Date: Mon Nov 5 12:37:44 2007 +0100 [SCSI] zfcp: Use also port and adapter to identify unit in messages. Signed-off-by: Christof Schmitt Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit a11b4743e58f53213acdd16e3a0004d035aa45f0 Author: Christof Schmitt Date: Mon Nov 5 12:37:43 2007 +0100 [SCSI] zfcp: Remove unnecessary eh_bus_reset_handler callback The callback function used by zfcp always returns success, which is an indication for the SCSI midlayer to stop error handling. Remove the bus_reset callback, since the same function will be called via the host_reset callback. Signed-off-by: Christof Schmitt Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit f858317d894a22eb2c26edcd26c7060fc4f40a15 Author: Salyzyn, Mark Date: Tue Oct 30 15:50:49 2007 -0400 [SCSI] aacraid: forced reset override Some of our vendors have requested that our adapters ignore the hardware reset attempts during recovery and have enforced this with changes in Adapter Firmware. Some of our customers have requested the option to be able to reset the adapter under adverse adapter failure, we even had a few defects reported here considering it a regression that the Adapter could not be reset. This patch addresses this dichotomy. The user can force the adapter to be reset if it supports the IOP_RESET_ALWAYS command, in cases where the adapter has been programmed to ignore the reset, by setting the aacraid.check_reset parameter to a value of -1. The driver will not reset an Adapter that does not support the reset command(s). This patch also fixes and cleans up some of the logic associated with resetting the adapter. Signed-off-by: Mark Salyzyn Signed-off-by: James Signed-off-by: James Bottomley commit 9e0fe44ddb9ed037188ac711af1e981ac32d3c32 Author: Boaz Harrosh Date: Mon Nov 5 11:23:35 2007 +0200 [SCSI] NCR5380 family: convert to accessors & !use_sg cleanup - This patch depends on: NCR5380: Use scsi_eh API for REQUEST_SENSE invocation - convert to accessors and !use_sg cleanup - FIXME: Not sg-chain ready look for ++cmd->SCp.buffer Signed-off-by: Boaz Harrosh Signed-off-by: James Signed-off-by: James Bottomley commit 9a3dd65bafcfa3338cfb4b6b7e12ff59aca0ac28 Author: Boaz Harrosh Date: Mon Nov 5 11:21:40 2007 +0200 [SCSI] wd7000: proper fix for boards without sg support - code used to set sg_tablesize to zero for board revision less than 6. This is no longer supported, therefore I use sg_tablesize=1 and open code the sg handling for that case. - Get rid of use of SG_NONE which will be removed soon. Signed-off-by: Boaz Harrosh Signed-off-by: James Signed-off-by: James Bottomley commit fe7ed98fd49a28287aca8b0ba8da8fb9ca35a055 Author: Boaz Harrosh Date: Sun Sep 9 21:06:23 2007 +0300 [SCSI] atp870u: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup - Probably not ready for sg-chaining Signed-off-by: Boaz Harrosh Acked-by: Christoph Hellwig Cc: jameshsu Signed-off-by: James Bottomley commit c73961e563dde3239e2e5da08b25ab2832b2e840 Author: Boaz Harrosh Date: Fri Sep 7 06:50:20 2007 +0900 [SCSI] scsi_debug: convert to use the data buffer accessors - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: Boaz Harrosh Acked-by: Douglas Gilbert Signed-off-by: James Bottomley commit 48c23d3e377bb090bf49ea6c45d024b4c11439b0 Author: Boaz Harrosh Date: Wed Aug 22 19:10:45 2007 +0300 [SCSI] isd200: use one-element sg list in issuing commands - This patch should be commited before: usb: transport - convert to accessors and !use_sg code path removal - isd200_action() was still using direct liniar pointers in issuing commands to the USB transport level. This is no longer supported, use one-element scatterlist instead. - Adjustment of command's length in the case of scsi-to-ata translation is now restored before return to queuecommand, since other wise it can leak BIOs. - isd200_action() return Error on unknown requests. Used to print an error but still try to send garbage cdb. - convert few places to scsi data accessors. - Todo: This file will need to be changed when scsi_cmnd changes to scsi_data_buffer or any other solution. Signed-off-by: Boaz Harrosh Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit 6d416e6173394defda5933e419e805b696681b7e Author: Boaz Harrosh Date: Mon Sep 10 18:01:08 2007 +0300 [SCSI] usb: transport - convert to accessors and !use_sg code path removal - This patch depends on: usb: transport.c use scsi_eh API in REQUEST_SENSE execution - Use scsi data accessors and remove of !use_sg code path. - New usb_stor_bulk_srb() for use by drivers [jejb: updated with corrective fix. had a bug in residual handling in the new usb_stor_bulk_srb() function. Found by Gabriel C. in -mm tree. Tested-by: Gabriel C ] Signed-off-by: Boaz Harrosh Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit 4776e99ebb171d61c7e242db437358183f27b471 Author: Boaz Harrosh Date: Sun Sep 9 20:40:56 2007 +0300 [SCSI] usb: shuttle_usbat - convert to accessors and !use_sg code path removal - functions that received char* but where passed scatterlist* mostly were changed to receive void* - Use scsi data accessors and remove of !use_sg code path Signed-off-by: Boaz Harrosh Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit 41c2497b188a641c542328d08a45cf3214d453bd Author: Boaz Harrosh Date: Sun Sep 9 20:47:26 2007 +0300 [SCSI] usb: freecom & sddr09 - convert to accessors and !use_sg cleanup - Use scsi data accessors and remove of !use_sg code path - This patch is dependent on cleanup patch to usb transport.c/h Signed-off-by: Boaz Harrosh Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit dd829d2302c6b0f88542ca367229d676cb9ca212 Author: Boaz Harrosh Date: Sun Sep 9 20:22:23 2007 +0300 [SCSI] usb: protocol - convert to accessors and !use_sg code path removal - Use scsi data accessors and remove of !use_sg code path Signed-off-by: Boaz Harrosh Acked-by: Matthew Dharm Signed-off-by: James Bottomley commit caa1e8c32131201193fc4711f5b07a36d3d941df Author: Boaz Harrosh Date: Wed Oct 17 10:43:20 2007 +0200 [SCSI] seagate: Remove driver - Apparently no one wonts this driver, and no one is willing to fix it for future changes to SCSI. So remove it, and if someone wants it in the future He can revive it with the needed fixes. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 864a4675b239dcc3ae5b8adce15a370639b5ccab Author: Boaz Harrosh Date: Thu Jul 12 19:49:15 2007 +0300 [SCSI] psi240i: remove driver The psi240i driver is still written for cmnd->request_buffer as a char pointer to actual data. There was never any attempt to use the scatterlist option. - remove all source files (3) from drivers/scsi - Remove from Makefile and Kconfig Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 53d2a885032411b471b393d065c7b4693fbaafb4 Author: Boaz Harrosh Date: Sun Sep 9 21:14:41 2007 +0300 [SCSI] in2000: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit dfb104ff5d8215e09892aad3cd094ad6597b1cfe Author: Boaz Harrosh Date: Sun Sep 9 21:21:35 2007 +0300 [SCSI] qlogicpti: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit ee0ae927937ac8a30350cca1a7a75efafb13976e Author: Boaz Harrosh Date: Sun Sep 9 21:25:11 2007 +0300 [SCSI] wd33c93: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 8e31f1f4d94c8e7e09efab0166cb2ef2ceeec2ce Author: Boaz Harrosh Date: Sun Sep 9 21:12:24 2007 +0300 [SCSI] fd_mcs: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup - Not ready for sg-chaining Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit fc3fdfcc8bb0e069a2d172e745664fa2c1f1b0ca Author: Boaz Harrosh Date: Sun Sep 9 21:02:45 2007 +0300 [SCSI] aha1542: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit cc0455fac06f0539277d7b724dbc513284629069 Author: Boaz Harrosh Date: Sun Sep 9 20:59:32 2007 +0300 [SCSI] a3000: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit f2c1afa5ebc6cd3171539e686b48a2afe24694c0 Author: Boaz Harrosh Date: Sun Sep 9 20:57:05 2007 +0300 [SCSI] a2091: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 7410d849a47047f1299a505dd5fde68d0ed45eaa Author: Boaz Harrosh Date: Sun Sep 9 21:10:27 2007 +0300 [SCSI] eata_pio: convert to accessors and !use_sg cleanup - convert to accessors and !use_sg cleanup Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 040cd23242413a8bd2a49b6de1ee320ce392a46d Author: Boaz Harrosh Date: Thu Aug 16 13:01:05 2007 +0300 [SCSI] nsp_cs: convert to data accessors and !use_sg cleanup - use scsi data accessors - cleanup !use_sg code paths - TODO: use next_sg() for Jens's sglist branch. Look for 2 places with "SCp.buffer++" Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 73d2cb165af80f6a61458d808d80514d2665d7da Author: Boaz Harrosh Date: Thu Nov 1 18:54:44 2007 +0200 [SCSI] aha152x: Use scsi_eh API for REQUEST_SENSE invocation - Use new scsi_eh_prep/restor_cmnd() for synchronous REQUEST_SENSE invocation. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley commit 75a9a4e1476db705dbbcbd2e3a16b265ef8ec3e9 Author: Mike Christie Date: Wed Oct 31 20:59:56 2007 -0500 [SCSI] add DID_REQUEUE string to scsi_show_result host table I was working on patches which add new transport error values, when I noticed that DID_REQUEUE was not in the hostbyte_table. I do not think there is any way to hit the code path where scsi_show_result is called and where you return DID_REQUEUE, because DID_REQUEUE causes scsi-ml to always requeue the command. However, for completeness and because I want to one day send a patch that tries to add new host bytes values, I am sending this patch. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 062af9c300cd4c703c78bcc109647a9629afea0d Author: James Smart Date: Sat Oct 27 13:38:20 2007 -0400 [SCSI] lpfc 8.2.3 : Change version number to 8.2.3 Change version number to 8.2.3 Signed-off-by: James Smart Signed-off-by: James Bottomley commit 7af670510df343db55752a2210dcf4fc09f59fbb Author: James Smart Date: Sat Oct 27 13:38:11 2007 -0400 [SCSI] lpfc 8.2.3 : Temperature handling fix Temperature handling fix - return proper error code indicator for applications Signed-off-by: James Smart Signed-off-by: James Bottomley commit 76bb24efdc5de8eead0ccc07ec7e3b59a4ca0f15 Author: James Smart Date: Sat Oct 27 13:38:00 2007 -0400 [SCSI] lpfc 8.2.3 : Internal loopback fixes Internal loopback fixes: - Use HBQs rather than Q_RING_BUFF - Correct HBQs continuation entries - Update CT handler to SLI3 iocbs Signed-off-by: James Smart Signed-off-by: James Bottomley commit a8adb83208020c913f010cb4e26d09e25300db8e Author: James Smart Date: Sat Oct 27 13:37:53 2007 -0400 [SCSI] lpfc 8.2.3 : Miscellaneous Small Fixes - part 2 Miscellaneous Small Fixes - part 2 - Fix ndlp left in PLOGI state after link up - Fix cannot rcv unsol ELS frames after running HBA resets for a few minutes - Fix HBQ buffer_count implemention - Fix RPI leak - Fix crash while deleting vports while HBA is reset - Revert the FCP Fbits offset back to 7 - Fix panic when deleting vports - Remove unused code in switch statement outside of a case - Reject PLOGI from invalid PName or NName of 0 - Ignore PLOGI responses from WWPName or WWNName of 0 - Fix debugfs hbqinfo display for ppc - Added 8G to list of supported speeds for sysfs parameter - Defer ndlp cleanup to dev-loss timeout handler - Added support for WRITE_VPARMS mailbox command by applications Signed-off-by: James Smart Signed-off-by: James Bottomley commit 87af33fe5f78c27cf9e43c6e586dd6efd4be3e40 Author: James Smart Date: Sat Oct 27 13:37:43 2007 -0400 [SCSI] lpfc 8.2.3 : FC Discovery Fixes FC Discovery Fixes: - Fix up lpfc_drop_node() vs lpfc_nlp_not_used() usage - Clear ADISC flag when unregistering RPI and REMOVE ndlps if in recovery. - Fix usage of UNUSED list and ndlps - Fix PLOGI race conditions - Reset link if NameServer PLOGI errors occur - Synchronize GID_FT queries with PLOGI receptions Signed-off-by: James Smart Signed-off-by: James Bottomley commit 98c9ea5c026ee47efe2a0f595078dbf199d08f50 Author: James Smart Date: Sat Oct 27 13:37:33 2007 -0400 [SCSI] lpfc 8.2.3 : Miscellaneous Small Fixes - part 1 Miscellaneous Small Fixes - part 1 - Fix typo kmzlloc -> kzalloc - Fix discovery ndlp use after free panic - Fix link event causing flood of 0108 messages - Relieve some mbox congestion on link up with 100 vports - Fix broken vport parameters - Prevent lock recursion in logo_reglogin_issue - Split uses of error variable in lpfc_pci_probe_one into retval and error - Remove completion code related to dev_loss_tmo - Remove unused LPFC_MAX_HBQ #define - Don't compare pointers to 0 for sparse - Make 2 functions static for sparse - Fix default rpi cleanup code causing rogue ndlps to remain on the NPR list - Remove annoying ELS messages when driver is unloaded - Fix Cannot issue Register Fabric login problems on link up - Remove LPFC_EVT_DEV_LOSS_DELAY - Fix FC port swap test leads to device going offline - Fix vport CT flags to only be set when accepted - Add code to handle signals during vport_create - Fix too many retries in FC-AL mode - Pull lpfc_port_link_failure out of lpfc_linkdown_port Signed-off-by: James Smart Signed-off-by: James Bottomley commit 0b727fea7a700e223bf52fb1eaf4c3a27c4340db Author: James Smart Date: Sat Oct 27 13:37:25 2007 -0400 [SCSI] lpfc 8.2.3 : Remove flawed MBX_STOP_IOCB logic Remove flawed MBX_STOP_IOCB logic Signed-off-by: James Smart Signed-off-by: James Bottomley commit 7ee5d43e2ea25336a7638715420c75583bd2ed69 Author: James Smart Date: Sat Oct 27 13:37:17 2007 -0400 [SCSI] lpfc 8.2.3 : NPIV bug fixes NPIV bug fixes: - Remove vport params on physical hba when npiv is disabled - Implement new DA_ID CT command to remove vport information from the switch after delete. Some switches didn't clean this up unless the physical link dropped. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 57127f157298ea2dacbbc878a3c5d2a5daca772c Author: James Smart Date: Sat Oct 27 13:37:05 2007 -0400 [SCSI] lpfc 8.2.3 : Added support for ASICs that report temperature Added support for ASICs that report temperature. Temperature notices are reported as events and logged. Temperature can be read via sysfs. Signed-off-by: James Smart Signed-off-by: James Bottomley commit d1a357fcc8348d325d151f6fe0ea54e317652457 Author: Brian King Date: Thu Oct 25 16:06:34 2007 -0500 [SCSI] ibmvscsi: Set default command timeout Set the default command timeout for ibmvscsi disks to 60 seconds to ensure we don't prematurely timeout commands. This fixes a problem seen where the default 30 seconds was not long enough due to congestion on the server. Signed-off-by: Brian King Signed-off-by: James Bottomley commit f37a7238d379bc2befbcb08a03de03f4f446131c Author: Adrian Bunk Date: Wed Oct 24 18:26:22 2007 +0200 [SCSI] 53c7xx: fix removal fallout This patch does some additional cleanups after the 53c7xx removal. Signed-off-by: Adrian Bunk Acked-by: Geert Uytterhoeven Signed-off-by: James Bottomley commit f10ab66fa564fd624b04fe207ccae206df85efbf Author: FUJITA Tomonori Date: Thu Oct 25 01:21:30 2007 +0900 [SCSI] tgt: convert to use the data buffer accessors - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley commit 1237c98db2aa94b42dbb9fb1df062b7d3733dc83 Author: Gilbert Wu Date: Mon Oct 22 15:19:11 2007 -0700 [SCSI] aic94xx: update BIOS image from user space. 1. Create a file "update_bios" in sysfs to allow user to update bios from user space. 2. The BIOS image file can be downloaded from web site "http://www.adaptec.com/en-US/downloads/bios_fw/bios_fw_ver?productId=SAS-48300&dn=Adaptec+Serial+Attached+SCSI+48300" and copy the BIOS image into /lib/firmware folder. 3. The aic994xx will accept "update bios_file" and "verify bios_file" commands to perform update and verify BIOS image . For example: Type "echo "update asc483c01.ufi" > /sys/devices/.../update_bios" to update BIOS image from /lib/firmware/as483c01.ufi file into HBA's flash memory. Type "echo "verify asc483c01.ufi" > /sys/devices/.../update_bios" to verify BIOS image between /lib/firmware/asc48c01.ufi file and HBA's flash memory. 4. Type "cat /sys/devices/.../update_bios" to view the status or result of updating BIOS. Signed-off-by: Gilbert Wu Signed-off-by: James Bottomley commit 285e9670d91cdeb6b6693729950339cb45410fdc Author: Kay Sievers Date: Tue Aug 14 14:10:39 2007 +0200 [SCSI] sr,sd: send media state change modification events This will send for a card reader slot (remove/add media): UEVENT[1187091572.155884] change /devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host7/target7:0:0/7:0:0:0 (scsi) UEVENT[1187091572.162314] remove /block/sdb/sdb1 (block) UEVENT[1187091572.172464] add /block/sdb/sdb1 (block) UEVENT[1187091572.175408] change /devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host7/target7:0:0/7:0:0:0 (scsi) and for a DVD drive (add/eject media): UEVENT[1187091590.189159] change /devices/pci0000:00/0000:00:1f.1/host4/target4:0:0/4:0:0:0 (scsi) UEVENT[1187091590.957124] add /module/isofs (module) UEVENT[1187091604.468207] change /devices/pci0000:00/0000:00:1f.1/host4/target4:0:0/4:0:0:0 (scsi) Userspace gets events, even for unpartitioned media. This unifies the event handling for asynchronoous events (AN) and events caused by perodical polling the device from userspace. Signed-off-by: Kay Sievers [jejb: modified for new event API] Signed-off-by: James Bottomley commit e6ab15827eec0bc4444421f7ccf0223de321c708 Author: Igor Mammedov Date: Fri Jan 11 01:49:48 2008 +0000 [CIFS] DFS support patchset: Added mountdata Also cifs_fs_type was made not static for ussage in dfs code. Signed-off-by: Igor Mammedov Signed-off-by: Steve French commit 967c9ec4ec6178bee42f4231c49a3d7f77627978 Author: Dave Kleikamp Date: Thu Jan 10 16:04:25 2008 -0600 JFS: simplify types to get rid of sparse warning jfs_metapage.c was using uints and unsigned ints inconsistently when regular ints suffice. Signed-off-by: Dave Kleikamp commit b966b54654598aebdac9c57f102d769b36d2f68f Author: Alexey Dobriyan Date: Tue Jan 8 21:36:34 2008 +1100 [CRYPTO] hifn_795x: Fixup container_of() usage Signed-off-by: Alexey Dobriyan Signed-off-by: Herbert Xu commit e6ccc727f30a02670f6a00df6d548942bc988f43 Author: Ilpo Järvinen Date: Tue Jan 8 17:20:31 2008 +1100 [CRYPTO] cast6: inline bloat-- Bloat-o-meter shows rather high readings for cast6... crypto/cast6.c: cast6_setkey | -1310 cast6_encrypt | -4567 cast6_decrypt | -4561 3 functions changed, 10438 bytes removed, diff: -10438 crypto/cast6.c: W | +659 Q | +308 QBAR | +316 3 functions changed, 1283 bytes added, diff: +1283 crypto/cast6.o: 6 functions changed, 1283 bytes added, 10438 bytes removed, diff: -9155 Signed-off-by: Ilpo Järvinen Signed-off-by: Herbert Xu commit 6eb7228421c01ba48a6a88a7a5b3e71cfb70d4a9 Author: Herbert Xu Date: Tue Jan 8 17:16:44 2008 +1100 [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB) cache uses the alignment of unsigned long long if the architecture kmalloc/slab alignment macros are not defined. This patch changes the CRYPTO_MINALIGN so that it uses the same default value. Signed-off-by: Herbert Xu commit 38ed9ab23b8614c9c1553b2961ef2627f3088fd9 Author: Herbert Xu Date: Tue Jan 1 15:59:28 2008 +1100 [CRYPTO] tcrypt: Make xcbc available as a standalone test Currently the gcm(aes) tests have to be taken together with all other algorithms. This patch makes it available by itself at number 106. Signed-off-by: Herbert Xu commit 94765b9e4cba8e3c51c292338db16aa174894d30 Author: Herbert Xu Date: Tue Jan 1 15:49:17 2008 +1100 [CRYPTO] xcbc: Remove bogus hash/cipher test When setting the digest size xcbc tests to see if the underlying algorithm is a hash. This is silly because we don't allow it to be a hash and we've specifically requested for a cipher. This patch removes the bogus test. Signed-off-by: Herbert Xu commit 1b87887d6c232becba77835b29a424cf78442b7d Author: Herbert Xu Date: Tue Jan 1 15:44:50 2008 +1100 [CRYPTO] xcbc: Fix algorithm leak when block size check fails When the underlying algorithm has a block size other than 16 we abort without freeing it. In fact, we try to return the algorithm itself as an error! This patch plugs the leak and makes it return -EINVAL instead. Signed-off-by: Herbert Xu commit 2a999a3abb2d3885741b09b9d05280db7e757544 Author: Herbert Xu Date: Sun Dec 30 20:24:11 2007 +1100 [CRYPTO] tcrypt: Zero axbuf in the right function The axbuf buffer is used by test_aead and therefore should be zeroed there instead of in test_hash. Signed-off-by: Herbert Xu commit 866cd902e864e9d0e31299efa9d61fc9a9bec315 Author: Herbert Xu Date: Thu Dec 27 00:04:44 2007 +1100 [CRYPTO] padlock: Only reset the key once for each CBC and ECB operation Currently we reset the key for each segment fed to the xcrypt instructions. This patch optimises this for CBC and ECB so that we only do this once for each encrypt/decrypt operation. Signed-off-by: Herbert Xu commit 1c5dfe6a959b79215c0f73d793169a7d5755900e Author: Herbert Xu Date: Mon Dec 24 08:54:24 2007 +0800 [CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h As Andrew Morton correctly points out, we need to explicitly include sched.h as we use the function cond_resched in crypto/scatterwalk.h. Signed-off-by: Herbert Xu commit 214dc54f6f1b71bcd895ef272c108c67ef046200 Author: Tan Swee Heng Date: Tue Dec 18 22:45:35 2007 +0800 [CRYPTO] salsa20-asm: Remove unnecessary dependency on CRYPTO_SALSA20 Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit d1cda4e39638e906f022c8ce56f566b617e1f77e Author: Sebastian Siewior Date: Tue Dec 18 00:08:27 2007 +0800 [CRYPTO] tcrypt: Add select of AEAD ERROR: "crypto_aead_setauthsize" [crypto/tcrypt.ko] undefined! ERROR: "crypto_alloc_aead" [crypto/tcrypt.ko] undefined! Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 9a7dafbba47384c330779c75a1546684efaa8c1a Author: Tan Swee Heng Date: Tue Dec 18 00:04:40 2007 +0800 [CRYPTO] salsa20: Add x86-64 assembly version This is the x86-64 version of the Salsa20 stream cipher algorithm. The original assembly code came from . It has been reformatted for clarity. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 974e4b752ee623854c5dc2bbfc7c7725029ce173 Author: Tan Swee Heng Date: Mon Dec 10 15:52:56 2007 +0800 [CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version) This patch contains the salsa20-i586 implementation. The original assembly code came from . I have reformatted it (added indents) so that it matches the other algorithms in arch/x86/crypto. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit dadbc53d0bbde0e84c40b9f6bc5c50eb9eb7352a Author: Herbert Xu Date: Mon Dec 17 15:33:17 2007 +0800 [CRYPTO] gcm: Introduce rfc4106 This patch introduces the rfc4106 wrapper for GCM just as we have an rfc4309 wrapper for CCM. The purpose of the wrapper is to include part of the IV in the key so that it can be negotiated by IPsec. Signed-off-by: Herbert Xu commit 189ed66e95fb23666a62963b718dcbe62adbadde Author: Herbert Xu Date: Fri Dec 14 22:29:37 2007 +0800 [CRYPTO] api: Show async type This patch adds an async field to /proc/crypto for ablkcipher and aead algorithms. Signed-off-by: Herbert Xu commit e7cd2514ea506f06bd4f7b13a9b62afd60f9c73b Author: Herbert Xu Date: Fri Dec 14 22:28:14 2007 +0800 [CRYPTO] chainiv: Avoid lock spinning where possible This patch makes chainiv avoid spinning by postponing requests on lock contention if the user allows the use of asynchronous algorithms. If a synchronous algorithm is requested then we behave as before. This should improve IPsec performance on SMP when two CPUs attempt to transmit over the same SA. Currently one of them will spin doing nothing waiting for the other CPU to finish its encryption. This patch makes it postpone the request and get on with other work. If only one CPU is transmitting for a given SA, then we will process the request synchronously as before. Signed-off-by: Herbert Xu commit 4726204200327c04a77b819e2c653c063f1bc6ab Author: Herbert Xu Date: Fri Dec 14 10:19:27 2007 +0800 [CRYPTO] seqiv: Add select AEAD in Kconfig Now that seqiv supports AEAD algorithms it needs to select the AEAD option. Thanks to Erez Zadok for pointing out the problem. Signed-off-by: Herbert Xu commit 6e050778c5d08a97d5d98f7cb62bc503e872615c Author: Herbert Xu Date: Fri Dec 14 00:44:11 2007 +0800 [CRYPTO] scatterwalk: Handle zero nbytes in scatterwalk_map_and_copy It's better to return silently than crash and burn when someone feeds us a zero length. In particular the null digest algorithm when used as part of authenc will do that to us. Signed-off-by: Herbert Xu commit ce5bd4aca3c467936370846119b7f3daf9ccea78 Author: Herbert Xu Date: Fri Dec 14 00:28:40 2007 +0800 [CRYPTO] null: Allow setkey on digest_null We need to allow setkey on digest_null if it is to be used directly by authenc instead of through hmac. Signed-off-by: Herbert Xu commit 3631c650c495d61b1dabf32eb26b46873636e918 Author: Herbert Xu Date: Thu Dec 13 22:28:59 2007 +0800 [CRYPTO] null: Add null blkcipher algorithm This patch adds a null blkcipher algorithm called ecb(cipher_null) for backwards compatibility. Previously the null algorithm when used by IPsec copied the data byte by byte. This new algorithm optimises that to a straight memcpy which lets us better measure inherent overheads in our IPsec code. Signed-off-by: Herbert Xu commit 93cc74e078eed8735585e5687903727bcfbcc8b4 Author: Joy Latten Date: Wed Dec 12 20:24:22 2007 +0800 [CRYPTO] tcrypt: Add CCM vectors This patch adds 7 test vectors to tcrypt for CCM. The test vectors are from rfc 3610. There are about 10 more test vectors in RFC 3610 and 4 or 5 more in NIST. I can add these as time permits. I also needed to set authsize. CCM has a prerequisite of authsize. Signed-off-by: Joy Latten Signed-off-by: Herbert Xu commit 4a49b499dfa0c9e42be6d6fdd771f3434c776278 Author: Joy Latten Date: Wed Dec 12 20:25:13 2007 +0800 [CRYPTO] ccm: Added CCM mode This patch adds Counter with CBC-MAC (CCM) support. RFC 3610 and NIST Special Publication 800-38C were referenced. Signed-off-by: Joy Latten Signed-off-by: Herbert Xu commit d29ce988aeb459203c74f14747f4f77e1829ef78 Author: Herbert Xu Date: Wed Dec 12 19:24:27 2007 +0800 [CRYPTO] aead: Create default givcipher instances This patch makes crypto_alloc_aead always return algorithms that is capable of generating their own IVs through givencrypt and givdecrypt. All existing AEAD algorithms already do. New ones must either supply their own or specify a generic IV generator with the geniv field. Signed-off-by: Herbert Xu commit 14df4d80433b8413f901e80880c39e8759b8418f Author: Herbert Xu Date: Wed Dec 12 12:27:26 2007 +0800 [CRYPTO] seqiv: Add AEAD support This patch adds support for using seqiv with AEAD algorithms. This is useful for those AEAD algorithms that performs authentication before encryption because the IV generated by the underlying encryption algorithm won't be available for authentication. Signed-off-by: Herbert Xu commit 5b6d2d7fdf806f2b5a9352416f9e670911fc4748 Author: Herbert Xu Date: Wed Dec 12 19:23:36 2007 +0800 [CRYPTO] aead: Add aead_geniv_alloc/aead_geniv_free This patch creates the infrastructure to help the construction of IV generator templates that wrap around AEAD algorithms by adding an IV generator to them. This is useful for AEAD algorithms with no built-in IV generator or to replace their built-in generator. Signed-off-by: Herbert Xu commit aedb30dc49eeecd48558b601c47e0b3f9e42c602 Author: Herbert Xu Date: Wed Dec 12 19:27:25 2007 +0800 [CRYPTO] aead: Allow algorithms with no givcrypt support Some algorithms always require manual IV construction. For instance, the generic CCM algorithm requires the first byte of the IV to be manually constructed. Such algorithms are always used by other algorithms equipped with their own IV generators and do not need IV generation per se. Signed-off-by: Herbert Xu commit 3a282bd2e77966e7361fffbd5d1cea6eb0499b6c Author: Herbert Xu Date: Sat Dec 8 20:13:15 2007 +0800 [CRYPTO] aead: Add top-level givencrypt/givdecrypt calls This patch finally makes the givencrypt/givdecrypt operations available to users by adding crypto_aead_givencrypt and crypto_aead_givdecrypt. A suite of helpers to allocate and fill in the request is also available. Signed-off-by: Herbert Xu commit e56dd56418fcc024683d1638564a494d9e9aab85 Author: Herbert Xu Date: Mon Dec 10 16:20:24 2007 +0800 [CRYPTO] authenc: Add givencrypt operation This patch implements the givencrypt function for authenc. It simply calls the givencrypt operation on the underlying cipher instead of encrypt. Signed-off-by: Herbert Xu commit 743edf57272fd420348e148bf94f9e48ed6abb70 Author: Herbert Xu Date: Mon Dec 10 16:18:01 2007 +0800 [CRYPTO] aead: Add givcrypt operations This patch adds the underlying givcrypt operations for aead and associated support elements. The rationale is identical to that of the skcipher givcrypt operations, i.e., sometimes only the algorithm knows how the IV should be generated. A new request type aead_givcrypt_request is added which contains an embedded aead_request structure with two new elements to support this operation. The new elements are seq and giv. The seq field should contain a strictly increasing 64-bit integer which may be used by certain IV generators as an input value. The giv field will be used to store the generated IV. It does not need to obey the alignment requirements of the algorithm because it's not used during the operation. The existing iv field must still be available as it will be used to store intermediate IVs and the output IV if chaining is desired. Signed-off-by: Herbert Xu commit 03bf712fb4defc7831c727d1e32d0269f7f96de0 Author: Herbert Xu Date: Sat Dec 1 18:35:38 2007 +1100 [CRYPTO] skcipher: Add top-level givencrypt/givdecrypt calls This patch finally makes the givencrypt/givdecrypt operations available to users by adding crypto_skcipher_givencrypt and crypto_skcipher_givdecrypt. A suite of helpers to allocate and fill in the request is also available. Signed-off-by: Herbert Xu commit 0a270321dbf948963aeb0e8382fe17d2c2eb3771 Author: Herbert Xu Date: Fri Nov 30 21:38:37 2007 +1100 [CRYPTO] seqiv: Add Sequence Number IV Generator This generator generates an IV based on a sequence number by xoring it with a salt. This algorithm is mainly useful for CTR and similar modes. This patch also sets it as the default IV generator for ctr. Signed-off-by: Herbert Xu commit 45d44eb56ad197cfccb8f84b5df64abff8b7cb96 Author: Herbert Xu Date: Sun Dec 2 21:21:02 2007 +1100 [CRYPTO] skcipher: Remove crypto_spawn_ablkcipher Now that gcm and authenc have been converted to crypto_spawn_skcipher, this patch removes the obsolete crypto_spawn_ablkcipher function. Signed-off-by: Herbert Xu commit 1472e5ebaac14dafbc0f978b5e951f1e9ca0b251 Author: Herbert Xu Date: Fri Dec 7 19:26:11 2007 +0800 [CRYPTO] gcm: Use crypto_grab_skcipher This patch converts the gcm algorithm over to crypto_grab_skcipher which is a prerequisite for IV generation. Signed-off-by: Herbert Xu commit d00aa19b507b39ee9a680d0d2ac2ae483686453a Author: Herbert Xu Date: Fri Dec 7 20:31:10 2007 +0800 [CRYPTO] gcm: Allow block cipher parameter This patch adds the gcm_base template which takes a block cipher parameter instead of cipher. This allows the user to specify a specific CTR implementation. This also fixes a leak of the cipher algorithm that was previously looked up but never freed. Signed-off-by: Herbert Xu commit 9ffde35a8edd3486cd7c80af931c15cec99a1a0d Author: Herbert Xu Date: Mon Dec 17 20:12:49 2007 +0800 [CRYPTO] authenc: Use crypto_grab_skcipher This patch converts the authenc algorithm over to crypto_grab_skcipher which is a prerequisite for IV generation. This patch also changes authenc to set its ASYNC status depending on the ASYNC status of the underlying skcipher. Signed-off-by: Herbert Xu commit b9c55aa475599183d0eab6833ea23e70c52dd24b Author: Herbert Xu Date: Tue Dec 4 12:46:48 2007 +1100 [CRYPTO] skcipher: Create default givcipher instances This patch makes crypto_alloc_ablkcipher/crypto_grab_skcipher always return algorithms that are capable of generating their own IVs through givencrypt and givdecrypt. Each algorithm may specify its default IV generator through the geniv field. For algorithms that do not set the geniv field, the blkcipher layer will pick a default. Currently it's chainiv for synchronous algorithms and eseqiv for asynchronous algorithms. Note that if these wrappers do not work on an algorithm then that algorithm must specify its own geniv or it can't be used at all. Signed-off-by: Herbert Xu commit 806d183aa6cc565d0f6bd2fb7fc6bfb175cc4813 Author: Herbert Xu Date: Wed Dec 5 12:10:53 2007 +1100 [CRYPTO] eseqiv: Add Encrypted Sequence Number IV Generator This generator generates an IV based on a sequence number by xoring it with a salt and then encrypting it with the same key as used to encrypt the plain text. This algorithm requires that the block size be equal to the IV size. It is mainly useful for CBC. It has one noteworthy property that for IPsec the IV happens to lie just before the plain text so the IV generation simply increases the number of encrypted blocks by one. Therefore the cost of this generator is entirely dependent on the speed of the underlying cipher. Signed-off-by: Herbert Xu commit 15c67286685cddce207b646306e8819ec8268ede Author: Herbert Xu Date: Fri Nov 30 20:17:28 2007 +1100 [CRYPTO] skcipher: Added skcipher_givcrypt_complete This patch adds the helper skcipher_givcrypt_complete which should be called when an ablkcipher algorithm has completed a givcrypt request. Signed-off-by: Herbert Xu commit 7f47073911f0e4384d38a0827d28305a177c8816 Author: Herbert Xu Date: Tue Nov 27 23:17:23 2007 +0800 [CRYPTO] chainiv: Add chain IV generator The chain IV generator is the one we've been using in the IPsec stack. It simply starts out with a random IV, then uses the last block of each encrypted packet's cipher text as the IV for the next packet. It can only be used by synchronous ciphers since we have to make sure that we don't start the encryption of the next packet until the last one has completed. It does have the advantage of using very little CPU time since it doesn't have to generate anything at all. Signed-off-by: Herbert Xu commit ecfc43292f68566c144afca966b46b371c26d56c Author: Herbert Xu Date: Wed Dec 5 21:08:36 2007 +1100 [CRYPTO] skcipher: Add skcipher_geniv_alloc/skcipher_geniv_free This patch creates the infrastructure to help the construction of givcipher templates that wrap around existing blkcipher/ablkcipher algorithms by adding an IV generator to them. Signed-off-by: Herbert Xu commit 927eead52c958829ef62c8aa5da2751033a2cf98 Author: Herbert Xu Date: Tue Nov 27 21:15:31 2007 +0800 [CRYPTO] cryptd: Use geniv of the underlying algorithm If the underlying algorithm specifies a specific geniv algorithm then we should use it for the cryptd version as well. Signed-off-by: Herbert Xu commit 23508e11ab3bb405dca66bf4d77e488bf2b07b0c Author: Herbert Xu Date: Tue Nov 27 21:33:24 2007 +0800 [CRYPTO] skcipher: Added geniv field This patch introduces the geniv field which indicates the default IV generator for each algorithm. It should point to a string that is not freed as long as the algorithm is registered. Signed-off-by: Herbert Xu commit 61da88e2b800eed2b03834a73c46cc89ad48716d Author: Herbert Xu Date: Mon Dec 17 21:51:27 2007 +0800 [CRYPTO] skcipher: Add givcrypt operations and givcipher type Different block cipher modes have different requirements for intialisation vectors. For example, CBC can use a simple randomly generated IV while modes such as CTR must use an IV generation mechanisms that give a stronger guarantee on the lack of collisions. Furthermore, disk encryption modes have their own IV generation algorithms. Up until now IV generation has been left to the users of the symmetric key cipher API. This is inconvenient as the number of block cipher modes increase because the user needs to be aware of which mode is supposed to be paired with which IV generation algorithm. Therefore it makes sense to integrate the IV generation into the crypto API. This patch takes the first step in that direction by creating two new ablkcipher operations, givencrypt and givdecrypt that generates an IV before performing the actual encryption or decryption. The operations are currently not exposed to the user. That will be done once the underlying functionality has actually been implemented. It also creates the underlying givcipher type. Algorithms that directly generate IVs would use it instead of ablkcipher. All other algorithms (including all existing ones) would generate a givcipher algorithm upon registration. This givcipher algorithm will be constructed from the geniv string that's stored in every algorithm. That string will locate a template which is instantiated by the blkcipher/ablkcipher algorithm in question to give a givcipher algorithm. Signed-off-by: Herbert Xu commit 378f4f51f9fdd8df80ea875320e2bf1d7c6e6e77 Author: Herbert Xu Date: Mon Dec 17 20:07:31 2007 +0800 [CRYPTO] skcipher: Add crypto_grab_skcipher interface Note: From now on the collective of ablkcipher/blkcipher/givcipher will be known as skcipher, i.e., symmetric key cipher. The name blkcipher has always been much of a misnomer since it supports stream ciphers too. This patch adds the function crypto_grab_skcipher as a new way of getting an ablkcipher spawn. The problem is that previously we did this in two steps, first getting the algorithm and then calling crypto_init_spawn. This meant that each spawn user had to be aware of what type and mask to use for these two steps. This is difficult and also presents a problem when the type/mask changes as they're about to be for IV generators. The new interface does both steps together just like crypto_alloc_ablkcipher. As a side-effect this also allows us to be stronger on type enforcement for spawns. For now this is only done for ablkcipher but it's trivial to extend for other types. This patch also moves the type/mask logic for skcipher into the helpers crypto_skcipher_type and crypto_skcipher_mask. Finally this patch introduces the function crypto_require_sync to determine whether the user is specifically requesting a sync algorithm. Signed-off-by: Herbert Xu commit 84c911523020a2e39b307a2da26ee1886b7214fe Author: Herbert Xu Date: Mon Dec 17 21:42:08 2007 +0800 [CRYPTO] gcm: Add support for async ciphers This patch adds the necessary changes for GCM to be used with async ciphers. This would allow it to be used with hardware devices that support CTR. Signed-off-by: Herbert Xu commit 5311f248b7764ba8b59e6d477355f766e5609686 Author: Herbert Xu Date: Mon Dec 17 21:34:32 2007 +0800 [CRYPTO] ctr: Refactor into ctr and rfc3686 As discussed previously, this patch moves the basic CTR functionality into a chainable algorithm called ctr. The IPsec-specific variant of it is now placed on top with the name rfc3686. So ctr(aes) gives a chainable cipher with IV size 16 while the IPsec variant will be called rfc3686(ctr(aes)). This patch also adjusts gcm accordingly. Signed-off-by: Herbert Xu commit 653ebd9c8510a7d647ed23e66e1338f848ebdbab Author: Herbert Xu Date: Tue Nov 27 19:48:27 2007 +0800 [CRYPTO] blkcipher: Merge ablkcipher and blkcipher into one option/module With the impending addition of the givcipher type, both blkcipher and ablkcipher algorithms will use it to create givcipher objects. As such it no longer makes sense to split the system between ablkcipher and blkcipher. In particular, both ablkcipher.c and blkcipher.c would need to use the givcipher type which has to reside in ablkcipher.c since it shares much code with it. This patch merges the two Kconfig options as well as the modules into one. Signed-off-by: Herbert Xu commit 2589469d7bc69bdfad4e05d88a0d2748f92ef0f3 Author: Herbert Xu Date: Wed Dec 12 19:16:38 2007 +0800 [CRYPTO] gcm: Fix request context alignment This patch fixes the request context alignment so that it is actually aligned to the value required by the algorithm. Signed-off-by: Herbert Xu commit 68b6c7d6919be7c732fc6229c55e35d0166e9258 Author: Herbert Xu Date: Fri Dec 7 20:18:17 2007 +0800 [CRYPTO] api: Add crypto_attr_alg_name This patch adds a new helper crypto_attr_alg_name which is basically the first half of crypto_attr_alg. That is, it returns an algorithm name parameter as a string without looking it up. The caller can then look it up immediately or defer it until later. Signed-off-by: Herbert Xu commit 551a09a7a954f720067f207657bbbd26a3fe156a Author: Herbert Xu Date: Sat Dec 1 21:47:07 2007 +1100 [CRYPTO] api: Sanitise mask when allocating ablkcipher/hash When allocating ablkcipher/hash objects, we use a mask that's wider than the usual type mask. This patch sanitises the mask supplied by the user so we don't end up using a narrower mask which may lead to unintended results. Signed-off-by: Herbert Xu commit 5e553110f27ff77591ec7305c6216ad6949f7a95 Author: Borislav Petkov Date: Fri Dec 14 16:43:32 2007 +0800 [CRYPTO] authenc: Select HASH in Kconfig i get here: ---- LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map Building modules, stage 2. MODPOST 226 modules ERROR: "crypto_hash_type" [crypto/authenc.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 --- which fails because crypto_hash_type is declared in crypto/hash.c. You might wanna fix it like so: Signed-off-by: Borislav Petkov Signed-off-by: Herbert Xu commit f17922bc75d6261dd6e0e2d687ff43b96e91e04a Author: Adrian Bunk Date: Wed Dec 12 10:42:41 2007 +0800 [CRYPTO] geode: Add __dev{init,exit} annotations This patch adds __dev{init,exit} annotations. Signed-off-by: Adrian Bunk Signed-off-by: Herbert Xu commit 7c3d703fa81db42f9766325cebd6bfc1c5eac838 Author: Herbert Xu Date: Mon Dec 10 16:15:41 2007 +0800 [CRYPTO] authenc: Merge common hashing code This patch merges the common hashing code between encryption and decryption. Signed-off-by: Herbert Xu commit 12dc5e62b4f93f1d399fd81e35be3f9ea0027712 Author: Herbert Xu Date: Mon Dec 10 10:55:21 2007 +0800 [CRYPTO] authenc: Use RTA_OK to check length This patch changes setkey to use RTA_OK to check the validity of the setkey request. Signed-off-by: Herbert Xu commit c2c61f513db395ddd8d67690bf3301ebe1e8155a Author: Herbert Xu Date: Mon Dec 10 10:54:44 2007 +0800 [CRYPTO] authenc: Fix typo in ivsize The ivsize should be fetched from ablkcipher, not blkcipher. Signed-off-by: Herbert Xu commit 2d74d405fc5ea78b20a4a2efd24201db424e07b1 Author: Sebastian Siewior Date: Mon Dec 10 15:49:41 2007 +0800 [CRYPTO] s390-aes: Use correct encrypt/decrypt function in fallback crypto_blkcipher_decrypt is wrong because it does not care about the IV. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit fdc520aa693d462f4958339534a3b596f95795b7 Author: Sebastian Siewior Date: Mon Dec 10 15:48:17 2007 +0800 [CRYPTO] geode: Use correct encrypt/decrypt function in fallback crypto_blkcipher_decrypt is wrong because it does not care about the IV. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 5de8f1b562e87ae9d93a4e0897e54c18a5e82915 Author: Tan Swee Heng Date: Fri Dec 7 17:17:43 2007 +0800 [CRYPTO] tcrypt: Added salsa20 speed test This patch adds a simple speed test for salsa20. Usage: modprobe tcrypt mode=206 Signed-of-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 0b77abb3b2d0c2eee1da79a3f3bd4312a0edb156 Author: Zoltan Sogor Date: Fri Dec 7 16:53:23 2007 +0800 [CRYPTO] lzo: Add LZO compression algorithm support Add LZO compression algorithm support Signed-off-by: Zoltan Sogor Signed-off-by: Herbert Xu commit 91755a921c4af51c355bcb74a98b717d5c1818b6 Author: Zoltan Sogor Date: Fri Dec 7 16:48:11 2007 +0800 [CRYPTO] tcrypt: Add common compression tester function Add common compression tester function Modify deflate test case to use the common compressor test function Signed-off-by: Zoltan Sogor Signed-off-by: Herbert Xu commit 8bff664cdf8797564fb6b59b7be028846fab8c27 Author: Tan Swee Heng Date: Fri Dec 7 16:41:29 2007 +0800 [CRYPTO] tcrypt: Salsa20 large test vector This is a large test vector for Salsa20 that crosses the 4096-bytes page boundary. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit eb6f13eb9f812f5812ed5d14f241309da369dee6 Author: Tan Swee Heng Date: Fri Dec 7 16:38:45 2007 +0800 [CRYPTO] salsa20_generic: Fix multi-page processing This patch fixes the multi-page processing bug that affects large test vectors (the same bug that previously affected ctr.c). There is an optimization for the case walk.nbytes == nbytes. Also we now use crypto_xor() instead of adhoc XOR routines. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 7f6813786a6521380e1756ca5b4336bc63c5bf7d Author: Herbert Xu Date: Thu Dec 6 14:59:53 2007 +0800 [CRYPTO] gcm: Put abreq in private context instead of on stack The abreq structure is currently allocated on the stack. This is broken if the underlying algorithm is asynchronous. This patch changes it so that it's taken from the private context instead which has been enlarged accordingly. Signed-off-by: Herbert Xu commit b2ab4a57b018aafbba35bff088218f5cc3d2142e Author: Herbert Xu Date: Wed Dec 5 20:59:25 2007 +1100 [CRYPTO] scatterwalk: Restore custom sg chaining for now Unfortunately the generic chaining hasn't been ported to all architectures yet, and notably not s390. So this patch restores the chainging that we've been using previously which does work everywhere. Signed-off-by: Herbert Xu commit 42c271c6c538857cb13c5ead5184d264d745f675 Author: Herbert Xu Date: Fri Dec 7 18:52:49 2007 +0800 [CRYPTO] scatterwalk: Move scatterwalk.h to linux/crypto The scatterwalk infrastructure is used by algorithms so it needs to move out of crypto for future users that may live in drivers/crypto or asm/*/crypto. Signed-off-by: Herbert Xu commit fe70f5dfe1a7b5caab96531089dac3d8728c0ebd Author: Herbert Xu Date: Tue Dec 4 20:07:27 2007 +1100 [CRYPTO] aead: Return EBADMSG for ICV mismatch This patch changes gcm/authenc to return EBADMSG instead of EINVAL for ICV mismatches. This convention has already been adopted by IPsec. Signed-off-by: Herbert Xu commit 6160b289929c0b622e64aa36106d8e6e53fcd826 Author: Herbert Xu Date: Tue Dec 4 19:17:50 2007 +1100 [CRYPTO] gcm: Fix ICV handling The crypto_aead convention for ICVs is to include it directly in the output. If we decided to change this in future then we would make the ICV (if the algorithm has an explicit one) available in the request itself. For now no algorithm needs this so this patch changes gcm to conform to this convention. It also adjusts the tcrypt aead tests to take this into account. Signed-off-by: Herbert Xu commit 8df213d9b520a4b58b7a8f7f2200324d4e40363d Author: Herbert Xu Date: Sun Dec 2 14:55:47 2007 +1100 [CRYPTO] tcrypt: Make gcm available as a standalone test Currently the gcm(aes) tests have to be taken together with all other ciphers. This patch makes it available by itself at number 35. Signed-off-by: Herbert Xu commit 481f34ae752ac74c4cbd88a9954dd4ed10e84f81 Author: Herbert Xu Date: Tue Dec 4 20:04:21 2007 +1100 [CRYPTO] authenc: Fix hash verification The previous code incorrectly included the hash in the verification which also meant that we'd crash and burn when it comes to actually verifying the hash since we'd go past the end of the SG list. This patch fixes that by subtracting authsize from cryptlen at the start. Signed-off-by: Herbert Xu commit e236d4a89a2ffbc8aa18064161f4f159c4d89b4a Author: Herbert Xu Date: Thu Nov 22 23:11:53 2007 +0800 [CRYPTO] authenc: Move enckeylen into key itself Having enckeylen as a template parameter makes it a pain for hardware devices that implement ciphers with many key sizes since each one would have to be registered separately. Since the authenc algorithm is mainly used for legacy purposes where its key is going to be constructed out of two separate keys, we can in fact embed this value into the key itself. This patch does this by prepending an rtnetlink header to the key that contains the encryption key length. Signed-off-by: Herbert Xu commit 7ba683a6deba70251756aa5a021cdaa5c875a7a2 Author: Herbert Xu Date: Sun Dec 2 18:49:21 2007 +1100 [CRYPTO] aead: Make authsize a run-time parameter As it is authsize is an algorithm paramter which cannot be changed at run-time. This is inconvenient because hardware that implements such algorithms would have to register each authsize that they support separately. Since authsize is a property common to all AEAD algorithms, we can add a function setauthsize that sets it at run-time, just like setkey. This patch does exactly that and also changes authenc so that authsize is no longer a parameter of its template. Signed-off-by: Herbert Xu commit e29bc6ad0e84e3157e0f49130a15b278cb232c72 Author: Herbert Xu Date: Thu Nov 22 22:46:40 2007 +0800 [CRYPTO] authenc: Use or instead of max on alignment masks Since alignment masks are always one less than a power of two, we can use binary or to find their maximum. Signed-off-by: Herbert Xu commit 9aa6ad3e87af58b4fc87bd4beef1d4c6d9a4c5b7 Author: Kamalesh Babulal Date: Sat Dec 1 12:52:35 2007 +1100 [HWRNG] pasemi: Add missing wait argument to data_present drivers/char/hw_random/pasemi-rng.c: In function `pasemi_rng_data_present': drivers/char/hw_random/pasemi-rng.c:53: error: `wait' undeclared (first use in this function) drivers/char/hw_random/pasemi-rng.c:53: error: (Each undeclared identifier is reported only once drivers/char/hw_random/pasemi-rng.c:53: error: for each function it appears in.) drivers/char/hw_random/pasemi-rng.c: At top level: drivers/char/hw_random/pasemi-rng.c:93: warning: initialization from incompatible pointer type Signed-off-by: Kamalesh Babulal Signed-off-by: Andrew Morton Signed-off-by: Herbert Xu commit b0c3e75d857f3785a4b274e26b1c0b2327580dda Author: Sebastian Siewior Date: Sat Dec 1 12:47:37 2007 +1100 [CRYPTO] aes_s390: Add fallback driver Some CPUs support only 128 bit keys in HW. This patch adds SW fallback support for the other keys which may be required. The generic algorithm (and the block mode) must be availble in case of a fallback. Signed-off-by: Sebastian Siewior Signed-off-by: Jan Glauber Signed-off-by: Herbert Xu commit a10e11946bb2d59516a5252b1b588e2963a13ebe Author: Denis Cheng Date: Fri Nov 30 16:59:30 2007 +1100 [CRYPTO] tcrypt: Use print_hex_dump from linux/kernel.h These utilities implemented in lib/hexdump.c are more handy, please use this. Signed-off-by: Denis Cheng Signed-off-by: Herbert Xu commit d2456c66236c15d6462f1ac751cdbd48a34e9704 Author: Sebastian Siewior Date: Fri Nov 30 16:36:57 2007 +1100 [CRYPTO] geode: do not copy the IV too often There is no reason to keep the IV in the private structre. Instead keep just a pointer to make the patch smaller :) This also remove a few memcpy()s Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 9617d6ef6278edd04070ae404c871f65a466c6d2 Author: Jan Glauber Date: Fri Nov 30 15:57:05 2007 +1100 [CRYPTO] tcrypt: AES CBC test vectors from NIST SP800-38A Add test vectors to tcrypt for AES in CBC mode for key sizes 192 and 256. The test vectors are copied from NIST SP800-38A. Signed-off-by: Jan Glauber Signed-off-by: Herbert Xu commit a773edb3ed0c3288f5ae76adc7d48c934ccfcf8c Author: Tan Swee Heng Date: Fri Nov 30 00:36:07 2007 +1100 [CRYPTO] tcrypt: AES CTR large test vector This patch adds a large AES CTR mode test vector. The test vector is 4100 bytes in size. It was generated using a C++ program that called Crypto++. Note that this patch increases considerably the size of "struct cipher_testvec" and hence the size of tcrypt.ko. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 6d1a69d53a34e6d906551d92e7639b739332b177 Author: Tan Swee Heng Date: Fri Nov 30 00:30:11 2007 +1100 [CRYPTO] tcrypt: Support for large test vectors Currently the number of entries in a cipher test vector template is limited by TVMEMSIZE/sizeof(struct cipher_testvec). This patch circumvents the problem by pointing cipher_tv to each entry in the template, rather than the template itself. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 0971eb0de9446b66bd45696338f54948314db379 Author: Herbert Xu Date: Fri Nov 30 00:23:53 2007 +1100 [CRYPTO] ctr: Fix multi-page processing When the data spans across a page boundary, CTR may incorrectly process a partial block in the middle because the blkcipher walking code may supply partial blocks in the middle as long as the total length of the supplied data is more than a block. CTR is supposed to return any unused partial block in that case to the walker. This patch fixes this by doing exactly that, returning partial blocks to the walker unless we received less than a block-worth of data to start with. This also allows us to optimise the bulk of the processing since we no longer have to worry about partial blocks until the very end. Thanks to Tan Swee Heng for fixes and actually testing this :) Signed-off-by: Herbert Xu commit 06e1a8f0505426a97292174a959560fd86ea0a3d Author: Sebastian Siewior Date: Fri Nov 30 00:15:11 2007 +1100 [CRYPTO] aes-asm: Merge common glue code 32 bit and 64 bit glue code is using (now) the same piece code. This patch unifies them. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 28db8e3e38e593d22e2c69942bb1ca7be2a35f05 Author: Mikko Herranen Date: Mon Nov 26 22:24:11 2007 +0800 [CRYPTO] gcm: New algorithm Add GCM/GMAC support to cryptoapi. GCM (Galois/Counter Mode) is an AEAD mode of operations for any block cipher with a block size of 16. The typical example is AES-GCM. Signed-off-by: Mikko Herranen Reviewed-by: Mika Kukkonen Signed-off-by: Herbert Xu commit e3a4ea4fd2e5f154ae9233f1ce30e7564e5cbcfc Author: Mikko Herranen Date: Mon Nov 26 22:12:07 2007 +0800 [CRYPTO] tcrypt: Add aead support Add AEAD support to tcrypt, needed by GCM. Signed-off-by: Mikko Herranen Reviewed-by: Mika Kukkonen Signed-off-by: Herbert Xu commit ff85a8082f0665fe6f79d50eb79bdccb98cabfa2 Author: Denys Vlasenko Date: Fri Nov 23 21:21:03 2007 +0800 [CRYPTO] camellia: Move more common code into camellia_setup_tail Analogously to camellia7 patch, move "absorb kw2 to other subkeys" and "absorb kw4 to other subkeys" code parts into camellia_setup_tail(). This further reduces source and object code size at the cost of two brances in key setup code. Signed-off-by: Denys Vlasenko Signed-off-by: Herbert Xu commit dedcf8b0647572ca00547efef58dfab6b8dddf83 Author: Denys Vlasenko Date: Fri Nov 23 21:14:24 2007 +0800 [CRYPTO] camellia: Move common code into camellia_setup_tail Move "key XOR is end of F-function" code part into camellia_setup_tail(), it is sufficiently similar between camellia_setup128 and camellia_setup256. Signed-off-by: Denys Vlasenko Signed-off-by: Herbert Xu commit acca79a664859e3ddaea87af86d4ccfb2e07cd65 Author: Denys Vlasenko Date: Fri Nov 23 21:10:03 2007 +0800 [CRYPTO] camellia: Merge encrypt/decrypt routines for all key lengths unifies encrypt/decrypt routines for different key lengths. This reduces module size by ~25%, with tiny (less than 1%) speed impact. Also collapses encrypt/decrypt into more readable (visually shorter) form using macros. Signed-off-by: Denys Vlasenko Signed-off-by: Herbert Xu commit 2ddae4a64491f790799e2adbfaec72a23dc2e7ef Author: Denys Vlasenko Date: Fri Nov 23 21:05:55 2007 +0800 [CRYPTO] camellia: Code shrink Remove unused macro params. Use (u8)(expr) instead of (expr) & 0xff, helps gcc to realize how to use simpler commands. Move CAMELLIA_FLS macro closer to encrypt/decrypt routines. Signed-off-by: Denys Vlasenko Signed-off-by: Herbert Xu commit 3f8214ea335e422702340d7e835921e78367f99d Author: Herbert Xu Date: Tue Nov 20 20:32:56 2007 +0800 [CRYPTO] ctr: Use crypto_inc and crypto_xor This patch replaces the custom inc/xor in CTR with the generic functions. Signed-off-by: Herbert Xu commit d0b9007a27206fe944d9db72e13dab157b8e118c Author: Herbert Xu Date: Tue Nov 20 17:49:49 2007 +0800 [CRYPTO] pcbc: Use crypto_xor This patch replaces the custom xor in CBC with the generic crypto_xor. It changes the operations for in-place encryption slightly to avoid calling crypto_xor with tmpbuf since it is not necessarily aligned. Signed-off-by: Herbert Xu commit 50b6544e1371bfe884f787107a8de0c2f8546e8f Author: Herbert Xu Date: Tue Nov 20 17:36:00 2007 +0800 [CRYPTO] cbc: Require block size to be a power of 2 All common block ciphers have a block size that's a power of 2. In fact, all of our block ciphers obey this rule. If we require this then CBC can be optimised to avoid an expensive divide on in-place decryption. I've also changed the saving of the first IV in the in-place decryption case to the last IV because that lets us use walk->iv (which is already aligned) for the xor operation where alignment is required. Signed-off-by: Herbert Xu commit 3c7f076da557eadb37240d70b0399ff9763fa2ae Author: Herbert Xu Date: Tue Nov 20 17:33:39 2007 +0800 [CRYPTO] cbc: Use crypto_xor This patch replaces the custom xor in CBC with the generic crypto_xor. Signed-off-by: Herbert Xu commit 7613636def82092a5c7b6322078a2af832410417 Author: Herbert Xu Date: Tue Nov 20 17:26:06 2007 +0800 [CRYPTO] api: Add crypto_inc and crypto_xor With the addition of more stream ciphers we need to curb the proliferation of ad-hoc xor functions. This patch creates a generic pair of functions, crypto_inc and crypto_xor which does big-endian increment and exclusive or, respectively. For optimum performance, they both use u32 operations so alignment must be as that of u32 even though the arguments are of type u8 *. Signed-off-by: Herbert Xu commit fcd06755936d2209b69650d2a7cc99cbcd3ccc67 Author: Patrick McHardy Date: Wed Nov 21 12:51:52 2007 +0800 [HIFN]: Add support for using the random number generator Signed-off-by: Patrick McHardy Acked-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit 37a8023ce59bfc1fa24067fd94aee7b286f4c01b Author: Patrick McHardy Date: Wed Nov 21 12:47:13 2007 +0800 [HIFN]: Improve PLL initialization The current PLL initalization has a number of deficiencies: - uses fixed multiplier of 8, which overclocks the chip when using a reference clock that operates at frequencies above 33MHz. According to a comment in the BSD source, this is true for the external clock on almost all every board. - writes to a reserved bit - doesn't follow the initialization procedure specified in chapter 6.11.1 of the HIFN hardware users guide - doesn't allow to use the PCI clock This patch adds a module parameter to specify the reference clock (pci or external) and its frequency and uses that to calculate the optimum multiplier to reach the maximal speed. By default it uses the external clock and assumes a speed of 66MHz, which effectively halfs the frequency currently used. Signed-off-by: Patrick McHardy Acked-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit 984e976f5382ff09351ddd3b023937611396d739 Author: Patrick McHardy Date: Wed Nov 21 12:24:45 2007 +0800 [HWRNG]: move status polling loop to data_present callbacks Handle waiting for new random within the drivers themselves, this allows to use better suited timeouts for the individual rngs. Signed-off-by: Patrick McHardy Acked-by: Michael Buesch Signed-off-by: Herbert Xu commit 2407d60872dd2a95404c6048f775f3b64d438f4b Author: Tan Swee Heng Date: Fri Nov 23 19:45:00 2007 +0800 [CRYPTO] salsa20: Salsa20 stream cipher This patch implements the Salsa20 stream cipher using the blkcipher interface. The core cipher code comes from Daniel Bernstein's submission to eSTREAM: http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/ref/ The test vectors comes from: http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/ It has been tested successfully with "modprobe tcrypt mode=34" on an UML instance. Signed-off-by: Tan Swee Heng Signed-off-by: Herbert Xu commit 332f8840f7095d294f9bb066b175a100bcde214c Author: Herbert Xu Date: Thu Nov 15 22:36:07 2007 +0800 [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type Up until now we have ablkcipher algorithms have been identified as type BLKCIPHER with the ASYNC bit set. This is suboptimal because ablkcipher refers to two things. On the one hand it refers to the top-level ablkcipher interface with requests. On the other hand it refers to and algorithm type underneath. As it is you cannot request a synchronous block cipher algorithm with the ablkcipher interface on top. This is a problem because we want to be able to eventually phase out the blkcipher top-level interface. This patch fixes this by making ABLKCIPHER its own type, just as we have distinct types for HASH and DIGEST. The type it associated with the algorithm implementation only. Which top-level interface is used for synchronous block ciphers is then determined by the mask that's used. If it's a specific mask then the old blkcipher interface is given, otherwise we go with the new ablkcipher interface. Signed-off-by: Herbert Xu commit 86f578de5ba6ea11ead9284d9f036fee01ba5893 Author: Herbert Xu Date: Thu Nov 15 19:00:06 2007 +0800 [CRYPTO] doc: Update api-intro.txt This patch updates the list of transforms we support and clarifies that the Block Ciphers interface in fact supports all ciphers including stream ciphers. It also removes the obsolete Configuration Notes section and adds the linux-crypto mailing list as the primary bug reporting address. Finally it documents the fact that setkey should only be called from user context. Signed-off-by: Herbert Xu commit 468577abe37ff7b453a9ac613e0ea155349203ae Author: Herbert Xu Date: Thu Nov 15 12:08:45 2007 +0800 [CRYPTO] scatterwalk: Use generic scatterlist chaining This patch converts the crypto scatterwalk code to use the generic scatterlist chaining rather the version specific to crypto. Signed-off-by: Herbert Xu commit 102d49d3d0f0f471b338b6805001fc3ca7bf663b Author: Andrew Morton Date: Tue Nov 13 21:55:28 2007 +0800 [CRYPTO] hifn: Add missing includes alpha: drivers/crypto/hifn_795x.c: In function 'ablkcipher_walk_init': drivers/crypto/hifn_795x.c:1231: error: implicit declaration of function 'sg_init_table' drivers/crypto/hifn_795x.c:1243: error: implicit declaration of function 'sg_set_page' drivers/crypto/hifn_795x.c: In function 'ablkcipher_walk_exit': drivers/crypto/hifn_795x.c:1257: error: implicit declaration of function 'sg_page' drivers/crypto/hifn_795x.c:1257: warning: passing argument 1 of '__free_pages' makes pointer from integer without a cast drivers/crypto/hifn_795x.c: In function 'ablkcipher_add': drivers/crypto/hifn_795x.c:1278: warning: passing argument 1 of 'kmap_atomic' makes pointer from integer without a cast drivers/crypto/hifn_795x.c: In function 'ablkcipher_walk': drivers/crypto/hifn_795x.c:1336: warning: passing argument 1 of 'kmap_atomic' makes pointer from integer without a cast drivers/crypto/hifn_795x.c: In function 'hifn_setup_session': drivers/crypto/hifn_795x.c:1465: warning: assignment makes pointer from integer without a cast drivers/crypto/hifn_795x.c:1469: warning: assignment makes pointer from integer without a cast drivers/crypto/hifn_795x.c:1472: warning: assignment makes pointer from integer without a cast drivers/crypto/hifn_795x.c: In function 'ablkcipher_get': drivers/crypto/hifn_795x.c:1593: warning: passing argument 1 of 'kmap_atomic' makes pointer from integer without a cast {standard input}: Assembler messages: {standard input}:7: Warning: setting incorrect section attributes for .got drivers/crypto/hifn_795x.c: In function 'hifn_process_ready': drivers/crypto/hifn_795x.c:1653: warning: passing argument 1 of 'kmap_atomic' makes pointer from integer without a cast drivers/crypto/hifn_795x.c: In function 'hifn_probe': drivers/crypto/hifn_795x.c:2438: error: 'DMA_32BIT_MASK' undeclared (first use in this function) drivers/crypto/hifn_795x.c:2438: error: (Each undeclared identifier is reported only once drivers/crypto/hifn_795x.c:2438: error: for each function it appears in.) drivers/crypto/hifn_795x.c:2443: warning: format '%d' expects type 'int', but argument 4 has type 'long int' drivers/crypto/hifn_795x.c:2443: warning: format '%d' expects type 'int', but argument 4 has type 'long int' Signed-off-by: Andrew Morton Signed-off-by: Herbert Xu commit 2707b937f322ba6b437f3dd1de05b9bb9756d803 Author: Jan Glauber Date: Mon Nov 12 21:56:38 2007 +0800 [CRYPTO] hifn: Make Kconfig option depend on PCI The HIFN driver is currently selectable on s390 but wont compile. Since it looks like HIFN needs PCI make the Kconfig dependent on PCI, which is not available on s390. Signed-off-by: Jan Glauber Acked-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit a1e6ef2f1e01f2aa9ed930e1089fc85dc745bf7a Author: Evgeniy Polyakov Date: Sat Nov 10 20:24:18 2007 +0800 [CRYPTO] hifn: Schedule callback invocation to tasklet. This patch forces HIFN driver to invoke crypto request callbacks from tasklet (softirq context) instead of hardirq context, since network stack expects it to be called from bottom halves. It is done by simply scheduling callback invocation via dedicated tasklet. Workqueue solution was dropped because of tooo slow rescheduling performance (7 times slower than tasklet, for mode details one can check this link: http://tservice.net.ru/~s0mbre/blog/devel/other/2007_11_09.html). Driver passed all AES and DES tests in tcryt.c module. Signed-off-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit cd12fb906d2591e80da9edcbd4794b9b916d7489 Author: Jonathan Lynch Date: Sat Nov 10 20:08:25 2007 +0800 [CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224 Resubmitting this patch which extends sha256_generic.c to support SHA-224 as described in FIPS 180-2 and RFC 3874. HMAC-SHA-224 as described in RFC4231 is then supported through the hmac interface. Patch includes test vectors for SHA-224 and HMAC-SHA-224. SHA-224 chould be chosen as a hash algorithm when 112 bits of security strength is required. Patch generated against the 2.6.24-rc1 kernel and tested against 2.6.24-rc1-git14 which includes fix for scatter gather implementation for HMAC. Signed-off-by: Jonathan Lynch Signed-off-by: Herbert Xu commit cd7c3bfe54270f41ac52be6b725a7194d99175b4 Author: Sebastian Siewior Date: Sat Nov 10 19:29:33 2007 +0800 [CRYPTO] geode: Add fallback for unsupported modes The Geode AES crypto engine supports only 128 bit long key. This patch adds fallback for other key sizes which are required by the AES standard. Signed-off-by: Sebastian Siewior Acked-by: Jordan Crouse Signed-off-by: Herbert Xu commit 5157dea8139cf0edc4834d528531e642c0d27e37 Author: Sebastian Siewior Date: Sat Nov 10 19:07:16 2007 +0800 [CRYPTO] aes-i586: Remove setkey The setkey() function can be shared with the generic algorithm. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit b345cee90a3ffec5eca6d6c1c59bd0d1feb453d4 Author: Sebastian Siewior Date: Thu Nov 8 21:27:05 2007 +0800 [CRYPTO] ctr: Remove default M NO other block mode is M by default. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 81190b321548bb0bf2d6e1f172695275b0fd1363 Author: Sebastian Siewior Date: Thu Nov 8 21:25:04 2007 +0800 [CRYPTO] aes-x86-64: Remove setkey The setkey() function can be shared with the generic algorithm. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 96e82e4551d38e0863b366a7b61185bc4a9946cc Author: Sebastian Siewior Date: Thu Nov 8 21:20:30 2007 +0800 [CRYPTO] aes-generic: Make key generation exportable This patch exports four tables and the set_key() routine. This ressources can be shared by other AES implementations (aes-x86_64 for instance). The decryption key has been turned around (deckey[0] is the first piece of the key instead of deckey[keylen+20]). The encrypt/decrypt functions are looking now identical (except they are using different tables and key). Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit be5fb270125729b7bca7879967f1dfadff0d9841 Author: Sebastian Siewior Date: Thu Nov 8 20:39:26 2007 +0800 [CRYPTO] aes-generic: Coding style cleanup Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 41fdab3dd385dde36caae60ed2df82aecb7a32f0 Author: Joy Latten Date: Wed Nov 7 22:59:47 2007 +0800 [CRYPTO] ctr: Add countersize This patch adds countersize to CTR mode. The template is now ctr(algo,noncesize,ivsize,countersize). For example, ctr(aes,4,8,4) indicates the counterblock will be composed of a salt/nonce that is 4 bytes, an iv that is 8 bytes and the counter is 4 bytes. When noncesize + ivsize < blocksize, CTR initializes the last block - ivsize - noncesize portion of the block to zero. Otherwise the counter block is composed of the IV (and nonce if necessary). If noncesize + ivsize == blocksize, then this indicates that user is passing in entire counterblock. Thus countersize indicates the amount of bytes in counterblock to use as the counter for incrementing. CTR will increment counter portion by 1, and begin encryption with that value. Note that CTR assumes the counter portion of the block that will be incremented is stored in big endian. Signed-off-by: Joy Latten Signed-off-by: Herbert Xu commit d3e7480572bf882dee5baa2891bccbfa3db0b1a1 Author: Denys Vlasenko Date: Tue Nov 6 22:15:19 2007 +0800 [CRYPTO] camellia: De-unrolling Move huge unrolled pieces of code (3 screenfuls) at the end of 128/256 key setup routines into common camellia_setup_tail(), convert it to loop there. Loop is still unrolled six times, so performance hit is very small, code size win is big. Signed-off-by: Denys Vlasenko Acked-by: Noriaki TAKAMIYA Signed-off-by: Herbert Xu commit 1ce73e8d6d95ceb860184c34fa1a91a82e51cbb3 Author: Denys Vlasenko Date: Tue Nov 6 22:13:40 2007 +0800 [CRYPTO] camellia: Code cleanup Optimize GETU32 to use 4-byte memcpy (modern gcc will convert such memcpy to single move instruction on i386). Original GETU32 did four byte fetches, and shifted/XORed those. Signed-off-by: Denys Vlasenko Acked-by: Noriaki TAKAMIYA Signed-off-by: Herbert Xu commit 3a5e5f8108fe440657e8041afd973d2fe72180bb Author: Denys Vlasenko Date: Tue Nov 6 22:05:36 2007 +0800 [CRYPTO] camellia: Code cleanup Rename some macros to shorter names: CAMELLIA_RR8 -> ROR8, making it easier to understand that it is just a right rotation, nothing camellia-specific in it. CAMELLIA_SUBKEY_L() -> SUBKEY_L() - just shorter. Move be32 <-> cpu conversions out of en/decrypt128/256 and into camellia_en/decrypt - no reason to have that code duplicated twice. Signed-off-by: Denys Vlasenko Acked-by: Noriaki TAKAMIYA Signed-off-by: Herbert Xu commit 1721a81256ed7f7bfdd1a721f3a6c9c85efeac53 Author: Denys Vlasenko Date: Tue Nov 6 22:01:20 2007 +0800 [CRYPTO] camellia: Code cleanup Move code blocks around so that related pieces are closer together: e.g. CAMELLIA_ROUNDSM macro does not need to be separated from the rest of the code by huge array of constants. Remove unused macros (COPY4WORD, SWAP4WORD, XOR4WORD[2]) Drop SUBL(), SUBR() macros which only obscure things. Same for CAMELLIA_SP1110() macro and KEY_TABLE_TYPE typedef. Remove useless comments: /* encryption */ -- well it's obvious enough already! void camellia_encrypt128(...) Combine swap with copying at the beginning/end of encrypt/decrypt. Signed-off-by: Denys Vlasenko Acked-by: Noriaki TAKAMIYA Signed-off-by: Herbert Xu commit e2b21b5002a2bf21ca73c7448309a7288a984ddf Author: Denys Vlasenko Date: Fri Oct 26 16:22:57 2007 +0800 [CRYPTO] twofish: Do not unroll big stuff in twofish key setup Currently twofish cipher key setup code has unrolled loops - approximately 70-100 instructions are repeated 40 times. As a result, twofish module is the biggest module in crypto/*. Unrolling produces x2.5 more code (+18k on i386), and speeds up key setup by 7%: unrolled: twofish_setkey/sec: 41128 loop: twofish_setkey/sec: 38148 CALC_K256: ~100 insns each CALC_K192: ~90 insns CALC_K: ~70 insns Attached patch removes this unrolling. $ size */twofish_common.o text data bss dec hex filename 37920 0 0 37920 9420 crypto.org/twofish_common.o 13209 0 0 13209 3399 crypto/twofish_common.o Run tested (modprobe tcrypt reports ok). Please apply. Signed-off-by: Denys Vlasenko Signed-off-by: Herbert Xu commit b7a30da61adc5f252ee97b2a4f3fc23c9d06a08a Author: Sebastian Siewior Date: Sun Oct 21 16:21:25 2007 +0800 [CRYPTO] geode: move defines into a headerfile This patch moves macros in geode-aes.c into geode-aes.h. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 1f4e4773761d0aa622411469b54d6570005a66b1 Author: Sebastian Siewior Date: Sun Oct 21 16:18:12 2007 +0800 [CRYPTO] geode: relax in busy loop and care about return value The code waits in a busy loop until the hardware finishes the encryption or decryption process. This wants a cpu_relax() :) The busy loop finishes either if the encryption is done or if the counter is zero. If the latter is true than the hardware failed. Since this should not happen, leave sith a BUG(). Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 2d506d4fa1df18aa9505820722f834426edc907f Author: Sebastian Siewior Date: Sun Oct 21 16:04:23 2007 +0800 [CRYPTO] geode: use consistent IV copy It is enough if the IV is copied before and after the while loop. With DM-Crypt is seems not be required to save the IV after encrytion because a new one is used in the request (dunno about other users). It is not save to load the IV within while loop and not save afterwards because we mill end up with the wrong IV if the request goes consists of more than one page. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit 89e12654312dddbbdbf17b5adc95b22cb672f947 Author: Sebastian Siewior Date: Wed Oct 17 23:18:57 2007 +0800 [CRYPTO] aes: Move common defines into a header file This three defines are used in all AES related hardware. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit f1901f1fc710ec0fc482a7c98ee4552874139f39 Author: Sebastian Siewior Date: Mon Oct 15 22:09:47 2007 +0800 [CRYPTO] geode: remove alias alias isn't required because the module provides PCI ids. Signed-off-by: Sebastian Siewior Signed-off-by: Herbert Xu commit c3041f9c93e31159f4e321abea7c1549d271e6a7 Author: Evgeniy Polyakov Date: Thu Oct 11 19:58:16 2007 +0800 [CRYPTO] hifn_795x: Detect weak keys HIFN driver update to use DES weak key checks (exported in this patch). Signed-off-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit 16d004a2eda7be2c6a2de63eca2ad3c6b57307b3 Author: Evgeniy Polyakov Date: Thu Oct 11 19:48:58 2007 +0800 [CRYPTO] des: Create header file for common macros This patch creates include/crypto/des.h for common macros shared between DES implementations. Signed-off-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit f7d0561ea1dadec5462846520b1f4fb304294fd5 Author: Evgeniy Polyakov Date: Fri Oct 26 21:31:14 2007 +0800 [CRYPTO] hifn_795x: HIFN 795x driver This is a driver for HIFN 795x crypto accelerator chips. It passed all tests for AES, DES and DES3_EDE except weak test for DES, since hardware can not determine weak keys. Signed-off-by: Evgeniy Polyakov Signed-off-by: Herbert Xu commit 23e353c8a681cc30d42fbd4f2c2be85c44fe209b Author: Joy Latten Date: Tue Oct 23 08:50:32 2007 +0800 [CRYPTO] ctr: Add CTR (Counter) block cipher mode This patch implements CTR mode for IPsec. It is based off of RFC 3686. Please note: 1. CTR turns a block cipher into a stream cipher. Encryption is done in blocks, however the last block may be a partial block. A "counter block" is encrypted, creating a keystream that is xor'ed with the plaintext. The counter portion of the counter block is incremented after each block of plaintext is encrypted. Decryption is performed in same manner. 2. The CTR counterblock is composed of, nonce + IV + counter The size of the counterblock is equivalent to the blocksize of the cipher. sizeof(nonce) + sizeof(IV) + sizeof(counter) = blocksize The CTR template requires the name of the cipher algorithm, the sizeof the nonce, and the sizeof the iv. ctr(cipher,sizeof_nonce,sizeof_iv) So for example, ctr(aes,4,8) specifies the counterblock will be composed of 4 bytes from a nonce, 8 bytes from the iv, and 4 bytes for counter since aes has a blocksize of 16 bytes. 3. The counter portion of the counter block is stored in big endian for conformance to rfc 3686. Signed-off-by: Joy Latten Signed-off-by: Herbert Xu commit 197c183f3526dc08aa52ca97ec66c268442d4b84 Author: Steve French Date: Thu Jan 10 17:10:23 2008 +0000 [CIFS] Forgot to add two new files from previous commit Thanks to Igor for noticing this. CC: Igor Mammedov Signed-off-by: Steve French commit 6103335de8afa5d780dcd512abe85c696af7b040 Author: Steve French Date: Wed Jan 9 16:21:36 2008 +0000 [CIFS] DNS name resolution helper upcall for cifs Adds additional option CIFS_DFS_UPCALL to fs/Kconfig for enabling DFS support. Resolved IP address is saved as a string in the key payload. Igor has a series of related patches that will follow which finish up CIFS DFS support Acked-by: Igor Mammedov Signed-off-by: Steve French commit f6d09982197c4163c70f6af0cf15bb78674105c0 Author: Steve French Date: Tue Jan 8 23:18:22 2008 +0000 [CIFS] fix checkpatch warnings in fs/cifs/inode.c Signed-off-by: Steve French commit da8a41d19233c2bdcc59447aedc808fcdaabf5b7 Author: Dave Kleikamp Date: Tue Nov 13 22:25:41 2007 -0600 JFS: FIx one more plain integer as NULL pointer warning Signed-off-by: Dave Kleikamp commit 09aaa749f637b19c308464c2b65a001e67c2a16c Author: Joe Perches Date: Tue Nov 13 22:16:08 2007 -0600 JFS: Remove defconfig ptr comparison to 0 Remove sparse warning: Using plain integer as NULL pointer Signed-off-by: Joe Perches Signed-off-by: Dave Kleikamp commit a7fe0ba7eee4f7c53077ff2bed2b581db17d00df Author: Shaun Zinck Date: Fri Aug 31 12:57:28 2007 -0500 JFS: use DIV_ROUND_UP where appropriate This replaces some macros and code, which do the same thing as DIV_ROUND_UP defined in kernel.h, to use the DIV_ROUND_UP macro. Signed-off-by: Shaun Zinck Signed-off-by: Dave Kleikamp commit 1eb3a711d6a1c8a4697a2e89d09048353b8aefd3 Author: Jack Stone Date: Tue Jul 31 09:36:53 2007 -0500 Remove unnecessary kmalloc casts in the jfs filesystem Signed-off-by: Jack Stone Signed-off-by: Dave Kleikamp commit 54af6233d1cb84cdfaa6ea44ea0db0bcf518baac Author: Nick Piggin Date: Mon Nov 26 14:58:10 2007 -0600 JFS is missing a memory barrier JFS is missing a memory barrier needed to close the critical section before clearing the lock bit. Use lock bitops for this. unlock_page() has a second barrier after clearing the lock, which is required because it checks whether the waitqueue is active without locks. Such a barrier is not required here because the waitqueue spinlock is always taken (something to think about if performance is an issue). Signed-off-by: Nick Piggin Signed-off-by: Dave Kleikamp commit 67e6682f18b3bf812a994ae027ff87174a297ae8 Author: Dave Kleikamp Date: Wed Oct 10 11:11:24 2007 -0500 JFS: Make sure special inode data is written after journal is flushed This patch makes sure that data that we tried to flush before the journal was completely written actually gets pushed to disk. To avoid duplicating code, moved common code to write_special_inodes(). Signed-off-by: Dave Kleikamp commit 29a424f28390752a4ca2349633aaacc6be494db5 Author: Dave Kleikamp Date: Thu Jan 3 13:09:33 2008 -0600 JFS: clear PAGECACHE_TAG_DIRTY for no-write pages When JFS decides to drop a dirty metapage, it simply clears the META_dirty bit and leave alone the PG_dirty and PAGECACHE_TAG_DIRTY bits. When such no-write page goes to metapage_writepage(), the `relic' PAGECACHE_TAG_DIRTY tag should be cleared, to prevent pdflush from repeatedly trying to sync them. This is done through set_page_writeback(), so call it should be called in all cases. If no I/O is initiated, end_page_writeback() should be called immediately. This is how __block_write_full_page() does things. Signed-off-by: Dave Kleikamp CC: Fengguang Wu commit 88e7d705c4bdb729f02173583628ccbf49dba945 Author: Steve French Date: Thu Jan 3 17:37:09 2008 +0000 [CIFS] hold ses sem on tcp session reconnect during mount Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 97837582bc1e191d2792af74c1f3762ed01243b9 Author: Steve French Date: Mon Dec 31 07:47:21 2007 +0000 [CIFS] Allow setting mode via cifs acl Requires cifsacl mount flag to be on and CIFS_EXPERIMENTAL enabled CC: Shirish Pargaonkar Signed-off-by: Steve French commit 28c5a02a11f70bb1fd8dd3b633206e2db3220308 Author: Jeff Layton Date: Mon Dec 31 04:56:21 2007 +0000 [CIFS] fix unicode string alignment in SPNEGO setup Unicode strings need to be word aligned, but the code that handles that is currently not taking the length of the SPNEGO blob into account. Fix it to do so. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit bb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607 Author: Steve French Date: Mon Dec 31 04:21:29 2007 +0000 [CIFS] cifs_partialpagewrite() cleanup rc cannot be -EBADF now and condition is always true Signed-off-by: Vasily Averin Signed-off-by: Steve French commit 1a67570c76402b36695cd0725e28649ee8fe830d Author: Jeff Layton Date: Mon Dec 31 04:03:02 2007 +0000 [CIFS] use krb5 session key from first SMB session after a NegProt Currently, any new kerberos SMB session overwrites the server's session key. The session key should only be set by the first SMB session set up on the socket. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 1d9a8852c365fb7f8db0f8364210138985f457b8 Author: Jeff Layton Date: Mon Dec 31 01:37:11 2007 +0000 [CIFS] redo existing session setup if needed in cifs_mount When cifs_mount finds an existing SMB session that it can use for a new mount, it does not check to see whether that session is in need of being reconnected. An easy way to reproduce: 1) mount //server/share1 2) watch /proc/fs/cifs/DebugData for the share to go DISCONNECTED 3) mount //server/share2 with same creds as in step 1. The second mount will fail because CIFSTCon returned -EAGAIN. If you do an operation in share1 and then reattempt the mount it will work (since the session is reestablished). The following patch fixes this by having cifs_mount check the status of the session when it picks an existing session and calling cifs_setup_session on it again if it's in need of reconnection. Thanks to Wojciech Pilorz for the initial bug report. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 05b3de63da2abe804f5dbe0174298bf48949079f Author: Jeff Layton Date: Mon Dec 31 00:51:45 2007 +0000 [CIFS] Only dump SPNEGO key if CONFIG_CIFS_DEBUG2 is set The SPNEGO key data is not terribly interesting except in certain debugging situations. Only dump it to the ring buffer if needed. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit dae5dbdbd786798ad2249e54df1156d524da30aa Author: Steve French Date: Sun Dec 30 23:49:57 2007 +0000 [CIFS] fix SetEA failure to some Samba versions Thanks to Oleg Gvozdev for noticing the problem. CC: Andrew Morton Signed-off-by: Steve French commit 9c5e710bc1431f41ccdd0c294fa355aa0d45d2d7 Author: Mike Frysinger Date: Sat Nov 17 23:19:44 2007 +0800 MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 408dbc0da29913f99e56001db892eb653b47c13b Author: Bryan Wu Date: Sun Jan 27 18:38:12 2008 +0800 [Blackfin] arch: remove old I2C BF54x porting. Signed-off-by: Bryan Wu commit fc97551db9e4e9402ff2b5c94be8267b2e5f32f4 Author: Bernd Schmidt Date: Sun Jan 27 19:56:43 2008 +0800 [Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it. Signed-off-by: Bernd Schmidt Signed-off-by: Bryan Wu commit ee7883b7466e721a72edacbcba2fe9cf449d82b2 Author: Yi Li Date: Sun Jan 27 19:56:17 2008 +0800 [Blackfin] arch: fix bug kernel boot message: memory information is not reasonable Some of the information in kernel boot message is not reasonable. http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3846 - use _rambase as the start of kernel image. kernel is in the region [_rambase, _ramstart] - count in pages in per-cpu-page list as available memory - reserved memory now include: [0 - 4K] for bad pointer catching, memory reserved for abnormaly 05000263, memory reserved by kernel itself. Signed-off-by: Yi Li Signed-off-by: Bryan Wu commit de8c43f2fca9bb06f3ee87b38a61d5d9966ce221 Author: Mike Frysinger Date: Thu Jan 24 17:14:04 2008 +0800 [Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 96a5c6f9bef027e1187b2f168bb3e08ef21d0b6f Author: Michael Hennerich Date: Tue Jan 22 19:23:50 2008 +0800 [Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up writes to I/DMEM_CONTROL must be followed by SSYNC Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 03c5732855300f05aac718ca770c2bb05e1fd48b Author: Sonic Zhang Date: Tue Jan 22 18:45:10 2008 +0800 [Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit 444ad82bc3eaa554be40d22dc248e58aeefd54d9 Author: Michael Hennerich Date: Tue Jan 22 18:38:02 2008 +0800 [Blackfin] arch: Add proper SW System Reset delay sequence Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit a628a8bcd8a6daea6096fe781fc36cae4ac1ed48 Author: Michael Hennerich Date: Tue Jan 22 17:29:16 2008 +0800 [Blackfin] arch: Update copyright date Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit a2c8cfef6abb33ee49d80c58391ebfc4f94221ef Author: Michael Hennerich Date: Tue Jan 22 17:20:10 2008 +0800 [Blackfin] arch: GPIO API cleanup and anomaly update - Add anomaly workaround for bfin_gpio_reset_spi0_ssel1 - Fix style - Update copyright - Remove BUG_ON checks for functions intended to be used only by arch support. GPIO users should only access using the generic GPIO API - Make all GPIO identifier unsigned int Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit acbcd2631975cf6f0be5cd294cbfd12226cd9958 Author: Michael Hennerich Date: Tue Jan 22 18:36:20 2008 +0800 [Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface signef-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit b97b8a998397e8c64699559099fa9febffae2b4d Author: Bernd Schmidt Date: Sun Jan 27 18:39:16 2008 +0800 [Blackfin] arch: Initial checkin of the memory protection support. Enable it with CONFIG_MPU. Signed-off-by: Bernd Schmidt Signed-off-by: Bryan Wu commit 2047e40d724d42928c0b5994a1568c1b738efdb7 Author: Michael Hennerich Date: Tue Jan 22 15:29:18 2008 +0800 [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 4521ef42de8dbaa9bce3f60bbb5868564f752e98 Author: Michael Hennerich Date: Fri Jan 11 17:21:41 2008 +0800 [Blackfin] arch: Add some comments - fix semicolons Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 7a1a6d00618bce53ae88e501ff5d4b82522db926 Author: Bernd Schmidt Date: Fri Jan 11 16:58:44 2008 +0800 [Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/ Signed-off-by: Bernd Schmidt Signed-off-by: Bryan Wu commit aee3a29240ad167ad7875d859506d8bb90431c70 Author: Robin Getz Date: Fri Jan 11 16:53:00 2008 +0800 [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit e31639540d2b1474766e95c1a7b1b698468ba092 Author: Bryan Wu Date: Thu Jan 24 16:19:15 2008 +0800 [Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards Signed-off-by: Bryan Wu commit 6b5eace2f15b53d5a6849078d22e78db77625929 Author: Robin Getz Date: Thu Jan 10 17:57:56 2008 +0800 [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel Don't oops_in_progress if single step is comming from the kernel, which happens if a single step occurs after a exception cause. This fixes up the remaining issues in the toolchain bug. Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit a546b0ac5988348446e4fd5987df699b4c9b1f2a Author: Michael Hennerich Date: Mon Dec 24 20:19:51 2007 +0800 [Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on Make sure the SYSTEM reset completes before we issue the CORE reset Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 7cc1c4b2c44d7807f55da6a36f5b2e49977c67b7 Author: Mike Frysinger Date: Mon Dec 24 20:05:09 2007 +0800 [Blackfin] arch: update to latest anomaly sheets Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 79f1ec862ae2e693b85fd7c94654ba1779ff5863 Author: Joe Perches Date: Mon Dec 24 20:03:51 2007 +0800 [Blackfin] arch: Spelling fixes Signed-off-by: Joe Perches Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit b39f4ce974114ce8960d8bfa063c1f61e29d67cf Author: Sonic Zhang Date: Wed Dec 26 12:00:10 2007 +0800 [Blackfin] arch: fix bug - kgdb causing kernel panic ignore soft bp except when single step except occurs. Narrow the condition to ignore soft bp. If soft bp occurs in the single step handler or the soft bp handler, return immediately. This could happen when gdb client set soft bps in kernel code that in the path of kgdb core code. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit 76a7f4049277691b9b800a23dc09009374cdaa21 Author: Enrik Berkhan Date: Mon Dec 24 19:51:31 2007 +0800 [Blackfin] arch: fix bug when DMA operation related core B of BF561 - Before DMA'ing data to core B L1 memory, caches have to be flushed. - Before DMA'ing data from core B L1 memory, caches have to be invalidated. - Fix lock/unlock. Signed-off-by: Enrik Berkhan Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 37931db5bdce35d37a9bdf93082604620ba3341a Author: Sonic Zhang Date: Mon Dec 24 19:43:39 2007 +0800 [Blackfin] arch: Restore default DMA priority over core on bf54x. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit 43f73fef07eb70be7d508b34eeddf5985e300bb1 Author: Mike Frysinger Date: Mon Dec 24 19:35:35 2007 +0800 [Blackfin] arch: pull in linux/etherdevice.h for random_ether_addr() used in bfin_get_ether_addr() Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 7285846ff8d09879cacac5c6d40fc8e8443c7cf0 Author: Martin Strubel Date: Mon Dec 24 19:12:32 2007 +0800 [Blackfin] arch: disable bfin_get_ether_addr fucntion for boards when do not use MAC driver Signed-off-by: Martin Strubel Signed-off-by: Bryan Wu commit 8baf560b4c901fb554d15e056aaa7f34b2345be5 Author: Michael Hennerich Date: Mon Dec 24 18:51:34 2007 +0800 [Blackfin] arch: Enable both edge triggered GPIO IRQs on BF54x and use irq_to_gpio() Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 471b9a6c7304d5f59503d111e71e60a7e19fb9a0 Author: Martin Strubel Date: Sun Jan 27 19:54:20 2008 +0800 [Blackfin] arch: added Minotaur BSP Signed-off-by: Martin Strubel Signed-off-by: Bryan Wu commit 2463ef22bf8b6e22048bd26f940c014f7e1f0998 Author: Michael Hennerich Date: Sun Jan 27 16:49:48 2008 +0800 [Blackfin] arch: replace current blackfin specific pfbutton driver with kernel generic gpio key driver Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 6fce6a8d6940654b48d3d540627c7ee790a03b80 Author: Michael Hennerich Date: Mon Dec 24 16:56:12 2007 +0800 [Blackfin] arch: append IRQ Number to label string Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit fac3cf432ef9b6bfd64b35b95afe0b7e0079da74 Author: Michael Hennerich Date: Mon Dec 24 20:07:03 2007 +0800 [Blackfin] arch: Fix gpio label handling early serial init also utilizes the peripheral request api - however at this point bfin_gpio_init didn't allocate memory for the labels. So we always have two zombies (allocated pin functions without labels) This happens before the initcalls - We now allocate memory statically. Define MAX_RESOURCES individually for each cpu. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 1545a1111a02b5aafe6f141e133a6269c5741285 Author: Mike Frysinger Date: Mon Dec 24 16:54:48 2007 +0800 [Blackfin] arch: add support for BF523/BF524/BF526 Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 54a1668ce53fe701f1d36651b591ced388e97275 Author: Mike Frysinger Date: Mon Dec 24 14:59:03 2007 +0800 [Blackfin] arch: scrub dead alive/idle LED code if it does get re-added, it needs to be in the boards directory, not common code ... or it needs a re-implementation Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 3ca32c1dc62dabe67d7e51f6e8568e3965f52236 Author: Bernd Schmidt Date: Mon Dec 24 12:40:29 2007 +0800 [Blackfin] arch: fix up coding style in uaccess.h Signed-off-by: Bernd Schmidt Signed-off-by: Bryan Wu commit b8aab6f6dc57ca79661d291af522d2e85156519f Author: Cliff Cai Date: Mon Dec 24 12:33:20 2007 +0800 [Blackfin] arch: set default value of DEB_DMA_URGENT to YES to avoid DMA aborting caused by conflict between core and DMA Signed-off-by: Cliff Cai Signed-off-by: Bryan Wu commit 7a5f819187ff827c131721dbba11ad9596ae5e30 Author: Javier Herrero Date: Sun Jan 27 19:53:08 2008 +0800 [Blackfin] arch: Added support for OpenCores Keyboard Controller to H8606 board Signed-off-by: Javier Herrero Signed-off-by: Bryan Wu commit 2935077e06494638a78a02f7b4cf304e4e70eaca Author: Bryan Wu Date: Mon Dec 24 12:20:19 2007 +0800 [Blackfin] arch: Fix if/def BUG - and define is multipoint NO Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 0e85e3020ebb9a1afdeaa516fe8b8f16087adac1 Author: Michael Hennerich Date: Mon Dec 24 11:57:47 2007 +0800 [Blackfin] arch: The BF527 EZkit connects UART1/PORTF Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit f31db2a8e824de67b3480c1502d70a9c902c7c1b Author: Bryan Wu Date: Thu Jan 24 16:14:35 2008 +0800 [Blackfin] arch: update defconfig of boards Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 50657afdd95a595a68d4ef420300638c0880db37 Author: Michael Hennerich Date: Mon Dec 24 00:16:01 2007 +0800 [Blackfin] arch: Trash bf54x-hcd driver - we use the musb driver Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 1089e228737019b9711a6a394eebe25bf46b22d9 Author: Michael Hennerich Date: Mon Dec 24 11:49:29 2007 +0800 [Blackfin] arch: Enable peripheral platform resources on the BF527 EZkit Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit 971d5bc4e5c75bfc4466deaff09839cd6f918eca Author: Sonic Zhang Date: Sun Jan 27 16:32:31 2008 +0800 [Blackfin] arch: Fix bug to Enable bf548 to Re-program Clocks while Kernel boots. Reprogram DDR EBIU register properly for bf548. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit b03b08ba9c7235861adf4dde712dade0bb756fe0 Author: Robin Getz Date: Sun Dec 23 22:57:01 2007 +0800 [Blackfin] arch: Clean up dump_bfin_mem Clean up dump_bfin_mem so that it will display content from the kernel, as well as l1 instruction, when deferred HW errors happen, print out the last frame info if it makes sense. Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 0d4a89bb3eb58f39831186fa6b1542893dbfdc9f Author: Michael Hennerich Date: Sun Jan 27 19:58:46 2008 +0800 [Blackfin] arch: add Hitachi TX09D70VM1CDA TFT LCD driver resource to Blackfin board Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit fb5f00492a748facc9f069c95621e05c148edf53 Author: Sonic Zhang Date: Sun Dec 23 23:02:13 2007 +0800 [Blackfin] arch: Fix bug to Enable kernel to build for bf548 with PM. On BF548-EZKIT, build kernel faills with power management, video and audio enabled. This patch fix this. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit c50e19f49830fb651b4b702ad2c3abcdf110b576 Author: Yi Li Date: Fri Dec 21 21:12:21 2007 +0800 [Blackfin] arch: fix bug - make memcpy return the dest addr. The memcpy() function returns the src pointer instead of the dst pointer. This patch fix this bug. Signed-off-by: Yi Li Signed-off-by: Bryan Wu commit a5bb85dfffd38714d83cf7798886462d7314b90a Author: Cliff Cai Date: Fri Dec 21 21:04:40 2007 +0800 [Blackfin] arch: fix bug SDIO driver fails to build for BF542/BF548 modified CMD_TIMEOUT and DAT_TIMEOUT to CMD_TIME_OUT and DAT_TIME_OUT Signed-off-by: Cliff Cai Signed-off-by: Bryan Wu commit fb96c56de33def1484614c6a3d0fbef76595ce2f Author: Javier Herrero Date: Fri Dec 21 18:26:44 2007 +0800 [Blackfin] arch: Added support for 8250-class UARTs in HV Sistemas H8606 board, modification in 8250.c driver for correct compilation with Blackfin Signed-off-by: Javier Herrero Signed-off-by: Bryan Wu commit d5c4b5e3b2682a9aac07a43a8a79d3b692b22567 Author: Robin Getz Date: Fri Dec 21 17:49:53 2007 +0800 [Blackfin] arch: Let the pre-processor do the math to save a few cycles - no functional changes Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 6f3ed704b03b2f9997b604690ac43a3514105a6a Author: Robin Getz Date: Fri Dec 21 17:48:07 2007 +0800 [Blackfin] arch: do not use fixed numbers to describe offsets - no functional changes Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 0626d79686b4536eac1dc88e2cf52d927a5010c2 Author: Robin Getz Date: Fri Dec 21 17:46:33 2007 +0800 [Blackfin] arch: do not use hard coded addresses Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit d8f66c8c1ea8e948483ee4739ad91120f5f7de51 Author: Robin Getz Date: Mon Dec 24 15:27:56 2007 +0800 [Blackfin] arch: fix bug gdb testing on hardware has regression http://blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=3651 As Bernd predicted, this was only necessary because of other problems in the kenel - fixing those, and this is not necessary, so remove it. Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 13fe24f37df20e580a5a364e67ec8cf3219d8f8c Author: Robin Getz Date: Sun Jan 27 15:38:56 2008 +0800 [Blackfin] arch: fix bug - trap_tests fails to recover on some tests. http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3719 When the CPLBs get a miss, we do: - find a victim in the HW table - remove the victim - find the replacement in the software table - put it into the HW table. If we can't find a replacement in the software table, we accidently leave a duplicate in the HW table. This patch ensures that duplicate is marked as not valid. What we should do is find the replacement in the software table, before we find a victim in the HW table - but its too late in the release cycle to do that much restructuring of this code. Rather that duplicate code, connect Hardware Errors (irq5) into trap_c, so user space processes get killed properly. The rest of irq_panic() can be moved into traps.c (later) There is still a small corner case that causes problems when a pheriperal interrupt goes off a single cycle before a user space hardware error. This causes a kernel panic, rather than the user space process being killed. But, this checkin makes things work in 99.9% of the cases, and is a vast improvement from what is there today (which fails 100% of the time). Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit f53e86760e10abbe7ee98a5b3cb270fa6426fcdb Author: Robin Getz Date: Sun Jan 27 15:38:44 2008 +0800 [Blackfin] arch: Add a note describing what is going on - no functional changes Signed-off-by: Robin Getz Signed-off-by: Bryan Wu