History log of /drivers/ide/icside.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
acc8dbe7f44f1bab6fcf21f2d5efb32ea92e19fd 12-Oct-2011 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: DMA support fix

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>
/drivers/ide/icside.c
950f564b707ca1b1c5bb94cd1e7d2a0702bfcadc 03-Mar-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ide-2.6
8776168ca2151850164af1de5565d01f7b8b2c53 19-Jan-2010 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: change ->set_dma_mode method parameters

Change ->set_dma_mode method parameters to match ->set_dmamode method
used in struct ata_port_operations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
f75d4a238770d83d3a0475ce7f34e3fa37de161e 05-Jan-2010 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: bring back ->maskproc method

Bring back ->maskproc method since it is still needed for proper operation,
as noticed by Russell King:

> This change is bogus.
>
> writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
> readb(base + ICS_ARCIN_V6_INTROFFSET_2);
>
> writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
> readb(base + ICS_ARCIN_V6_INTROFFSET_1);
>
> This sequence of code does:
>
> 1. enable interrupt 1
> 2. disable interrupt 2
> 3. enable interrupt 2
> 4. disable interrupt 1
>
> which results in the interrupt for the second channel being enabled -
> leaving channel 1 blocked.
>
> Firstly, icside shares its two IDE channels with one DMA engine - so it's
> a simplex interface. IDE supports those (or did when the code was written)
> serializing requests between the two interfaces. libata does not.
>
> Secondly, the interrupt lines on icside float when there's no drive connected
> or when the drive has its NIEN bit set, which means that you get spurious
> screaming interrupts which can kill off all expansion card interrupts on
> the machine unless you disable the channel interrupt on the card.
>
> Since libata can not serialize the operation of the two channels like IDE
> can, the libata version of the icside driver does not contain the interrupt
> stearing logic. Instead, it looks at the status after reset, and if
> nothing was found on that channel, it masks the interrupt from that
> channel.

This patch reverts changes done in commit dff8817 (I became confused due to
non-standard & undocumented ->maskproc method, anyway sorry about that).

Noticed-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/icside.c
5bfb151f1f565e6082304a30e8c81dfb6ed0b0c8 15-Jun-2009 Joao Ramos <joao.ramos@inov.pt> ide: do not access ide_drive_t 'drive_data' field directly

Change ide_drive_t 'drive_data' field from 'unsigned int' type to 'void *'
type, allowing a wider range of values/types to be stored in this field.

Added 'ide_get_drivedata' and 'ide_set_drivedata' helpers to get and set
the 'drive_data' field.

Fixed all host drivers to maintain coherency with the change in the
'drive_data' field type.

Signed-off-by: Joao Ramos <joao.ramos@inov.pt>
[bart: fix qd65xx build, cast to 'unsigned long', minor Coding Style fixups]
Acked-by: Sergei Shtylyov <sshtylyov@ru.montavista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
dff8817b78e6e6a4913f2caf7637d62dcc49a03c 07-Jun-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: remove superfluous ->maskproc method

[inspired by pata_icside]

Enabling/disabling of card IRQs is handled fine by IRQ and IDE
subsystems so there is no need for custom ->maskproc method.

Moreover icside_maskproc() would enable IRQ only if it was already
enabled [because of 'if (state->enabled && !mask)' check].

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
9f36d31437922354d104a2db407f397e79e4027e 17-May-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: remove hw_regs_t typedef

Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
dca3983059a4481e4ae97bbf0ac4b4c21429e1a5 17-May-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: pass number of ports to ide_host_{alloc,add}() (v2)

Pass number of ports to ide_host_{alloc,add}() and then update
all users accordingly.

v2:
- drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c
(noticed by Sergei)

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
29e52cf793ded6bece50de50e738596f94f07d9f 17-May-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: remove chipset field from hw_regs_t

* Convert host drivers that still use hw_regs_t's chipset field to use
the one in struct ide_port_info instead.

* Move special handling of ide_pci chipset type from ide_hw_configure()
to ide_init_port().

* Remove chipset field from hw_regs_t.

While at it:
- remove stale comment in delkin_cb.c

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
b019447ce73513432af052f30fa239d6dc93e111 16-May-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> icside: register second channel of version 6 PCB

The second IDE channel of version 6 PCB is not being registered anymore since
the commit 48c3c1072651922ed153bcf0a33ea82cf20df390 (ide: add struct ide_host
(take 3)).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
88b4132e101e60e8fa67996ae3072ab6b71e8500 31-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: set/clear drive->waiting_for_dma flag in the core code

Set/clear drive->waiting_for_dma flag in the core code
instead of in ->dma_setup and ->dma_end methods.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
4453011f959a5f5c6c7a33aea54fe17f5e43a867 31-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: destroy DMA mappings after ending DMA (v2)

Move ide_destroy_dmatable() call out from ->dma_end method to
{ide_pc,cdrom_newpc,ide_dma}_intr(), ide_dma_timeout_retry()
and sgiioc4_resetproc().

