All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: James Bottomley <James.Bottomley@SteelEye.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 7/8] a100u2w: advansys: initio: Wrong use of SG_ALL
Date: Thu, 17 Jan 2008 18:53:16 +0200	[thread overview]
Message-ID: <478F87FC.4000602@panasas.com> (raw)
In-Reply-To: <478F8435.5000907@panasas.com>


  These drivers used the SG_ALL constant, But actually
  meant some other define.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 drivers/scsi/a100u2w.c  |    3 +--
 drivers/scsi/advansys.c |    8 +++-----
 drivers/scsi/initio.c   |    2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index f608d4a..82d5210 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1068,7 +1068,7 @@ static struct scsi_host_template inia100_template = {
 	.eh_device_reset_handler = inia100_device_reset,
 	.can_queue		= 1,
 	.this_id		= 1,
-	.sg_tablesize		= SG_ALL,
+	.sg_tablesize		= TOTAL_SG_ENTRY,
 	.cmd_per_lun 		= 1,
 	.use_clustering		= ENABLE_CLUSTERING,
 };
@@ -1150,7 +1150,6 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
 	shost->max_lun = 16;
 	shost->irq = pdev->irq;
 	shost->this_id = host->scsi_id;	/* Assign HCS index */
-	shost->sg_tablesize = TOTAL_SG_ENTRY;
 
 	/* Initial orc chip           */
 	error = request_irq(pdev->irq, inia100_intr, IRQF_SHARED,
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 492702b..45d58d3 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -13735,13 +13735,11 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
 	}
 
 	/*
-	 * The value of 'sg_tablesize' can not exceed the SCSI
-	 * mid-level driver definition of SG_ALL. SG_ALL also
-	 * must not be exceeded, because it is used to define the
+	 * The value of 'sg_tablesize' can not exceed the
 	 * size of the scatter-gather table in 'struct asc_sg_head'.
 	 */
-	if (shost->sg_tablesize > SG_ALL) {
-		shost->sg_tablesize = SG_ALL;
+	if (shost->sg_tablesize > ASC_MAX_SG_LIST) {
+		shost->sg_tablesize = ASC_MAX_SG_LIST;
 	}
 
 	ASC_DBG(1, "sg_tablesize: %d\n", shost->sg_tablesize);
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 52238ee..02cb133 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2829,7 +2829,7 @@ static struct scsi_host_template initio_template = {
 	.bios_param		= i91u_biosparam,
 	.can_queue		= MAX_TARGETS * i91u_MAXQUEUE,
 	.this_id		= 1,
-	.sg_tablesize		= SG_ALL,
+	.sg_tablesize		= TOTAL_SG_ENTRY,
 	.cmd_per_lun		= 1,
 	.use_clustering		= ENABLE_CLUSTERING,
 };
-- 
1.5.3.3



  parent reply	other threads:[~2008-01-17 16:53 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
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 ` Boaz Harrosh [this message]
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=478F87FC.4000602@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@SteelEye.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.