From: Mike Christie <michaelc@cs.wisc.edu>
To: Jayamohan Kalickal <jayamohank@serverengines.com>
Cc: linux-scsi@vger.kernel.org, James.Bottomley@suse.de,
sfr@canb.auug.org.au
Subject: Re: [PATCH 1/1] be2iscsi: Fixes for powerpc compile
Date: Tue, 08 Sep 2009 17:20:54 -0500 [thread overview]
Message-ID: <4AA6D8C6.3040303@cs.wisc.edu> (raw)
In-Reply-To: <20090908194135.GA14891@serverengines.com>
On 09/08/2009 02:41 PM, Jayamohan Kallickal wrote:
> This patch contains fixes to remove virt_to_* family from the driver.
> It also contains some function name changes to a few low level functions
> to avoid name clash with our net driver.
>
> This patch is a diff on
> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6.git
>
> Signed-off-by: Jayamohan Kallickal<jayamohank@serverengines.com>
> ---
> drivers/scsi/be2iscsi/be.h | 2 +-
> drivers/scsi/be2iscsi/be_cmds.c | 15 +++++----
> drivers/scsi/be2iscsi/be_cmds.h | 6 ++--
> drivers/scsi/be2iscsi/be_iscsi.c | 62 +++++++++++++++++++++++++++++++++++--
> drivers/scsi/be2iscsi/be_iscsi.h | 2 +
> drivers/scsi/be2iscsi/be_main.c | 58 +++++++++++++++++-----------------
> drivers/scsi/be2iscsi/be_main.h | 3 +-
> 7 files changed, 103 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
> index 8c973a2..751721e 100644
> --- a/drivers/scsi/be2iscsi/be.h
> +++ b/drivers/scsi/be2iscsi/be.h
> @@ -177,7 +177,7 @@ static inline void swap_dws(void *wrb, int len)
> #endif /* __BIG_ENDIAN */
> }
>
> -extern void be_cq_notify(struct be_ctrl_info *ctrl, u16 qid, bool arm,
> +extern void beiscsi_cq_notify(struct be_ctrl_info *ctrl, u16 qid, bool arm,
> u16 num_popped);
>
> #endif /* BEISCSI_H */
> diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
> index 63afea2..4b92a7b 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.c
> +++ b/drivers/scsi/be2iscsi/be_cmds.c
> @@ -60,7 +60,8 @@ static inline bool is_link_state_evt(u32 trailer)
> ASYNC_TRAILER_EVENT_CODE_MASK) == ASYNC_EVENT_CODE_LINK_STATE);
> }
>
> -void be_cq_notify(struct be_ctrl_info *ctrl, u16 qid, bool arm, u16 num_popped)
> +void beiscsi_cq_notify(struct be_ctrl_info *ctrl, u16 qid, bool arm,
> + u16 num_popped)
Looks like you got tab happy.
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index 5a8fa33..a58c704 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -43,6 +43,15 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
> {
> struct Scsi_Host *shost;
> struct beiscsi_endpoint *beiscsi_ep;
> + struct iscsi_cls_session *cls_session;
> + struct iscsi_session *sess;
> + struct beiscsi_hba *phba;
> + struct iscsi_task *task;
> + struct beiscsi_io_task *io_task;
> + unsigned int max_size, num_cmd;
> + dma_addr_t bus_add;
> + u64 pa_addr;
> + void *vaddr;
>
> SE_DEBUG(DBG_LVL_8, "In beiscsi_session_create\n");
>
> @@ -51,7 +60,8 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
> return NULL;
> }
> beiscsi_ep = ep->dd_data;
> - shost = beiscsi_ep->phba->shost;
> + phba = beiscsi_ep->phba;
> + shost = phba->shost;
> if (cmds_max> beiscsi_ep->phba->params.wrbs_per_cxn) {
> shost_printk(KERN_ERR, shost, "Cannot handle %d cmds."
> "Max cmds per session supported is %d. Using %d. "
> @@ -61,9 +71,53 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
> cmds_max = beiscsi_ep->phba->params.wrbs_per_cxn;
> }
>
> - return iscsi_session_setup(&beiscsi_iscsi_transport, shost, cmds_max,
> - sizeof(struct beiscsi_io_task),
> - initial_cmdsn, ISCSI_MAX_TARGET);
> + cls_session = iscsi_session_setup(&beiscsi_iscsi_transport,
> + shost, cmds_max,
> + sizeof(struct beiscsi_io_task),
> + initial_cmdsn, ISCSI_MAX_TARGET);
> + if (!cls_session)
> + return NULL;
> + sess = cls_session->dd_data;
> + max_size = ALIGN(sizeof(struct be_cmd_bhs), 64) * sess->cmds_max;
> + vaddr = pci_alloc_consistent(phba->pcidev,
Do you just want a dma/pci pool? It will align structs for you too, I think.
> + max_size,
> + &bus_add);
No need to break this up into multiple lines. Just put it on the same
line as the as the pci_alloc_consistent.
next prev parent reply other threads:[~2009-09-08 22:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 19:41 [PATCH 1/1] be2iscsi: Fixes for powerpc compile Jayamohan Kallickal
2009-09-08 22:20 ` Mike Christie [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-09-09 1:56 Jayamohan Kallickal
[not found] <20090908223437.cc0c0f82@mailhost.serverengines.com>
2009-09-09 15:38 ` Mike Christie
2009-09-09 19:15 Jayamohan Kalickal
2009-09-10 17:15 ` James Bottomley
2009-09-10 17:54 Jayamohan Kalickal
2009-09-11 12:15 ` James Smart
2009-09-11 22:54 Jayamohan Kalickal
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=4AA6D8C6.3040303@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=jayamohank@serverengines.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).