From: Chris Mason <mason@suse.com>
To: Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
Cc: linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: [PATCH] write barriers for 2.4.x
Date: Thu, 14 Feb 2002 12:53:57 -0500 [thread overview]
Message-ID: <3489050000.1013709237@tiny> (raw)
In-Reply-To: <3398950000.1013702503@tiny>
In-Reply-To: <3045480000.1013637574@tiny> <m3vgd1ufbt.fsf@merlin.emma.line.org> <3398950000.1013702503@tiny>
On Thursday, February 14, 2002 11:01:43 AM -0500 Chris Mason <mason@suse.com> wrote:
>
> [ barrier support for sym53c8xx_2?]
>
> I can only promise this compiles against 2.4.18-pre9, and looks right
> to me. l-k and Jens brought into cc in hopes of a little verification.
Whoops, forgot the template change to tell the upper layer the device
supports ordered requests.
Here's a better patch, it includes equally untested BusLogic support
too.
--- barrier.1/drivers/scsi/BusLogic.c Wed, 05 Dec 2001 09:35:31 -0500 root (linux/z/b/7_BusLogic.c 1.2 644)
+++ barrier.1(w)/drivers/scsi/BusLogic.c Thu, 14 Feb 2002 12:38:05 -0500 root (linux/z/b/7_BusLogic.c 1.2 644)
@@ -3464,7 +3464,13 @@
}
if (TargetFlags->TaggedQueuingActive)
{
- BusLogic_QueueTag_T QueueTag = BusLogic_SimpleQueueTag;
+ BusLogic_QueueTag_T QueueTag;
+
+ if (Command->request.cmd_flags & RQ_WRITE_ORDERED)
+ QueueTag = BusLogic_OrderedQueueTag;
+ else
+ QueueTag = BusLogic_SimpleQueueTag;
+
/*
When using Tagged Queuing with Simple Queue Tags, it appears that disk
drive controllers do not guarantee that a queued command will not
Index: barrier.1/drivers/scsi/BusLogic.h
--- barrier.1/drivers/scsi/BusLogic.h Tue, 06 Nov 2001 15:47:39 -0500 root (linux/B/b/29_BusLogic.h 1.1 644)
+++ barrier.1(w)/drivers/scsi/BusLogic.h Thu, 14 Feb 2002 12:38:40 -0500 root (linux/B/b/29_BusLogic.h 1.1 644)
@@ -79,6 +79,7 @@
bios_param: BusLogic_BIOSDiskParameters, /* BIOS Disk Parameters */ \
unchecked_isa_dma: 1, /* Default Initial Value */ \
max_sectors: 128, /* I/O queue len limit */ \
+ can_order: 1, /* can order tags */ \
use_clustering: ENABLE_CLUSTERING } /* Enable Clustering */
Index: barrier.1/drivers/scsi/sym53c8xx_2/sym_glue.c
--- barrier.1/drivers/scsi/sym53c8xx_2/sym_glue.c Thu, 13 Dec 2001 11:06:51 -0500 root (linux/H/d/36_sym_glue.c 1.2 644)
+++ barrier.1(w)/drivers/scsi/sym53c8xx_2/sym_glue.c Thu, 14 Feb 2002 10:43:01 -0500 root (linux/H/d/36_sym_glue.c 1.2 644)
@@ -729,7 +729,14 @@
* Select tagged/untagged.
*/
lp = sym_lp(np, tp, ccb->lun);
- order = (lp && lp->s.reqtags) ? M_SIMPLE_TAG : 0;
+ if (lp && lp->s.reqtags) {
+ if (ccb->request.cmd_flags & RQ_WRITE_ORDERED)
+ order = M_ORDERED_TAG;
+ else
+ order = M_SIMPLE_TAG;
+ } else {
+ order = 0 ;
+ }
/*
* Queue the SCSI IO.
Index: barrier.1/drivers/scsi/sym53c8xx_2/sym53c8xx.h
--- barrier.1/drivers/scsi/sym53c8xx_2/sym53c8xx.h Thu, 13 Dec 2001 11:06:51 -0500 root (linux/I/d/17_sym53c8xx. 1.2 644)
+++ barrier.1(w)/drivers/scsi/sym53c8xx_2/sym53c8xx.h Thu, 14 Feb 2002 12:30:29 -0500 root (linux/I/d/17_sym53c8xx. 1.2 644)
@@ -119,6 +119,7 @@
this_id: 7, \
sg_tablesize: 0, \
cmd_per_lun: 0, \
+ can_order: 1, \
use_clustering: DISABLE_CLUSTERING}
#endif /* defined(HOSTS_C) || defined(MODULE) */
next prev parent reply other threads:[~2002-02-14 17:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-13 21:59 [PATCH] write barriers for 2.4.x Chris Mason
[not found] ` <m3vgd1ufbt.fsf@merlin.emma.line.org>
2002-02-14 16:01 ` Chris Mason
2002-02-14 17:53 ` Chris Mason [this message]
[not found] <20020213222535.C0A45E64F2@ns1.suse.com>
[not found] ` <3100680000.1013644053@tiny>
[not found] ` <20020213235651.AC212E6360@ns1.suse.com>
[not found] ` <3132400000.1013646727@tiny>
2002-02-15 0:56 ` Chris Mason
2002-02-15 1:21 ` Alan Cox
2002-02-15 2:25 ` Chris Mason
2002-02-15 22:03 ` Chris Mason
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=3489050000.1013709237@tiny \
--to=mason@suse.com \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ma@dt.e-technik.uni-dortmund.de \
/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.