patch-2.2.18 linux/drivers/block/cpqarray.c
Next file: linux/drivers/block/cpqarray.h
Previous file: linux/drivers/block/cciss_cmd.h
Back to the patch index
Back to the overall index
- Lines: 101
- Date:
Tue Nov 21 17:42:10 2000
- Orig file:
v2.2.17/drivers/block/cpqarray.c
- Orig date:
Sat Sep 9 18:42:34 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
@@ -41,8 +41,14 @@
#define SMART2_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
-#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.9)"
-#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,9)
+#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.11)"
+#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,11)
+
+/* Embedded module documentation macros - see modules.h */
+/* Original author Chris Frantz - Compaq Computer Corporation */
+MODULE_AUTHOR("Compaq Computer Corporation");
+MODULE_DESCRIPTION("Driver for Compaq Smart2 Array Controllers");
+
#define MAJOR_NR COMPAQ_SMART2_MAJOR
#include <linux/blk.h>
#include <linux/blkdev.h>
@@ -449,7 +455,8 @@
hba[i]->access.set_intr_mask(hba[i], 0);
if (request_irq(hba[i]->intr, do_ida_intr,
- SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i])) {
+ SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM,
+ hba[i]->devname, hba[i])) {
printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",
hba[i]->intr, hba[i]->devname);
@@ -617,6 +624,8 @@
int i;
+ c->pci_bus = bus;
+ c->pci_dev_fn = device_fn;
pdev = pci_find_slot(bus, device_fn);
vendor_id = pdev->vendor;
device_id = pdev->device;
@@ -663,6 +672,7 @@
c->vaddr = remap_pci_mem(c->paddr, 128);
c->board_id = board_id;
+
for(i=0; i<NR_PRODUCTS; i++) {
if (board_id == products[i].board_id) {
c->product_name = products[i].product_name;
@@ -752,6 +762,8 @@
hba[nr_ctlr]->access = *(products[j].access);
hba[nr_ctlr]->ctlr = nr_ctlr;
hba[nr_ctlr]->board_id = board_id;
+ hba[nr_ctlr]->pci_bus = 0; /* not PCI */
+ hba[nr_ctlr]->pci_dev_fn = 0; /* not PCI */
DBGINFO(
printk("i = %d, j = %d\n", i, j);
@@ -1174,7 +1186,20 @@
if (!arg) return -EINVAL;
put_user(DRIVER_VERSION, (unsigned long*)arg);
return 0;
+ case IDAGETPCIINFO:
+ {
+
+ ida_pci_info_struct pciinfo;
+ if (!arg) return -EINVAL;
+ pciinfo.bus = hba[ctlr]->pci_bus;
+ pciinfo.dev_fn = hba[ctlr]->pci_dev_fn;
+ pciinfo.board_id = hba[ctlr]->board_id;
+ copy_to_user_ret((void *) arg, &pciinfo,
+ sizeof( ida_pci_info_struct), -EFAULT);
+ return(0);
+ }
+
RO_IOCTLS(inode->i_rdev, arg);
default:
@@ -1358,6 +1383,8 @@
ctlr_info_t *info_p = hba[ctlr];
c = cmd_alloc(info_p);
+ if (!c)
+ return IO_ERROR;
c->ctlr = ctlr;
c->hdr.unit = log_unit;
c->hdr.prio = 0;
@@ -1623,6 +1650,7 @@
int ret_code, size;
drv_info_t *drv;
ctlr_info_t *info_p = hba[ctlr];
+ int i;
info_p->log_drv_map = 0;
@@ -1687,7 +1715,8 @@
}
info_p->log_drives = id_ctlr_buf->nr_drvs;;
- *(__u32*)(info_p->firm_rev) = *(__u32*)(id_ctlr_buf->firm_rev);
+ for(i=0;i<4;i++)
+ info_p->firm_rev[i] = id_ctlr_buf->firm_rev[i];
info_p->ctlr_sig = id_ctlr_buf->cfg_sig;
printk(" (%s)\n", info_p->product_name);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)