diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:29:52 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:29:52 -0800 |
| commit | 4fd9cc9e607b22cca3bf5990e677fe90fc8361e6 (patch) | |
| tree | af413b324795e6617d419841b0058d9c14f41229 /drivers/message | |
| parent | 980adcb2cbdd20c15fe63b4c2db12ca0051d8c7d (diff) | |
v2.4.13.1 -> v2.4.13.2
- Alan Cox: more merging
- Alexander Viro: block device module race fixes
- Richard Henderson: mmap for 32-bit alpha personality
- Jeff Garzik: 8139 and natsemi update
Diffstat (limited to 'drivers/message')
| -rw-r--r-- | drivers/message/i2o/i2o_block.c | 33 | ||||
| -rw-r--r-- | drivers/message/i2o/i2o_pci.c | 2 | ||||
| -rw-r--r-- | drivers/message/i2o/i2o_proc.c | 3 |
3 files changed, 20 insertions, 18 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 00f28e63c493..971833f3a0fc 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -1247,7 +1247,6 @@ static int i2ob_release(struct inode *inode, struct file *file) DEBUG("Unclaim\n"); } - MOD_DEC_USE_COUNT; return 0; } @@ -1306,7 +1305,6 @@ static int i2ob_open(struct inode *inode, struct file *file) i2o_post_wait(dev->controller, msg, 20, 2); DEBUG("Ready.\n"); } - MOD_INC_USE_COUNT; return 0; } @@ -1371,34 +1369,34 @@ static int i2ob_install_device(struct i2o_controller *c, struct i2o_device *d, i for(i=unit;i<=unit+15;i++) { - if(d->controller->type == I2O_TYPE_PCI && d->controller->bus.pci.queue_buggy) + i2ob_max_sectors[i] = 256; + i2ob_dev[i].max_segments = (d->controller->status_block->inbound_frame_size - 8)/2; + + if(d->controller->type == I2O_TYPE_PCI && d->controller->bus.pci.queue_buggy == 2) + i2ob_dev[i].depth = 32; + + if(d->controller->type == I2O_TYPE_PCI && d->controller->bus.pci.queue_buggy == 1) { i2ob_max_sectors[i] = 32; i2ob_dev[i].max_segments = 8; i2ob_dev[i].depth = 4; } - else if(d->controller->type == I2O_TYPE_PCI && d->controller->bus.pci.short_req) + + if(d->controller->type == I2O_TYPE_PCI && d->controller->bus.pci.short_req) { i2ob_max_sectors[i] = 8; i2ob_dev[i].max_segments = 8; } - else - { - /* MAX_SECTORS was used but 255 is a dumb number for - striped RAID */ - i2ob_max_sectors[i]=256; - i2ob_dev[i].max_segments = (d->controller->status_block->inbound_frame_size - 8)/2; - } } - printk(KERN_INFO "Max segments set to %d\n", - i2ob_dev[unit].max_segments); - printk(KERN_INFO "Byte limit is %d.\n", limit); - i2ob_query_device(dev, 0x0000, 0, &type, 1); - sprintf(d->dev_name, "%s%c", i2ob_gendisk.major_name, 'a' + (unit>>4)); + printk(KERN_INFO "%s: Max segments %d, queue depth %d, byte limit %d.\n", + d->dev_name, i2ob_dev[unit].max_segments, i2ob_dev[unit].depth, limit); + + i2ob_query_device(dev, 0x0000, 0, &type, 1); + printk(KERN_INFO "%s: ", d->dev_name); switch(type) { @@ -1417,7 +1415,7 @@ static int i2ob_install_device(struct i2o_controller *c, struct i2o_device *d, i printk(KERN_INFO " Not loaded.\n"); return 1; } - printk("- %dMb, %d byte sectors", + printk(": %dMB, %d byte sectors", (int)(size>>20), blocksize); if(status&(1<<0)) { @@ -1838,6 +1836,7 @@ static void i2ob_reboot_event(void) static struct block_device_operations i2ob_fops = { + owner: THIS_MODULE, open: i2ob_open, release: i2ob_release, ioctl: i2ob_ioctl, diff --git a/drivers/message/i2o/i2o_pci.c b/drivers/message/i2o/i2o_pci.c index 880a234e831c..cdffdf0ecf48 100644 --- a/drivers/message/i2o/i2o_pci.c +++ b/drivers/message/i2o/i2o_pci.c @@ -192,6 +192,8 @@ int __init i2o_pci_install(struct pci_dev *dev) if(dev->subsystem_vendor == PCI_VENDOR_ID_PROMISE) { c->bus.pci.queue_buggy=1; + if (dev->subsystem_device == 0x0000) /* SX6000 ???? */ + c->bus.pci.queue_buggy=2; printk(KERN_INFO "I2O: Promise workarounds activated.\n"); } diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index ef820bfa55b0..8dff776782d6 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c @@ -955,7 +955,6 @@ int i2o_proc_read_drivers_stored(char *buf, char **start, off_t offset, i2o_driver_result_table *result; i2o_driver_store_table *dst; - spin_lock(&i2o_proc_lock); len = 0; @@ -963,6 +962,8 @@ int i2o_proc_read_drivers_stored(char *buf, char **start, off_t offset, if(result == NULL) return -ENOMEM; + spin_lock(&i2o_proc_lock); + token = i2o_query_table(I2O_PARAMS_TABLE_GET, c, ADAPTER_TID, 0x0005, -1, NULL, 0, result, sizeof(*result)); |
