ioc3-eth.c (6469933605a3ecdfa66b98160cde98ecd256cb3f) | ioc3-eth.c (ce7240e445303de3ca66e6d08f17a2ec278a5bf6) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Driver for SGI's IOC3 based Ethernet cards as found in the PCI card. 7 * 8 * Copyright (C) 1999, 2000, 01, 03, 06 Ralf Baechle --- 569 unchanged lines hidden (view full) --- 578 struct ioc3_private *ip = netdev_priv(dev); 579 struct sk_buff *skb, *new_skb; 580 struct ioc3 *ioc3 = ip->regs; 581 int rx_entry, n_entry, len; 582 struct ioc3_erxbuf *rxb; 583 unsigned long *rxr; 584 u32 w0, err; 585 | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Driver for SGI's IOC3 based Ethernet cards as found in the PCI card. 7 * 8 * Copyright (C) 1999, 2000, 01, 03, 06 Ralf Baechle --- 569 unchanged lines hidden (view full) --- 578 struct ioc3_private *ip = netdev_priv(dev); 579 struct sk_buff *skb, *new_skb; 580 struct ioc3 *ioc3 = ip->regs; 581 int rx_entry, n_entry, len; 582 struct ioc3_erxbuf *rxb; 583 unsigned long *rxr; 584 u32 w0, err; 585 |
586 rxr = ip->rxr; /* Ring base */ | 586 rxr = (unsigned long *) ip->rxr; /* Ring base */ |
587 rx_entry = ip->rx_ci; /* RX consume index */ 588 n_entry = ip->rx_pi; 589 590 skb = ip->rx_skbs[rx_entry]; 591 rxb = (struct ioc3_erxbuf *) (skb->data - RX_OFFSET); 592 w0 = be32_to_cpu(rxb->w0); 593 594 while (w0 & ERXBUF_V) { --- 303 unchanged lines hidden (view full) --- 898 struct ioc3_private *ip = netdev_priv(dev); 899 struct ioc3_erxbuf *rxb; 900 unsigned long *rxr; 901 int i; 902 903 if (ip->rxr == NULL) { 904 /* Allocate and initialize rx ring. 4kb = 512 entries */ 905 ip->rxr = (unsigned long *) get_zeroed_page(GFP_ATOMIC); | 587 rx_entry = ip->rx_ci; /* RX consume index */ 588 n_entry = ip->rx_pi; 589 590 skb = ip->rx_skbs[rx_entry]; 591 rxb = (struct ioc3_erxbuf *) (skb->data - RX_OFFSET); 592 w0 = be32_to_cpu(rxb->w0); 593 594 while (w0 & ERXBUF_V) { --- 303 unchanged lines hidden (view full) --- 898 struct ioc3_private *ip = netdev_priv(dev); 899 struct ioc3_erxbuf *rxb; 900 unsigned long *rxr; 901 int i; 902 903 if (ip->rxr == NULL) { 904 /* Allocate and initialize rx ring. 4kb = 512 entries */ 905 ip->rxr = (unsigned long *) get_zeroed_page(GFP_ATOMIC); |
906 rxr = ip->rxr; | 906 rxr = (unsigned long *) ip->rxr; |
907 if (!rxr) 908 printk("ioc3_alloc_rings(): get_zeroed_page() failed!\n"); 909 910 /* Now the rx buffers. The RX ring may be larger but 911 we only allocate 16 buffers for now. Need to tune 912 this for performance and memory later. */ 913 for (i = 0; i < RX_BUFFS; i++) { 914 struct sk_buff *skb; --- 227 unchanged lines hidden (view full) --- 1142 * 1143 * Can't use UPF_IOREMAP as the whole of IOC3 resources have already been 1144 * registered. 1145 */ 1146static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart) 1147{ 1148#define COSMISC_CONSTANT 6 1149 | 907 if (!rxr) 908 printk("ioc3_alloc_rings(): get_zeroed_page() failed!\n"); 909 910 /* Now the rx buffers. The RX ring may be larger but 911 we only allocate 16 buffers for now. Need to tune 912 this for performance and memory later. */ 913 for (i = 0; i < RX_BUFFS; i++) { 914 struct sk_buff *skb; --- 227 unchanged lines hidden (view full) --- 1142 * 1143 * Can't use UPF_IOREMAP as the whole of IOC3 resources have already been 1144 * registered. 1145 */ 1146static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart) 1147{ 1148#define COSMISC_CONSTANT 6 1149 |
1150 struct uart_port port = { 1151 .irq = 0, 1152 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 1153 .iotype = UPIO_MEM, 1154 .regshift = 0, 1155 .uartclk = (22000000 << 1) / COSMISC_CONSTANT, | 1150 struct uart_8250_port port = { 1151 .port = { 1152 .irq = 0, 1153 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 1154 .iotype = UPIO_MEM, 1155 .regshift = 0, 1156 .uartclk = (22000000 << 1) / COSMISC_CONSTANT, |
1156 | 1157 |
1157 .membase = (unsigned char __iomem *) uart, 1158 .mapbase = (unsigned long) uart, | 1158 .membase = (unsigned char __iomem *) uart, 1159 .mapbase = (unsigned long) uart, 1160 } |
1159 }; 1160 unsigned char lcr; 1161 1162 lcr = uart->iu_lcr; 1163 uart->iu_lcr = lcr | UART_LCR_DLAB; 1164 uart->iu_scr = COSMISC_CONSTANT, 1165 uart->iu_lcr = lcr; 1166 uart->iu_lcr; | 1161 }; 1162 unsigned char lcr; 1163 1164 lcr = uart->iu_lcr; 1165 uart->iu_lcr = lcr | UART_LCR_DLAB; 1166 uart->iu_scr = COSMISC_CONSTANT, 1167 uart->iu_lcr = lcr; 1168 uart->iu_lcr; |
1167 serial8250_register_port(&port); | 1169 serial8250_register_8250_port(&port); |
1168} 1169 1170static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) 1171{ 1172 /* 1173 * We need to recognice and treat the fourth MENET serial as it 1174 * does not have an SuperIO chip attached to it, therefore attempting 1175 * to access it will result in bus errors. We call something an --- 509 unchanged lines hidden --- | 1170} 1171 1172static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) 1173{ 1174 /* 1175 * We need to recognice and treat the fourth MENET serial as it 1176 * does not have an SuperIO chip attached to it, therefore attempting 1177 * to access it will result in bus errors. We call something an --- 509 unchanged lines hidden --- |