if (intstat & mask) {
if (intstat & PrintfReady) {
- aac_printf(dev, le32_to_cpu(sa_readl(dev, Mailbox5)));
+ aac_printf(dev, sa_readl(dev, Mailbox5));
sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */
sa_writew(dev, DoorbellReg_s, PrintfDone);
} else if (intstat & DOORBELL_1) { // dev -> Host Normal Command Ready
* @p1: first parameter
* @ret: adapter status
*
- * This routine will send a synchronous comamnd to the adapter and wait
+ * This routine will send a synchronous command to the adapter and wait
* for its completion.
*/
/*
* Write the Command into Mailbox 0
*/
- sa_writel(dev, Mailbox0, cpu_to_le32(command));
+ sa_writel(dev, Mailbox0, command);
/*
* Write the parameters into Mailboxes 1 - 4
*/
- sa_writel(dev, Mailbox1, cpu_to_le32(p1));
+ sa_writel(dev, Mailbox1, p1);
sa_writel(dev, Mailbox2, 0);
sa_writel(dev, Mailbox3, 0);
sa_writel(dev, Mailbox4, 0);
/*
* Pull the synch status from Mailbox 0.
*/
- *ret = le32_to_cpu(sa_readl(dev, Mailbox0));
+ if (ret)
+ *ret = sa_readl(dev, Mailbox0);
return 0;
}
* Fill in the remaining pieces of the init.
*/
init = dev->init;
- init->HostElapsedSeconds = cpu_to_le32(jiffies/HZ);
+ init->HostElapsedSeconds = cpu_to_le32(get_seconds());
- dprintk(("INIT\n"));
/*
* Tell the adapter we are back and up and running so it will scan its command
* queues and enable our interrupts
* First clear out all interrupts. Then enable the one's that
* we can handle.
*/
- dprintk(("MASK\n"));
sa_writew(dev, SaDbCSR.PRISETIRQMASK, cpu_to_le16(0xffff));
sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, (PrintfReady | DOORBELL_1 | DOORBELL_2 | DOORBELL_3 | DOORBELL_4));
- dprintk(("SYNCCMD\n"));
/* We can only use a 32 bit address here */
sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, &ret);
}
int instance;
const char *name;
- dprintk(("PREINST\n"));
instance = dev->id;
name = dev->name;
/*
* Map in the registers from the adapter.
*/
- dprintk(("PREMAP\n"));
if((dev->regs.sa = ioremap((unsigned long)dev->scsi_host_ptr->base, 8192))==NULL)
{
*/
while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) {
if (time_after(jiffies, start+180*HZ)) {
- status = sa_readl(dev, Mailbox7) >> 16;
- printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %d.\n", name, instance, le32_to_cpu(status));
+ status = sa_readl(dev, Mailbox7);
+ printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n",
+ name, instance, status);
goto error_iounmap;
}
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}
- dprintk(("ATIRQ\n"));
if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) {
printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance);
goto error_iounmap;
dev->a_ops.adapter_sync_cmd = sa_sync_cmd;
dev->a_ops.adapter_check_health = aac_sa_check_health;
- dprintk(("FUNCDONE\n"));
if(aac_init_adapter(dev) == NULL)
goto error_irq;
- dprintk(("NEWADAPTDONE\n"));
/*
* Start any kernel threads needed
*/
* Tell the adapter that all is configure, and it can start
* accepting requests
*/
- dprintk(("STARTING\n"));
aac_sa_start_adapter(dev);
- dprintk(("STARTED\n"));
return 0;