This causes minor/safe behavior changes w.r.t.:
* cmd64x.c::cmd64{8,x}_dma_end()
* cs5536.c::cs5536_dma_end()
* icside.c::icside_dma_end()
* it821x.c::it821x_dma_end()
* scc_pata.c::__scc_dma_end()
* sl82c105.c::sl82c105_dma_end()
* tx4939ide.c::tx4939ide_dma_end()

v2:
* Fix build for CONFIG_BLK_DEV_IDEDMA=n (reported by Randy Dunlap).

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
35c9b4daf4c94b30e5cede597d98016ebf31b5ad 31-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: add ->dma_clear method and remove ->dma_timeout one

All custom ->dma_timeout implementations call the generic one thus it is
possible to have only an optional method for resetting DMA engine instead:

* Add ->dma_clear method and convert hpt366, pdc202xx_old and sl82c105
host drivers to use it.

* Always use ide_dma_timeout() in ide_dma_timeout_retry() and remove
->dma_timeout method.

* Make ide_dma_timeout() static.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
22117d6eaac50d366d9013c88318a869ea4d8739 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)

* Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.

* Add ->dma_timer_expiry method and use it to set hwif->expiry for
ATA_PROT_DMA protocol in do_rw_taskfile().

* Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.

* Move setting hwif->expiry from ide_execute_command() to its users and drop
'expiry' argument.

* Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().

* Remove ->dma_exec_cmd method and its implementations.

* Unexport ide_execute_command() and ide_dma_intr().

v2:
* Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).

* Fix *dma_expiry naming (suggested by Sergei Shtylyov).

There should be no functional changes caused by this patch.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
2298169418f43ba5e0919762a4bab95a1227872a 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: pass command to ide_map_sg()

* Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET
commands.

* Pass command to ->dma_setup method and update all its
implementations accordingly.

* Pass command instead of request to ide_build_sglist(),
*_build_dmatable() and ide_map_sg().

While at it:

* Fix scc_dma_setup() documentation + use ATA_DMA_WR define.

* Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(),
change return value type to 'int' and drop unused 'ddir'
argument.

* Do some minor cleanups in [tx4939]ide_dma_setup().

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
b6308ee0c55acd2e943d849773c9f0a49c516317 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: move command related fields from ide_hwif_t to struct ide_cmd

* Move command related fields from ide_hwif_t to struct ide_cmd.

* Make ide_init_sg_cmd() take command and sectors number as arguments.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
e6830a86c260d73c6f370aa7ed17ee6c71e5ee05 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: call ide_build_sglist() prior to ->dma_setup (v2)

* Re-map sg table if needed in ide_build_sglist().

* Move ide_build_sglist() call from ->dma_setup to its users.

* Un-export ide_build_sglist().

v2:
* Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap).

There should be no functional changes caused by this patch.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
f7ef12482b17a015906cf74afe655e691b5fa2cb 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: icside_dma_setup() fixes

Check for ide_build_sglist() return value and re-map sg table if necessary.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
33050ec7a2b83bc048b2322c79af25df6fdcb879 27-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: use struct ide_port_info also for PCB version 5 (v2)

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>
/drivers/ide/icside.c
d224b6269e4731a82f648bb0281ea1a4d8b3311d 02-Feb-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> icside: fix PCB version 6 support (v2)

We need to pass struct ide_port_info also to ide_host_register().

v2:
Fix v5/v6 mismatch noticed by Russell.

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
898ec223fea2a2df88035e58dbf50f493577e225 06-Jan-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: remove HWIF() macro

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
b65fac32cfe3b2f98cd472fef400bd1c1340de23 06-Jan-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: merge ide_hwgroup_t with ide_hwif_t (v2)

* Merge ide_hwgroup_t with ide_hwif_t.

* Cleanup init_irq() accordingly, then remove no longer needed
ide_remove_port_from_hwgroup() and ide_ports[].

* Remove now unused HWGROUP() macro.

While at it:

* ide_dump_ata_error() fixups

v2:
* Fix ->quirk_list check in do_ide_request()
(s/hwif->cur_dev/prev_port->cur_dev).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c
d16d7667f9c211e8d9b7e2365cc3d3a83fc6a8e2 22-Nov-2008 Al Viro <viro@ftp.linux.org.uk> icside section warnings

icside_register_v[56] is called from (__devinit) icside_probe

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/ide/icside.c
1137fb670465b6b5d15b9db7d01707a5833ee3ae 26-Oct-2008 Al Viro <viro@ZenIV.linux.org.uk> arm ide breakage

a) semicolon before the function body is a bad idea
b) it's const struct foo, not struct const foo
c) incidentally, it's ecard_remove_driver(), not ecard_unregister_driver()
d) compiling is occasionally useful.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/ide/icside.c
2bfba3c444fe8b2ab1c38112a89d8f03b61136ca 21-Oct-2008 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: remove useless subdirs from drivers/ide/

Suggested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/icside.c