diff -ur --new-file old/linux/Documentation/Configure.help new/linux/Documentation/Configure.help --- old/linux/Documentation/Configure.help Mon Oct 5 20:24:54 1998 +++ new/linux/Documentation/Configure.help Mon Oct 5 20:25:40 1998 @@ -3248,6 +3248,15 @@ throughput is lower than when using only the largest available burst size. + Also, sometimes larger bursts lead to lower throughput, e.g. on an + Intel 440FX board, a drop from 135 Mbps to 103 Mbps was observed when + going from 8W to 16W bursts. + +Enable 16W TX bursts (discouraged) +CONFIG_ATM_ENI_BURST_TX_16W + Burst sixteed words at once in the send direction. This may work with + recent PCI chipsets, but is known to fail with older chipsets. + Enable 8W TX bursts (recommended) CONFIG_ATM_ENI_BURST_TX_8W Burst eight words at once in the send direction. This is the default @@ -3264,6 +3273,11 @@ Burst two words at once in the send direction. You may want to try this if you have disabled 4W and 8W bursts. Enabling 2W if 4W or 8W are also set may or may not improve throughput. + +Enable 16W RX bursts (discouraged) +CONFIG_ATM_ENI_BURST_RX_16W + Burst sixteen words at once in the receive direction. This may work with + recent PCI chipsets, but is known to fail with older chipsets. Enable 8W RX bursts (discouraged) CONFIG_ATM_ENI_BURST_RX_8W diff -ur --new-file old/linux/drivers/atm/Config.in new/linux/drivers/atm/Config.in --- old/linux/drivers/atm/Config.in Mon Oct 5 20:24:54 1998 +++ new/linux/drivers/atm/Config.in Mon Oct 5 20:25:40 1998 @@ -11,9 +11,11 @@ bool ' Enable extended debugging' CONFIG_ATM_ENI_DEBUG n bool ' Fine-tune burst settings' CONFIG_ATM_ENI_TUNE_BURST n if [ "$CONFIG_ATM_ENI_TUNE_BURST" = "y" ]; then + bool ' Enable 16W TX bursts (discouraged)' CONFIG_ATM_ENI_BURST_TX_16W n bool ' Enable 8W TX bursts (recommended)' CONFIG_ATM_ENI_BURST_TX_8W y bool ' Enable 4W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_4W n bool ' Enable 2W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_2W n + bool ' Enable 16W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_16W n bool ' Enable 8W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_8W n bool ' Enable 4W RX bursts (recommended)' CONFIG_ATM_ENI_BURST_RX_4W y bool ' Enable 2W RX bursts (optional)' CONFIG_ATM_ENI_BURST_RX_2W n diff -ur --new-file old/linux/drivers/atm/eni.c new/linux/drivers/atm/eni.c --- old/linux/drivers/atm/eni.c Mon Oct 5 20:24:54 1998 +++ new/linux/drivers/atm/eni.c Mon Oct 5 20:25:40 1998 @@ -383,6 +383,16 @@ paddr += init << 2; words -= init; } +#ifdef CONFIG_ATM_ENI_BURST_RX_16W /* may work with some PCI chipsets ... */ + if (words & ~15) { + dma[j++] = MID_DT_16W | ((words >> 4) << + MID_DMA_COUNT_SHIFT) | (vcc->vci << + MID_DMA_VCI_SHIFT); + dma[j++] = virt_to_bus((void *) paddr); + paddr += (words & ~15) << 2; + words &= 15; + } +#endif #ifdef CONFIG_ATM_ENI_BURST_RX_8W /* works only with *some* PCI chipsets ... */ if (words & ~7) { dma[j++] = MID_DT_8W | ((words >> 3) << @@ -403,7 +413,7 @@ words &= 3; } #endif -#ifdef CONFIG_ATM_ENI_BURST_RX_2W /* probably useless if RX_4W or RX_8W */ +#ifdef CONFIG_ATM_ENI_BURST_RX_2W /* probably useless if RX_4W, RX_8W, ... */ if (words & ~1) { dma[j++] = MID_DT_2W | ((words >> 1) << MID_DMA_COUNT_SHIFT) | (vcc->vci << @@ -926,6 +936,17 @@ paddr += init << 2; words -= init; } +#ifdef CONFIG_ATM_ENI_BURST_TX_16W /* may work with some PCI chipsets ... */ + if (words & ~15) { + DPRINTK("put_dma: %lx DMA: %d*16/%d words\n",paddr,words >> 4, + words); + dma[(*j)++] = MID_DT_16W | ((words >> 4) << MID_DMA_COUNT_SHIFT) + | (chan << MID_DMA_CHAN_SHIFT); + dma[(*j)++] = virt_to_bus((void *) paddr); + paddr += (words & ~15) << 2; + words &= 15; + } +#endif #ifdef CONFIG_ATM_ENI_BURST_TX_8W /* recommended */ if (words & ~7) { DPRINTK("put_dma: %lx DMA: %d*8/%d words\n",paddr,words >> 3, @@ -937,7 +958,7 @@ words &= 7; } #endif -#ifdef CONFIG_ATM_ENI_BURST_TX_4W /* probably useless if TX_8W */ +#ifdef CONFIG_ATM_ENI_BURST_TX_4W /* probably useless if TX_8W or TX_16W */ if (words & ~3) { DPRINTK("put_dma: %lx DMA: %d*4/%d words\n",paddr,words >> 2, words); @@ -948,7 +969,7 @@ words &= 3; } #endif -#ifdef CONFIG_ATM_ENI_BURST_TX_2W /* probably useless if TX_4W or TX_8W */ +#ifdef CONFIG_ATM_ENI_BURST_TX_2W /* probably useless if TX_4W, TX_8W, ... */ if (words & ~1) { DPRINTK("put_dma: %lx DMA: %d*2/%d words\n",paddr,words >> 1, words); @@ -1620,8 +1641,8 @@ { struct midway_eprom *eprom; struct eni_dev *eni_dev; + struct pci_dev *pci_dev; unsigned int real_base,base; - unsigned short command; unsigned char revision; int error,i,last; @@ -1629,18 +1650,16 @@ dev->ci_range.vpi_bits = 0; dev->ci_range.vci_bits = NR_VCI_LD; eni_dev = ENI_DEV(dev); - if ((error = pci_read_config_word(eni_dev->pci_dev,PCI_COMMAND, - &command)) || (error = pci_read_config_dword(eni_dev->pci_dev, - PCI_BASE_ADDRESS_0,&real_base)) || - (error = pci_read_config_byte(eni_dev->pci_dev,PCI_INTERRUPT_LINE, - &eni_dev->irq)) || (error = pci_read_config_byte(eni_dev->pci_dev, - PCI_REVISION_ID,&revision))) { + pci_dev = eni_dev->pci_dev; + real_base = pci_dev->base_address[0] & MEM_VALID; /* strip flags */ + eni_dev->irq = pci_dev->irq; + error = pci_read_config_byte(pci_dev,PCI_REVISION_ID,&revision); + if (error) { printk(KERN_ERR DEV_LABEL "(itf %d): init error 0x%02x\n", dev->number,error); return -EINVAL; } - real_base &= MEM_VALID; /* strip flags */ - if ((error = pci_write_config_word(eni_dev->pci_dev,PCI_COMMAND, + if ((error = pci_write_config_word(pci_dev,PCI_COMMAND, PCI_COMMAND_MEMORY | (eni_dev->asic ? PCI_COMMAND_PARITY | PCI_COMMAND_SERR : 0)))) { printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory " @@ -2050,6 +2069,50 @@ return sprintf(page,DEV_LABEL "(itf %d) signal %s, %dkB, " "%d cps remaining\n",dev->number,signal[(int) dev->signal], eni_dev->mem >> 10,eni_dev->tx_bw); + left--; + if (!left) + return sprintf(page,"Bursts: TX" +#if !defined(CONFIG_ATM_ENI_BURST_TX_16W) && \ + !defined(CONFIG_ATM_ENI_BURST_TX_8W) && \ + !defined(CONFIG_ATM_ENI_BURST_TX_4W) && \ + !defined(CONFIG_ATM_ENI_BURST_TX_2W) + " none" +#endif +#ifdef CONFIG_ATM_ENI_BURST_TX_16W + " 16W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_TX_8W + " 8W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_TX_4W + " 4W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_TX_2W + " 2W" +#endif + ", RX" +#if !defined(CONFIG_ATM_ENI_BURST_RX_16W) && \ + !defined(CONFIG_ATM_ENI_BURST_RX_8W) && \ + !defined(CONFIG_ATM_ENI_BURST_RX_4W) && \ + !defined(CONFIG_ATM_ENI_BURST_RX_2W) + " none" +#endif +#ifdef CONFIG_ATM_ENI_BURST_RX_16W + " 16W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_RX_8W + " 8W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_RX_4W + " 4W" +#endif +#ifdef CONFIG_ATM_ENI_BURST_RX_2W + " 2W" +#endif +#ifndef CONFIG_ATM_ENI_TUNE_BURST + " (default)" +#endif + "\n"); for (i = 0; i < NR_CHAN; i++) { struct eni_tx *tx = eni_dev->tx+i; diff -ur --new-file old/linux/drivers/atm/zatm.c new/linux/drivers/atm/zatm.c --- old/linux/drivers/atm/zatm.c Mon Oct 5 20:24:55 1998 +++ new/linux/drivers/atm/zatm.c Mon Oct 5 20:25:41 1998 @@ -1376,6 +1376,7 @@ __initfunc(static int zatm_init(struct atm_dev *dev)) { struct zatm_dev *zatm_dev; + struct pci_dev *pci_dev; unsigned short command; unsigned char revision; int error,i,last; @@ -1383,19 +1384,16 @@ DPRINTK(">zatm_init\n"); zatm_dev = ZATM_DEV(dev); - if ((error = pci_read_config_word(zatm_dev->pci_dev,PCI_COMMAND, - &command)) || (error = pci_read_config_dword(zatm_dev->pci_dev, - PCI_BASE_ADDRESS_0,&zatm_dev->base)) || - (error = pci_read_config_byte(zatm_dev->pci_dev,PCI_INTERRUPT_LINE, - &zatm_dev->irq)) || - (error = pci_read_config_byte(zatm_dev->pci_dev,PCI_REVISION_ID, - &revision))) { + pci_dev = zatm_dev->pci_dev; + zatm_dev->base = pci_dev->base_address[0 .