## Automatically generated incremental diff ## From: linux-2.0.32-pre6 ## To: linux-2.0.32 ## Robot: $Id: make-incremental-diff,v 1.7 2001/12/04 05:19:54 hpa Exp $ diff -urN linux-2.0.32-pre6/drivers/char/ftape/ecc.c linux/drivers/char/ftape/ecc.c --- linux-2.0.32-pre6/drivers/char/ftape/ecc.c Thu Mar 14 01:51:41 1996 +++ linux/drivers/char/ftape/ecc.c Mon Dec 3 21:49:04 2001 @@ -33,8 +33,7 @@ */ #include -#include -#include +#include #include "tracing.h" #include "ecc.h" diff -urN linux-2.0.32-pre6/drivers/net/eepro100.c linux/drivers/net/eepro100.c --- linux-2.0.32-pre6/drivers/net/eepro100.c Fri Sep 5 11:20:20 1997 +++ linux/drivers/net/eepro100.c Mon Dec 3 21:49:04 2001 @@ -19,7 +19,7 @@ */ static const char *version = -"eepro100.c:v0.34 8/30/97 Donald Becker linux-eepro100@cesdis.gsfc.nasa.gov\n"; +"eepro100.c:v0.36 10/20/97 Donald Becker linux-eepro100@cesdis.gsfc.nasa.gov\n"; /* A few user-configurable values that apply to all boards. First set are undocumented and spelled per Intel recommendations. */ @@ -27,13 +27,16 @@ static int congenb = 0; /* Enable congestion control in the DP83840. */ static int txfifo = 8; /* Tx FIFO threshold in 4 byte units, 0-15 */ static int rxfifo = 8; /* Rx FIFO threshold, default 32 bytes. */ -static int txdmacount = 0; /* Tx DMA burst length, 0-127, default 0. */ -static int rxdmacount = 0; /* Rx DMA length, 0 means no preemption. */ +/* Tx/Rx DMA burst length, 0-127, 0 == no preemption, tx==128 -> disabled. */ +static int txdmacount = 128; +static int rxdmacount = 0; + +/* Set the copy breakpoint for the copy-only-tiny-buffer Rx method. + Lower values use more memory, but are faster. */ +static int rx_copybreak = 200; -/* If defined use the copy-only-tiny-buffer scheme for higher performance. - The value sets the copy breakpoint. Lower uses more memory, but is - faster. */ -#define SKBUFF_RX_COPYBREAK 256 +/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ +static int max_interrupt_work = 20; #include #ifdef MODULE @@ -161,7 +164,7 @@ Tx mode, but in a simplified lower-overhead manner: it associates only a single buffer descriptor with each frame descriptor. -Despite the extra space overhead in each recieve skbuff, the driver must use +Despite the extra space overhead in each receive skbuff, the driver must use the simplified Rx buffer mode to assure that only a single data buffer is associated with each RxFD. The driver implements this by reserving space for the Rx descriptor at the head of each Rx skbuff @@ -273,9 +276,6 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT ((400*HZ)/1000) -/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ -#define INTR_WORK 16 - /* How to wait for the command unit to accept a command. Typically this takes 0 ticks. */ static inline void wait_for_cmd_done(int cmd_ioaddr) @@ -454,6 +454,9 @@ #endif static int speedo_close(struct device *dev); static struct enet_statistics *speedo_get_stats(struct device *dev); +#ifdef HAVE_PRIVATE_IOCTL +static int speedo_ioctl(struct device *dev, struct ifreq *rq, int cmd); +#endif static void set_rx_mode(struct device *dev); @@ -475,8 +478,8 @@ int cards_found = 0; if (pcibios_present()) { - int pci_index; - for (pci_index = 0; pci_index < 8; pci_index++) { + static int pci_index = 0; + for (; pci_index < 8; pci_index++) { unsigned char pci_bus, pci_device_fn, pci_irq_line, pci_latency; #if (LINUX_VERSION_CODE >= VERSION(1,3,44)) int pci_ioaddr; @@ -540,6 +543,7 @@ { static int did_version = 0; /* Already printed version info. */ struct speedo_private *sp; + char *product; int i; u16 eeprom[0x40]; @@ -559,7 +563,7 @@ u16 sum = 0; int j; for (j = 0, i = 0; i < 0x40; i++) { - unsigned short value = read_eeprom(ioaddr, i); + u16 value = read_eeprom(ioaddr, i); eeprom[i] = value; sum += value; if (i < 3) { @@ -580,8 +584,13 @@ action. */ outl(0, ioaddr + SCBPort); - printk(KERN_INFO "%s: Intel EtherExpress Pro 10/100 at %#3x, ", - dev->name, ioaddr); + if (eeprom[3] & 0x0100) + product = "OEM i82557/i82558 10/100 Ethernet"; + else + product = "Intel EtherExpress Pro 10/100"; + + printk(KERN_INFO "%s: %s at %#3x, ", dev->name, product, ioaddr); + for (i = 0; i < 5; i++) printk("%2.2X:", dev->dev_addr[i]); printk("%2.2X, IRQ %d.\n", dev->dev_addr[i], irq); @@ -593,7 +602,7 @@ { const char *connectors[] = {" RJ45", " BNC", " AUI", " MII"}; /* The self-test results must be paragraph aligned. */ - int str[6], *volatile self_test_results; + s32 str[6], *volatile self_test_results; int boguscnt = 16000; /* Timeout for set-test. */ if (eeprom[3] & 0x03) printk(KERN_INFO " Receiver lock-up bug exists -- enabling" @@ -639,7 +648,7 @@ } /* Perform a system self-test. */ - self_test_results = (int*) ((((int) str) + 15) & ~0xf); + self_test_results = (s32*) ((((long) str) + 15) & ~0xf); self_test_results[0] = 0; self_test_results[1] = -1; outl(virt_to_bus(self_test_results) | 1, ioaddr + SCBPort); @@ -670,6 +679,8 @@ } #endif /* kernel_bloat */ + outl(0, ioaddr + SCBPort); + /* We do a request_region() only to register /proc/ioports info. */ request_region(ioaddr, SPEEDO3_TOTAL_SIZE, "Intel Speedo3 Ethernet"); @@ -680,10 +691,8 @@ dev->priv = kmalloc(sizeof(*sp), GFP_KERNEL); sp = dev->priv; memset(sp, 0, sizeof(*sp)); -#ifdef MODULE sp->next_module = root_speedo_dev; root_speedo_dev = dev; -#endif if (card_idx >= 0) { if (full_duplex[card_idx] >= 0) @@ -696,10 +705,8 @@ sp->phy[1] = eeprom[7]; sp->rx_bug = (eeprom[3] & 0x03) == 3 ? 0 : 1; - printk(KERN_INFO " Operating in %s duplex mode.\n", - sp->full_duplex ? "full" : "half"); if (sp->rx_bug) - printk(KERN_INFO " Reciever lock-up workaround activated.\n"); + printk(KERN_INFO " Receiver lock-up workaround activated.\n"); /* The Speedo-specific entries in the device structure. */ dev->open = &speedo_open; @@ -709,6 +716,9 @@ #ifdef NEW_MULTICAST dev->set_multicast_list = &set_rx_mode; #endif +#ifdef HAVE_PRIVATE_IOCTL + dev->do_ioctl = &speedo_ioctl; +#endif return; } @@ -727,7 +737,11 @@ /* Delay between EEPROM clock transitions. This is a "nasty" timing loop, but PC compatible machines are defined to delay an ISA compatible period for the SLOW_DOWN_IO macro. */ +#ifdef _LINUX_DELAY_H +#define eeprom_delay(nanosec) udelay(1); +#else #define eeprom_delay(nanosec) do { int _i = 3; while (--_i > 0) { __SLOW_DOWN_IO; }} while (0) +#endif /* The EEPROM commands include the alway-set leading bit. */ #define EE_WRITE_CMD (5 << 6) @@ -847,11 +861,13 @@ MOD_INC_USE_COUNT; /* Load the statistics block address. */ + wait_for_cmd_done(ioaddr + SCBCmd); outl(virt_to_bus(&sp->lstats), ioaddr + SCBPointer); outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); sp->lstats.done_marker = 0; speedo_init_rx_ring(dev); + wait_for_cmd_done(ioaddr + SCBCmd); outl(0, ioaddr + SCBPointer); outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); @@ -862,8 +878,8 @@ /* Fill the first command with our physical address. */ { - unsigned short *eaddrs = (unsigned short *)dev->dev_addr; - unsigned short *setup_frm = (short *)&(sp->tx_ring[0].tx_desc_addr); + u16 *eaddrs = (u16 *)dev->dev_addr; + u16 *setup_frm = (u16 *)&(sp->tx_ring[0].tx_desc_addr); /* Avoid a bug(?!) here by marking the command already completed. */ sp->tx_ring[0].status = ((CmdSuspend | CmdIASetup) << 16) | 0xa000; @@ -877,6 +893,7 @@ sp->dirty_tx = 0; sp->tx_full = 0; + wait_for_cmd_done(ioaddr + SCBCmd); outl(0, ioaddr + SCBPointer); outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); @@ -913,6 +930,7 @@ sp->timer.function = &speedo_timer; /* timer handler */ add_timer(&sp->timer); + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_DUMPSTATS, ioaddr + SCBCmd); return 0; } @@ -1096,6 +1114,7 @@ sp->last_cmd->command &= ~(CmdSuspend | CmdIntr); sp->last_cmd = (struct descriptor *)&sp->tx_ring[entry]; /* Trigger the command unit resume. */ + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_RESUME, ioaddr + SCBCmd); restore_flags(flags); } @@ -1129,7 +1148,7 @@ #endif #endif struct speedo_private *sp; - int ioaddr, boguscnt = INTR_WORK; + int ioaddr, boguscnt = max_interrupt_work; unsigned short status; #ifndef final_version @@ -1198,7 +1217,7 @@ int status = sp->tx_ring[entry].status; if (speedo_debug > 5) - printk(KERN_DEBUG " scavenge canidate %d status %4.4x.\n", + printk(KERN_DEBUG " scavenge candidate %d status %4.4x.\n", entry, status); if ((status & 0x8000) == 0) break; /* It still hasn't been processed. */ @@ -1289,13 +1308,13 @@ dev->name, status); } else { /* Malloc up new buffer, compatible with net-2e. */ - short pkt_len = sp->rx_ringp[entry]->count & 0x3fff; + int pkt_len = sp->rx_ringp[entry]->count & 0x3fff; struct sk_buff *skb; int rx_in_place = 0; /* Check if the packet is long enough to just accept without copying to a properly sized skbuff. */ - if (pkt_len > SKBUFF_RX_COPYBREAK) { + if (pkt_len > rx_copybreak) { struct sk_buff *newskb; char *temp; @@ -1372,8 +1391,14 @@ #if (LINUX_VERSION_CODE >= VERSION(1,3,44)) if (! rx_in_place) { skb_reserve(skb, 2); /* 16 byte align the data fields */ +#if defined(__i386) && notyet + /* Packet is in one chunk -- we can copy + cksum. */ + eth_io_copy_and_sum(skb, bus_to_virt(sp->rx_ringp[entry]->rx_buf_addr), + pkt_len, 0); +#else memcpy(skb_put(skb, pkt_len), bus_to_virt(sp->rx_ringp[entry]->rx_buf_addr), pkt_len); +#endif } skb->protocol = eth_type_trans(skb, dev); #else @@ -1516,12 +1541,39 @@ sp->stats.rx_fifo_errors += sp->lstats.rx_overrun_errs; sp->stats.rx_length_errors += sp->lstats.rx_runt_errs; sp->lstats.done_marker = 0x0000; - if (dev->start) + if (dev->start) { + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_DUMPSTATS, ioaddr + SCBCmd); + } } return &sp->stats; } +#ifdef HAVE_PRIVATE_IOCTL +static int speedo_ioctl(struct device *dev, struct ifreq *rq, int cmd) +{ + struct speedo_private *sp = (struct speedo_private *)dev->priv; + int ioaddr = dev->base_addr; + u16 *data = (u16 *)&rq->ifr_data; + int phy = sp->phy[0] & 0x1f; + + switch(cmd) { + case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */ + data[0] = phy; + case SIOCDEVPRIVATE+1: /* Read the specified MII register. */ + data[3] = mdio_read(ioaddr, data[0], data[1]); + return 0; + case SIOCDEVPRIVATE+2: /* Write the specified MII register */ + if (!suser()) + return -EPERM; + mdio_write(ioaddr, data[0], data[1], data[2]); + return 0; + default: + return -EOPNOTSUPP; + } +} +#endif /* HAVE_PRIVATE_IOCTL */ + /* Set or clear the multicast filter for this adaptor. This is very ugly with Intel chips -- we usually have to execute an entire configuration command, plus process a multicast command. @@ -1580,6 +1632,7 @@ virt_to_bus(&(sp->tx_ring[sp->cur_tx % TX_RING_SIZE])); sp->last_cmd->command &= ~CmdSuspend; /* Immediately trigger the command unit resume. */ + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_RESUME, ioaddr + SCBCmd); sp->last_cmd = &sp->config_cmd; restore_flags(flags); @@ -1595,8 +1648,7 @@ if (new_rx_mode == 0 && dev->mc_count < 3) { /* The simple case of 0-2 multicast list entries occurs often, and fits within one tx_ring[] entry. */ - u16 *setup_params; - unsigned short *eaddrs; + u16 *setup_params, *eaddrs; struct dev_mc_list *mclist; save_flags(flags); @@ -1607,12 +1659,12 @@ sp->tx_ring[entry].link = virt_to_bus(&sp->tx_ring[sp->cur_tx % TX_RING_SIZE]); sp->tx_ring[entry].tx_desc_addr = 0; /* Really MC list count. */ - setup_params = (short *)&sp->tx_ring[entry].tx_desc_addr; + setup_params = (u16 *)&sp->tx_ring[entry].tx_desc_addr; *setup_params++ = dev->mc_count*6; /* Fill in the multicast addresses. */ for (i = 0, mclist = dev->mc_list; i < dev->mc_count; i++, mclist = mclist->next) { - eaddrs = (unsigned short *)mclist->dmi_addr; + eaddrs = (u16 *)mclist->dmi_addr; *setup_params++ = *eaddrs++; *setup_params++ = *eaddrs++; *setup_params++ = *eaddrs++; @@ -1620,15 +1672,16 @@ sp->last_cmd->command &= ~CmdSuspend; /* Immediately trigger the command unit resume. */ + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_RESUME, ioaddr + SCBCmd); sp->last_cmd = (struct descriptor *)&sp->tx_ring[entry]; restore_flags(flags); } else if (new_rx_mode == 0) { /* This does not work correctly, but why not? */ struct dev_mc_list *mclist; - unsigned short *eaddrs; + u16 *eaddrs; struct descriptor *mc_setup_frm = sp->mc_setup_frm; - u16 *setup_params = (short *)mc_setup_frm->params; + u16 *setup_params = (u16 *)mc_setup_frm->params; int i; if (sp->mc_setup_frm_len < 10 + dev->mc_count*6 @@ -1654,12 +1707,12 @@ mc_setup_frm->status = 0; mc_setup_frm->command = CmdSuspend | CmdIntr | CmdMulticastList; /* Link set below. */ - setup_params = (short *)mc_setup_frm->params; + setup_params = (u16 *)mc_setup_frm->params; *setup_params++ = dev->mc_count*6; /* Fill in the multicast addresses. */ for (i = 0, mclist = dev->mc_list; i < dev->mc_count; i++, mclist = mclist->next) { - eaddrs = (unsigned short *)mclist->dmi_addr; + eaddrs = (u16 *)mclist->dmi_addr; *setup_params++ = *eaddrs++; *setup_params++ = *eaddrs++; *setup_params++ = *eaddrs++; @@ -1685,6 +1738,7 @@ sp->last_cmd->command &= ~CmdSuspend; /* Immediately trigger the command unit resume. */ + wait_for_cmd_done(ioaddr + SCBCmd); outw(CU_RESUME, ioaddr + SCBCmd); sp->last_cmd = mc_setup_frm; restore_flags(flags); @@ -1699,6 +1753,21 @@ #ifdef MODULE #if (LINUX_VERSION_CODE < VERSION(1,3,38)) /* 1.3.38 and later */ char kernel_version[] = UTS_RELEASE; +#endif + +#if LINUX_VERSION_CODE > 0x20118 +MODULE_AUTHOR("Donald Becker "); +MODULE_DESCRIPTION("Intel i82557/i82558 EtherExpressPro driver"); +MODULE_PARM(debug, "i"); +MODULE_PARM(options, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(congenb, "i"); +MODULE_PARM(txfifo, "i"); +MODULE_PARM(rxfifo, "i"); +MODULE_PARM(txdmacount, "i"); +MODULE_PARM(rxdmacount, "i"); +MODULE_PARM(rx_copybreak, "i"); +MODULE_PARM(max_interrupt_work, "i"); #endif int diff -urN linux-2.0.32-pre6/drivers/scsi/st.c linux/drivers/scsi/st.c --- linux-2.0.32-pre6/drivers/scsi/st.c Tue Aug 5 09:03:30 1997 +++ linux/drivers/scsi/st.c Mon Dec 3 21:49:04 2001 @@ -556,6 +556,7 @@ STp->buffer = st_buffers[i]; (STp->buffer)->in_use = 1; (STp->buffer)->writing = 0; + (STp->buffer)->last_result_fatal = 0; flags = filp->f_flags; STp->write_prot = ((flags & O_ACCMODE) == O_RDONLY); diff -urN linux-2.0.32-pre6/fs/bad_inode.c linux/fs/bad_inode.c --- linux-2.0.32-pre6/fs/bad_inode.c Sat Aug 16 16:23:19 1997 +++ linux/fs/bad_inode.c Mon Dec 3 21:49:04 2001 @@ -10,7 +10,7 @@ #include #include -static int return_EIO() +static int return_EIO(void) { return -EIO; } diff -urN linux-2.0.32-pre6/fs/ncpfs/sock.c linux/fs/ncpfs/sock.c --- linux-2.0.32-pre6/fs/ncpfs/sock.c Wed Jul 10 03:19:24 1996 +++ linux/fs/ncpfs/sock.c Mon Dec 3 21:49:04 2001 @@ -608,7 +608,7 @@ h->sequence = server->sequence; h->conn_low = (server->connection) & 0xff; h->conn_high = ((server->connection) & 0xff00) >> 8; - h->task = (current->pid) & 0xff; + h->task = 2; h->function = function; if ((result = ncp_do_request(server, request_size + sizeof(*h))) < 0) @@ -644,7 +644,7 @@ h->sequence = server->sequence; h->conn_low = 0xff; h->conn_high = 0xff; - h->task = (current->pid) & 0xff; + h->task = 2; h->function = 0; if ((result = ncp_do_request(server, sizeof(*h))) < 0) @@ -669,7 +669,7 @@ h->sequence = server->sequence; h->conn_low = (server->connection) & 0xff; h->conn_high = ((server->connection) & 0xff00) >> 8; - h->task = (current->pid) & 0xff; + h->task = 2; h->function = 0; return ncp_do_request(server, sizeof(*h)); diff -urN linux-2.0.32-pre6/fs/vfat/namei.c linux/fs/vfat/namei.c --- linux-2.0.32-pre6/fs/vfat/namei.c Sat Nov 30 02:21:23 1996 +++ linux/fs/vfat/namei.c Mon Dec 3 21:49:04 2001 @@ -1439,10 +1439,13 @@ PRINTK(("vfat_rename 8\n")); if (res < 0) goto rename_done; } else { - PRINTK(("vfat_rename 9\n")); - res = vfat_unlinkx(new_dir,new_name,new_len,1); - PRINTK(("vfat_rename 10\n")); - if (res < 0) goto rename_done; + /* Is this the same file, different case? */ + if (new_inode != old_inode) { + PRINTK(("vfat_rename 9\n")); + res = vfat_unlinkx(new_dir,new_name,new_len,1); + PRINTK(("vfat_rename 10\n")); + if (res < 0) goto rename_done; + } } } diff -urN linux-2.0.32-pre6/include/linux/pci.h linux/include/linux/pci.h --- linux-2.0.32-pre6/include/linux/pci.h Fri Oct 17 14:05:36 1997 +++ linux/include/linux/pci.h Mon Dec 3 21:49:04 2001 @@ -43,8 +43,8 @@ -#ifndef PCI_H -#define PCI_H +#ifndef LINUX_PCI_H +#define LINUX_PCI_H /* * Under PCI, each device has 256 bytes of configuration address space, @@ -742,6 +742,7 @@ #define PCI_DEVICE_ID_ARK_STINGARK 0xa099 #define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 +#ifdef __KERNEL__ /* * The PCI interface treats multi-function devices as independent * devices. The slot/function address of each device is encoded @@ -826,4 +827,5 @@ extern int get_pci_list (char *buf); -#endif /* PCI_H */ +#endif /* __KERNEL__ */ +#endif /* LINUX_PCI_H */