From: James Bottomley <jbottomley@parallels.com>
To: Tomas Henzl <thenzl@redhat.com>
Cc: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"aacraid@pmc-sierra.com" <aacraid@pmc-sierra.com>,
"Achim_Leubner@pmc-sierra.com" <Achim_Leubner@pmc-sierra.com>,
"Tony_Ruiz@pmc-sierra.com" <Tony_Ruiz@pmc-sierra.com>
Subject: Re: [PATCH 1/1] aacraid: SCSI dma mapping failure case handling
Date: Wed, 14 Nov 2012 07:03:23 +0000 [thread overview]
Message-ID: <1352841833.8317.0.camel@dabdike> (raw)
In-Reply-To: <507DD2E1.4080301@redhat.com>
On Tue, 2012-10-16 at 23:34 +0200, Tomas Henzl wrote:
> On 10/16/2012 10:59 PM, Mahesh Rajashekhara wrote:
> > This patch handles SCSI dma mapping failure case. Reporting error code to the upper layer instead of BUG_ON().
> >
> > This patch is created against current upstream kernel.
> >
> > Signed-off-by: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com>
> > ---
> > drivers/scsi/aacraid/aachba.c | 63 +++++++++++++++++++++++++++++++---------
> > drivers/scsi/aacraid/aacraid.h | 2 +-
> > 2 files changed, 50 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> > index d79457a..efa2900 100644
> > --- a/drivers/scsi/aacraid/aachba.c
> > +++ b/drivers/scsi/aacraid/aachba.c
> > @@ -971,6 +971,7 @@ static int aac_read_raw_io(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u3
> > {
> > struct aac_dev *dev = fib->dev;
> > u16 fibsize, command;
> > + unsigned long ret;
> >
> > aac_fib_init(fib);
> > if (dev->comm_interface == AAC_COMM_MESSAGE_TYPE2 && !dev->sync_mode) {
> > @@ -982,7 +983,10 @@ static int aac_read_raw_io(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u3
> > readcmd2->byteCount = cpu_to_le32(count<<9);
> > readcmd2->cid = cpu_to_le16(scmd_id(cmd));
> > readcmd2->flags = cpu_to_le16(RIO2_IO_TYPE_READ);
> > - aac_build_sgraw2(cmd, readcmd2, dev->scsi_host_ptr->sg_tablesize);
> > + ret = aac_build_sgraw2(cmd, readcmd2,
> > + dev->scsi_host_ptr->sg_tablesize);
> > + if (ret < 0)
> > + return ret;
>
> Hi Mahesh, 'ret' is 'unsigned', the above test will not work.
> Tomas
Ping on this please Mahesh? The criticism seems completely valid to me.
James
next prev parent reply other threads:[~2012-11-14 7:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 20:59 [PATCH 1/1] aacraid: SCSI dma mapping failure case handling Mahesh Rajashekhara
2012-10-16 21:34 ` Tomas Henzl
2012-11-14 7:03 ` James Bottomley [this message]
2012-11-14 9:58 ` Mahesh Rajashekhara
-- strict thread matches above, loose matches on Subject: below --
2012-10-17 16:15 Mahesh Rajashekhara
2012-10-17 11:16 ` Tomas Henzl
2012-10-17 17:54 Mahesh Rajashekhara
2012-10-17 15:23 ` Tomas Henzl
2012-10-19 13:51 Mahesh Rajashekhara
2012-10-19 14:30 ` Tomas Henzl
2012-11-01 14:57 ` Mahesh Rajashekhara
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=1352841833.8317.0.camel@dabdike \
--to=jbottomley@parallels.com \
--cc=Achim_Leubner@pmc-sierra.com \
--cc=Mahesh_Rajashekhara@pmc-sierra.com \
--cc=Tony_Ruiz@pmc-sierra.com \
--cc=aacraid@pmc-sierra.com \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.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;
as well as URLs for NNTP newsgroup(s).