Commit 25a48bb9 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[PATCH] [8/18] qla2xxx: Remove dead code

  Remove several unused failover variables and functions from
  the embedded driver.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent f3bd0993
...@@ -75,8 +75,6 @@ extern int ql2xsuspendcount; ...@@ -75,8 +75,6 @@ extern int ql2xsuspendcount;
#if defined(MODULE) #if defined(MODULE)
extern char *ql2xopts; extern char *ql2xopts;
#endif #endif
extern struct list_head qla_hostlist;
extern rwlock_t qla_hostlist_lock;
extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
......
...@@ -135,13 +135,6 @@ struct info_str { ...@@ -135,13 +135,6 @@ struct info_str {
static void copy_mem_info(struct info_str *, char *, int); static void copy_mem_info(struct info_str *, char *, int);
static int copy_info(struct info_str *, char *, ...); static int copy_info(struct info_str *, char *, ...);
/*
* List of host adapters
*/
LIST_HEAD(qla_hostlist);
rwlock_t qla_hostlist_lock = RW_LOCK_UNLOCKED;
static void qla2x00_free_device(scsi_qla_host_t *); static void qla2x00_free_device(scsi_qla_host_t *);
static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha); static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha);
...@@ -190,8 +183,6 @@ static struct scsi_transport_template *qla2xxx_transport_template = NULL; ...@@ -190,8 +183,6 @@ static struct scsi_transport_template *qla2xxx_transport_template = NULL;
static void qla2x00_display_fc_names(scsi_qla_host_t *); static void qla2x00_display_fc_names(scsi_qla_host_t *);
void qla2x00_blink_led(scsi_qla_host_t *);
/* TODO Convert to inlines /* TODO Convert to inlines
* *
* Timer routines * Timer routines
...@@ -2118,15 +2109,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) ...@@ -2118,15 +2109,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
} }
spin_unlock_irqrestore(&ha->hardware_lock, flags); spin_unlock_irqrestore(&ha->hardware_lock, flags);
/* Enable chip interrupts. */ /* Enable chip interrupts. */
qla2x00_enable_intrs(ha); qla2x00_enable_intrs(ha);
/* Insert new entry into the list of adapters */
write_lock(&qla_hostlist_lock);
list_add_tail(&ha->list, &qla_hostlist);
write_unlock(&qla_hostlist_lock);
/* v2.19.5b6 */ /* v2.19.5b6 */
/* /*
* Wait around max loop_reset_delay secs for the devices to come * Wait around max loop_reset_delay secs for the devices to come
...@@ -2188,10 +2173,6 @@ void qla2x00_remove_one(struct pci_dev *pdev) ...@@ -2188,10 +2173,6 @@ void qla2x00_remove_one(struct pci_dev *pdev)
ha = pci_get_drvdata(pdev); ha = pci_get_drvdata(pdev);
write_lock(&qla_hostlist_lock);
list_del(&ha->list);
write_unlock(&qla_hostlist_lock);
sysfs_remove_bin_file(&ha->host->shost_gendev.kobj, sysfs_remove_bin_file(&ha->host->shost_gendev.kobj,
&sysfs_fw_dump_attr); &sysfs_fw_dump_attr);
sysfs_remove_bin_file(&ha->host->shost_gendev.kobj, &sysfs_nvram_attr); sysfs_remove_bin_file(&ha->host->shost_gendev.kobj, &sysfs_nvram_attr);
...@@ -2335,7 +2316,6 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer, ...@@ -2335,7 +2316,6 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer,
uint32_t tmp_sn; uint32_t tmp_sn;
uint32_t *flags; uint32_t *flags;
uint8_t *loop_state; uint8_t *loop_state;
int found;
scsi_qla_host_t *ha; scsi_qla_host_t *ha;
char fw_info[30]; char fw_info[30];
...@@ -2343,27 +2323,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer, ...@@ -2343,27 +2323,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer,
"Entering proc_info buff_in=%p, offset=0x%lx, length=0x%x\n", "Entering proc_info buff_in=%p, offset=0x%lx, length=0x%x\n",
buffer, offset, length);) buffer, offset, length);)
ha = NULL; ha = (scsi_qla_host_t *) shost->hostdata;
/* Find the host that was specified */
found = 0;
read_lock(&qla_hostlist_lock);
list_for_each_entry(ha, &qla_hostlist, list) {
if (ha->host == shost) {
found++;
break;
}
}
read_unlock(&qla_hostlist_lock);
/* if host wasn't found then exit */
if (!found) {
DEBUG2_3(printk(KERN_WARNING
"%s: Can't find adapter for host %p\n",
__func__, shost);)
return (retval);
}
if (inout == TRUE) { if (inout == TRUE) {
/* Has data been written to the file? */ /* Has data been written to the file? */
...@@ -3644,73 +3604,6 @@ qla2x00_get_new_sp(scsi_qla_host_t *ha) ...@@ -3644,73 +3604,6 @@ qla2x00_get_new_sp(scsi_qla_host_t *ha)
return (sp); return (sp);
} }
/**************************************************************************
* qla2x00_blink_led
*
* Description:
* This function sets the colour of the LED while preserving the
* unsued GPIO pins every sec.
*
* Input:
* ha - Host adapter structure
*
* Return:
* None
*
* Context: qla2x00_timer() Interrupt
***************************************************************************/
void
qla2x00_blink_led(scsi_qla_host_t *ha)
{
uint16_t gpio_enable, gpio_data, led_color;
unsigned long cpu_flags = 0;
device_reg_t *reg = ha->iobase;
/* Save the Original GPIOE */
spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
gpio_enable = RD_REG_WORD(&reg->gpioe);
gpio_data = RD_REG_WORD(&reg->gpiod);
spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
DEBUG2(printk("%s Original data of gpio_enable_reg=0x%x"
" gpio_data_reg=0x%x\n",
__func__,gpio_enable,gpio_data));
if (ha->beacon_green_on){
led_color = GPIO_LED_GREEN_ON_AMBER_OFF;
ha->beacon_green_on = 0;
} else {
led_color = GPIO_LED_GREEN_OFF_AMBER_OFF;
ha->beacon_green_on = 1;
}
/* Set the modified gpio_enable values */
gpio_enable |= GPIO_LED_GREEN_ON_AMBER_OFF;
DEBUG2(printk("%s Before writing enable : gpio_enable_reg=0x%x"
" gpio_data_reg=0x%x led_color=0x%x\n",
__func__, gpio_enable, gpio_data, led_color));
spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
WRT_REG_WORD(&reg->gpioe,gpio_enable);
spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
/* Clear out the previously set LED colour */
gpio_data &= ~GPIO_LED_GREEN_ON_AMBER_OFF;
/* Set the new input LED colour to GPIOD */
gpio_data |= led_color;
DEBUG2(printk("%s Before writing data: gpio_enable_reg=0x%x"
" gpio_data_reg=0x%x led_color=0x%x\n",
__func__,gpio_enable,gpio_data,led_color));
/* Set the modified gpio_data values */
spin_lock_irqsave(&ha->hardware_lock, cpu_flags);
WRT_REG_WORD(&reg->gpiod,gpio_data);
spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags);
}
/************************************************************************** /**************************************************************************
* qla2x00_timer * qla2x00_timer
* *
...@@ -3745,11 +3638,6 @@ qla2x00_timer(scsi_qla_host_t *ha) ...@@ -3745,11 +3638,6 @@ qla2x00_timer(scsi_qla_host_t *ha)
start_dpc++; start_dpc++;
} }
/* Check if beacon LED needs to be blinked */
if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && ha->beacon_blink_led)
qla2x00_blink_led(ha);
/* /*
* Ports - Port down timer. * Ports - Port down timer.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment