aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:38:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:38:06 -0400
commit8019aa946af5218bc4446c21e43cc19c9401ac68 (patch)
tree6681b73a560f5a4e4a4e8f97b3833a087a488439 /drivers/scsi/ipr.c
parent73e3e6481f56b3b5b618671a8d32b19a35f84316 (diff)
parent48feb3c419508487becfb9ea3afcc54c3eac6d80 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (79 commits) ata-acpi: don't call _GTF for disabled drive sata_mv add temporary 3 second init delay for SiliconImage PMs sata_mv remove redundant edma init code sata_mv add basic port multiplier support sata_mv fix SOC flags, enable NCQ on SOC sata_mv disable hotplug for now sata_mv cosmetics sata_mv hardreset rework [libata] improve Kconfig help text for new PMP, SFF options libata: make EH fail gracefully if no reset method is available libata: Be a bit more slack about early devices libata: cable logic libata: move link onlineness check out of softreset methods libata: kill dead code paths in reset path pata_scc: fix build breakage libata: make PMP support optional libata: implement PMP helpers libata: separate PMP support code from core code libata: make SFF support optional libata: don't use ap->ioaddr in non-SFF drivers ...
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c74
1 files changed, 24 insertions, 50 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index c72014a3e7d4..65dc18dea845 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3937,7 +3937,7 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
3937 if (ipr_is_gata(res) && res->sata_port) { 3937 if (ipr_is_gata(res) && res->sata_port) {
3938 ap = res->sata_port->ap; 3938 ap = res->sata_port->ap;
3939 spin_unlock_irq(scsi_cmd->device->host->host_lock); 3939 spin_unlock_irq(scsi_cmd->device->host->host_lock);
3940 ata_do_eh(ap, NULL, NULL, ipr_sata_reset, NULL); 3940 ata_std_error_handler(ap);
3941 spin_lock_irq(scsi_cmd->device->host->host_lock); 3941 spin_lock_irq(scsi_cmd->device->host->host_lock);
3942 3942
3943 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) { 3943 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
@@ -5041,33 +5041,6 @@ static void ipr_ata_post_internal(struct ata_queued_cmd *qc)
5041} 5041}
5042 5042
5043/** 5043/**
5044 * ipr_tf_read - Read the current ATA taskfile for the ATA port
5045 * @ap: ATA port
5046 * @tf: destination ATA taskfile
5047 *
5048 * Return value:
5049 * none
5050 **/
5051static void ipr_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
5052{
5053 struct ipr_sata_port *sata_port = ap->private_data;
5054 struct ipr_ioasa_gata *g = &sata_port->ioasa;
5055
5056 tf->feature = g->error;
5057 tf->nsect = g->nsect;
5058 tf->lbal = g->lbal;
5059 tf->lbam = g->lbam;
5060 tf->lbah = g->lbah;
5061 tf->device = g->device;
5062 tf->command = g->status;
5063 tf->hob_nsect = g->hob_nsect;
5064 tf->hob_lbal = g->hob_lbal;
5065 tf->hob_lbam = g->hob_lbam;
5066 tf->hob_lbah = g->hob_lbah;
5067 tf->ctl = g->alt_status;
5068}
5069
5070/**
5071 * ipr_copy_sata_tf - Copy a SATA taskfile to an IOA data structure 5044 * ipr_copy_sata_tf - Copy a SATA taskfile to an IOA data structure
5072 * @regs: destination 5045 * @regs: destination
5073 * @tf: source ATA taskfile 5046 * @tf: source ATA taskfile
@@ -5245,40 +5218,41 @@ static unsigned int ipr_qc_issue(struct ata_queued_cmd *qc)
5245} 5218}
5246 5219
5247/** 5220/**
5248 * ipr_ata_check_status - Return last ATA status 5221 * ipr_qc_fill_rtf - Read result TF
5249 * @ap: ATA port 5222 * @qc: ATA queued command
5250 * 5223 *
5251 * Return value: 5224 * Return value:
5252 * ATA status 5225 * true
5253 **/ 5226 **/
5254static u8 ipr_ata_check_status(struct ata_port *ap) 5227static bool ipr_qc_fill_rtf(struct ata_queued_cmd *qc)
5255{ 5228{
5256 struct ipr_sata_port *sata_port = ap->private_data; 5229 struct ipr_sata_port *sata_port = qc->ap->private_data;
5257 return sata_port->ioasa.status; 5230 struct ipr_ioasa_gata *g = &sata_port->ioasa;
5258} 5231 struct ata_taskfile *tf = &qc->result_tf;
5259 5232
5260/** 5233 tf->feature = g->error;
5261 * ipr_ata_check_altstatus - Return last ATA altstatus 5234 tf->nsect = g->nsect;
5262 * @ap: ATA port 5235 tf->lbal = g->lbal;
5263 * 5236 tf->lbam = g->lbam;
5264 * Return value: 5237 tf->lbah = g->lbah;
5265 * Alt ATA status 5238 tf->device = g->device;
5266 **/ 5239 tf->command = g->status;
5267static u8 ipr_ata_check_altstatus(struct ata_port *ap) 5240 tf->hob_nsect = g->hob_nsect;
5268{ 5241 tf->hob_lbal = g->hob_lbal;
5269 struct ipr_sata_port *sata_port = ap->private_data; 5242 tf->hob_lbam = g->hob_lbam;
5270 return sata_port->ioasa.alt_status; 5243 tf->hob_lbah = g->hob_lbah;
5244 tf->ctl = g->alt_status;
5245
5246 return true;
5271} 5247}
5272 5248
5273static struct ata_port_operations ipr_sata_ops = { 5249static struct ata_port_operations ipr_sata_ops = {
5274 .check_status = ipr_ata_check_status,
5275 .check_altstatus = ipr_ata_check_altstatus,
5276 .dev_select = ata_noop_dev_select,
5277 .phy_reset = ipr_ata_phy_reset, 5250 .phy_reset = ipr_ata_phy_reset,
5251 .hardreset = ipr_sata_reset,
5278 .post_internal_cmd = ipr_ata_post_internal, 5252 .post_internal_cmd = ipr_ata_post_internal,
5279 .tf_read = ipr_tf_read,
5280 .qc_prep = ata_noop_qc_prep, 5253 .qc_prep = ata_noop_qc_prep,
5281 .qc_issue = ipr_qc_issue, 5254 .qc_issue = ipr_qc_issue,
5255 .qc_fill_rtf = ipr_qc_fill_rtf,
5282 .port_start = ata_sas_port_start, 5256 .port_start = ata_sas_port_start,
5283 .port_stop = ata_sas_port_stop 5257 .port_stop = ata_sas_port_stop
5284}; 5258};