Commit bcd039b2 authored by Linus Torvalds's avatar Linus Torvalds
parents e67b23c7 6f5a0f7c
/* /*
* linux/drivers/block/as-iosched.c
*
* Anticipatory & deadline i/o scheduler. * Anticipatory & deadline i/o scheduler.
* *
* Copyright (C) 2002 Jens Axboe <axboe@suse.de> * Copyright (C) 2002 Jens Axboe <axboe@suse.de>
......
/* /*
* linux/drivers/block/cfq-iosched.c
*
* CFQ, or complete fairness queueing, disk scheduler. * CFQ, or complete fairness queueing, disk scheduler.
* *
* Based on ideas from a previously unfinished io * Based on ideas from a previously unfinished io
......
/* /*
* linux/drivers/block/deadline-iosched.c
*
* Deadline i/o scheduler. * Deadline i/o scheduler.
* *
* Copyright (C) 2002 Jens Axboe <axboe@suse.de> * Copyright (C) 2002 Jens Axboe <axboe@suse.de>
......
/* /*
* linux/drivers/block/elevator.c
*
* Block device elevator/IO-scheduler. * Block device elevator/IO-scheduler.
* *
* Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
......
/* /*
* linux/drivers/block/ll_rw_blk.c
*
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994, Karl Keyte: Added support for disk statistics * Copyright (C) 1994, Karl Keyte: Added support for disk statistics
* Elevator latency, (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE * Elevator latency, (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
......
...@@ -1017,10 +1017,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, ...@@ -1017,10 +1017,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
status = -ENOMEM; status = -ENOMEM;
goto cleanup1; goto cleanup1;
} }
if (ioc->Request.Type.Direction == XFER_WRITE && if (ioc->Request.Type.Direction == XFER_WRITE) {
copy_from_user(buff[sg_used], data_ptr, sz)) { if (copy_from_user(buff[sg_used], data_ptr, sz)) {
status = -ENOMEM; status = -ENOMEM;
goto cleanup1; goto cleanup1;
}
} else { } else {
memset(buff[sg_used], 0, sz); memset(buff[sg_used], 0, sz);
} }
...@@ -1138,8 +1139,15 @@ static int revalidate_allvol(ctlr_info_t *host) ...@@ -1138,8 +1139,15 @@ static int revalidate_allvol(ctlr_info_t *host)
for(i=0; i< NWD; i++) { for(i=0; i< NWD; i++) {
struct gendisk *disk = host->gendisk[i]; struct gendisk *disk = host->gendisk[i];
if (disk) {
request_queue_t *q = disk->queue;
if (disk->flags & GENHD_FL_UP) if (disk->flags & GENHD_FL_UP)
del_gendisk(disk); del_gendisk(disk);
if (q)
blk_cleanup_queue(q);
put_disk(disk);
}
} }
/* /*
...@@ -1453,10 +1461,13 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, ...@@ -1453,10 +1461,13 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
* allows us to delete disk zero but keep the controller registered. * allows us to delete disk zero but keep the controller registered.
*/ */
if (h->gendisk[0] != disk){ if (h->gendisk[0] != disk){
if (disk->flags & GENHD_FL_UP){ if (disk) {
blk_cleanup_queue(disk->queue); request_queue_t *q = disk->queue;
if (disk->flags & GENHD_FL_UP)
del_gendisk(disk); del_gendisk(disk);
drv->queue = NULL; if (q)
blk_cleanup_queue(q);
put_disk(disk);
} }
} }
...@@ -3225,9 +3236,14 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev) ...@@ -3225,9 +3236,14 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
/* remove it from the disk list */ /* remove it from the disk list */
for (j = 0; j < NWD; j++) { for (j = 0; j < NWD; j++) {
struct gendisk *disk = hba[i]->gendisk[j]; struct gendisk *disk = hba[i]->gendisk[j];
if (disk->flags & GENHD_FL_UP) { if (disk) {
request_queue_t *q = disk->queue;
if (disk->flags & GENHD_FL_UP)
del_gendisk(disk); del_gendisk(disk);
blk_cleanup_queue(disk->queue); if (q)
blk_cleanup_queue(q);
put_disk(disk);
} }
} }
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
typedef struct _cciss_pci_info_struct typedef struct _cciss_pci_info_struct
{ {
unsigned char bus; unsigned char bus;
unsigned short domain;
unsigned char dev_fn; unsigned char dev_fn;
unsigned short domain;
__u32 board_id; __u32 board_id;
} cciss_pci_info_struct; } cciss_pci_info_struct;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment