Use msleep() rather than schedule_timeout().
Subsystems (2)
PATCH 1/11 Use msleep() rather than schedule_timeout().
For process-context sleeping.
---
drivers/scsi/qla4xxx/ql4_def.h | 1 + drivers/scsi/qla4xxx/ql4_fw.h | 3 +-- drivers/scsi/qla4xxx/ql4_init.c | 15 ++++----------- drivers/scsi/qla4xxx/ql4_mbx.c | 18 ++---------------- drivers/scsi/qla4xxx/ql4_nvram.c | 3 +-- drivers/scsi/qla4xxx/ql4_os.c | 23 +++++++---------------- 6 files changed, 16 insertions(+), 47 deletions(-)
a6d44211b9f2687a1114d02e7cce15e63ae4b6d3
drivers/scsi/qla4xxx/ql4_def.h +1 -0
@@ -21,6 +21,7 @@#include <linux/mempool.h> #include <linux/spinlock.h> #include <linux/kthread.h> +#include <linux/delay.h> #include <asm/semaphore.h> #include <scsi/scsi.h>
drivers/scsi/qla4xxx/ql4_fw.h +1 -2
@@ -380,8 +380,7 @@ typedef struct isp_reg_t {int i =0 ; \while (1 ) { \if (QL4XXX_LOCK_DRVR (a) ==0 ) { \ -set_current_state (TASK_UNINTERRUPTIBLE ); \ -schedule_timeout (10 ); \ +msleep (10 ); \if (!i) { \ DEBUG2(printk("scsi%ld: %s: Waiting for " \ "Global Init Semaphore...n", a->host_no, \
drivers/scsi/qla4xxx/ql4_init.c +4 -11
@@ -317,8 +317,7 @@ qla4xxx_fw_ready(scsi_qla_host_t * ha)DEBUG2 (printk ("scsi%ld: %s: waiting on fw, state=%x:%x - " "seconds expired= %d\n" , ha->host_no, __func__, ha->firmware_state, ha->addl_fw_state, timeout_count)); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 ); }/* end of for */ if (timeout_count <=0 )
@@ -760,9 +759,7 @@ qla4xxx_devices_ready(scsi_qla_host_t *return QLA_SUCCESS ; } -/* delay */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ *2 ); +msleep (2000 ); }while (!time_after_eq (jiffies, discovery_wtime));DEBUG3 (qla4xxx_get_conn_event_log (ha));
@@ -791,10 +788,7 @@ qla4xxx_flush_AENS(scsi_qla_host_t *ha)if (test_and_clear_bit (DPC_AEN , &ha->dpc_flags))qla4xxx_process_aen (ha,FLUSH_DDB_CHANGED_AENS ); -/* delay */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ *1 ); - +msleep (1000 ); }while (!time_after_eq (jiffies, wtime)); }
@@ -1057,8 +1051,7 @@ qla4xxx_start_firmware_from_flash(scsi_q"complete... ctrl_sts=0x%x, remaining=%d\n" , ha->host_no, __func__, ctrl_status, max_wait_time)); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /4 ); +msleep (250 ); }while ((max_wait_time--));if (mbox_status ==MBOX_STS_COMMAND_COMPLETE ) {
drivers/scsi/qla4xxx/ql4_mbx.c +2 -16
@@ -95,7 +95,6 @@ qla4xxx_mailbox_command(scsi_qla_host_tspin_unlock_irqrestore (&ha->hardware_lock, flags);/* Wait for completion */ -set_current_state (TASK_UNINTERRUPTIBLE );add_wait_queue (&ha->mailbox_wait_queue, &wait);/*
@@ -105,7 +104,6 @@ qla4xxx_mailbox_command(scsi_qla_host_t*/ if (outCount ==0 ) { status =QLA_SUCCESS ; -set_current_state (TASK_RUNNING );remove_wait_queue (&ha->mailbox_wait_queue, &wait); goto mbox_exit; }
@@ -130,20 +128,8 @@ qla4xxx_mailbox_command(scsi_qla_host_t }spin_unlock_irqrestore (&ha->hardware_lock, flags); -/* -* Delay for 10 microseconds -* NOTE: Interrupt_handler may be called here, -* if interrupts are enabled -*/ -#if 0 -udelay (10 ); - -#else /* */ -schedule_timeout (10 ); - -#endif /* */ - }/* wait loop */ -set_current_state (TASK_RUNNING ); +mdelay (10 ); + }remove_wait_queue (&ha->mailbox_wait_queue, &wait);/* Check for mailbox timeout. */
drivers/scsi/qla4xxx/ql4_nvram.c +1 -2
@@ -181,8 +181,7 @@ ql4xxx_sem_spinlock(scsi_qla_host_t * ha "code = 0x%x\n", ha->host_no, sem_mask, sem_bits));break ; } -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (10 ); +msleep (100 ); }return 1 ; }
drivers/scsi/qla4xxx/ql4_os.c +7 -16
@@ -1078,9 +1078,7 @@ static int qla4xxx_do_dpc(void *data)spin_unlock_irqrestore ( &ha->hardware_lock, flags); -set_current_state ( -TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 );spin_lock_irqsave ( &ha->hardware_lock, flags);
@@ -1188,8 +1186,7 @@ qla4010_soft_reset(scsi_qla_host_t * ha)if ((ctrl_status &CSR_NET_RESET_INTR ) ==0 )break ; -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 ); }while ((--max_wait_time));if ((ctrl_status &CSR_NET_RESET_INTR ) !=0 ) {
@@ -1215,8 +1212,7 @@ qla4010_soft_reset(scsi_qla_host_t * ha)break ; } -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 ); }while ((--max_wait_time));/*
@@ -1257,8 +1253,7 @@ qla4010_soft_reset(scsi_qla_host_t * ha)break ; } -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 ); }while ((--max_wait_time)); }
@@ -1421,9 +1416,7 @@ qla4xxx_cmd_wait(scsi_qla_host_t * ha)if (wait_cnt ==0 ) stat =QLA_ERROR ;else { -/* sleep a second */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 *HZ ); +msleep (1000 ); } }/* End of While (wait_cnt) */
@@ -1585,8 +1578,7 @@ qla4xxx_eh_wait_on_command(scsi_qla_hostbreak ; } -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 ); }while (max_wait_time--);return done;
@@ -1620,8 +1612,7 @@ int qla4xxx_wait_for_hba_online(scsi_qlaif (!ADAPTER_UP (ha) && (ha->retry_reset_ha_cnt ==0 )) {return QLA_ERROR ; } -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 ); }return QLA_ERROR ;
Signature · 1 line
1.2.4.g9201-dirty
PATCH 2/11 Drop IPAddr*() functions.
---
drivers/scsi/qla4xxx/ql4_def.h | 14 -------------- drivers/scsi/qla4xxx/ql4_init.c | 3 ++- 2 files changed, 2 insertions(+), 15 deletions(-)
a94b5548a92d8f6feae73f15f631a74aeed8ba2c
drivers/scsi/qla4xxx/ql4_def.h +0 -14
@@ -84,20 +84,6 @@#define BIT_30 0x40000000#define BIT_31 0x80000000 -#define IPAddrIsZero ( _X1_ ) ((_X1_)[0] == 0 && \ - (_X1_)[1] == 0 && \ - (_X1_)[2] == 0 && \ - (_X1_)[3] == 0) -#define IPAddrIsEqual (_X1_, _X2_) ((_X1_)[0] == (_X2_)[0] && \ - (_X1_)[1] == (_X2_)[1] && \ - (_X1_)[2] == (_X2_)[2] && \ - (_X1_)[3] == (_X2_)[3]) -#define IPAddr2Uint32 (_X1_,_X2_) { \ - *_X2_ = 0; \ - *_X2_ |= _X1_[3] << 24; \ - *_X2_ |= _X1_[2] << 16; \ - *_X2_ |= _X1_[1] << 8; \ - *_X2_ |= _X1_[0];}/* * Host adapter default definitions ***********************************/
drivers/scsi/qla4xxx/ql4_init.c +2 -1
@@ -1250,7 +1250,8 @@ qla4xxx_initialize_adapter(scsi_qla_hostreturn status;/* Skip device discovery if ip and subnet is zero */ -if (IPAddrIsZero (ha->ip_address) ||IPAddrIsZero (ha->subnet_mask)) +if (memcmp (ha->ip_address,0 ,IP_ADDR_LEN ) || +memcmp (ha->subnet_mask,0 ,IP_ADDR_LEN ))return status;if (renew_ddb_list ==PRESERVE_DDB_LIST ) {
Signature · 1 line
1.2.4.g9201-dirty
PATCH 3/11 Drop unused defines.
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_def.h | 3 --- drivers/scsi/qla4xxx/ql4_fw.h | 25 ------------------------- 2 files changed, 0 insertions(+), 28 deletions(-)
06f6483e4c0aed769faa93648ae667291c51ffd9
drivers/scsi/qla4xxx/ql4_def.h +0 -3
@@ -42,9 +42,6 @@#define IS_QLA4010 (ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010)#define IS_QLA4022 (ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4022) -#define QLA4010 -#define QLA4XXX_BOARD_PORTS 1 -#define QLA4XXX_PROC_NAME "qla4010"#define QLA_SUCCESS 0#define QLA_ERROR 1
drivers/scsi/qla4xxx/ql4_fw.h +0 -25
@@ -4,38 +4,13 @@* * See LICENSE.qla4xxx for copyright and licensing details. */ -#ifndef _QLA4X_FW_H#define _QLA4X_FW_H -#ifndef uint64_t -#define uint64_t __u64 -#endif - -#define QLA4XXX_VENDOR_ID 0x1077 -#define QLA4000_DEVICE_ID 0x4000 -#define QLA4010_DEVICE_ID 0x4010 - -#define QLA4040_SSDID_NIC 0x011D/* Uses QLA4010 PCI Device ID */ -#define QLA4040_SSDID_ISCSI 0x011E -#define QLA4040C_SSDID_NIC 0x011F -#define QLA4040C_SSDID_ISCSI 0x0120 -#define MAX_PRST_DEV_DB_ENTRIES 64#define MIN_DISC_DEV_DB_ENTRY MAX_PRST_DEV_DB_ENTRIES#define MAX_DEV_DB_ENTRIES 512 -// ISP Maximum number of DSD per command -#define DSD_MAX 1024 - -// FW check -#define FW_UP (reg,stat) (((stat = RD_REG_DWORD(reg->mailbox[0])) != 0) && (stat != 0x0007)) - -#define INVALID_REGISTER ((uint32_t)-1) - -#define ISP4010_NET_FUNCTION 0 -#define ISP4010_ISCSI_FUNCTION 1 -/************************************************************************* * * ISP 4010 I/O Register Set Structure and Definitions
Signature · 1 line
1.2.4.g9201-dirty
PATCH 4/11 Consolidate #include definitions.
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_def.h | 2 ++ drivers/scsi/qla4xxx/ql4_glbl.h | 2 -- drivers/scsi/qla4xxx/ql4_init.c | 2 -- drivers/scsi/qla4xxx/ql4_mbx.c | 2 -- drivers/scsi/qla4xxx/ql4_os.c | 4 ---- 5 files changed, 2 insertions(+), 10 deletions(-)
41d009988af1d11ab61a9e3c9e828baf735becc8
drivers/scsi/qla4xxx/ql4_def.h +2 -0
@@ -22,12 +22,14 @@#include <linux/spinlock.h> #include <linux/kthread.h> #include <linux/delay.h> +#include <linux/interrupt.h> #include <asm/semaphore.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h> #include <scsi/scsi_device.h> #include <scsi/scsi_cmnd.h> +#include <scsi/scsi_transport.h> #include <scsi/scsi_transport_iscsi.h> /* XXX(dg): move to pci_ids.h */
drivers/scsi/qla4xxx/ql4_glbl.h +0 -2
@@ -8,8 +8,6 @@#ifndef __QLA4x_GBL_H#define __QLA4x_GBL_H -#include <linux/interrupt.h> -/* * Defined in ql4_os.c */
drivers/scsi/qla4xxx/ql4_init.c +0 -2
@@ -7,8 +7,6 @@#include "ql4_def.h" -#include <linux/delay.h> -/* * QLogic ISP4xxx Hardware Support Function Prototypes. */
drivers/scsi/qla4xxx/ql4_mbx.c +0 -2
@@ -7,8 +7,6 @@#include "ql4_def.h" -#include <linux/delay.h> -/* * externals */
drivers/scsi/qla4xxx/ql4_os.c +0 -4
@@ -7,14 +7,10 @@#include "ql4_def.h" -#include <linux/delay.h> -#include <linux/vmalloc.h> #include <linux/moduleparam.h> #include <scsi/scsi_tcq.h> #include <scsi/scsicam.h> -#include <scsi/scsi_transport.h> -#include <scsi/scsi_transport_iscsi.h> /* * Driver version
Signature · 1 line
1.2.4.g9201-dirty
PATCH 5/11 Correct allocations of ddb_entry.
In reply to [email protected]As qla4xxx_alloc_ddb() is called from process-context.
---
drivers/scsi/qla4xxx/ql4_init.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
1a707252f20e748a8a4fc151405c71c0259794c0
drivers/scsi/qla4xxx/ql4_init.c +1 -1
@@ -527,7 +527,7 @@ qla4xxx_alloc_ddb(scsi_qla_host_t * ha,DEBUG2 (printk ("scsi%ld: %s: fw_ddb_index [%d]\n" , ha->host_no, __func__, fw_ddb_index)); - ddb_entry = (struct ddb_entry *)kmalloc (sizeof (*ddb_entry),GFP_ATOMIC ); + ddb_entry = (struct ddb_entry *)kmalloc (sizeof (*ddb_entry),GFP_KERNEL );if (ddb_entry ==NULL ) { DEBUG2(printk("scsi%ld: %s: Unable to allocate memory " "to add fw_ddb_index [%d]\n", ha->host_no, __func__,
Signature · 1 line
1.2.4.g9201-dirty
PATCH 6/11 Change semaphore usage to mutex.
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_def.h | 6 +++--- drivers/scsi/qla4xxx/ql4_mbx.c | 4 ++-- drivers/scsi/qla4xxx/ql4_os.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
d31fabeaf8cc7ba8b9448cbe0d8db464fe04af05
drivers/scsi/qla4xxx/ql4_def.h +3 -3
@@ -23,7 +23,7 @@#include <linux/kthread.h> #include <linux/delay.h> #include <linux/interrupt.h> -#include <asm/semaphore.h> +#include <linux/mutex.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h>
@@ -497,10 +497,10 @@ typedef struct scsi_qla_host {PDU_ENTRY *free_pdu_bottom;PDU_ENTRY pdu_queue[MAX_PDU_ENTRIES ]; -/* This semaphore protects several threads to do mailbox commands +/* This mutex protects several threads to do mailbox commands * concurrently. */ -struct semaphore mbox_sem; +struct mutex mbox_sem;wait_queue_head_t mailbox_wait_queue;/* temporary mailbox status registers */
drivers/scsi/qla4xxx/ql4_mbx.c +2 -2
@@ -51,7 +51,7 @@ qla4xxx_mailbox_command(scsi_qla_host_tunsigned long flags =0 ;DECLARE_WAITQUEUE (wait, current); -down (&ha->mbox_sem); +mutex_lock (&ha->mbox_sem);/* Mailbox code active */ set_bit (AF_MBOX_COMMAND , &ha->flags);
@@ -175,7 +175,7 @@ qla4xxx_mailbox_command(scsi_qla_host_t mbox_exit:clear_bit (AF_MBOX_COMMAND , &ha->flags);clear_bit (AF_MBOX_COMMAND_DONE , &ha->flags); -up (&ha->mbox_sem); +mutex_unlock (&ha->mbox_sem);return status; }
drivers/scsi/qla4xxx/ql4_os.c +1 -1
@@ -358,7 +358,7 @@ qla4xxx_probe_adapter(struct pci_dev *pdINIT_LIST_HEAD (&ha->ddb_list);INIT_LIST_HEAD (&ha->free_srb_q); -init_MUTEX (&ha->mbox_sem); +mutex_init (&ha->mbox_sem);init_waitqueue_head (&ha->mailbox_wait_queue);spin_lock_init (&ha->hardware_lock);
Signature · 1 line
1.2.4.g9201-dirty
PATCH 7/11 Fixed logic to skip device discovery if IP Addr and Subnet Mask is Zero.
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_init.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
54a41b8be941564bb4fd2dd3bb8551cca7d79ee6
drivers/scsi/qla4xxx/ql4_init.c +3 -2
@@ -1218,6 +1218,7 @@ int qla4xxx_initialize_adapter(scsi_qla_host_t * ha, uint8_t renew_ddb_list) {int status =QLA_ERROR ; +int8_t ip_address[IP_ADDR_LEN ] = {0 } ; ha->eeprom_cmd_data =0 ;
@@ -1248,8 +1249,8 @@ qla4xxx_initialize_adapter(scsi_qla_hostreturn status;/* Skip device discovery if ip and subnet is zero */ -if (memcmp (ha->ip_address,0 ,IP_ADDR_LEN ) || -memcmp (ha->subnet_mask,0 ,IP_ADDR_LEN )) +if (memcmp (ha->ip_address, ip_address,IP_ADDR_LEN ) ==0 || +memcmp (ha->subnet_mask, ip_address,IP_ADDR_LEN ) ==0 )return status;if (renew_ddb_list ==PRESERVE_DDB_LIST ) {
Signature · 1 line
1.2.4.g9201-dirty
PATCH 8/11 Updated Comment at the head of the func's
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_init.c | 57 ---------------------------- drivers/scsi/qla4xxx/ql4_inline.h | 3 - drivers/scsi/qla4xxx/ql4_iocb.c | 12 ------ drivers/scsi/qla4xxx/ql4_isr.c | 3 - drivers/scsi/qla4xxx/ql4_mbx.c | 36 ------------------ drivers/scsi/qla4xxx/ql4_os.c | 75 ------------------------------------- 6 files changed, 0 insertions(+), 186 deletions(-)
dc84ce7aef7791a98b973bc98156d2830052f46d
drivers/scsi/qla4xxx/ql4_init.c +0 -57
@@ -52,9 +52,6 @@ ql4xxx_set_mac_number(scsi_qla_host_t ** * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ void qla4xxx_free_ddb (scsi_qla_host_t * ha,struct ddb_entry *ddb_entry)
@@ -81,9 +78,6 @@ qla4xxx_free_ddb(scsi_qla_host_t * ha, s* * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ void qla4xxx_free_ddb_list (scsi_qla_host_t * ha)
@@ -114,9 +108,6 @@ qla4xxx_free_ddb_list(scsi_qla_host_t ** The QLA4000 doesn't care, so just default to QLA4010's requirement. * Returns: * QLA_SUCCESS - Always return success. -* -* Context: -* Kernel context. */ int qla4xxx_init_rings (scsi_qla_host_t * ha)
@@ -171,9 +162,6 @@ qla4xxx_init_rings(scsi_qla_host_t * ha)* Returns: * QLA_SUCCESS - Successfully validated M.A.C. address * QLA_ERROR - Failed to validate M.A.C. address -* -* Context: -* Kernel context. **************************************************************************/ static int qla4xxx_validate_mac_address (scsi_qla_host_t *ha)
@@ -227,9 +215,6 @@ exit_validate_mac_no_free:* Returns: * QLA_SUCCESS - Successfully initialized local data * QLA_ERROR - Failed to initialize local data -* -* Context: -* Kernel context. */ static int qla4xxx_init_local_data (scsi_qla_host_t *ha)
@@ -342,9 +327,6 @@ qla4xxx_fw_ready(scsi_qla_host_t * ha)* Returns: * QLA_SUCCESS - Successfully initialized firmware * QLA_ERROR - Failed to initialize firmware -* -* Context: -* Kernel context. */ static int qla4xxx_init_firmware (scsi_qla_host_t * ha)
@@ -434,9 +416,6 @@ qla4xxx_get_ddb_entry(scsi_qla_host_t *h* Returns: * QLA_SUCCESS - Successfully update ddb_entry * QLA_ERROR - Failed to update ddb_entry -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_update_ddb_entry(scsi_qla_host_t * ha, struct ddb_entry *ddb_entry,
@@ -515,9 +494,6 @@ exit_update_ddb:* * Returns: * Pointer to internal device database structure -* -* Context: -* Kernel context. **************************************************************************/ struct ddb_entry *qla4xxx_alloc_ddb (scsi_qla_host_t * ha,uint32_t fw_ddb_index)
@@ -564,9 +540,6 @@ qla4xxx_alloc_ddb(scsi_qla_host_t * ha,* Returns: * QLA_SUCCESS - Successfully built internal ddb list, if targets available * QLA_ERROR - Error on a mailbox command -* -* Context: -* Kernel context. **************************************************************************/ static int qla4xxx_build_ddb_list (scsi_qla_host_t *ha)
@@ -663,9 +636,6 @@ qla4xxx_build_ddb_list(scsi_qla_host_t ** Returns: * QLA_SUCCESS - Successfully (re)built internal ddb list * QLA_ERROR - Failed to (re)build internal ddb list -* -* Context: -* Kernel context. **************************************************************************/ static int qla4xxx_devices_ready (scsi_qla_host_t * ha)
@@ -841,9 +811,6 @@ qla4xxx_initialize_ddb_list(scsi_qla_hos* Returns: * QLA_SUCCESS - Successfully updated internal ddb list * QLA_ERROR - Failed to update internal ddb list -* -* Context: -* Kernel context. */ int qla4xxx_reinitialize_ddb_list (scsi_qla_host_t * ha)
@@ -878,9 +845,6 @@ qla4xxx_reinitialize_ddb_list(scsi_qla_h* Returns: * QLA_SUCCESS = Successfully relogged in device * QLA_ERROR = Failed to relogin device -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_relogin_device (scsi_qla_host_t * ha,struct ddb_entry * ddb_entry)
@@ -908,9 +872,6 @@ qla4xxx_relogin_device(scsi_qla_host_t ** * Returns: * None. -* -* Context: -* Kernel context. **************************************************************************/ static void qla4010_get_topcat_presence (scsi_qla_host_t * ha)
@@ -1083,9 +1044,6 @@ qla4xxx_start_firmware_from_flash(scsi_q* Returns: * QLA_SUCCESS - Successfully started QLA4xxx firmware * QLA_ERROR - Failed to start QLA4xxx firmware -* -* Context: -* Kernel context. **************************************************************************/ static int qla4xxx_start_firmware (scsi_qla_host_t * ha)
@@ -1210,9 +1168,6 @@ qla4xxx_start_firmware(scsi_qla_host_t ** Returns: * QLA_SUCCESS - Successfully initialized adapter * QLA_ERROR - Failed to initialize adapter -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_initialize_adapter (scsi_qla_host_t * ha,uint8_t renew_ddb_list)
@@ -1294,9 +1249,6 @@ exit_init_hba:* * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ static void qla4xxx_add_device_dynamically (scsi_qla_host_t *ha,uint32_t fw_ddb_index)
@@ -1338,9 +1290,6 @@ qla4xxx_add_device_dynamically(scsi_qla_* Returns: * QLA_SUCCESS - Successfully processed ddb_changed aen * QLA_ERROR - Failed to process ddb_changed aen -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_process_ddb_changed(scsi_qla_host_t * ha, uint32_t fw_ddb_index,
@@ -1436,9 +1385,6 @@ qla4xxx_process_ddb_changed(scsi_qla_hos* Returns: * QLA_SUCCESS - Successfully logged in device * QLA_ERROR - Failed to login device -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_login_device(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
@@ -1483,9 +1429,6 @@ exit_login_device:* Returns: * QLA_SUCCESS - Successfully logged out device * QLA_ERROR - Failed to logout device -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_logout_device(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
drivers/scsi/qla4xxx/ql4_inline.h +0 -3
@@ -17,9 +17,6 @@* * Returns: * Pointer to the corresponding internal device database structure -* -* Context: -* Kernel context. */ static inline ddb_entry_t *qla4xxx_lookup_ddb_by_fw_index (scsi_qla_host_t *ha,uint32_t fw_ddb_index)
drivers/scsi/qla4xxx/ql4_iocb.c +0 -12
@@ -26,9 +26,6 @@* Returns: * QLA_SUCCESS - Successfully retrieved request packet * QLA_ERROR - Failed to retrieve request packet -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_req_pkt (scsi_qla_host_t *ha,QUEUE_ENTRY **queue_entry)
@@ -77,9 +74,6 @@ qla4xxx_get_req_pkt(scsi_qla_host_t *ha,* Returns: * QLA_SUCCESS - Successfully sent marker IOCB * QLA_ERROR - Failed to send marker IOCB -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_send_marker_iocb (scsi_qla_host_t *ha,ddb_entry_t *ddb_entry,int lun)
@@ -194,9 +188,6 @@ qla4xxx_free_pdu(scsi_qla_host_t * ha, P* Returns: * QLA_SUCCESS - Successfully sent marker IOCB * QLA_ERROR - Failed to send marker IOCB -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_send_passthru0_iocb(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
@@ -359,9 +350,6 @@ qla4xxx_build_scsi_iocbs(srb_t *srb, COM* Returns: * QLA_SUCCESS - Successfully sent command to ISP * QLA_ERROR - Failed to send command to ISP -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_send_command_to_isp (scsi_qla_host_t *ha,srb_t * srb)
drivers/scsi/qla4xxx/ql4_isr.c +0 -3
@@ -745,9 +745,6 @@ qla4xxx_intr_handler(int irq, void *dev_* * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ void qla4xxx_process_aen (scsi_qla_host_t * ha,uint8_t process_aen)
drivers/scsi/qla4xxx/ql4_mbx.c +0 -36
@@ -36,9 +36,6 @@ extern int qla4xxx_eh_wait_for_active_ta* Returns: * QLA_SUCCESS - Mailbox command completed successfully * QLA_ERROR - Mailbox command competed in error. -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_mailbox_command(scsi_qla_host_t * ha, uint8_t inCount,
@@ -248,9 +245,6 @@ int qla4xxx_mbx_test(scsi_qla_host_t * h* * Returns: * qla2x00 local function return status code. -* -* Context: -* Kernel context. */ int qla4xxx_issue_iocb(scsi_qla_host_t * ha, void *buffer, dma_addr_t phys_addr,
@@ -323,9 +317,6 @@ qla4xxx_clear_database_entry(scsi_qla_ho* Returns: * QLA_SUCCESS - Successfully initialized firmware ctrl block * QLA_ERROR - Failed to initialize firmware ctrl block -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_initialize_fw_cb (scsi_qla_host_t * ha)
@@ -431,9 +422,6 @@ qla4xxx_initialize_fw_cb(scsi_qla_host_t* Returns: * QLA_SUCCESS - Successfully obtained DHCP IP Address * QLA_ERROR - Failed to obtained -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_dhcp_ip_address (scsi_qla_host_t * ha)
@@ -492,9 +480,6 @@ qla4xxx_get_dhcp_ip_address(scsi_qla_hos* Returns: * QLA_SUCCESS - Successfully retrieved firmware state * QLA_ERROR - Failed to retrieve firmware state -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_firmware_state (scsi_qla_host_t * ha)
@@ -531,9 +516,6 @@ qla4xxx_get_firmware_state(scsi_qla_host* Returns: * QLA_SUCCESS - Successfully retrieved firmware status * QLA_ERROR - Failed to retrieve firmware status -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_firmware_status (scsi_qla_host_t * ha)
@@ -585,9 +567,6 @@ qla4xxx_get_firmware_status(scsi_qla_hos* Returns: * QLA_SUCCESS - Successfully retrieved ddb info from firmware * QLA_ERROR - Failed to retrieve ddb info from firmware -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_fwddb_entry(scsi_qla_host_t *ha, uint16_t fw_ddb_index,
@@ -682,9 +661,6 @@ exit_get_fwddb:* Returns: * QLA_SUCCESS - Successfully set ddb_entry in firmware * QLA_ERROR - Failed to set ddb_entry in firmware -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_set_ddb_entry(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
@@ -741,9 +717,6 @@ qla4xxx_conn_open_session_login(scsi_qla* * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ void qla4xxx_get_crash_record (scsi_qla_host_t * ha)
@@ -803,9 +776,6 @@ exit_get_crash_record:* * Returns: * None -* -* Context: -* Kernel context. **************************************************************************/ void qla4xxx_get_conn_event_log (scsi_qla_host_t * ha)
@@ -908,9 +878,6 @@ exit_get_event_log:* Returns: * QLA_SUCCESS - lun reset completed successfully * QLA_ERROR - lun reset failed -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_reset_lun (scsi_qla_host_t * ha,ddb_entry_t * ddb_entry,int lun)
@@ -982,9 +949,6 @@ qla4xxx_get_flash(scsi_qla_host_t * ha,* Returns: * QLA_SUCCESS - Successfully retrieved firmware version * QLA_ERROR - Failed to retrieve firmware version -* -* Context: -* Kernel context. **************************************************************************/ int qla4xxx_get_fw_version (scsi_qla_host_t * ha)
drivers/scsi/qla4xxx/ql4_os.c +0 -75
231 lines not on this page · raw message
Signature · 1 line
1.2.4.g9201-dirty
PATCH 9/11 Drop Unused Code
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_mbx.c | 53 ------------------- drivers/scsi/qla4xxx/ql4_os.c | 98 +++++++++++++++-------------------- drivers/scsi/qla4xxx/ql4_settings.h | 1 3 files changed, 42 insertions(+), 110 deletions(-)
729bb4a63a6272bda7a7bebace86a54aa6c68372
drivers/scsi/qla4xxx/ql4_mbx.c +0 -53
@@ -177,59 +177,6 @@ mbox_exit:return status; } -#if 0 -int qla4xxx_send_noop (scsi_qla_host_t * ha) -{ -uint32_t mbox_cmd[MBOX_REG_COUNT ]; -uint32_t mbox_sts[MBOX_REG_COUNT ]; -memset (&mbox_cmd,0 ,sizeof (mbox_cmd)); -memset (&mbox_sts,0 ,sizeof (mbox_sts)); - mbox_cmd[0 ] =MBOX_CMD_NOP ; -if (qla4xxx_mailbox_command (ha,1 ,1 , &mbox_cmd[0 ], &mbox_sts[0 ]) - !=QLA_SUCCESS ) { -DEBUG2 (printk (KERN_INFO "scsi%d: NOP failed\n" , ha->host_no)); -return (QLA_ERROR ); - } - -else { -return (QLA_SUCCESS ); - } -} - -int qla4xxx_mbx_test (scsi_qla_host_t * ha) -{ -uint32_t mbox_cmd[MBOX_REG_COUNT ]; -uint32_t mbox_sts[MBOX_REG_COUNT ]; -int i; -int status; -memset (&mbox_cmd,0 ,sizeof (mbox_cmd)); -memset (&mbox_sts,0 ,sizeof (mbox_sts)); - mbox_cmd[0 ] =MBOX_CMD_REGISTER_TEST ; - mbox_cmd[1 ] =0x11111111 ; - mbox_cmd[2 ] =0x22222222 ; - mbox_cmd[3 ] =0x33333333 ; - mbox_cmd[4 ] =0x44444444 ; - mbox_cmd[5 ] =0x55555555 ; - mbox_cmd[6 ] =0x66666666 ; - mbox_cmd[7 ] =0x77777777 ; -if (qla4xxx_mailbox_command (ha,8 ,8 , &mbox_cmd[0 ], &mbox_sts[0 ]) - !=QLA_SUCCESS ) { -return (QLA_ERROR ); - } -if (mbox_sts[1 ] !=0x11111111 || mbox_sts[2 ] !=0x22222222 - || mbox_sts[3 ] !=0x33333333 || mbox_sts[4 ] !=0x44444444 - || mbox_sts[5 ] !=0x55555555 || mbox_sts[6 ] !=0x66666666 - || mbox_sts[7 ] !=0x77777777 ) { - status =QLA_ERROR ; - } - -else { - status =QLA_SUCCESS ; - } -return (status); -} - -#endif /* */ /* * qla4xxx_issue_iocb
drivers/scsi/qla4xxx/ql4_os.c +42 -56
115 lines not on this page · raw message
drivers/scsi/qla4xxx/ql4_settings.h +0 -1
@@ -9,4 +9,3 @@* Compile time Options: * 0 - Disable and 1 - Enable */ -#define DISABLE_HBA_RESETS 0
Signature · 1 line
1.2.4.g9201-dirty
PATCH 10/11 Update Driver Version to 5.00.05b5-k
In reply to [email protected]---
drivers/scsi/qla4xxx/ql4_version.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
0cf84f6a4c45b98117ebaac7119d1582328f30a1
drivers/scsi/qla4xxx/ql4_version.h +2 -2
@@ -5,9 +5,9 @@* See LICENSE.qla4xxx for copyright and licensing details. */ -#define QLA4XXX_DRIVER_VERSION "5.00.05b4-k" +#define QLA4XXX_DRIVER_VERSION "5.00.05b5-k"#define QL4_DRIVER_MAJOR_VER 5#define QL4_DRIVER_MINOR_VER 0#define QL4_DRIVER_PATCH_VER 5 -#define QL4_DRIVER_BETA_VER 3 +#define QL4_DRIVER_BETA_VER 5
Signature · 1 line
1.2.4.g9201-dirty
PATCH 11/11 Updated scsi/Kconfig to include qla4xxx/Kconfig path.
In reply to [email protected]---
drivers/scsi/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
561680121f1a6cb28b1c770589aa18320d4689b7
drivers/scsi/Kconfig +1 -0
@@ -1340,6 +1340,7 @@ config SCSI_QLOGICPTI module will be called qlogicpti. source "drivers/scsi/qla2xxx/Kconfig" +source "drivers/scsi/qla4xxx/Kconfig" config SCSI_LPFC tristate "Emulex LightPulse Fibre Channel Support"
Signature · 1 line
1.2.4.g9201-dirty
Quoted 32 lines · On Tue, 2006-03-07 at 16:35 -0800, [email protected] wrote:
drivers/scsi/qla4xxx/ql4_mbx.c +0
-10@@ -95,7 +95,6 @@ qla4xxx_mailbox_command(scsi_qla_host_tspin_unlock_irqrestore (&ha->hardware_lock, flags);/* Wait for completion */ -set_current_state (TASK_UNINTERRUPTIBLE );add_wait_queue (&ha->mailbox_wait_queue, &wait);/* @@ -105,7 +104,6 @@ qla4xxx_mailbox_command(scsi_qla_host_t*/ if (outCount ==0 ) { status =QLA_SUCCESS ; -set_current_state (TASK_RUNNING );remove_wait_queue (&ha->mailbox_wait_queue, &wait); goto mbox_exit; }@@ -130,20 +128,8 @@ qla4xxx_mailbox_command(scsi_qla_host_t }spin_unlock_irqrestore (&ha->hardware_lock, flags); -/* -* Delay for 10 microseconds -* NOTE: Interrupt_handler may be called here, -* if interrupts are enabled -*/ -#if 0 -udelay (10 ); -
drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_mailbox_command(scsi_qla_host_t · line 134
Quoted 10 lines
drivers/scsi/qla4xxx/ql4_mbx.c +2
-6-#else /* */ -schedule_timeout (10 ); - -#endif /* */ - }/* wait loop */ -set_current_state (TASK_RUNNING ); +mdelay (10 ); + }remove_wait_queue (&ha->mailbox_wait_queue, &wait);
this looks like a major step backwards; this orginal code was right!