logo       

Re: [PATCH] Re: AMD 53c974 SCSI driver in 2.6: msg#00263

Subject: Re: [PATCH] Re: AMD 53c974 SCSI driver in 2.6
On Mon, 17 Nov 2003 01:03:17 +0100 (CET) Guennadi Liakhovetski 
<g.liakhovetski@xxxxxx> wrote:

| On Sat, 15 Nov 2003, Guennadi Liakhovetski wrote:
| 
| > several first commands seem to complete fine, but then I get an Oops,
| > because dma_map_page is called with direction == DMA_NONE. Below is
| 
| Ok, I found where the data_direction is set to DMA_NONE, but I still don't
| understand why, and how this is supposed to work. So, in
| sd_revalidate_disk() sr_data_direction is initialised by
| scsi_allocate_request() to DMA_BIDIRECTIONAL:
|                 sreq->sr_data_direction = DMA_BIDIRECTIONAL;
| , but already in sd_spinup_disk() it is reset to DMA_NONE:
|                         SRpnt->sr_data_direction = DMA_NONE;

Doing a TEST_UNIT_READY doesn't require any DMA transfers, in the
sense of buffers (i.e., buffer length is 0), so DMA_NONE makes sense,
doesn't it?

| I haven't found yet how sr_data_direction gets copied to sc_data_direction
| (so far it only looks like struct scsi_cmnd is just overlayd on struct
| scsi_request, but I may be wrong there... Or is it really so?

scsi.c::scsi_init_cmd_from_req(), line 504 in 2.6.0-test9 (?),
although I haven't followed the code flow all the way from tmscsim
to that function.

--
~Randy
MOTD:  Always include version info.

PS:  I prefer this on linux-scsi instead of linux-kernel.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



<Prev in Thread] Current Thread [Next in Thread>