diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 05:04:47 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 05:04:47 +0100 |
commit | 3b59bf081622b6446db77ad06c93fe23677bc533 (patch) | |
tree | 3f4bb5a27c90cc86994a1f6d3c53fbf9208003cb /drivers/isdn/hisax/sportster.c | |
parent | Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq (diff) | |
parent | Fix pppol2tp getsockname() (diff) | |
download | linux-3b59bf081622b6446db77ad06c93fe23677bc533.tar.xz linux-3b59bf081622b6446db77ad06c93fe23677bc533.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking merge from David Miller:
"1) Move ixgbe driver over to purely page based buffering on receive.
From Alexander Duyck.
2) Add receive packet steering support to e1000e, from Bruce Allan.
3) Convert TCP MD5 support over to RCU, from Eric Dumazet.
4) Reduce cpu usage in handling out-of-order TCP packets on modern
systems, also from Eric Dumazet.
5) Support the IP{,V6}_UNICAST_IF socket options, making the wine
folks happy, from Erich Hoover.
6) Support VLAN trunking from guests in hyperv driver, from Haiyang
Zhang.
7) Support byte-queue-limtis in r8169, from Igor Maravic.
8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but
was never properly implemented, Jiri Benc fixed that.
9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang.
10) Support kernel side dump filtering by ctmark in netfilter
ctnetlink, from Pablo Neira Ayuso.
11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker.
12) Add new peek socket options to assist with socket migration, from
Pavel Emelyanov.
13) Add sch_plug packet scheduler whose queue is controlled by
userland daemons using explicit freeze and release commands. From
Shriram Rajagopalan.
14) Fix FCOE checksum offload handling on transmit, from Yi Zou."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits)
Fix pppol2tp getsockname()
Remove printk from rds_sendmsg
ipv6: fix incorrent ipv6 ipsec packet fragment
cpsw: Hook up default ndo_change_mtu.
net: qmi_wwan: fix build error due to cdc-wdm dependecy
netdev: driver: ethernet: Add TI CPSW driver
netdev: driver: ethernet: add cpsw address lookup engine support
phy: add am79c874 PHY support
mlx4_core: fix race on comm channel
bonding: send igmp report for its master
fs_enet: Add MPC5125 FEC support and PHY interface selection
net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
net: update the usage of CHECKSUM_UNNECESSARY
fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
net/hyperv: Fix the code handling tx busy
ixgbe: fix namespace issues when FCoE/DCB is not enabled
rtlwifi: Remove unused ETH_ADDR_LEN defines
igbvf: Use ETH_ALEN
...
Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and
drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.
Diffstat (limited to 'drivers/isdn/hisax/sportster.c')
-rw-r--r-- | drivers/isdn/hisax/sportster.c | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index 0a53759adfa4..1267298ef551 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.c @@ -4,7 +4,7 @@ * * Author Karsten Keil * Copyright by Karsten Keil <keil@isdn4linux.de> - * + * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * @@ -20,7 +20,7 @@ static const char *sportster_revision = "$Revision: 1.16.2.4 $"; -#define byteout(addr,val) outb(val,addr) +#define byteout(addr, val) outb(val, addr) #define bytein(addr) inb(addr) #define SPORTSTER_ISAC 0xC000 @@ -33,17 +33,17 @@ static const char *sportster_revision = "$Revision: 1.16.2.4 $"; static inline int calc_off(unsigned int base, unsigned int off) { - return(base + ((off & 0xfc)<<8) + ((off & 3)<<1)); + return (base + ((off & 0xfc) << 8) + ((off & 3) << 1)); } static inline void -read_fifo(unsigned int adr, u_char * data, int size) +read_fifo(unsigned int adr, u_char *data, int size) { insb(adr, data, size); } static void -write_fifo(unsigned int adr, u_char * data, int size) +write_fifo(unsigned int adr, u_char *data, int size) { outsb(adr, data, size); } @@ -63,13 +63,13 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) } static void -ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) +ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) { read_fifo(cs->hw.spt.isac, data, size); } static void -WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) +WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) { write_fifo(cs->hw.spt.isac, data, size); } @@ -106,11 +106,11 @@ sportster_interrupt(int intno, void *dev_id) spin_lock_irqsave(&cs->lock, flags); val = READHSCX(cs, 1, HSCX_ISTA); - Start_HSCX: +Start_HSCX: if (val) hscx_int_main(cs, val); val = ReadISAC(cs, ISAC_ISTA); - Start_ISAC: +Start_ISAC: if (val) isac_interrupt(cs, val); val = READHSCX(cs, 1, HSCX_ISTA); @@ -126,7 +126,7 @@ sportster_interrupt(int intno, void *dev_id) goto Start_ISAC; } /* get a new irq impulse if there any pending */ - bytein(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ +1); + bytein(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ + 1); spin_unlock_irqrestore(&cs->lock, flags); return IRQ_HANDLED; } @@ -137,8 +137,8 @@ release_io_sportster(struct IsdnCardState *cs) int i, adr; byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, 0); - for (i=0; i<64; i++) { - adr = cs->hw.spt.cfg_reg + i *1024; + for (i = 0; i < 64; i++) { + adr = cs->hw.spt.cfg_reg + i * 1024; release_region(adr, 8); } } @@ -160,51 +160,51 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg) u_long flags; switch (mt) { - case CARD_RESET: - spin_lock_irqsave(&cs->lock, flags); - reset_sportster(cs); - spin_unlock_irqrestore(&cs->lock, flags); - return(0); - case CARD_RELEASE: - release_io_sportster(cs); - return(0); - case CARD_INIT: - spin_lock_irqsave(&cs->lock, flags); - reset_sportster(cs); - inithscxisac(cs, 1); - cs->hw.spt.res_irq |= SPORTSTER_INTE; /* IRQ On */ - byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq); - inithscxisac(cs, 2); - spin_unlock_irqrestore(&cs->lock, flags); - return(0); - case CARD_TEST: - return(0); + case CARD_RESET: + spin_lock_irqsave(&cs->lock, flags); + reset_sportster(cs); + spin_unlock_irqrestore(&cs->lock, flags); + return (0); + case CARD_RELEASE: + release_io_sportster(cs); + return (0); + case CARD_INIT: + spin_lock_irqsave(&cs->lock, flags); + reset_sportster(cs); + inithscxisac(cs, 1); + cs->hw.spt.res_irq |= SPORTSTER_INTE; /* IRQ On */ + byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq); + inithscxisac(cs, 2); + spin_unlock_irqrestore(&cs->lock, flags); + return (0); + case CARD_TEST: + return (0); } - return(0); + return (0); } static int __devinit get_io_range(struct IsdnCardState *cs) { int i, j, adr; - - for (i=0;i<64;i++) { - adr = cs->hw.spt.cfg_reg + i *1024; + + for (i = 0; i < 64; i++) { + adr = cs->hw.spt.cfg_reg + i * 1024; if (!request_region(adr, 8, "sportster")) { printk(KERN_WARNING "HiSax: USR Sportster config port " - "%x-%x already in use\n", - adr, adr + 8); + "%x-%x already in use\n", + adr, adr + 8); break; - } + } } - if (i==64) - return(1); + if (i == 64) + return (1); else { - for (j=0; j<i; j++) { - adr = cs->hw.spt.cfg_reg + j *1024; + for (j = 0; j < i; j++) { + adr = cs->hw.spt.cfg_reg + j * 1024; release_region(adr, 8); } - return(0); + return (0); } } @@ -226,28 +226,28 @@ setup_sportster(struct IsdnCard *card) cs->hw.spt.isac = cs->hw.spt.cfg_reg + SPORTSTER_ISAC; cs->hw.spt.hscx[0] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXA; cs->hw.spt.hscx[1] = cs->hw.spt.cfg_reg + SPORTSTER_HSCXB; - - switch(cs->irq) { - case 5: cs->hw.spt.res_irq = 1; - break; - case 7: cs->hw.spt.res_irq = 2; - break; - case 10:cs->hw.spt.res_irq = 3; - break; - case 11:cs->hw.spt.res_irq = 4; - break; - case 12:cs->hw.spt.res_irq = 5; - break; - case 14:cs->hw.spt.res_irq = 6; - break; - case 15:cs->hw.spt.res_irq = 7; - break; - default:release_io_sportster(cs); - printk(KERN_WARNING "Sportster: wrong IRQ\n"); - return(0); + + switch (cs->irq) { + case 5: cs->hw.spt.res_irq = 1; + break; + case 7: cs->hw.spt.res_irq = 2; + break; + case 10:cs->hw.spt.res_irq = 3; + break; + case 11:cs->hw.spt.res_irq = 4; + break; + case 12:cs->hw.spt.res_irq = 5; + break; + case 14:cs->hw.spt.res_irq = 6; + break; + case 15:cs->hw.spt.res_irq = 7; + break; + default:release_io_sportster(cs); + printk(KERN_WARNING "Sportster: wrong IRQ\n"); + return (0); } printk(KERN_INFO "HiSax: USR Sportster config irq:%d cfg:0x%X\n", - cs->irq, cs->hw.spt.cfg_reg); + cs->irq, cs->hw.spt.cfg_reg); setup_isac(cs); cs->readisac = &ReadISAC; cs->writeisac = &WriteISAC; |