提交 0274aa25 编写于 作者: J Jeff Garzik 提交者: Jeff Garzik

libata: Update 'passthru' branch for latest libata

上级 80bd6d7f
......@@ -582,7 +582,11 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc)
sb[0] = 0x70;
sb[7] = 0x0a;
#if 0 /* when C/H/S support is merged */
if (tf->flags & ATA_TFLAG_LBA && !(tf->flags & ATA_TFLAG_LBA48)) {
#endif
if (!(tf->flags & ATA_TFLAG_LBA48)) {
/* A small (28b) LBA will fit in the 32b info field */
sb[0] |= 0x80; /* set valid bit */
sb[3] = tf->device & 0x0f;
......@@ -977,8 +981,8 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
return;
/* data is present; dma-map it */
if (cmd->sc_data_direction == SCSI_DATA_READ ||
cmd->sc_data_direction == SCSI_DATA_WRITE) {
if (cmd->sc_data_direction == DMA_FROM_DEVICE ||
cmd->sc_data_direction == DMA_TO_DEVICE) {
if (unlikely(cmd->request_bufflen < 1)) {
printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n",
ap->id, dev->devno);
......@@ -1609,7 +1613,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_device *dev = qc->dev;
int using_pio = (dev->flags & ATA_DFLAG_PIO);
int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE);
int nodata = (cmd->sc_data_direction == DMA_NONE);
if (!using_pio)
/* Check whether ATAPI DMA is safe */
......@@ -1621,7 +1625,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
qc->complete_fn = atapi_qc_complete;
qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
if (cmd->sc_data_direction == SCSI_DATA_WRITE) {
if (cmd->sc_data_direction == DMA_TO_DEVICE) {
qc->tf.flags |= ATA_TFLAG_WRITE;
DPRINTK("direction: write\n");
}
......@@ -1645,7 +1649,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
#ifdef ATAPI_ENABLE_DMADIR
/* some SATA bridges need us to indicate data xfer direction */
if (cmd->sc_data_direction != SCSI_DATA_WRITE)
if (cmd->sc_data_direction != DMA_TO_DEVICE)
qc->tf.feature |= ATAPI_DMADIR;
#endif
}
......@@ -1821,7 +1825,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, u8 *scsicmd)
*/
tf->flags |= (ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE);
if (cmd->sc_data_direction == SCSI_DATA_WRITE)
if (cmd->sc_data_direction == DMA_TO_DEVICE)
tf->flags |= ATA_TFLAG_WRITE;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册