History log of /drivers/ide/pdc202xx_old.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f693be4d8a00431b53a59d74aefdb3f7ae92f662 14-Apr-2010 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: ignore "FIFO empty" bit in test_irq() method

The driver takes into account not only the interrupt status bit but
also "FIFO empty" bit in its test_irq() method. This actually is a
superfluous check since for the DMA commands calling the
dma_test_irq() method further in the interrupt handler makes sure FIFO
is emptied.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/pdc202xx_old.c
63e7cf910542383591318941cb62a246ac191cfe 14-Apr-2010 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: wire test_irq() method for PDC2026x

In the commit e0321fbe6d34b4bb514fb6daff9e0859e5d76001 (pdc202xx_old:
implement test_irq() method (take 2)) I forgot to modify
'pdc2026x_port_ops'... :-/

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/pdc202xx_old.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/pdc202xx_old.c
e085b3cae85af47eb0a3eda3186bd898310fb322 19-Jan-2010 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: change ->set_pio_mode method parameters

Change ->set_pio_mode method parameters to match ->set_piomode method
used in struct ata_port_operations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/pdc202xx_old.c
a337c2272731d538827153b32f547ef7c131a4cb 18-Jan-2010 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> pdc202xx_old: add ->init_hwif method

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/pdc202xx_old.c
c3be57b6f35ef96a980ce84e59d6a5a8ca6184ad 03-Jan-2010 Russell King <rmk@arm.linux.org.uk> ide: Fix Promise UDMA33 IDE driver (pdc202xx_old)

On Sun, Jan 03, 2010 at 12:23:14AM +0000, Russell King wrote:
> - with IDE
> - locks the interrupt line, and makes the machine extremely painful -
> about an hour to get to the point of being able to unload the
> pdc202xx_old module.

Having manually bisected kernel versions, I've narrowed it down to some
change between 2.6.30 and 2.6.31. There's not much which has changed
between the two kernels, but one change stands out like a sore thumb:

+static int pdc202xx_test_irq(ide_hwif_t *hwif)
+{
+ struct pci_dev *dev = to_pci_dev(hwif->dev);
+ unsigned long high_16 = pci_resource_start(dev, 4);
+ u8 sc1d = inb(high_16 + 0x1d);
+
+ if (hwif->channel) {
+ /*
+ * bit 7: error, bit 6: interrupting,
+ * bit 5: FIFO full, bit 4: FIFO empty
+ */
+ return ((sc1d & 0x50) == 0x40) ? 1 : 0;
+ } else {
+ /*
+ * bit 3: error, bit 2: interrupting,
+ * bit 1: FIFO full, bit 0: FIFO empty
+ */
+ return ((sc1d & 0x05) == 0x04) ? 1 : 0;
+ }
+}

Reading the (documented as a 32-bit) system control register when the
interface is idle gives: 0x01da110c

So, the byte at 0x1d is 0x11, which is documented as meaning that the
primary and secondary FIFOs are empty.

The code above, which is trying to see whether an IRQ is pending, checks
for the IRQ bit to be one, and the FIFO bit to be zero - or in English,
to be non-empty.

Since during a BM-DMA read, the FIFOs will naturally be drained to the
PCI bus, the chance of us getting to the interface before this happens
are extremely small - and if we don't, it means we decide not to service
the interrupt. Hence, the screaming interrupt problem with drivers/ide.

Fix this by only indicating an interrupt is ready if both the interrupt
and FIFO empty bits are at '1'.

This bug only affects PDC20246/PDC20247 (Promise Ultra33) based cards,
and has been tested on 2.6.31 and 2.6.33-rc2.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/ide/pdc202xx_old.c
58dcf8dcb5ebca4a5b1d2c0874efba744dd4552c 03-Dec-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> pdc202xx_old: remove no longer needed debugging code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
e0321fbe6d34b4bb514fb6daff9e0859e5d76001 15-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: implement test_irq() method (take 2)

Implement test_irq() method based on the driver's former dma_test_irq() method.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
c9ef59ff01b6bd1c7360a64fcc8556a1193c2ed0 15-Jun-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: IORDY handling fixes

Add ide_pio_need_iordy() helper and convert host drivers to use it.

This fixes it8172, it8213, pdc202xx_old, piix, slc90e66 and siimage
host drivers to handle IORDY correctly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
d614aec4752f8c61b2e7cb77806b6bd59aa50836 12-Jun-2009 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits)
ide: re-implement ide_pci_init_one() on top of ide_pci_init_two()
ide: unexport ide_find_dma_mode()
ide: fix PowerMac bootup oops
ide: skip probe if there are no devices on the port (v2)
sl82c105: add printk() logging facility
ide-tape: fix proc warning
ide: add IDE_DFLAG_NIEN_QUIRK device flag
ide: respect quirk_drives[] list on all controllers
hpt366: enable all quirks for devices on quirk_drives[] list
hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c
ide: remove superfluous SELECT_MASK() call from do_rw_taskfile()
ide: remove superfluous SELECT_MASK() call from ide_driveid_update()
icside: remove superfluous ->maskproc method
ide-tape: fix IDE_AFLAG_* atomic accesses
ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically
pdc202xx_old: kill resetproc() method
pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
pdc202xx_old: use ide_dma_test_irq()
ide: preserve Host Protected Area by default (v2)
ide-gd: implement block device ->set_capacity method (v2)
...
c9059598ea8981d02356eead3188bf7fa4d717b8 11-Jun-2009 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block

