Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71774
b: refs/heads/master
c: d393aa0
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 19, 2007
1 parent 1b8e5e0 commit 5af4c39
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 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: 69e88d2a754fcaf7ef8ca465586b811cf40dc479
refs/heads/master: d393aa0326436efd3cb800916b08cdac4dd1091a
15 changes: 14 additions & 1 deletion trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,20 @@ 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)

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

/*
* take ide_lock for drive->[no_]unmask/[no_]io_32bit
*/
if (req_pio == 8 || req_pio == 9) {
unsigned long flags;

spin_lock_irqsave(&ide_lock, flags);
hwif->set_pio_mode(drive, req_pio);
spin_unlock_irqrestore(&ide_lock, flags);
} else
hwif->set_pio_mode(drive, req_pio);
} else {
int keep_dma = drive->using_dma;
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/ide/legacy/ht6560b.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
switch (pio) {
case 8: /* set prefetch off */
case 9: /* set prefetch on */
/*
* take ide_lock for drive->[no_]unmask
*/
spin_lock_irqsave(&ide_lock, flags);
ht_set_prefetch(drive, pio & 1);
spin_unlock_irqrestore(&ide_lock, flags);
return;
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ide/pci/cmd640.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ static void cmd640_set_mode (unsigned int index, u8 pio_mode, unsigned int cycle

static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
unsigned long flags;
unsigned int index = 0, cycle_time;
u8 b;

Expand All @@ -655,12 +654,7 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio)

case 8: /* set prefetch off */
case 9: /* set prefetch on */
/*
* take ide_lock for drive->[no_]unmask/[no_]io_32bit
*/
spin_lock_irqsave(&ide_lock, flags);
set_prefetch_mode(index, pio & 1);
spin_unlock_irqrestore(&ide_lock, flags);
printk("%s: %sabled cmd640 prefetch\n", drive->name, (pio & 1) ? "en" : "dis");
return;
}
Expand Down

0 comments on commit 5af4c39

Please sign in to comment.