From: Douglas Gilbert <dougg@torque.net>
To: Jens Axboe <axboe@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>,
"David S. Miller" <davem@redhat.com>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: block layer sg, bsg
Date: Thu, 05 Aug 2004 09:11:14 +1000 [thread overview]
Message-ID: <41116D12.9020403@torque.net> (raw)
In-Reply-To: <20040804155814.GW10340@suse.de>
Jens Axboe wrote:
> On Wed, Aug 04 2004, Jeff Garzik wrote:
>
>>On Wed, Aug 04, 2004 at 08:44:29AM -0700, David S. Miller wrote:
>>
>>>Or use a more portable well-defined type which does not change
>>>size nor layout between 32-bit and 64-bit environments.
>>
>>IMO if this (the above) is not done, the interface needs work.
>>
>>For interfaces that replace ioctl(2) with read(2)/write(2), for passing
>>data structures to/from the kernel, Al has rightly suggested that these
>>structures be not only fixed size (as David described above), but also
>>fixed-endian.
>
>
> I completely agree with that, we need a different structure for other
> devices as well. Show me what you'd like for libata, for instance.
If a new structure with anything but 'S' (0x53) in the first 4
bytes was chosen then the bsg driver could handle the new
structure and sg_io_hdr.
For example:
struct bsg_io_hdr {
int8_t interface_id[4]; /* [i] 'B' in each element (required) */
uint8_t dxfer_direction;
.............
};
SCSI commands are all big endian and that seems to work
fine. Could pointers be passed as 8 byte big endian
unsigned integers?
Doug Gilbert
prev parent reply other threads:[~2004-08-04 23:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 8:50 block layer sg, bsg Jens Axboe
2004-08-04 14:52 ` David S. Miller
2004-08-04 15:04 ` Jens Axboe
2004-08-04 15:44 ` David S. Miller
2004-08-04 15:48 ` Jens Axboe
2004-08-04 15:56 ` Jeff Garzik
2004-08-04 15:58 ` Jens Axboe
2004-08-04 23:11 ` Douglas Gilbert [this message]
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=41116D12.9020403@torque.net \
--to=dougg@torque.net \
--cc=axboe@suse.de \
--cc=davem@redhat.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).