Commit b66fa17c authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.99pre5

parent de0d207b
VERSION = 2
PATCHLEVEL = 3
SUBLEVEL = 99
EXTRAVERSION = -pre4
EXTRAVERSION = -pre5
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -24,7 +24,7 @@ O_OBJS += pci-i386.o
ifdef CONFIG_VISWS
O_OBJS += pci-visws.o
else
O_OBJS += pci-pc.o
O_OBJS += pci-pc.o pci-irq.o
endif
endif
......
......@@ -18,7 +18,6 @@
#define PCI_NO_SORT 0x100
#define PCI_BIOS_SORT 0x200
#define PCI_NO_CHECKS 0x400
#define PCI_PEER_FIXUP 0x800
#define PCI_ASSIGN_ROMS 0x1000
#define PCI_BIOS_IRQ_SCAN 0x2000
......@@ -28,3 +27,42 @@ extern unsigned int pci_probe;
void pcibios_resource_survey(void);
int pcibios_enable_resources(struct pci_dev *);
/* pci-pc.c */
extern int pcibios_last_bus;
extern struct pci_bus *pci_root_bus;
extern struct pci_ops *pci_root_ops;
struct irq_routing_table *pcibios_get_irq_routing_table(void);
int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
/* pci-irq.c */
struct irq_info {
u8 bus, devfn; /* Bus, device and function */
struct {
u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
u16 bitmap; /* Available IRQs */
} __attribute__((packed)) irq[4];
u8 slot; /* Slot number, 0=onboard */
u8 rfu;
} __attribute__((packed));
struct irq_routing_table {
u32 signature; /* PIRQ_SIGNATURE should be here */
u16 version; /* PIRQ_VERSION */
u16 size; /* Table size in bytes */
u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
u32 miniport_data; /* Crap */
u8 rfu[11];
u8 checksum; /* Modulo 256 checksum must give zero */
struct irq_info slots[0];
} __attribute__((packed));
extern unsigned int pcibios_irq_mask;
void pcibios_fixup_irqs(void);
int pcibios_lookup_irq(struct pci_dev *dev, int assign);
This diff is collapsed.
This diff is collapsed.
......@@ -186,7 +186,7 @@ struct devprobe eisa_probes[] __initdata = {
{ne3210_probe, 0},
#endif
#ifdef CONFIG_DEFXX
{dfx_probe, 0}.
{dfx_probe, 0},
#endif
{NULL, 0},
};
......
......@@ -254,6 +254,23 @@ pci_enable_device(struct pci_dev *dev)
return 0;
}
int
pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge)
{
u8 pin;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (!pin)
return -1;
pin--;
while (dev->bus->self) {
pin = (pin + PCI_SLOT(dev->devfn)) % 4;
dev = dev->bus->self;
}
*bridge = dev;
return pin;
}
/*
* Registration of PCI drivers and handling of hot-pluggable devices.
*/
......@@ -961,7 +978,7 @@ static unsigned int __init pci_do_scan_bus(struct pci_bus *bus)
return max;
}
static int __init pci_bus_exists(const struct list_head *list, int nr)
int __init pci_bus_exists(const struct list_head *list, int nr)
{
const struct list_head *l;
......
......@@ -1720,11 +1720,15 @@ int usb_new_device(struct usb_device *dev)
info("USB new device connect, assigned device number %d", dev->devnum);
dev->maxpacketsize = 0; /* Default to 8 byte max packet size */
/* USB v1.1 5.5.3 */
/* We read the first 8 bytes from the device descriptor to get to */
/* the bMaxPacketSize0 field. Then we set the maximum packet size */
/* for the control pipe, and retrieve the rest */
dev->epmaxpacketin [0] = 8;
dev->epmaxpacketout[0] = 8;
/* We still haven't set the Address yet */
/* Even though we have assigned an address for the device, we */
/* haven't told it what it's address is yet */
addr = dev->devnum;
dev->devnum = 0;
......@@ -1740,12 +1744,6 @@ int usb_new_device(struct usb_device *dev)
}
dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0;
dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0;
switch (dev->descriptor.bMaxPacketSize0) {
case 8: dev->maxpacketsize = 0; break;
case 16: dev->maxpacketsize = 1; break;
case 32: dev->maxpacketsize = 2; break;
case 64: dev->maxpacketsize = 3; break;
}
dev->devnum = addr;
......
......@@ -522,7 +522,7 @@ static inline int
walk_init_root(const char *name, unsigned flags, struct nameidata *nd)
{
if (current->personality != PER_LINUX)
if (__emul_lookup_dentry(name,flags,nd));
if (__emul_lookup_dentry(name,flags,nd))
return 0;
nd->mnt = mntget(current->fs->rootmnt);
nd->dentry = dget(current->fs->root);
......
......@@ -198,7 +198,7 @@ nfs_block_bits(unsigned long bsize, unsigned char *nrbitsp)
static inline unsigned long
nfs_calc_block_size(u64 tsize)
{
loff_t used = (tsize + 511) / 512;
loff_t used = (tsize + 511) >> 9;
return (used > ULONG_MAX) ? ULONG_MAX : used;
}
......
......@@ -465,6 +465,7 @@ int pcibios_find_device (unsigned short vendor, unsigned short dev_id,
/* Generic PCI functions used internally */
void pci_init(void);
int pci_bus_exists(const struct list_head *list, int nr);
struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
struct pci_bus *pci_alloc_primary_bus(int bus);
struct pci_dev *pci_scan_slot(struct pci_dev *temp);
......@@ -474,7 +475,8 @@ void pci_name_device(struct pci_dev *dev);
char *pci_class_name(u32 class);
void pci_read_bridge_bases(struct pci_bus *child);
struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res);
int pci_setup_device(struct pci_dev * dev);
int pci_setup_device(struct pci_dev *dev);
int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
/* Generic PCI functions exported to card drivers */
......
......@@ -539,7 +539,6 @@ struct usb_device {
atomic_t refcnt; /* Reference count */
int maxpacketsize; /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */
unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */
/* [0] = IN, [1] = OUT */
......@@ -686,7 +685,7 @@ int usb_get_current_frame_number (struct usb_device *usb_dev);
static inline unsigned int __create_pipe(struct usb_device *dev, unsigned int endpoint)
{
return (dev->devnum << 8) | (endpoint << 15) | (dev->slow << 26) | dev->maxpacketsize;
return (dev->devnum << 8) | (endpoint << 15) | (dev->slow << 26);
}
static inline unsigned int __default_pipe(struct usb_device *dev)
......
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