From: Martin Schewe <m@xsms.de>
To: Jens Axboe <axboe@suse.de>
Cc: Aaron Tiensivu <mojomofo@mojomofo.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IDE TCQ #4
Date: Tue, 30 Apr 2002 21:58:44 +0200 [thread overview]
Message-ID: <20020430195844.GA18504@linux01.gwdg.de> (raw)
In-Reply-To: <20020415125606.GR12608@suse.de> <02db01c1e498$7180c170$58dc703f@bnscorp.com> <20020416102510.GI17043@suse.de>
[-- Attachment #1.1: Type: text/plain, Size: 1142 bytes --]
Hi,
On Tue, Apr 16, 2002 at 12:25:10PM +0200, Jens Axboe wrote:
> Mark Hahn wrote this little script to detect support for TCQ, modified
> by me to not use the hdX symlinks.
>
> [...]
>
> #!/usr/bin/perl
>
> # bit 1 (TCQ) and 14 (word is valid) must be set to indicate tcq support
> $mask = (1 << 1) | (1 << 14);
>
> # bit 15 must be cleared too
> $bits = $mask | (1 << 15);
>
> # mail me the results!
> $addr = "linux-tcq\@kernel.dk";
>
> foreach $i (</proc/ide/ide*>) {
> foreach $d (<$i/hd*>) {
> @words = split(/\s/,`cat $d/identify`);
> $w83 = hex($words[83]);
> if (!(($w83 & $bits) ^ $mask)) {
> $model = `cat $d/model`;
> push(@goodies, $model);
> chomp($model);
> print "$d ($model) supports TCQ\n";
> }
> }
> }
>
> if ($addr && $#goodies) {
$#goodies refers to the last index of the array and scalar @goodies to
the actual number of elements. So you probably got only mails from
people having more than two drives supporting TCQ... :)
> open(M, "| mail -s TCQ-report $addr");
> print M @goodies;
> close(M);
> }
Fixed version attached.
Martin
[-- Attachment #1.2: tcq_support --]
[-- Type: text/plain, Size: 613 bytes --]
#!/usr/bin/perl
# bit 1 (TCQ) and 14 (word is valid) must be set to indicate tcq support
$mask = (1 << 1) | (1 << 14);
# bit 15 must be cleared too
$bits = $mask | (1 << 15);
# mail me the results!
$addr = "linux-tcq\@kernel.dk";
foreach $i (</proc/ide/ide*>) {
foreach $d (<$i/hd*>) {
@words = split(/\s/,`cat $d/identify`);
$w83 = hex($words[83]);
if (!(($w83 & $bits) ^ $mask)) {
$model = `cat $d/model`;
push(@goodies, $model);
chomp($model);
print "$d ($model) supports TCQ\n";
}
}
}
if ($addr && @goodies) {
open(M, "| mail -s TCQ-report $addr");
print M @goodies;
close(M);
}
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
next prev parent reply other threads:[~2002-04-30 19:58 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-15 12:56 [PATCH] IDE TCQ #4 Jens Axboe
2002-04-15 12:24 ` Martin Dalecki
2002-04-15 13:33 ` Jens Axboe
2002-04-15 12:39 ` Martin Dalecki
2002-04-15 16:13 ` Aaron Tiensivu
2002-04-15 16:18 ` Jens Axboe
2002-04-15 16:44 ` Jens Axboe
2002-04-16 10:25 ` Jens Axboe
[not found] ` <20020416200051.7ae38411.sebastian.droege@gmx.de>
[not found] ` <20020416180914.GR1097@suse.de>
2002-04-16 18:43 ` Sebastian Droege
2002-04-17 7:48 ` Martin Dalecki
2002-04-17 11:28 ` Sebastian Droege
2002-04-17 10:32 ` Martin Dalecki
2002-04-17 11:40 ` Sebastian Droege
2002-04-17 10:42 ` Martin Dalecki
2002-04-18 12:17 ` Sebastian Droege
2002-04-18 11:20 ` Martin Dalecki
2002-04-18 12:26 ` Sebastian Droege
2002-04-18 12:57 ` Jens Axboe
2002-04-18 12:57 ` Jens Axboe
2002-04-18 11:59 ` Martin Dalecki
2002-04-18 13:07 ` Jens Axboe
2002-04-18 12:08 ` Martin Dalecki
2002-04-18 13:12 ` Jens Axboe
2002-04-18 12:16 ` Martin Dalecki
2002-04-18 13:26 ` Jens Axboe
2002-04-18 12:40 ` Martin Dalecki
2002-04-18 12:45 ` Martin Dalecki
2002-04-18 14:17 ` Alan Cox
2002-04-18 13:01 ` Jens Axboe
2002-04-17 7:32 ` Helge Hafting
2002-04-17 13:01 ` Dave Jones
2002-04-17 13:05 ` Jens Axboe
2002-04-30 19:58 ` Martin Schewe [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-15 18:41 Petr Vandrovec
2002-04-15 18:26 ` Jens Axboe
2002-04-16 5:11 ` Martin Dalecki
2002-04-15 19:11 Petr Vandrovec
2002-04-15 19:28 Petr Vandrovec
2002-04-16 10:25 ` Jens Axboe
2002-04-16 11:01 ` Martin Dalecki
2002-04-16 12:28 ` Jens Axboe
2002-04-16 11:44 ` Martin Dalecki
2002-04-15 19:29 Petr Vandrovec
2002-04-15 19:00 ` Jens Axboe
2002-04-18 22:05 Andries.Brouwer
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=20020430195844.GA18504@linux01.gwdg.de \
--to=m@xsms.de \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mojomofo@mojomofo.com \
/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.