From: Mike Christie <michaelc@cs.wisc.edu>
To: Jayamohan Kalickal <jayamohank@serverengines.com>
Cc: linux-scsi@vger.kernel.org, Jens.Axboe@oracle.com
Subject: Re: [PATCH 1/6] RFC: beiscsi : handles core routines
Date: Mon, 03 Aug 2009 11:57:13 -0500 [thread overview]
Message-ID: <4A7716E9.9060307@cs.wisc.edu> (raw)
In-Reply-To: <20090728071251.GA13581@serverengines.com>
Hey Jens,
Is your block napi code going to go upstream soon? Does it need more
testing or users?
This driver is just using a normal old work queue for the completion
path, so I wanted to see about having Jay convert it to your code.
On 07/28/2009 02:13 AM, Jayamohan Kallickal wrote:
> + */
> +irqreturn_t be_isr(int irq, void *dev_id)
> +{
> + struct beiscsi_hba *phba = NULL;
> + struct hwi_controller_ws *phwi_controller;
> + struct hwi_context_memory *phwi_context;
> + struct be_eq_entry *eqe = NULL;
> + struct be_queue_info *eq;
> + unsigned long flags, index;
> + unsigned int num_eq_processed;
> +
> + phba = (struct beiscsi_hba *)dev_id;
> + phwi_controller = GET_HWI_CONTROLLER_WS(phba);
> + phwi_context = phwi_controller->phwic;
> + spin_lock_irqsave(&phba->isr_lock, flags);
> +
> + eq =&phwi_context->be_eq.q;
> + index = 0;
> + eqe = queue_tail_node(eq);
> + if (!eqe)
> + SE_DEBUG(DBG_LVL_1, "eqe is NULL\n");
> +
> + num_eq_processed = 0;
> + while (eqe->
> + dw[offsetof(struct amap_eq_entry, valid) /
> + 32]& EQE_VALID_MASK) {
> + switch ((u32)
> + (eqe->
> + dw[offsetof(struct amap_eq_entry, major_code) /
> + 32]& EQE_MAJORCODE_MASK)) {
> + case EQ_MAJOR_CODE_COMPLETION:
> + /* Determine which CQ to process. */
> + if (((eqe->
> + dw[offsetof(struct amap_eq_entry, resource_id) /
> + 32]& EQE_RESID_MASK)>> 16) ==
> + phwi_context->be_cq.id) {
> + SE_DEBUG(DBG_LVL_8, "\t\t todo_cq is set\n");
> + phba->todo_cq = 1;
> + } else {
> + SE_DEBUG(DBG_LVL_1,
> + "\t\t Invalid CQ to process\n");
> + }
> + break;
> +
> + default:
> + SE_DEBUG(DBG_LVL_1,
> + "Unexpected struct eq_entry major_code: 0x%x\n",
> + (eqe->dw[offsetof(struct amap_eq_entry, major_code) /
> + 32]& EQE_MAJORCODE_MASK));
> + }
> +
> + /* Mark this struct eq_entry as invalid */
> + AMAP_SET_BITS(struct amap_eq_entry, valid, eqe, 0);
> + queue_tail_inc(eq);
> + eqe = queue_tail_node(eq);
> +
> + num_eq_processed++;
> + }
> + spin_unlock_irqrestore(&phba->isr_lock, flags);
> + queue_work(phba->wq,&phba->work_cqs);
> + hwi_ring_eq_db(phba, phwi_context->be_eq.q.id, 0,
> + /* clear interrupt */
> + num_eq_processed, 1, 1);
> + return IRQ_HANDLED;
next prev parent reply other threads:[~2009-08-03 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 7:13 [PATCH 1/6] RFC: beiscsi : handles core routines Jayamohan Kallickal
2009-07-28 13:13 ` Rolf Eike Beer
2009-07-28 20:12 ` Rolf Eike Beer
2009-08-03 16:57 ` Mike Christie [this message]
2009-08-03 20:41 ` Jens Axboe
2009-08-03 22:18 ` Mike Christie
-- strict thread matches above, loose matches on Subject: below --
2009-08-13 7:08 Jayamohan Kallickal
2009-08-13 10:09 ` Rolf Eike Beer
2009-08-20 19:26 ` Mike Christie
2009-07-27 19:55 RFC: be iscsi driver Jayamohan Kallickal
[not found] ` <1248724523-10999-1-git-send-email-jayamohank-i5Eg4PDOvn3+uv41P6q33AC/G2K4zDHf@public.gmane.org>
2009-07-27 19:55 ` [PATCH 1/6] RFC: beiscsi : handles core routines Jayamohan Kallickal
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=4A7716E9.9060307@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=Jens.Axboe@oracle.com \
--cc=jayamohank@serverengines.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox