linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix the sense buffer DMA issue
@ 2008-01-03  4:56 FUJITA Tomonori
  2008-01-03  4:56 ` [PATCH 1/2] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE FUJITA Tomonori
  2008-01-03  4:56 ` [PATCH 2/2] use dynamically allocated sense buffer FUJITA Tomonori
  0 siblings, 2 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2008-01-03  4:56 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, benh, fujita.tomonori

This patchset is to solve the sense buffer DMA issue:

http://www.mail-archive.com/linux-scsi@vger.kernel.org/msg12632.html

It's not good to fatten up scsi_cmnd so instead this allocates
sense_buffer dynamically with GFP_DMA.

We don't always need sense_buffer per scsi_cmnd but some LLDs assume
that scsi_cmnd:sense_buffer is always available (e.g, some do
dma_mapping for sense_buffer). So allocating sense_buffer only when
necessary is the best option but needs many changes to LLDs.

We need to solve the sense buffer DMA issue now (since critical for
some architectures) so this patchset tries to solve it with minimum
changes though in the long run, we need more changes to sense_buffer
handling.

This removes static array sense_buffer in scsi_cmnd and dynamically
allocates sense_buffer with GFP_DMA.

scsi_add_host allocates as many buffers as
scsi_host->can_queue. __scsi_get_command attaches sense_buffer to a
scsi_cmnd and __scsi_put_command detaches the sense_buffer from it. So
LLDs should work as before though we need one minor change, replacing
sizeof sense_buffer in some LLDs with SCSI_SENSE_BUFFERSIZE.

There is a small possibility that a host need more sense buffers than
can_queue. The failure of the buffer allocation works just like the
failure of scsi_cmnd allocation. So everything should work as before
(the block layer takes care about it).

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-07  6:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03  4:56 [PATCH 0/2] fix the sense buffer DMA issue FUJITA Tomonori
2008-01-03  4:56 ` [PATCH 1/2] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE FUJITA Tomonori
2008-01-03 15:01   ` Boaz Harrosh
2008-01-03 15:34     ` FUJITA Tomonori
2008-01-03 16:10   ` Salyzyn, Mark
2008-01-04 14:05     ` FUJITA Tomonori
2008-01-03  4:56 ` [PATCH 2/2] use dynamically allocated sense buffer FUJITA Tomonori
2008-01-03 14:00   ` FUJITA Tomonori
2008-01-07  6:37   ` FUJITA Tomonori

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).