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 144735 Details for
Bug 221328
[RHEL 5.0] qla4xxx/qla3xxx: co-existence issues during load/unload of either interface
[?]
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/qla3xxx: co-existence issues during load/unload of either interface
patch.net (text/plain), 8.61 KB, created by
David Somayajulu
on 2007-01-03 20:50:26 UTC
(
hide
)
Description:
qla4xxx/qla3xxx: co-existence issues during load/unload of either interface
Filename:
MIME Type:
Creator:
David Somayajulu
Created:
2007-01-03 20:50:26 UTC
Size:
8.61 KB
patch
obsolete
>diff -uarp linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_glbl.h >--- linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_glbl.h 2006-12-15 03:13:46.000000000 -0800 >+++ linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_glbl.h 2006-12-15 04:06:58.000000000 -0800 >@@ -10,6 +10,7 @@ > > struct iscsi_cls_conn; > >+void qla4xxx_hw_reset(struct scsi_qla_host *ha); > int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a); > int qla4xxx_conn_start(struct iscsi_cls_conn *conn); > int qla4xxx_send_tgts(struct scsi_qla_host *ha, char *ip, uint16_t port); >@@ -84,4 +85,5 @@ int qla4xxx_mailbox_command(struct scsi_ > extern int extended_error_logging; > extern int ql4xdiscoverywait; > extern int ql4xdontresethba; >+extern int ql4_mod_unload; > #endif /* _QLA4x_GBL_H */ >diff -uarp linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_init.c >--- linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_init.c 2006-12-15 03:13:46.000000000 -0800 >+++ linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_init.c 2006-12-15 04:06:46.000000000 -0800 >@@ -969,23 +969,23 @@ static int qla4xxx_start_firmware_from_f > > int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a) > { >-#define QL4_LOCK_DRVR_WAIT 300 >-#define QL4_LOCK_DRVR_SLEEP 100 >+#define QL4_LOCK_DRVR_WAIT 30 >+#define QL4_LOCK_DRVR_SLEEP 1 > > int drvr_wait = QL4_LOCK_DRVR_WAIT; > while (drvr_wait) { > if (ql4xxx_lock_drvr(a) == 0) { >- msleep(QL4_LOCK_DRVR_SLEEP); >+ ssleep(QL4_LOCK_DRVR_SLEEP); > if (drvr_wait) { > DEBUG2(printk("scsi%ld: %s: Waiting for " >- "Global Init Semaphore...n", >+ "Global Init Semaphore(%d)...\n", > a->host_no, >- __func__)); >+ __func__, drvr_wait)); > } > drvr_wait -= QL4_LOCK_DRVR_SLEEP; > } else { > DEBUG2(printk("scsi%ld: %s: Global Init Semaphore " >- "acquired.n", a->host_no, __func__)); >+ "acquired\n", a->host_no, __func__)); > return QLA_SUCCESS; > } > } >diff -uarp linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_isr.c >--- linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_isr.c 2006-12-15 03:13:02.000000000 -0800 >+++ linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_isr.c 2006-12-15 04:06:47.000000000 -0800 >@@ -685,7 +685,8 @@ irqreturn_t qla4xxx_intr_handler(int irq > &ha->reg->ctrl_status); > readl(&ha->reg->ctrl_status); > >- set_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); >+ if (!ql4_mod_unload) >+ set_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); > > break; > } else if (intr_status & INTR_PENDING) { >diff -uarp linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_os.c >--- linux-2.6.18.noarch.reset_nvram/drivers/scsi/qla4xxx/ql4_os.c 2006-12-15 03:13:46.000000000 -0800 >+++ linux-2.6.18.noarch.work/drivers/scsi/qla4xxx/ql4_os.c 2006-12-15 04:06:49.000000000 -0800 >@@ -52,6 +52,7 @@ MODULE_PARM_DESC(extended_error_logging, > "Option to enable extended error logging, " > "Default is 0 - no logging, 1 - debug logging"); > >+int ql4_mod_unload = 0; > /* > * SCSI host template entry points > */ >@@ -433,6 +434,10 @@ static int qla4xxx_queuecommand(struct s > goto qc_host_busy; > } > >+ if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)){ >+ goto qc_host_busy; >+ } >+ > spin_unlock_irq(ha->host->host_lock); > > srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd, done); >@@ -716,19 +721,14 @@ static int qla4xxx_cmd_wait(struct scsi_ > return stat; > } > >-/** >- * qla4xxx_soft_reset - performs soft reset. >- * @ha: Pointer to host adapter structure. >- **/ >-int qla4xxx_soft_reset(struct scsi_qla_host *ha) >+void qla4xxx_hw_reset(struct scsi_qla_host *ha) > { >- uint32_t max_wait_time; >- unsigned long flags = 0; >- int status = QLA_ERROR; > uint32_t ctrl_status; >+ unsigned long flags = 0; > >- spin_lock_irqsave(&ha->hardware_lock, flags); >+ DEBUG2(printk(KERN_ERR "scsi%ld: %s\n", ha->host_no, __func__)); > >+ spin_lock_irqsave(&ha->hardware_lock, flags); > /* > * If the SCSI Reset Interrupt bit is set, clear it. > * Otherwise, the Soft Reset won't work. >@@ -742,6 +742,20 @@ int qla4xxx_soft_reset(struct scsi_qla_h > readl(&ha->reg->ctrl_status); > > spin_unlock_irqrestore(&ha->hardware_lock, flags); >+} >+ >+/** >+ * qla4xxx_soft_reset - performs soft reset. >+ * @ha: Pointer to host adapter structure. >+ **/ >+int qla4xxx_soft_reset(struct scsi_qla_host *ha) >+{ >+ uint32_t max_wait_time; >+ unsigned long flags = 0; >+ int status = QLA_ERROR; >+ uint32_t ctrl_status; >+ >+ qla4xxx_hw_reset(ha); > > /* Wait until the Network Reset Intr bit is cleared */ > max_wait_time = RESET_INTR_TOV; >@@ -883,7 +897,7 @@ static int qla4xxx_recover_adapter(struc > * returns with ISP interrupts enabled. > */ > if (status == QLA_SUCCESS) { >- DEBUG2(printk("scsi%ld: %s - Performing soft reset..\n", >+ DEBUG2(printk(KERN_ERR "scsi%ld: %s - Performing soft reset..\n", > ha->host_no, __func__)); > qla4xxx_flush_active_srbs(ha); > if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) >@@ -975,13 +989,11 @@ static void qla4xxx_do_dpc(void *data) > struct scsi_qla_host *ha = (struct scsi_qla_host *) data; > struct ddb_entry *ddb_entry, *dtemp; > >- DEBUG2(printk("scsi%ld: %s: DPC handler waking up.\n", >- ha->host_no, __func__)); >- >- DEBUG2(printk("scsi%ld: %s: ha->flags = 0x%08lx\n", >- ha->host_no, __func__, ha->flags)); >- DEBUG2(printk("scsi%ld: %s: ha->dpc_flags = 0x%08lx\n", >- ha->host_no, __func__, ha->dpc_flags)); >+ DEBUG2(printk("scsi%ld: %s: DPC handler waking up." >+ "ha->flags=0x%08lx ha->dpc_flags=0x%08lx" >+ " ctrl_status=0x%08x\n", >+ ha->host_no, __func__, ha->flags, ha->dpc_flags, >+ readw(&ha->reg->ctrl_status))); > > /* Initialization not yet finished. Don't do anything yet. */ > if (!test_bit(AF_INIT_DONE, &ha->flags)) >@@ -991,43 +1003,33 @@ static void qla4xxx_do_dpc(void *data) > test_bit(DPC_RESET_HA, &ha->dpc_flags) || > test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || > test_bit(DPC_RESET_HA_DESTROY_DDB_LIST, &ha->dpc_flags)) { >- if (test_bit(DPC_RESET_HA_DESTROY_DDB_LIST, &ha->dpc_flags)) >- /* >- * dg 09/23 Never initialize ddb list >- * once we up and running >- * qla4xxx_recover_adapter(ha, >- * REBUILD_DDB_LIST); >- */ >+ if (test_bit(DPC_RESET_HA_DESTROY_DDB_LIST, &ha->dpc_flags) || >+ (test_bit(DPC_RESET_HA, &ha->dpc_flags))) > qla4xxx_recover_adapter(ha, PRESERVE_DDB_LIST); > >- if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) >- qla4xxx_recover_adapter(ha, PRESERVE_DDB_LIST); >- >- if (test_and_clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) { >+ if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) { > uint8_t wait_time = RESET_INTR_TOV; >- unsigned long flags = 0; >- >- qla4xxx_flush_active_srbs(ha); > >- spin_lock_irqsave(&ha->hardware_lock, flags); > while ((readw(&ha->reg->ctrl_status) & > (CSR_SOFT_RESET | CSR_FORCE_SOFT_RESET)) != 0) { > if (--wait_time == 0) > break; >- >- spin_unlock_irqrestore(&ha->hardware_lock, >- flags); >- > msleep(1000); >- >- spin_lock_irqsave(&ha->hardware_lock, flags); > } >- spin_unlock_irqrestore(&ha->hardware_lock, flags); > >- if (wait_time == 0) >+ if (wait_time == 0){ > DEBUG2(printk("scsi%ld: %s: SR|FSR " > "bit not cleared-- resetting\n", > ha->host_no, __func__)); >+ } >+ qla4xxx_flush_active_srbs(ha); >+ if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS){ >+ qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); >+ if (qla4xxx_initialize_adapter(ha, >+ PRESERVE_DDB_LIST) == QLA_SUCCESS) >+ qla4xxx_enable_intrs(ha); >+ } >+ clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); > } > } > >@@ -1082,7 +1084,7 @@ static void qla4xxx_free_adapter(struct > > /* Issue Soft Reset to put firmware in unknown state */ > if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) >- qla4xxx_soft_reset(ha); >+ qla4xxx_hw_reset(ha); > > /* Remove timer thread, if present */ > if (ha->timer_active) >@@ -1242,8 +1244,8 @@ static int __devinit qla4xxx_probe_adapt > */ > status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST); > while (status == QLA_ERROR && init_retry_count++ < MAX_INIT_RETRIES) { >- DEBUG2(printk("scsi: %s: retrying adapter initialization " >- "(%d)\n", __func__, init_retry_count)); >+ DEBUG2(printk(KERN_ERR "scsi%ld: %s: retrying adapter initialization " >+ "(%d)\n", ha->host_no, __func__, init_retry_count)); > qla4xxx_soft_reset(ha); > status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST); > } >@@ -1698,6 +1700,7 @@ no_srp_cache: > > static void __exit qla4xxx_module_exit(void) > { >+ ql4_mod_unload = 1; > pci_unregister_driver(&qla4xxx_pci_driver); > iscsi_unregister_transport(&qla4xxx_iscsi_transport); > kmem_cache_destroy(srb_cachep);
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 221328
:
144735
|
145271