diff options
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r-- | drivers/block/floppy.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 088980ead..df3dcc2ec 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -1066,7 +1066,8 @@ static void setup_DMA(void) } #else fd_clear_dma_ff(FLOPPY_DMA); - fd_cacheflush(raw_cmd->kernel_data, raw_cmd->length); + dma_cache_wback_inv((unsigned long)raw_cmd->kernel_data, + raw_cmd->length); fd_set_dma_mode(FLOPPY_DMA, (raw_cmd->flags & FD_RAW_READ) ? DMA_MODE_READ : DMA_MODE_WRITE); @@ -1826,7 +1827,6 @@ static void floppy_shutdown(void) if (!initialising) show_floppy(); cancel_activity(); - sti(); floppy_enable_hlt(); fd_disable_dma(FLOPPY_DMA); @@ -2876,7 +2876,6 @@ static void do_fd_request(void) printk("warning: usage count=0, CURRENT=%p exiting\n", CURRENT); printk("sect=%ld cmd=%d\n", CURRENT->sector, CURRENT->cmd); return; } - sti(); if (fdc_busy){ /* fdc busy, this new request will be treated when the current one is done */ @@ -3208,7 +3207,7 @@ static inline int set_geometry(unsigned int cmd, struct floppy_struct *g, (g->stretch&~(FD_STRETCH|FD_SWAPSIDES)) != 0) return -EINVAL; if (type){ - if (!suser()) + if (!capable(CAP_SYS_ADMIN)) return -EPERM; LOCK_FDC(drive,1); for (cnt = 0; cnt < N_DRIVE; cnt++){ @@ -3373,7 +3372,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, return _COPYOUT(loc); } case BLKRASET: - if(!suser()) return -EACCES; + if(!capable(CAP_SYS_ADMIN)) return -EACCES; if(param > 0xff) return -EINVAL; read_ahead[MAJOR(inode->i_rdev)] = param; return 0; @@ -3381,7 +3380,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, return put_user(read_ahead[MAJOR(inode->i_rdev)], (long *) param); case BLKFLSBUF: - if(!suser()) return -EACCES; + if(!capable(CAP_SYS_ADMIN)) return -EACCES; fsync_dev(inode->i_rdev); invalidate_buffers(inode->i_rdev); return 0; |