public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: Jens Axboe <axboe@suse.de>
Cc: dougg@torque.net, linux-scsi@vger.kernel.org
Subject: Re: sense visible despite ide-floppy in 2.6 maybe
Date: 09 Jun 2004 12:29:57 -0600	[thread overview]
Message-ID: <1086805796.3741.5.camel@patibmrh9> (raw)
In-Reply-To: <1086798154.7074.24.camel@patibmrh9>

Jens A:

> a) kernel.org 2.6.7-rc3 plus the patch of this thread,
> b) PATAPI drive connected as /dev/hdd,
> c) open of /dev/hdd with flags O_NONBLOCK|O_RDWR, ioctl SG_IO
> d) cdb = x 1B 00:00:00 00 00 // Stop
> e) cdb = x 1B 00:00:00 01 00 // Start

Yes now "Hn" (i.e. expecting no data) works here, every time I try.

Cool instant demo of how helpful linux-scsi folk are, thank you.

> For data transfer, it's more tricky. Well actually, if you restrict
> yourself to non-bio backed request, then it becomes pretty trivial!
> ide-floppy expects a contig buffer, a bio is scattered by nature.

Yes "Hi" (i.e. expecting data in) gives me zeroes.

> ...

Also something's broken (far far outside of the kernel) in plscsi.  I
found success only by patching the trivial sgio.c that I posted in this
thread, as shown below.

Pat LaVarre

--- sgio.c	2004-06-08 09:33:33.000000000 -0600
+++ sgio-up.c	2004-06-09 12:23:28.901649448 -0600
@@ -17,14 +17,14 @@ static void populate(sg_io_hdr_t * sih)
 	memset(&static_cdb, '\0', sizeof static_cdb);
 	sih->cmdp = static_cdb;
 	sih->cmd_len = 6;
-	memcpy(sih->cmdp, "\x12\0\0\0\x24\0", sih->cmd_len);
+	memcpy(sih->cmdp, "\x1B\0\0\0\x01\0", sih->cmd_len);
 
 	memset(&static_data, '\0', sizeof static_data);
 	sih->dxferp = static_data;
-	sih->dxfer_len = 0x24;
-	sih->dxfer_direction = SG_DXFER_NONE;
+	sih->dxfer_len = 0x00;
 	sih->dxfer_direction = SG_DXFER_TO_DEV;
 	sih->dxfer_direction = SG_DXFER_FROM_DEV;
+	sih->dxfer_direction = SG_DXFER_NONE;
 
 	memset(&static_sense, '\0', sizeof static_sense);
 	sih->sbp = static_sense;
--- sgio-up.c	2004-06-09 12:23:28.901649448 -0600
+++ sgio-dn.c	2004-06-09 12:23:58.069215304 -0600
@@ -17,7 +17,7 @@ static void populate(sg_io_hdr_t * sih)
 	memset(&static_cdb, '\0', sizeof static_cdb);
 	sih->cmdp = static_cdb;
 	sih->cmd_len = 6;
-	memcpy(sih->cmdp, "\x1B\0\0\0\x01\0", sih->cmd_len);
+	memcpy(sih->cmdp, "\x1B\0\0\0\x00\0", sih->cmd_len);
 
 	memset(&static_data, '\0', sizeof static_data);
 	sih->dxferp = static_data;



  parent reply	other threads:[~2004-06-09 18:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08 15:53 sense visible despite ide-floppy in 2.6 maybe Pat LaVarre
2004-06-09  8:00 ` Jens Axboe
2004-06-09  8:20   ` Jens Axboe
2004-06-09 16:22     ` Pat LaVarre
2004-06-09 17:37       ` Jens Axboe
2004-06-09 18:29       ` Pat LaVarre [this message]
2004-06-09 18:51         ` Pat LaVarre
2004-06-09 23:30           ` Pat LaVarre
2004-06-11  9:30             ` Jens Axboe
2004-06-11  9:38               ` Jens Axboe
2004-06-13 18:48                 ` Pat LaVarre
2004-06-13 19:58                   ` Jens Axboe
2004-06-11  9:24           ` Jens Axboe
2004-06-11  9:24         ` Jens Axboe
2004-06-11  0:23 ` Douglas Gilbert
2004-06-11  2:08   ` Willem Riede
2004-06-13 18:21   ` Pat LaVarre
2004-06-13 19:06   ` Pat LaVarre
2004-06-14  6:39     ` Douglas Gilbert
2004-06-13 20:00   ` Jens Axboe
2004-06-17 19:03     ` Pat LaVarre
2004-06-17 19:12       ` Jens Axboe

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=1086805796.3741.5.camel@patibmrh9 \
    --to=p.lavarre@ieee.org \
    --cc=axboe@suse.de \
    --cc=dougg@torque.net \
    --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