Commit Graph

33 Commits

Author SHA1 Message Date
Jeff Garzik
e2b1be56c5 [libata sata_mv] update copyright, driver version 2005-11-18 14:04:23 -05:00
Jeff Garzik
a2c91a8819 [libata sata_mv] handle lack of hardware nIEN support
Handle errata (it was unintentional on this h/w, whereas its intentional
on others) whereby the nIEN bit in Device Control is ignored, leading to
a situation where a hardware interrupt completes the qc before the
polling code has a chance to.

This will get fixed The Right Way(tm) once Albert Lee's irq-pio
branch is merged, as the more natural PIO method on this hardware is
interrupt-driven.
2005-11-17 05:44:44 -05:00
Jeff Garzik
22374677d1 [libata sata_mv] SATA probe, DMA boundary fixes
- DMA boundary was being handled incorrectly.  Copied the code from
  ata_fill_sg(), since Marvell has the same DMA boundary needs.
  (we can't use ata_fill_sg directly since we have different hardware
   descriptors)
- cleaned up the SATA phy reset code, to deal with various errata
2005-11-17 10:59:48 -05:00
Jeff Garzik
c9d3913012 [libata sata_mv] fix tons of 50XX bugs 2005-11-13 17:47:51 -05:00
Jeff Garzik
2a47ce06d5 [libata sata_mv] call phy fixups during init, as well as phy reset 2005-11-12 23:05:14 -05:00
Jeff Garzik
101ffae26c [libata sata_mv] move code around
No content changes.  Move 60xx code to be closer to other 60xx code.
2005-11-12 22:17:49 -05:00
Jeff Garzik
522479fb98 [libata sata_mv] hardware initialization work
Implement flash reset and PCI reset on 50xx and 60xx.
Implement LED enable on 50xx.
2005-11-12 22:14:02 -05:00
Jeff Garzik
47c2b677da [libata sata_mv] mv_hw_ops for hardware families; new errata
- eliminate a bunch of redundant tests by creating a per-chip-family
  set of hooks, mv_hw_ops
- implement more errata, from newer Marvell GPL'd driver
2005-11-12 21:13:17 -05:00
Jeff Garzik
ba3fe8fb6a [libata sata_mv] move code around
No content change, just prepping up future mv_hw_ops modularization.
2005-11-12 19:08:48 -05:00
Jeff Garzik
bca1c4eb94 [libata sata_mv] implement a bunch of errata workarounds
Based largely on the GPL'd Marvell vendor driver.
2005-11-12 12:48:15 -05:00
Jeff Garzik
8b260248d9 [libata sata_mv] trim trailing whitespace 2005-11-12 12:32:50 -05:00
Jeff Garzik
095fec887e [libata sata_mv] minor fixes
- clear SError and EDMA irq cause registers, after re-init'ing the phy
- move enums with type suffix 'U' to their own enum
2005-11-12 09:50:49 -05:00
Jeff Garzik
29179539da [libata sata_mv] add Adaptec 1420SA PCI ID
Contributed by Jeroen <dekien@pandora.be>
2005-11-11 08:08:03 -05:00
Jeff Garzik
3b7d697dfb [libata] constify PCI ID table in several drivers 2005-11-10 11:04:11 -05:00
Jeff Garzik
193515d51c [libata] eliminate use of drivers/scsi/scsi.h compatibility header/defines 2005-11-07 00:59:37 -05:00
Jeff Garzik
6037d6bbdf [libata] ATAPI pad allocation fixes/cleanup
Use ata_pad_{alloc,free} in two drivers, to factor out common code.

Add ata_pad_{alloc,free} to two other drivers, which needed the padding
but had not been updated.
2005-11-04 22:08:00 -05:00
Jeff Garzik
95dbf5c4be Merge branch 'master' 2005-10-30 20:24:34 -05:00
Jeff Garzik
a9524a76f7 [libata] use dev_printk() throughout drivers
A few drivers were not following the standard meme of printing out
their driver name and version at module load time; this is fixed
as well.
2005-10-30 14:39:11 -05:00
Jeff Garzik
054ee8fd39 Merge branch 'upstream' 2005-10-30 04:50:22 -05:00
Jeff Garzik
a7dac447bb [libata] change ata_qc_complete() to take error mask as second arg
The second argument to ata_qc_complete() was being used for two
purposes: communicate the ATA Status register to the completion
function, and indicate an error.  On legacy PCI IDE hardware, the latter
is often implicit in the former.  On more modern hardware, the driver
often completely emulated a Status register value, passing ATA_ERR as an
indication that something went wrong.

