ramips: fix HiWiFi HC5761A switch settings
[openwrt/staging/wigyori.git] / target / linux / brcm47xx / patches-4.14 / 610-pci_ide_fix.patch
1 From: b.sander
2 Subject: [PATCH] pci: IDE fix
3
4 These are standard probing messages when using pdc202xx_old:
5 pdc202xx_old 0000:00:01.0: IDE controller (0x105a:0x0d30 rev 0x02)
6 PCI: Enabling device 0000:00:01.0 (0004 -> 0007)
7 PCI: Fixing up device 0000:00:01.0
8 0000:00:01.0: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
9 0000:00:01.0: FORCING BURST BIT 0x00->0x01 ACTIVE
10 pdc202xx_old 0000:00:01.0: 100% native mode on irq 6
11
12 With the default MAX_HWIFS value after above we get:
13 ide2: BM-DMA at 0x0400-0x0407
14 ide3: BM-DMA at 0x0408-0x040f
15 Probing IDE interface ide2...
16 hde: CF500, CFA DISK drive
17
18 As you can see it's ide2 + ide3 and hde.
19
20 With this patch applied we get:
21 ide0: BM-DMA at 0x0400-0x0407
22 ide1: BM-DMA at 0x0408-0x040f
23 Probing IDE interface ide0...
24 hda: CF500, CFA DISK drive
25
26 This fixes OpenWrt ticket #7061: https://dev.openwrt.org/ticket/7061
27 ---
28 --- a/include/linux/ide.h
29 +++ b/include/linux/ide.h
30 @@ -241,7 +241,11 @@ static inline void ide_std_init_ports(st
31 hw->io_ports.ctl_addr = ctl_addr;
32 }
33
34 +#if defined CONFIG_BCM47XX
35 +# define MAX_HWIFS 2
36 +#else
37 #define MAX_HWIFS 10
38 +#endif
39
40 /*
41 * Now for the data we need to maintain per-drive: ide_drive_t