aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-01-09md: raid0: make hash_spacing and preshift sector-based.Andre Noll
This patch renames the hash_spacing and preshift members of struct raid0_private_data to spacing and sector_shift respectively and changes the semantics as follows: We always have spacing = 2 * hash_spacing. In case sizeof(sector_t) > sizeof(u32) we also have sector_shift = preshift + 1 while sector_shift = preshift = 0 otherwise. Note that the values of nb_zone and zone are unaffected by these changes because in the sector_div() preceeding the assignement of these two variables both arguments double. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0: Represent the size of strip zones in sectors.Andre Noll
This completes the block -> sector conversion of struct strip_zone. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's.Andre Noll
This patch consists only of these trivial changes. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0 create_strip_zones(): Make two local variables sector-based.Andre Noll
current_offset and curr_zone_offset stored the corresponding offsets as 1K quantities. Rename them to current_start and curr_zone_start to match the naming of struct strip_zone and store the offsets as sector counts. Also, add KERN_INFO to the printk() affected by this change to make checkpatch happy. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0: Represent zone->zone_offset in sectors.Andre Noll
For the same reason as in the previous patch, rename it from zone_offset to zone_start. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0: Represent device offset in sectors.Andre Noll
Rename zone->dev_offset to zone->dev_start to make sure all users have been converted. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0_make_request(): Replace local variable block by sector.Andre Noll
This change already simplifies the code a bit. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0_make_request(): Remove local variable chunk_size.Andre Noll
We might as well use chunk_sects instead. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: raid0_make_request(): Replace chunksize_bits by chunksect_bits.Andre Noll
As ffz(~(2 * x)) = ffz(~x) + 1, we have chunksect_bits = chunksize_bits + 1. Fixup all users accordingly. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: use sysfs_notify_dirent to notify changes to md/sync_action.NeilBrown
There is no compelling need for this, but sysfs_notify_dirent is a nicer interface and the change is good for consistency. Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09md: fix bitmap-on-external-file bug.NeilBrown
commit a2ed9615e3222645007fc19991aedf30eed3ecfd fixed a bug with 'internal' bitmaps, but in the process broke 'in a file' bitmaps. So they are broken in 2.6.28 This fixes it, and needs to go in 2.6.28-stable. Signed-off-by: NeilBrown <neilb@suse.de> Cc: stable@kernel.org
2009-01-08pata_hpt366: reimplement mode programmingTejun Heo
Reimplement mode programming logic of pata_hpt366 such that it's identical to that of IDE hpt366 driver. The differences were... * pata_hpt366 used 0xCFFF8FFFF to mask pio modes and 0x3FFFFFFF dma modes. IDE hpt366 uses 0xC1F8FFFF for PIO, 0x303800FF for MWDMA and 0x30070000 for UDMA. * pata_hpt366 doesn't set 0x08000000 for PIO unless it's already set and always turns it on for MWDMA/UDMA. IDE hpt366 doesn't bother with the bit. It always uses what was there. * IDE hpt366 always clears 0xC0000000. pata_hpt366 doesn't. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08[libata] pata_hpt3x3: correct _freeze() function declarationJeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08libata: Add special ata_pio_need_iordy() handling for Compact Flash.David Daney
According to the Compact Flash specification r4.1, PIO modes 5 and 6 do not use iordy. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08pata_platform: __pata_platform_remove() shouldn't be in discard sectionSonic Zhang
-- UPD include/linux/compile.h `___pata_platform_remove' referenced in section `__ksymtab_gpl' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o make: *** [.tmp_vmlinux1] Error 1 -- __pata_platform_remove() should not be in discarded section __pata_platform_remove(struct device *dev) is invoked in both pata_platform.c and pata_of_platform.c by reomve function defined in discarded section ".devexit.text". An exported function should not be put into discarded section. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08sata_sil24: remove unused sil24_port_multiplierGrant Grundler
AFAICT, struct sil24_port_multiplier isn't used anywhere. Remove it. Signed-off-by: Grant Grundler <grundler@google.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08[libata] ahci: Add SATA GEN3 related messagesShane Huang
The present AHCI driver seems to support SATA GEN 3 speed, but the related messages should be modified. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08ata_piix: save, use saved and restore IOCFGTejun Heo
Certain ACPI implementations mess up IOCFG on _STM making libata detect cable type incorrectly after a suspend/resume cycle. This patch makes ata_piix save IOCFG on attach, use the saved value for things which aren't dynamic and restore it on detach so that the next driver also gets the BIOS initialized value. This patch contains the following changes. * makes ich_pata_cable_detect() use saved_iocfg. * make piix_iocfg_bit18_quirk() take @host and use saved_iocfg. * hpriv allocation moved upwards to save iocfg before doing anything else. This fixes bz#11879. Andreas Mohr reported and diagnosed the problem. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Andreas Mohr <andi@lisas.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08pata_ali: Fix and workaround for FIFO DMA bugAlan Cox
In very obscure cases this can cause problems. We need to help the hardware out a bit to avoid DMA problems on a reset. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08pata_ali: force initialise a few bitsAlan Cox
We can't assume some of the setup here on non x86 boxes. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08pata_hpt3x3: Workarounds for chipsetAlan Cox
Correct the DMA bit flags (UDMA and MWDMA were swapped) Add workarounds so that we clear ERR and INTR bits before issuing a DMA Add workarounds so that we stop a live DMA before touching the CTL register Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-08regulator: catch some registration errorsDavid Brownell
Prevent registration of duplicate "struct regulator" names. They'd be unavailable, and clearly indicate something wrong. [Edited to remove check for NULL consumer device until we have a solution for things like cpufreq -- broonie] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: Fix some kerneldoc rendering issuesMark Brown
There are some minor textual changes in here as well, mostly to enable() and disable() but the primary goal of these changes is to fix misrenderings of the kerneldoc documentation for the regulator API. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: Add missing kerneldocMark Brown
This is only the documentation that the kerneldoc system warns about. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: Clean up kerneldoc warningsMark Brown
Remove kerneldoc warnings that don't relate to missing documentation, mostly by renaming parameters in the documentation to match their actual names. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: Remove extraneous kerneldoc annotationsMark Brown
Some of the internal structures have no kerneldoc but the ** at the start of the comment marking them for documentation. Remove the annotation until some is added. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: init/link earlierDavid Brownell
Move regulator earlier in link sequence. The regulator core currently initializes as a core_initcall() to be available early ... but then it links way late, throwing away that benefit, so regulators available at e.g. subsys_initcall() are not available to subsystems which need to use them. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: move set_machine_constraints after regulator device initializationMike Rapoport
Calling set_machine_constraints before regulator device initialization causes crash when constraints have apply_uV set. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: da903x: make da903x_is_enabled return 0 or 1Mike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: da903x: add '\n' to error messagesMike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: sysfs attribute reduction (v2)David Brownell
Clean up the sysfs interface to regulators by only exposing the attributes that can be properly displayed. For example: when a particular regulator method is needed to display the value, only create that attribute when that method exists. This cleaned-up interface is much more comprehensible. Most regulators only support a subset of the possible methods, so often more than half the attributes would be meaningless. Many "not defined" values are no longer necessary. (But handling of out-of-range values still looks a bit iffy.) Documentation is updated to reflect that few of the attributes are *always* present, and to briefly explain why a regulator may not have a given attribute. This adds object code, about a dozen bytes more than was removed by the preceding patch, but saves a bunch of per-regulator data associated with the now-removed attributes. So there's a net reduction in memory footprint. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: code shrink (v2)David Brownell
Shrink regulator core by removing duplication in attribute printing and probe() cleanup paths. Saves about 340 bytes (object) on ARM. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: improved mode error checksDavid Brownell
Minor bugfixes in handling of regulator modes: - have the routine verifying regulator modes check against the set of legal modes (!); - have regulator_set_optimum_mode() verify the return value of regulator_ops.get_optimum_mode(), like drms_uA_update(); - one call to regulator_ops.set_mode() treated zero as a failure code; make this consistent with other callers. Both regulator_set_mode() and regulator_set_optimum_mode() now require valid_ops_mask to include REGULATOR_CHANGE_MODE; that seems like a bugfix too. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: enable/disable refcountingDavid Brownell
Make the <linux/regulator.h> framework treat enable/disable call pairs like the <linux/clk.h> and <linux/interrupt.h> frameworks do: they're refcounted, so that different parts of a driver don't need to put work into coordination that frameworks normally handle. It's a minor object code shrink. It also makes the regulator_is_disabled() kerneldoc say what it's actually returning: return value is not a refcount, and may report an error (e.g. I/O error from I2C). It also fixes some minor regulator_put() goofage: removing unlocked access to the enable state. (But still not making regulator put/get match the refcounting pattern they invoke.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08regulator: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Thanks, Kay From: Kay Sievers <kay.sievers@vrfy.org> Subject: regulator: struct device - replace bus_id with dev_name(), dev_set_name() Cc: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-01-08net: convert pegasus driver to net_device_opsOliver Neukum
This converts the pegasus driver to use of the new net_device_ops structure Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08bnx2x: Prevent eeprom set when driver is downEilon Greenstein
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08net: switch kaweth driver to netdevopsOliver Neukum
This converts the kaweth ethernet USB driver to netdevops. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08pcnet32: round off carrier watch timerStephen Hemminger
The link check watchdog timer on this driver fires every two seconds, but since not aligned it causes extra wakeups. It is more important on this driver than most because it is the hardware that is emulated by default when using network interfaces on VMware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08i2400m/usb: wrap USB power saving in #ifdef CONFIG_PMInaky Perez-Gonzalez
Current code was assuming PM was always enabled, which is not correct. Code which accesses members in the struct usb_device that are dependant on CONFIG_PM must be protected the same. Reported by Randy Dunlap from a build error in the linux-next tree on 07/01/2009. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
2009-01-08r6040: bump release number to 0.20Florian Fainelli
This patch bumps release number to 0.20 and 07Jan2009. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08r6040: warn about MAC address being unsetFlorian Fainelli
Some bootloader/BIOSes do not set the MAC address, warn about that. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08r6040: check PHY status when bringing interface upFlorian Fainelli
This patch makes the driver properly initialize the PHY status if not correctly set by the bootloader/BIOS. It prevents some boards to bring up the link on boot. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08r6040: make printks consistent with DRV_NAMEFlorian Fainelli
This patch fixes some printks which were not prefixed with DRV_NAME, useful when having multiple cards/drivers on the system. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08gianfar: Fixup use of BUS_ID_SIZEKumar Gala
Commit b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 ("gianfar: Convert gianfar to an of_platform_driver") went back to using BUS_ID_SIZE instead of sizeof() as per the larger patch series that will remove "char bus_id[20]" from struct device. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08mlx4_en: Returning real Max in get_ringparamYevgeny Petrilin
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08mlx4_en: Consider inline packets on completionYevgeny Petrilin
Was trying to unmap work queue entries that had inline packets, so naturally weren't mapped. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08netdev: bfin_mac: enable bfin_mac net dev driver for BF51xSonic Zhang
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08qeth: convert to net_device_opsFrank Blaschka
qeth_l2, qeth_l3 convert to net_device_ops. qeth_l3 remove vlan neigh_setup hack since it does not work any longer with the new net_device_ops. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>