Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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 <galak@kernel.crashing.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Kumar Gala and committed by
Linus Torvalds
208a08f7 f751d50f

+10 -2
-2
drivers/ide/ide-disk.c
··· 978 978 ide_dma_verbose(drive); 979 979 printk("\n"); 980 980 981 - drive->no_io_32bit = id->dword_io ? 1 : 0; 982 - 983 981 /* write cache enabled? */ 984 982 if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) 985 983 drive->wcache = 1;
+9
drivers/ide/ide-probe.c
··· 858 858 } 859 859 } 860 860 } 861 + 862 + for (unit = 0; unit < MAX_DRIVES; ++unit) { 863 + ide_drive_t *drive = &hwif->drives[unit]; 864 + 865 + if (hwif->no_io_32bit) 866 + drive->no_io_32bit = 1; 867 + else 868 + drive->no_io_32bit = drive->id->dword_io ? 1 : 0; 869 + } 861 870 } 862 871 863 872 static int hwif_init(ide_hwif_t *hwif);
+1
include/linux/ide.h
··· 792 792 unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */ 793 793 unsigned auto_poll : 1; /* supports nop auto-poll */ 794 794 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 795 + unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ 795 796 796 797 struct device gendev; 797 798 struct completion gendev_rel_comp; /* To deal with device release() */