Commit e4077388 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.32pre2

parent 0115c1b6
...@@ -1605,7 +1605,7 @@ S: Perth, Western Australia ...@@ -1605,7 +1605,7 @@ S: Perth, Western Australia
S: Australia S: Australia
N: Greg Page N: Greg Page
E: greg@caldera.com E: gpage@sovereign.org
D: IPX development and support D: IPX development and support
N: David Parsons N: David Parsons
......
...@@ -1477,10 +1477,6 @@ CONFIG_NETFILTER ...@@ -1477,10 +1477,6 @@ CONFIG_NETFILTER
Chances are that you should say Y here if you compile a kernel which Chances are that you should say Y here if you compile a kernel which
will run as a router and N for regular hosts. If unsure, say N. will run as a router and N for regular hosts. If unsure, say N.
Network packet filtering debugging
CONFIG_NETFILTER_DEBUG
Say Y to make sure packets aren't leaking.
SYN flood protection SYN flood protection
CONFIG_SYN_COOKIES CONFIG_SYN_COOKIES
Normal TCP/IP networking is open to an attack known as "SYN Normal TCP/IP networking is open to an attack known as "SYN
...@@ -1496,7 +1492,7 @@ CONFIG_SYN_COOKIES ...@@ -1496,7 +1492,7 @@ CONFIG_SYN_COOKIES
is no need for the legitimate users to change their TCP/IP software; is no need for the legitimate users to change their TCP/IP software;
SYN cookies work transparently to them. For technical information SYN cookies work transparently to them. For technical information
about SYN cookies, check out about SYN cookies, check out
ftp://koobera.math.uic.edu/pub/docs/syncookies-archive . ftp://koobera.math.uic.edu/syncookies.html .
If you are SYN flooded, the source address reported by the kernel is If you are SYN flooded, the source address reported by the kernel is
likely to have been forged by the attacker; it is only reported as likely to have been forged by the attacker; it is only reported as
...@@ -8415,7 +8411,15 @@ Emulate SUN NFS server ...@@ -8415,7 +8411,15 @@ Emulate SUN NFS server
CONFIG_NFSD_SUN CONFIG_NFSD_SUN
If you would like for the server to allow clients to access If you would like for the server to allow clients to access
directories that are mount points on the local filesystem (this is directories that are mount points on the local filesystem (this is
how nfsd behaves on Sun systems), say Y here. If unsure, say N. how nfsd behaves on Sun systems), say Y here.
If you use Tru64 clients, say Y.
If unsure, say N.
Provide NFSv3 server support (EXPERIMENTAL)
CONFIG_NFSD_V3
If you would like to include the NFSv3 server was well as the NFSv2
server, say Y here. File locking, via the NLMv4 protocol, is not
supported yet. If unsure, say N.
OS/2 HPFS filesystem support OS/2 HPFS filesystem support
CONFIG_HPFS_FS CONFIG_HPFS_FS
......
...@@ -276,6 +276,8 @@ Summary of ide driver parameters for kernel "command line": ...@@ -276,6 +276,8 @@ Summary of ide driver parameters for kernel "command line":
port. Should be used only as a last resort. port. Should be used only as a last resort.
"hdx=swapdata" : when the drive is a disk, byte swap all data "hdx=swapdata" : when the drive is a disk, byte swap all data
"hdxlun=xx" : set the drive last logical unit
"idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz, "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
where "xx" is between 20 and 66 inclusive, where "xx" is between 20 and 66 inclusive,
used when tuning chipset PIO modes. used when tuning chipset PIO modes.
......
...@@ -56,7 +56,8 @@ static inline void do_identify (ide_drive_t *drive, byte cmd) ...@@ -56,7 +56,8 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
ide_input_data(drive, id, SECTOR_WORDS); /* read 512 bytes of id info */ ide_input_data(drive, id, SECTOR_WORDS); /* read 512 bytes of id info */
ide__sti(); /* local CPU only */ ide__sti(); /* local CPU only */
ide_fix_driveid(id); ide_fix_driveid(id);
if (!drive->forced_lun)
drive->last_lun = id->word126 & 0x7;
#if defined (CONFIG_SCSI_EATA_DMA) || defined (CONFIG_SCSI_EATA_PIO) || defined (CONFIG_SCSI_EATA) #if defined (CONFIG_SCSI_EATA_DMA) || defined (CONFIG_SCSI_EATA_PIO) || defined (CONFIG_SCSI_EATA)
/* /*
* EATA SCSI controllers do a hardware ATA emulation: * EATA SCSI controllers do a hardware ATA emulation:
......
...@@ -2684,6 +2684,7 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m ...@@ -2684,6 +2684,7 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
* *
* "hdx=swapdata" : when the drive is a disk, byte swap all data * "hdx=swapdata" : when the drive is a disk, byte swap all data
* "hdx=bswap" : same as above.......... * "hdx=bswap" : same as above..........
* "hdxlun=xx" : set the drive last logical unit.
* "hdx=flash" : allows for more than one ata_flash disk to be * "hdx=flash" : allows for more than one ata_flash disk to be
* registered. In most cases, only one device * registered. In most cases, only one device
* will be present. * will be present.
...@@ -2789,6 +2790,19 @@ void __init ide_setup (char *s) ...@@ -2789,6 +2790,19 @@ void __init ide_setup (char *s)
strncpy(drive->driver_req, s + 4, 9); strncpy(drive->driver_req, s + 4, 9);
goto done; goto done;
} }
/*
* Look for last lun option: "hdxlun="
*/
if (s[3] == 'l' && s[4] == 'u' && s[5] == 'n') {
if (match_parm(&s[6], NULL, vals, 1) != 1)
goto bad_option;
if (vals[0] >= 0 && vals[0] <= 7) {
drive->last_lun = vals[0];
drive->forced_lun = 1;
} else
printk(" -- BAD LAST LUN! Expected value from 0 to 7");
goto done;
}
switch (match_parm(&s[3], hd_words, vals, 3)) { switch (match_parm(&s[3], hd_words, vals, 3)) {
case -1: /* "none" */ case -1: /* "none" */
drive->nobios = 1; /* drop into "noprobe" */ drive->nobios = 1; /* drop into "noprobe" */
......
This diff is collapsed.
...@@ -1515,7 +1515,7 @@ static void __init i2o_sys_init() ...@@ -1515,7 +1515,7 @@ static void __init i2o_sys_init()
{ {
niop = iop->next; niop = iop->next;
#ifdef DRIVERDEBUG #ifdef DRIVERDEBUG
printk(KERN_INFO "Enableing iop%d\n", iop->unit); printk(KERN_INFO "Enabling iop%d\n", iop->unit);
#endif #endif
if(i2o_enable_controller(iop)) if(i2o_enable_controller(iop))
{ {
...@@ -2680,6 +2680,7 @@ EXPORT_SYMBOL(i2o_report_controller_unit); ...@@ -2680,6 +2680,7 @@ EXPORT_SYMBOL(i2o_report_controller_unit);
EXPORT_SYMBOL(i2o_activate_controller); EXPORT_SYMBOL(i2o_activate_controller);
EXPORT_SYMBOL(i2o_online_controller); EXPORT_SYMBOL(i2o_online_controller);
EXPORT_SYMBOL(i2o_get_class_name); EXPORT_SYMBOL(i2o_get_class_name);
EXPORT_SYMBOL(i2o_status_get);
EXPORT_SYMBOL(i2o_query_scalar); EXPORT_SYMBOL(i2o_query_scalar);
EXPORT_SYMBOL(i2o_set_scalar); EXPORT_SYMBOL(i2o_set_scalar);
......
...@@ -741,7 +741,7 @@ RCProcI2OMsgQ(U16 AdapterID) ...@@ -741,7 +741,7 @@ RCProcI2OMsgQ(U16 AdapterID)
} }
break; break;
default: default:
printk("Unknown private I2O msg received: 0x%x\n", printk("Unknown private I2O msg received: 0x%lx\n",
p32[5]); p32[5]);
break; break;
} }
...@@ -1216,7 +1216,7 @@ RCGetPromiscuousMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback) ...@@ -1216,7 +1216,7 @@ RCGetPromiscuousMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback)
if (!timeout--) if (!timeout--)
{ {
kprintf("Timeout waiting for promiscuous mode from adapter\n"); kprintf("Timeout waiting for promiscuous mode from adapter\n");
kprintf("0x%08.8ulx\n", p32[0]); kprintf("0x%8.8lx\n", p32[0]);
return RC_RTN_NO_LINK_SPEED; return RC_RTN_NO_LINK_SPEED;
} }
} }
...@@ -1337,7 +1337,7 @@ RCGetBroadcastMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback) ...@@ -1337,7 +1337,7 @@ RCGetBroadcastMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback)
if (!timeout--) if (!timeout--)
{ {
kprintf("Timeout waiting for promiscuous mode from adapter\n"); kprintf("Timeout waiting for promiscuous mode from adapter\n");
kprintf("0x%08.8ulx\n", p32[0]); kprintf("0x%8.8lx\n", p32[0]);
return RC_RTN_NO_LINK_SPEED; return RC_RTN_NO_LINK_SPEED;
} }
} }
...@@ -1421,7 +1421,7 @@ RCGetLinkSpeed(U16 AdapterID, PU32 pLinkSpeedCode, PFNWAITCALLBACK WaitCallback) ...@@ -1421,7 +1421,7 @@ RCGetLinkSpeed(U16 AdapterID, PU32 pLinkSpeedCode, PFNWAITCALLBACK WaitCallback)
if (!timeout--) if (!timeout--)
{ {
kprintf("Timeout waiting for link speed from IOP\n"); kprintf("Timeout waiting for link speed from IOP\n");
kprintf("0x%08.8ulx\n", p32[0]); kprintf("0x%8.8lx\n", p32[0]);
return RC_RTN_NO_LINK_SPEED; return RC_RTN_NO_LINK_SPEED;
} }
} }
......
...@@ -56,8 +56,10 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n"; ...@@ -56,8 +56,10 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n";
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/isapnp.h>
/* for SIOGCM/SIOSCM stuff */ /* for SIOGCM/SIOSCM stuff */
#include <linux/if_cablemodem.h> #include <linux/if_cablemodem.h>
#ifdef SB1000_DEBUG #ifdef SB1000_DEBUG
...@@ -93,8 +95,6 @@ static void sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs); ...@@ -93,8 +95,6 @@ static void sb1000_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static struct enet_statistics *sb1000_stats(struct net_device *dev); static struct enet_statistics *sb1000_stats(struct net_device *dev);
static int sb1000_close(struct net_device *dev); static int sb1000_close(struct net_device *dev);
/* Plug-n-Play routine */
static inline unsigned char read_resource_data(void);
/* SB1000 hardware routines to be used during open/configuration phases */ /* SB1000 hardware routines to be used during open/configuration phases */
static inline void nicedelay(unsigned long usecs); static inline void nicedelay(unsigned long usecs);
...@@ -138,160 +138,132 @@ static inline int sb1000_set_PIDs(const int ioaddr[], const char* name, ...@@ -138,160 +138,132 @@ static inline int sb1000_set_PIDs(const int ioaddr[], const char* name,
static inline int sb1000_rx(struct net_device *dev); static inline int sb1000_rx(struct net_device *dev);
static inline void sb1000_error_dpc(struct net_device *dev); static inline void sb1000_error_dpc(struct net_device *dev);
/* Plug-n-Play constants */
static const int READ_DATA_PORT = 0x203; /* This port number may change!!! */
static const int ADDRESS_PORT = 0x279;
static const int WRITE_DATA_PORT = 0xa79;
/* Plug-n-Play read resource mechanism */
static inline unsigned char
read_resource_data(void) {
/* poll */
outb(0x05, ADDRESS_PORT); /* Select PnP status register. */
while (!(inb(READ_DATA_PORT) & 0x1)) ;
/* read resource data */
outb(0x04, ADDRESS_PORT); /* Select PnP resource data register. */
return inb(READ_DATA_PORT);
}
/* probe for SB1000 using Plug-n-Play mechanism */ /* probe for SB1000 using Plug-n-Play mechanism */
int int
sb1000_probe(struct net_device *dev) sb1000_probe(struct net_device *dev)
{ {
unsigned short ioaddr[2], irq; unsigned short ioaddr[2], irq;
short i, csn; struct pci_dev *idev=NULL;
unsigned int serial_number; unsigned int serial_number;
while(1)
{
/*
* Find the card
*/
idev=isapnp_find_dev(NULL, ISAPNP_VENDOR('G','I','C'),
ISAPNP_FUNCTION(0x1000), idev);
/*
* No card
*/
if(idev==NULL)
return -ENODEV;
/*
* Bring it online
*/
idev->prepare(idev);
idev->activate(idev);
/*
* Ports free ?
*/
if(!idev->resource[0].start || check_region(idev->resource[0].start, 16))
continue;
if(!idev->resource[1].start || check_region(idev->resource[1].start, 16))
continue;
serial_number = idev->bus->serial;
ioaddr[0]=idev->resource[0].start;
ioaddr[1]=idev->resource[1].start;
irq = idev->irq;
/* check I/O base and IRQ */
if (dev->base_addr != 0 && dev->base_addr != ioaddr[0])
continue;
if (dev->rmem_end != 0 && dev->rmem_end != ioaddr[1])
continue;
if (dev->irq != 0 && dev->irq != irq)
continue;
/*
* Ok set it up.
*/
dev->base_addr = ioaddr[0];
/* rmem_end holds the second I/O address - fv */
dev->rmem_end = ioaddr[1];
dev->irq = irq;
if (sb1000_debug > 0)
printk(KERN_NOTICE "%s: sb1000 at (%#3.3lx,%#3.3lx), "
"S/N %#8.8x, IRQ %d.\n", dev->name, dev->base_addr,
dev->rmem_end, serial_number, dev->irq);
dev = init_etherdev(dev, 0);
/* Make up a SB1000-specific-data structure. */
dev->priv = kmalloc(sizeof(struct sb1000_private), GFP_KERNEL);
if (dev->priv == NULL)
return -ENOMEM;
memset(dev->priv, 0, sizeof(struct sb1000_private));
if (sb1000_debug > 0)
printk(KERN_NOTICE "%s", version);
/* The SB1000-specific entries in the device structure. */
dev->open = sb1000_open;
dev->do_ioctl = sb1000_dev_ioctl;
dev->hard_start_xmit = sb1000_start_xmit;
dev->stop = sb1000_close;
dev->get_stats = sb1000_stats;
/* Fill in the generic fields of the device structure. */
dev->change_mtu = NULL;
dev->hard_header = NULL;
dev->rebuild_header = NULL;
dev->set_mac_address = NULL;
dev->header_cache_update= NULL;
dev->type = ARPHRD_ETHER;
dev->hard_header_len = 0;
dev->mtu = 1500;
dev->addr_len = ETH_ALEN;
/* hardware address is 0:0:serial_number */
dev->dev_addr[0] = 0;
dev->dev_addr[1] = 0;
dev->dev_addr[2] = serial_number >> 24 & 0xff;
dev->dev_addr[3] = serial_number >> 16 & 0xff;
dev->dev_addr[4] = serial_number >> 8 & 0xff;
dev->dev_addr[5] = serial_number >> 0 & 0xff;
dev->tx_queue_len = 0;
/* New-style flags. */
dev->flags = IFF_POINTOPOINT|IFF_NOARP;
const unsigned char initiation_key[] = { 0x00, 0x00, 0x6a, 0xb5, 0xda, /* Lock resources */
0xed, 0xf6, 0xfb, 0x7d, 0xbe, 0xdf, 0x6f, 0x37, 0x1b, 0x0d,
0x86, 0xc3, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x8b, 0x45, 0xa2,
0xd1, 0xe8, 0x74, 0x3a, 0x9d, 0xce, 0xe7, 0x73, 0x39 };
const unsigned char sb1000_vendor_ID[] = {
0x1d, 0x23, 0x10, 0x00 }; /* "GIC1000" */
/* Reset the ISA PnP mechanism */
outb(0x02, ADDRESS_PORT); /* Select PnP config control register. */
outb(0x02, WRITE_DATA_PORT); /* Return to WaitForKey state. */
/* send initiation key */
for (i = 0; i < sizeof(initiation_key) / sizeof(initiation_key[0]); i++) {
outb(initiation_key[i], ADDRESS_PORT);
}
/* set card CSN into configuration mode */
for (csn = 1; csn <= 255; csn++) {
outb(0x03, ADDRESS_PORT); /* Select PnP wake[CSN] register. */
outb(csn, WRITE_DATA_PORT); /* Wake[CSN] */
/* check card ID */
for (i = 0; i < 4; i++) {
if (read_resource_data() != sb1000_vendor_ID[i]) break;
}
if (i == 4) break;
}
/* SB1000 not found */ request_region(ioaddr[0], 16, dev->name);
if (csn > 255) { request_region(ioaddr[1], 16, dev->name);
/* return to WaitForKey state */
outb(0x02, ADDRESS_PORT); /* Select PnP config control register. */
outb(0x02, WRITE_DATA_PORT);/* Return to WaitForKey state. */
return -ENODEV;
}
/* found: get serial number and skip checksum */ return 0;
serial_number = 0;
for (i = 0; i < 4; i++) {
serial_number |= read_resource_data() << (8 * i);
}
read_resource_data();
/* get I/O port base address */
outb(0x60, ADDRESS_PORT); /* Select PnP I/O port base address 0. */
ioaddr[0] = inb(READ_DATA_PORT) << 8;
outb(0x61, ADDRESS_PORT);
ioaddr[0] |= inb(READ_DATA_PORT);
outb(0x62, ADDRESS_PORT); /* Select PnP I/O port base address 1. */
ioaddr[1] = inb(READ_DATA_PORT) << 8;
outb(0x63, ADDRESS_PORT);
ioaddr[1] |= inb(READ_DATA_PORT);
/* get IRQ */
outb(0x70, ADDRESS_PORT); /* Select PnP IRQ level select 0. */
irq = inb(READ_DATA_PORT);
/* return to WaitForKey state */
outb(0x02, ADDRESS_PORT); /* Select PnP config control register. */
outb(0x02, WRITE_DATA_PORT); /* Return to WaitForKey state. */
/* check I/O base and IRQ */
if (dev->base_addr != 0 && dev->base_addr != ioaddr[0]) {
return -ENODEV;
}
if (dev->rmem_end != 0 && dev->rmem_end != ioaddr[1]) {
return -ENODEV;
}
if (dev->irq != 0 && dev->irq != irq) {
return -ENODEV;
} }
dev->base_addr = ioaddr[0];
/* rmem_end holds the second I/O address - fv */
dev->rmem_end = ioaddr[1];
dev->irq = irq;
if (sb1000_debug > 0)
printk(KERN_NOTICE "%s: sb1000 at (%#3.3lx,%#3.3lx), csn %d, "
"S/N %#8.8x, IRQ %d.\n", dev->name, dev->base_addr,
dev->rmem_end, csn, serial_number, dev->irq);
dev = init_etherdev(dev, 0);
/* Make up a SB1000-specific-data structure. */
dev->priv = kmalloc(sizeof(struct sb1000_private), GFP_KERNEL);
if (dev->priv == NULL)
return -ENOMEM;
memset(dev->priv, 0, sizeof(struct sb1000_private));
if (sb1000_debug > 0)
printk(KERN_NOTICE "%s", version);
/* The SB1000-specific entries in the device structure. */
dev->open = sb1000_open;
dev->do_ioctl = sb1000_dev_ioctl;
dev->hard_start_xmit = sb1000_start_xmit;
dev->stop = sb1000_close;
dev->get_stats = sb1000_stats;
/* Fill in the generic fields of the device structure. */
dev->change_mtu = NULL;
dev->hard_header = NULL;
dev->rebuild_header = NULL;
dev->set_mac_address = NULL;
dev->header_cache_update= NULL;
dev->type = ARPHRD_ETHER;
dev->hard_header_len = 0;
dev->mtu = 1500;
dev->addr_len = ETH_ALEN;
/* hardware address is 0:0:serial_number */
dev->dev_addr[0] = 0;
dev->dev_addr[1] = 0;
dev->dev_addr[2] = serial_number >> 24 & 0xff;
dev->dev_addr[3] = serial_number >> 16 & 0xff;
dev->dev_addr[4] = serial_number >> 8 & 0xff;
dev->dev_addr[5] = serial_number >> 0 & 0xff;
dev->tx_queue_len = 0;
/* New-style flags. */
dev->flags = IFF_POINTOPOINT|IFF_NOARP;
return 0;
} }
/* /*
* SB1000 hardware routines to be used during open/configuration phases * SB1000 hardware routines to be used during open/configuration phases
*/ */
const int TimeOutJiffies = (int)(8.75 * HZ); const int TimeOutJiffies = (int)(8.75 * HZ);
static inline void nicedelay(unsigned long usecs) static inline void nicedelay(unsigned long usecs)
...@@ -1279,6 +1251,8 @@ init_module(void) ...@@ -1279,6 +1251,8 @@ init_module(void)
void cleanup_module(void) void cleanup_module(void)
{ {
unregister_netdev(&dev_sb1000); unregister_netdev(&dev_sb1000);
release_region(&dev_sb1000.base_addr, 16);
release_region(&dev_sb1000.rmem_end, 16);
kfree_s(dev_sb1000.priv, sizeof(struct sb1000_private)); kfree_s(dev_sb1000.priv, sizeof(struct sb1000_private));
dev_sb1000.priv = NULL; dev_sb1000.priv = NULL;
} }
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/spinlock.h>
typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 ); typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 );
...@@ -234,13 +234,15 @@ static inline void ...@@ -234,13 +234,15 @@ static inline void
TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type )
{ {
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv; TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
unsigned long flags;
cli(); spin_lock_irqsave(&priv->lock, flags);
if ( priv->timer.function != NULL ) { if ( priv->timer.function != NULL ) {
spin_unlock_irqrestore(&priv->lock, flags);
return; return;
} }
priv->timer.function = &TLan_Timer; priv->timer.function = &TLan_Timer;
sti(); spin_unlock_irqrestore(&priv->lock, flags);
priv->timer.data = (unsigned long) dev; priv->timer.data = (unsigned long) dev;
priv->timer.expires = jiffies + ticks; priv->timer.expires = jiffies + ticks;
...@@ -336,6 +338,8 @@ extern int init_module(void) ...@@ -336,6 +338,8 @@ extern int init_module(void)
priv->speed = speed; priv->speed = speed;
priv->sa_int = sa_int; priv->sa_int = sa_int;
priv->debug = debug; priv->debug = debug;
spin_lock_init(&priv->lock);
ether_setup( dev ); ether_setup( dev );
...@@ -770,6 +774,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) ...@@ -770,6 +774,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
TLanList *tail_list; TLanList *tail_list;
u8 *tail_buffer; u8 *tail_buffer;
int pad; int pad;
unsigned long flags;
if ( ! priv->phyOnline ) { if ( ! priv->phyOnline ) {
TLAN_DBG( TLAN_DEBUG_TX, "TLAN TRANSMIT: %s PHY is not ready\n", dev->name ); TLAN_DBG( TLAN_DEBUG_TX, "TLAN TRANSMIT: %s PHY is not ready\n", dev->name );
...@@ -810,7 +815,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) ...@@ -810,7 +815,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
tail_list->buffer[1].address = 0; tail_list->buffer[1].address = 0;
} }
cli(); spin_lock_irqsave(&priv->lock, flags);
tail_list->cStat = TLAN_CSTAT_READY; tail_list->cStat = TLAN_CSTAT_READY;
if ( ! priv->txInProgress ) { if ( ! priv->txInProgress ) {
priv->txInProgress = 1; priv->txInProgress = 1;
...@@ -826,7 +831,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) ...@@ -826,7 +831,7 @@ int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
( priv->txList + ( priv->txTail - 1 ) )->forward = virt_to_bus( tail_list ); ( priv->txList + ( priv->txTail - 1 ) )->forward = virt_to_bus( tail_list );
} }
} }
sti(); spin_unlock_irqrestore(&priv->lock, flags);
CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS );
...@@ -870,10 +875,12 @@ void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -870,10 +875,12 @@ void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs)
u32 host_cmd; u32 host_cmd;
u16 host_int; u16 host_int;
int type; int type;
TLanPrivateInfo *priv;
dev = (struct net_device *) dev_id; dev = (struct net_device *) dev_id;
priv = (TLanPrivateInfo *) dev->priv;
cli(); spin_lock(&priv->lock);
if ( dev->interrupt ) { if ( dev->interrupt ) {
printk( "TLAN: Re-entering interrupt handler for %s: %ld.\n" , dev->name, dev->interrupt ); printk( "TLAN: Re-entering interrupt handler for %s: %ld.\n" , dev->name, dev->interrupt );
} }
...@@ -892,7 +899,7 @@ void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -892,7 +899,7 @@ void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
dev->interrupt--; dev->interrupt--;
sti(); spin_unlock(&priv->lock);
} /* TLan_HandleInterrupts */ } /* TLan_HandleInterrupts */
...@@ -1558,6 +1565,7 @@ void TLan_Timer( unsigned long data ) ...@@ -1558,6 +1565,7 @@ void TLan_Timer( unsigned long data )
struct net_device *dev = (struct net_device *) data; struct net_device *dev = (struct net_device *) data;
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv; TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
u32 elapsed; u32 elapsed;
unsigned long flags;
priv->timer.function = NULL; priv->timer.function = NULL;
...@@ -1581,7 +1589,7 @@ void TLan_Timer( unsigned long data ) ...@@ -1581,7 +1589,7 @@ void TLan_Timer( unsigned long data )
TLan_FinishReset( dev ); TLan_FinishReset( dev );
break; break;
case TLAN_TIMER_ACTIVITY: case TLAN_TIMER_ACTIVITY:
cli(); spin_lock_irqsave(&priv->lock, flags);
if ( priv->timer.function == NULL ) { if ( priv->timer.function == NULL ) {
elapsed = jiffies - priv->timerSetAt; elapsed = jiffies - priv->timerSetAt;
if ( elapsed >= TLAN_TIMER_ACT_DELAY ) { if ( elapsed >= TLAN_TIMER_ACT_DELAY ) {
...@@ -1589,11 +1597,12 @@ void TLan_Timer( unsigned long data ) ...@@ -1589,11 +1597,12 @@ void TLan_Timer( unsigned long data )
} else { } else {
priv->timer.function = &TLan_Timer; priv->timer.function = &TLan_Timer;
priv->timer.expires = priv->timerSetAt + TLAN_TIMER_ACT_DELAY; priv->timer.expires = priv->timerSetAt + TLAN_TIMER_ACT_DELAY;
sti(); spin_unlock_irqrestore(&priv->lock, flags);
add_timer( &priv->timer ); add_timer( &priv->timer );
break;
} }
} }
sti(); spin_unlock_irqrestore(&priv->lock, flags);
break; break;
default: default:
break; break;
...@@ -2435,16 +2444,19 @@ int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) ...@@ -2435,16 +2444,19 @@ int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val )
{ {
u8 nack; u8 nack;
u16 sio, tmp; u16 sio, tmp;
u32 i; u32 i;
int err; int err;
int minten; int minten;
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
int irq;
unsigned long flags;
err = FALSE; err = FALSE;
outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR);
sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
cli(); spin_lock_irqsave(&priv->lock, flags);
dev->interrupt++; dev->interrupt++;
TLan_MiiSync(dev->base_addr); TLan_MiiSync(dev->base_addr);
...@@ -2494,7 +2506,7 @@ int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) ...@@ -2494,7 +2506,7 @@ int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val )
dev->interrupt--; dev->interrupt--;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
sti(); spin_unlock_irqrestore(&priv->lock, flags);
return err; return err;
...@@ -2606,12 +2618,14 @@ void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val ) ...@@ -2606,12 +2618,14 @@ void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val )
{ {
u16 sio; u16 sio;
int minten; int minten;
unsigned long flags;
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR);
sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
cli(); spin_lock_irqsave(&priv->lock, flags);
dev->interrupt++; dev->interrupt++;
TLan_MiiSync( dev->base_addr ); TLan_MiiSync( dev->base_addr );
...@@ -2636,7 +2650,7 @@ void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val ) ...@@ -2636,7 +2650,7 @@ void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val )
dev->interrupt--; dev->interrupt--;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
sti(); spin_unlock_irqrestore(&priv->lock, flags);
} /* TLan_MiiWriteReg */ } /* TLan_MiiWriteReg */
...@@ -2834,29 +2848,41 @@ void TLan_EeReceiveByte( u16 io_base, u8 *data, int stop ) ...@@ -2834,29 +2848,41 @@ void TLan_EeReceiveByte( u16 io_base, u8 *data, int stop )
int TLan_EeReadByte( struct net_device *dev, u8 ee_addr, u8 *data ) int TLan_EeReadByte( struct net_device *dev, u8 ee_addr, u8 *data )
{ {
int err; int err;
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
unsigned long flags;
int ret=0;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
cli(); spin_lock_irqsave(&priv->lock, flags);
dev->interrupt++; dev->interrupt++;
TLan_EeSendStart( dev->base_addr ); TLan_EeSendStart( dev->base_addr );
err = TLan_EeSendByte( dev->base_addr, 0xA0, TLAN_EEPROM_ACK ); err = TLan_EeSendByte( dev->base_addr, 0xA0, TLAN_EEPROM_ACK );
if (err) if (err)
return 1; {
ret=1;
goto fail;
}
err = TLan_EeSendByte( dev->base_addr, ee_addr, TLAN_EEPROM_ACK ); err = TLan_EeSendByte( dev->base_addr, ee_addr, TLAN_EEPROM_ACK );
if (err) if (err)
return 2; {
ret=2;
goto fail;
}
TLan_EeSendStart( dev->base_addr ); TLan_EeSendStart( dev->base_addr );
err = TLan_EeSendByte( dev->base_addr, 0xA1, TLAN_EEPROM_ACK ); err = TLan_EeSendByte( dev->base_addr, 0xA1, TLAN_EEPROM_ACK );
if (err) if (err)
return 3; {
ret=3;
goto fail;
}
TLan_EeReceiveByte( dev->base_addr, data, TLAN_EEPROM_STOP ); TLan_EeReceiveByte( dev->base_addr, data, TLAN_EEPROM_STOP );
fail:
dev->interrupt--; dev->interrupt--;
if ( dev->interrupt == 0 ) if ( dev->interrupt == 0 )
sti(); spin_unlock_irqrestore(&priv->lock, flags);
return 0; return ret;
} /* TLan_EeReadByte */ } /* TLan_EeReadByte */
......
...@@ -187,6 +187,7 @@ typedef struct tlan_private_tag { ...@@ -187,6 +187,7 @@ typedef struct tlan_private_tag {
u8 tlanRev; u8 tlanRev;
u8 tlanFullDuplex; u8 tlanFullDuplex;
char devName[8]; char devName[8];
spinlock_t lock;
} TLanPrivateInfo; } TLanPrivateInfo;
......
/* DO NOT EDIT - Generated automatically by script_asm.pl */
static u32 SCRIPT[] = { static u32 SCRIPT[] = {
/* /*
......
...@@ -304,6 +304,7 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt){ ...@@ -304,6 +304,7 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt){
break; break;
} }
#ifdef CONFIG_SCSI_G_NCR5380_PORT
if (ports) { if (ports) {
/* wakeup sequence for the NCR53C400A and DTC3181E*/ /* wakeup sequence for the NCR53C400A and DTC3181E*/
...@@ -343,7 +344,13 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt){ ...@@ -343,7 +344,13 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt){
request_region(overrides[current_override].NCR5380_map_name, request_region(overrides[current_override].NCR5380_map_name,
NCR5380_region_size, "ncr5380"); NCR5380_region_size, "ncr5380");
#else
if(check_mem_region(overrides[current_override].NCR5380_map_name,
NCR5380_region_size))
continue;
request_mem_region(overrides[current_override].NCR5380_map_name,
NCR5380_region_size, "ncr5380");
#endif
instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
instance->NCR5380_instance_name = overrides[current_override].NCR5380_map_name; instance->NCR5380_instance_name = overrides[current_override].NCR5380_map_name;
...@@ -393,7 +400,11 @@ int generic_NCR5380_release_resources(struct Scsi_Host * instance) ...@@ -393,7 +400,11 @@ int generic_NCR5380_release_resources(struct Scsi_Host * instance)
NCR5380_setup(instance); NCR5380_setup(instance);
#ifdef CONFIG_SCSI_G_NCR5380_PORT
release_region(instance->NCR5380_instance_name, NCR5380_region_size); release_region(instance->NCR5380_instance_name, NCR5380_region_size);
#else
release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size);
#endif
if (instance->irq != IRQ_NONE) if (instance->irq != IRQ_NONE)
free_irq(instance->irq, NULL); free_irq(instance->irq, NULL);
......
...@@ -123,7 +123,7 @@ int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int leng ...@@ -123,7 +123,7 @@ int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int leng
#define NCR5380_map_config memory #define NCR5380_map_config memory
#define NCR5380_map_type volatile unsigned char* #define NCR5380_map_type unsigned long
#define NCR5380_map_name base #define NCR5380_map_name base
......
...@@ -602,11 +602,14 @@ int idescsi_detect (Scsi_Host_Template *host_template) ...@@ -602,11 +602,14 @@ int idescsi_detect (Scsi_Host_Template *host_template)
{ {
struct Scsi_Host *host; struct Scsi_Host *host;
int id; int id;
int last_lun = 0;
host_template->proc_name = "ide-scsi"; host_template->proc_name = "ide-scsi";
host = scsi_register(host_template, 0); host = scsi_register(host_template, 0);
for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++); for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++)
last_lun = IDE_MAX(last_lun, idescsi_drives[id]->last_lun);
host->max_id = id; host->max_id = id;
host->max_lun = last_lun + 1;
host->can_queue = host->cmd_per_lun * id; host->can_queue = host->cmd_per_lun * id;
return 1; return 1;
} }
......
/* DO NOT EDIT - Generated automatically by script_asm.pl */
static u32 SCRIPT[] = { static u32 SCRIPT[] = {
/* /*
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* *
* OPTi 82C928 MAD16 (replaced by C929) * OPTi 82C928 MAD16 (replaced by C929)
* OAK OTI-601D Mozart * OAK OTI-601D Mozart
* OAK OTI-605 Mozart (later version with MPU401 Midi)
* OPTi 82C929 MAD16 Pro * OPTi 82C929 MAD16 Pro
* OPTi 82C930 * OPTi 82C930
* OPTi 82C924 * OPTi 82C924
...@@ -22,8 +23,9 @@ ...@@ -22,8 +23,9 @@
* connect some other components (OPL-[234] and a WSS compatible codec) * connect some other components (OPL-[234] and a WSS compatible codec)
* to the PC bus and perform I/O, DMA and IRQ address decoding. There is * to the PC bus and perform I/O, DMA and IRQ address decoding. There is
* also a UART for the MPU-401 mode (not 82C928/Mozart). * also a UART for the MPU-401 mode (not 82C928/Mozart).
* The Mozart chip appears to be compatible with the 82C928 (can anybody * The Mozart chip appears to be compatible with the 82C928, although later
* confirm this?). * issues of the card, using the OTI-605 chip, have an MPU-401 compatable Midi
* port. This port is configured differently to that of the OPTi audio chips.
* *
* NOTE! If you want to set CD-ROM address and/or joystick enable, define * NOTE! If you want to set CD-ROM address and/or joystick enable, define
* MAD16_CONF in local.h as combination of the following bits: * MAD16_CONF in local.h as combination of the following bits:
...@@ -65,8 +67,11 @@ ...@@ -65,8 +67,11 @@
* Improved debugging support. 16-May-1998 * Improved debugging support. 16-May-1998
* Fixed bug. 16-Jun-1998 * Fixed bug. 16-Jun-1998
* *
* Torsten Duwe Made Opti924 PnP support non-destructive * Torsten Duwe Made Opti924 PnP support non-destructive
* 1998-12-23 * 23-Dec-1998
*
* Paul Grayson Added support for Midi on later Mozart cards.
* 25-Nov-1999
*/ */
#include "sound_config.h" #include "sound_config.h"
...@@ -719,29 +724,24 @@ void attach_mad16(struct address_info *hw_config) ...@@ -719,29 +724,24 @@ void attach_mad16(struct address_info *hw_config)
void attach_mad16_mpu(struct address_info *hw_config) void attach_mad16_mpu(struct address_info *hw_config)
{ {
if (board_type < C929) /* Early chip. No MPU support. Just SB MIDI */
{
#if defined(CONFIG_MIDI) && defined(CONFIG_MAD16_OLDCARD) #if defined(CONFIG_MIDI) && defined(CONFIG_MAD16_OLDCARD)
if (mad_read(MC1_PORT) & 0x20) if (mad_read(MC1_PORT) & 0x20)
hw_config->io_base = 0x240; hw_config->io_base = 0x240;
else else
hw_config->io_base = 0x220; hw_config->io_base = 0x220;
hw_config->name = "Mad16/Mozart"; hw_config->name = "Mad16/Mozart";
sb_dsp_init(hw_config); sb_dsp_init(hw_config);
return;
#endif #endif
return;
}
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
if (!already_initialized) if (!already_initialized)
return; return;
hw_config->driver_use_1 = SB_MIDI_ONLY; hw_config->driver_use_1 = SB_MIDI_ONLY;
hw_config->name = "Mad16/Mozart"; hw_config->name = "Mad16/Mozart";
attach_uart401(hw_config); attach_uart401(hw_config);
#endif
} }
int probe_mad16_mpu(struct address_info *hw_config) int probe_mad16_mpu(struct address_info *hw_config)
...@@ -802,7 +802,60 @@ int probe_mad16_mpu(struct address_info *hw_config) ...@@ -802,7 +802,60 @@ int probe_mad16_mpu(struct address_info *hw_config)
hw_config->driver_use_1 = SB_MIDI_ONLY; hw_config->driver_use_1 = SB_MIDI_ONLY;
return sb_dsp_detect(hw_config, 0, 0); return sb_dsp_detect(hw_config, 0, 0);
#else #else
return 0; /* assuming all later Mozart cards are identified as
* either 82C928 or Mozart. If so, following code attempts
* to set MPU register. TODO - add probing
*/
unsigned char tmp;
tmp = mad_read(MC8_PORT);
switch (hw_config->irq)
{
case 5:
tmp |= 0x08;
break;
case 7:
tmp |= 0x10;
break;
case 9:
tmp |= 0x18;
break;
case 10:
tmp |= 0x20;
break;
case 11:
tmp |= 0x28;
break;
default:
printk(KERN_ERR "mad16/MOZART: invalid mpu_irq\n");
return 0;
}
switch (hw_config->io_base)
{
case 0x300:
tmp |= 0x01;
break;
case 0x310:
tmp |= 0x03;
break;
case 0x320:
tmp |= 0x05;
break;
case 0x330:
tmp |= 0x07;
break;
default:
printk(KERN_ERR "mad16/MOZART: invalid mpu_io\n");
return 0;
}
mad_write(MC8_PORT, tmp); /* write MPU port parameters */
return probe_uart401(hw_config);
#endif #endif
} }
tmp = mad_read(MC6_PORT) & 0x83; tmp = mad_read(MC6_PORT) & 0x83;
......
...@@ -10,29 +10,29 @@ ...@@ -10,29 +10,29 @@
* *
* History: * History:
* *
* Rolf Fokkens (Dec 20 1998): ES188x recording level support on a per * Rolf Fokkens (Dec 20 1998): ES188x recording level support on a per
* fokkensr@vertis.nl input basis. * fokkensr@vertis.nl input basis.
* (Dec 24 1998): Recognition of ES1788, ES1887, ES1888, * (Dec 24 1998): Recognition of ES1788, ES1887, ES1888,
* ES1868, ES1869 and ES1878. Could be used for * ES1868, ES1869 and ES1878. Could be used for
* specific handling in the future. All except * specific handling in the future. All except
* ES1887 and ES1888 and ES688 are handled like * ES1887 and ES1888 and ES688 are handled like
* ES1688. * ES1688.
* (Dec 27 1998): RECLEV for all (?) ES1688+ chips. ES188x now * (Dec 27 1998): RECLEV for all (?) ES1688+ chips. ES188x now
* have the "Dec 20" support + RECLEV * have the "Dec 20" support + RECLEV
* (Jan 2 1999): Preparation for Full Duplex. This means * (Jan 2 1999): Preparation for Full Duplex. This means
* Audio 2 is now used for playback when dma16 * Audio 2 is now used for playback when dma16
* is specified. The next step would be to use * is specified. The next step would be to use
* Audio 1 and Audio 2 at the same time. * Audio 1 and Audio 2 at the same time.
* (Jan 9 1999): Put all ESS stuff into sb_ess.[ch], this * (Jan 9 1999): Put all ESS stuff into sb_ess.[ch], this
* includes both the ESS stuff that has been in * includes both the ESS stuff that has been in
* sb_*[ch] before I touched it and the ESS support * sb_*[ch] before I touched it and the ESS support
* I added later * I added later
* (Jan 23 1999): Full Duplex seems to work. I wrote a small * (Jan 23 1999): Full Duplex seems to work. I wrote a small
* test proggy which works OK. Haven't found * test proggy which works OK. Haven't found
* any applications to test it though. So why did * any applications to test it though. So why did
* I bother to create it anyway?? :) Just for * I bother to create it anyway?? :) Just for
* fun. * fun.
* (May 2 1999): I tried to be too smart by "introducing" * (May 2 1999): I tried to be too smart by "introducing"
* ess_calc_best_speed (). The idea was that two * ess_calc_best_speed (). The idea was that two
* dividers could be used to setup a samplerate, * dividers could be used to setup a samplerate,
* ess_calc_best_speed () would choose the best. * ess_calc_best_speed () would choose the best.
...@@ -40,10 +40,12 @@ ...@@ -40,10 +40,12 @@
* recording problems for high samplerates. I * recording problems for high samplerates. I
* fixed this by removing ess_calc_best_speed () * fixed this by removing ess_calc_best_speed ()
* and just doing what the documentation says. * and just doing what the documentation says.
* Andy Sloane (June 4 1999): Stole some code from ALSA to fix the playback * Andy Sloane (Jun 4 1999): Stole some code from ALSA to fix the playback
* andy@guildsoftware.com speed on ES1869, ES1879, ES1887, and ES1888. * andy@guildsoftware.com speed on ES1869, ES1879, ES1887, and ES1888.
* 1879's were previously ignored by this driver; * 1879's were previously ignored by this driver;
* added (untested) support for those. * added (untested) support for those.
* Cvetan Ivanov (Oct 27 1999): Fixed ess_dsp_init to call ess_set_dma_hw for
* zezo@inet.bg _ALL_ ESS models, not only ES1887
* *
* This files contains ESS chip specifics. It's based on the existing ESS * This files contains ESS chip specifics. It's based on the existing ESS
* handling as it resided in sb_common.c, sb_mixer.c and sb_audio.c. This * handling as it resided in sb_common.c, sb_mixer.c and sb_audio.c. This
...@@ -52,7 +54,7 @@ ...@@ -52,7 +54,7 @@
* - RECLEV support for ES1688 and later * - RECLEV support for ES1688 and later
* - 6 bits playback level support chips later than ES1688 * - 6 bits playback level support chips later than ES1688
* - Recording level support on a per-device basis for ES1887 * - Recording level support on a per-device basis for ES1887
* - Full-Duplex for ES1887 (under development) * - Full-Duplex for ES1887
* *
* Full duplex is enabled by specifying dma16. While the normal dma must * Full duplex is enabled by specifying dma16. While the normal dma must
* be one of 0, 1 or 3, dma16 can be one of 0, 1, 3 or 5. DMA 5 is a 16 bit * be one of 0, 1 or 3, dma16 can be one of 0, 1, 3 or 5. DMA 5 is a 16 bit
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
* of writing 0x00 to 0x7f (which should be done by reset): The ES1887 moves * of writing 0x00 to 0x7f (which should be done by reset): The ES1887 moves
* into ES1888 mode. This means that it claims IRQ 11, which happens to be my * into ES1888 mode. This means that it claims IRQ 11, which happens to be my
* ISDN adapter. Needless to say it no longer worked. I now understand why * ISDN adapter. Needless to say it no longer worked. I now understand why
* after rebooting 0x7f already was 0x05, the value of my choise: the BIOS * after rebooting 0x7f already was 0x05, the value of my choice: the BIOS
* did it. * did it.
* *
* Oh, and this is another trap: in ES1887 docs mixer register 0x70 is decribed * Oh, and this is another trap: in ES1887 docs mixer register 0x70 is decribed
...@@ -1200,10 +1202,10 @@ FKS_test (devc); ...@@ -1200,10 +1202,10 @@ FKS_test (devc);
/* AAS: info stolen from ALSA: these boards have different clocks */ /* AAS: info stolen from ALSA: these boards have different clocks */
switch(devc->submodel) { switch(devc->submodel) {
/* APPARENTLY NOT 1869 /* APPARENTLY NOT 1869 AND 1887
case SUBMDL_ES1869: case SUBMDL_ES1869:
*/
case SUBMDL_ES1887: case SUBMDL_ES1887:
*/
case SUBMDL_ES1888: case SUBMDL_ES1888:
devc->caps |= SB_CAP_ES18XX_RATE; devc->caps |= SB_CAP_ES18XX_RATE;
break; break;
...@@ -1304,6 +1306,13 @@ printk(KERN_INFO "ess_set_dma_hw: dma8=%d,dma16=%d,dup=%d\n" ...@@ -1304,6 +1306,13 @@ printk(KERN_INFO "ess_set_dma_hw: dma8=%d,dma16=%d,dup=%d\n"
*/ */
int ess_dsp_init (sb_devc *devc, struct address_info *hw_config) int ess_dsp_init (sb_devc *devc, struct address_info *hw_config)
{ {
/*
* Caller also checks this, but anyway
*/
if (devc->model != MDL_ESS) {
printk (KERN_INFO "ess_dsp_init for non ESS chip\n");
return 1;
}
/* /*
* This for ES1887 to run Full Duplex. Actually ES1888 * This for ES1887 to run Full Duplex. Actually ES1888
* is allowed to do so too. I have no idea yet if this * is allowed to do so too. I have no idea yet if this
...@@ -1324,15 +1333,12 @@ int ess_dsp_init (sb_devc *devc, struct address_info *hw_config) ...@@ -1324,15 +1333,12 @@ int ess_dsp_init (sb_devc *devc, struct address_info *hw_config)
if (devc->dma8 != devc->dma16 && devc->dma16 != -1) { if (devc->dma8 != devc->dma16 && devc->dma16 != -1) {
devc->duplex = 1; devc->duplex = 1;
} }
if (!ess_set_dma_hw (devc)) {
free_irq(devc->irq, devc);
return 0;
}
return 1;
} else {
return -1;
} }
if (!ess_set_dma_hw (devc)) {
free_irq(devc->irq, devc);
return 0;
}
return 1;
} }
/**************************************************************************** /****************************************************************************
......
...@@ -88,6 +88,10 @@ if [ "$CONFIG_INET" = "y" ]; then ...@@ -88,6 +88,10 @@ if [ "$CONFIG_INET" = "y" ]; then
if [ "$CONFIG_NFSD" != "n" ]; then if [ "$CONFIG_NFSD" != "n" ]; then
bool ' Emulate SUN NFS server' CONFIG_NFSD_SUN bool ' Emulate SUN NFS server' CONFIG_NFSD_SUN
fi fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' Provide NFSv3 server support (EXPERIMENTAL)' CONFIG_NFSD_V3
fi
if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" ]; then if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" ]; then
define_tristate CONFIG_SUNRPC y define_tristate CONFIG_SUNRPC y
define_tristate CONFIG_LOCKD y define_tristate CONFIG_LOCKD y
......
...@@ -11,6 +11,9 @@ O_TARGET := nfsd.o ...@@ -11,6 +11,9 @@ O_TARGET := nfsd.o
O_OBJS := nfssvc.o nfsctl.o nfsproc.o nfsfh.o vfs.o \ O_OBJS := nfssvc.o nfsctl.o nfsproc.o nfsfh.o vfs.o \
export.o auth.o lockd.o nfscache.o nfsxdr.o \ export.o auth.o lockd.o nfscache.o nfsxdr.o \
stats.o stats.o
ifdef CONFIG_NFSD_V3
O_OBJS += nfs3proc.o nfs3xdr.o
endif
M_OBJS := $(O_TARGET) M_OBJS := $(O_TARGET)
......
This diff is collapsed.
This diff is collapsed.
...@@ -390,7 +390,8 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp, ...@@ -390,7 +390,8 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
*/ */
nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen, nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen,
argp->tname, argp->tlen, argp->tname, argp->tlen,
&newfh); &newfh, &argp->attrs);
if (!nfserr) { if (!nfserr) {
argp->attrs.ia_valid &= ~ATTR_SIZE; argp->attrs.ia_valid &= ~ATTR_SIZE;
nfserr = nfsd_setattr(rqstp, &newfh, &argp->attrs); nfserr = nfsd_setattr(rqstp, &newfh, &argp->attrs);
...@@ -469,7 +470,8 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp, ...@@ -469,7 +470,8 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
/* Read directory and encode entries on the fly */ /* Read directory and encode entries on the fly */
nfserr = nfsd_readdir(rqstp, &argp->fh, (loff_t) argp->cookie, nfserr = nfsd_readdir(rqstp, &argp->fh, (loff_t) argp->cookie,
nfssvc_encode_entry, buffer, &count); nfssvc_encode_entry,
buffer, &count, NULL);
resp->count = count; resp->count = count;
fh_put(&argp->fh); fh_put(&argp->fh);
...@@ -549,6 +551,8 @@ nfserrno (int errno) ...@@ -549,6 +551,8 @@ nfserrno (int errno)
{ NFSERR_NXIO, ENXIO }, { NFSERR_NXIO, ENXIO },
{ NFSERR_ACCES, EACCES }, { NFSERR_ACCES, EACCES },
{ NFSERR_EXIST, EEXIST }, { NFSERR_EXIST, EEXIST },
{ NFSERR_XDEV, EXDEV },
{ NFSERR_MLINK, EMLINK },
{ NFSERR_NODEV, ENODEV }, { NFSERR_NODEV, ENODEV },
{ NFSERR_NOTDIR, ENOTDIR }, { NFSERR_NOTDIR, ENOTDIR },
{ NFSERR_ISDIR, EISDIR }, { NFSERR_ISDIR, EISDIR },
...@@ -556,6 +560,7 @@ nfserrno (int errno) ...@@ -556,6 +560,7 @@ nfserrno (int errno)
{ NFSERR_FBIG, EFBIG }, { NFSERR_FBIG, EFBIG },
{ NFSERR_NOSPC, ENOSPC }, { NFSERR_NOSPC, ENOSPC },
{ NFSERR_ROFS, EROFS }, { NFSERR_ROFS, EROFS },
{ NFSERR_MLINK, EMLINK },
{ NFSERR_NAMETOOLONG, ENAMETOOLONG }, { NFSERR_NAMETOOLONG, ENAMETOOLONG },
{ NFSERR_NOTEMPTY, ENOTEMPTY }, { NFSERR_NOTEMPTY, ENOTEMPTY },
#ifdef EDQUOT #ifdef EDQUOT
......
...@@ -226,8 +226,20 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) ...@@ -226,8 +226,20 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp)
svc_putlong(&rqstp->rq_resbuf, nfserr); svc_putlong(&rqstp->rq_resbuf, nfserr);
/* Encode result. /* Encode result.
* FIXME: Most NFSv3 calls return wcc data even when the call failed * For NFSv2, additional info is never returned in case of an error.
*/ */
#ifdef CONFIG_NFSD_V3
if (!(nfserr && rqstp->rq_vers == 2)) {
xdr = proc->pc_encode;
if (xdr && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
/* Failed to encode result. Release cache entry */
dprintk("nfsd: failed to encode result!\n");
nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
*statp = rpc_system_err;
return 1;
}
}
#else
xdr = proc->pc_encode; xdr = proc->pc_encode;
if (!nfserr && xdr if (!nfserr && xdr
&& !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) { && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
...@@ -237,6 +249,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) ...@@ -237,6 +249,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp)
*statp = rpc_system_err; *statp = rpc_system_err;
return 1; return 1;
} }
#endif /* CONFIG_NFSD_V3 */
/* Store reply in cache. */ /* Store reply in cache. */
nfsd_cache_update(rqstp, proc->pc_cachetype, statp + 1); nfsd_cache_update(rqstp, proc->pc_cachetype, statp + 1);
...@@ -246,16 +259,16 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) ...@@ -246,16 +259,16 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp)
static struct svc_version nfsd_version2 = { static struct svc_version nfsd_version2 = {
2, 18, nfsd_procedures2, nfsd_dispatch 2, 18, nfsd_procedures2, nfsd_dispatch
}; };
#ifdef CONFIG_NFSD_NFS3 #ifdef CONFIG_NFSD_V3
static struct svc_version nfsd_version3 = { static struct svc_version nfsd_version3 = {
3, 23, nfsd_procedures3, nfsd_dispatch 3, 22, nfsd_procedures3, nfsd_dispatch
}; };
#endif #endif
static struct svc_version * nfsd_version[] = { static struct svc_version * nfsd_version[] = {
NULL, NULL,
NULL, NULL,
&nfsd_version2, &nfsd_version2,
#ifdef CONFIG_NFSD_NFS3 #ifdef CONFIG_NFSD_V3
&nfsd_version3, &nfsd_version3,
#endif #endif
}; };
......
This diff is collapsed.
...@@ -299,6 +299,8 @@ typedef struct ide_drive_s { ...@@ -299,6 +299,8 @@ typedef struct ide_drive_s {
thresholds_t smart_thresholds; thresholds_t smart_thresholds;
values_t smart_values; values_t smart_values;
#endif #endif
int last_lun; /* last logical unit */
int forced_lun; /* if hdxlun was given at boot */
} ide_drive_t; } ide_drive_t;
/* /*
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Hodge-podge collection of knfsd-related stuff. * Hodge-podge collection of knfsd-related stuff.
* I will sort this out later. * I will sort this out later.
* *
* Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
*/ */
#ifndef LINUX_NFSD_NFSD_H #ifndef LINUX_NFSD_NFSD_H
...@@ -61,6 +61,9 @@ typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); ...@@ -61,6 +61,9 @@ typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int);
* Procedure table for NFSv2 * Procedure table for NFSv2
*/ */
extern struct svc_procedure nfsd_procedures2[]; extern struct svc_procedure nfsd_procedures2[];
#ifdef CONFIG_NFSD_V3
extern struct svc_procedure nfsd_procedures3[];
#endif /* CONFIG_NFSD_V3 */
extern struct svc_program nfsd_program; extern struct svc_program nfsd_program;
/* /*
...@@ -74,11 +77,20 @@ void nfsd_racache_init(void); ...@@ -74,11 +77,20 @@ void nfsd_racache_init(void);
void nfsd_racache_shutdown(void); void nfsd_racache_shutdown(void);
int nfsd_lookup(struct svc_rqst *, struct svc_fh *, int nfsd_lookup(struct svc_rqst *, struct svc_fh *,
const char *, int, struct svc_fh *); const char *, int, struct svc_fh *);
#ifdef CONFIG_NFSD_V3
int nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *);
#endif /* CONFIG_NFSD_V3 */
int nfsd_setattr(struct svc_rqst *, struct svc_fh *, int nfsd_setattr(struct svc_rqst *, struct svc_fh *,
struct iattr *); struct iattr *);
int nfsd_create(struct svc_rqst *, struct svc_fh *, int nfsd_create(struct svc_rqst *, struct svc_fh *,
char *name, int len, struct iattr *attrs, char *name, int len, struct iattr *attrs,
int type, dev_t rdev, struct svc_fh *res); int type, dev_t rdev, struct svc_fh *res);
#ifdef CONFIG_NFSD_V3
int nfsd_create_v3(struct svc_rqst *, struct svc_fh *,
char *name, int len, struct iattr *attrs,
struct svc_fh *res, int createmode,
u32 *verifier);
#endif /* CONFIG_NFSD_V3 */
int nfsd_open(struct svc_rqst *, struct svc_fh *, int, int nfsd_open(struct svc_rqst *, struct svc_fh *, int,
int, struct file *); int, struct file *);
void nfsd_close(struct file *); void nfsd_close(struct file *);
...@@ -90,7 +102,7 @@ int nfsd_readlink(struct svc_rqst *, struct svc_fh *, ...@@ -90,7 +102,7 @@ int nfsd_readlink(struct svc_rqst *, struct svc_fh *,
char *, int *); char *, int *);
int nfsd_symlink(struct svc_rqst *, struct svc_fh *, int nfsd_symlink(struct svc_rqst *, struct svc_fh *,
char *name, int len, char *path, int plen, char *name, int len, char *path, int plen,
struct svc_fh *res); struct svc_fh *res, struct iattr *);
int nfsd_link(struct svc_rqst *, struct svc_fh *, int nfsd_link(struct svc_rqst *, struct svc_fh *,
char *, int, struct svc_fh *); char *, int, struct svc_fh *);
int nfsd_rename(struct svc_rqst *, int nfsd_rename(struct svc_rqst *,
...@@ -104,9 +116,13 @@ int nfsd_truncate(struct svc_rqst *, struct svc_fh *, ...@@ -104,9 +116,13 @@ int nfsd_truncate(struct svc_rqst *, struct svc_fh *,
unsigned long size); unsigned long size);
int nfsd_readdir(struct svc_rqst *, struct svc_fh *, int nfsd_readdir(struct svc_rqst *, struct svc_fh *,
loff_t, encode_dent_fn, loff_t, encode_dent_fn,
u32 *buffer, int *countp); u32 *buffer, int *countp, u32 *verf);
int nfsd_statfs(struct svc_rqst *, struct svc_fh *, int nfsd_statfs(struct svc_rqst *, struct svc_fh *,
struct statfs *); struct statfs *);
#ifdef CONFIG_NFSD_V3
int nfsd_commit(struct svc_rqst *, struct svc_fh *,
off_t, unsigned long);
#endif /* CONFIG_NFSD_V3 */
int nfsd_notify_change(struct inode *, struct iattr *); int nfsd_notify_change(struct inode *, struct iattr *);
int nfsd_permission(struct svc_export *, struct dentry *, int); int nfsd_permission(struct svc_export *, struct dentry *, int);
......
...@@ -86,8 +86,33 @@ typedef struct svc_fh { ...@@ -86,8 +86,33 @@ typedef struct svc_fh {
struct knfs_fh fh_handle; /* FH data */ struct knfs_fh fh_handle; /* FH data */
struct dentry * fh_dentry; /* validated dentry */ struct dentry * fh_dentry; /* validated dentry */
struct svc_export * fh_export; /* export pointer */ struct svc_export * fh_export; /* export pointer */
#ifdef CONFIG_NFSD_V3
unsigned char fh_post_saved; /* post-op attrs saved */
unsigned char fh_pre_saved; /* pre-op attrs saved */
#endif /* CONFIG_NFSD_V3 */
unsigned char fh_locked; /* inode locked by us */ unsigned char fh_locked; /* inode locked by us */
unsigned char fh_dverified; /* dentry has been checked */ unsigned char fh_dverified; /* dentry has been checked */
#ifdef CONFIG_NFSD_V3
/* Pre-op attributes saved during fh_lock */
__u64 fh_pre_size; /* size before operation */
time_t fh_pre_mtime; /* mtime before oper */
time_t fh_pre_ctime; /* ctime before oper */
/* Post-op attributes saved in fh_unlock */
umode_t fh_post_mode; /* i_mode */
nlink_t fh_post_nlink; /* i_nlink */
uid_t fh_post_uid; /* i_uid */
gid_t fh_post_gid; /* i_gid */
__u64 fh_post_size; /* i_size */
unsigned long fh_post_blocks; /* i_blocks */
unsigned long fh_post_blksize;/* i_blksize */
kdev_t fh_post_rdev; /* i_rdev */
time_t fh_post_atime; /* i_atime */
time_t fh_post_mtime; /* i_mtime */
time_t fh_post_ctime; /* i_ctime */
#endif /* CONFIG_NFSD_V3 */
} svc_fh; } svc_fh;
/* /*
...@@ -128,6 +153,53 @@ fh_init(struct svc_fh *fhp) ...@@ -128,6 +153,53 @@ fh_init(struct svc_fh *fhp)
return fhp; return fhp;
} }
#ifdef CONFIG_NFSD_V3
/*
* Fill in the pre_op attr for the wcc data
*/
static inline void
fill_pre_wcc(struct svc_fh *fhp)
{
struct inode *inode;
inode = fhp->fh_dentry->d_inode;
if (!fhp->fh_pre_saved) {
fhp->fh_pre_mtime = inode->i_mtime;
fhp->fh_pre_ctime = inode->i_ctime;
fhp->fh_pre_size = inode->i_size;
fhp->fh_pre_saved = 1;
}
fhp->fh_locked = 1;
}
/*
* Fill in the post_op attr for the wcc data
*/
static inline void
fill_post_wcc(struct svc_fh *fhp)
{
struct inode *inode = fhp->fh_dentry->d_inode;
if (fhp->fh_post_saved)
printk("nfsd: inode locked twice during operation.\n");
fhp->fh_post_mode = inode->i_mode;
fhp->fh_post_nlink = inode->i_nlink;
fhp->fh_post_uid = inode->i_uid;
fhp->fh_post_gid = inode->i_gid;
fhp->fh_post_size = inode->i_size;
fhp->fh_post_blksize = inode->i_blksize;
fhp->fh_post_blocks = inode->i_blocks;
fhp->fh_post_rdev = inode->i_rdev;
fhp->fh_post_atime = inode->i_atime;
fhp->fh_post_mtime = inode->i_mtime;
fhp->fh_post_ctime = inode->i_ctime;
fhp->fh_post_saved = 1;
fhp->fh_locked = 0;
}
#endif /* CONFIG_NFSD_V3 */
/* /*
* Lock a file handle/inode * Lock a file handle/inode
*/ */
...@@ -152,7 +224,11 @@ fh_lock(struct svc_fh *fhp) ...@@ -152,7 +224,11 @@ fh_lock(struct svc_fh *fhp)
inode = dentry->d_inode; inode = dentry->d_inode;
down(&inode->i_sem); down(&inode->i_sem);
#ifdef CONFIG_NFSD_V3
fill_pre_wcc(fhp);
#else
fhp->fh_locked = 1; fhp->fh_locked = 1;
#endif /* CONFIG_NFSD_V3 */
} }
/* /*
...@@ -165,11 +241,16 @@ fh_unlock(struct svc_fh *fhp) ...@@ -165,11 +241,16 @@ fh_unlock(struct svc_fh *fhp)
printk(KERN_ERR "fh_unlock: fh not verified!\n"); printk(KERN_ERR "fh_unlock: fh not verified!\n");
if (fhp->fh_locked) { if (fhp->fh_locked) {
#ifdef CONFIG_NFSD_V3
fill_post_wcc(fhp);
up(&fhp->fh_dentry->d_inode->i_sem);
#else
struct dentry *dentry = fhp->fh_dentry; struct dentry *dentry = fhp->fh_dentry;
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
fhp->fh_locked = 0; fhp->fh_locked = 0;
up(&inode->i_sem); up(&inode->i_sem);
#endif /* CONFIG_NFSD_V3 */
} }
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -3,17 +3,18 @@ ...@@ -3,17 +3,18 @@
* *
* XDR types for NFSv3 in nfsd. * XDR types for NFSv3 in nfsd.
* *
* Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> * Copyright (C) 1996-1998, Olaf Kirch <okir@monad.swb.de>
*/ */
#ifndef LINUX_NFSD_XDR3_H #ifndef _LINUX_NFSD_XDR3_H
#define LINUX_NFSD_XDR3_H #define _LINUX_NFSD_XDR3_H
#include <linux/nfsd/xdr.h> #include <linux/nfsd/xdr.h>
struct nfsd3_sattrargs { struct nfsd3_sattrargs {
struct svc_fh fh; struct svc_fh fh;
struct iattr attrs; struct iattr attrs;
int check_guard;
time_t guardtime; time_t guardtime;
}; };
...@@ -88,7 +89,7 @@ struct nfsd3_symlinkargs { ...@@ -88,7 +89,7 @@ struct nfsd3_symlinkargs {
struct nfsd3_readdirargs { struct nfsd3_readdirargs {
struct svc_fh fh; struct svc_fh fh;
__u32 cookie; __u64 cookie;
__u32 dircount; __u32 dircount;
__u32 count; __u32 count;
__u32 * verf; __u32 * verf;
...@@ -97,7 +98,7 @@ struct nfsd3_readdirargs { ...@@ -97,7 +98,7 @@ struct nfsd3_readdirargs {
struct nfsd3_commitargs { struct nfsd3_commitargs {
struct svc_fh fh; struct svc_fh fh;
__u64 offset; __u64 offset;
__u64 count; __u32 count;
}; };
struct nfsd3_attrstat { struct nfsd3_attrstat {
...@@ -105,7 +106,8 @@ struct nfsd3_attrstat { ...@@ -105,7 +106,8 @@ struct nfsd3_attrstat {
struct svc_fh fh; struct svc_fh fh;
}; };
struct nfsd3_lookupres { /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
struct nfsd3_diropres {
__u32 status; __u32 status;
struct svc_fh dirfh; struct svc_fh dirfh;
struct svc_fh fh; struct svc_fh fh;
...@@ -137,12 +139,6 @@ struct nfsd3_writeres { ...@@ -137,12 +139,6 @@ struct nfsd3_writeres {
int committed; int committed;
}; };
struct nfsd3_createres {
__u32 status;
struct svc_fh dirfh;
struct svc_fh fh;
};
struct nfsd3_renameres { struct nfsd3_renameres {
__u32 status; __u32 status;
struct svc_fh ffh; struct svc_fh ffh;
...@@ -158,10 +154,11 @@ struct nfsd3_linkres { ...@@ -158,10 +154,11 @@ struct nfsd3_linkres {
struct nfsd3_readdirres { struct nfsd3_readdirres {
__u32 status; __u32 status;
struct svc_fh fh; struct svc_fh fh;
__u32 * list_end; int count;
__u32 verf[2];
}; };
struct nfsd3_statfsres { struct nfsd3_fsstatres {
__u32 status; __u32 status;
struct statfs stats; struct statfs stats;
__u32 invarsec; __u32 invarsec;
...@@ -184,6 +181,8 @@ struct nfsd3_pathconfres { ...@@ -184,6 +181,8 @@ struct nfsd3_pathconfres {
__u32 status; __u32 status;
__u32 p_link_max; __u32 p_link_max;
__u32 p_name_max; __u32 p_name_max;
__u32 p_no_trunc;
__u32 p_chown_restricted;
__u32 p_case_insensitive; __u32 p_case_insensitive;
__u32 p_case_preserving; __u32 p_case_preserving;
}; };
...@@ -194,7 +193,7 @@ struct nfsd3_commitres { ...@@ -194,7 +193,7 @@ struct nfsd3_commitres {
}; };
/* dummy type for release */ /* dummy type for release */
struct nfsd3_fhandle2 { struct nfsd3_fhandle_pair {
__u32 dummy; __u32 dummy;
struct svc_fh fh1; struct svc_fh fh1;
struct svc_fh fh2; struct svc_fh fh2;
...@@ -213,16 +212,15 @@ union nfsd3_xdrstore { ...@@ -213,16 +212,15 @@ union nfsd3_xdrstore {
struct nfsd3_linkargs linkargs; struct nfsd3_linkargs linkargs;
struct nfsd3_symlinkargs symlinkargs; struct nfsd3_symlinkargs symlinkargs;
struct nfsd3_readdirargs readdirargs; struct nfsd3_readdirargs readdirargs;
struct nfsd3_lookupres lookupres; struct nfsd3_diropres diropres;
struct nfsd3_accessres accessres; struct nfsd3_accessres accessres;
struct nfsd3_readlinkres readlinkres; struct nfsd3_readlinkres readlinkres;
struct nfsd3_readres readres; struct nfsd3_readres readres;
struct nfsd3_writeres writeres; struct nfsd3_writeres writeres;
struct nfsd3_createres createres;
struct nfsd3_renameres renameres; struct nfsd3_renameres renameres;
struct nfsd3_linkres linkres; struct nfsd3_linkres linkres;
struct nfsd3_readdirres readdirres; struct nfsd3_readdirres readdirres;
struct nfsd3_statfsres statfsres; struct nfsd3_fsstatres fsstatres;
struct nfsd3_fsinfores fsinfores; struct nfsd3_fsinfores fsinfores;
struct nfsd3_pathconfres pathconfres; struct nfsd3_pathconfres pathconfres;
struct nfsd3_commitres commitres; struct nfsd3_commitres commitres;
...@@ -230,39 +228,87 @@ union nfsd3_xdrstore { ...@@ -230,39 +228,87 @@ union nfsd3_xdrstore {
#define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
void nfsxdr_init(void);
int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct svc_fh *); int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct svc_fh *);
int nfs3svc_decode_sattr3args(struct svc_rqst *, u32 *, int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
struct nfsd3_sattrargs *); struct nfsd3_sattrargs *);
int nfs3svc_decode_dirop3args(struct svc_rqst *, u32 *, int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *,
struct nfsd3_diropargs *); struct nfsd3_diropargs *);
int nfs3svc_decode_read3args(struct svc_rqst *, u32 *, int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *,
struct nfsd3_accessargs *);
int nfs3svc_decode_readargs(struct svc_rqst *, u32 *,
struct nfsd3_readargs *); struct nfsd3_readargs *);
int nfs3svc_decode_write3args(struct svc_rqst *, u32 *, int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *,
struct nfsd3_writeargs *); struct nfsd3_writeargs *);
int nfs3svc_decode_create3args(struct svc_rqst *, u32 *, int nfs3svc_decode_createargs(struct svc_rqst *, u32 *,
struct nfsd3_createargs *);
int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *,
struct nfsd3_createargs *); struct nfsd3_createargs *);
int nfs3svc_decode_rename3args(struct svc_rqst *, u32 *, int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *,
struct nfsd3_mknodargs *);
int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *,
struct nfsd3_renameargs *); struct nfsd3_renameargs *);
int nfs3svc_decode_link3args(struct svc_rqst *, u32 *, int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *,
struct nfsd3_linkargs *); struct nfsd3_linkargs *);
int nfs3svc_decode_symlink3args(struct svc_rqst *, u32 *, int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *,
struct nfsd3_symlinkargs *); struct nfsd3_symlinkargs *);
int nfs3svc_decode_readdir3args(struct svc_rqst *, u32 *, int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *,
struct nfsd3_readdirargs *); struct nfsd3_readdirargs *);
int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *,
struct nfsd3_readdirargs *);
int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *,
struct nfsd3_commitargs *);
int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *);
int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *,
struct nfsd3_attrstat *);
int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *,
struct nfsd3_attrstat *);
int nfs3svc_encode_diropres(struct svc_rqst *, u32 *,
struct nfsd3_diropres *);
int nfs3svc_encode_accessres(struct svc_rqst *, u32 *,
struct nfsd3_accessres *);
int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *, int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *,
struct nfsd3_readlinkres *); struct nfsd3_readlinkres *);
int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *); int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *);
int nfs3svc_encode_statfsres(struct svc_rqst *, u32 *, int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *);
struct nfsd3_statfsres *); int nfs3svc_encode_createres(struct svc_rqst *, u32 *,
struct nfsd3_diropres *);
int nfs3svc_encode_renameres(struct svc_rqst *, u32 *,
struct nfsd3_renameres *);
int nfs3svc_encode_linkres(struct svc_rqst *, u32 *,
struct nfsd3_linkres *);
int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *, int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *,
struct nfsd3_readdirres *); struct nfsd3_readdirres *);
int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *,
struct nfsd3_fsstatres *);
int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *,
struct nfsd3_fsinfores *);
int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *,
struct nfsd3_pathconfres *);
int nfs3svc_encode_commitres(struct svc_rqst *, u32 *,
struct nfsd3_commitres *);
int nfs3svc_release_fhandle(struct svc_rqst *, u32 *, int nfs3svc_release_fhandle(struct svc_rqst *, u32 *,
struct nfsd_fhandle *); struct nfsd3_attrstat *);
int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *, int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *,
struct nfsd3_fhandle2 *); struct nfsd3_fhandle_pair *);
int nfs3svc_encode_entry(struct readdir_cd *, const char *name, int nfs3svc_encode_entry(struct readdir_cd *, const char *name,
int namlen, unsigned long offset, ino_t ino); int namlen, off_t offset, ino_t ino);
int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
int namlen, off_t offset, ino_t ino);
#ifdef __KERNEL__
/*
* This is needed in nfs_readdir for encoding NFS3 directory cookies.
*/
static inline u32 *
enc64(u32 *p, u64 val)
{
*p++ = htonl(val >> 32);
*p++ = htonl(val & 0xffffffff);
return p;
}
#endif /* __KERNEL__ */
#endif /* LINUX_NFSD_XDR3_H */ #endif /* _LINUX_NFSD_XDR3_H */
...@@ -106,13 +106,11 @@ swp_entry_t __get_swap_page(unsigned short count) ...@@ -106,13 +106,11 @@ swp_entry_t __get_swap_page(unsigned short count)
offset = scan_swap_map(p, count); offset = scan_swap_map(p, count);
swap_device_unlock(p); swap_device_unlock(p);
if (offset) { if (offset) {
int curtp = type;
entry = SWP_ENTRY(type,offset); entry = SWP_ENTRY(type,offset);
type = swap_info[type].next; type = swap_info[type].next;
if (type < 0 || if (type < 0 ||
p->prio != swap_info[type].prio) { p->prio != swap_info[type].prio) {
swap_list.next = curtp; swap_list.next = swap_list.head;
} else { } else {
swap_list.next = type; swap_list.next = type;
} }
......
...@@ -16,9 +16,7 @@ ifeq ($(CONFIG_DECNET_FW),y) ...@@ -16,9 +16,7 @@ ifeq ($(CONFIG_DECNET_FW),y)
O_OBJS += dn_fw.o O_OBJS += dn_fw.o
endif endif
ifeq ($(CONFIG_SYSCTL),y)
O_OBJS += sysctl_net_decnet.o O_OBJS += sysctl_net_decnet.o
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
......
...@@ -291,7 +291,15 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) ...@@ -291,7 +291,15 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms)
kfree(t); kfree(t);
} }
} }
#endif #else /* CONFIG_SYSCTL */
static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms)
{
}
static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms)
{
}
#endif /* CONFIG_SYSCTL */
static struct dn_ifaddr *dn_dev_alloc_ifa(void) static struct dn_ifaddr *dn_dev_alloc_ifa(void)
{ {
......
...@@ -32,6 +32,8 @@ int decnet_time_wait = 30; ...@@ -32,6 +32,8 @@ int decnet_time_wait = 30;
int decnet_dn_count = 3; int decnet_dn_count = 3;
int decnet_di_count = 5; int decnet_di_count = 5;
int decnet_dr_count = 5; int decnet_dr_count = 5;
#ifdef CONFIG_SYSCTL
extern int decnet_dst_gc_interval; extern int decnet_dst_gc_interval;
static int min_decnet_time_wait[] = { 5 }; static int min_decnet_time_wait[] = { 5 };
static int max_decnet_time_wait[] = { 600 }; static int max_decnet_time_wait[] = { 600 };
...@@ -471,3 +473,12 @@ void dn_unregister_sysctl(void) ...@@ -471,3 +473,12 @@ void dn_unregister_sysctl(void)
unregister_sysctl_table(dn_table_header); unregister_sysctl_table(dn_table_header);
} }
#else /* CONFIG_SYSCTL */
void dn_unregister_sysctl(void)
{
}
void dn_register_sysctl(void)
{
}
#endif
...@@ -68,6 +68,8 @@ extern int udp_port_rover; ...@@ -68,6 +68,8 @@ extern int udp_port_rover;
#endif #endif
extern int netdev_finish_unregister(struct net_device *dev);
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#if defined(CONFIG_ULTRA) || defined(CONFIG_WD80x3) || \ #if defined(CONFIG_ULTRA) || defined(CONFIG_WD80x3) || \
...@@ -223,6 +225,7 @@ EXPORT_SYMBOL(br_avl_find_addr); ...@@ -223,6 +225,7 @@ EXPORT_SYMBOL(br_avl_find_addr);
#ifdef CONFIG_INET #ifdef CONFIG_INET
/* Internet layer registration */ /* Internet layer registration */
EXPORT_SYMBOL(inetdev_lock);
EXPORT_SYMBOL(inet_add_protocol); EXPORT_SYMBOL(inet_add_protocol);
EXPORT_SYMBOL(inet_del_protocol); EXPORT_SYMBOL(inet_del_protocol);
EXPORT_SYMBOL(ip_route_output); EXPORT_SYMBOL(ip_route_output);
...@@ -521,8 +524,10 @@ EXPORT_SYMBOL(init_hippi_dev); ...@@ -521,8 +524,10 @@ EXPORT_SYMBOL(init_hippi_dev);
EXPORT_SYMBOL(unregister_hipdev); EXPORT_SYMBOL(unregister_hipdev);
#endif #endif
#ifdef CONFIG_SYSCTL
EXPORT_SYMBOL(sysctl_wmem_max); EXPORT_SYMBOL(sysctl_wmem_max);
EXPORT_SYMBOL(sysctl_rmem_max); EXPORT_SYMBOL(sysctl_rmem_max);
#endif
#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE) #if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
#include<linux/if_ltalk.h> #include<linux/if_ltalk.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment