dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/scsi/libsas
James Bottomley dde2020754 libata: eliminate the home grown dma padding in favour of
that provided by the block layer

ATA requires that all DMA transfers begin and end on word boundaries.
Because of this, a large amount of machinery grew up in ide to adjust
scatterlists on this basis.  However, as of 2.5, the block layer has a
dma_alignment variable which ensures both the beginning and length of a
DMA transfer are aligned on the dma_alignment boundary.  Although the
block layer does adjust the beginning of the transfer to ensure this
happens, it doesn't actually adjust the length, it merely makes sure
that space is allocated for transfers beyond the declared length.  The
upshot of this is that scatterlists may be padded to any size between
the actual length and the length adjusted to the dma_alignment safely
knowing that memory is allocated in this region.

Right at the moment, SCSI takes the default dma_aligment which is on a
512 byte boundary.  Note that this aligment only applies to transfers
coming in from user space.  However, since all kernel allocations are
automatically aligned on a minimum of 32 byte boundaries, it is safe to
adjust them in this manner as well.

tj: * Adjusting sg after padding is done in block layer.  Make libata
      set queue alignment correctly for ATAPI devices and drop broken
      sg mangling from ata_sg_setup().
    * Use request->raw_data_len for ATAPI transfer chunk size.
    * Killed qc->raw_nbytes.
    * Separated out killing qc->n_iter.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-02-19 11:36:56 +01:00
..
Kconfig [SCSI] libsas: add host SMP processing 2008-01-11 18:29:11 -06:00
Makefile [SCSI] libsas: abstract STP task status into a function 2008-01-25 11:47:23 -06:00
sas_ata.c libata: eliminate the home grown dma padding in favour of 2008-02-19 11:36:56 +01:00
sas_discover.c [SCSI] libsas: Convert sas_proto users to sas_protocol 2008-01-11 18:22:41 -06:00
sas_dump.c [SCSI] libsas: Remove PCI dependencies 2007-07-26 09:42:43 -04:00
sas_dump.h [SCSI] aic94xx: new driver 2006-08-29 09:52:29 -05:00
sas_event.c [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_expander.c [SCSI] libsas: don't use made up error codes 2008-01-11 18:29:15 -06:00
sas_host_smp.c [SCSI] libsas: add host SMP processing 2008-01-11 18:29:11 -06:00
sas_init.c Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-22 11:36:49 -07:00
sas_internal.h [SCSI] libsas: add host SMP processing 2008-01-11 18:29:11 -06:00
sas_phy.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
sas_port.c [SCSI] libsas: Fix incorrect sas_port deformation in sas_form_port 2007-01-27 10:04:58 -06:00
sas_scsi_host.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-01-25 17:19:08 -08:00
sas_task.c [SCSI] libsas: abstract STP task status into a function 2008-01-25 11:47:23 -06:00