diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/libata.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index bc5a8d0c70..2e098f940c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -278,7 +278,6 @@ enum { | |||
| 278 | 278 | ||
| 279 | /* size of buffer to pad xfers ending on unaligned boundaries */ | 279 | /* size of buffer to pad xfers ending on unaligned boundaries */ |
| 280 | ATA_DMA_PAD_SZ = 4, | 280 | ATA_DMA_PAD_SZ = 4, |
| 281 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, | ||
| 282 | 281 | ||
| 283 | /* ering size */ | 282 | /* ering size */ |
| 284 | ATA_ERING_SIZE = 32, | 283 | ATA_ERING_SIZE = 32, |
| @@ -457,24 +456,18 @@ struct ata_queued_cmd { | |||
| 457 | unsigned long flags; /* ATA_QCFLAG_xxx */ | 456 | unsigned long flags; /* ATA_QCFLAG_xxx */ |
| 458 | unsigned int tag; | 457 | unsigned int tag; |
| 459 | unsigned int n_elem; | 458 | unsigned int n_elem; |
| 460 | unsigned int mapped_n_elem; | ||
| 461 | 459 | ||
| 462 | int dma_dir; | 460 | int dma_dir; |
| 463 | 461 | ||
| 464 | unsigned int pad_len; | ||
| 465 | unsigned int sect_size; | 462 | unsigned int sect_size; |
| 466 | 463 | ||
| 467 | unsigned int nbytes; | 464 | unsigned int nbytes; |
| 468 | unsigned int raw_nbytes; | ||
| 469 | unsigned int curbytes; | 465 | unsigned int curbytes; |
| 470 | 466 | ||
| 471 | struct scatterlist *cursg; | 467 | struct scatterlist *cursg; |
| 472 | unsigned int cursg_ofs; | 468 | unsigned int cursg_ofs; |
| 473 | 469 | ||
| 474 | struct scatterlist *last_sg; | ||
| 475 | struct scatterlist saved_last_sg; | ||
| 476 | struct scatterlist sgent; | 470 | struct scatterlist sgent; |
| 477 | struct scatterlist extra_sg[2]; | ||
| 478 | 471 | ||
| 479 | struct scatterlist *sg; | 472 | struct scatterlist *sg; |
| 480 | 473 | ||
| @@ -619,9 +612,6 @@ struct ata_port { | |||
| 619 | struct ata_prd *prd; /* our SG list */ | 612 | struct ata_prd *prd; /* our SG list */ |
| 620 | dma_addr_t prd_dma; /* and its DMA mapping */ | 613 | dma_addr_t prd_dma; /* and its DMA mapping */ |
| 621 | 614 | ||
| 622 | void *pad; /* array of DMA pad buffers */ | ||
| 623 | dma_addr_t pad_dma; | ||
| 624 | |||
| 625 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ | 615 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ |
| 626 | 616 | ||
| 627 | u8 ctl; /* cache of ATA control register */ | 617 | u8 ctl; /* cache of ATA control register */ |
| @@ -1363,12 +1353,9 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
| 1363 | qc->flags = 0; | 1353 | qc->flags = 0; |
| 1364 | qc->cursg = NULL; | 1354 | qc->cursg = NULL; |
| 1365 | qc->cursg_ofs = 0; | 1355 | qc->cursg_ofs = 0; |
| 1366 | qc->nbytes = qc->raw_nbytes = qc->curbytes = 0; | 1356 | qc->nbytes = qc->curbytes = 0; |
| 1367 | qc->n_elem = 0; | 1357 | qc->n_elem = 0; |
| 1368 | qc->mapped_n_elem = 0; | ||
| 1369 | qc->err_mask = 0; | 1358 | qc->err_mask = 0; |
| 1370 | qc->pad_len = 0; | ||
| 1371 | qc->last_sg = NULL; | ||
| 1372 | qc->sect_size = ATA_SECT_SIZE; | 1359 | qc->sect_size = ATA_SECT_SIZE; |
| 1373 | 1360 | ||
| 1374 | ata_tf_init(qc->dev, &qc->tf); | 1361 | ata_tf_init(qc->dev, &qc->tf); |
| @@ -1423,19 +1410,6 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
| 1423 | return mask; | 1410 | return mask; |
| 1424 | } | 1411 | } |
| 1425 | 1412 | ||
| 1426 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | ||
| 1427 | { | ||
| 1428 | ap->pad_dma = 0; | ||
| 1429 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | ||
| 1430 | &ap->pad_dma, GFP_KERNEL); | ||
| 1431 | return (ap->pad == NULL) ? -ENOMEM : 0; | ||
| 1432 | } | ||
| 1433 | |||
| 1434 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | ||
| 1435 | { | ||
| 1436 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | ||
| 1437 | } | ||
| 1438 | |||
| 1439 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1413 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) |
| 1440 | { | 1414 | { |
| 1441 | return *(struct ata_port **)&host->hostdata[0]; | 1415 | return *(struct ata_port **)&host->hostdata[0]; |
