Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 298561 Details for
Bug 438214
[QLogic 5.2 bug] qla4xxx: Fix scsi completion, lun reset code
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
qla4xxx: Fix scsi completion, lun reset code
patch (text/plain), 7.12 KB, created by
David Somayajulu
on 2008-03-19 18:18:27 UTC
(
hide
)
Description:
qla4xxx: Fix scsi completion, lun reset code
Filename:
MIME Type:
Creator:
David Somayajulu
Created:
2008-03-19 18:18:27 UTC
Size:
7.12 KB
patch
obsolete
>diff -uarp linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_glbl.h >--- linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_glbl.h 2008-03-12 12:27:33.000000000 -0700 >+++ linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_glbl.h 2008-03-17 10:30:42.000000000 -0700 >@@ -80,6 +80,9 @@ int qla4xxx_process_ddb_changed(struct s > void qla4xxx_free_pdu(struct scsi_qla_host * ha, struct pdu_entry * pdu); > int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, > uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts); >+int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, >+ struct ddb_entry *ddb_entry, int lun); >+ > > > extern int extended_error_logging; >diff -uarp linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_iocb.c >--- linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_iocb.c 2008-03-12 12:27:33.000000000 -0700 >+++ linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_iocb.c 2008-03-17 10:28:10.000000000 -0700 >@@ -352,14 +352,6 @@ int qla4xxx_send_command_to_isp(struct s > /* Get real lun and adapter */ > ddb_entry = srb->ddb; > >- /* Send marker(s) if needed. */ >- if (ha->marker_needed == 1) { >- if (qla4xxx_send_marker_iocb(ha, ddb_entry, >- cmd->device->lun) != QLA_SUCCESS) >- return QLA_ERROR; >- >- ha->marker_needed = 0; >- } > tot_dsds = 0; > > /* Acquire hardware specific lock */ >diff -uarp linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_isr.c >--- linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_isr.c 2008-03-12 12:27:33.000000000 -0700 >+++ linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_isr.c 2008-03-12 16:26:50.000000000 -0700 >@@ -12,28 +12,6 @@ > #include "ql4_inline.h" > > /** >- * qla2x00_process_completed_request() - Process a Fast Post response. >- * @ha: SCSI driver HA context >- * @index: SRB index >- **/ >-static void qla4xxx_process_completed_request(struct scsi_qla_host *ha, >- uint32_t index) >-{ >- struct srb *srb; >- >- srb = qla4xxx_del_from_active_array(ha, index); >- if (srb) { >- /* Save ISP completion status */ >- srb->cmd->result = DID_OK << 16; >- qla4xxx_srb_compl(ha, srb); >- } else { >- DEBUG2(printk("scsi%ld: Invalid ISP SCSI completion handle = " >- "%d\n", ha->host_no, index)); >- set_bit(DPC_RESET_HA, &ha->dpc_flags); >- } >-} >- >-/** > * qla4xxx_status_entry - processes status IOCBs > * @ha: Pointer to host adapter structure. > * @sts_entry: Pointer to status entry structure. >@@ -48,31 +26,19 @@ static void qla4xxx_status_entry(struct > uint32_t residual; > uint16_t sensebytecnt; > >- if (sts_entry->completionStatus == SCS_COMPLETE && >- sts_entry->scsiStatus == 0) { >- qla4xxx_process_completed_request(ha, >- le32_to_cpu(sts_entry-> >- handle)); >- return; >- } >- > srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); > if (!srb) { >- /* FIXMEdg: Don't we need to reset ISP in this case??? */ >- DEBUG2(printk(KERN_WARNING "scsi%ld: %s: Status Entry invalid " >- "handle 0x%x, sp=%p. This cmd may have already " >- "been completed.\n", ha->host_no, __func__, >- le32_to_cpu(sts_entry->handle), srb)); >+ dev_warn(&ha->pdev->dev, "%s invalid status entry:" >+ " handle=0x%0x\n", __func__, sts_entry->handle); >+ set_bit(DPC_RESET_HA, &ha->dpc_flags); >+ return; > } > > cmd = srb->cmd; > if (cmd == NULL) { >- DEBUG2(printk("scsi%ld: %s: Command already returned back to " >- "OS pkt->handle=%d srb=%p srb->state:%d\n", >- ha->host_no, __func__, sts_entry->handle, >- srb, srb->state)); >- dev_warn(&ha->pdev->dev, "Command is NULL:" >- " already returned to OS (srb=%p)\n", srb); >+ dev_warn(&ha->pdev->dev, "%s Command is NULL: srb=%p" >+ " sts_handle=0x%0x srb_state=0x%0x\n", __func__, >+ srb, sts_entry->handle, srb->state); > return; > } > >@@ -88,11 +54,6 @@ static void qla4xxx_status_entry(struct > scsi_status = sts_entry->scsiStatus; > switch (sts_entry->completionStatus) { > case SCS_COMPLETE: >- if (scsi_status == 0) { >- cmd->result = DID_OK << 16; >- break; >- } >- > if (sts_entry->iscsiFlags & ISCSI_FLAG_RESIDUAL_OVER) { > cmd->result = DID_ERROR << 16; > break; >@@ -433,7 +394,6 @@ static void qla4xxx_isr_decode_mailbox(s > readl(&ha->reg->mailbox[i]); > > set_bit(AF_MBOX_COMMAND_DONE, &ha->flags); >- wake_up(&ha->mailbox_wait_queue); > } > } else if (mbox_status >> 12 == MBOX_ASYNC_EVENT_STATUS) { > /* Immediately process the AENs that don't require much work. >diff -uarp linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_mbx.c >--- linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_mbx.c 2008-03-12 12:27:33.000000000 -0700 >+++ linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_mbx.c 2008-03-12 16:29:33.000000000 -0700 >@@ -33,7 +33,6 @@ int qla4xxx_mailbox_command(struct scsi_ > u_long wait_count; > uint32_t intr_status; > unsigned long flags = 0; >- DECLARE_WAITQUEUE(wait, current); > > /* Make sure that pointers are valid */ > if (!mbx_cmd || !mbx_sts) { >@@ -90,10 +89,6 @@ int qla4xxx_mailbox_command(struct scsi_ > readl(&ha->reg->ctrl_status); > spin_unlock_irqrestore(&ha->hardware_lock, flags); > >- /* Wait for completion */ >- set_current_state(TASK_UNINTERRUPTIBLE); >- add_wait_queue(&ha->mailbox_wait_queue, &wait); >- > /* > * If we don't want status, don't wait for the mailbox command to > * complete. For example, MBOX_CMD_RESET_FW doesn't return status, >@@ -101,10 +96,10 @@ int qla4xxx_mailbox_command(struct scsi_ > */ > if (outCount == 0) { > status = QLA_SUCCESS; >- set_current_state(TASK_RUNNING); >- remove_wait_queue(&ha->mailbox_wait_queue, &wait); > goto mbox_exit; > } >+ /* Wait for completion */ >+ set_current_state(TASK_UNINTERRUPTIBLE); > /* Wait for command to complete */ > wait_count = jiffies + MBOX_TOV * HZ; > while (test_bit(AF_MBOX_COMMAND_DONE, &ha->flags) == 0) { >@@ -127,7 +122,6 @@ int qla4xxx_mailbox_command(struct scsi_ > msleep(10); > } > set_current_state(TASK_RUNNING); >- remove_wait_queue(&ha->mailbox_wait_queue, &wait); > > /* Check for mailbox timeout. */ > if (!test_bit(AF_MBOX_COMMAND_DONE, &ha->flags)) { >diff -uarp linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_os.c >--- linux-2.6.18-84.el5/drivers/scsi/qla4xxx/ql4_os.c 2008-03-12 12:27:33.000000000 -0700 >+++ linux-2.6.18-84.el5.new/drivers/scsi/qla4xxx/ql4_os.c 2008-03-17 10:27:16.000000000 -0700 >@@ -1235,7 +1235,6 @@ static int __devinit qla4xxx_probe_adapt > INIT_LIST_HEAD(&ha->free_srb_q); > > mutex_init(&ha->mbox_sem); >- init_waitqueue_head(&ha->mailbox_wait_queue); > > spin_lock_init(&ha->hardware_lock); > spin_lock_init(&ha->list_lock); >@@ -1579,9 +1578,6 @@ static int qla4xxx_eh_device_reset(struc > goto eh_dev_reset_done; > } > >- /* Send marker. */ >- ha->marker_needed = 1; >- > /* > * If we are coming down the EH path, wait for all commands to complete > * for the device. >@@ -1597,6 +1593,9 @@ static int qla4xxx_eh_device_reset(struc > goto eh_dev_reset_done; > } > } >+ if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun) >+ != QLA_SUCCESS) >+ goto eh_dev_reset_done; > > dev_info(&ha->pdev->dev, > "scsi(%ld:%d:%d:%d): DEVICE RESET SUCCEEDED.\n",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 438214
: 298561