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

[PATCH] S2io: Hardware fixes for Xframe II adapter

Hi,

Patch Description:
This patch incorporates the following hardware fixes required
for Xframe II adapter.
1. New values to program the dtx_control register.
2. Disable memory controller interrupts(MC_INTR) since these
are now monitored thru' a poll routine.
3. Don't reset an XframeII card on an ECC double-bit error(It
can recover).
4. Save/restore PCI config space before/after a reset irrespective
of Xframe I or II card.
5. Bumped up the driver version no. to 2.0.3.1

Please review the patch and apply the same if it looks ok.

Signed-off-by: Ravinandan Arakali <ravinandan.arakali@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by

ravinandan.arakali@neterion.com and committed by
Jeff Garzik
e960fc5c 3d52365c

+18 -19
+18 -19
drivers/net/s2io.c
··· 67 67 68 68 /* S2io Driver name & version. */ 69 69 static char s2io_driver_name[] = "Neterion"; 70 - static char s2io_driver_version[] = "Version 2.0.2.1"; 70 + static char s2io_driver_version[] = "Version 2.0.3.1"; 71 71 72 72 static inline int RXD_IS_UP2DT(RxD_t *rxdp) 73 73 { ··· 210 210 211 211 static u64 herc_act_dtx_cfg[] = { 212 212 /* Set address */ 213 - 0x80000515BA750000ULL, 0x80000515BA7500E0ULL, 213 + 0x8000051536750000ULL, 0x80000515367500E0ULL, 214 214 /* Write data */ 215 - 0x80000515BA750004ULL, 0x80000515BA7500E4ULL, 215 + 0x8000051536750004ULL, 0x80000515367500E4ULL, 216 216 /* Set address */ 217 217 0x80010515003F0000ULL, 0x80010515003F00E0ULL, 218 218 /* Write data */ 219 219 0x80010515003F0004ULL, 0x80010515003F00E4ULL, 220 + /* Set address */ 221 + 0x801205150D440000ULL, 0x801205150D4400E0ULL, 222 + /* Write data */ 223 + 0x801205150D440004ULL, 0x801205150D4400E4ULL, 220 224 /* Set address */ 221 225 0x80020515F2100000ULL, 0x80020515F21000E0ULL, 222 226 /* Write data */ ··· 1907 1903 } 1908 1904 1909 1905 /* Enable select interrupts */ 1910 - interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | MC_INTR; 1906 + interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; 1911 1907 interruptible |= TX_PIC_INTR | RX_PIC_INTR; 1912 1908 interruptible |= TX_MAC_INTR | RX_MAC_INTR; 1913 1909 ··· 2034 2030 config = &nic->config; 2035 2031 2036 2032 /* Disable all interrupts */ 2037 - interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | MC_INTR; 2033 + interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; 2038 2034 interruptible |= TX_PIC_INTR | RX_PIC_INTR; 2039 2035 interruptible |= TX_MAC_INTR | RX_MAC_INTR; 2040 2036 en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); ··· 2692 2688 DBG_PRINT(ERR_DBG, "%s: Device indicates ", 2693 2689 dev->name); 2694 2690 DBG_PRINT(ERR_DBG, "double ECC error!!\n"); 2695 - netif_stop_queue(dev); 2696 - schedule_work(&nic->rst_timer_task); 2691 + if (nic->device_type != XFRAME_II_DEVICE) { 2692 + netif_stop_queue(dev); 2693 + schedule_work(&nic->rst_timer_task); 2694 + } 2697 2695 } else { 2698 2696 nic->mac_control.stats_info->sw_stat. 2699 2697 single_ecc_errs++; ··· 2778 2772 u16 subid, pci_cmd; 2779 2773 2780 2774 /* Back up the PCI-X CMD reg, dont want to lose MMRBC, OST settings */ 2781 - if (sp->device_type == XFRAME_I_DEVICE) 2782 - pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(pci_cmd)); 2775 + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(pci_cmd)); 2783 2776 2784 2777 val64 = SW_RESET_ALL; 2785 2778 writeq(val64, &bar0->sw_reset); ··· 2797 2792 */ 2798 2793 msleep(250); 2799 2794 2800 - if (!(sp->device_type & XFRAME_II_DEVICE)) { 2801 - /* Restore the PCI state saved during initializarion. */ 2802 - pci_restore_state(sp->pdev); 2803 - pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, 2795 + /* Restore the PCI state saved during initialization. */ 2796 + pci_restore_state(sp->pdev); 2797 + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, 2804 2798 pci_cmd); 2805 - } else { 2806 - pci_set_master(sp->pdev); 2807 - } 2808 2799 s2io_init_pci(sp); 2809 2800 2810 2801 msleep(250); ··· 5427 5426 INIT_WORK(&sp->set_link_task, 5428 5427 (void (*)(void *)) s2io_set_link, sp); 5429 5428 5430 - if (!(sp->device_type & XFRAME_II_DEVICE)) { 5431 - pci_save_state(sp->pdev); 5432 - } 5429 + pci_save_state(sp->pdev); 5433 5430 5434 5431 /* Setting swapper control on the NIC, for proper reset operation */ 5435 5432 if (s2io_set_swapper(sp)) {