]> git.karo-electronics.de Git - linux-beck.git/commit
libata: change ATA_QCFLAG_DMAMAP semantics
authorTejun Heo <htejun@gmail.com>
Wed, 5 Dec 2007 07:43:10 +0000 (16:43 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:14 +0000 (05:24 -0500)
commitf92a26365a72333f418abe82700c6030d4a1a807
tree73bb3ae684abfabf2d0aecac33af1a3f2112afc4
parent001102d7859be0e7f7b9f2d62b841f2c0f9c2640
libata: change ATA_QCFLAG_DMAMAP semantics

ATA_QCFLAG_DMAMAP was a bit peculiar in that it got set during qc
initialization and cleared if DMA mapping wasn't necessary.  Make it
more straight forward by making the following changes.

* Don't set it during initialization.  Set it after DMA is actually
  mapped.

* Add BUG_ON() to guarantee that there is data to transfer if DMAMAP
  is set.  This always holds for the current code.  The BUG_ON() is
  for docummentation and sanity check.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c