status = slic_card_init(card, adapter);
- if (status != STATUS_SUCCESS) {
+ if (status != 0) {
card->state = CARD_FAIL;
adapter->state = ADAPT_FAIL;
adapter->linkstate = LINK_DOWN;
}
status = slic_if_init(adapter);
- if (status != STATUS_SUCCESS) {
+ if (status != 0) {
if (adapter->activated) {
card->adapters_activated--;
slic_global.num_slic_ports_active--;
locked = 0;
}
- return STATUS_SUCCESS;
+ return 0;
}
static void __devexit slic_entry_remove(struct pci_dev *pcidev)
spin_unlock_irqrestore(&slic_global.driver_lock.lock,
slic_global.driver_lock.flags);
- return STATUS_SUCCESS;
+ return 0;
}
static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
#else
Stop compilation;
#endif
- ASSERT((status == STATUS_SUCCESS) || (status == STATUS_PENDING));
+ ASSERT(status == 0);
}
static void slic_init_cleanup(struct adapter *adapter)
mlist = adapter->mcastaddrs;
while (mlist) {
if (!compare_ether_addr(mlist->address, address))
- return STATUS_SUCCESS;
+ return 0;
mlist = mlist->next;
}
mcaddr->next = adapter->mcastaddrs;
adapter->mcastaddrs = mcaddr;
- return STATUS_SUCCESS;
+ return 0;
}
/*
static void slic_mcast_set_list(struct net_device *dev)
{
struct adapter *adapter = netdev_priv(dev);
- int status = STATUS_SUCCESS;
+ int status = 0;
char *addresses;
struct netdev_hw_addr *ha;
netdev_for_each_mc_addr(ha, dev) {
addresses = (char *) &ha->addr;
status = slic_mcast_add_list(adapter, addresses);
- if (status != STATUS_SUCCESS)
+ if (status != 0)
break;
slic_mcast_set_bit(adapter, addresses);
}
adapter->devflags_prev = dev->flags;
slic_config_set(adapter, true);
} else {
- if (status == STATUS_SUCCESS)
+ if (status == 0)
slic_mcast_set_mask(adapter);
}
return;
adapter->macopts |= MAC_MCAST;
}
status = slic_adapter_allocresources(adapter);
- if (status != STATUS_SUCCESS) {
+ if (status != 0) {
dev_err(&dev->dev,
"%s: slic_adapter_allocresources FAILED %x\n",
__func__, status);
slic_link_config(adapter, LINK_AUTOSPEED, LINK_AUTOD);
slic_link_event_handler(adapter);
- return STATUS_SUCCESS;
+ return 0;
}
static void slic_unmap_mmio_space(struct adapter *adapter)
}
adapter->intrregistered = 1;
}
- return STATUS_SUCCESS;
+ return 0;
}
static void slic_config_pci(struct pci_dev *pcidev)
and reach mainloop */
mdelay(20);
- return STATUS_SUCCESS;
+ return 0;
}
MODULE_FIRMWARE("slicoss/oasisdownload.sys");
/* Download the microcode */
status = slic_card_download(adapter);
- if (status != STATUS_SUCCESS) {
+ if (status != 0) {
dev_err(&adapter->pcidev->dev,
"download failed bus %d slot %d\n",
adapter->busnumber, adapter->slotnumber);
card->state = CARD_UP;
card->reset_in_progress = 0;
- return STATUS_SUCCESS;
+ return 0;
}
static u32 slic_card_locate(struct adapter *adapter)
ASSERT(card);
if (!card)
- return STATUS_FAILURE;
+ return -ENXIO;
/* Put the adapter in the card's adapter list */
ASSERT(card->adapter[adapter->port] == NULL);
if (!card->adapter[adapter->port]) {
} else {
adapter->upr_list = upr;
}
- return STATUS_SUCCESS;
+ return 0;
}
static int slic_upr_request(struct adapter *adapter,
upr_request,
upr_data,
upr_data_h, upr_buffer, upr_buffer_h);
- if (status != STATUS_SUCCESS) {
+ if (status != 0) {
spin_unlock_irqrestore(&adapter->upr_lock.lock,
adapter->upr_lock.flags);
return status;
slic_upr_start(adapter);
spin_unlock_irqrestore(&adapter->upr_lock.lock,
adapter->upr_lock.flags);
- return STATUS_PENDING;
+ return 0;
}
static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
dev_err(&adapter->pcidev->dev,
"pci_alloc_consistent failed\n");
slic_rspqueue_free(adapter);
- return STATUS_FAILURE;
+ return -ENOMEM;
}
#ifndef CONFIG_X86_64
ASSERT(((u32) rspq->vaddr[i] & 0xFFFFF000) ==
rspq->offset = 0;
rspq->pageindex = 0;
rspq->rspbuf = (struct slic_rspbuf *)rspq->vaddr[0];
- return STATUS_SUCCESS;
+ return 0;
}
static void slic_rspqueue_free(struct adapter *adapter)
#endif
if (!pageaddr) {
slic_cmdq_free(adapter);
- return STATUS_FAILURE;
+ return -ENOMEM;
}
slic_cmdq_addcmdpage(adapter, pageaddr);
}
adapter->slic_handle_ix = 1;
- return STATUS_SUCCESS;
+ return 0;
}
static void slic_cmdq_free(struct adapter *adapter)
}
if (rcvq->count < SLIC_RCVQ_MINENTRIES) {
slic_rcvqueue_free(adapter);
- return STATUS_FAILURE;
+ return -ENOMEM;
}
- return STATUS_SUCCESS;
+ return 0;
}
static void slic_rcvqueue_free(struct adapter *adapter)