aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorravinandan.arakali@neterion.com <ravinandan.arakali@neterion.com>2005-08-12 13:15:59 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-19 21:42:06 -0400
commite960fc5c7d9144b1ce80dda9891ca7dfc656c078 (patch)
treed3e46f30bc21b1704c84e1d4e52cf4e171c7e0d0 /drivers
parent3d52365c4f62edb9ff9710e1c57952e957b2879f (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/s2io.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index e083351e3f42..7ca78228b104 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -67,7 +67,7 @@
67 67
68/* S2io Driver name & version. */ 68/* S2io Driver name & version. */
69static char s2io_driver_name[] = "Neterion"; 69static char s2io_driver_name[] = "Neterion";
70static char s2io_driver_version[] = "Version 2.0.2.1"; 70static char s2io_driver_version[] = "Version 2.0.3.1";
71 71
72static inline int RXD_IS_UP2DT(RxD_t *rxdp) 72static inline int RXD_IS_UP2DT(RxD_t *rxdp)
73{ 73{
@@ -210,14 +210,18 @@ static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid)
210 210
211static u64 herc_act_dtx_cfg[] = { 211static u64 herc_act_dtx_cfg[] = {
212 /* Set address */ 212 /* Set address */
213 0x80000515BA750000ULL, 0x80000515BA7500E0ULL, 213 0x8000051536750000ULL, 0x80000515367500E0ULL,
214 /* Write data */ 214 /* Write data */
215 0x80000515BA750004ULL, 0x80000515BA7500E4ULL, 215 0x8000051536750004ULL, 0x80000515367500E4ULL,
216 /* Set address */ 216 /* Set address */
217 0x80010515003F0000ULL, 0x80010515003F00E0ULL, 217 0x80010515003F0000ULL, 0x80010515003F00E0ULL,
218 /* Write data */ 218 /* Write data */
219 0x80010515003F0004ULL, 0x80010515003F00E4ULL, 219 0x80010515003F0004ULL, 0x80010515003F00E4ULL,
220 /* Set address */ 220 /* Set address */
221 0x801205150D440000ULL, 0x801205150D4400E0ULL,
222 /* Write data */
223 0x801205150D440004ULL, 0x801205150D4400E4ULL,
224 /* Set address */
221 0x80020515F2100000ULL, 0x80020515F21000E0ULL, 225 0x80020515F2100000ULL, 0x80020515F21000E0ULL,
222 /* Write data */ 226 /* Write data */
223 0x80020515F2100004ULL, 0x80020515F21000E4ULL, 227 0x80020515F2100004ULL, 0x80020515F21000E4ULL,
@@ -1903,7 +1907,7 @@ static int start_nic(struct s2io_nic *nic)
1903 } 1907 }
1904 1908
1905 /* Enable select interrupts */ 1909 /* Enable select interrupts */
1906 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | MC_INTR; 1910 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
1907 interruptible |= TX_PIC_INTR | RX_PIC_INTR; 1911 interruptible |= TX_PIC_INTR | RX_PIC_INTR;
1908 interruptible |= TX_MAC_INTR | RX_MAC_INTR; 1912 interruptible |= TX_MAC_INTR | RX_MAC_INTR;
1909 1913
@@ -2030,7 +2034,7 @@ static void stop_nic(struct s2io_nic *nic)
2030 config = &nic->config; 2034 config = &nic->config;
2031 2035
2032 /* Disable all interrupts */ 2036 /* Disable all interrupts */
2033 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | MC_INTR; 2037 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
2034 interruptible |= TX_PIC_INTR | RX_PIC_INTR; 2038 interruptible |= TX_PIC_INTR | RX_PIC_INTR;
2035 interruptible |= TX_MAC_INTR | RX_MAC_INTR; 2039 interruptible |= TX_MAC_INTR | RX_MAC_INTR;
2036 en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); 2040 en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS);
@@ -2688,8 +2692,10 @@ static void alarm_intr_handler(struct s2io_nic *nic)
2688 DBG_PRINT(ERR_DBG, "%s: Device indicates ", 2692 DBG_PRINT(ERR_DBG, "%s: Device indicates ",
2689 dev->name); 2693 dev->name);
2690 DBG_PRINT(ERR_DBG, "double ECC error!!\n"); 2694 DBG_PRINT(ERR_DBG, "double ECC error!!\n");
2691 netif_stop_queue(dev); 2695 if (nic->device_type != XFRAME_II_DEVICE) {
2692 schedule_work(&nic->rst_timer_task); 2696 netif_stop_queue(dev);
2697 schedule_work(&nic->rst_timer_task);
2698 }
2693 } else { 2699 } else {
2694 nic->mac_control.stats_info->sw_stat. 2700 nic->mac_control.stats_info->sw_stat.
2695 single_ecc_errs++; 2701 single_ecc_errs++;
@@ -2772,8 +2778,7 @@ void s2io_reset(nic_t * sp)
2772 u16 subid, pci_cmd; 2778 u16 subid, pci_cmd;
2773 2779
2774 /* Back up the PCI-X CMD reg, dont want to lose MMRBC, OST settings */ 2780 /* Back up the PCI-X CMD reg, dont want to lose MMRBC, OST settings */
2775 if (sp->device_type == XFRAME_I_DEVICE) 2781 pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(pci_cmd));
2776 pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(pci_cmd));
2777 2782
2778 val64 = SW_RESET_ALL; 2783 val64 = SW_RESET_ALL;
2779 writeq(val64, &bar0->sw_reset); 2784 writeq(val64, &bar0->sw_reset);
@@ -2792,14 +2797,10 @@ void s2io_reset(nic_t * sp)
2792 */ 2797 */
2793 msleep(250); 2798 msleep(250);
2794 2799
2795 if (!(sp->device_type & XFRAME_II_DEVICE)) { 2800 /* Restore the PCI state saved during initialization. */
2796 /* Restore the PCI state saved during initializarion. */ 2801 pci_restore_state(sp->pdev);
2797 pci_restore_state(sp->pdev); 2802 pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
2798 pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
2799 pci_cmd); 2803 pci_cmd);
2800 } else {
2801 pci_set_master(sp->pdev);
2802 }
2803 s2io_init_pci(sp); 2804 s2io_init_pci(sp);
2804 2805
2805 msleep(250); 2806 msleep(250);
@@ -5426,9 +5427,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
5426 INIT_WORK(&sp->set_link_task, 5427 INIT_WORK(&sp->set_link_task,
5427 (void (*)(void *)) s2io_set_link, sp); 5428 (void (*)(void *)) s2io_set_link, sp);
5428 5429
5429 if (!(sp->device_type & XFRAME_II_DEVICE)) { 5430 pci_save_state(sp->pdev);
5430 pci_save_state(sp->pdev);
5431 }
5432 5431
5433 /* Setting swapper control on the NIC, for proper reset operation */ 5432 /* Setting swapper control on the NIC, for proper reset operation */
5434 if (s2io_set_swapper(sp)) { 5433 if (s2io_set_swapper(sp)) {