summaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAgeFilesLines
* Drivers: ide: remove __dev* attributes.Greg Kroah-Hartman2013-01-0339-175/+162
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sections: fix section conflicts in drivers/ideAndi Kleen2012-10-0641-53/+53
| | | | | | | Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ide: fix generic_ide_suspend/resume OopsMiklos Szeredi2012-08-211-2/+2
| | | | | | | | | | | | | | | This patch fixes a regresion introduced by commit 0998d063 (device-core: Ensure drvdata = NULL when no driver is bound). Suspend oopses in generic_ide_suspend() because dev_get_drvdata() returns NULL (dev->p->driver_data == NULL) and this function is not prepared for this. Fix is based on Alan Stern's suggestion. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/ide/ide-cs.c: adjust suspicious bit operationJulia Lawall2012-06-121-1/+2
| | | | | | | | | | | IO_DATA_PATH_WIDTH_8 is 0, so a bit-and with it is always false. The value IO_DATA_PATH_WIDTH covers the bits of the IO_DATA_PATH constants, so first pick those bits and then make the test using !=. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* ide: icside.c: fix printk format string compile warningChristian Dietrich2012-06-061-4/+4
| | | | | | | | Use correct format string parameter for the peak datarate, and prevent uninitialized use of cycle_time. Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=nChristian Dietrich2012-06-061-5/+4
| | | | | | | | | | | The icside driver can be configured without DMA support, but it doesn't compile then, because DMA operations are referenced. drivers/ide/icside.c:523: error: 'icside_v6_port_ops' undeclared drivers/ide/icside.c:522: error: 'icside_dma_init' undeclared Signed-off-by: Christian Dietrich<christian.dietrich@informatik.uni-erlangen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Remove all #inclusions of asm/system.hDavid Howells2012-03-282-2/+0
| | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
* ide: remove the second argument of k[un]map_atomic()Cong Wang2012-03-201-2/+2
| | | | | Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com>
* ARM: at91: drop ide driver in favor of the pata oneJean-Christophe PLAGNIOL-VILLARD2012-02-132-367/+0
| | | | | | | | | Driver at91_ide is broken and should not be fixed: remove it. Modification of device files that where making use of it. The PATA driver (pata_at91) is able to replace at91_ide. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* block: add and use scsi_blk_cmd_ioctlPaolo Bonzini2012-01-141-2/+1
| | | | | | | | | | | | | Introduce a wrapper around scsi_cmd_ioctl that takes a block device. The function will then be enhanced to detect partition block devices and, in that case, subject the ioctls to whitelisting. Cc: linux-scsi@vger.kernel.org Cc: Jens Axboe <axboe@kernel.dk> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* module_param: make bool parameters really bool (drivers & misc)Rusty Russell2012-01-1310-12/+12
| | | | | | | | | | | | module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* ARM: at91/ide: use gpio_is_valid to check the gpioJean-Christophe PLAGNIOL-VILLARD2011-11-291-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ideLinus Torvalds2011-11-184-13/+29
|\ | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: cy82c693: fix PCI device selection icside: DMA support fix IDE: Don't powerdown Compaq Triflex IDE device on suspend piix: ICH7 MWDMA1 errata
| * cy82c693: fix PCI device selectionBartlomiej Zolnierkiewicz2011-10-131-3/+3
| | | | | | | | | | | | | | | | | | Wrong PCI device may be selected by cy82c693_set_pio_mode() if modular IDE host drivers are used and there are additional IDE PCI devices installed in the system. Fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * icside: DMA support fixBartlomiej Zolnierkiewicz2011-10-131-1/+1
| | | | | | | | | | | | | | | | | | Fix problem introduced by commit 5e37bdc ("ide: add struct ide_dma_ops (take 3)"): d.dma_ops shouldn't be cleared if we are going to use DMA. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * IDE: Don't powerdown Compaq Triflex IDE device on suspendMikulas Patocka2011-10-131-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't powerdown Compaq Triflex IDE device on suspend This fixes APM suspend on Compaq Armada 7400. APM BIOS doesn't suspend if IDE is powered down when suspending. The Triflex controller is found only on old Compaq boards, so this patch will hopefully have no side effects. This patch fixes a suspend regression introduced in feb22b7f8e62b1b987a3a1dbad95af767a1df832 ("ide: add proper PCI PM support (v2)"). Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> [bart: add commit's summary in parens] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * piix: ICH7 MWDMA1 errataBartlomiej Zolnierkiewicz2011-10-111-8/+10
| | | | | | | | | | | | | | Based on libata commit c611bed7. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ide-{cd,floppy,tape}: Do not include <linux/irq.h>Geert Uytterhoeven2011-11-083-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The top of <linux/irq.h> has this comment: * Please do not include this file in generic code. There is currently * no requirement for any architecture to implement anything held * within this file. * * Thanks. --rmk Remove inclusion of <linux/irq.h>, to prevent the following compile error from happening soon: | include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Borislav Petkov <bp@alien8.de> Cc: linux-ide@vger.kernel.org
* | Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds2011-11-0621-0/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
| * | ide/ata: Add module.h to the implicit modular usersPaul Gortmaker2011-10-318-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in the ide dir are actually calling out for <module.h> explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * | ide/ata: Add export.h for EXPORT_SYMBOL/THIS_MODULE where neededPaul Gortmaker2011-10-3113-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | They were getting this implicitly by an include of module.h from device.h -- but we are going to clean that up and break that include chain, so include export.h explicitly now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | | Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds2011-11-032-22/+30
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (37 commits) MIPS: O32: Provide definition of registers ta0 .. ta3. MIPS: perf: Add Octeon support for hardware perf. MIPS: perf: Add support for 64-bit perf counters. MIPS: perf: Reorganize contents of perf support files. MIPS: perf: Cleanup formatting in arch/mips/kernel/perf_event.c MIPS: Add accessor macros for 64-bit performance counter registers. MIPS: Add probes for more Octeon II CPUs. MIPS: Add more CPU identifiers for Octeon II CPUs. MIPS: XLR, XLS: Add comment for smp setup MIPS: JZ4740: GPIO: Check correct IRQ in demux handler MIPS: JZ4740: GPIO: Simplify IRQ demuxer MIPS: JZ4740: Use generic irq chip MIPS: Alchemy: remove all CONFIG_SOC_AU1??? defines MIPS: Alchemy: kill au1xxx.h header MIPS: Alchemy: clean DMA code of CONFIG_SOC_AU1??? defines MIPS, IDE: Alchem, au1xxx-ide: Remove pb1200/db1200 header dep MIPS: Alchemy: Redo PCI as platform driver MIPS: Alchemy: more base address cleanup MIPS: Alchemy: rewrite USB platform setup. MIPS: Alchemy: abstract USB block control register access ... Fix up trivial conflicts in: arch/mips/alchemy/devboards/db1x00/platform.c drivers/ide/Kconfig drivers/mmc/host/au1xmmc.c drivers/video/Kconfig sound/mips/Kconfig
| * | MIPS: Alchemy: remove all CONFIG_SOC_AU1??? definesManuel Lauss2011-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that no driver any longer depends on the CONFIG_SOC_AU1??? symbols, it's time to get rid of them: Move some of the platform devices to the boards which can use them, Rename a few (unused) constants in the header, Replace them with MIPS_ALCHEMY in the various Kconfig files. Finally delete them altogether from the Alchemy Kconfig file. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/2707/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: Alchemy: kill au1xxx.h headerManuel Lauss2011-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer required Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/2705/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> delete mode 100644 arch/mips/include/asm/mach-au1x00/au1xxx.h
| * | MIPS, IDE: Alchem, au1xxx-ide: Remove pb1200/db1200 header depManuel Lauss2011-10-241-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | au1xxx-ide uses defines from the pb1200/db1200 headers: get DBDMA ID through platform resource information, hardcode register spacing. The only 2 users of this driver (and the only boards it can really work on realiably) use the same register layout. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Cc: linux-ide@vger.kernel.org To: Linux-MIPS <linux-mips@linux-mips.org> Cc: linux-ide@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Patchwork: https://patchwork.linux-mips.org/patch/2716/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | Merge branch 'gpio' of ↵Linus Torvalds2011-10-271-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm * 'gpio' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (43 commits) ARM: 7135/1: ep93xx: bring back missing <mach/gpio.h> ARM: 7104/1: plat-pxa: break out GPIO driver specifics ARM: 7103/1: plat-pxa: move PXA GPIO driver to GPIO subsystem ARM: 7042/3: mach-ep93xx: break out GPIO driver specifics ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> ARM: 7094/1: arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h ARM: 7083/1: rewrite U300 GPIO to use gpiolib ARM: 7074/1: gpio: davinci: eliminate unused variable warnings ARM: 7063/1: Orion: gpio: add missing include of linux/types.h ARM: 7055/1: arm/tegra: mach/gpio.h: include linux/types.h to fix build ARM: 7054/1: arm/tegra: Delete custom gpio_to_irq, and irq_to_gpio ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irq ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpio ARM: 7057/1: mach-pnx4008: rename GPIO header ARM: 7056/1: plat-nomadik: kill off <plat/gpio.h> ARM: 7050/1: mach-sa1100: delete irq_to_gpio() function ARM: 7049/1: mach-sa1100: move SA1100 GPIO driver to GPIO subsystem ARM: 7045/1: mach-lpc32xx: break out GPIO driver specifics ARM: 7044/1: mach-lpc32xx: move LPC32XX GPIO driver to GPIO subsystem ARM: 7043/1: mach-ixp2000: rename GPIO header ... Fix up trivial conflicts in arch/arm/mach-u300/Kconfig manually
| * | | ARM: gpio: at91: convert drivers to use asm/gpio.h rather than mach/gpio.hRussell King2011-08-081-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | Merge branch 'for-linus' of ↵Linus Torvalds2011-10-251-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits) MAINTAINERS: linux-m32r is moderated for non-subscribers linux@lists.openrisc.net is moderated for non-subscribers Drop default from "DM365 codec select" choice parisc: Kconfig: cleanup Kernel page size default Kconfig: remove redundant CONFIG_ prefix on two symbols cris: remove arch/cris/arch-v32/lib/nand_init.S microblaze: add missing CONFIG_ prefixes h8300: drop puzzling Kconfig dependencies MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers tty: drop superfluous dependency in Kconfig ARM: mxc: fix Kconfig typo 'i.MX51' Fix file references in Kconfig files aic7xxx: fix Kconfig references to READMEs Fix file references in drivers/ide/ thinkpad_acpi: Fix printk typo 'bluestooth' bcmring: drop commented out line in Kconfig btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888' doc: raw1394: Trivial typo fix CIFS: Don't free volume_info->UNC until we are entirely done with it. treewide: Correct spelling of successfully in comments ...
| * | | Kconfig: remove redundant CONFIG_ prefix on two symbolsPaul Bolle2011-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | Fix file references in drivers/ide/Johann Felix Soden2011-10-101-12/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of file references to now moved or deleted files in the whole tree, especially in documentation and Kconfig files. This patch fixes the references in drivers/ide/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | ide: Fix file references in drivers/ide/Johann Felix Soden2011-10-131-12/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | Fix file references in drivers/ide/ There are a lot of file references to now moved or deleted files in the whole tree, especially in documentation and Kconfig files. This patch fixes the references in drivers/ide/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | ide-disk: Fix request requeuingBorislav Petkov2011-10-031-1/+6
|/ | | | | | | | | | | | | | | | | | | | Simon Kirby reported that on his RAID setup with idedisk underneath the box OOMs after a couple of days of runtime. Running with CONFIG_DEBUG_KMEMLEAK pointed to idedisk_prep_fn() which unconditionally allocates an ide_cmd struct. However, ide_requeue_and_plug() can be called more than once per request, either from the request issue or the IRQ handler path and do blk_peek_request() ends up in idedisk_prep_fn() repeatedly, allocating a struct ide_cmd everytime and "forgetting" the previous pointer. Make sure the code reuses the old allocated chunk. Reported-and-tested-by: Simon Kirby <sim@hostway.ca> Cc: <stable@kernel.org> [ 39.x, 3.0.x ] Link: http://marc.info/?l=linux-kernel&m=131667641517919 Link: http://lkml.kernel.org/r/20110922072643.GA27232@hostway.ca Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/ide/cy82c693.c: Add missing pci_dev_putJulia Lawall2011-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Pci_get_slot calls pci_dev_get, so pci_dev_put is needed before leaving the function in the case where pci_get_slot is locally used. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ local idexpression x; expression e; @@ *x = pci_get_slot(...) ... when != true x == NULL when != pci_dev_put(x) when != e = x when != if (x != NULL) {<+... pci_dev_put(x); ...+>} *return ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* ide: Fix irq flags madnessThomas Gleixner2011-08-041-1/+5
| | | | | | | | | | | | commit ec1a123 (IDE: pass IRQ flags to the IDE core) introduced the bogosity of passing unfiltered resource->flags to the irq_flags which are used for request_irq. It results in random bits set (especially IORESOURCE_IRQ which maps to IRQF_PER_CPU). Filter the bits proper. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' into for-nextJiri Kosina2011-07-111-1/+2
|\ | | | | | | | | Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
| * ide-cd: signedness warning fix againConnor Hansen2011-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the legit warnings 'make W=3 drivers/ide/ide-cd.c' generates is: drivers/ide/ide-cd.c: In function ide_cd_do_request drivers/ide/ide-cd.c:828:2: warning: conversion to int from \ unsigned int may change the sign of the result drivers/ide/ide-cd.c:833:2: warning: conversion to int from \ unsigned int may change the sign of the result nsectors is declared int, should be unsigned int. blk_rq_sectors() returns unsigned int, and ide_complete_rq expects unsigned int as well. Fixes both warnings. Signed-off-by: Connor Hansen <cmdkhh@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | treewide: Convert uses of struct resource to resource_size(ptr)Joe Perches2011-06-102-3/+3
|/ | | | | | | | | | | | | | | | | | | | Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* block: fix mismerge of the DISK_EVENT_MEDIA_CHANGE removalLinus Torvalds2011-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Jens' back-merge commit 698567f3fa79 ("Merge commit 'v2.6.39' into for-2.6.40/core") was incorrectly done, and re-introduced the DISK_EVENT_MEDIA_CHANGE lines that had been removed earlier in commits - 9fd097b14918 ("block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers") - 7eec77a1816a ("ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd") because of conflicts with the "g->flags" updates near-by by commit d4dc210f69bc ("block: don't block events on excl write for non-optical devices") As a result, we re-introduced the hanging behavior due to infinite disk media change reports. Tssk, tssk, people! Don't do back-merges at all, and *definitely* don't do them to hide merge conflicts from me - especially as I'm likely better at merging them than you are, since I do so many merges. Reported-by: Steven Rostedt <rostedt@goodmis.org> Cc: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-2.6.40/core' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds2011-05-251-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-2.6.40/core' of git://git.kernel.dk/linux-2.6-block: (40 commits) cfq-iosched: free cic_index if cfqd allocation fails cfq-iosched: remove unused 'group_changed' in cfq_service_tree_add() cfq-iosched: reduce bit operations in cfq_choose_req() cfq-iosched: algebraic simplification in cfq_prio_to_maxrq() blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time block: move bd_set_size() above rescan_partitions() in __blkdev_get() block: call elv_bio_merged() when merged cfq-iosched: Make IO merge related stats per cpu cfq-iosched: Fix a memory leak of per cpu stats for root group backing-dev: Kill set but not used var in bdi_debug_stats_show() block: get rid of on-stack plugging debug checks blk-throttle: Make no throttling rule group processing lockless blk-cgroup: Make cgroup stat reset path blkg->lock free for dispatch stats blk-cgroup: Make 64bit per cpu stats safe on 32bit arch blk-throttle: Make dispatch stats per cpu blk-throttle: Free up a group only after one rcu grace period blk-throttle: Use helper function to add root throtl group to lists blk-throttle: Introduce a helper function to fill in device details blk-throttle: Dynamically allocate root group blk-cgroup: Allow sleeping while dynamically allocating a group ...
| * Merge commit 'v2.6.39' into for-2.6.40/coreJens Axboe2011-05-202-1/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since for-2.6.40/core was forked off the 2.6.39 devel tree, we've had churn in the core area that makes it difficult to handle patches for eg cfq or blk-throttle. Instead of requiring that they be based in older versions with bugs that have been fixed later in the rc cycle, merge in 2.6.39 final. Also fixes up conflicts in the below files. Conflicts: drivers/block/paride/pcd.c drivers/cdrom/viocd.c drivers/ide/ide-cd.c Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * | block: don't block events on excl write for non-optical devicesTejun Heo2011-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disk event code automatically blocks events on excl write. This is primarily to avoid issuing polling commands while burning is in progress. This behavior doesn't fit other types of devices with removeable media where polling commands don't have adverse side effects and door locking usually doesn't exist. This patch introduces new genhd flag which controls the auto-blocking behavior and uses it to enable auto-blocking only on optical devices. Note for stable: 2.6.38 and later only Cc: stable@kernel.org Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds2011-05-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: Make struct pcmcia_device_id const, sound drivers edition staging: pcmcia: Convert pcmcia_device_id declarations to const pcmcia: Convert pcmcia_device_id declarations to const pcmcia: Make declaration and uses of struct pcmcia_device_id const pcmcia/sa1100: put sa11x0_pcmcia_hw_init[] to .devinit.data
| * | | pcmcia: Convert pcmcia_device_id declarations to constJoe Perches2011-05-061-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves about 50KB of data. Old/new size of all objects: text data bss dec hex filename 563015 80096 130684 773795 bcea3 (TOTALS) 610916 32256 130632 773804 bceac (TOTALS) Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> (for drivers/net/can/softing/softing_cs.c) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6Linus Torvalds2011-05-224-6/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide/ide-scan-pci.c: Use for_each_pci_dev(). ide: Use linux/mutex.h IDE: ide-floppy, remove unnecessary NULL check drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata ide: fix use after free in ide-acpi
| * | ide/ide-scan-pci.c: Use for_each_pci_dev().Thiago Farina2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Use for_each_pci_dev() to simplify the code. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | IDE: ide-floppy, remove unnecessary NULL checkJiri Slaby2010-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stanse found that rq in ide_floppy_callback cannot be NULL, because it is dereferenced all around. So remove the superfluous check. This appeared after blk_* macros removal. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdataJoe Perches2010-11-221-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ide: fix use after free in ide-acpiMariusz Kozlowski2010-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | out_obj points to kfreed memory and we dereference that pointer in DEBPRINT/printk. Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cdTejun Heo2011-04-213-2/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_events() implementations in both ide-gd and ide-cd are inadequate for in-kernel event polling. Both generate media change events continuously when certain conditions are met causing infinite event loop between the driver and userland event handler. As disk event now supports suppression of unlisted events, simply de-listing DISK_EVENT_MEDIA_CHANGE from disk->events resolves the problem. Internal handling around media revalidation will behave the same while userland will fall back to userland event polling after detecting the device doesn't support disk events. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Jens Axboe <jaxboe@fusionio.com> Acked-by: "David S. Miller" <davem@davemloft.net> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
* | Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds2011-04-077-9/+9
|\ \ | | | | | | | | | | | | * 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
OpenPOWER on IntegriCloud