pciinfo.board_id = host->board_id;
if (copy_to_user(argp, &pciinfo, sizeof( cciss_pci_info_struct )))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_GETINTINFO:
{
intinfo.count = readl(&host->cfgtable->HostWrite.CoalIntCount);
if (copy_to_user(argp, &intinfo, sizeof( cciss_coalint_struct )))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_SETINTINFO:
{
{
// printk("cciss_ioctl: delay and count cannot be 0\n");
- return( -EINVAL);
+ return -EINVAL;
}
spin_lock_irqsave(CCISS_LOCK(ctlr), flags);
/* Update the field, and then ring the doorbell */
spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
if (i >= MAX_IOCTL_CONFIG_WAIT)
return -EAGAIN;
- return(0);
+ return 0;
}
case CCISS_GETNODENAME:
{
NodeName[i] = readb(&host->cfgtable->ServerName[i]);
if (copy_to_user(argp, NodeName, sizeof( NodeName_type)))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_SETNODENAME:
{
spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
if (i >= MAX_IOCTL_CONFIG_WAIT)
return -EAGAIN;
- return(0);
+ return 0;
}
case CCISS_GETHEARTBEAT:
heartbeat = readl(&host->cfgtable->HeartBeat);
if (copy_to_user(argp, &heartbeat, sizeof( Heartbeat_type)))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_GETBUSTYPES:
{
BusTypes = readl(&host->cfgtable->BusTypes);
if (copy_to_user(argp, &BusTypes, sizeof( BusTypes_type) ))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_GETFIRMVER:
{
if (copy_to_user(argp, firmware, sizeof( FirmwareVer_type)))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_GETDRIVVER:
{
if (copy_to_user(argp, &DriverVer, sizeof( DriverVer_type) ))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_REVALIDVOLS:
if (copy_to_user(argp, &luninfo,
sizeof(LogvolInfo_struct)))
return -EFAULT;
- return(0);
+ return 0;
}
case CCISS_DEREGDISK:
return rebuild_lun_table(host, disk);
{
kfree(buff);
cmd_free(host, c, 0);
- return( -EFAULT);
+ return -EFAULT;
}
if (iocommand.Request.Type.Direction == XFER_READ)
}
kfree(buff);
cmd_free(host, c, 0);
- return(0);
+ return 0;
}
case CCISS_BIG_PASSTHRU: {
BIG_IOCTL_Command_struct *ioc;
}
kfree(buff_size);
kfree(ioc);
- return(status);
+ return status;
}
default:
return -ENOTTY;
drv->LunID = 0;
}
- return(0);
+ return 0;
}
static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff,
default:
printk(KERN_WARNING
"cciss%d: Unknown Command 0x%c\n", ctlr, cmd);
- return(IO_ERROR);
+ return IO_ERROR;
}
} else if (cmd_type == TYPE_MSG) {
switch (cmd) {
pci_unmap_single( h->pdev, (dma_addr_t) buff_dma_handle.val,
c->SG[0].Len, PCI_DMA_BIDIRECTIONAL);
cmd_free(h, c, 0);
- return(return_status);
+ return return_status;
}
static void cciss_geometry_inquiry(int ctlr, int logvol,
if (done == FIFO_EMPTY)
schedule_timeout_uninterruptible(1);
else
- return (done);
+ return done;
}
/* Invalid address to tell caller we ran out of time */
return 1;
if ((c = cmd_alloc(info_p, 1)) == NULL) {
printk(KERN_WARNING "cciss: unable to get memory");
- return(IO_ERROR);
+ return IO_ERROR;
}
status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num,
log_unit, page_code, scsi3addr, cmd_type);
do_cciss_intr(0, info_p, NULL);
#endif
cmd_free(info_p, c, 1);
- return (status);
+ return status;
}
/*
* Map (physical) PCI mem into (virtual) kernel space
i = alloc_cciss_hba();
if(i < 0)
- return (-1);
+ return -1;
hba[i]->busy_initializing = 1;
add_disk(disk);
}
- return(1);
+ return 1;
clean4:
#ifdef CONFIG_CISS_SCSI_TAPE
clean1:
hba[i]->busy_initializing = 0;
free_hba(i);
- return(-1);
+ return -1;
}
static void __devexit cciss_remove_one (struct pci_dev *pdev)