Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76239
b: refs/heads/master
c: e5f9f5a
h: refs/heads/master
i:
  76237: af4495b
  76235: ff8871a
  76231: 619497b
  76223: 42c4039
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 25, 2008
1 parent 97be4ef commit 6e56947
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e38a66a1e69821ab57a06d5a7b11f0df9275bf4
refs/heads/master: e5f9f5a89a01abc2b9c09747452aeb9218d6bffd
10 changes: 5 additions & 5 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,9 +1019,9 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
{
idefloppy_floppy_t *floppy = drive->driver_data;
ide_hwif_t *hwif = drive->hwif;
atapi_feature_t feature;
atapi_bcount_t bcount;
ide_handler_t *pkt_xfer_routine;
u8 dma;

if (floppy->failed_pc == NULL &&
pc->c[0] != IDEFLOPPY_REQUEST_SENSE_CMD)
Expand Down Expand Up @@ -1064,20 +1064,20 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags))
ide_dma_off(drive);

feature.all = 0;
dma = 0;

if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
feature.b.dma = !hwif->dma_setup(drive);
dma = !hwif->dma_setup(drive);

if (IDE_CONTROL_REG)
HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
/* Use PIO/DMA */
HWIF(drive)->OUTB(feature.all, IDE_FEATURE_REG);
hwif->OUTB(dma, IDE_FEATURE_REG);
HWIF(drive)->OUTB(bcount.b.high, IDE_BCOUNTH_REG);
HWIF(drive)->OUTB(bcount.b.low, IDE_BCOUNTL_REG);
HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);

if (feature.b.dma) { /* Begin DMA, if necessary */
if (dma) { /* Begin DMA, if necessary */
set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
hwif->dma_start(drive);
}
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
struct request *rq = pc->rq;
atapi_bcount_t bcount;
atapi_ireason_t ireason;
atapi_feature_t feature;
unsigned int temp;
u8 stat;

Expand All @@ -424,7 +423,6 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
(void) HWIF(drive)->ide_dma_end(drive);
}

feature.all = 0;
/* Clear the interrupt */
stat = drive->hwif->INB(IDE_STATUS_REG);

Expand Down Expand Up @@ -572,30 +570,29 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
{
idescsi_scsi_t *scsi = drive_to_idescsi(drive);
ide_hwif_t *hwif = drive->hwif;
atapi_feature_t feature;
atapi_bcount_t bcount;
u8 dma = 0;

scsi->pc=pc; /* Set the current packet command */
pc->actually_transferred=0; /* We haven't transferred any data yet */
pc->current_position=pc->buffer;
bcount.all = min(pc->request_transfer, 63 * 1024); /* Request to transfer the entire buffer at once */

feature.all = 0;
if (drive->using_dma && !idescsi_map_sg(drive, pc)) {
hwif->sg_mapped = 1;
feature.b.dma = !hwif->dma_setup(drive);
dma = !hwif->dma_setup(drive);
hwif->sg_mapped = 0;
}

SELECT_DRIVE(drive);
if (IDE_CONTROL_REG)
HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);

HWIF(drive)->OUTB(feature.all, IDE_FEATURE_REG);
hwif->OUTB(dma, IDE_FEATURE_REG);
HWIF(drive)->OUTB(bcount.b.high, IDE_BCOUNTH_REG);
HWIF(drive)->OUTB(bcount.b.low, IDE_BCOUNTL_REG);

if (feature.b.dma)
if (dma)
set_bit(PC_DMA_OK, &pc->flags);

if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
Expand Down
27 changes: 0 additions & 27 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,33 +365,6 @@ typedef union {
} b;
} select_t, ata_select_t;

/*
* ATAPI Feature Register
*
* dma : Using DMA or PIO
* reserved321 : Reserved
* reserved654 : Reserved (Tag Type)
* reserved7 : Reserved
*/
typedef union {
unsigned all :8;
struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
unsigned dma :1;
unsigned reserved321 :3;
unsigned reserved654 :3;
unsigned reserved7 :1;
#elif defined(__BIG_ENDIAN_BITFIELD)
unsigned reserved7 :1;
unsigned reserved654 :3;
unsigned reserved321 :3;
unsigned dma :1;
#else
#error "Please fix <asm/byteorder.h>"
#endif
} b;
} atapi_feature_t;

/*
* ATAPI Interrupt Reason Register.
*
Expand Down

0 comments on commit 6e56947

Please sign in to comment.