Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: axboe@suse.de, linux-scsi@vger.kernel.org
Subject: [PATCH 8/10] st must check phys and hw segments limits now
Date: Tue, 08 Nov 2005 04:06:51 -0600	[thread overview]
Message-ID: <1131444412.23111.69.camel@max> (raw)

We have two segments limitations. Previously
st made its own scatterlists that got sent to LLDs
so it could ignore max_phys_segments.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 2d8592d..5e61e48 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3889,7 +3889,8 @@ static int st_probe(struct device *dev)
 		return -ENODEV;
 	}
 
-	i = SDp->host->sg_tablesize;
+	i = min(SDp->request_queue->max_hw_segments,
+		SDp->request_queue->max_phys_segments);
 	if (st_max_sg_segs < i)
 		i = st_max_sg_segs;
 	buffer = new_tape_buffer(1, (SDp->host)->unchecked_isa_dma, i);



                 reply	other threads:[~2005-11-08 10:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1131444412.23111.69.camel@max \
    --to=michaelc@cs.wisc.edu \
    --cc=axboe@suse.de \
    --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