Commit Graph

38 Commits

Author SHA1 Message Date
Tejun Heo
93c9338713 [BLOCK] update libata to use new blk_ordered for barriers
Reflect changes in SCSI midlayer and updated to use new
ordered request implementation

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:55:00 +01:00
Albert Lee
a22e2eb071 [PATCH] libata: move err_mask to ata_queued_cmd
- remove err_mask from the parameter list of the complete functions
  - move err_mask to ata_queued_cmd
  - initialize qc->err_mask when needed
  - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

===============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06 04:49:22 -05:00
Tejun Heo
c0ab424238 [PATCH] sil24: make error_intr less verbose
sil24_error_intr logs all error interrupts.  ATAPI devices generates
many harmless errors which can be ignored and all serious ones are
reported via sense data by SCSI layer.  Don't log device errors from
ATAPI devices.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-18 13:11:39 -05:00
Tejun Heo
69ad185fa1 [PATCH] sil24: add ATAPI support
This patch implements ATAPI support for sil24 and bumps driver version
to 0.23.

Signed-off-by: Tejun Heo <htejun@gmail.com>

--

Jeff, it has been converted to use ->dev_config as pointed out.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-18 13:11:39 -05:00
Tejun Heo
ca45160db7 [PATCH] sil24: use SRST for phy_reset
There seems to be no way to obtain device signature from sil24 after
SATA phy reset and SRST is needed anyway for later port multiplier
suppport.  This patch converts sil24_phy_reset to use SRST instaed.

Signed-off-by: Tejun Heo <htejun@gmail.com>

--

Jeff, I didn't remove the 10ms sleep just to be on the safe side.  I
think we can live with 10ms sleep on SRST.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-18 13:11:39 -05:00
Tejun Heo
7d1ce682d0 [PATCH] sil24: add sil24_restart_controller
When an error condition is raised by device via D2H FIS or SDB.  sil24
controller should be restarted by setting PORT_CS_INIT and waiting
until PORT_CS_RDY is asserted instead of resetting the controller.
This patch implements sil24_restart_controller for those cases.  This
patch also makes sure that PORT_CS_RDY is asserted on
sil24_reset_controller completion.

Signed-off-by: Tejun Heo <htejun@gmail.com>

--

Jeff, delay is reduced to 1us and cnt increased to 10k.  My sil3124
turns on PORT_CS_RDY on the second iteration even without any delay.
I think 10k * 1us should be more than enough.

I tried to convert both restart and reset to use msleep's with work
queue, but if we do that, host_set lock should be released after
initiating restart or reset, leading to race condition among
reset/restart, other interrupts and timeout.  Implementing
synchronization among those in low-level driver doesn't seem right.
Well, reduced timeout should work for the time being.

Thanks.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-18 13:11:39 -05:00
Tejun Heo
d10cb35a87 [PATCH] sil24: add constants
Adds constants for ATAPI support to sata_sil24.  This patch is
originally from Jeff Garzik <jgarzik@pobox.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-16 07:11:42 -05:00
Tejun Heo
e9c05afa80 [PATCH] sil24: add missing ata_pad_free()
sil24_port_stop() is missing call to ata_pad_free() thus leaking pad
buffer when a port is stopped.  This patch adds it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-13 10:31:43 -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
b0c4e148bd Merge branch 'master' 2005-10-29 17:49:12 -04:00
Al Viro
4b4a5eaedf [PATCH] sata_sil24 iomem annotations and fixes
trivial iomem annotations + missing memcpy_fromio() caught by those

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 10:35:07 -07: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
Jeff Garzik
972c26bdd6 libata: add ata_sg_is_last() helper, use it in several drivers 2005-10-18 22:14:54 -04:00
Tejun Heo
042c21fd2c [libata sata_sil24] add support for 3131/3531
This patch adds support for sil_3131 and sil_3531.  Both are
identical to 3124 except that they have only one port.  Bits 30 and 31
of ata_port_info->host_flags is used to encode available port numbers.
Version number is bumped to 0.22.

Edward Falk supplied all the necessary information and preliminary
patch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2005-10-09 09:35:46 -04:00
Tejun Heo
1fcce839a5 [libata sata_sil24] nit pickings
This patch removes unused NR_PORTS macro and adds termination entry
to sil24_pci_tbl.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2005-10-09 09:31:33 -04:00
Tejun Heo
7f726d125d [PATCH] sil24: implement tf_read callback
Hello, guys.

 This patch implements ->tf_read callback for sil24.  It didn't use to
