[PATCH] ide: Allow IDE interface to specify its not capable of 32-bit operations

[PATCH] ide: Allow IDE interface to specify its not capable of 32-bit operations

Post by Kumar Gal » Thu, 16 Feb 2006 01:40:09


In some embedded systems the IDE hardware interface may only support 16-bit
or smaller accesses. Allow the interface to specify if this is the case
and don't allow the drive or user to override the setting.

Signed-off-by: Kumar Gala < XXXX@XXXXX.COM >
Acked-by: Bartlomiej Zolnierkiewicz < XXXX@XXXXX.COM >

---
commit 1680d879c98c1680df6f331b486c1985103f379a
tree 4931bdac07f175bd3a6d417d37ccf1297b25ea02
parent 0a585bec4ddbef76ed4036388085c694ddd34494
author Kumar Gala < XXXX@XXXXX.COM > Tue, 14 Feb 2006 10:29:58 -0600
committer Kumar Gala < XXXX@XXXXX.COM > Tue, 14 Feb 2006 10:29:58 -0600

drivers/ide/ide-disk.c | 2 --
drivers/ide/ide-probe.c | 9 +++++++++
include/linux/ide.h | 1 +
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 09086b8..359f659 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -977,8 +977,6 @@ static void idedisk_setup (ide_drive_t *
ide_dma_verbose(drive);
printk("\n");

- drive->no_io_32bit = id->dword_io ? 1 : 0;
-
/* write cache enabled? */
if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
drive->wcache = 1;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 427d1c2..1b7b4c5 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -858,6 +858,15 @@ static void probe_hwif(ide_hwif_t *hwif)
}
}
}
+
+ for (unit = 0; unit < MAX_DRIVES; ++unit) {
+ ide_drive_t *drive = &hwif->drives[unit];
+
+ if (hwif->no_io_32bit)
+ drive->no_io_32bit = 1;
+ else
+ drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
+ }
}

static int hwif_init(ide_hwif_t *hwif);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index a7fc4cc..8d2db41 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -792,6 +792,7 @@ typedef struct hwif_s {
unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */
unsigned auto_poll : 1; /* supports nop auto-poll */
unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
+ unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */

struct device gendev;
struct completion gendev_rel_comp; /* To deal with device release() */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

1. Vim IS a capable IDE [was Vim capable IDE?]

2. 32-bit Number * 32-bit Number = 64-bit result -> What about 32-bit operators?

In comp.lang.javascript message < XXXX@XXXXX.COM >, Sun, 3 May
2009 22:57:31, Lasse Reichstein Nielsen < XXXX@XXXXX.COM > posted:

Good.

The FAQ apparently contains no mention of 32-bit within JavaScript, and
no instance of the operators | ~ ^ >> >>> << . There're not often asked
about, but they fairly often appear in solutions here.

Using >>>0 seems to be the way to get an unsigned result from a signed
one by apparently adding 2^32 if necessary. That might be wanted by the
OP. The reverse is done by |0 .

I have a page partly about those operators, "JavaScript Uses of
Operators",
<URL: http://www.yqcomputer.com/ ; (I must update it to
answer the question I just asked myself) ... (I did).

<FAQENTRY> Something about 32-bit.
<FAQENTRY> Which parts of JavaScript get no mention in the FAQ?

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL: http://www.yqcomputer.com/ ; - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

3. Exabyte VXA-2 (IDE) under 32-bit Windows Vista?

4. libata: ide-drive mounted as sda : how to deal with 32-bit/multisector?

5. [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ...

6. [PATCH 15/63] ide-cd: move historical changelog to Documentation/ide/ChangeLog.ide-cd.1994-2004

7. [PATCH] ide-dma.c, ide.c, ide.h, kernel 2.4.24

8. [PATCH 1/2] [IDE] Platform IDE driver (was: MMIO IDE driver)

9. [patch] ide: kill /proc/ide/ide?/config

10. it is not a matter of "pretending" to be 32-bit, 32-bit drivers simplydo not

11. [CHANGED] VS 64-bit...VS 32-bit and Windows 32-bit on CPU 64-bit

12. [PATCH 2/6] x25: Allow 32 bit socket ioctl in 64 bit kernel

13. Fw: [PATCH] Allow number of IDE interfaces to be selected (X86)

14. [PATCH] Allow number of IDE interfaces to be selected (X86)

15. [PATCH] Make ide-cs work for hardware with 8-bit CF-Interface