ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag

Previous thread: sis5513: fail early for unsupported chipsets by Linux Kernel Mailing List on Saturday, April 26, 2008 - 2:03 pm. (1 message)

Next thread: qd65xx: use IDE_HFLAG_SINGLE host flag by Linux Kernel Mailing List on Saturday, April 26, 2008 - 2:03 pm. (1 message)
To: <git-commits-head@...>
Date: Saturday, April 26, 2008 - 2:03 pm

Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=c...
Commit: 784506cbddd17bcd5929f827df39b0c7014e3f1e
Parent: 4764b68405ac918e9ac9939b1a2d1469102e5af7
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Sat Apr 26 17:36:43 2008 +0200
Committer: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Sat Apr 26 17:36:43 2008 +0200

ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag

* Check for IDE_HFLAG_NO_SET_MODE host flag in ide_set_pio(),
ide_set_[pio,dma]_mode(), ide_set_xfer_rate() and set_pio_mode().

* Remove no longer needed IDE_HFLAG_NO_SET_MODE host flag checking
from ide_tune_dma().

* Remove superfluous ->set_pio_mode checking from do_special().

This is a part of preparations for adding 'struct ide_port_ops'.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-dma.c | 3 ---
drivers/ide/ide-io.c | 4 ----
drivers/ide/ide-lib.c | 12 ++++++++++--
drivers/ide/ide.c | 4 +++-
4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index aaece2c..8757e5e 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -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;

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 31e5afa..51d181e 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -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
...

Previous thread: sis5513: fail early for unsupported chipsets by Linux Kernel Mailing List on Saturday, April 26, 2008 - 2:03 pm. (1 message)

Next thread: qd65xx: use IDE_HFLAG_SINGLE host flag by Linux Kernel Mailing List on Saturday, April 26, 2008 - 2:03 pm. (1 message)