be necessary but new ata_gen_fixed_sense now makes use of ->tf_read
callback.  This patch is taken from Edward Falk's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 13:15:02 -04:00
Tejun Heo
6a575fa969 [PATCH] sil24: implement proper TF register reading & caching
03_sil24_add-tf-reading.patch

	This patch implements proper TF register reading back and
	caching and bumps up version to 0.22.  This is taken from
	Edward's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 45 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Tejun Heo
46b93e7bce [PATCH] sil24: remove CMDERR clearing
02_sil24_remove-cmderr-clearing.patch

	CMDERR register doesn't need clearing.  This is from Edward's
	driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |    4 ----
 1 file changed, 4 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Tejun Heo
ad6e90f6d0 [PATCH] sil24: ignore non-error exception irqs
01_sil24_ignore-non-error-exception-irqs.patch

	Do not error-finish commands for non-error exception irqs -
	just ignore them.  This is taken from Edward's driver.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-06 05:51:24 -04:00
Tejun Heo
923f122573 [PATCH] sil24: initialization fix
sil24 0.20 didn't use to perform (what seems to be) port multiplier
initialization and controller reset 0.10 driver does.  This makes some
sil24 controllers malfunction.  This patch adds PM initialization and
controller resetting to initilization and bumps version to 0.21.
Please refer to the following thread for more information.

http://marc.theaimsgroup.com/?l=linux-ide&m=112582819830324&w=2
http://marc.theaimsgroup.com/?l=linux-ide&m=112636045531060&w=2

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-09-14 08:19:27 -04:00
Tejun Heo
83bbecc905 [PATCH] sil24: add more comments for constants
08_sil24_add-comments-for-constants.patch

	Add more comments to constants.

Signed-off-by: Edward Falk

 sata_sil24.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
e382eb1dbd [PATCH] sil24: fix PORT_CTRL_STAT constants
07_sil24_fix-PORT_CTRL_STAT-constants.patch

	PORT_CTRL_STAT constants were copied incorrectly from the
	preview driver.

Signed-off-by: Edward Falk

 sata_sil24.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
4f50c3cbb4 [PATCH] sil24: replace pp->port w/ ap->ioaddr.cmd_addr
06_sil24_remove-pp-port.patch

	As ap->ioaddr.cmd_addr isn't used for PORT_TF anymore, replace
	pp->port w/ it as AHCI does.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
33d015b9f2 [PATCH] sil24: remove PORT_TF
05_sil24_remove-PORT_TF.patch

	Remove PORT_TF, as taskfile isn't located at PORT_TF.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |    7 +------
 1 files changed, 1 insertion(+), 6 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
8746618d4f [PATCH] sil24: move error handling out of hot interrupt path
04_sil24_add-error_intr-function.patch

	Move error handling from sil24_host_intr into separate
        function - sil24_error_intr.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   55 +++++++++++++++++++++++++++++++------------------------
 1 files changed, 31 insertions(+), 24 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
06460aeaa2 [PATCH] sil24: add testing for PCI fault
03_sil24_add-pci-fault-check.patch

	On entry to interrupt handler, PORT_SLOT_STAT register is read
        first.  Check if PCI fault or device removal has occurred by
        testing the value for 0xffffffff.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |    6 ++++++
 1 files changed, 6 insertions(+)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
3cc4571c41 [PATCH] sil24: remove irq disable code on spurious interrupt
02_sil24_remove-irq-disable-on-spurious-intr.patch

	If interrupt occurs on a disabled port, the driver used to
        mask the port's interrupt, but we don't know if such action is
        necessary yet and that's not what other drives do.  So, just
        do nothing and tell IRQ subsystem that it's not our interrupt.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
1483467faa [PATCH] sil24: add FIXME comment above ata_device_add
01_sil24_add-FIXME-comment.patch

	Add FIXME comment above ata_device_add.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 sata_sil24.c |    1 +
 1 files changed, 1 insertion(+)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-17 00:51:50 -04:00
Tejun Heo
edb3366703 [PATCH] SATA: rewritten sil24 driver
This is rewritten sil24 driver against v2.6.13-rc3.

Rewritten based on driver originally submitted by Silicon Image.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-28 16:04:18 -04:00