Linux-2.5.18
Subsystems (6)
Various bits here and there.
Linus
----
Summary of changes from v2.5.17 to v2.5.18
============================================
<[email protected]>
o usb-storage
<[email protected]>
o drivers/char/rio/*.c
<[email protected]>
o change USB scanner maintainer
Brian Gerst <[email protected]>
o cpu_has_tsc
o cpu_has_mmx
o remaining cpu_has cleanups
<[email protected]>
o [ARM 1146/1: Fix complilation bug in 2.5.10-rmk1 for jffs
<[email protected]>
o net/core/sock.c: Fix typo in sysctl_{w,m}mem_default init.
<[email protected]>
o [ARM 1136/1: missing include in badge4.c
o [ARM 1133/1: Small fixes for BadgePAD 4 pcmcia support.
o [ARM 1137/1: additional defines for SA-1111 OHCI
<[email protected]>
o Sparc: Do not BUG in srmmu_pte_alloc_one.
o include/asm-sparc/pgalloc.h: In pmd_alloc_one, dont BUG just return NULL
Martin Dalecki <[email protected]>
o 2.5.17 dquota punishment
o 2.5.17 IDE 65-70
<[email protected]>
o Sparc: Use dma_addr_t and size_t in sparc32 DMA function args.
o IPv4: Make pkt_too_big debug msg more informative.
o drivers/net/sunlance.c: Make init_block_dvma a dma_addr_t
o Tigon3: Fix typo in netgear ga320t support changes.
o Sparc64 updates
o Fix build fallout from namei.h/jiffies.h changes.
o Sparc64 build fixes:
<[email protected]>
o cpia_usb, remove urb->next
o usbcore, remove urb->next
o hcds, remove urb->next
o audio, set urb->interval
<[email protected]>
o rwsem update
<[email protected]>
o USB Makefile bug fix
o USB build changes
o USB se401, remove urb->next usage
o USB stv680, remove urb->next usage
o usb.h #include dependancies and whitespace cleanup
o USB cdc-ether driver compile time fix
o USB storage #include fixup
o USB driver #include cleanups
Christoph Hellwig <[email protected]>
o fix bitop warnings in parallel port generic driver
o buffermem_pages removal (1/5)
o fix sr compile warnings
o bfs header move around + warning fix
o split namei.h out of fs.h
o include buffer_head.h in actual users instead of fs.h (1/10)
<[email protected]>
o Update to srm_env.c driver (for Alpha arch.)
<[email protected]>
o kbuild: Make USE_STANDARD_AS_RULE default
o Fix UTS_MACHINE
o Fix building .i / .s files for testing
o kbuild: Stop immediately on error
o kbuild: aic7xxx firmware build should not overwrite shipped files
o kbuild: Regenerate include/linux/version.h only if necessary
o kbuild: Restore build nr, improve vmlinux link
o drivers/net: Simplify linking of subdirs
o Simplify linking/building objects in subdirectories
o drivers/pnp/pnpbios_core.c: Warning fix
o kbuild: Fix command line printing
o kbuild: Fix warning when .version doesn't exist yet
o kbuild: Rearrange Rules.make
o kbuild: Consistent use of [AC]FLAGS_KERNEL and MODFLAGS
o EXPORT_SYMBOL: Remove EXPORT_NO_SYMBOLS from arch/*
o EXPORT_SYMBOL: Remove EXPORT_NO_SYMBOLS from drivers/*
o EXPORT_SYMBOL: Remove the option of implicitly exporting symbols
o EXPORT_SYMBOL: Remove EXPORT_NO_SYMBOLS from fs/*
o EXPORT_SYMBOL: Remove EXPORT_NO_SYMBOLS from net/*
o EXPORT_SYMBOL: Remove EXPORT_NO_SYMBOLS from sound/*
o kbuild: Use standard multi-part object declaration in drivers/char/*
o ISDN: Fix compiler warnings
o kbuild: Use standard multi-part object declaration in drivers/video/*
o kbuild: Small cleanups
o ISDN: Use 'built-in.o' instead of 'vmlinux-obj.o' as O_TARGET
o ISDN: Move AVM Config.help entries to right dir
o kbuild: Assorted small cleanups
o Fix dummy gameport_{,un}register_port
o Compiler warning fixes
o kbuild: Clean up sound/*/Makefile
o Add missing includes
o kbuild: Remove now redundant 'O_TARGET := built-in.o' lines
o kbuild: Make O_TARGET default to 'built-in.o'
o kbuild: Beautify ACPI Makefiles
o kbuild: Remove usage of L_TARGET in drivers/*
o kbuild: Correct dependencies for generated soundmodem tables
o kbuild: Use standard multi-part object declaration in lib/*
o kbuild: Simplify linking subdirs in drivers/*/Makefile
o kbuild: Use standard multi-part object declaration in fs/*
o kbuild: Use standard multi-part object declaration in net/*
o kbuild: Fix some issues I missed before
<[email protected]>
o tcp_input.c: Really make sure rto = 3*rtt, found by Pasi Sarolahti
o tcp_recvmsg: Fix application bug induced races with MSG_PEEK and copied_seq.
<[email protected]>
o reiserfs 64 bit bug in get_virtual_node_size
<[email protected]>
o possible fix for broken floppy driver, take 2
<[email protected]>
o suspend-to-{RAM,disk} fixup
o suspend-to-{RAM,disk}
o more suspend-to-{RAM,disk} fixes
o One more fix for swsusp
o swsusp cleanups
o swsusp: making myself maintainer
o swsusp fixes
<[email protected]>
o USB pegasus driver, new vendor and device id.
<[email protected]>
o [ARM] 2.5.15 PCI cleanups/fixups
o [ARM] 2.5.15 random fixups:
o [ARM] Make etherh.c build again - combine struct ei_device inside our
o [ARM] Fix build errors caused by fb changes
o [ARM] Fixups for GCC 3.x:
o [ARM] Miscellaneous
o [ARM] Remove old NetWinder uncompressed kernel image compatibility code.
o [ARM] Acorn DMA/Expansion card fixups
o [ARM] Make Acorn SCSI drivers build again.
<[email protected]>
o remove preempt_disable from pdflush
o get/put_cpu methods
<[email protected]>
o Tasklet cleanup
o Futex update.
o DMA-mapping.txt typo fix
o printk() cleanup in ide-pnp.c
o drivers/net/epic100.c: missing __devinit
o drivers_net_sundance.c: missing __devinit
o declance.c
o Remove warning in fs/nfs/nfsroot.c
o Fix order of #includes in init_version.c
o check_region elimination
o serial typo
o MIPS min/max replacement
o MIPS min/max replacement II
o min/max elimination in netfilter.h
o cris signal fix
o sigio delivery fix
o check_region elimination
o MIPS/MIPS64 signal fix
o jiffies.h
o arch/arm/kernel/via82c505.c
o smp_call_function doco fix
o check_region elimination
o check_region elimination
<[email protected]>
o jfs_readdir does not need to grab BKL
o JFS external journal support
<[email protected]>
o Tigon3: Add Netgear GA320T support.
<[email protected]>
o Make the pte unmapping atomic wrt other threads.
o Fix over-eager header file cleanup
o Merge DRI CVS tree into standard kernel
o Fix up more headers to make the drm merge compile more cleanly
o Undo block devices changes from floppy fix: incorrect.
o Update kernel version
o Move check_pgt_cache() to tlb_finish_mmu().
o Make sw-suspend compile even without ACPI sleep support.
o Clean up tlb_start/end_vma.
o Fix up header file
Alexander Viro <[email protected]>
o add proper ->getattr()
o remove s390 procfs abuses
o kill ->i_op->revalidate()
o clean up readdir() for in-memory
o new helpers for /proc
o rd.c blocksize handling
o removal of BKL from d_move()
o md.c cleanup
o kdev_t -> bdev cleanups
<[email protected]>
o m68k mmu update
PATCH 1/1 2.5.18 IDE 71
Fri May 24 17:50:44 CEST 2002 ide-clean-71
- Rewritten Artop host chip driver by Vojtech Pavlik. His log entries are:
Cleanup whitespace.
Remove superfluous chip entries in chip table. Remove global variables to allow more than one controller. Remove other forgotten stuff.
This is a new driver for the Artop (Acard) controllers. It's completely untested, as I have never seen the hardware. However, I suspect it is much less broken than the previous one ...
UDMA33 controller cannot detect 80-wire cable.
- Separate ioctl handling out from ide.c. It's big enough.
- Move atapi_read and atapi_write to the new atapi module. Fix the declaration of those functions. The data buffer did have the void * type!
- Separate module handling code out from actual transfer handling code in to a new module called main.c. Slowly we are at the stage where the code indeed has to be organized logically and not just "sporadically" as was the case before.
- Apply patch by Adam Richter for the ide-scsi.c attach method implementation. This particular driver is still broken due to generic SCSI layer issues.
- Apply true modularization patch for qd65xx.c by Samuel Thibault. Here are his notes about it:
Then, patch-modularize-2.[45] is a proposal for modularizing qd65xx.o. As a single module, one can choose to insmod it before being able to do some hdparm -p /dev/hd[a-d]. But one can't remove it while tuned, since selectproc may be needed.
I am sorry I wasn't able to test it under 2.5 series, lacking a functionning kernel for my test computer, but it seemed to work perfectly under 2.4 series, and patches are almost the same.
- Move PCI device id's to where they belong. Patch by Vojtech Pavlik.
- Don't use BH_Lock in ide-tape.c - somehow this driver scares me sometimes.
Scary big patch this time...
Mon May 27 12:37:58 CEST 2002 ide-clean-72
- Replace ide_delay_50m with mdelay(50). There is absolutely no reason we should behave different behaviors whatever IDECS support is enabled or not.
- Kill last parameter of ide_register_hw(). It should return a pointer to the interface registered later.
- pdc202xx patches by Bartomiej onierkiewicz.
- ServerWorks chi pset support cleanup by Andrej Panin.
- Move temporarily ide_setup_ports to main.c unfold it in ide-pnp.c.
I'm trying again to make the patch chunks a bit more palatable...
drivers/ide/buddha.c +3 -3
@@ -202,9 +202,9 @@ xsurf_offsets,0 , (ide_ioreg_t)(buddha_board+xsurf_irqports[i]), xsurf_ack_intr, IRQ_AMIGA_PORTS); - } - - index =ide_register_hw (&hw,NULL ); + } + + index =ide_register_hw (&hw);if (index !=-1 ) {printk ("ide%d: " , index);switch (type) {
drivers/ide/falconide.c +1 -1
@@ -60,7 +60,7 @@ide_setup_ports (&hw, (ide_ioreg_t )ATA_HD_BASE , falconide_offsets,0 ,0 ,NULL ,IRQ_MFP_IDE ); - index =ide_register_hw (&hw,NULL ); + index =ide_register_hw (&hw);if (index !=-1 )printk ("ide%d: Falcon IDE interface\n" , index);
drivers/ide/gayle.c +1 -1
@@ -150,7 +150,7 @@ide_setup_ports (&hw, base, gayle_offsets, ctrlport, irqport, ack_intr,IRQ_AMIGA_PORTS ); - index =ide_register_hw (&hw,NULL ); + index =ide_register_hw (&hw);if (index !=-1 ) {switch (i) {case 0 :
drivers/ide/ide.c +7 -56
99 lines not on this page · raw message
drivers/ide/ide-cs.c +2 -1
@@ -233,7 +233,8 @@ide_init_hwif_ports (&hw, (ide_ioreg_t ) arg1, (ide_ioreg_t ) arg2,NULL ); hw.irq = irq; hw.chipset = ide_pci;/* this enables IRQ sharing w/ PCI irqs */ -return ide_register_hw (&hw,NULL ); + +return ide_register_hw (&hw); }void ide_config (dev_link_t *link)
drivers/ide/ide-features.c +6 -4
@@ -189,17 +189,19 @@SELECT_MASK (drive->channel, drive,1 );if (IDE_CONTROL_REG )OUT_BYTE (drive->ctl,IDE_CONTROL_REG ); -ide_delay_50ms (); +mdelay (50 );OUT_BYTE (WIN_IDENTIFY ,IDE_COMMAND_REG ); timeout = jiffies +WAIT_WORSTCASE ;do { -if (0 < (signed long )(jiffies - timeout)) { +if (time_after (jiffies, timeout)) {SELECT_MASK (drive->channel, drive,0 );return 0 ;/* drive timed-out */ } -ide_delay_50ms ();/* give drive a breather */ +mdelay (50 );/* give drive a breather */ }while (IN_BYTE (IDE_ALTSTATUS_REG ) &BUSY_STAT ); -ide_delay_50ms ();/* wait for IRQ and DRQ_STAT */ + +mdelay (50 );/* wait for IRQ and DRQ_STAT */ +if (!OK_STAT (GET_STAT (),DRQ_STAT ,BAD_R_STAT )) {SELECT_MASK (drive->channel, drive,0 );printk ("%s: CHECK for good STATUS\n" , drive->name);
drivers/ide/ide-pci.c +1 -1
@@ -351,7 +351,7 @@ base = port ?0x170 :0x1f0 ;if ((ch =lookup_channel (base, d->bootable, dev->name)) ==NULL ) -return -ENOMEM ;/* no room in ide_hwifs[] */ +return -ENOMEM ;/* no room */ if (ch->io_ports[IDE_DATA_OFFSET ] != base) {ide_init_hwif_ports (&ch->hw, base, (ctl |2 ),NULL );
drivers/ide/ide-pnp.c +15 -29
67 lines not on this page · raw message
drivers/ide/ide-probe.c +16 -25
113 lines not on this page · raw message
drivers/ide/ide-taskfile.c +9 -1
@@ -353,13 +353,20 @@OUT_BYTE ((args->taskfile.device_head &HIHI ) | drive->select.all,IDE_SELECT_REG );if (args->handler !=NULL ) { + +/* This is apparently supposed to reset the wait timeout for +* the interrupt to accur. +*/ +ide_set_handler (drive, args->handler,WAIT_CMD ,NULL );OUT_BYTE (args->taskfile.command,IDE_COMMAND_REG ); +/* * Warning check for race between handler and prehandler for * writing first block of data. however since we are well * inside the boundaries of the seek, we should be okay. */ +if (args->prehandler !=NULL )return args->prehandler (drive, rq); }else {
@@ -579,7 +586,8 @@return ide_started; } -/* Called by ioctl to feature out type of command being called */ +/* Called to figure out the type of command being called. +*/ void ide_cmd_type_parser (struct ata_taskfile *args) {struct hd_drive_task_hdr *taskfile = &args->taskfile;
drivers/ide/macide.c +3 -3
@@ -100,17 +100,17 @@case MAC_IDE_QUADRA :ide_setup_ports (&hw, (ide_ioreg_t )IDE_BASE , macide_offsets,0 ,0 , macide_ack_intr,IRQ_NUBUS_F ); - index =ide_register_hw (&hw,NULL ); + index =ide_register_hw (&hw);break ;case MAC_IDE_PB :ide_setup_ports (&hw, (ide_ioreg_t )IDE_BASE , macide_offsets,0 ,0 , macide_ack_intr,IRQ_NUBUS_C ); - index =ide_register_hw (&hw,NULL ); + index =ide_register_hw (&hw);break ;case MAC_IDE_BABOON :ide_setup_ports (&hw, (ide_ioreg_t )BABOON_BASE , macide_offsets,0 ,0 ,NULL ,IRQ_BABOON_1 ); - index =ide_register_hw (&hw,NULL ); + index =ide_register_hw (&hw);if (index ==-1 )break ;if (macintosh_config->ident ==MAC_MODEL_PB190 ) {
drivers/ide/main.c +42 -5
79 lines not on this page · raw message
drivers/ide/pdc202xx.c +141 -249
546 lines not on this page · raw message
drivers/ide/pdc4030.c +1 -1
@@ -342,7 +342,7 @@outb (0x14 ,IDE_SELECT_REG );outb (PROMISE_EXTENDED_COMMAND ,IDE_COMMAND_REG ); -ide_delay_50ms (); +mdelay (50 ); if (inb(IDE_ERROR_REG) == 'P' && inb(IDE_NSECTOR_REG) == 'T' &&
drivers/ide/q40ide.c +3 -3
@@ -82,10 +82,10 @@for (i =0 ; i <Q40IDE_NUM_HWIFS ; i++) {hw_regs_t hw; -ide_setup_ports (&hw,(ide_ioreg_t ) pcide_bases[i], (int *)pcide_offsets, - pcide_bases[i]+0x206 , +ide_setup_ports (&hw,(ide_ioreg_t ) pcide_bases[i], (int *)pcide_offsets, + pcide_bases[i] +0x206 ,0 ,NULL ,q40ide_default_irq (pcide_bases[i])); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); } }
drivers/ide/rapide.c +1 -1
@@ -41,7 +41,7 @@ hw.io_ports[IDE_CONTROL_OFFSET ] = port +0x206 ; hw.irq = ec->irq; -return ide_register_hw (&hw,NULL ); +return ide_register_hw (&hw); }int __init rapide_init (void )
drivers/ide/serverworks.c +15 -18
@@ -98,7 +98,7 @@#undef DISPLAY_SVWKS_TIMINGS#undef SVWKS_DEBUG_DRIVE_INFO -static u8 svwks_revision =0 ; +static u8 svwks_revision;#if defined(DISPLAY_SVWKS_TIMINGS ) && defined(CONFIG_PROC_FS )#include <linux/stat.h>
@@ -230,12 +230,13 @@ ((reg40&0x005D0000)==0x005D0000)?"0":"?"); return p-buffer; /* => must be less than 4k! */ } + +static byte svwks_proc; +#endif /* defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) */ #define SVWKS_CSB5_REVISION_NEW 0x92/* min PCI_REVISION_ID for UDMA5 (A2.0) */ -byte svwks_proc =0 ; -extern char *ide_xfer_verbose (byte xfer_rate);static struct pci_dev *isa_dev;
@@ -262,7 +263,6 @@static int svwks_tune_chipset (struct ata_device *drive,byte speed) { -static u8 udma_modes[] = {0x00 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05 };static u8 dma_modes[] = {0x77 ,0x21 ,0x20 };static u8 pio_modes[] = {0x5d ,0x47 ,0x34 ,0x22 ,0x20 };
@@ -271,26 +271,23 @@byte unit = (drive->select.b.unit &0x01 );byte csb5 = (dev->device ==PCI_DEVICE_ID_SERVERWORKS_CSB5IDE ) ?1 :0 ; -byte drive_pci =0x00 ; -byte drive_pci2 =0x00 ; -byte drive_pci3 = hwif->unit ?0x57 :0x56 ; - -byte ultra_enable =0x00 ; -byte ultra_timing =0x00 ; -byte dma_timing =0x00 ; -byte pio_timing =0x00 ; -unsigned short csb5_pio =0x00 ; +byte drive_pci, drive_pci2; +byte drive_pci3 = hwif->unit ?0x57 :0x56 ; + +byte ultra_enable, ultra_timing, dma_timing, pio_timing; +unsigned short csb5_pio;byte pio =ata_timing_mode (drive,XFER_PIO |XFER_EPIO ) -XFER_PIO_0 ;switch (drive->dn) { -case 0 : drive_pci =0x41 ; drive_pci2 =0x45 ;break ; -case 1 : drive_pci =0x40 ; drive_pci2 =0x44 ;break ; -case 2 : drive_pci =0x43 ; drive_pci2 =0x47 ;break ; -case 3 : drive_pci =0x42 ; drive_pci2 =0x46 ;break ; +case 0 : drive_pci =0x41 ;break ; +case 1 : drive_pci =0x40 ;break ; +case 2 : drive_pci =0x43 ;break ; +case 3 : drive_pci =0x42 ;break ;default :return -1 ; } + drive_pci2 = drive_pci +4 ;pci_read_config_byte (dev, drive_pci, &pio_timing);pci_read_config_byte (dev, drive_pci2, &dma_timing);
@@ -337,7 +334,7 @@ pio_timing |= pio_modes[pio]; csb5_pio |= (pio << (4 *drive->dn)); dma_timing |= dma_modes[2 ]; - ultra_timing |= ((udma_modes[speed -XFER_UDMA_0 ]) << (4 *unit)); + ultra_timing |= ((speed -XFER_UDMA_0 ) << (4 *unit)); ultra_enable |= (0x01 << drive->dn);#endif default :
drivers/macintosh/mediabay.c +1 -1
@@ -569,7 +569,7 @@pmu_suspend ();ide_init_hwif_ports (&hw, (ide_ioreg_t ) bay->cd_base, (ide_ioreg_t )0 ,NULL ); hw.irq = bay->cd_irq; - bay->cd_index =ide_register_hw (&hw,NULL ); + bay->cd_index =ide_register_hw (&hw);pmu_resume (); }if (bay->cd_index ==-1 ) {
include/asm-alpha/ide.h +1 -1
@@ -77,7 +77,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-arm/arch-anakin/ide.h +5 -5
@@ -29,9 +29,9 @@ hw->io_ports[i] = reg; reg += regincr; } - + hw->io_ports[IDE_CONTROL_OFFSET ] = (ide_ioreg_t ) ctrl_port; - +if (irq) *irq =0 ; }
@@ -46,10 +46,10 @@ {hw_regs_t hw; -ide_init_hwif_ports (&hw,IO_BASE +COMPACTFLASH , -IO_BASE +COMPACTFLASH +IDE_CONTROL_OFFSET ,NULL ); +ide_init_hwif_ports (&hw,IO_BASE +COMPACTFLASH , +IO_BASE +COMPACTFLASH +IDE_CONTROL_OFFSET ,NULL ); hw.irq =IRQ_COMPACTFLASH ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }
include/asm-arm/arch-arc/ide.h +1 -1
@@ -50,6 +50,6 @@ide_init_hwif_ports (&hw,0x1f0 ,0x3f6 ,NULL ); hw.irq =IRQ_HARDDISK ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); } }
include/asm-arm/arch-cl7500/ide.h +3 -3
@@ -43,8 +43,8 @@ide_init_default_hwifs (void) {hw_regs_t hw; - +ide_init_hwif_ports (&hw,ISASLOT_IO +0x1f0 ,ISASLOT_IO +0x3f6 ,NULL ); - hw.irq =IRQ_ISA_14 ; -ide_register_hw (&hw,NULL ); + hw.irq =IRQ_ISA_14 ; +ide_register_hw (&hw); }
include/asm-arm/arch-ebsa285/ide.h +1 -1
@@ -44,6 +44,6 @@ide_init_hwif_ports (&hw,0x1f0 ,0x3f6 ,NULL ); hw.irq =IRQ_HARDDISK ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw);#endif }
include/asm-arm/arch-rpc/ide.h +1 -1
@@ -44,5 +44,5 @@ide_init_hwif_ports (&hw,0x1f0 ,0x3f6 ,NULL ); hw.irq =IRQ_HARDDISK ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }
include/asm-arm/arch-sa1100/ide.h +5 -5
@@ -84,10 +84,10 @@doesn't match the silkscreen however. */ ide_init_hwif_ports (&hw,PCMCIA_IO_0_BASE +0x40 ,PCMCIA_IO_0_BASE +0x78 ,NULL ); hw.irq =EMPEG_IRQ_IDE2 ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw);ide_init_hwif_ports (&hw,PCMCIA_IO_0_BASE +0x00 ,PCMCIA_IO_0_BASE +0x38 ,NULL ); hw.irq = ,EMPEG_IRQ_IDE1; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw);#endif }
@@ -104,7 +104,7 @@ide_init_hwif_ports (&hw,PCMCIA_IO_0_BASE +0x1f0 ,PCMCIA_IO_0_BASE +0x3f6 ,NULL ); hw.irq =IRQ_GPIO7 ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw);#endif }else if (machine_is_lart ()) {
@@ -114,14 +114,14 @@/* Enable GPIO as interrupt line */ GPDR &= ~LART_GPIO_IDE ;set_irq_type (LART_IRQ_IDE ,IRQT_RISING ); - +/* set PCMCIA interface timing */ MECR =0x00060006 ;/* init the interface */ ide_init_hwif_ports (&hw,PCMCIA_IO_0_BASE +0x0000 ,PCMCIA_IO_0_BASE +0x1000 ,NULL ); hw.irq =LART_IRQ_IDE ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw);#endif } }
include/asm-arm/arch-shark/ide.h +1 -1
@@ -42,6 +42,6 @@ide_init_hwif_ports (&hw,0x1f0 ,0x3f6 ,NULL ); hw.irq =14 ; -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }
include/asm-cris/ide.h +1 -1
@@ -84,7 +84,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); } }
include/asm-i386/ide.h +4 -11
@@ -41,16 +41,9 @@static __inline__ide_ioreg_t ide_default_io_base (int index) { -switch (index) { -case 0 :return 0x1f0 ; -case 1 :return 0x170 ; -case 2 :return 0x1e8 ; -case 3 :return 0x168 ; -case 4 :return 0x1e0 ; -case 5 :return 0x160 ; -default : -return 0 ; - } +static unsigned long ata_io_base[MAX_HWIFS ] = {0x1f0 ,0x170 ,0x1e8 ,0x168 ,0x1e0 ,0x160 }; + +return ata_io_base[index]; }static __inline__void ide_init_hwif_ports (hw_regs_t *hw,ide_ioreg_t data_port,ide_ioreg_t ctrl_port,int *irq)
@@ -81,7 +74,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-ia64/ide.h +1 -1
@@ -87,7 +87,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-mips/ide.h +1 -1
@@ -60,7 +60,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-mips64/ide.h +1 -1
@@ -63,7 +63,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-parisc/ide.h +1 -1
@@ -76,7 +76,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-ppc/ide.h +1 -1
@@ -100,7 +100,7 @@continue ;ide_init_hwif_ports (&hw, base,0 ,NULL ); hw.irq =ide_default_irq (base); - ide_register_hw(&hw, NULL); + ide_register_hw(&hw); }#endif }
include/asm-sh/ide.h +1 -1
@@ -102,7 +102,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-sparc/ide.h +1 -1
@@ -68,7 +68,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-sparc64/ide.h +1 -1
@@ -64,7 +64,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/asm-x86_64/ide.h +4 -11
@@ -41,16 +41,9 @@static __inline__ide_ioreg_t ide_default_io_base (int index) { -switch (index) { -case 0 :return 0x1f0 ; -case 1 :return 0x170 ; -case 2 :return 0x1e8 ; -case 3 :return 0x168 ; -case 4 :return 0x1e0 ; -case 5 :return 0x160 ; -default : -return 0 ; - } +static unsigned long ata_io_base[MAX_HWIFS ] = {0x1f0 ,0x170 ,0x1e8 ,0x168 ,0x1e0 ,0x160 }; + +return ata_io_base[index]; }static __inline__void ide_init_hwif_ports (hw_regs_t *hw,ide_ioreg_t data_port,ide_ioreg_t ctrl_port,int *irq)
@@ -81,7 +74,7 @@for (index =0 ; index <MAX_HWIFS ; index++) {ide_init_hwif_ports (&hw,ide_default_io_base (index),0 ,NULL ); hw.irq =ide_default_irq (ide_default_io_base (index)); -ide_register_hw (&hw,NULL ); +ide_register_hw (&hw); }#endif }
include/linux/ide.h +14 -14
@@ -71,18 +71,20 @@/* * Definitions for accessing IDE controller registers */ -#define IDE_NR_PORTS (10) -#define IDE_DATA_OFFSET (0) -#define IDE_ERROR_OFFSET (1) -#define IDE_NSECTOR_OFFSET (2) -#define IDE_SECTOR_OFFSET (3) -#define IDE_LCYL_OFFSET (4) -#define IDE_HCYL_OFFSET (5) -#define IDE_SELECT_OFFSET (6) -#define IDE_STATUS_OFFSET (7) -#define IDE_CONTROL_OFFSET (8) -#define IDE_IRQ_OFFSET (9) +enum { +IDE_DATA_OFFSET =0 , +IDE_ERROR_OFFSET =1 , +IDE_NSECTOR_OFFSET =2 , +IDE_SECTOR_OFFSET =3 , +IDE_LCYL_OFFSET =4 , +IDE_HCYL_OFFSET =5 , +IDE_SELECT_OFFSET =6 , +IDE_STATUS_OFFSET =7 , +IDE_CONTROL_OFFSET =8 , +IDE_IRQ_OFFSET =9 , +IDE_NR_PORTS =10 +};#define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET#define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET
@@ -549,7 +551,7 @@/* * Register new hardware with ide */ -extern int ide_register_hw (hw_regs_t *hw,struct ata_channel **hwifp); +extern int ide_register_hw (hw_regs_t *hw);extern void ide_unregister (struct ata_channel *hwif);struct ata_taskfile ;
@@ -759,8 +761,6 @@extern int ide_raw_taskfile (struct ata_device *,struct ata_taskfile *);extern int ide_cmd_ioctl (struct ata_device *drive,unsigned long arg); -void ide_delay_50ms (void ); -extern void ide_fix_driveid (struct hd_driveid *id);extern int ide_driveid_update (struct ata_device *);extern int ide_config_drive_speed (struct ata_device *,byte );
PATCH 1/1 airo
In reply to Linus TorvaldsSince apparently no body else did care thus far, and since I'm using this driver, well here it comes:
- Adjust the airo wireless LAN card driver for the fact that modules don't export symbols by default any longer.
- Make some stuff which obivously should be static there static as well. (Plenty of code in Linux actually deserves a review for this far too common bug...)
drivers/net/wireless/airo.c +8 -2
@@ -1146,6 +1146,8 @@kfree ( dev ); } +EXPORT_SYMBOL (stop_airo_card); +static int add_airo_dev (struct net_device *dev );struct net_device *init_airo_card (unsigned short irq,int port,int is_pcmcia )
@@ -1239,7 +1241,9 @@return NULL ; } -int waitbusy (struct airo_info *ai) { +EXPORT_SYMBOL (init_airo_card); + +static int waitbusy (struct airo_info *ai) {int delay =0 ;while ((IN4500 (ai,COMMAND ) &COMMAND_BUSY ) & (delay <10000 )) {udelay (10 );
@@ -1283,7 +1287,9 @@return 0 ; } -int wll_header_parse (struct sk_buff *skb,unsigned char *haddr) +EXPORT_SYMBOL (reset_airo_card); + +static int wll_header_parse (struct sk_buff *skb,unsigned char *haddr) {memcpy (haddr, skb->mac.raw +10 ,ETH_ALEN );return ETH_ALEN ;
PATCH 1/1 2.5.18 QUEUE_EMPTY and the unpleasant friends.
In reply to Linus TorvaldsTue May 28 17:25:29 CEST 2002
- Eliminate all usages of the obscure QUEUE_EMPTY macro.
- Eliminate all unneccessary checks for RQ_INACTIVE, this can't happen during the time we run the request strategy routine of a single major number block device. Perhaps the still remaining usage in scsi and i2o_block.c should be killed as well, since the upper ll_rw_blk layer shouldn't pass inactive requests down.
Those are all places where we have deeply burried and hidden major number indexed arrays. Let's deal with them slowly...
drivers/acorn/block/fd1772.c +11 -24
@@ -591,7 +591,7 @@ {printk ("FDC1772: fd_error\n" );/*panic("fd1772: fd_error"); *//* DAG tmp */ -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE ))return ;CURRENT ->errors++;if (CURRENT ->errors >=MAX_ERRORS ) {
@@ -1114,16 +1114,6 @@static int fd_ref[4 ];static int fd_device[4 ]; -/* -* Current device number. Taken either from the block header or from the -* format request descriptor. -*/ -#define CURRENT_DEVICE (CURRENT->rq_dev) - -/* Current error count. */ -#define CURRENT_ERRORS (CURRENT->errors) - -/* dummy for blk.h */ static void floppy_off (unsigned int nr) {
@@ -1145,7 +1135,7 @@ {unsigned int drive = (dev &0x03 ); -if (MAJOR (dev) !=MAJOR_NR ) { +if (major (dev) !=MAJOR_NR ) {printk ("floppy_changed: not a floppy\n" );return 0 ; }
@@ -1205,7 +1195,7 @@ ReqData = ReqBuffer +512 * ReqCnt;#ifdef TRACKBUFFER - read_track = (ReqCmd ==READ &&CURRENT_ERRORS ==0 ); + read_track = (ReqCmd ==READ &&CURRENT ->errors ==0 );#endif DPRINT(("Request params: Si=%d Tr=%d Se=%d Data=%08lx\n", ReqSide,
@@ -1220,24 +1210,21 @@DPRINT (("redo_fd_request: CURRENT=%08lx CURRENT->rq_dev=%04x CURRENT->sector=%ld\n" , (unsigned long )CURRENT ,CURRENT ?CURRENT ->rq_dev :0 , - !QUEUE_EMPTY ?CURRENT ->sector :0 )); - -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ) - goto the_end; + !blk_queue_empty (QUEUE ) ?CURRENT ->sector :0 )); repeat: -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE )) goto the_end; -if (MAJOR (CURRENT ->rq_dev) !=MAJOR_NR ) +if (major (CURRENT ->rq_dev) !=MAJOR_NR )panic (DEVICE_NAME ": request list destroyed" );if (CURRENT ->bh) {if (!buffer_locked (CURRENT ->bh))panic (DEVICE_NAME ": block not locked" ); } - device =MINOR (CURRENT_DEVICE ); + device =minor (CURRENT ->rq_dev); drive = device &3 ; type = device >>2 ; floppy = &unit[drive];
@@ -1343,7 +1330,7 @@int drive, device; device = inode->i_rdev; - drive =MINOR (device); + drive =minor (device);switch (cmd) {case FDFMTBEG :return 0 ;
@@ -1502,8 +1489,8 @@DPRINT (("Weird, open called with filp=0\n" ));return -EIO ; } - drive =MINOR (inode->i_rdev) &3 ; -if ((MINOR (inode->i_rdev) >>2 ) >NUM_DISK_TYPES ) + drive =minor (inode->i_rdev) &3 ; +if ((minor (inode->i_rdev) >>2 ) >NUM_DISK_TYPES )return -ENXIO ; old_dev = fd_device[drive];
@@ -1543,7 +1530,7 @@static int floppy_release (struct inode *inode,struct file *filp) { -int drive =MINOR (inode->i_rdev) &3 ; +int drive =minor (inode->i_rdev) &3 ;if (fd_ref[drive] <0 ) fd_ref[drive] =0 ;
drivers/acorn/block/mfmhd.c +1 -1
@@ -756,7 +756,7 @@/* No - its the end of the line */ /* end_request's should have happened at the end of sector DMAs */ /* Turns Drive LEDs off - may slow it down? */ -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE ))issue_command (CMD_CKV , block,2 ); Busy =0 ;
drivers/block/acsi.c +6 -25
@@ -768,7 +768,7 @@static void bad_rw_intr (void ) { -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE ))return ;if (++CURRENT ->errors >=MAX_ERRORS )
@@ -842,7 +842,8 @@DEVICE_INTR =NULL ;printk (KERN_ERR "ACSI timeout\n" ); -if (QUEUE_EMPTY )return ; +if (blk_queue_empty (QUEUE )) +return ;if (++CURRENT ->errors >=MAX_ERRORS ) {#ifdef DEBUG printk (KERN_ERR "ACSI: too many errors.\n" );
@@ -951,40 +952,20 @@char *buffer;unsigned long pbuffer;struct buffer_head *bh; - -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ) { -if (!DEVICE_INTR ) { -ENABLE_IRQ (); -stdma_release (); - } -return ; - } - -if (DEVICE_INTR ) -return ; repeat:CLEAR_TIMER (); -/* Another check here: An interrupt or timer event could have -* happened since the last check! -*/ -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ) { -if (!DEVICE_INTR ) { -ENABLE_IRQ (); -stdma_release (); - } -return ; - } +if (DEVICE_INTR )return ; -if (QUEUE_EMPTY ) { +if (blk_queue_empty (QUEUE )) {CLEAR_INTR ;ENABLE_IRQ ();stdma_release ();return ; } - +if (MAJOR (CURRENT ->rq_dev) !=MAJOR_NR )panic (DEVICE_NAME ": request list destroyed" );if (CURRENT ->bh) {
drivers/block/amiflop.c +2 -17
@@ -209,17 +209,6 @@static kdev_t fd_device[4 ] = {NODEV ,NODEV ,NODEV ,NODEV };/* -* Current device number. Taken either from the block header or from the -* format request descriptor. -*/ -#define CURRENT_DEVICE (CURRENT->rq_dev) - -/* Current error count. */ -#define CURRENT_ERRORS (CURRENT->errors) - - - -/* * Here come the actual hardware access and helper functions. * They are not reentrant and single threaded because all drives * share the same hardware and the same trackbuffer.
@@ -1383,12 +1372,8 @@char *data;unsigned long flags; -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ){ -return ; - } - repeat: -if (QUEUE_EMPTY ) { +if (blk_queue_empty (QUEUE )) {/* Nothing left to do */ return ; }
@@ -1396,7 +1381,7 @@if (major (CURRENT ->rq_dev) !=MAJOR_NR )panic (DEVICE_NAME ": request list destroyed" ); - device =minor (CURRENT_DEVICE ); + device =minor (CURRENT ->rq_dev);if (device <8 ) {/* manual selection */ drive = device &3 ;
drivers/block/ataflop.c +10 -22
@@ -625,8 +625,10 @@wake_up ( &format_wait );return ; } - -if (QUEUE_EMPTY )return ; + +if (blk_queue_empty (QUEUE )) +return ; +CURRENT ->errors++;if (CURRENT ->errors >=MAX_ERRORS ) {printk (KERN_ERR "fd%d: too many errors.\n" , SelectedDrive );
@@ -1335,16 +1337,6 @@static int fd_ref[4 ] = {0 ,0 ,0 ,0 };static int fd_device[4 ] = {0 ,0 ,0 ,0 }; -/* -* Current device number. Taken either from the block header or from the -* format request descriptor. -*/ -#define CURRENT_DEVICE (CURRENT->rq_dev) - -/* Current error count. */ -#define CURRENT_ERRORS (CURRENT->errors) - -/* dummy for blk.h */ static void floppy_off (unsigned int nr) {}
@@ -1437,7 +1429,7 @@ ReqData = ReqBuffer +512 * ReqCnt;if (UseTrackbuffer) - read_track = (ReqCmd ==READ &&CURRENT_ERRORS ==0 ); + read_track = (ReqCmd ==READ &&CURRENT ->errors ==0 );else read_track =0 ;
@@ -1451,18 +1443,14 @@int device, drive, type;DPRINT (("redo_fd_request: CURRENT=%08lx CURRENT->dev=%04x CURRENT->sector=%ld\n" , - (unsigned long )CURRENT , !QUEUE_EMPTY ?CURRENT ->rq_dev :0 , - !QUEUE_EMPTY ?CURRENT ->sector :0 )); + (unsigned long )CURRENT , !blk_queue_empty (QUEUE ) ?CURRENT ->rq_dev :0 , + !blk_queue_empty (QUEUE ) ?CURRENT ->sector :0 )); IsFormatting =0 ; -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ){ -return ; - } - repeat: - -if (QUEUE_EMPTY ) + +if (blk_queue_empty (QUEUE )) goto the_end;if (major (CURRENT ->rq_dev) !=MAJOR_NR )
@@ -1471,7 +1459,7 @@if (CURRENT ->bh && !buffer_locked (CURRENT ->bh))panic (DEVICE_NAME ": block not locked" ); - device =minor (CURRENT_DEVICE ); + device =minor (CURRENT ->rq_dev); drive = device &3 ; type = device >>2 ;
drivers/block/floppy.c +2 -8
@@ -2918,14 +2918,8 @@if (current_drive <N_DRIVE )floppy_off (current_drive); -if (!QUEUE_EMPTY &&CURRENT ->rq_status ==RQ_INACTIVE ){ -CLEAR_INTR ; -unlock_fdc (); -return ; - } - -while (1 ){ -if (QUEUE_EMPTY ) { +for (;;) { +if (blk_queue_empty (QUEUE )) {CLEAR_INTR ;unlock_fdc ();return ;
drivers/block/nbd.c +1 -1
@@ -323,7 +323,7 @@int dev =0 ;struct nbd_device *lo; -while (!QUEUE_EMPTY ) { +while (!blk_queue_empty (QUEUE )) { req =CURRENT ;#ifdef PARANOIA if (!req)
drivers/block/paride/pd.c +1 -2
@@ -877,10 +877,9 @@/* paranoia */ -if (QUEUE_EMPTY || +if (blk_queue_empty (QUEUE ) || (rq_data_dir (CURRENT ) != pd_cmd) || (minor (CURRENT ->rq_dev) != pd_dev) || - (CURRENT ->rq_status ==RQ_INACTIVE ) || (CURRENT ->sector != pd_block))printk ("%s: OUCH: request list changed unexpectedly\n" ,PD .name);
drivers/block/paride/pf.c +1 -2
@@ -881,10 +881,9 @@/* paranoia */ -if (QUEUE_EMPTY || +if (blk_queue_empty (QUEUE ) || (rq_data_dir (CURRENT ) != pf_cmd) || (DEVICE_NR (CURRENT ->rq_dev) != pf_unit) || - (CURRENT ->rq_status ==RQ_INACTIVE ) || (CURRENT ->sector != pf_block))printk ("%s: OUCH: request list changed unexpectedly\n" ,PF .name);
drivers/block/ps2esdi.c +5 -5
@@ -466,7 +466,7 @@#if 0 printk ("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld, buffer: %p\n" ,DEVICE_NAME , -CURRENT_DEV ,minor (CURRENT ->rq_dev), +DEVICE_NR (CURRENT ->rq_dev),minor (CURRENT ->rq_dev),CURRENT ->cmd,CURRENT ->sector,CURRENT ->current_nr_sectors,CURRENT ->buffer);#endif
@@ -482,14 +482,14 @@printk ("%s: DMA above 16MB not supported\n" ,DEVICE_NAME );end_request (FAIL ); }/* check for above 16Mb dmas */ -else if ((CURRENT_DEV < ps2esdi_drives) && +else if ((DEVICE_NR (CURRENT ->rq_dev) < ps2esdi_drives) && (CURRENT ->sector +CURRENT ->current_nr_sectors <= ps2esdi[minor (CURRENT ->rq_dev)].nr_sects) &&CURRENT ->flags &REQ_CMD ) {#if 0 printk ("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld\n" ,DEVICE_NAME , -CURRENT_DEV ,minor (CURRENT ->rq_dev), +DEVICE_NR (CURRENT ->rq_dev),minor (CURRENT ->rq_dev),CURRENT ->cmd,CURRENT ->sector,CURRENT ->current_nr_sectors);#endif
@@ -499,10 +499,10 @@switch (rq_data_dir (CURRENT )) {case READ : -ps2esdi_readwrite (READ ,CURRENT_DEV , block, count); +ps2esdi_readwrite (READ ,DEVICE_NR (CURRENT ->rq_dev), block, count);break ;case WRITE : -ps2esdi_readwrite (WRITE ,CURRENT_DEV , block, count); +ps2esdi_readwrite (WRITE ,DEVICE_NR (CURRENT ->rq_dev), block, count);break ;default :printk ("%s: Unknown command\n" ,DEVICE_NAME );
drivers/block/swim3.c +1 -1
@@ -313,7 +313,7 @@wake_up (&fs->wait);return ; } -while (!QUEUE_EMPTY && fs->state == idle) { +while (!blk_queue_empty (QUEUE ) && fs->state == idle) {if (major (CURRENT ->rq_dev) !=MAJOR_NR )panic (DEVICE_NAME ": request list destroyed" );// if (CURRENT->bh && !buffer_locked(CURRENT->bh))
drivers/block/swim_iop.c +1 -1
@@ -552,7 +552,7 @@wake_up (&fs->wait);return ; } -while (!QUEUE_EMPTY && fs->state == idle) { +while (!blk_queue_empty (QUEUE ) && fs->state == idle) {if (MAJOR (CURRENT ->rq_dev) !=MAJOR_NR )panic (DEVICE_NAME ": request list destroyed" );if (CURRENT ->bh && !buffer_locked (CURRENT ->bh))
drivers/block/xd.c +3 -2
@@ -286,7 +286,7 @@return ; } -if (CURRENT_DEV < xd_drives +if (DEVICE_NR (CURRENT ->rq_dev) < xd_drives && (CURRENT ->flags &REQ_CMD ) &&CURRENT ->sector +CURRENT ->nr_sectors <= xd_struct[minor (CURRENT ->rq_dev)].nr_sects) {
@@ -297,7 +297,8 @@case READ :case WRITE :for (retry =0 ; (retry <XD_RETRIES ) && !code; retry++) - code =xd_readwrite (rq_data_dir (CURRENT ),CURRENT_DEV ,CURRENT ->buffer,block,count); + code =xd_readwrite (rq_data_dir (CURRENT ),DEVICE_NR (CURRENT ->rq_dev), +CURRENT ->buffer,block,count);break ;default :printk ("do_xd_request: unknown request\n" );
drivers/cdrom/aztcd.c +46 -44
168 lines not on this page · raw message
drivers/cdrom/cdu31a.c +0 -5
@@ -1563,11 +1563,6 @@interruptible_sleep_on (&sony_wait);if (signal_pending (current)) {restore_flags (flags); -if (!QUEUE_EMPTY - &&CURRENT ->rq_status !=RQ_INACTIVE ) { -end_request (0 ); - } -restore_flags (flags);#if DEBUG printk ("Leaving do_cdu31a_request at %d\n" , __LINE__);
drivers/cdrom/gscd.c +1 -1
@@ -288,7 +288,7 @@ block =CURRENT ->sector; nsect =CURRENT ->nr_sectors; -if (QUEUE_EMPTY ||CURRENT ->sector ==-1 ) +if (CURRENT ->sector ==-1 ) goto out;if (CURRENT ->cmd !=READ ) {
drivers/cdrom/mcd.c +45 -40
163 lines not on this page · raw message
drivers/cdrom/optcd.c +21 -19
@@ -973,11 +973,13 @@/* Request handling */ - -#define CURRENT_VALID \ - (!QUEUE_EMPTY && major(CURRENT -> rq_dev) == MAJOR_NR \ - && CURRENT -> cmd == READ && CURRENT -> sector != -1) - +static int current_valid (void ) +{ +return !blk_queue_empty (QUEUE ) && +major (CURRENT ->rq_dev) ==MAJOR_NR && +CURRENT ->cmd ==READ && +CURRENT ->sector !=-1 ; +}/* Buffers for block size conversion. */ #define NOBUF -1
@@ -1006,7 +1008,7 @@printk (KERN_DEBUG "optcd: executing transfer\n" );#endif -if (!CURRENT_VALID ) +if (!current_valid ())return ;while (CURRENT -> nr_sectors) {int bn =CURRENT -> sector /4 ;
@@ -1092,7 +1094,7 @@ " Giving up\n", next_bn);if (transfer_is_active) loop_again =0 ; -if (CURRENT_VALID ) +if (current_valid ())end_request (0 ); tries =5 ; }
@@ -1126,7 +1128,7 @@break ;if (send_cmd (COMDRVST )) { state =S_IDLE ; -while (CURRENT_VALID ) +while (current_valid ())end_request (0 );return ; }
@@ -1153,11 +1155,11 @@ ?"door open" : "disk removed"); state =S_IDLE ; -while (CURRENT_VALID ) +while (current_valid ())end_request (0 );return ; } -if (!CURRENT_VALID ) { +if (!current_valid ()) { state =S_STOP ; loop_again =1 ;break ;
@@ -1208,7 +1210,7 @@ tries =0 ;break ; } -if (CURRENT_VALID ) +if (current_valid ())end_request (0 ); tries =5 ; }
@@ -1219,7 +1221,7 @@break ;default :/* DTEN low */ tries =5 ; -if (!CURRENT_VALID && buf_in == buf_out) { +if (!current_valid () && buf_in == buf_out) { state =S_STOP ; loop_again =1 ;break ;
@@ -1272,7 +1274,7 @@N_BUFS ?0 : buf_in +1 ; }if (!transfer_is_active) { -while (CURRENT_VALID ) { +while (current_valid ()) {transfer ();if (CURRENT -> nr_sectors ==0 )end_request (1 );
@@ -1281,7 +1283,7 @@ } } -if (CURRENT_VALID +if (current_valid () && (CURRENT -> sector /4 < next_bn ||CURRENT -> sector /4 > next_bn +N_BUFS )) {
@@ -1305,7 +1307,7 @@flush_data ();if (send_cmd (COMDRVST )) { state =S_IDLE ; -while (CURRENT_VALID ) +while (current_valid ())end_request (0 );return ; }
@@ -1320,7 +1322,7 @@ toc_uptodate =0 ;opt_invalidate_buffers (); } -if (CURRENT_VALID ) { +if (current_valid ()) {if (status >=0 ) { state =S_READ ; loop_again =1 ;
@@ -1346,7 +1348,7 @@ state =S_STOP ;if (exec_cmd (COMSTOP ) <0 ) { state =S_IDLE ; -while (CURRENT_VALID ) +while (current_valid ())end_request (0 );return ; }
@@ -1368,7 +1370,7 @@ } transfer_is_active =1 ; -while (CURRENT_VALID ) { +while (current_valid ()) {transfer ();/* First try to transfer block from buffers */ if (CURRENT -> nr_sectors ==0 ) {end_request (1 );
@@ -1377,7 +1379,7 @@if (state ==S_IDLE ) {/* %% Should this block the request queue?? */ if (update_toc () <0 ) { -while (CURRENT_VALID ) +while (current_valid ())end_request (0 );break ; }
drivers/cdrom/sbpcd.c +1 -1
@@ -4902,7 +4902,7 @@#ifdef DEBUG_GTL xnr=++xx_nr; -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE )) {printk ("do_sbpcd_request[%di](NULL), Pid:%d, Time:%li\n" , xnr, current->pid, jiffies);
drivers/cdrom/sjcd.c +17 -13
@@ -1074,16 +1074,20 @@* When Linux gets variable block sizes this will probably go away. */ -#define CURRENT_IS_VALID \ - ( !QUEUE_EMPTY && major( CURRENT->rq_dev ) == MAJOR_NR && \ - CURRENT->cmd == READ && CURRENT->sector != -1 ) +static int current_valid (void ) +{ +return !blk_queue_empty (QUEUE ) && +major (CURRENT ->rq_dev) ==MAJOR_NR && +CURRENT ->cmd ==READ && +CURRENT ->sector !=-1 ; +}static void sjcd_transfer (void ) {#if defined(SJCD_TRACE )printk ("SJCD: transfer:\n" );#endif -if (CURRENT_IS_VALID ) { +if (current_valid ()) {while (CURRENT ->nr_sectors) {int i, bn =CURRENT ->sector /4 ; for (i = 0;
@@ -1239,7 +1243,7 @@ } } -if (CURRENT_IS_VALID ) { +if (current_valid ()) {struct sjcd_play_msf msf; sjcd_next_bn =CURRENT ->sector /4 ;
@@ -1307,7 +1311,7 @@ ("SJCD: read block %d failed, maybe audio disk? Giving up\n" , sjcd_next_bn);#endif -if (CURRENT_IS_VALID ) +if (current_valid ())end_request (0 );#if defined(SJCD_TRACE ) printk
@@ -1332,7 +1336,7 @@* Otherwise cdrom hangs up. Check to see if we have something to copy * to. */ -if (!CURRENT_IS_VALID +if (!current_valid () && sjcd_buf_in == sjcd_buf_out) {#if defined(SJCD_TRACE ) printk
@@ -1373,7 +1377,7 @@* OK, request seems to be precessed. Continue transferring... */ if (!sjcd_transfer_is_active) { -while (CURRENT_IS_VALID ) { +while (current_valid ()) {/* * Continue transferring. */
@@ -1387,7 +1391,7 @@break ; } } - if (CURRENT_IS_VALID && + if (current_valid() && (CURRENT->sector / 4 < sjcd_next_bn || CURRENT->sector / 4 >
@@ -1450,7 +1454,7 @@ sjcd_toc_uptodate =0 ;sjcd_invalidate_buffers (); } -if (CURRENT_IS_VALID ) { +if (current_valid ()) {if (sjcd_status_valid) sjcd_transfer_state =SJCD_S_READ ;
@@ -1476,7 +1480,7 @@if (--sjcd_transfer_timeout ==0 ) {printk ("SJCD: timeout in state %d\n" , sjcd_transfer_state); -while (CURRENT_IS_VALID ) +while (current_valid ())end_request (0 );sjcd_send_cmd (SCMD_STOP ); sjcd_transfer_state =SJCD_S_IDLE ;
@@ -1497,7 +1501,7 @@ CURRENT->sector, CURRENT->nr_sectors);#endif sjcd_transfer_is_active =1 ; -while (CURRENT_IS_VALID ) { +while (current_valid ()) {sjcd_transfer ();if (CURRENT ->nr_sectors ==0 )end_request (1 );
@@ -1508,7 +1512,7 @@if (sjcd_update_toc () <0 ) {printk ("SJCD: transfer: discard\n" ); -while (CURRENT_IS_VALID ) +while (current_valid ())end_request (0 );break ; }
drivers/ide/hd.c +7 -5
@@ -167,7 +167,7 @@unsigned long flags;char devc; - devc = !QUEUE_EMPTY ?'a' +DEVICE_NR (CURRENT ->rq_dev) :'?' ; + devc = !blk_queue_empty (QUEUE ) ?'a' +DEVICE_NR (CURRENT ->rq_dev) :'?' ;save_flags (flags);sti ();#ifdef VERBOSE_ERRORS
@@ -196,7 +196,7 @@if (hd_error & (BBD_ERR |ECC_ERR |ID_ERR |MARK_ERR )) {printk (", CHS=%d/%d/%d" , (inb (HD_HCYL )<<8 ) +inb (HD_LCYL ),inb (HD_CURRENT ) &0xf ,inb (HD_SECTOR )); -if (!QUEUE_EMPTY ) +if (!blk_queue_empty (QUEUE ))printk (", sector=%ld" ,CURRENT ->sector); }printk ("\n" );
@@ -373,7 +373,7 @@ {int dev; -if (QUEUE_EMPTY ) +if (blk_queue_empty (QUEUE ))return ; dev =DEVICE_NR (CURRENT ->rq_dev);if (++CURRENT ->errors >=MAX_ERRORS || (hd_error &BBD_ERR )) {
@@ -436,7 +436,7 @@#if (HD_DELAY >0 ) last_req =read_timer ();#endif -if (!QUEUE_EMPTY ) +if (!blk_queue_empty (QUEUE ))hd_request ();return ; }
@@ -497,8 +497,10 @@unsigned int dev;DEVICE_INTR =NULL ; -if (QUEUE_EMPTY ) + +if (blk_queue_empty (QUEUE ))return ; +disable_irq (HD_IRQ );sti (); reset =1 ;
drivers/mtd/mtdblock.c +1 -10
@@ -19,15 +19,6 @@#define DEVICE_NR (device) (device)#define LOCAL_END_REQUEST #include <linux/blk.h> -/* for old kernels... */ -#ifndef QUEUE_EMPTY -#define QUEUE_EMPTY (!CURRENT) -#endif -#if LINUX_VERSION_CODE <0x20300 -#define QUEUE_PLUGGED (blk_dev[MAJOR_NR].plug_tq.sync) -#else -#define QUEUE_PLUGGED (blk_queue_plugged(QUEUE)) -#endif #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h>
@@ -486,7 +477,7 @@add_wait_queue (&thr_wq, &wait);set_current_state (TASK_INTERRUPTIBLE );spin_lock_irq (QUEUE ->queue_lock); -if (QUEUE_EMPTY ||QUEUE_PLUGGED ) { +if (blk_queue_empty (QUEUE ) ||blk_queue_plugged (QUEUE )) {spin_unlock_irq (QUEUE ->queue_lock);schedule ();remove_wait_queue (&thr_wq, &wait);
drivers/mtd/mtdblock_ro.c +1 -1
@@ -132,7 +132,7 @@ mtd =__get_mtd_device (NULL ,minor (current_request->rq_dev));if (!mtd) { -printk ("MTD device %d doesn't appear to exist any more\n" ,CURRENT_DEV ); +printk ("MTD device %d doesn't appear to exist any more\n" ,DEVICE_NR (CURRENT ->rq_dev));mtdblock_end_request (current_request,0 ); }
include/linux/blk.h +3 -8
@@ -293,20 +293,15 @@#if !defined(IDE_DRIVER )#ifndef CURRENT -#define CURRENT elv_next_request(&blk_dev[MAJOR_NR].request_queue) +# define CURRENT elv_next_request(&blk_dev[MAJOR_NR].request_queue)#endif #ifndef QUEUE -#define QUEUE (&blk_dev[MAJOR_NR].request_queue) -#endif -#ifndef QUEUE_EMPTY -#define QUEUE_EMPTY blk_queue_empty(QUEUE) +# define QUEUE (&blk_dev[MAJOR_NR].request_queue)#endif #ifndef DEVICE_NAME -#define DEVICE_NAME "unknown" +# define DEVICE_NAME "unknown"#endif -#define CURRENT_DEV DEVICE_NR(CURRENT->rq_dev) -#ifdef DEVICE_INTR static void (*DEVICE_INTR )(void ) =NULL ;#endif
PATCH 1/1 2.5.18 IDE 73
In reply to Linus TorvaldsTue May 28 17:25:29 CEST 2002 ide-clean-73
- Merge ide-probe.c and ide-features.c in to one single file. They are mutually doing basically the same and in esp. in case of the device ID retrieval there *is* quite a lot of code duplication between them. ide-geometry.c fits there as well.
- Remove ide_xfer_verbose - it wasn't really used.
- Don't allow check_partition to be more clever then the writer of a driver. It was interfering with drivers which check partitions as they go and finally if we want to spew something about it - we can do it ourself.
- Eliminate ide_geninit(). We scan for partitions now inside the recently introduced attach method. register_disk() is broken by the way and 90% of places where it's used it is doing literally nothing. Either some one didn't finish some code or the code is basically just junk from the past.
Anyway we grok the partitions now one by one as we detect the channels.
- ide_driveid_update is gone. We don't report the drive id through /proc/ide and we don't have to update it any longer on the fly. Still someone out there complaining that it went away!?
- Use the global driver spin-lock to protect data structure access in the ide_register_subdriver() function instead of blatantly disabling all interrupts.
Re: [PATCH] 2.5.18 IDE 73
Hi Marcin,
Just a few comments, please don't mistake it for nitpicking, but
perhaps a request for clarification.
Quoted 3 lines · Martin Dalecki
- Don't allow
check_partitionto be more clever then the writer of a driver. It was interfering with drivers which check partitions as they go and finally if we want to spew something about it - we can do it ourself.
Should this really be the case? Isn't the driver the one that is interfering in this case?
Quoted 1 line
Anyway we grok the partitions now one by one as we detect the channels.
Same as above.
Thanks,
Zwane Mwaikambo
Signature · 1 line
http://function.linuxpower.ca
Re: [PATCH] 2.5.18 IDE 73
Quoted 3 lines · Zwane Mwaikambo
Hi Marcin,
Just a few comments, please don't mistake it for nitpicking, but
perhaps a request for clarification.
No problem at all.
Quoted 10 lines · Martin Dalecki
Quoted 5 lines
- Don't allow
check_partitionto be more clever then the writer of a driver. It was interfering with drivers which check partitions as they go and finally if we want to spew something about it - we can do it ourself.Should this really be the case? Isn't the driver the one that is interfering in this case?
No please have a close look at the boot sequence of the 2.5.18 kernel without the above patch applied. It will:
1. Spew the "Paritition checks" message ony once directly after the detection of the drive /dev/hda geometry and then never again.
2. It will check the partitions twice, without the above message.
After hot plugging some device the above message should be perhaps reintroduced, but right now it won't appear at all.
The ideal thing we should do would be:
Detect a channel, detect a disk on a channel, detect partitions on it.
Right now we where doing:
Look for disks, where there are disks, assume there is a channel too. Look for all disks goemetries.
Look for all disks partitions.
Wuite worng in the context of aproper support for hot plugging stuff.
So I'm *very* confident about the above change.
Quoted 4 lines
Quoted 1 line
Anyway we grok the partitions now one by one as we detect the channels.
Same as above.
What's your problem here - that's the proper thing to do.
PATCH 1/1 2.5.18 IDE 74
In reply to Linus TorvaldsWed May 29 04:35:14 CEST 2002 ide-clean-74
- Simplify the ide-pci code further.
drivers/ide/alim15x3.c +25 -10
@@ -685,20 +685,35 @@/* module data table */ -static struct ata_pci_device chipset__initdata = { - vendor:PCI_VENDOR_ID_AL , - device:PCI_DEVICE_ID_AL_M5229 , - init_chipset: ali15x3_init_chipset, - ata66_check: ali15x3_ata66_check, - init_channel: ali15x3_init_channel, - init_dma: ali15x3_init_dma, - enablebits: { {0x00 ,0x00 ,0x00 }, {0x00 ,0x00 ,0x00 } }, - bootable:ON_BOARD +static struct ata_pci_device chipsets[]__initdata = { + { + vendor:PCI_VENDOR_ID_AL , + device:PCI_DEVICE_ID_AL_M5219 , +/* FIXME: Perhaps we should use the same init routines +* as below here. */ + enablebits: { {0x00 ,0x00 ,0x00 }, {0x00 ,0x00 ,0x00 } }, + bootable:ON_BOARD , + flags:ATA_F_SIMPLEX + }, + { + vendor:PCI_VENDOR_ID_AL , + device:PCI_DEVICE_ID_AL_M5229 , + init_chipset: ali15x3_init_chipset, + ata66_check: ali15x3_ata66_check, + init_channel: ali15x3_init_channel, + init_dma: ali15x3_init_dma, + enablebits: { {0x00 ,0x00 ,0x00 }, {0x00 ,0x00 ,0x00 } }, + bootable:ON_BOARD + } };int __init init_ali15x3 (void ) { -ata_register_chipset (&chipset); +int i; + +for (i =0 ; i <ARRAY_SIZE (chipsets); ++i) { +ata_register_chipset (&chipsets[i]); + }return 0 ; }
drivers/ide/amd74xx.c +2 -1
@@ -443,7 +443,8 @@ init_channel: amd74xx_init_channel, init_dma: amd74xx_init_dma, enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, - bootable: ON_BOARD + bootable: ON_BOARD, + flags: ATA_F_SIMPLEX }, { vendor: PCI_VENDOR_ID_AMD,
drivers/ide/cmd64x.c +1 -0
@@ -1099,6 +1099,7 @@ init_chipset: cmd64x_init_chipset, init_channel: cmd64x_init_channel, bootable: ON_BOARD, + flags: ATA_F_SIMPLEX, }, { vendor: PCI_VENDOR_ID_CMD,
drivers/ide/cs5530.c +1 -1
@@ -374,7 +374,7 @@ init_chipset: pci_init_cs5530, init_channel: ide_init_cs5530, bootable: ON_BOARD, - flags: ATA_F_DMA + flags: ATA_F_DMA | ATA_F_FDMA };int __init init_cs5530 (void )
drivers/ide/ide-pci.c +118 -158
347 lines not on this page · raw message
drivers/ide/pcihost.h +10 -8
@@ -102,14 +102,16 @@/* Flags used to untangle quirk handling. */ -#define ATA_F_DMA 0x01 -#define ATA_F_NODMA 0x02/* no DMA mode supported at all */ -#define ATA_F_NOADMA 0x04/* DMA has to be enabled explicitely */ -#define ATA_F_FIXIRQ 0x08/* fixed irq wiring */ -#define ATA_F_SER 0x10/* serialize on first and second channel interrupts */ -#define ATA_F_IRQ 0x20/* trust IRQ information from config */ -#define ATA_F_PHACK 0x40/* apply PROMISE hacks */ -#define ATA_F_HPTHACK 0x80/* apply HPT366 hacks */ +#define ATA_F_DMA 0x001 +#define ATA_F_NODMA 0x002/* no DMA mode supported at all */ +#define ATA_F_NOADMA 0x004/* DMA has to be enabled explicitely */ +#define ATA_F_FDMA 0x008/* force autodma */ +#define ATA_F_FIXIRQ 0x010/* fixed irq wiring */ +#define ATA_F_SER 0x020/* serialize on first and second channel interrupts */ +#define ATA_F_IRQ 0x040/* trust IRQ information from config */ +#define ATA_F_PHACK 0x080/* apply PROMISE hacks */ +#define ATA_F_HPTHACK 0x100/* apply HPT366 hacks */ +#define ATA_F_SIMPLEX 0x200/* force treatment as simple device */ struct ata_pci_device {
drivers/ide/serverworks.c +2 -1
@@ -679,7 +679,8 @@ init_chipset: svwks_init_chipset, ata66_check: svwks_ata66_check, init_channel: ide_init_svwks, - bootable: ON_BOARD + bootable: ON_BOARD, + flags: ATA_F_SIMPLEX }, };
PATCH 1/1 2.5.18 IDE 75
In reply to Linus TorvaldsWed May 29 15:13:06 CEST 2002 ide-clean-75
- Comment out config_chipset_for_pio from hpt366 driver. It seems to hang on it and many people consistently reported that this may be necessary. Well apparently this host chip is forced to be in DMA read mode anyway and we where undoing this there.
- Apply small cosmetics to pdc202xx.c driver by Thierry Vignaud. His change log entries follow:
Quoted 14 lines
- factorize constants with
PDC_CLOCKandUDMA_SPEED_FLAGmacros and theinit_high_16()static inline functions, thus removing floating constants in code
- remove unused variables and pci space read- kill useless code in
pdc202xx_udma_irq_status()resulting in removing unused variable: the code does lots of tests to check what value to return but just always return the same exact value in all code paths!
this also saves a few cpu & pci bus cyles by removing a useless read in pci space
- simplify #if/#else resulting in code duplication
- makeinit_pdc202xxclearer
Quoted 5 lines
- remove duplicated initializations in
config_drive_xfer_rate()and simplify code paths
check in you mail inbox for the exact demonstrations (which didn't even alter resulting binary since gcc seems to optimize out most of this useless/obscuring stuff)
- Kill unused init_speed member from ata_device struct. Spotted by M.H.VanLeeuwen.
drivers/ide/aec62xx.c +0 -2
@@ -123,8 +123,6 @@else aec_set_speed_new (drive->channel->pci_dev, drive->dn, &t); -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return 0 ;
drivers/ide/alim15x3.c +0 -2
@@ -377,8 +377,6 @@ }#endif /* CONFIG_BLK_DEV_IDEDMA */ -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return ide_config_drive_speed (drive, speed);
drivers/ide/amd74xx.c +0 -2
@@ -251,8 +251,6 @@amd_set_speed (drive->channel->pci_dev, drive->dn, &t); -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return 0 ;
drivers/ide/cmd64x.c +0 -4
@@ -537,8 +537,6 @@ (void )pci_write_config_byte (dev, pciU, regU);#endif /* CONFIG_BLK_DEV_IDEDMA */ -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;#ifdef CONFIG_BLK_DEV_IDEDMA
@@ -657,8 +655,6 @@pci_write_config_word (dev, dma_pci, multi);pci_write_config_word (dev, udma_pci, ultra); -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return ide_config_drive_speed (drive, speed);
drivers/ide/hpt34x.c +0 -2
@@ -137,8 +137,6 @@ hi_speed, lo_speed, err);#endif -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return ide_config_drive_speed (drive, speed); }
drivers/ide/hpt366.c +1 -8
@@ -486,11 +486,10 @@static struct pci_dev *hpt_devs[HPT366_MAX_DEVS ];static int n_hpt_devs; -static u8 hpt366_proc =0 ; -static unsigned int hpt_min_rev (struct pci_dev *dev,int rev);#if defined(DISPLAY_HPT366_TIMINGS ) && defined(CONFIG_PROC_FS ) +static u8 hpt366_proc =0 ;static int hpt366_get_info (char *,char **,off_t ,int );extern int (*hpt366_display_info)(char *,char **,off_t ,int );/* ide-proc.c */
@@ -788,9 +787,6 @@if ((drive->type !=ATA_DISK ) && (speed <XFER_SW_DMA_0 ))return -1 ; -if (!drive->init_speed) - drive->init_speed = speed; -if (hpt_min_rev (dev,7 )) {hpt374_tune_chipset (drive, speed); }else if (hpt_min_rev (dev,5 )) {
@@ -864,9 +860,6 @@int map;byte mode; -/* FIXME: remove this --bkz */ -config_chipset_for_pio (drive); -if (drive->type !=ATA_DISK )return 0 ;
drivers/ide/icside.c +0 -3
@@ -362,9 +362,6 @@ drive->drive_data = cycle_time; -if (!drive->init_speed) - drive->init_speed = xfer_mode; -if (cycle_time &&ide_config_drive_speed (drive, xfer_mode) ==0 ) on =1 ;else
drivers/ide/ide-pmac.c +0 -6
@@ -1247,9 +1247,6 @@return 0 ; } -if (!drive->init_speed) - drive->init_speed = feature; -/* which drive is it ? */ if (drive->select.b.unit &0x01 ) timings = &pmac_ide[idx].timings[1 ];
@@ -1286,9 +1283,6 @@return 0 ; } -if (!drive->init_speed) - drive->init_speed = feature; -/* which drive is it ? */ if (drive->select.b.unit &0x01 ) timings = &pmac_ide[idx].timings[1 ];
drivers/ide/it8172.c +0 -2
@@ -187,8 +187,6 @@it8172_tune_drive (drive,it8172_dma_2_pio (speed)); -if (!drive->init_speed) - drive->init_speed = speed; err =ide_config_drive_speed (drive, speed); drive->current_speed = speed;return err;
drivers/ide/pdc202xx.c +37 -57
247 lines not on this page · raw message
drivers/ide/piix.c +0 -2
@@ -351,8 +351,6 @@piix_set_speed (drive->channel->pci_dev, drive->dn, &t, umul); -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return 0 ;
drivers/ide/serverworks.c +0 -2
@@ -357,8 +357,6 @@pci_write_config_byte (dev, drive_pci3, ultra_timing);pci_write_config_byte (dev,0x54 , ultra_enable);#endif -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return ide_config_drive_speed (drive, speed);
drivers/ide/via82cxxx.c +0 -2
@@ -332,8 +332,6 @@via_set_speed (drive->channel->pci_dev, drive->dn, &t); -if (!drive->init_speed) - drive->init_speed = speed; drive->current_speed = speed;return 0 ;
include/linux/ide.h +0 -1
@@ -393,7 +393,6 @@int crc_count;/* crc counter to reduce drive speed */ byte quirk_list;/* drive is considered quirky if set for a specific host */ byte suspend_reset;/* drive suspend mode flag, soft-reset recovers */ -byte init_speed;/* transfer rate set at boot */ byte current_speed;/* current transfer rate set */ byte dn;/* now wide spread use */ byte wcache;/* status of write cache */