diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-04-19 13:55:33 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-04-19 13:55:33 +0000 |
commit | 7f974a7687129917e3c3ceb74287bdf9ba0fd5f3 (patch) | |
tree | e5a2ab040ca748a1d3e8f863af05b9f7ef674a76 /drivers | |
parent | 46e045034336a2cc90c1798cd7cc07af744ddfd6 (diff) |
Merge with Linux 2.3.99-pre5.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/Space.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 19 | ||||
-rw-r--r-- | drivers/usb/usb.c | 14 |
3 files changed, 25 insertions, 10 deletions
diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 7e6910154..6cc44eac9 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c @@ -185,7 +185,7 @@ struct devprobe eisa_probes[] __initdata = { {ne3210_probe, 0}, #endif #ifdef CONFIG_DEFXX - {dfx_probe, 0}. + {dfx_probe, 0}, #endif {NULL, 0}, }; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 8f523cdf4..c08d2f38e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -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; diff --git a/drivers/usb/usb.c b/drivers/usb/usb.c index 8f962b485..213cd8180 100644 --- a/drivers/usb/usb.c +++ b/drivers/usb/usb.c @@ -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; |