X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fblock%2Ffloppy.c;h=639ed14bb08d5a10644ec7b58f591349509a29dc;hb=444ad82bc3eaa554be40d22dc248e58aeefd54d9;hp=c6416f841131ab5a5ba840d600fb26d26d2c85f6;hpb=06f748c4754de4fe2fc8d517acf29cb46a0b2d60;p=linux-2.6 diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index c6416f8411..639ed14bb0 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -768,7 +768,6 @@ static int disk_change(int drive) floppy_sizes[TOMINOR(drive)] = MAX_DISK_SIZE << 1; } - /*USETF(FD_DISK_NEWCHANGE); */ return 1; } else { UDRS->last_checked = jiffies; @@ -784,7 +783,10 @@ static inline int is_selected(int dor, int unit) static int set_dor(int fdc, char mask, char data) { - register unsigned char drive, unit, newdor, olddor; + unsigned char unit; + unsigned char drive; + unsigned char newdor; + unsigned char olddor; if (FDCS->address == -1) return -1; @@ -938,7 +940,7 @@ static void motor_off_callback(unsigned long nr) static void floppy_off(unsigned int drive) { unsigned long volatile delta; - register int fdc = FDC(drive); + int fdc = FDC(drive); if (!(FDCS->dor & (0x10 << UNIT(drive)))) return; @@ -1324,7 +1326,6 @@ static void fdc_specify(void) if (FDCS->need_configure && FDCS->version >= FDC_82072A) { fdc_configure(); FDCS->need_configure = 0; - /*DPRINT("FIFO enabled\n"); */ } switch (raw_cmd->rate & 0x03) { @@ -1919,8 +1920,6 @@ static void floppy_shutdown(unsigned long data) is_alive("floppy shutdown"); } -/*typedef void (*timeout_fn)(unsigned long);*/ - /* start motor, check media-changed condition and write protection */ static int start_motor(void (*function)(void)) { @@ -2571,19 +2570,6 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2) #endif } -#if 0 -static inline int check_dma_crossing(char *start, - unsigned long length, char *message) -{ - if (CROSS_64KB(start, length)) { - printk("DMA xfer crosses 64KB boundary in %s %p-%p\n", - message, start, start + length); - return 1; - } else - return 0; -} -#endif - /* work around a bug in pseudo DMA * (on some FDCs) pseudo DMA does not stop when the CPU stops * sending data. Hence we need a different way to signal the @@ -2781,9 +2767,7 @@ static int make_raw_rw_request(void) */ if (!direct || (indirect * 2 > direct * 3 && - *errors < DP->max_errors.read_track && - /*!TESTF(FD_NEED_TWADDLE) && */ - ((!probing + *errors < DP->max_errors.read_track && ((!probing || (DP->read_track & (1 << DRS->probed_format)))))) { max_size = current_req->nr_sectors; } else { @@ -2796,10 +2780,6 @@ static int make_raw_rw_request(void) indirect, direct, fsector_t); return 0; } -/* check_dma_crossing(raw_cmd->kernel_data, - raw_cmd->length, - "end of make_raw_request [1]");*/ - virtualdmabug_workaround(); return 2; } @@ -2849,8 +2829,6 @@ static int make_raw_rw_request(void) raw_cmd->length = ((raw_cmd->length - 1) | (ssize - 1)) + 1; raw_cmd->length <<= 9; #ifdef FLOPPY_SANITY_CHECK - /*check_dma_crossing(raw_cmd->kernel_data, raw_cmd->length, - "end of make_raw_request"); */ if ((raw_cmd->length < current_count_sectors << 9) || (raw_cmd->kernel_data != current_req->buffer && CT(COMMAND) == FD_WRITE &&