ide: keep track of number of bytes instead of sectors in struct ide_cmd
* Pass number of bytes instead of sectors to ide_init_sg_cmd(). * Pass number of bytes to process to ide_pio_sector() and rename it to ide_pio_bytes(). * Rename ->nsect field to ->nbytes in struct ide_cmd and use ->nbytes, ->nleft and ->cursg_ofs to keep track of number of bytes instead of sectors. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -350,7 +350,7 @@ struct ide_cmd {
|
||||
int orig_sg_nents;
|
||||
int sg_dma_direction; /* DMA transfer direction */
|
||||
|
||||
unsigned int nsect;
|
||||
unsigned int nbytes;
|
||||
unsigned int nleft;
|
||||
struct scatterlist *cursg;
|
||||
unsigned int cursg_ofs;
|
||||
@@ -1409,7 +1409,7 @@ int ide_pci_resume(struct pci_dev *);
|
||||
#endif
|
||||
|
||||
void ide_map_sg(ide_drive_t *, struct ide_cmd *);
|
||||
void ide_init_sg_cmd(struct ide_cmd *, int);
|
||||
void ide_init_sg_cmd(struct ide_cmd *, unsigned int);
|
||||
|
||||
#define BAD_DMA_DRIVE 0
|
||||
#define GOOD_DMA_DRIVE 1
|
||||
|
||||
Reference in New Issue
Block a user