* 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits)
block: add request clone interface (v2)
floppy: fix hibernation
ramdisk: remove long-deprecated "ramdisk=" boot-time parameter
fs/bio.c: add missing __user annotation
block: prevent possible io_context->refcount overflow
Add serial number support for virtio_blk, V4a
block: Add missing bounce_pfn stacking and fix comments
Revert "block: Fix bounce limit setting in DM"
cciss: decode unit attention in SCSI error handling code
cciss: Remove no longer needed sendcmd reject processing code
cciss: change SCSI error handling routines to work with interrupts enabled.
cciss: separate error processing and command retrying code in sendcmd_withirq_core()
cciss: factor out fix target status processing code from sendcmd functions
cciss: simplify interface of sendcmd() and sendcmd_withirq()
cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code
cciss: Use schedule_timeout_uninterruptible in SCSI error handling code
block: needs to set the residual length of a bidi request
Revert "block: implement blkdev_readpages"
block: Fix bounce limit setting in DM
Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt
...

Manually fix conflicts with tracing updates in:
block/blk-sysfs.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
include/trace/events/block.h
kernel/trace/blktrace.c
8bc1e5aa06a2a9a425c4a6795fc564cba1521487 07-Jun-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: respect quirk_drives[] list on all controllers

* Add ide_check_nien_quirk_list() helper to the core code
and then use it in ide_port_tune_devices().

* Remove no longer needed ->quirkproc methods from hpt366.c
and pdc202xx_{new,old}.c.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
ffddf1717b0d388879c646eaf6261a2b393c06ad 07-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: kill resetproc() method

The driver's resetproc() method resets both channels at once -- most probably
by driving RESET- on them. Not only such reset can severely disturb concurrent
operations on another channel, it also ensues 2-second delay, while there's no
apparent reason why SRST reset being performed prior to resetproc() call needs
to be followed up by another reset.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
1221e241e3a6f1ff5b0de03d58d871f7c995781b 07-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout

The driver's dma_lost_irq() and dma_clear() methods call pdc202xx_reset()
which resets both channels at once -- most probably by driving RESET- on them.
Not only such reset can severely disturb concurrent operations on another
channel, it is also a clear overkill (especially in the first case) and is
completely unexpected and thus not properly handled by the IDE core in this
context (in the second case the usual SRST reset would most probably ensue
anyway though); it also causes quite arbitrary 2-second delay. Hence, use the
standard ide_dma_lost_irq() method and don't install the optional dma_clear()
method at all -- the driver should do well without this age-old cruft...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
72b9304f04d0724a25251e9e9041aa95f89c15dd 07-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: use ide_dma_test_irq()

The driver's dma_test_irq() method, although tests some chip specific interrupt
bits, finally always relies on the SFF-8038i standard interrupt bit. I see no
point in testing the bits that are not trusted anyway -- the driver should be
fully able to use the standard method implemetation, ide_dma_test_irq().

With this change 'pdc202xx_dma_ops' finally becomes identical to 'sff_dma_ops',
and we can get rid of it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
669165daad2ec839df85b8c5f7bc155e76a2f404 07-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: fix resetproc() method

pdc202xx_reset() calls pdc202xx_reset_host() twice, for both channels, while
that function actually twiddles the single, shared software reset bit -- the
net effect is a duplicated reset and horrendous 4 second delay happening not
only on a channel reset but also when dma_lost_irq() and dma_clear() methods
are called. Fold pdc202xx_reset_host() into pdc202xx_reset(), fix printk(),
and move it before the actual reset...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
521a415c9f6d4e5463807ce6d36598acabcd204f 07-Jun-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> pdc202xx_old: fix 'pdc20246_dma_ops'

Commit ac95beedf8bc97b24f9540d4da9952f07221c023 (ide: add struct ide_port_ops
(take 2)) erroneously converted the driver's dma_timeout() and dma_lost_irq()
methods to call the driver's resetproc() method regardless of whether it was
defined for this specific controller while it hadn't been defined and hence
called for PDC20246. So the dma_clear() method, the successor of dma_timeout(),
shouldn't exist and the dma_lost_irq() method should be standard for PDC20246.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
9780e2dd8254351f6cbe11304849126b51dbd561 07-May-2009 Tejun Heo <tj@kernel.org> ide: convert to rq pos and nr_sectors accessors

ide doesn't manipulate request fields anymore and thus all hard and
their soft equivalents are always equal. Convert all references to
accessors.

[ Impact: use pos and nr_sectors accessors ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/ide/pdc202xx_old.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/pdc202xx_old.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/pdc202xx_old.c
2ed0ef543ae3f3ea4f8bd0433fb1fed22625a309 24-Mar-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: fix ->init_chipset method to return 'int' value

* 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>
/drivers/ide/pdc202xx_old.c
592b5315219881c6c0af4785f96456ad2043193a 06-Jan-2009 Sergei Shtylyov <sshtylyov@ru.mvista.com> ide: move read_sff_dma_status() method to 'struct ide_dma_ops'

Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops'
to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only
required for SFF-8038i compatible IDE controller drivers (greatly cutting down
the number of initializers) as its only user (outside ide-dma-sff.c and such
drivers) appears to be ide_pci_check_simplex() which is only called for such
controllers...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.c
898ec223fea2a2df88035e58dbf50f493577e225 06-Jan-2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: remove HWIF() macro

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.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/pdc202xx_old.c
6b4924962c49655494d2c8e9d3faab0e349a3062 29-Dec-2008 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> ide: add ->max_sectors field to struct ide_port_info

* Add ->max_sectors field to struct ide_port_info to allow host drivers
to specify value used for hwif->rqsize (if smaller than the default).

* Convert pdc202xx_old to use ->max_sectors and remove no longer needed
IDE_HFLAG_RQSIZE_256 flag.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
/drivers/ide/pdc202xx_old.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/pdc202xx_old.c