aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:38 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:38 -0400
commitb6308ee0c55acd2e943d849773c9f0a49c516317 (patch)
treee56f59a7935fccdf0145ffd4638a066bf4ba1e17 /include/linux/ide.h
parentadb1af9803d167091c2cb4de14014185054bfe2c (diff)
ide: move command related fields from ide_hwif_t to struct ide_cmd
* Move command related fields from ide_hwif_t to struct ide_cmd. * Make ide_init_sg_cmd() take command and sectors number as arguments. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 1785582e1f86..02128e9241d1 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -344,6 +344,16 @@ struct ide_cmd {
344 u8 ftf_flags; /* for TASKFILE ioctl */ 344 u8 ftf_flags; /* for TASKFILE ioctl */
345 u32 tf_flags; 345 u32 tf_flags;
346 int data_phase; 346 int data_phase;
347
348 int sg_nents; /* number of sg entries */
349 int orig_sg_nents;
350 int sg_dma_direction; /* DMA transfer direction */
351
352 unsigned int nsect;
353 unsigned int nleft;
354 struct scatterlist *cursg;
355 unsigned int cursg_ofs;
356
347 struct request *rq; /* copy of request */ 357 struct request *rq; /* copy of request */
348 void *special; /* valid_t generally */ 358 void *special; /* valid_t generally */
349}; 359};
@@ -772,17 +782,9 @@ typedef struct hwif_s {
772 /* Scatter-gather list used to build the above */ 782 /* Scatter-gather list used to build the above */
773 struct scatterlist *sg_table; 783 struct scatterlist *sg_table;
774 int sg_max_nents; /* Maximum number of entries in it */ 784 int sg_max_nents; /* Maximum number of entries in it */
775 int sg_nents; /* Current number of entries in it */
776 int orig_sg_nents;
777 int sg_dma_direction; /* dma transfer direction */
778 785
779 struct ide_cmd cmd; /* current command */ 786 struct ide_cmd cmd; /* current command */
780 787
781 unsigned int nsect;
782 unsigned int nleft;
783 struct scatterlist *cursg;
784 unsigned int cursg_ofs;
785
786 int rqsize; /* max sectors per request */ 788 int rqsize; /* max sectors per request */
787 int irq; /* our irq number */ 789 int irq; /* our irq number */
788 790
@@ -1410,7 +1412,7 @@ int ide_pci_resume(struct pci_dev *);
1410#endif 1412#endif
1411 1413
1412void ide_map_sg(ide_drive_t *, struct request *); 1414void ide_map_sg(ide_drive_t *, struct request *);
1413void ide_init_sg_cmd(ide_drive_t *, struct request *); 1415void ide_init_sg_cmd(struct ide_cmd *, int);
1414 1416
1415#define BAD_DMA_DRIVE 0 1417#define BAD_DMA_DRIVE 0
1416#define GOOD_DMA_DRIVE 1 1418#define GOOD_DMA_DRIVE 1