aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index abde27027c06..3e9fb6e4a52a 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Disk Array driver for HP SA 5xxx and 6xxx Controllers 2 * Disk Array driver for HP SA 5xxx and 6xxx Controllers
3 * Copyright 2000, 2002 Hewlett-Packard Development Company, L.P. 3 * Copyright 2000, 2005 Hewlett-Packard Development Company, L.P.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@
54MODULE_AUTHOR("Hewlett-Packard Company"); 54MODULE_AUTHOR("Hewlett-Packard Company");
55MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.6"); 55MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.6");
56MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" 56MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"
57 " SA6i P600 P800 E400"); 57 " SA6i P600 P800 E400 E300");
58MODULE_LICENSE("GPL"); 58MODULE_LICENSE("GPL");
59 59
60#include "cciss_cmd.h" 60#include "cciss_cmd.h"
@@ -85,8 +85,10 @@ static const struct pci_device_id cciss_pci_device_id[] = {
85 0x103C, 0x3225, 0, 0, 0}, 85 0x103C, 0x3225, 0, 0, 0},
86 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSB, 86 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSB,
87 0x103c, 0x3223, 0, 0, 0}, 87 0x103c, 0x3223, 0, 0, 0},
88 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSB, 88 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC,
89 0x103c, 0x3231, 0, 0, 0}, 89 0x103c, 0x3231, 0, 0, 0},
90 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC,
91 0x103c, 0x3233, 0, 0, 0},
90 {0,} 92 {0,}
91}; 93};
92MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); 94MODULE_DEVICE_TABLE(pci, cciss_pci_device_id);
@@ -110,6 +112,7 @@ static struct board_type products[] = {
110 { 0x3225103C, "Smart Array P600", &SA5_access}, 112 { 0x3225103C, "Smart Array P600", &SA5_access},
111 { 0x3223103C, "Smart Array P800", &SA5_access}, 113 { 0x3223103C, "Smart Array P800", &SA5_access},
112 { 0x3231103C, "Smart Array E400", &SA5_access}, 114 { 0x3231103C, "Smart Array E400", &SA5_access},
115 { 0x3233103C, "Smart Array E300", &SA5_access},
113}; 116};
114 117
115/* How long to wait (in millesconds) for board to go into simple mode */ 118/* How long to wait (in millesconds) for board to go into simple mode */
@@ -635,6 +638,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
635 cciss_pci_info_struct pciinfo; 638 cciss_pci_info_struct pciinfo;
636 639
637 if (!arg) return -EINVAL; 640 if (!arg) return -EINVAL;
641 pciinfo.domain = pci_domain_nr(host->pdev->bus);
638 pciinfo.bus = host->pdev->bus->number; 642 pciinfo.bus = host->pdev->bus->number;
639 pciinfo.dev_fn = host->pdev->devfn; 643 pciinfo.dev_fn = host->pdev->devfn;
640 pciinfo.board_id = host->board_id; 644 pciinfo.board_id = host->board_id;
@@ -782,18 +786,10 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
782 786
783 case CCISS_GETLUNINFO: { 787 case CCISS_GETLUNINFO: {
784 LogvolInfo_struct luninfo; 788 LogvolInfo_struct luninfo;
785 int i;
786 789
787 luninfo.LunID = drv->LunID; 790 luninfo.LunID = drv->LunID;
788 luninfo.num_opens = drv->usage_count; 791 luninfo.num_opens = drv->usage_count;
789 luninfo.num_parts = 0; 792 luninfo.num_parts = 0;
790 /* count partitions 1 to 15 with sizes > 0 */
791 for (i = 0; i < MAX_PART - 1; i++) {
792 if (!disk->part[i])
793 continue;
794 if (disk->part[i]->nr_sects != 0)
795 luninfo.num_parts++;
796 }
797 if (copy_to_user(argp, &luninfo, 793 if (copy_to_user(argp, &luninfo,
798 sizeof(LogvolInfo_struct))) 794 sizeof(LogvolInfo_struct)))
799 return -EFAULT; 795 return -EFAULT;