diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
commit | b2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch) | |
tree | 954a648692e7da983db1d2470953705f6a729264 /drivers/block | |
parent | c9c06167e7933d93a6e396174c68abf242294abb (diff) |
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/Makefile | 30 | ||||
-rw-r--r-- | drivers/block/acsi.c | 6 | ||||
-rw-r--r-- | drivers/block/ll_rw_blk.c | 19 | ||||
-rw-r--r-- | drivers/block/loop.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/Makefile | 3 |
5 files changed, 20 insertions, 40 deletions
diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 8ce7af56d..a98418e00 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -8,10 +8,6 @@ # In the future, some of these should be built conditionally. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) paride - O_TARGET := block.o export-objs := ll_rw_blk.o blkpg.o loop.o DAC960.o @@ -36,30 +32,6 @@ obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o obj-$(CONFIG_BLK_DEV_NBD) += nbd.o -ifeq ($(CONFIG_PARIDE),y) -SUB_DIRS += paride -MOD_IN_SUB_DIRS += paride -else - ifeq ($(CONFIG_PARIDE),m) - MOD_IN_SUB_DIRS += paride - endif -endif - - -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) +subdir-$(CONFIG_PARIDE) += paride include $(TOPDIR)/Rules.make diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c index 53261f815..fd3101f7f 100644 --- a/drivers/block/acsi.c +++ b/drivers/block/acsi.c @@ -404,7 +404,7 @@ extern int slm_init( void ); * 6), the timeout is based on the 'jiffies' variable to provide exact * timeouts for device probing etc. * If interrupts are disabled, the number of tries is based on the - * 'loops_per_sec' variable. A rough estimation is sufficient here... + * 'loops_per_jiffy' variable. A rough estimation is sufficient here... */ #define INT_LEVEL \ @@ -422,7 +422,7 @@ int acsi_wait_for_IRQ( unsigned timeout ) if (!(mfp.par_dt_reg & 0x20)) return( 1 ); } else { - long tries = loops_per_sec / HZ / 8 * timeout; + long tries = loops_per_jiffy / 8 * timeout; while( --tries >= 0 ) if (!(mfp.par_dt_reg & 0x20)) return( 1 ); } @@ -439,7 +439,7 @@ int acsi_wait_for_noIRQ( unsigned timeout ) if (mfp.par_dt_reg & 0x20) return( 1 ); } else { - long tries = loops_per_sec * timeout / HZ / 8; + long tries = loops_per_jiffy * timeout / 8; while( tries-- >= 0 ) if (mfp.par_dt_reg & 0x20) return( 1 ); } diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 20e363b8e..ef71dddc7 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -885,6 +885,8 @@ void generic_make_request (int rw, struct buffer_head * bh) { int major = MAJOR(bh->b_rdev); request_queue_t *q; + + if (!bh->b_end_io) BUG(); if (blk_size[major]) { unsigned long maxsector = (blk_size[major][MINOR(bh->b_rdev)] << 1) + 1; unsigned int sector, count; @@ -962,6 +964,15 @@ void submit_bh(int rw, struct buffer_head * bh) bh->b_rsector = bh->b_blocknr * (bh->b_size>>9); generic_make_request(rw, bh); + + switch (rw) { + case WRITE: + kstat.pgpgout++; + break; + default: + kstat.pgpgin++; + break; + } } /* @@ -1006,7 +1017,6 @@ static void end_buffer_io_sync(struct buffer_head *bh, int uptodate) void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) { - struct buffer_head *bh; unsigned int major; int correct_size; int i; @@ -1023,6 +1033,7 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) /* Verify requested block sizes. */ for (i = 0; i < nr; i++) { + struct buffer_head *bh; bh = bhs[i]; if (bh->b_size != correct_size) { printk(KERN_NOTICE "ll_rw_block: device %s: " @@ -1040,6 +1051,7 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) } for (i = 0; i < nr; i++) { + struct buffer_head *bh; bh = bhs[i]; /* Only one thread can actually submit the I/O. */ @@ -1055,7 +1067,6 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) /* Hmmph! Nothing to write */ goto end_io; __mark_buffer_clean(bh); - kstat.pgpgout++; break; case READA: @@ -1063,7 +1074,6 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) if (buffer_uptodate(bh)) /* Hmmph! Already have it */ goto end_io; - kstat.pgpgin++; break; default: BUG(); @@ -1077,8 +1087,9 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) return; sorry: + /* Make sure we don't get infinite dirty retries.. */ for (i = 0; i < nr; i++) - buffer_IO_error(bhs[i]); + mark_buffer_clean(bhs[i]); } #ifdef CONFIG_STRAM_SWAP diff --git a/drivers/block/loop.c b/drivers/block/loop.c index dc5ecd151..6ca603d8f 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -453,7 +453,7 @@ static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg) structure that the caller is using */ lo->lo_device = inode->i_dev; - lo->lo_flags = LO_FLAGS_DO_BMAP; + lo->lo_flags |= LO_FLAGS_DO_BMAP; error = -ENFILE; lo->lo_backing_file = get_empty_filp(); diff --git a/drivers/block/paride/Makefile b/drivers/block/paride/Makefile index 86dbc0a89..76248b4a9 100644 --- a/drivers/block/paride/Makefile +++ b/drivers/block/paride/Makefile @@ -28,7 +28,4 @@ obj-$(CONFIG_PARIDE_ON20) += on20.o obj-$(CONFIG_PARIDE_ON26) += on26.o obj-$(CONFIG_PARIDE_KTTI) += ktti.o -L_OBJS := $(obj-y) -M_OBJS := $(obj-m) - include $(TOPDIR)/Rules.make |