aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavem <davem>2001-12-13 12:42:21 +0000
committerdavem <davem>2001-12-13 12:42:21 +0000
commit3679ccd5b521e0158f4c8f1ae708df0833df8fd0 (patch)
tree61216e9e5eab7f848e7aeadbf912c61b14d26b2d
parent426a063260c2afa557be2256f3f7cb07acc0f2b4 (diff)
downloadnetdev-vger-cvs-3679ccd5b521e0158f4c8f1ae708df0833df8fd0.tar.gz
Synchronize with Axboe's latest sources.
-rw-r--r--drivers/block/acsi.c4
-rw-r--r--drivers/block/amiflop.c4
-rw-r--r--drivers/block/ataflop.c4
-rw-r--r--drivers/block/block_ioctl.c3
-rw-r--r--drivers/block/ll_rw_blk.c50
-rw-r--r--drivers/block/paride/pd.c38
-rw-r--r--drivers/block/ps2esdi.c9
-rw-r--r--drivers/block/swim3.c3
-rw-r--r--drivers/block/swim_iop.c4
-rw-r--r--drivers/block/xd.c4
-rw-r--r--drivers/ide/hd.c52
-rw-r--r--drivers/scsi/scsi.c8
-rw-r--r--drivers/scsi/scsi_merge.c13
-rw-r--r--drivers/scsi/scsi_scan.c6
-rw-r--r--include/linux/bio.h14
15 files changed, 112 insertions, 104 deletions
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c
index 916a192e5..89d350be9 100644
--- a/drivers/block/acsi.c
+++ b/drivers/block/acsi.c
@@ -253,6 +253,8 @@ static int CurrentNReq;
static int CurrentNSect;
static char *CurrentBuffer;
+static spinlock_t acsi_lock;
+
#define SET_TIMER() mod_timer(&acsi_timer, jiffies + ACSI_TIMEOUT)
#define CLEAR_TIMER() del_timer(&acsi_timer)
@@ -1784,7 +1786,7 @@ int acsi_init( void )
phys_acsi_buffer = virt_to_phys( acsi_buffer );
STramMask = ATARIHW_PRESENT(EXTD_DMA) ? 0x00000000 : 0xff000000;
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &acsi_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read-ahead */
add_gendisk(&acsi_gendisk);
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 45d30ce45..7f357157e 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -174,6 +174,8 @@ static int writepending;
static int writefromint;
static char *raw_buf;
+static spinlock_t amiflop_lock;
+
#define RAW_BUF_SIZE 30000 /* size of raw disk data */
/*
@@ -1855,7 +1857,7 @@ int __init amiga_floppy_init(void)
post_write_timer.data = 0;
post_write_timer.function = post_write;
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &amiflop_lock);
blksize_size[MAJOR_NR] = floppy_blocksizes;
blk_size[MAJOR_NR] = floppy_sizes;
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index eea26ff9e..19997245e 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -156,6 +156,8 @@ static int StartDiskType[] = {
static int DriveType = TYPE_HD;
+static spinlock_t ataflop_lock;
+
/* Array for translating minors into disk formats */
static struct {
int index;
@@ -2013,7 +2015,7 @@ int __init atari_floppy_init (void)
blk_size[MAJOR_NR] = floppy_sizes;
blksize_size[MAJOR_NR] = floppy_blocksizes;
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &ataflop_lock);
printk(KERN_INFO "Atari floppy driver: max. %cD, %strack buffering\n",
DriveType == 0 ? 'D' : DriveType == 1 ? 'H' : 'E',
diff --git a/drivers/block/block_ioctl.c b/drivers/block/block_ioctl.c
index a89488848..75d71ca05 100644
--- a/drivers/block/block_ioctl.c
+++ b/drivers/block/block_ioctl.c
@@ -76,5 +76,8 @@ int block_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
err = -ENOTTY;
}
+#if 0
+ blk_put_queue(q);
+#endif
return err;
}
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 26bf06621..f8febd812 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -1538,11 +1538,28 @@ sorry:
extern int stram_device_init (void);
#endif
-inline void blk_recalc_request(struct request *rq, int nsect)
+inline void blk_recalc_rq_segments(struct request *rq)
{
struct bio *bio;
int nr_phys_segs, nr_hw_segs;
+ rq->buffer = bio_data(rq->bio);
+
+ nr_phys_segs = nr_hw_segs = 0;
+ rq_for_each_bio(bio, rq) {
+ /* Force bio hw/phys segs to be recalculated. */
+ bio->bi_flags &= ~(1 << BIO_SEG_VALID);
+
+ nr_phys_segs += bio_phys_segments(rq->q, bio);
+ nr_hw_segs += bio_hw_segments(rq->q, bio);
+ }
+
+ rq->nr_phys_segments = nr_phys_segs;
+ rq->nr_hw_segments = nr_hw_segs;
+}
+
+inline void blk_recalc_rq_sectors(struct request *rq, int nsect)
+{
rq->hard_sector += nsect;
rq->hard_nr_sectors -= nsect;
rq->sector = rq->hard_sector;
@@ -1559,26 +1576,6 @@ inline void blk_recalc_request(struct request *rq, int nsect)
printk("blk: request botched\n");
rq->nr_sectors = rq->current_nr_sectors;
}
-
- /* XXX Who updates the bio page/offset values to reflect
- * XXX the hard sector number advance above??? -DaveM
- */
- rq->buffer = bio_data(rq->bio);
-
- /* XXX If nobody is updating the BIO the following is a
- * XXX nop. But once that is fixed, this is needed. -DaveM
- */
- nr_phys_segs = nr_hw_segs = 0;
- rq_for_each_bio(bio, rq) {
- /* Force bio hw/phys segs to be recalculated. */
- bio->bi_flags &= ~(1 << BIO_SEG_VALID);
-
- nr_phys_segs += bio_phys_segments(rq->q, bio);
- nr_hw_segs += bio_hw_segments(rq->q, bio);
- }
-
- rq->nr_phys_segments = nr_phys_segs;
- rq->nr_hw_segments = nr_hw_segs;
}
/**
@@ -1621,7 +1618,8 @@ int end_that_request_first(struct request *req, int uptodate, int nr_sectors)
bio->bi_size -= residual;
bio_iovec(bio)->bv_offset += residual;
bio_iovec(bio)->bv_len -= residual;
- blk_recalc_request(req, nr_sectors);
+ blk_recalc_rq_sectors(req, nr_sectors);
+ blk_recalc_rq_segments(req);
return 1;
}
@@ -1644,13 +1642,15 @@ int end_that_request_first(struct request *req, int uptodate, int nr_sectors)
}
if ((bio = req->bio)) {
- blk_recalc_request(req, nsect);
+ blk_recalc_rq_sectors(req, nsect);
/*
* end more in this run, or just return 'not-done'
*/
- if (unlikely(nr_sectors <= 0))
+ if (unlikely(nr_sectors <= 0)) {
+ blk_recalc_rq_segments(req);
return 1;
+ }
}
}
@@ -1740,6 +1740,6 @@ EXPORT_SYMBOL(blk_rq_map_sg);
EXPORT_SYMBOL(blk_nohighio);
EXPORT_SYMBOL(blk_dump_rq_flags);
EXPORT_SYMBOL(submit_bio);
+EXPORT_SYMBOL(blk_queue_assign_lock);
EXPORT_SYMBOL(blk_phys_contig_segment);
EXPORT_SYMBOL(blk_hw_contig_segment);
-EXPORT_SYMBOL(blk_queue_assign_lock);
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 1430fcb80..48199cdad 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -166,6 +166,8 @@ static int pd_drive_count;
#include <asm/uaccess.h>
+static spinlock_t pd_lock;
+
#ifndef MODULE
#include "setup.h"
@@ -394,7 +396,7 @@ int pd_init (void)
return -1;
}
q = BLK_DEFAULT_QUEUE(MAJOR_NR);
- blk_init_queue(q, DEVICE_REQUEST);
+ blk_init_queue(q, DEVICE_REQUEST, &pd_lock);
blk_queue_max_sectors(q, cluster);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
@@ -875,9 +877,9 @@ static void pd_next_buf( int unit )
{ long saved_flags;
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(1);
- if (!pd_run) { spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ if (!pd_run) { spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
@@ -893,7 +895,7 @@ static void pd_next_buf( int unit )
pd_count = CURRENT->current_nr_sectors;
pd_buf = CURRENT->buffer;
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
}
static void do_pd_read( void )
@@ -916,11 +918,11 @@ static void do_pd_read_start( void )
pi_do_claimed(PI,do_pd_read_start);
return;
}
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(0);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
pd_ide_command(unit,IDE_READ,pd_block,pd_run);
@@ -940,11 +942,11 @@ static void do_pd_read_drq( void )
pi_do_claimed(PI,do_pd_read_start);
return;
}
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(0);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
pi_read_block(PI,pd_buf,512);
@@ -955,11 +957,11 @@ static void do_pd_read_drq( void )
if (!pd_count) pd_next_buf(unit);
}
pi_disconnect(PI);
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(1);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
}
static void do_pd_write( void )
@@ -982,11 +984,11 @@ static void do_pd_write_start( void )
pi_do_claimed(PI,do_pd_write_start);
return;
}
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(0);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
pd_ide_command(unit,IDE_WRITE,pd_block,pd_run);
@@ -998,11 +1000,11 @@ static void do_pd_write_start( void )
pi_do_claimed(PI,do_pd_write_start);
return;
}
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(0);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
pi_write_block(PI,pd_buf,512);
@@ -1027,19 +1029,19 @@ static void do_pd_write_done( void )
pi_do_claimed(PI,do_pd_write_start);
return;
}
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(0);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
return;
}
pi_disconnect(PI);
- spin_lock_irqsave(&QUEUE->queue_lock,saved_flags);
+ spin_lock_irqsave(&pd_lock,saved_flags);
end_request(1);
pd_busy = 0;
do_pd_request(NULL);
- spin_unlock_irqrestore(&QUEUE->queue_lock,saved_flags);
+ spin_unlock_irqrestore(&pd_lock,saved_flags);
}
/* end of pd.c */
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
index b248b437b..81da0161d 100644
--- a/drivers/block/ps2esdi.c
+++ b/drivers/block/ps2esdi.c
@@ -66,8 +66,6 @@
#define TYPE_0_CMD_BLK_LENGTH 2
#define TYPE_1_CMD_BLK_LENGTH 4
-#define PS2ESDI_LOCK (&((BLK_DEFAULT_QUEUE(MAJOR_NR))->queue_lock))
-
static void reset_ctrl(void);
int ps2esdi_init(void);
@@ -130,6 +128,7 @@ static int intg_esdi = 0; /* If integrated adapter */
struct ps2esdi_i_struct {
unsigned int head, sect, cyl, wpcom, lzone, ctl;
};
+static spinlock_t ps2esdi_lock;
#if 0
#if 0 /* try both - I don't know which one is better... UB */
@@ -180,7 +179,7 @@ int __init ps2esdi_init(void)
return -1;
}
/* set up some global information - indicating device specific info */
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &ps2esdi_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
/* some minor housekeeping - setup the global gendisk structure */
@@ -954,10 +953,10 @@ static void ps2esdi_normal_interrupt_handler(u_int int_ret_code)
break;
}
if(ending != -1) {
- spin_lock_irqsave(PS2ESDI_LOCK, flags);
+ spin_lock_irqsave(ps2esdi_LOCK, flags);
end_request(ending);
do_ps2esdi_request(BLK_DEFAULT_QUEUE(MAJOR_NR));
- spin_unlock_irqrestore(PS2ESDI_LOCK, flags);
+ spin_unlock_irqrestore(ps2esdi_LOCK, flags);
}
} /* handle interrupts */
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index f4dee49d4..56081fc08 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -203,6 +203,7 @@ struct floppy_state {
static struct floppy_state floppy_states[MAX_FLOPPIES];
static int floppy_count = 0;
+static spinlock_t swim3_lock;
static unsigned short write_preamble[] = {
0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, /* gap field */
@@ -1041,7 +1042,7 @@ int swim3_init(void)
MAJOR_NR);
return -EBUSY;
}
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST,&swim3_lock);
blksize_size[MAJOR_NR] = floppy_blocksizes;
blk_size[MAJOR_NR] = floppy_sizes;
}
diff --git a/drivers/block/swim_iop.c b/drivers/block/swim_iop.c
index 29b8f8213..8c95cabd1 100644
--- a/drivers/block/swim_iop.c
+++ b/drivers/block/swim_iop.c
@@ -84,6 +84,8 @@ static struct floppy_state floppy_states[MAX_FLOPPIES];
static int floppy_blocksizes[2] = {512,512};
static int floppy_sizes[2] = {2880,2880};
+static spinlock_t swim_iop_lock;
+
static char *drive_names[7] = {
"not installed", /* DRV_NONE */
"unknown (1)", /* DRV_UNKNOWN */
@@ -147,7 +149,7 @@ int swimiop_init(void)
MAJOR_NR);
return -EBUSY;
}
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &swim_iop_lock);
blksize_size[MAJOR_NR] = floppy_blocksizes;
blk_size[MAJOR_NR] = floppy_sizes;
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 4357b317b..ae34bf493 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -122,6 +122,8 @@ static struct hd_struct xd_struct[XD_MAXDRIVES << 6];
static int xd_sizes[XD_MAXDRIVES << 6], xd_access[XD_MAXDRIVES];
static int xd_blocksizes[XD_MAXDRIVES << 6];
+static spinlock_t xd_lock;
+
extern struct block_device_operations xd_fops;
static struct gendisk xd_gendisk = {
@@ -170,7 +172,7 @@ int __init xd_init (void)
return -1;
}
devfs_handle = devfs_mk_dir (NULL, xd_gendisk.major_name, NULL);
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &xd_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
add_gendisk(&xd_gendisk);
xd_geninit();
diff --git a/drivers/ide/hd.c b/drivers/ide/hd.c
index 38c077747..868305afd 100644
--- a/drivers/ide/hd.c
+++ b/drivers/ide/hd.c
@@ -62,6 +62,8 @@
#define HD_IRQ IRQ_HARDDISK
#endif
+static spinlock_t hd_lock;
+
static int revalidate_hddisk(kdev_t, int);
#define HD_DELAY 0
@@ -106,7 +108,7 @@ static int NR_HD;
static struct hd_struct hd[MAX_HD<<6];
static int hd_sizes[MAX_HD<<6];
static int hd_blocksizes[MAX_HD<<6];
-static int hd_hardsectsizes[MAX_HD<<6];
+
static struct timer_list device_timer;
@@ -464,7 +466,7 @@ ok_to_write:
i = --CURRENT->nr_sectors;
--CURRENT->current_nr_sectors;
CURRENT->buffer += 512;
- if (!i || (CURRENT->bh && !SUBSECTOR(i)))
+ if (!i || (CURRENT->bio && !SUBSECTOR(i)))
end_request(1);
if (i > 0) {
SET_INTR(&write_intr);
@@ -586,24 +588,29 @@ repeat:
dev+'a', (CURRENT->cmd == READ)?"read":"writ",
cyl, head, sec, nsect, (unsigned long) CURRENT->buffer);
#endif
- if (CURRENT->cmd == READ) {
- hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr);
- if (reset)
- goto repeat;
- return;
- }
- if (CURRENT->cmd == WRITE) {
- hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr);
- if (reset)
- goto repeat;
- if (wait_DRQ()) {
- bad_rw_intr();
- goto repeat;
+ if(CURRENT->flags & REQ_CMD) {
+ switch (rq_data_dir(CURRENT)) {
+ case READ:
+ hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr);
+ if (reset)
+ goto repeat;
+ break;
+ case WRITE:
+ hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr);
+ if (reset)
+ goto repeat;
+ if (wait_DRQ()) {
+ bad_rw_intr();
+ goto repeat;
+ }
+ outsw(HD_DATA,CURRENT->buffer,256);
+ break;
+ default:
+ printk("unknown hd-command\n");
+ end_request(0);
+ break;
}
- outsw(HD_DATA,CURRENT->buffer,256);
- return;
}
- panic("unknown hd-command");
}
static void do_hd_request (request_queue_t * q)
@@ -723,12 +730,11 @@ static void __init hd_geninit(void)
{
int drive;
- for(drive=0; drive < (MAX_HD << 6); drive++) {
+ for(drive=0; drive < (MAX_HD << 6); drive++)
hd_blocksizes[drive] = 1024;
- hd_hardsectsizes[drive] = 512;
- }
+
blksize_size[MAJOR_NR] = hd_blocksizes;
- hardsect_size[MAJOR_NR] = hd_hardsectsizes;
+ blk_queue_hardsect_size(QUEUE, 512);
#ifdef __i386__
if (!NR_HD) {
@@ -830,7 +836,7 @@ int __init hd_init(void)
printk("hd: unable to get major %d for hard disk\n",MAJOR_NR);
return -1;
}
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &hd_lock);
blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 255);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read-ahead */
add_gendisk(&hd_gendisk);
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index ad08c5bf2..0710bf2f5 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -185,12 +185,12 @@ void scsi_initialize_queue(Scsi_Device * SDpnt, struct Scsi_Host * SHpnt)
blk_init_queue(q, scsi_request_fn, &SHpnt->host_lock);
q->queuedata = (void *) SDpnt;
- /* Hardware imposed limit. */
+ /* Hardware imposed limit. */
blk_queue_max_hw_segments(q, SHpnt->sg_tablesize);
- /* If we stopped using scsi_malloc for the scatterlists
- * we could eliminate this limit too.
- */
+ /*
+ * When we remove scsi_malloc soonish, this can die too
+ */
blk_queue_max_phys_segments(q, PAGE_SIZE / sizeof(struct scatterlist));
blk_queue_max_sectors(q, SHpnt->max_sectors);
diff --git a/drivers/scsi/scsi_merge.c b/drivers/scsi/scsi_merge.c
index e37500f56..323207132 100644
--- a/drivers/scsi/scsi_merge.c
+++ b/drivers/scsi/scsi_merge.c
@@ -56,14 +56,9 @@
* Returns: 1 on success.
*
* Lock status:
- *
- * Notes: The generic block layer takes care of ISA bounce
- * buffering issues for us.
*/
int scsi_init_io(Scsi_Cmnd *SCpnt)
{
- struct bio * bio;
- char * buff;
int count;
struct request * req;
struct scatterlist * sgpnt;
@@ -133,19 +128,15 @@ int scsi_init_io(Scsi_Cmnd *SCpnt)
}
SCpnt->use_sg = count;
-
return 1;
single_segment:
-
/*
* Come here if for any reason we choose to do this as a single
- * segment.
+ * segment. FIXME: remember to handle highmem bouncing
*/
- bio = req->bio;
- buff = req->buffer = bio_data(bio);
SCpnt->request_bufflen = this_count << 9;
- SCpnt->request_buffer = buff;
+ SCpnt->request_buffer = bio_data(req->bio);
SCpnt->use_sg = 0;
return 1;
}
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index a9a836da5..e6cac9755 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -155,14 +155,11 @@ static struct dev_info device_list[] =
{"EMC", "SYMMETRIX", "*", BLIST_SPARSELUN},
{"CMD", "CRA-7280", "*", BLIST_SPARSELUN}, // CMD RAID Controller
{"CNSI", "G7324", "*", BLIST_SPARSELUN}, // Chaparral G7324 RAID
- {"CNSi", "G8324", "*", BLIST_SPARSELUN}, // Chaparral G8324 RAID
{"Zzyzx", "RocketStor 500S", "*", BLIST_SPARSELUN},
{"Zzyzx", "RocketStor 2000", "*", BLIST_SPARSELUN},
{"SONY", "TSL", "*", BLIST_FORCELUN}, // DDS3 & DDS4 autoloaders
{"DELL", "PERCRAID", "*", BLIST_FORCELUN},
{"HP", "NetRAID-4M", "*", BLIST_FORCELUN},
- {"ADAPTEC", "AACRAID", "*", BLIST_FORCELUN},
- {"ADAPTEC", "Adaptec 5400S", "*", BLIST_FORCELUN},
/*
* Must be at end of list...
@@ -503,7 +500,6 @@ static int scan_scsis_single(unsigned int channel, unsigned int dev,
Scsi_Request * SRpnt;
int bflags, type = -1;
extern devfs_handle_t scsi_devfs_handle;
- int scsi_level;
SDpnt->host = shpnt;
SDpnt->id = dev;
@@ -676,7 +672,6 @@ static int scan_scsis_single(unsigned int channel, unsigned int dev,
(SDpnt->scsi_level == 1 &&
(scsi_result[3] & 0x0f) == 1))
SDpnt->scsi_level++;
- scsi_level = SDpnt->scsi_level;
/*
* Accommodate drivers that want to sleep when they should be in a polling
@@ -754,7 +749,6 @@ static int scan_scsis_single(unsigned int channel, unsigned int dev,
SDpnt->queue_depth = 1;
SDpnt->host = shpnt;
SDpnt->online = TRUE;
- SDpnt->scsi_level = scsi_level;
/*
* Register the queue for the device. All I/O requests will come
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 5b33fa7e6..b13f9394c 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -20,6 +20,14 @@
#ifndef __LINUX_BIO_H
#define __LINUX_BIO_H
+/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
+#if 0
+#include <asm/io.h>
+#endif
+#ifndef BIO_VMERGE_BOUNDARY
+#define BIO_VMERGE_BOUNDARY 0
+#endif
+
#define BIO_DEBUG
#ifdef BIO_DEBUG
@@ -139,12 +147,6 @@ struct bio {
* merge helpers etc
*/
-/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
-#include <asm/io.h>
-#ifndef BIO_VMERGE_BOUNDARY
-#define BIO_VMERGE_BOUNDARY 0
-#endif
-
#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
#define __BVEC_START(bio) bio_iovec_idx((bio), 0)
#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \