From: Joe Perches <joe@perches.com>
To: Rasesh Mody <rmody@brocade.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
adapter_linux_open_src_team@brocade.com,
Gurunatha Karaje <gkaraje@brocade.com>
Subject: Re: [net-next 1/7] bna: Brocade 1860 IOC PLL, Reg Defs and ASIC Mode Changes
Date: Fri, 23 Sep 2011 19:30:26 -0700 [thread overview]
Message-ID: <1316831427.28330.17.camel@Joe-Laptop> (raw)
In-Reply-To: <1316830458-24773-2-git-send-email-rmody@brocade.com>
On Fri, 2011-09-23 at 19:14 -0700, Rasesh Mody wrote:
> Add logic to set ASIC specfic interface in IOC, HW interface initialization
> APIs, mode based initialization and MSI-X resource allocation for 1860 with
> no asic block. Add new h/w specific register definitions and setup registers
> used by IOC logic.
trivia...
> +static struct { u32 hfn_mbox, lpu_mbox, hfn_pgn, hfn, lpu, lpu_read; }
I think it'd be better to use normal kernel declaration style,
c99 initializers and perhaps const too.
static const struct {
u32 hfn_mbox;
u32 lpu_mbox;
u32 hfn_pgn;
u32 hfn;
u32 lpu;
u32 lpu_read;
} ct2_reg[] = {
etc...
[]
> + if (port == 0) {
> + ioc->ioc_regs.heartbeat = rb + CT2_BFA_IOC0_HBEAT_REG;
> + ioc->ioc_regs.ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG;
> + ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC1_STATE_REG;
> + ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P0;
> + ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P1;
> + } else {
> + ioc->ioc_regs.heartbeat = (rb + CT2_BFA_IOC1_HBEAT_REG);
> + ioc->ioc_regs.ioc_fwstate = (rb + CT2_BFA_IOC1_STATE_REG);
> + ioc->ioc_regs.alt_ioc_fwstate = rb + CT2_BFA_IOC0_STATE_REG;
> + ioc->ioc_regs.ll_halt = rb + FW_INIT_HALT_P1;
> + ioc->ioc_regs.alt_ll_halt = rb + FW_INIT_HALT_P0;
> + }
Inconsistent use of parentheses, I think it's better to remove them.
> +
> + /*
> + * PSS control registers
> + */
> + ioc->ioc_regs.pss_ctl_reg = (rb + PSS_CTL_REG);
> + ioc->ioc_regs.pss_err_status_reg = (rb + PSS_ERR_STATUS_REG);
> + ioc->ioc_regs.app_pll_fast_ctl_reg = (rb + CT2_APP_PLL_LCLK_CTL_REG);
> + ioc->ioc_regs.app_pll_slow_ctl_reg = (rb + CT2_APP_PLL_SCLK_CTL_REG);
here too.
> +
> + /*
> + * IOC semaphore registers and serialization
> + */
> + ioc->ioc_regs.ioc_sem_reg = (rb + CT2_HOST_SEM0_REG);
etc.
next prev parent reply other threads:[~2011-09-24 2:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-24 2:14 [net-next 0/7] bna: H/W enablement and update driver version to 3.0.2.2 Rasesh Mody
2011-09-24 2:14 ` [net-next 1/7] bna: Brocade 1860 IOC PLL, Reg Defs and ASIC Mode Changes Rasesh Mody
2011-09-24 2:30 ` Joe Perches [this message]
2011-09-26 16:43 ` Rasesh Mody
2011-09-24 2:14 ` [net-next 2/7] bna: Capability Map and MFG Block Changes for New HW Rasesh Mody
2011-09-24 2:14 ` [net-next 3/7] bna: Implement FW Download " Rasesh Mody
2011-09-24 2:14 ` [net-next 4/7] bna: Brocade 1860 HW Enablement Rasesh Mody
2011-09-24 2:14 ` [net-next 5/7] bna: PLL Init Fix and Add Stats Attributes Rasesh Mody
2011-09-24 2:14 ` [net-next 6/7] bna: Add Callback to Fix RXQ Stop Rasesh Mody
2011-09-24 2:38 ` Joe Perches
2011-09-24 2:14 ` [net-next 7/7] bna: Driver Version changed to 3.0.2.2 Rasesh Mody
-- strict thread matches above, loose matches on Subject: below --
2011-09-26 21:12 [net-next 0/7] bna: H/W enablement and update driver version " Rasesh Mody
2011-09-26 21:12 ` [net-next 1/7] bna: Brocade 1860 IOC PLL, Reg Defs and ASIC Mode Changes Rasesh Mody
2011-09-27 20:39 [net-next 0/7] bna: H/W enablement and update driver version to 3.0.2.2 Rasesh Mody
2011-09-27 20:39 ` [net-next 1/7] bna: Brocade 1860 IOC PLL, Reg Defs and ASIC Mode Changes Rasesh Mody
2011-09-27 23:26 ` Joe Perches
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=1316831427.28330.17.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=adapter_linux_open_src_team@brocade.com \
--cc=davem@davemloft.net \
--cc=gkaraje@brocade.com \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox