This patchset is to solve the sense buffer DMA issue: http://www.mail-archive.com/linux-scsi@xxxxxxxxxxxxxxx/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). - 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