Commit b1ed3e69 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 726bdba7 50332445
...@@ -750,13 +750,35 @@ static void __init quirk_sis_96x_smbus(struct pci_dev *dev) ...@@ -750,13 +750,35 @@ static void __init quirk_sis_96x_smbus(struct pci_dev *dev)
* bridges pretend to be 85C503/5513 instead. In that case see if we * bridges pretend to be 85C503/5513 instead. In that case see if we
* spotted a compatible north bridge to make sure. * spotted a compatible north bridge to make sure.
* (pci_find_device doesn't work yet) * (pci_find_device doesn't work yet)
*
* We can also enable the sis96x bit in the discovery register..
*/ */
static int __devinitdata sis_96x_compatible = 0; static int __devinitdata sis_96x_compatible = 0;
#define SIS_DETECT_REGISTER 0x40
static void __init quirk_sis_503_smbus(struct pci_dev *dev) static void __init quirk_sis_503_smbus(struct pci_dev *dev)
{ {
if (sis_96x_compatible) u8 reg;
quirk_sis_96x_smbus(dev); u16 devid;
pci_read_config_byte(dev, SIS_DETECT_REGISTER, &reg);
pci_write_config_byte(dev, SIS_DETECT_REGISTER, reg | (1 << 6));
pci_read_config_word(dev, PCI_DEVICE_ID, &devid);
if ((devid & 0xfff0) != 0x0960) {
pci_write_config_byte(dev, SIS_DETECT_REGISTER, reg);
return;
}
/* Make people aware that we changed the config.. */
printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 (compatible=%d)\n", devid, sis_96x_compatible);
/*
* Ok, it now shows up as a 96x.. The 96x quirks are after
* the 503 quirk in the quirk table, so they'll automatically
* run and enable things like the SMBus device
*/
dev->device = devid;
} }
static void __init quirk_sis_96x_compatible(struct pci_dev *dev) static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
......
...@@ -772,16 +772,17 @@ int jfs_link(struct dentry *old_dentry, ...@@ -772,16 +772,17 @@ int jfs_link(struct dentry *old_dentry,
jfs_info("jfs_link: %s %s", old_dentry->d_name.name, jfs_info("jfs_link: %s %s", old_dentry->d_name.name,
dentry->d_name.name); dentry->d_name.name);
if (ip->i_nlink == JFS_LINK_MAX)
return -EMLINK;
if (ip->i_nlink == 0)
return -ENOENT;
tid = txBegin(ip->i_sb, 0); tid = txBegin(ip->i_sb, 0);
down(&JFS_IP(dir)->commit_sem); down(&JFS_IP(dir)->commit_sem);
down(&JFS_IP(ip)->commit_sem); down(&JFS_IP(ip)->commit_sem);
if (ip->i_nlink == JFS_LINK_MAX) {
rc = -EMLINK;
goto out;
}
/* /*
* scan parent directory for entry/freespace * scan parent directory for entry/freespace
*/ */
......
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) ) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK) #define _IOC_SIZE(nr) \
((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)? \
0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))
/* ...and for the PCMCIA and sound. */ /* ...and for the PCMCIA and sound. */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
......
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) ) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK) #define _IOC_SIZE(nr) \
((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)? \
0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))
/* ...and for the PCMCIA and sound. */ /* ...and for the PCMCIA and sound. */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
......
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