public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Linux SCSI list <linux-scsi@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] tmscsim: 64-bit cleanup
Date: 21 May 2004 10:15:11 -0500	[thread overview]
Message-ID: <1085152512.2258.21.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.44.0405192135160.6790-200000@poirot.grange>

On Wed, 2004-05-19 at 14:50, Guennadi Liakhovetski wrote:
> Ok, here comes the first one. I chose this one because it fixes an actual
> bug in the driver. This bug was (partially) introduced by myself when
> porting to 2.6. Partly the reason was that I disliked using
> function-like macros as lvalues:
> 
> sg_dma_address(x) = ...
> sg_dma_len(x) = ...
> 
> [OT] wouldn't it be better to introduce some macros like
> set_sg_dma_{address|len}(x, y)?

Actually, no.  struct scatterlist is for the OS platform to use to
characterise DMA; it's actually a private structure entirely within the
gift of the architecture to define.  It usually contains bits of
extraneous data that the driver never sees.  The driver should convert
struct scatterlist into its own version of the scatterlist that needs
feeding to the hardware rather than try and use struct scatterlist.

You'll find that lvalue use of sg_dma_len() fails on some platforms that
actually compute it from page/offset values in the scatterlist.

Could you (eventually) update tmscsim not to use it?

Thanks,

James



  parent reply	other threads:[~2004-05-21 15:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040518184527.GC4859@tpkurt.garloff.de>
2004-05-18 19:47 ` [BK PATCH] SCSI updates for 2.6.6 Guennadi Liakhovetski
2004-05-18 20:38   ` James Bottomley
2004-05-19 19:50     ` [PATCH] tmscsim: 64-bit cleanup Guennadi Liakhovetski
2004-05-19 21:34       ` [PATCH] tmscsim: no internal queue Guennadi Liakhovetski
2004-05-21 15:15       ` James Bottomley [this message]
2004-05-21 22:53         ` [PATCH] tmscsim: 64-bit cleanup Guennadi Liakhovetski
2004-05-22  8:09         ` Kurt Garloff
2004-05-22 15:43           ` James Bottomley
2004-05-22 18:10             ` Kurt Garloff
2004-05-22 19:34             ` [PATCH] tmscsim: new interfaces Guennadi Liakhovetski
2004-05-23 10:37               ` Christoph Hellwig
2004-05-23 21:19                 ` Guennadi Liakhovetski
2004-05-26 11:45                   ` Christoph Hellwig
2004-05-26 19:37                     ` [PATCH] fix comment in scsi_host.h Guennadi Liakhovetski
2004-05-26 21:07                     ` [PATCH] tmscsim: new interfaces Guennadi Liakhovetski
2004-05-27 21:20                     ` Guennadi Liakhovetski
2004-05-28 13:00                       ` Christoph Hellwig
2004-05-29 15:36                       ` James Bottomley
2004-05-30 21:01                 ` [PATCH] tmscsim: Store pDCB in device->hostdata Guennadi Liakhovetski
2004-05-31  9:22                   ` Christoph Hellwig
2004-05-31 21:13                 ` [PATCH] tmscsim: init / exit cleanup Guennadi Liakhovetski
2004-06-03 13:38                   ` Christoph Hellwig
2004-06-03 20:23                     ` Guennadi Liakhovetski
2004-06-06 17:09                       ` Christoph Hellwig
2004-06-08  6:37                   ` Kurt Garloff
2004-05-22 19:38             ` [PATCH] tmscsim: 64-bit cleanup Guennadi Liakhovetski
2004-06-04 22:17         ` Guennadi Liakhovetski
2004-06-05  8:12           ` Guennadi Liakhovetski
2004-06-05 14:02           ` James Bottomley
2004-06-05 20:37             ` Guennadi Liakhovetski
2004-06-05 21:06               ` James Bottomley
2004-06-06 15:06                 ` Guennadi Liakhovetski
2004-06-14 21:37                   ` Guennadi Liakhovetski
2004-05-21  1:06     ` [BK PATCH] SCSI updates for 2.6.6 Chiaki
2004-05-18 22:17   ` Matthew Wilcox

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=1085152512.2258.21.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hch@infradead.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