patch-2.4.10 linux/drivers/block/cciss.c
Next file: linux/drivers/block/cpqarray.c
Previous file: linux/drivers/block/blkpg.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Tue Sep 18 14:10:43 2001
- Orig file:
v2.4.9/linux/drivers/block/cciss.c
- Orig date:
Tue Jul 3 17:08:19 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/block/cciss.c linux/drivers/block/cciss.c
@@ -50,6 +50,7 @@
/* Embedded module documentation macros - see modules.h */
MODULE_AUTHOR("Charles M. White III - Compaq Computer Corporation");
MODULE_DESCRIPTION("Driver for Compaq Smart Array Controller 5300");
+MODULE_LICENSE("GPL");
#include "cciss_cmd.h"
#include "cciss.h"
@@ -400,17 +401,23 @@
put_user(hba[ctlr]->hd[MINOR(inode->i_rdev)].start_sect, &geo->start);
return 0;
case BLKGETSIZE:
- if (!arg) return -EINVAL;
put_user(hba[ctlr]->hd[MINOR(inode->i_rdev)].nr_sects, (long*)arg);
return 0;
+ case BLKGETSIZE64:
+ put_user((u64)hba[ctlr]->hd[MINOR(inode->i_rdev)].nr_sects << 9, (u64*)arg);
+ return 0;
case BLKRRPART:
return revalidate_logvol(inode->i_rdev, 1);
case BLKFLSBUF:
+ case BLKBSZSET:
+ case BLKBSZGET:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKPG:
+ case BLKELVGET:
+ case BLKELVSET:
return( blk_ioctl(inode->i_rdev, cmd, arg));
case CCISS_GETPCIINFO:
{
@@ -1963,8 +1970,7 @@
hba[i]->gendisk.nr_real = hba[i]->num_luns;
/* Get on the disk list */
- hba[i]->gendisk.next = gendisk_head;
- gendisk_head = &(hba[i]->gendisk);
+ add_gendisk(&(hba[i]->gendisk));
cciss_geninit(i);
for(j=0; j<NWD; j++)
@@ -1980,7 +1986,6 @@
{
ctlr_info_t *tmp_ptr;
int i;
- struct gendisk *g;
if (pdev->driver_data == NULL)
{
@@ -2005,19 +2010,8 @@
/* remove it from the disk list */
- if (gendisk_head == &(hba[i]->gendisk))
- {
- gendisk_head = hba[i]->gendisk.next;
- } else
- {
- for(g=gendisk_head; g ; g=g->next)
- {
- if(g->next == &(hba[i]->gendisk))
- {
- g->next = hba[i]->gendisk.next;
- }
- }
- }
+ del_gendisk(&(hba[i]->gendisk));
+
pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct),
hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle);
pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof( ErrorInfo_struct),
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)