aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c221
1 files changed, 123 insertions, 98 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 6a6661c35b2f..82ea4a8226b0 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -567,7 +567,8 @@ static void ipr_trc_hook(struct ipr_cmnd *ipr_cmd,
567static void ipr_reinit_ipr_cmnd(struct ipr_cmnd *ipr_cmd) 567static void ipr_reinit_ipr_cmnd(struct ipr_cmnd *ipr_cmd)
568{ 568{
569 struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; 569 struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
570 struct ipr_ioasa *ioasa = &ipr_cmd->ioasa; 570 struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
571 struct ipr_ioasa64 *ioasa64 = &ipr_cmd->s.ioasa64;
571 dma_addr_t dma_addr = ipr_cmd->dma_addr; 572 dma_addr_t dma_addr = ipr_cmd->dma_addr;
572 573
573 memset(&ioarcb->cmd_pkt, 0, sizeof(struct ipr_cmd_pkt)); 574 memset(&ioarcb->cmd_pkt, 0, sizeof(struct ipr_cmd_pkt));
@@ -576,19 +577,19 @@ static void ipr_reinit_ipr_cmnd(struct ipr_cmnd *ipr_cmd)
576 ioarcb->ioadl_len = 0; 577 ioarcb->ioadl_len = 0;
577 ioarcb->read_ioadl_len = 0; 578 ioarcb->read_ioadl_len = 0;
578 579
579 if (ipr_cmd->ioa_cfg->sis64) 580 if (ipr_cmd->ioa_cfg->sis64) {
580 ioarcb->u.sis64_addr_data.data_ioadl_addr = 581 ioarcb->u.sis64_addr_data.data_ioadl_addr =
581 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ioadl64)); 582 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ioadl64));
582 else { 583 ioasa64->u.gata.status = 0;
584 } else {
583 ioarcb->write_ioadl_addr = 585 ioarcb->write_ioadl_addr =
584 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, i.ioadl)); 586 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, i.ioadl));
585 ioarcb->read_ioadl_addr = ioarcb->write_ioadl_addr; 587 ioarcb->read_ioadl_addr = ioarcb->write_ioadl_addr;
588 ioasa->u.gata.status = 0;
586 } 589 }
587 590
588 ioasa->ioasc = 0; 591 ioasa->hdr.ioasc = 0;
589 ioasa->residual_data_len = 0; 592 ioasa->hdr.residual_data_len = 0;
590 ioasa->u.gata.status = 0;
591
592 ipr_cmd->scsi_cmd = NULL; 593 ipr_cmd->scsi_cmd = NULL;
593 ipr_cmd->qc = NULL; 594 ipr_cmd->qc = NULL;
594 ipr_cmd->sense_buffer[0] = 0; 595 ipr_cmd->sense_buffer[0] = 0;
@@ -768,8 +769,8 @@ static void ipr_fail_all_ops(struct ipr_ioa_cfg *ioa_cfg)
768 list_for_each_entry_safe(ipr_cmd, temp, &ioa_cfg->pending_q, queue) { 769 list_for_each_entry_safe(ipr_cmd, temp, &ioa_cfg->pending_q, queue) {
769 list_del(&ipr_cmd->queue); 770 list_del(&ipr_cmd->queue);
770 771
771 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_IOA_WAS_RESET); 772 ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_IOA_WAS_RESET);
772 ipr_cmd->ioasa.ilid = cpu_to_be32(IPR_DRIVER_ILID); 773 ipr_cmd->s.ioasa.hdr.ilid = cpu_to_be32(IPR_DRIVER_ILID);
773 774
774 if (ipr_cmd->scsi_cmd) 775 if (ipr_cmd->scsi_cmd)
775 ipr_cmd->done = ipr_scsi_eh_done; 776 ipr_cmd->done = ipr_scsi_eh_done;
@@ -1040,7 +1041,7 @@ static void ipr_init_res_entry(struct ipr_resource_entry *res,
1040 proto = cfgtew->u.cfgte64->proto; 1041 proto = cfgtew->u.cfgte64->proto;
1041 res->res_flags = cfgtew->u.cfgte64->res_flags; 1042 res->res_flags = cfgtew->u.cfgte64->res_flags;
1042 res->qmodel = IPR_QUEUEING_MODEL64(res); 1043 res->qmodel = IPR_QUEUEING_MODEL64(res);
1043 res->type = cfgtew->u.cfgte64->res_type & 0x0f; 1044 res->type = cfgtew->u.cfgte64->res_type;
1044 1045
1045 memcpy(res->res_path, &cfgtew->u.cfgte64->res_path, 1046 memcpy(res->res_path, &cfgtew->u.cfgte64->res_path,
1046 sizeof(res->res_path)); 1047 sizeof(res->res_path));
@@ -1319,7 +1320,7 @@ static void ipr_process_ccn(struct ipr_cmnd *ipr_cmd)
1319{ 1320{
1320 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 1321 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
1321 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; 1322 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
1322 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 1323 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
1323 1324
1324 list_del(&hostrcb->queue); 1325 list_del(&hostrcb->queue);
1325 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q); 1326 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
@@ -2354,7 +2355,7 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
2354{ 2355{
2355 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 2356 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
2356 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; 2357 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
2357 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 2358 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
2358 u32 fd_ioasc; 2359 u32 fd_ioasc;
2359 2360
2360 if (ioa_cfg->sis64) 2361 if (ioa_cfg->sis64)
@@ -4509,11 +4510,16 @@ static int ipr_device_reset(struct ipr_ioa_cfg *ioa_cfg,
4509 } 4510 }
4510 4511
4511 ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT); 4512 ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT);
4512 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 4513 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
4513 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q); 4514 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
4514 if (ipr_is_gata(res) && res->sata_port && ioasc != IPR_IOASC_IOA_WAS_RESET) 4515 if (ipr_is_gata(res) && res->sata_port && ioasc != IPR_IOASC_IOA_WAS_RESET) {
4515 memcpy(&res->sata_port->ioasa, &ipr_cmd->ioasa.u.gata, 4516 if (ipr_cmd->ioa_cfg->sis64)
4516 sizeof(struct ipr_ioasa_gata)); 4517 memcpy(&res->sata_port->ioasa, &ipr_cmd->s.ioasa64.u.gata,
4518 sizeof(struct ipr_ioasa_gata));
4519 else
4520 memcpy(&res->sata_port->ioasa, &ipr_cmd->s.ioasa.u.gata,
4521 sizeof(struct ipr_ioasa_gata));
4522 }
4517 4523
4518 LEAVE; 4524 LEAVE;
4519 return (IPR_IOASC_SENSE_KEY(ioasc) ? -EIO : 0); 4525 return (IPR_IOASC_SENSE_KEY(ioasc) ? -EIO : 0);
@@ -4768,7 +4774,7 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd)
4768 scmd_printk(KERN_ERR, scsi_cmd, "Aborting command: %02X\n", 4774 scmd_printk(KERN_ERR, scsi_cmd, "Aborting command: %02X\n",
4769 scsi_cmd->cmnd[0]); 4775 scsi_cmd->cmnd[0]);
4770 ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT); 4776 ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT);
4771 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 4777 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
4772 4778
4773 /* 4779 /*
4774 * If the abort task timed out and we sent a bus reset, we will get 4780 * If the abort task timed out and we sent a bus reset, we will get
@@ -4812,15 +4818,39 @@ static int ipr_eh_abort(struct scsi_cmnd * scsi_cmd)
4812/** 4818/**
4813 * ipr_handle_other_interrupt - Handle "other" interrupts 4819 * ipr_handle_other_interrupt - Handle "other" interrupts
4814 * @ioa_cfg: ioa config struct 4820 * @ioa_cfg: ioa config struct
4815 * @int_reg: interrupt register
4816 * 4821 *
4817 * Return value: 4822 * Return value:
4818 * IRQ_NONE / IRQ_HANDLED 4823 * IRQ_NONE / IRQ_HANDLED
4819 **/ 4824 **/
4820static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg, 4825static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg)
4821 volatile u32 int_reg)
4822{ 4826{
4823 irqreturn_t rc = IRQ_HANDLED; 4827 irqreturn_t rc = IRQ_HANDLED;
4828 volatile u32 int_reg, int_mask_reg;
4829
4830 int_mask_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg32);
4831 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32) & ~int_mask_reg;
4832
4833 /* If an interrupt on the adapter did not occur, ignore it.
4834 * Or in the case of SIS 64, check for a stage change interrupt.
4835 */
4836 if ((int_reg & IPR_PCII_OPER_INTERRUPTS) == 0) {
4837 if (ioa_cfg->sis64) {
4838 int_mask_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
4839 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
4840 if (int_reg & IPR_PCII_IPL_STAGE_CHANGE) {
4841
4842 /* clear stage change */
4843 writel(IPR_PCII_IPL_STAGE_CHANGE, ioa_cfg->regs.clr_interrupt_reg);
4844 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
4845 list_del(&ioa_cfg->reset_cmd->queue);
4846 del_timer(&ioa_cfg->reset_cmd->timer);
4847 ipr_reset_ioa_job(ioa_cfg->reset_cmd);
4848 return IRQ_HANDLED;
4849 }
4850 }
4851
4852 return IRQ_NONE;
4853 }
4824 4854
4825 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) { 4855 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) {
4826 /* Mask the interrupt */ 4856 /* Mask the interrupt */
@@ -4881,7 +4911,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
4881{ 4911{
4882 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp; 4912 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp;
4883 unsigned long lock_flags = 0; 4913 unsigned long lock_flags = 0;
4884 volatile u32 int_reg, int_mask_reg; 4914 volatile u32 int_reg;
4885 u32 ioasc; 4915 u32 ioasc;
4886 u16 cmd_index; 4916 u16 cmd_index;
4887 int num_hrrq = 0; 4917 int num_hrrq = 0;
@@ -4896,33 +4926,6 @@ static irqreturn_t ipr_isr(int irq, void *devp)
4896 return IRQ_NONE; 4926 return IRQ_NONE;
4897 } 4927 }
4898 4928
4899 int_mask_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg32);
4900 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32) & ~int_mask_reg;
4901
4902 /* If an interrupt on the adapter did not occur, ignore it.
4903 * Or in the case of SIS 64, check for a stage change interrupt.
4904 */
4905 if (unlikely((int_reg & IPR_PCII_OPER_INTERRUPTS) == 0)) {
4906 if (ioa_cfg->sis64) {
4907 int_mask_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
4908 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
4909 if (int_reg & IPR_PCII_IPL_STAGE_CHANGE) {
4910
4911 /* clear stage change */
4912 writel(IPR_PCII_IPL_STAGE_CHANGE, ioa_cfg->regs.clr_interrupt_reg);
4913 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
4914 list_del(&ioa_cfg->reset_cmd->queue);
4915 del_timer(&ioa_cfg->reset_cmd->timer);
4916 ipr_reset_ioa_job(ioa_cfg->reset_cmd);
4917 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
4918 return IRQ_HANDLED;
4919 }
4920 }
4921
4922 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
4923 return IRQ_NONE;
4924 }
4925
4926 while (1) { 4929 while (1) {
4927 ipr_cmd = NULL; 4930 ipr_cmd = NULL;
4928 4931
@@ -4940,7 +4943,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
4940 4943
4941 ipr_cmd = ioa_cfg->ipr_cmnd_list[cmd_index]; 4944 ipr_cmd = ioa_cfg->ipr_cmnd_list[cmd_index];
4942 4945
4943 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 4946 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
4944 4947
4945 ipr_trc_hook(ipr_cmd, IPR_TRACE_FINISH, ioasc); 4948 ipr_trc_hook(ipr_cmd, IPR_TRACE_FINISH, ioasc);
4946 4949
@@ -4962,7 +4965,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
4962 /* Clear the PCI interrupt */ 4965 /* Clear the PCI interrupt */
4963 do { 4966 do {
4964 writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg32); 4967 writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg32);
4965 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32) & ~int_mask_reg; 4968 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32);
4966 } while (int_reg & IPR_PCII_HRRQ_UPDATED && 4969 } while (int_reg & IPR_PCII_HRRQ_UPDATED &&
4967 num_hrrq++ < IPR_MAX_HRRQ_RETRIES); 4970 num_hrrq++ < IPR_MAX_HRRQ_RETRIES);
4968 4971
@@ -4977,7 +4980,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
4977 } 4980 }
4978 4981
4979 if (unlikely(rc == IRQ_NONE)) 4982 if (unlikely(rc == IRQ_NONE))
4980 rc = ipr_handle_other_interrupt(ioa_cfg, int_reg); 4983 rc = ipr_handle_other_interrupt(ioa_cfg);
4981 4984
4982 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 4985 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
4983 return rc; 4986 return rc;
@@ -5014,6 +5017,10 @@ static int ipr_build_ioadl64(struct ipr_ioa_cfg *ioa_cfg,
5014 5017
5015 ipr_cmd->dma_use_sg = nseg; 5018 ipr_cmd->dma_use_sg = nseg;
5016 5019
5020 ioarcb->data_transfer_length = cpu_to_be32(length);
5021 ioarcb->ioadl_len =
5022 cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
5023
5017 if (scsi_cmd->sc_data_direction == DMA_TO_DEVICE) { 5024 if (scsi_cmd->sc_data_direction == DMA_TO_DEVICE) {
5018 ioadl_flags = IPR_IOADL_FLAGS_WRITE; 5025 ioadl_flags = IPR_IOADL_FLAGS_WRITE;
5019 ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_WRITE_NOT_READ; 5026 ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_WRITE_NOT_READ;
@@ -5135,7 +5142,7 @@ static void ipr_erp_done(struct ipr_cmnd *ipr_cmd)
5135 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd; 5142 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
5136 struct ipr_resource_entry *res = scsi_cmd->device->hostdata; 5143 struct ipr_resource_entry *res = scsi_cmd->device->hostdata;
5137 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 5144 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
5138 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 5145 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
5139 5146
5140 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) { 5147 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) {
5141 scsi_cmd->result |= (DID_ERROR << 16); 5148 scsi_cmd->result |= (DID_ERROR << 16);
@@ -5166,7 +5173,7 @@ static void ipr_erp_done(struct ipr_cmnd *ipr_cmd)
5166static void ipr_reinit_ipr_cmnd_for_erp(struct ipr_cmnd *ipr_cmd) 5173static void ipr_reinit_ipr_cmnd_for_erp(struct ipr_cmnd *ipr_cmd)
5167{ 5174{
5168 struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; 5175 struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
5169 struct ipr_ioasa *ioasa = &ipr_cmd->ioasa; 5176 struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
5170 dma_addr_t dma_addr = ipr_cmd->dma_addr; 5177 dma_addr_t dma_addr = ipr_cmd->dma_addr;
5171 5178
5172 memset(&ioarcb->cmd_pkt, 0, sizeof(struct ipr_cmd_pkt)); 5179 memset(&ioarcb->cmd_pkt, 0, sizeof(struct ipr_cmd_pkt));
@@ -5174,8 +5181,8 @@ static void ipr_reinit_ipr_cmnd_for_erp(struct ipr_cmnd *ipr_cmd)
5174 ioarcb->read_data_transfer_length = 0; 5181 ioarcb->read_data_transfer_length = 0;
5175 ioarcb->ioadl_len = 0; 5182 ioarcb->ioadl_len = 0;
5176 ioarcb->read_ioadl_len = 0; 5183 ioarcb->read_ioadl_len = 0;
5177 ioasa->ioasc = 0; 5184 ioasa->hdr.ioasc = 0;
5178 ioasa->residual_data_len = 0; 5185 ioasa->hdr.residual_data_len = 0;
5179 5186
5180 if (ipr_cmd->ioa_cfg->sis64) 5187 if (ipr_cmd->ioa_cfg->sis64)
5181 ioarcb->u.sis64_addr_data.data_ioadl_addr = 5188 ioarcb->u.sis64_addr_data.data_ioadl_addr =
@@ -5200,7 +5207,7 @@ static void ipr_reinit_ipr_cmnd_for_erp(struct ipr_cmnd *ipr_cmd)
5200static void ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd) 5207static void ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd)
5201{ 5208{
5202 struct ipr_cmd_pkt *cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt; 5209 struct ipr_cmd_pkt *cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
5203 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 5210 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
5204 5211
5205 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) { 5212 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) {
5206 ipr_erp_done(ipr_cmd); 5213 ipr_erp_done(ipr_cmd);
@@ -5277,12 +5284,12 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg,
5277 int i; 5284 int i;
5278 u16 data_len; 5285 u16 data_len;
5279 u32 ioasc, fd_ioasc; 5286 u32 ioasc, fd_ioasc;
5280 struct ipr_ioasa *ioasa = &ipr_cmd->ioasa; 5287 struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
5281 __be32 *ioasa_data = (__be32 *)ioasa; 5288 __be32 *ioasa_data = (__be32 *)ioasa;
5282 int error_index; 5289 int error_index;
5283 5290
5284 ioasc = be32_to_cpu(ioasa->ioasc) & IPR_IOASC_IOASC_MASK; 5291 ioasc = be32_to_cpu(ioasa->hdr.ioasc) & IPR_IOASC_IOASC_MASK;
5285 fd_ioasc = be32_to_cpu(ioasa->fd_ioasc) & IPR_IOASC_IOASC_MASK; 5292 fd_ioasc = be32_to_cpu(ioasa->hdr.fd_ioasc) & IPR_IOASC_IOASC_MASK;
5286 5293
5287 if (0 == ioasc) 5294 if (0 == ioasc)
5288 return; 5295 return;
@@ -5297,7 +5304,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg,
5297 5304
5298 if (ioa_cfg->log_level < IPR_MAX_LOG_LEVEL) { 5305 if (ioa_cfg->log_level < IPR_MAX_LOG_LEVEL) {
5299 /* Don't log an error if the IOA already logged one */ 5306 /* Don't log an error if the IOA already logged one */
5300 if (ioasa->ilid != 0) 5307 if (ioasa->hdr.ilid != 0)
5301 return; 5308 return;
5302 5309
5303 if (!ipr_is_gscsi(res)) 5310 if (!ipr_is_gscsi(res))
@@ -5309,10 +5316,11 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg,
5309 5316
5310 ipr_res_err(ioa_cfg, res, "%s\n", ipr_error_table[error_index].error); 5317 ipr_res_err(ioa_cfg, res, "%s\n", ipr_error_table[error_index].error);
5311 5318
5312 if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len)) 5319 data_len = be16_to_cpu(ioasa->hdr.ret_stat_len);
5320 if (ioa_cfg->sis64 && sizeof(struct ipr_ioasa64) < data_len)
5321 data_len = sizeof(struct ipr_ioasa64);
5322 else if (!ioa_cfg->sis64 && sizeof(struct ipr_ioasa) < data_len)
5313 data_len = sizeof(struct ipr_ioasa); 5323 data_len = sizeof(struct ipr_ioasa);
5314 else
5315 data_len = be16_to_cpu(ioasa->ret_stat_len);
5316 5324
5317 ipr_err("IOASA Dump:\n"); 5325 ipr_err("IOASA Dump:\n");
5318 5326
@@ -5338,8 +5346,8 @@ static void ipr_gen_sense(struct ipr_cmnd *ipr_cmd)
5338 u32 failing_lba; 5346 u32 failing_lba;
5339 u8 *sense_buf = ipr_cmd->scsi_cmd->sense_buffer; 5347 u8 *sense_buf = ipr_cmd->scsi_cmd->sense_buffer;
5340 struct ipr_resource_entry *res = ipr_cmd->scsi_cmd->device->hostdata; 5348 struct ipr_resource_entry *res = ipr_cmd->scsi_cmd->device->hostdata;
5341 struct ipr_ioasa *ioasa = &ipr_cmd->ioasa; 5349 struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
5342 u32 ioasc = be32_to_cpu(ioasa->ioasc); 5350 u32 ioasc = be32_to_cpu(ioasa->hdr.ioasc);
5343 5351
5344 memset(sense_buf, 0, SCSI_SENSE_BUFFERSIZE); 5352 memset(sense_buf, 0, SCSI_SENSE_BUFFERSIZE);
5345 5353
@@ -5382,7 +5390,7 @@ static void ipr_gen_sense(struct ipr_cmnd *ipr_cmd)
5382 5390
5383 /* Illegal request */ 5391 /* Illegal request */
5384 if ((IPR_IOASC_SENSE_KEY(ioasc) == 0x05) && 5392 if ((IPR_IOASC_SENSE_KEY(ioasc) == 0x05) &&
5385 (be32_to_cpu(ioasa->ioasc_specific) & IPR_FIELD_POINTER_VALID)) { 5393 (be32_to_cpu(ioasa->hdr.ioasc_specific) & IPR_FIELD_POINTER_VALID)) {
5386 sense_buf[7] = 10; /* additional length */ 5394 sense_buf[7] = 10; /* additional length */
5387 5395
5388 /* IOARCB was in error */ 5396 /* IOARCB was in error */
@@ -5393,10 +5401,10 @@ static void ipr_gen_sense(struct ipr_cmnd *ipr_cmd)
5393 5401
5394 sense_buf[16] = 5402 sense_buf[16] =
5395 ((IPR_FIELD_POINTER_MASK & 5403 ((IPR_FIELD_POINTER_MASK &
5396 be32_to_cpu(ioasa->ioasc_specific)) >> 8) & 0xff; 5404 be32_to_cpu(ioasa->hdr.ioasc_specific)) >> 8) & 0xff;
5397 sense_buf[17] = 5405 sense_buf[17] =
5398 (IPR_FIELD_POINTER_MASK & 5406 (IPR_FIELD_POINTER_MASK &
5399 be32_to_cpu(ioasa->ioasc_specific)) & 0xff; 5407 be32_to_cpu(ioasa->hdr.ioasc_specific)) & 0xff;
5400 } else { 5408 } else {
5401 if (ioasc == IPR_IOASC_MED_DO_NOT_REALLOC) { 5409 if (ioasc == IPR_IOASC_MED_DO_NOT_REALLOC) {
5402 if (ipr_is_vset_device(res)) 5410 if (ipr_is_vset_device(res))
@@ -5428,14 +5436,20 @@ static void ipr_gen_sense(struct ipr_cmnd *ipr_cmd)
5428 **/ 5436 **/
5429static int ipr_get_autosense(struct ipr_cmnd *ipr_cmd) 5437static int ipr_get_autosense(struct ipr_cmnd *ipr_cmd)
5430{ 5438{
5431 struct ipr_ioasa *ioasa = &ipr_cmd->ioasa; 5439 struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
5440 struct ipr_ioasa64 *ioasa64 = &ipr_cmd->s.ioasa64;
5432 5441
5433 if ((be32_to_cpu(ioasa->ioasc_specific) & IPR_AUTOSENSE_VALID) == 0) 5442 if ((be32_to_cpu(ioasa->hdr.ioasc_specific) & IPR_AUTOSENSE_VALID) == 0)
5434 return 0; 5443 return 0;
5435 5444
5436 memcpy(ipr_cmd->scsi_cmd->sense_buffer, ioasa->auto_sense.data, 5445 if (ipr_cmd->ioa_cfg->sis64)
5437 min_t(u16, be16_to_cpu(ioasa->auto_sense.auto_sense_len), 5446 memcpy(ipr_cmd->scsi_cmd->sense_buffer, ioasa64->auto_sense.data,
5438 SCSI_SENSE_BUFFERSIZE)); 5447 min_t(u16, be16_to_cpu(ioasa64->auto_sense.auto_sense_len),
5448 SCSI_SENSE_BUFFERSIZE));
5449 else
5450 memcpy(ipr_cmd->scsi_cmd->sense_buffer, ioasa->auto_sense.data,
5451 min_t(u16, be16_to_cpu(ioasa->auto_sense.auto_sense_len),
5452 SCSI_SENSE_BUFFERSIZE));
5439 return 1; 5453 return 1;
5440} 5454}
5441 5455
@@ -5455,7 +5469,7 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
5455{ 5469{
5456 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd; 5470 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
5457 struct ipr_resource_entry *res = scsi_cmd->device->hostdata; 5471 struct ipr_resource_entry *res = scsi_cmd->device->hostdata;
5458 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 5472 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
5459 u32 masked_ioasc = ioasc & IPR_IOASC_IOASC_MASK; 5473 u32 masked_ioasc = ioasc & IPR_IOASC_IOASC_MASK;
5460 5474
5461 if (!res) { 5475 if (!res) {
@@ -5547,9 +5561,9 @@ static void ipr_scsi_done(struct ipr_cmnd *ipr_cmd)
5547{ 5561{
5548 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 5562 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
5549 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd; 5563 struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
5550 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 5564 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
5551 5565
5552 scsi_set_resid(scsi_cmd, be32_to_cpu(ipr_cmd->ioasa.residual_data_len)); 5566 scsi_set_resid(scsi_cmd, be32_to_cpu(ipr_cmd->s.ioasa.hdr.residual_data_len));
5553 5567
5554 if (likely(IPR_IOASC_SENSE_KEY(ioasc) == 0)) { 5568 if (likely(IPR_IOASC_SENSE_KEY(ioasc) == 0)) {
5555 scsi_dma_unmap(ipr_cmd->scsi_cmd); 5569 scsi_dma_unmap(ipr_cmd->scsi_cmd);
@@ -5839,19 +5853,23 @@ static void ipr_sata_done(struct ipr_cmnd *ipr_cmd)
5839 struct ata_queued_cmd *qc = ipr_cmd->qc; 5853 struct ata_queued_cmd *qc = ipr_cmd->qc;
5840 struct ipr_sata_port *sata_port = qc->ap->private_data; 5854 struct ipr_sata_port *sata_port = qc->ap->private_data;
5841 struct ipr_resource_entry *res = sata_port->res; 5855 struct ipr_resource_entry *res = sata_port->res;
5842 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 5856 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
5843 5857
5844 memcpy(&sata_port->ioasa, &ipr_cmd->ioasa.u.gata, 5858 if (ipr_cmd->ioa_cfg->sis64)
5845 sizeof(struct ipr_ioasa_gata)); 5859 memcpy(&sata_port->ioasa, &ipr_cmd->s.ioasa64.u.gata,
5860 sizeof(struct ipr_ioasa_gata));
5861 else
5862 memcpy(&sata_port->ioasa, &ipr_cmd->s.ioasa.u.gata,
5863 sizeof(struct ipr_ioasa_gata));
5846 ipr_dump_ioasa(ioa_cfg, ipr_cmd, res); 5864 ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
5847 5865
5848 if (be32_to_cpu(ipr_cmd->ioasa.ioasc_specific) & IPR_ATA_DEVICE_WAS_RESET) 5866 if (be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc_specific) & IPR_ATA_DEVICE_WAS_RESET)
5849 scsi_report_device_reset(ioa_cfg->host, res->bus, res->target); 5867 scsi_report_device_reset(ioa_cfg->host, res->bus, res->target);
5850 5868
5851 if (IPR_IOASC_SENSE_KEY(ioasc) > RECOVERED_ERROR) 5869 if (IPR_IOASC_SENSE_KEY(ioasc) > RECOVERED_ERROR)
5852 qc->err_mask |= __ac_err_mask(ipr_cmd->ioasa.u.gata.status); 5870 qc->err_mask |= __ac_err_mask(sata_port->ioasa.status);
5853 else 5871 else
5854 qc->err_mask |= ac_err_mask(ipr_cmd->ioasa.u.gata.status); 5872 qc->err_mask |= ac_err_mask(sata_port->ioasa.status);
5855 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q); 5873 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
5856 ata_qc_complete(qc); 5874 ata_qc_complete(qc);
5857} 5875}
@@ -6520,7 +6538,7 @@ static void ipr_build_mode_sense(struct ipr_cmnd *ipr_cmd,
6520static int ipr_reset_cmd_failed(struct ipr_cmnd *ipr_cmd) 6538static int ipr_reset_cmd_failed(struct ipr_cmnd *ipr_cmd)
6521{ 6539{
6522 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 6540 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
6523 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 6541 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
6524 6542
6525 dev_err(&ioa_cfg->pdev->dev, 6543 dev_err(&ioa_cfg->pdev->dev,
6526 "0x%02X failed with IOASC: 0x%08X\n", 6544 "0x%02X failed with IOASC: 0x%08X\n",
@@ -6544,7 +6562,7 @@ static int ipr_reset_cmd_failed(struct ipr_cmnd *ipr_cmd)
6544static int ipr_reset_mode_sense_failed(struct ipr_cmnd *ipr_cmd) 6562static int ipr_reset_mode_sense_failed(struct ipr_cmnd *ipr_cmd)
6545{ 6563{
6546 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 6564 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
6547 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 6565 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
6548 6566
6549 if (ioasc == IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT) { 6567 if (ioasc == IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT) {
6550 ipr_cmd->job_step = ipr_set_supported_devs; 6568 ipr_cmd->job_step = ipr_set_supported_devs;
@@ -6634,7 +6652,7 @@ static int ipr_ioafp_mode_select_page24(struct ipr_cmnd *ipr_cmd)
6634 **/ 6652 **/
6635static int ipr_reset_mode_sense_page24_failed(struct ipr_cmnd *ipr_cmd) 6653static int ipr_reset_mode_sense_page24_failed(struct ipr_cmnd *ipr_cmd)
6636{ 6654{
6637 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 6655 u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
6638 6656
6639 if (ioasc == IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT) { 6657 if (ioasc == IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT) {
6640 ipr_cmd->job_step = ipr_ioafp_mode_sense_page28; 6658 ipr_cmd->job_step = ipr_ioafp_mode_sense_page28;
@@ -6706,7 +6724,7 @@ static int ipr_init_res_table(struct ipr_cmnd *ipr_cmd)
6706 list_move_tail(&res->queue, &old_res); 6724 list_move_tail(&res->queue, &old_res);
6707 6725
6708 if (ioa_cfg->sis64) 6726 if (ioa_cfg->sis64)
6709 entries = ioa_cfg->u.cfg_table64->hdr64.num_entries; 6727 entries = be16_to_cpu(ioa_cfg->u.cfg_table64->hdr64.num_entries);
6710 else 6728 else
6711 entries = ioa_cfg->u.cfg_table->hdr.num_entries; 6729 entries = ioa_cfg->u.cfg_table->hdr.num_entries;
6712 6730
@@ -6792,6 +6810,7 @@ static int ipr_ioafp_query_ioa_cfg(struct ipr_cmnd *ipr_cmd)
6792 ioarcb->res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE); 6810 ioarcb->res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
6793 6811
6794 ioarcb->cmd_pkt.cdb[0] = IPR_QUERY_IOA_CONFIG; 6812 ioarcb->cmd_pkt.cdb[0] = IPR_QUERY_IOA_CONFIG;
6813 ioarcb->cmd_pkt.cdb[6] = (ioa_cfg->cfg_table_size >> 16) & 0xff;
6795 ioarcb->cmd_pkt.cdb[7] = (ioa_cfg->cfg_table_size >> 8) & 0xff; 6814 ioarcb->cmd_pkt.cdb[7] = (ioa_cfg->cfg_table_size >> 8) & 0xff;
6796 ioarcb->cmd_pkt.cdb[8] = ioa_cfg->cfg_table_size & 0xff; 6815 ioarcb->cmd_pkt.cdb[8] = ioa_cfg->cfg_table_size & 0xff;
6797 6816
@@ -7122,7 +7141,9 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd)
7122 ipr_dbg("IPL stage = 0x%lx, IPL stage time = %ld\n", stage, stage_time); 7141 ipr_dbg("IPL stage = 0x%lx, IPL stage time = %ld\n", stage, stage_time);
7123 7142
7124 /* sanity check the stage_time value */ 7143 /* sanity check the stage_time value */
7125 if (stage_time < IPR_IPL_INIT_MIN_STAGE_TIME) 7144 if (stage_time == 0)
7145 stage_time = IPR_IPL_INIT_DEFAULT_STAGE_TIME;
7146 else if (stage_time < IPR_IPL_INIT_MIN_STAGE_TIME)
7126 stage_time = IPR_IPL_INIT_MIN_STAGE_TIME; 7147 stage_time = IPR_IPL_INIT_MIN_STAGE_TIME;
7127 else if (stage_time > IPR_LONG_OPERATIONAL_TIMEOUT) 7148 else if (stage_time > IPR_LONG_OPERATIONAL_TIMEOUT)
7128 stage_time = IPR_LONG_OPERATIONAL_TIMEOUT; 7149 stage_time = IPR_LONG_OPERATIONAL_TIMEOUT;
@@ -7165,13 +7186,14 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
7165{ 7186{
7166 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 7187 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
7167 volatile u32 int_reg; 7188 volatile u32 int_reg;
7189 volatile u64 maskval;
7168 7190
7169 ENTER; 7191 ENTER;
7170 ipr_cmd->job_step = ipr_ioafp_identify_hrrq; 7192 ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
7171 ipr_init_ioa_mem(ioa_cfg); 7193 ipr_init_ioa_mem(ioa_cfg);
7172 7194
7173 ioa_cfg->allow_interrupts = 1; 7195 ioa_cfg->allow_interrupts = 1;
7174 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); 7196 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32);
7175 7197
7176 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) { 7198 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) {
7177 writel((IPR_PCII_ERROR_INTERRUPTS | IPR_PCII_HRRQ_UPDATED), 7199 writel((IPR_PCII_ERROR_INTERRUPTS | IPR_PCII_HRRQ_UPDATED),
@@ -7183,9 +7205,12 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
7183 /* Enable destructive diagnostics on IOA */ 7205 /* Enable destructive diagnostics on IOA */
7184 writel(ioa_cfg->doorbell, ioa_cfg->regs.set_uproc_interrupt_reg32); 7206 writel(ioa_cfg->doorbell, ioa_cfg->regs.set_uproc_interrupt_reg32);
7185 7207
7186 writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32); 7208 if (ioa_cfg->sis64) {
7187 if (ioa_cfg->sis64) 7209 maskval = IPR_PCII_IPL_STAGE_CHANGE;
7188 writel(IPR_PCII_IPL_STAGE_CHANGE, ioa_cfg->regs.clr_interrupt_mask_reg); 7210 maskval = (maskval << 32) | IPR_PCII_OPER_INTERRUPTS;
7211 writeq(maskval, ioa_cfg->regs.clr_interrupt_mask_reg);
7212 } else
7213 writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32);
7189 7214
7190 int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg); 7215 int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
7191 7216
@@ -7332,12 +7357,12 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
7332 rc = pci_restore_state(ioa_cfg->pdev); 7357 rc = pci_restore_state(ioa_cfg->pdev);
7333 7358
7334 if (rc != PCIBIOS_SUCCESSFUL) { 7359 if (rc != PCIBIOS_SUCCESSFUL) {
7335 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); 7360 ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
7336 return IPR_RC_JOB_CONTINUE; 7361 return IPR_RC_JOB_CONTINUE;
7337 } 7362 }
7338 7363
7339 if (ipr_set_pcix_cmd_reg(ioa_cfg)) { 7364 if (ipr_set_pcix_cmd_reg(ioa_cfg)) {
7340 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); 7365 ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
7341 return IPR_RC_JOB_CONTINUE; 7366 return IPR_RC_JOB_CONTINUE;
7342 } 7367 }
7343 7368
@@ -7364,7 +7389,7 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
7364 } 7389 }
7365 } 7390 }
7366 7391
7367 ENTER; 7392 LEAVE;
7368 return IPR_RC_JOB_CONTINUE; 7393 return IPR_RC_JOB_CONTINUE;
7369} 7394}
7370 7395
@@ -7406,7 +7431,7 @@ static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd)
7406 7431
7407 if (rc != PCIBIOS_SUCCESSFUL) { 7432 if (rc != PCIBIOS_SUCCESSFUL) {
7408 pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev); 7433 pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev);
7409 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); 7434 ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
7410 rc = IPR_RC_JOB_CONTINUE; 7435 rc = IPR_RC_JOB_CONTINUE;
7411 } else { 7436 } else {
7412 ipr_cmd->job_step = ipr_reset_bist_done; 7437 ipr_cmd->job_step = ipr_reset_bist_done;
@@ -7665,7 +7690,7 @@ static void ipr_reset_ioa_job(struct ipr_cmnd *ipr_cmd)
7665 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 7690 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
7666 7691
7667 do { 7692 do {
7668 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 7693 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
7669 7694
7670 if (ioa_cfg->reset_cmd != ipr_cmd) { 7695 if (ioa_cfg->reset_cmd != ipr_cmd) {
7671 /* 7696 /*
@@ -8048,13 +8073,13 @@ static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
8048 ioarcb->u.sis64_addr_data.data_ioadl_addr = 8073 ioarcb->u.sis64_addr_data.data_ioadl_addr =
8049 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ioadl64)); 8074 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, i.ioadl64));
8050 ioarcb->u.sis64_addr_data.ioasa_host_pci_addr = 8075 ioarcb->u.sis64_addr_data.ioasa_host_pci_addr =
8051 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, ioasa)); 8076 cpu_to_be64(dma_addr + offsetof(struct ipr_cmnd, s.ioasa64));
8052 } else { 8077 } else {
8053 ioarcb->write_ioadl_addr = 8078 ioarcb->write_ioadl_addr =
8054 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, i.ioadl)); 8079 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, i.ioadl));
8055 ioarcb->read_ioadl_addr = ioarcb->write_ioadl_addr; 8080 ioarcb->read_ioadl_addr = ioarcb->write_ioadl_addr;
8056 ioarcb->ioasa_host_pci_addr = 8081 ioarcb->ioasa_host_pci_addr =
8057 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, ioasa)); 8082 cpu_to_be32(dma_addr + offsetof(struct ipr_cmnd, s.ioasa));
8058 } 8083 }
8059 ioarcb->ioasa_len = cpu_to_be16(sizeof(struct ipr_ioasa)); 8084 ioarcb->ioasa_len = cpu_to_be16(sizeof(struct ipr_ioasa));
8060 ipr_cmd->cmd_index = i; 8085 ipr_cmd->cmd_index = i;