Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93592
b: refs/heads/master
c: 784506c
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 26, 2008
1 parent 9dfe7ea commit 69796a2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 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: 4764b68405ac918e9ac9939b1a2d1469102e5af7
refs/heads/master: 784506cbddd17bcd5929f827df39b0c7014e3f1e
3 changes: 0 additions & 3 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,6 @@ static int ide_tune_dma(ide_drive_t *drive)
if (!speed)
return 0;

if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
return 1;

if (ide_set_dma_mode(drive, speed))
return 0;

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,6 @@ static ide_startstop_t do_special (ide_drive_t *drive)
s->b.set_tune = 0;

if (set_pio_mode_abuse(drive->hwif, req_pio)) {

if (hwif->set_pio_mode == NULL)
return ide_stopped;

/*
* take ide_lock for drive->[no_]unmask/[no_]io_32bit
*/
Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/ide/ide-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ void ide_set_pio(ide_drive_t *drive, u8 req_pio)
ide_hwif_t *hwif = drive->hwif;
u8 host_pio, pio;

if (hwif->set_pio_mode == NULL)
if (hwif->set_pio_mode == NULL ||
(hwif->host_flags & IDE_HFLAG_NO_SET_MODE))
return;

BUG_ON(hwif->pio_mask == 0x00);
Expand Down Expand Up @@ -343,6 +344,9 @@ int ide_set_pio_mode(ide_drive_t *drive, const u8 mode)
{
ide_hwif_t *hwif = drive->hwif;

if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
return 0;

if (hwif->set_pio_mode == NULL)
return -1;

Expand Down Expand Up @@ -370,6 +374,9 @@ int ide_set_dma_mode(ide_drive_t *drive, const u8 mode)
{
ide_hwif_t *hwif = drive->hwif;

if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
return 0;

if (hwif->set_dma_mode == NULL)
return -1;

Expand Down Expand Up @@ -400,7 +407,8 @@ int ide_set_xfer_rate(ide_drive_t *drive, u8 rate)
{
ide_hwif_t *hwif = drive->hwif;

if (hwif->set_dma_mode == NULL)
if (hwif->set_dma_mode == NULL ||
(hwif->host_flags & IDE_HFLAG_NO_SET_MODE))
return -1;

rate = ide_rate_filter(drive, rate);
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,13 @@ int set_using_dma(ide_drive_t *drive, int arg)
int set_pio_mode(ide_drive_t *drive, int arg)
{
struct request rq;
ide_hwif_t *hwif = drive->hwif;

if (arg < 0 || arg > 255)
return -EINVAL;

if (drive->hwif->set_pio_mode == NULL)
if (hwif->set_pio_mode == NULL ||
(hwif->host_flags & IDE_HFLAG_NO_SET_MODE))
return -ENOSYS;

if (drive->special.b.set_tune)
Expand Down

0 comments on commit 69796a2

Please sign in to comment.