All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James.Smart@Emulex.Com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 9/11]  lpfc 8.1.1 : Add polled-mode support
Date: Mon, 28 Nov 2005 19:33:37 +0000	[thread overview]
Message-ID: <20051128193337.GA25722@infradead.org> (raw)
In-Reply-To: <9BB4DECD4CFE6D43AA8EA8D768ED51C2276C4D@xbl3.emulex.com>

On Mon, Nov 28, 2005 at 11:42:29AM -0500, James.Smart@Emulex.Com 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 :)


  reply	other threads:[~2005-11-28 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-28 16:42 [PATCH 9/11] lpfc 8.1.1 : Add polled-mode support James.Smart
2005-11-28 19:33 ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-28 21:10 James.Smart
2005-11-29  4:02 ` Matthew Wilcox
2005-11-30 19:18   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051128193337.GA25722@infradead.org \
    --to=hch@infradead.org \
    --cc=James.Smart@Emulex.Com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.