From: Boaz Harrosh <bharrosh@panasas.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: "James Bottomley" <James.Bottomley@SteelEye.com>,
"Christoph Hellwig" <hch@lst.de>,
"\"Jürgen E. Fischer\"" <fischer@norbit.de>,
"FUJITA Tomonori" <fujita.tomonori@lab.ntt.co.jp>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [patch 0/4] aha152x.c - Cleanup, need help in testing and auditing
Date: Mon, 16 Jul 2007 12:22:20 +0300 [thread overview]
Message-ID: <469B38CC.50501@panasas.com> (raw)
In-Reply-To: <20070712135750.2a4a4a54.rdunlap@xenotime.net>
[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]
Randy Dunlap wrote:
> On Thu, 12 Jul 2007 12:42:07 +0300 Boaz Harrosh wrote:
>
>> In motivation for the !use_sg cleanup and use of accessors
>> I needed to do some restructuring of the aha152x.c driver.
>>
>> I have tried to be as careful as I could, but with out
>> the hardware for testing, it is hard. Christoph and James
>> You are signed on a couple of the last patches to this driver
>> So you are probably somewhat familiar with the code. Could
>> you please review the patchset to see that nothing is broken.
>>
>> If any one has an Hardware that uses aha152x.c, please help me
>> with testing this patchset. If it does not work could you please
>> do a short bisect of which patch breaks out of the 4.
>
> I could test it on PCMCIA. However, the patches are against
> the scsi-misc git tree, correct? So I would have to clone
> that git tree first... that's not good.
>
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
If you could do some testing it is grate. The first 3 patches do not
need scsi-misc specifically. Any post 2.6.20 tree will do. The last patch
could be done together with attached patch on any 2.6.22 tree.
(Apply attached patch anywhere before the last patch (4/4) of the patchset)
Though I do recommend scsi-misc tree.
Testing:
Doing a regular Mount, FS testing is good for checking the last (4/4)
patch, and it would be good news if it works, but ...
I'm afraid that it will not exercise the code change all that much,
since my patches touch the Error-handling and Reset code paths.
Maybe someone can help:
How can we cause an ->eh_device_reset_handler() call from scsi-ml?
As for the patch 3/4 we need a SAM_STAT_CHECK_CONDITION return
from a device. If you have a device with known bad sectors than
a dd over the bad block should exercise that. Again anyone can
think of an easy way to exercise a Status==SAM_STAT_CHECK_CONDITION?
Thanks for any testing you can do. Even if it's only the first 3
it could be nice
Boaz
[-- Attachment #2: scsi-accesors-backport-out-of-tree.patch --]
[-- Type: text/plain, Size: 1058 bytes --]
[SCSI] scsi_cmnd: add data buffer accessors
This adds a set of accessors for the scsi data buffer. This is in
preparation for chaining sg lists and bidirectional requests
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index a2e0c10..53e1705 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -135,4 +135,21 @@ extern void scsi_kunmap_atomic_sg(void *virt);
extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t);
extern void scsi_free_sgtable(struct scatterlist *, int);
+#define scsi_sg_count(cmd) ((cmd)->use_sg)
+#define scsi_sglist(cmd) ((struct scatterlist *)(cmd)->request_buffer)
+#define scsi_bufflen(cmd) ((cmd)->request_bufflen)
+
+static inline void scsi_set_resid(struct scsi_cmnd *cmd, int resid)
+{
+ cmd->resid = resid;
+}
+
+static inline int scsi_get_resid(struct scsi_cmnd *cmd)
+{
+ return cmd->resid;
+}
+
+#define scsi_for_each_sg(cmd, sg, nseg, __i) \
+ for (__i = 0, sg = scsi_sglist(cmd); __i < (nseg); __i++, (sg)++)
+
#endif /* _SCSI_SCSI_CMND_H */
next prev parent reply other threads:[~2007-07-16 9:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 9:42 [patch 0/4] aha152x.c - Cleanup, need help in testing and auditing Boaz Harrosh
2007-07-12 9:49 ` [patch 1/4] aha152x.c - Preliminary fixes and some comments Boaz Harrosh
2007-07-12 9:55 ` [patch 2/4] aha152x.c - Clean Reset path Boaz Harrosh
2007-07-12 10:05 ` [patch 3/4] aha152x.c - Fix check_condition code-path Boaz Harrosh
2007-07-12 10:09 ` [patch 4/4] aha152x.c - use data accessors and !use_sg cleanup Boaz Harrosh
2007-07-12 13:17 ` [patch 0/4] aha152x.c - Cleanup, need help in testing and auditing Boaz Harrosh
2007-07-12 20:57 ` Randy Dunlap
2007-07-16 9:22 ` Boaz Harrosh [this message]
2007-07-16 9:35 ` Christoph Hellwig
2007-07-18 0:16 ` Randy Dunlap
2007-07-18 9:29 ` Boaz Harrosh
2007-07-18 12:39 ` Boaz Harrosh
2007-07-18 17:33 ` Randy Dunlap
2007-07-18 21:58 ` Randy Dunlap
2007-07-19 2:43 ` Randy Dunlap
2007-07-19 3:03 ` Randy Dunlap
2007-07-19 13:04 ` Boaz Harrosh
2007-07-19 15:37 ` Randy Dunlap
2007-07-19 15:57 ` Boaz Harrosh
2007-07-19 17:49 ` Randy Dunlap
2007-07-24 10:12 ` Boaz Harrosh
2007-07-24 16:17 ` Randy Dunlap
2007-08-16 5:22 ` Randy Dunlap
2007-08-16 14:39 ` James Bottomley
2007-08-16 17:20 ` Randy Dunlap
2007-08-16 17:18 ` James Bottomley
2007-08-17 19:59 ` Randy Dunlap
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=469B38CC.50501@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@SteelEye.com \
--cc=fischer@norbit.de \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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).