remarkable-linux/drivers
Alexey Charkov 5b579e212f net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag
This introduces another flag in 'quirks' to replace the preprocessor
define (USE_MMIO) used to indicate whether the device needs a
separate enable routine to operate in MMIO mode.

All of the currently known platform Rhine cores operate in MMIO
mode by default, and on PCI it is preferred over PIO for performance
reasons. However, a comment in code suggests that some (?) early
Rhine cores only work in PIO mode, so they should not be switched
to MMIO.

Enabling MMIO on PCI is still triggered by the same Kconfig option
to avoid breaking user configs needlessly, but this can be changed
going forward towards automatic runtime detection in case a list of
PIO-only Rhine revisions can be compiled.

This also fixes a couple of compiler warnings detected by Fengguang
Wu's test bot (!USE_MMIO case):

   drivers/net/ethernet/via/via-rhine.c: In function 'rhine_init_one_pci':
   drivers/net/ethernet/via/via-rhine.c:1108:1: warning: label 'err_out_unmap' defined but not used [-Wunused-label]
    err_out_unmap:
    ^
   drivers/net/ethernet/via/via-rhine.c:1022:6: warning: unused variable 'i' [-Wunused-variable]
     int i, rc;
         ^
   drivers/net/ethernet/via/via-rhine.c:916:22: warning: 'quirks' may be used uninitialized in this function [-Wmaybe-uninitialized]
     phy_id = rp->quirks & rqIntPHY ? 1 : 0;
                         ^
   drivers/net/ethernet/via/via-rhine.c:1026:6: note: 'quirks' was declared here
     u32 quirks;
         ^

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-05 15:36:41 -04:00
..
accessibility
acpi Merge branch 'acpi-config' 2014-04-08 21:34:51 +02:00
amba ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
ata
atm
auxdisplay
base drivers/base/dd.c incorrect pr_debug() parameters 2014-04-16 19:34:46 -07:00
bcma
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-04-12 14:49:50 -07:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2014-04-30 11:56:43 -04:00
bus ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
cdrom
char TTY/Serial driver fixes for 3.15-rc2 2014-04-18 16:57:53 -07:00
clk ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk 2014-05-05 13:18:50 -04:00
clocksource CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
connector Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
cpufreq Merge branch 'pm-cpufreq' 2014-04-08 13:28:02 +02:00
cpuidle Merge branch 'pm-cpuidle' 2014-04-08 13:27:40 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-04-03 09:28:16 -07:00
dca
devfreq
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-04-10 08:55:08 -07:00
edac Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-04-04 09:50:07 -07:00
eisa
extcon
firewire
firmware Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-11 11:58:33 -07:00
fmc
gpio Shiraz has moved 2014-04-18 16:40:08 -07:00
gpu Merge branch 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux into drm-next 2014-04-19 11:16:02 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-04-18 10:31:34 -07:00
hsi
hv Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts 2014-04-16 14:14:07 -07:00
hwmon Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-04-09 08:35:31 -07:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-04-09 08:45:40 -07:00
ide
idle Merge branch 'pm-cpuidle' 2014-04-08 13:27:40 +02:00
iio == Changes to existing drivers == 2014-04-07 10:24:18 -07:00
infiniband InfiniBand/RDMA updates for 3.15-rc2: 2014-04-18 13:49:42 -07:00
input pwm: Changes for v3.15-rc1 2014-04-05 18:32:31 -07:00
iommu IOMMU Upates for Linux v3.15 2014-04-05 18:46:26 -07:00
ipack
irqchip Shiraz has moved 2014-04-18 16:40:08 -07:00
isdn hisax/icc: add missing semicolon after label 2014-04-22 21:22:47 -04:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2014-04-10 09:06:10 -07:00
lguest drivers/lguest/page_tables.c: rename do_set_pte() 2014-04-07 16:35:52 -07:00
macintosh
mailbox
mcb drivers: mcb: fix memory leak in chameleon_parse_cells() error path 2014-04-16 12:28:47 -07:00
md One BUG fix for md for recent commit 2014-04-17 10:51:01 -07:00
media [media] gpsca: remove the risk of a division by zero 2014-04-08 11:01:12 -03:00
memory
memstick
message
mfd MMC highlights for 3.15: 2014-04-09 08:39:39 -07:00
misc misc: Grammar s/addition/additional/ 2014-04-16 12:28:47 -07:00
mmc MMC highlights for 3.15: 2014-04-09 08:39:39 -07:00
mtd Shiraz has moved 2014-04-18 16:40:08 -07:00
net net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag 2014-05-05 15:36:41 -04:00
nfc
ntb ntb: Use pci_enable_msix_range() instead of pci_enable_msix() 2014-04-07 10:59:20 -07:00
nubus
of of: Clean up of_update_property 2014-04-15 15:21:22 -05:00
oprofile
parisc
parport
pci PCI: tegra: Use new OF interrupt mapping when possible 2014-04-16 10:24:32 -06:00
pcmcia
phy ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
pinctrl pinctrl: Rename Broadcom Capri pinctrl driver 2014-04-14 09:39:33 +02:00
platform alienware-wmi: cover some scenarios where memory allocations would fail 2014-04-10 12:11:56 -04:00
pnp
power
powercap CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
pps
ps3
ptp ptp: validate the requested frequency adjustment. 2014-04-28 13:28:43 -04:00
pwm Shiraz has moved 2014-04-18 16:40:08 -07:00
rapidio rapidio: rework device hierarchy and introduce mport class of devices 2014-04-07 16:36:07 -07:00
regulator regulator: Fixes for v3.15 2014-04-11 13:30:05 -07:00
remoteproc
reset
rpmsg
rtc ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
s390 ctc: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-28 13:44:10 -04:00
sbus
scsi sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue 2014-04-12 18:02:16 -07:00
sfi
sh ARM: SoC: sh driver changes 2014-04-05 15:38:41 -07:00
sn
spi spi: Fixes for v3.15 2014-04-11 13:35:49 -07:00
spmi
ssb
staging Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2014-05-02 13:47:50 -04:00
target Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-04-12 17:31:22 -07:00
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-04-10 09:15:46 -07:00
tty Revert "serial: 8250, disable "too much work" messages" 2014-04-17 09:33:19 -07:00
uio
usb uas: fix deadlocky memory allocations 2014-04-16 14:04:59 -07:00
uwb uwb: adds missing error handling 2014-04-16 14:03:40 -07:00
vfio VFIO updates for v3.15 include: 2014-04-03 14:05:02 -07:00
vhost Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-04-12 16:51:08 -07:00
video video: Kconfig: move drm and fb into separate menus 2014-04-17 08:10:20 +03:00
virt
virtio
vlynq
vme vme_tsi148: Utilize to_pci_dev() macro 2014-04-16 14:08:37 -07:00
w1 w1: avoid recursive device_add 2014-04-16 14:07:51 -07:00
watchdog CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
xen Xen regression and bug fixes for 3.15-rc1. 2014-04-17 10:54:07 -07:00
zorro
Kconfig
Makefile video: move fbdev to drivers/video/fbdev 2014-04-17 08:10:19 +03:00