#include "oid_mgt.h"
#define ISL3877_IMAGE_FILE "isl3877"
+#define ISL3886_IMAGE_FILE "isl3886"
#define ISL3890_IMAGE_FILE "isl3890"
static int prism54_bring_down(islpci_private *);
mdelay(50);
{
- const struct firmware *fw_entry = 0;
+ const struct firmware *fw_entry = NULL;
long fw_len;
const u32 *fw_ptr;
void *device = priv->device_base;
int powerstate = ISL38XX_PSM_POWERSAVE_STATE;
+ /* lock the interrupt handler */
+ spin_lock(&priv->slock);
+
/* received an interrupt request on a shared IRQ line
* first check whether the device is in sleep mode */
reg = readl(device + ISL38XX_CTRL_STAT_REG);
#if VERBOSE > SHOW_ERROR_MESSAGES
DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n");
#endif
+ spin_unlock(&priv->slock);
return IRQ_NONE;
}
- if (islpci_get_state(priv) != PRV_STATE_SLEEP)
- powerstate = ISL38XX_PSM_ACTIVE_STATE;
-
- /* lock the interrupt handler */
- spin_lock(&priv->slock);
/* check whether there is any source of interrupt on the device */
reg = readl(device + ISL38XX_INT_IDENT_REG);
reg &= ISL38XX_INT_SOURCES;
if (reg != 0) {
+ if (islpci_get_state(priv) != PRV_STATE_SLEEP)
+ powerstate = ISL38XX_PSM_ACTIVE_STATE;
+
/* reset the request bits in the Identification register */
isl38xx_w32_flush(device, reg, ISL38XX_INT_ACK_REG);
isl38xx_handle_wakeup(priv->control_block,
&powerstate, priv->device_base);
}
+ } else {
+#if VERBOSE > SHOW_ERROR_MESSAGES
+ DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n");
+#endif
+ spin_unlock(&priv->slock);
+ return IRQ_NONE;
}
/* sleep -> ready */
if (priv->device_base)
iounmap(priv->device_base);
- priv->device_base = 0;
+ priv->device_base = NULL;
/* free consistent DMA area... */
if (priv->driver_mem_address)
priv->device_host_address);
/* clear some dangling pointers */
- priv->driver_mem_address = 0;
+ priv->driver_mem_address = NULL;
priv->device_host_address = 0;
priv->device_psm_buffer = 0;
- priv->control_block = 0;
+ priv->control_block = NULL;
/* clean up mgmt rx buffers */
for (counter = 0; counter < ISL38XX_CB_MGMT_QSIZE; counter++) {
if (priv->data_low_rx[counter])
dev_kfree_skb(priv->data_low_rx[counter]);
- priv->data_low_rx[counter] = 0;
+ priv->data_low_rx[counter] = NULL;
}
/* Free the acces control list and the WPA list */
/* select the firmware file depending on the device id */
switch (pdev->device) {
- case PCIDEVICE_ISL3890:
- case PCIDEVICE_3COM6001:
- strcpy(priv->firmware, ISL3890_IMAGE_FILE);
- break;
- case PCIDEVICE_ISL3877:
+ case 0x3877:
strcpy(priv->firmware, ISL3877_IMAGE_FILE);
break;
+ case 0x3886:
+ strcpy(priv->firmware, ISL3886_IMAGE_FILE);
+ break;
+
default:
strcpy(priv->firmware, ISL3890_IMAGE_FILE);
break;
do_islpci_free_memory:
islpci_free_memory(priv);
do_free_netdev:
- pci_set_drvdata(pdev, 0);
+ pci_set_drvdata(pdev, NULL);
free_netdev(ndev);
- priv = 0;
+ priv = NULL;
return NULL;
}