On Mon, Nov 28, 2005 at 11:42:29AM -0500, James.Smart@xxxxxxxxxx wrote: > > Add polled-mode support to the driver: > - Add functionality to run in polled mode only. Includes run time > attribute to enable mode. > - Enable runtime writable hba settings for coallescing and delay parameters This needs some documentation for where it is useful. Do you want this to avoid interrupts under high loads or for something else? > +static ssize_t > +lpfc_poll_show(struct class_device *cdev, char *buf) > +{ > + struct Scsi_Host *host = class_to_shost(cdev); > + struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata[0]; > + > + if (!phba) return 0; please try to follow kernel coding style. I also doubt that phba could be 0 here at all. > + if (val & ENABLE_FCP_RING_POLLING) { > + if ((val & DISABLE_FCP_RING_INT) > + && !(old_val & DISABLE_FCP_RING_INT)) > + { > + creg_val = readl(phba->HCregaddr); > + creg_val &= ~(HC_R0INT_ENA << LPFC_FCP_RING); > + writel(creg_val, phba->HCregaddr); > + readl(phba->HCregaddr); /* flush */ > + > + lpfc_poll_start_timer(phba); > + } > + } > + else if (val != 0x0) { > + spin_unlock_irq(phba->host->host_lock); > + return -EINVAL; > + } again, lots of style problems. > +static int lpfc_poll = 0; > +module_param(lpfc_poll, int, 0); > +MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:" > + " 0x0 - none," > + " 0x1 - poll with interrupts enabled" > + " 0x3 - poll and disable FCP ring interrupts"); for values in the range of 0 to 9 (decimal) there's absolutely no need to express them in hex :) - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html