* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
...
Sparse shows the following warning:
CHECK drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/ide-cs.c:378:6: warning: symbol 'ide_release' was
not declared. Should it be static?
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
The code in module ide-cs does not conform to the current standard if
setting CONFIG_PCMCIA_DEBUG to "y", and loading the module with the
option "pc_debug=N". When that is fixed, then a warning results that
version is defined but not used. This patch fixes both situations.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Up to now, Kingston compactflash cards (ab)used the Toshiba Manufacturer's ID,
In their new CF cards, they use a new one. Let's the ide subsystem
recognize CF cards with the new id.
Signed-off-by: Christophe Niclaes <cniclaes@develtech.com>
Acked-by: Philippe De Muyter <phdm@macqel.be>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Addition of Transcend 1GB 45x id so that it is properly detected.
[bart: fix typo in ide-cs's ID spotted by Alan Cox]
Signed-off-by: William Peters <w1ll14@gmail.com>
Signed-off-by: Kristoffer Ericson <Kristoffer_e1@hotmail.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
hwif content is already freed after ide_release() call so cache
hwif->io_ports.{data,ctl}_addr in local variables in ide_detach().
This fixes post-2.6.25 regression.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Fix probing by using ide_port_scan() and moving "retry loop"
from ide_config() to idecs_register().
* Don't fail probe if there are no devices attached to a port.
* Remove (now redundant) error message from ide_config().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
ide_find_port() now depends on ->chipset being set for occupied ide_hwifs[]
slots so all host drivers have to initialize hwif->chipset properly.
This patch fixes a regression on hosts with > 1 port or with a single port
but no devices attached to it for an affected host drivers.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
The Macintosh IDE driver (macide) doesn't check whether it's actually running
on Mac hardware, causing a crash if it isn't.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add IDE_HFLAG_MMIO host flag and set it for hosts which use
default_hwif_mmiops().
v2:
* Fix kernel panic in pmac host driver (',' should be '|').
Thanks to Kamalesh for reporting it + testing the fix
and to Andrew for hinting me about the source of the issue.
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Merge ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods
into new ->{in,out}put_data methods which take number of bytes to
transfer as an argument and always do padding.
While at it:
* Use 'hwif' or 'drive->hwif' instead of 'HWIF(drive)'.
There should be no functional changes caused by this patch (all users
of ->ata_{in,out}put_data methods were using multiply-of-4 word counts).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods to
falconide and q40ide host drivers (->ata_* methods are implemented on
top of ->atapi_* methods so they also do byte-swapping now).
* Cleanup atapi_{in,out}put_bytes().
v2:
* Add 'struct request *rq' argument to ->ata_{in,out}put_data methods
and don't byte-swap disk fs requests (we shouldn't un-swap fs requests
because fs itself is stored byte-swapped on the disk) - this is how
things were done before the patch (ideally device mapper should be
used instead but it would break existing setups and would have some
performance impact).
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
in ide_hwif_t.
* Rename io_ports[] in hw_regs_t to io_ports_array[].
* Use un-named union for 'unsigned long io_ports_array[]' and 'struct
ide_io_ports io_ports' in hw_regs_t.
* Remove IDE_*_OFFSET defines.
v2:
* scc_pata.c build fix from Stephen Rothwell.
v3:
* Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
(Noticed by Andrew Morton)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Make ide_unregister() take 'ide_hwif_t *hwif' instead of 'unsigned int
index' (hwif->index) as an argument and update all users accordingly.
While at it:
* Remove unnecessary checks for hwif != NULL from ide-pnp.c::idepnp_remove()
and delkin_cb.c::delkin_cb_remove().
* Remove needless hwif->chipset assignment from scc_pata.c::scc_remove().
v2:
* Fixup ide_unregister() documentation.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Remove ide_unregister() call from ide_exit()
(host drivers take care of unregistering hwif-s themselves).
* Remove ide_unregister() call from probe methods of
bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers
(ide_find_port() returns only free ide_hwifs[] entries).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
We have "vlb|pci_clock=" parameters now.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
* Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
While at it:
* qd65xx.c: rename {active,recovery}_cycle variables to {act,rec}_cyc.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
__FUNCTION__ is gcc-specific, use __func__
[bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it]
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
It is no longer needed to set hwif->mmio flag to tell IDE layer to not
manage resources so cleanup host drivers that used hwif->mmio flag only
for this purpose.
Ditto for ide_legacy_init_one().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Tell IDE layer to not manage resources by setting hwif->mmio flag.
* Use {request,release}_region() for resources management.
* Set ->name field of 'struct ide_port_info' instances in legacy VLB
host drivers and use driver name for resources management.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Tell IDE layer to not manage resources by setting hwif->mmio flag.
* Use {request,release}_region() for resources management.
* Use driver name for resources management.
* Remove no longer needed 'hwif->chipset == ide_4drives' handling
from ide_device_add_all().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Make idecs_register() return pointer to hwif structure instead of
hwif's index.
* Store pointer to hwif structure instead of hwif's index in ide_info_t
(fixes ide-cs for IDE[6-9]_MAJOR major numbers).
* Remove no longer needed ide_major[].
* Tell IDE layer to not manage resources by setting hwif->mmio flag.
* Use {request,release}_region() for resources management.
* Use driver name for resources management.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Replace 'if ()'-s by 'switch ()' block.
* Merge common code for QD6500/QD6580A/QD6580B.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add 'unsigned long config' argument to ide_legacy_device_add()
for setting hwif->config_data.
* Use ide_find_port_slot() instead of ide_find_port() in
ide_legacy_device_add().
* Handle IDE_HFLAG_QD_2ND_PORT and IDE_HFLAG_SINGLE host flags in
ide_legacy_device_add().
* Convert qd65xx host driver to use ide_legacy_device_add().
v2:
* Update ali14xx, dtc2278, ht6560b and umc8672 host drivers.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Add ide_legacy_device_add() helper for use by legacy VLB host drivers
(+ convert them to use it).
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Move hooks for port/host specific methods from ide_hwif_t to
'struct ide_port_ops'.
* Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
and ide_hwif_t.
* Update host drivers and core code accordingly.
While at it:
* Rename ata66_*() cable detect functions to *_cable_detect() to match
the standard naming. (Suggested by Sergei Shtylyov)
v2:
* Fix build for bast-ide. (Noticed by Andrew Morton)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Set IDE_HFLAG_SINGLE host flag in qd_probe() for QD6500 and QD6580
with the second port disabled.
* Check for IDE_HFLAG_SINGLE in qd6580_port_init_devs() instead of
using cached value of QD6580 Control register.
* Don't cache QD6580 Control register value in hwif->config_data
(bits 8-15) and remove no longer needed QD_CONTROL() macro.
* Cache QD65xx base address in hwif->config_data (bits 8-15)
instead of hwif->select_data.
* Set hwif->config_data in qd_probe() and remove qd_setup() helper.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
qd_select() checks itself whether timings should be reprogrammed so
remove superfluous qd_timing_ok() and always use ->selectproc method
(rename qd_select() to qd65xx_select() while at it).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fix a lot of errors and warnings.
Compile tested.
[bart: some fixes, md5sum checked]
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
File is now error and warning free.
Compile tested.
[bart: md5sum checked]
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
File is now error free.
Compile tested.
[bart: minor fixes, md5sum checked]
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Tell IDE layer to not manage resources by setting
hwif->mmio flag and request resources in falconide_init().
* Use request_mem_region() for resources reservation.
* Use driver name for resources reservation.
v2:
* Fix missing printk() parameter. (Noticed by Geert Uytterhoeven)
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tell IDE layer to not manage resources by always setting hwif->mmio flag
(resources are handled by a platform device).
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Add IDE_HFLAG_QD_2ND_PORT host flag to indicate the need of skipping
first ide_hwifs[] slot for the second port of QD65xx controller.
* Handle this new host flag in ide_find_port_slot().
* Convert legacy VLB host drivers to use ide_find_port().
While at it:
* Fix couple of printk()-s in qd65xx host driver to not use hwif->name.
v2:
* Fix qd65xx.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Return error value in qd_probe() and use it in qd65xx_init()
instead of checking ide_hwifs[].chipset.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Since 43cc71eed1, the platform modalias
is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable
ATA and IDE platform drivers, to re-enable auto loading.
NOTE: both ata/pata_platform.c and ide/legacy/ide_platform.c claim
to provide "the" platform_pata driver, and there's no build-time
mutual exclusion mechanism. This means that configs which enable
both drivers will make some trouble when hotplugging...
[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>