Now that previous code changes have eliminated the need to use drv_stat
arg to communicate the ATA Status register value, we can convert it to a
mask of possible error classes.

This will lead to more flexible error handling in the future.
2005-10-30 04:44:42 -05:00
Jeff Garzik
f0612bbc41 Merge branch 'upstream' 2005-10-30 01:58:18 -05:00
Jeff Garzik
0169e284f6 [libata] remove ata_chk_err(), ->check_err() hook.
We now depend on ->tf_read() to provide us with the contents
of the Error shadow register.
2005-10-29 21:25:10 -04:00
Jeff Garzik
7a9f8f93d2 Merge branch 'master' 2005-10-28 12:29:23 -04:00
Jeff Garzik
057ace5e79 libata: const-ification bombing run
Enforce access rules where appropriate.

If the compiler is smart enough, this may buy us an optimization or two
as a side effect.
2005-10-22 14:27:05 -04:00
Brett Russ
7e6c120859 [PATCH] libata: Marvell endian fix
Jeff found an endian bug in the Marvell driver (thanks!).  Here's the
fix for it.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-20 16:04:22 -04:00
Jeff Garzik
972c26bdd6 libata: add ata_sg_is_last() helper, use it in several drivers 2005-10-18 22:14:54 -04:00
Jeff Garzik
8a70f8dc08 [libata sata_mv] fix warning
shuffle ifdef location to fix the following warning:
drivers/scsi/sata_mv.c:471: warning: 'mv_dump_mem' defined but not used
2005-10-05 17:19:47 -04:00
Brett Russ
05b308e1df [PATCH] libata: Marvell function headers
adds helpful function header comments.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-05 17:16:52 -04:00
Brett Russ
afb0edd922 [PATCH] libata: Marvell spinlock fixes and simplification
This should fix up lockups that people were seeing due to
improper spinlock placement.  Also, the start/stop DMA routines put
guarded trust in the cached state of DMA.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-05 17:16:52 -04:00
Brett Russ
31961943e3 [PATCH] libata: Marvell SATA support (DMA mode) (resend: v0.22)
This is my libata compatible low level driver for the Marvell SATA
family.  Currently it runs in DMA mode on a 6081 chip.

The 5xxx series parts are not yet DMA capable in this driver because
the registers have differences that haven't been accounted for yet.
Basically, I'm focused on the 6xxx series right now.  I apologize for
those seeing problems on the 5xxx series, I've not had a chance to
look at those problems yet.

For those curious, the previous bug causing the SCSI timeout and
subsequent panics was caused by an improper clear of hc_irq_cause in
mv_host_intr().

This version is running well in my environment (6081 chips,
with/without SW raid1) and is showing equal or better performance
compared to the Marvell driver (mv_sata) in my initial tests (timed
dd's of reads/writes to/from memory/disk).

I still need to look at the causes of occasional problems such as this:

ata11: translating stat 0x35 err 0x00 to sense
ata11: status=0x35 { DeviceFault SeekComplete CorrectedError Error }
SCSI error : <10 0 0 0> return code = 0x8000002
Current sda: sense key Hardware Error
end_request: I/O error, dev sda, sector 3155010

and this, seen at init time:

ATA: abnormal status 0x80 on port 0xE093911C

but they aren't showstoppers.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-03 22:08:19 -04:00
Jeff Garzik
8add788574 [libata] minor fixes
* sata_mv: remove pci_intx(), now that the same function is in PCI core
* sata_sis: fix variable initialization bug, trim trailing whitespace
2005-09-08 23:07:29 -04:00
Jeff Garzik
ca20aa6954 [libata sata_mv] fix build
This function will go away when pci_intx() finally makes it
into the core PCI layer.
2005-09-07 02:05:59 -04:00
Brett Russ
20f733e7d7 [PATCH] libata: Marvell SATA support (PIO mode)
This is my libata compatible low level driver for the Marvell SATA
family.  Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly.  Review,
testing (especially on other flavors of Marvell), comments welcome.

Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-07 01:56:09 -04:00