Add IDE_HFLAG_4DRIVES host flag and use it instead of ide_4drives
chipset type in ide_init_port().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Add IDE_HFLAG_DTC2278 host flag and use it instead of ide_dtc2278
chipset type in ide_init_port().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add ->irq_flags field to struct ide_port_info and struct ide_host.
* Update host drivers and IDE PCI code to use ->irq_flags field.
* Convert init_irq() and ide_intr() to use host->irq_flags.
This fixes handling of shared IRQs for non-PCI hosts
and removes ugly ifdeffery from core IDE code.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Always free drive->id in probe_for_drive() if device is not present.
While at it:
- remove dead IDE_DFLAG_DEAD flag
- remove superfluous IDE_DFLAG_PRESENT check
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
There should be no functionality change resulting from this patch.
Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: minor CodingStyle fixup per Sergei's suggestion]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Remove superfluous <asm/macints.h> include.
* No need to re-define in/out*() macros as they are no longer used
by m68k host drivers.
* readl() and writel() are not used by core IDE code.
* Use raw_*_swapw() directly in {falcon,q40}ide.c and remove
{in,out}sw_swapw() macros.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add ->{get,release}_lock methods to struct ide_port_info
and struct ide_host.
* Convert core IDE code, m68k IDE code and falconide support to use
->{get,release}_lock methods instead of ide_{get,release}_lock().
* Remove IDE_ARCH_LOCK.
v2:
* Build fix from Geert updating ide_{get,release}_lock() callers in
falconide.c.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This micro-optimization is not worth it. Just always check for
existence of ->ack_intr method in ide_intr() and ide_timer_expiry().
v2:
Fix brown-paper-bag bug spotted by David D. Kilzer.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: "David D. Kilzer" <ddkilzer@kilzer.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
and more specifically, push __func__ into debug
macro thus making ide_debug_log() calls shorter and more readable.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
This fixes hwif->channel and drive->dn assignments.
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This fixes hwif->channel and drive->dn assignments.
v2:
Fix v5/v6 mismatch noticed by Russell.
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This patch fixes the bug reported in
http://bugzilla.kernel.org/show_bug.cgi?id=11681.
"Lots of device drivers register a 'struct device_driver' with
the '.bus' member set to '&platform_bus_type'. This is wrong,
since the platform_bus functions expect the 'struct device_driver'
to be wrapped up in a 'struct platform_driver' which provides
some additional callbacks (like suspend_late, resume_early).
The effect may be that platform_suspend_late() uses bogus data
outside the device_driver struct as a pointer pointer to the
device driver's suspend_late() function or other hard to
reproduce failures."(Lothar Wassmann)
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Pass pointer to buffer for IDENTIFY data to do_identify()
and try_to_identify().
* Un-static try_to_identify() and use it in ide_driveid_update().
* Rename try_to_identify() to ide_dev_read_id().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Clear drive IRQ after re-enabling local IRQs in ide_driveid_update()
to match try_to_identify().
Also remove superfluous local_irq_enable() call while at it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Defer classifying device type from do_identify() to do_probe().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
do_identify() marks EXABYTENEST device as non-present and frees
drive->id so enable_nest() has absolutely no chance of working.
The code was like this since at least 2.6.12-rc2 and nobody
has noticed so just remove broken EXABYTENEST support.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Doing kmalloc() in the middle of command execution is not only ugly
but leaves drive waiting to send data on kmalloc() failure. Fix it.
While at it:
* Unify error code paths.
* Fixup error message to be more useful and add missing KERN_ERR level.
* Rename 'stat' variable to 's'.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Set ->irq explicitly in cs5520.c.
* Remove irq argument from ide_hw_configure().
* Remove pciirq argument from ide_pci_setup_ports().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Return 0 instead of dev->irq in ->init_chipset implementations.
* Fix ->init_chipset method to return 'int' value instead of
'unsigned int' one.
This fixes ->init_chipset handling for host drivers (cs5530, hpt366
and pdc202xx_new) for which it is possible for this method to fail.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This is now handled by core IDE PCI code.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Move handling of IDE_HFLAG[_FORCE]_LEGACY_IRQS from ide_init_port()
to ide_pci_init_{one,two}().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Core IDE PCI code takes care of assigning hwif->irq for both ports.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Core IDE PCI code takes care of assigning hwif->irq for both ports.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fix ->init_hwif to check if IDE PCI controller is in compatibility
mode instead of checking for hwif->irq == 0.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Do some CodingStyle fixups in <linux/ide.h> while at it.
v2:
Add missing <linux/delay.h> include (reported by Stephen Rothwell).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fix following checkpatch.pl warnings/errors:
- WARNING: space prohibited between function name and open parenthesis '('
- WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
- WARNING: line over 80 characters
- ERROR: trailing whitespace
- ERROR: space required before the open parenthesis '('
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>