public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: scsi: Drivers not ready for sg-chaining
Date: Sun, 10 Feb 2008 09:42:46 -0600	[thread overview]
Message-ID: <1202658166.3136.44.camel@localhost.localdomain> (raw)
In-Reply-To: <478F878F.6040807@panasas.com>

On Thu, 2008-01-17 at 18:51 +0200, Boaz Harrosh wrote:
> All below drivers are not sg-chain ready do to incomplete software.
>   Once fixed they can move back to SG_ALL. For now they are stuck on
>   SCSI_MAX_SG_SEGMENTS.
> 
>   Affected drivers/files:
> 	drivers/scsi/aha152x.c

This seems to process an element at a time and should be fixed by
sg_next()

> 	drivers/scsi/esp_scsi.[ch]

As does this.

> 	drivers/scsi/imm.c

And this.

> 	drivers/scsi/in2000.h

And this (.c not .h)

> 	drivers/scsi/pcmcia/nsp_cs.c

This uses a software table, so should be fine.

> 	drivers/scsi/ppa.c

This does element at a time, so should be fixed by sg_next()

> 	drivers/scsi/tmscsim.c

as does this.

Given where we are in the cycle, it's probably best just to set SG_ALL
to 128 so there's no possibility of problems.  Individual drivers can
make the tradeoff on how they handle larger lists going beyond this.

James

---

diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index d1299e9..530ff4c 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -6,6 +6,7 @@
 #include <linux/types.h>
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
+#include <scsi/scsi.h>
 
 struct request_queue;
 struct block_device;
@@ -25,12 +26,15 @@ struct blk_queue_tags;
  * NONE: Self evident.	Host adapter is not capable of scatter-gather.
  * ALL:	 Means that the host adapter module can do scatter-gather,
  *	 and that there is no limit to the size of the table to which
- *	 we scatter/gather data.
+ *	 we scatter/gather data.  The value we set here is the maximum
+ *	 single element sglist.  To use chained sglists, the adapter
+ *	 has to set a value beyond ALL (and correctly use the chain
+ *	 handling API.
  * Anything else:  Indicates the maximum number of chains that can be
  *	 used in one scatter-gather request.
  */
 #define SG_NONE 0
-#define SG_ALL 0xff
+#define SG_ALL	SCSI_MAX_SG_SEGMENTS
 
 #define MODE_UNKNOWN 0x00
 #define MODE_INITIATOR 0x01


James



  reply	other threads:[~2008-02-10 15:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 16:37 [patch 0/8] Change SG_ALL to mean "any size" Boaz Harrosh
2008-01-17 16:41 ` [PATCH 1/8] firewire: ieee1394: Move away from SG_ALL Boaz Harrosh
2008-01-17 17:51   ` Stefan Richter
2008-01-19  7:59     ` Stefan Richter
2008-01-19 15:01       ` James Bottomley
2008-01-19 15:16         ` Stefan Richter
2008-01-17 16:44 ` [PATCH 2/8] scsi-drivers Don't use SG_ALL as allocation size Boaz Harrosh
2008-01-17 17:47   ` Andrew Vasquez
2008-01-17 18:11     ` Boaz Harrosh
2008-01-17 18:30       ` Andrew Vasquez
2008-01-17 18:57   ` [PATCH 2/8 ver2] " Boaz Harrosh
2008-01-17 16:46 ` [PATCH 3/8] NCR5380: Not sg-chain ready Boaz Harrosh
2008-01-17 16:48 ` [PATCH 4/8] wd33c93: " Boaz Harrosh
2008-01-17 16:49 ` [PATCH 5/8] arm/scsi: " Boaz Harrosh
2008-01-17 16:51 ` scsi: Drivers not ready for sg-chaining Boaz Harrosh
2008-02-10 15:42   ` James Bottomley [this message]
2008-02-10 16:08     ` Boaz Harrosh
2008-02-10 16:16       ` James Bottomley
2008-02-10 16:36         ` Boaz Harrosh
2008-02-10 16:53           ` James Bottomley
2008-01-17 16:53 ` [PATCH 7/8] a100u2w: advansys: initio: Wrong use of SG_ALL Boaz Harrosh
2008-01-17 16:55 ` [PATCH 8/8] Change SG_ALL to mean "any size" Boaz Harrosh
2008-01-17 17:53 ` [patch 0/8] " Stefan Richter

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=1202658166.3136.44.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=bharrosh@panasas.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