summaryrefslogtreecommitdiff
path: root/drivers/block/acsi.c
AgeCommit message (Collapse)Author
2007-07-10[PATCH] Remove acsi.cJens Axboe
Originally from Boaz Harrosh <bharrosh@panasas.com> It hasn't been working in 2.5 or 2.6 ever, since it's still buffer_head based. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-14[PATCH] remove many unneeded #includes of sched.hTim Schmielau
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer neededGreg Kroah-Hartman
And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-08[PATCH] Add block_device_operations.getgeo block device methodChristoph Hellwig
HDIO_GETGEO is implemented in most block drivers, and all of them have to duplicate the code to copy the structure to userspace, as well as getting the start sector. This patch moves that to common code [1] and adds a ->getgeo method to fill out the raw kernel hd_geometry structure. For many drivers this means ->ioctl can go away now. [1] the s390 block drivers are odd in this respect. xpram sets ->start to 4 always which seems more than odd, and the dasd driver shifts the start offset around, probably because of it's non-standard sector size. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@suse.de> Cc: <mike.miller@hp.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[SCSI] remove Scsi_Device typedefChristoph Hellwig
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-09[PATCH] timer initialization cleanup: DEFINE_TIMERIngo Molnar
Clean up timer initialization by introducing DEFINE_TIMER a'la DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been been in the -RT tree for some time. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-20[PATCH] Lock initializer cleanup: Block devicesThomas Gleixner
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2003-09-28[PATCH] Atari ACSI fixGeert Uytterhoeven
Atari ACSI: Add missing include and fix duplicate parameter type
2003-09-09[PATCH] Initialise devfs_name in various block driversAndrew Morton
From: Andrey Borzenkov <arvidjaar@mail.ru> Various block drivers are currently devfs-unaware. Andrey's patch attempts to give them reasonable representations in devfs. "The attached patch suggests some possible names for non-floppy devices based on reading driver source. I have to ask if these make sense. At least for cciss Mandrake devfsd patch expects different names but it seems to be mistake (it assumes single controller always) "For floppy it is not as simple. Floppy cannot use genhd and must create names manually; but I do not know what names are appropriate or expected. "For acsi the target/lun name may have problem of creating compat names (if any) by devfsd. "Please note that none of them created any devfs name under 2.4 as well. So it is not a regression ..."
2003-08-06[PATCH] Proper block queue reference countingJens Axboe
To be able to properly be able to keep references to block queues, we make blk_init_queue() return the queue that it initialized, and let it be independently allocated and then cleaned up on the last reference. I have grepped high and low, and there really shouldn't be any broken uses of blk_init_queue() in the kernel drivers left. The added bonus being blk_init_queue() error checking is explicit now, most of the drivers were broken in this regard (even IDE/SCSI). No drivers have embedded request queue structures. Drivers that don't use blk_init_queue() but blk_queue_make_request(), should allocate the queue with blk_alloc_queue(gfp_mask). I've converted all of them to do that, too. They can call blk_cleanup_queue() now too, using the define blk_put_queue() is probably cleaner though.
2003-07-16[PATCH] remove all #include <blk.h>'sAdrian Bunk
This causes blk.h to print a warning and removes all uses of blk.h. I've tested the compilation in 2.6.0-test1 with a .config that tries to compile as many drivers as possible.
2003-06-02[PATCH] ->minor_shift removalAlexander Viro
disk->minor_shift is not used anymore. Remove it.
2003-05-24[PATCH] M68k IRQ API updates [13/20]Geert Uytterhoeven
M68k block drivers: Update to the new irq API (from Roman Zippel and me) [13/20]
2003-04-06[PATCH] kill blk_queue_empty()Jens Axboe
This finally kills of blk_queue_empty(). This is similar to the patch I recently sent to fix the SCSI logic as well. A lot of drivers are doing this in our core, mainly because that is the way they always did it: start_queue: if (blk_queue_empty(q)) return; rq = elv_next_request(q); if (!rq) return; Patch simply removes the blk_queue_empty() check, and adds a check for !rq return from elv_next_request() if the driver didn't already do that. Additionally, the AS io scheduler can return NULL from elv_next_request() if it thinks this is best. This way we are also prepared for that to work well. Patch was done by Nick Piggin.
2003-03-08[PATCH] register_blkdev cleanupsAndrew Morton
Patch from Andries.Brouwer@cwi.nl The following patch does the following: - static const char *blkdevs[MAX_BLKDEV]; disappears - get_blkdev_list, (un)register_blkdev, __bdevname are moved from block_dev.c to genhd.c - the third "fops" parameter of register_blkdev was unused; now removed everywhere - zillions of places had printk("cannot get major") upon error return from register_blkdev; removed all of these and inserted a single printk in register_blkdev. Of course the reason for the patch is that one fixed size array is eliminated.
2002-12-27[PATCH] M68k block local_irq*() updatesGeert Uytterhoeven
Convert m68k block drivers to new local_irq*() framework: - Atari ACSI - Amiga floppy - Atari floppy - Macintosh IIfx/Quadra 900/Quadra 950 floppy
2002-12-04[PATCH] get rid of MAJOR_NRChristoph Hellwig
In <= 2.4 some of the mess in blk.h needed it defined, but that's long gone now.
2002-11-04[PATCH] timers: drivers/*Andrew Morton
Results of a quick pass through everything under drivers/. We're mostly OK in there. I will have missed some.
2002-10-28[PATCH] blk_dev[] is goneAlexander Viro
* remove blk_dev[] * removed BLK_DEFAULT_QUEUE * moved definition of CURRENT into drivers that used it * removed definition of QUEUE from headers
2002-10-17[PATCH] acsi.cAlexander Viro
* switched to private queue * set ->queue and ->private_data * switched to new methods * cleaned up * switched to use of ->bd_disk and ->rq_disk
2002-10-15[PATCH] bunch of ->open() killed.Alexander Viro
Quite a few drivers don't need ->open() anymore - all it did was checking that minor is good (== gendisk exists). That is handled by generic code now...
2002-10-15[PATCH] disk->minor_shift cleanupAlexander Viro
new field - disk->minors (1 << disk->minor_shift). Almost all uses of ->minor_shift had that form and thus had been replaced.
2002-10-15[PATCH] early allocation of ->partAlexander Viro
allocation of ->part[] moved to alloc_disk(); alloc_disk() got an argument (number of minors expected). Freeing is in put_disk().
2002-10-05[PATCH] acsi switched to alloc_disk()Alexander Viro
That's the last one. Now we can start doing refcounting...
2002-09-29[PATCH] ->major_name inlinedAlexander Viro
char *major_name replaced with char disk_name[16]; All uses of ->major_name replaced with those of ->disk_name and (obviously) simplified big way. Bunch of arrays, kmallocs, etc. is gone.
2002-09-21[PATCH] switch to add_disk()Alexander Viro
Almost all callers of add_gendisk() were immediately followed by register_disk(disk, mk_kdev(disk->major,disk->first_minor), 1<<disk->minor_shift, disk->fops, something); The only exception (DAC960.c) massaged to that form. New helper (add_disk(disk)) introduced and aforementioned sequence replaced with set_capacity(disk, something); add_disk(disk);
2002-09-07[PATCH] (25/25) more cleanups of struct gendisk.Alexander Viro
* we remove the paritition 0 from ->part[] and put the old contents of ->part[0] into gendisk itself; indexes are shifted, obviously. * ->part is allocated at add_gendisk() time and freed at del_gendisk() according to value of ->minor_shift; static arrays of hd_struct are gone from drivers, ditto for manual allocations a-la ide. As the matter of fact, none of the drivers know about struct hd_struct now.
2002-09-07[PATCH] (24/25) disk capacity helpersAlexander Viro
new helpers - get_capacity(gendisk)/set_capacity(gendisk, sectors). Drivers switched to these; that eliminates most of the accesses to disk->part[]... in the drivers (and makes code more readable, while we are at it). That had caught several bugs when minor had been used in place of minor>>minor_shift (acsi.c is especially nasty in that respect; I don't know if it had ever been used with multiple devices...)
2002-09-07[PATCH] (2/25) Removing ->nr_realAlexander Viro
Since ->nr_real is always 1 now, we can remove that field completely. Removed the last remnants of switch in disk_name() (it could be killed a long time ago, I just forgot to remove the last two cases when md and i2o got converted). Collapsed several instances of disk->part[minor - disk->first_minor] - in cases when we know that we deal with disk->part[0].
2002-08-14[PATCH] acsi per-disk gendisksAlexander Viro
2002-08-10[PATCH] partition table flush/read cleanupAlexander Viro
Big One. Flushing/rereading partition tables is taken from ->revalidate() for partitioned devices; now it's done in the caller (check_disk_change()). BLKRRPART handling also moved out of drivers - they are still allowed to override it (DAC960 and i2o are the only remaining ones), but common case is handled in fs/block_dev.c. Note: we are still only shifting stuff - bd_sem deadlocks in check_disk_change() are still there. However, now we have all relevant code outside of drivers and that will allow to fix the thing (see next patches).
2002-08-10[PATCH] make check_disk_change() use struct block_deviceAlexander Viro
check_disk_change() converted to passing struct block_device. Old variant is still needed for a couple of places; wrapper is provided (__check_disk_change(kdev)). do_open() logics with setting ->bd_op sanitized - now we do that before calling ->open().
2002-07-31[PATCH] Get rid of per-partition blk_size[]Alexander Viro
kills use of blk_size[] for partitioned devices, removes ->sizes from struct gendisk.
2002-07-30Removed devfs_register_blkdev and devfs_unregister_blkdev.Greg Kroah-Hartman
Use register_blkdev and unregister_blkdev as before, and everything will work just fine.
2002-07-23Merge m68k patchesLinus Torvalds
2002-07-23[PATCH] M68k update (part 13)Geert Uytterhoeven
- Atari joystick device number updates - Atari ACSI hard disk driver device updates - Atari floppy driver device updates - MVME147 serial driver dev_t update
2002-07-20[PATCH] blk_ioctl() not exported anymoreAlexander Viro
blk_ioctl() not exported anymore; calls moved from drivers to block_dev.c.
2002-07-20[PATCH] partition handling locking cleanupsAlexander Viro
Horrors with open/reread_partition exclusion are starting to get fixed. It's not the final variant, but at least we are getting the logics into one place; switch to final variant will happen once we get per-disk analog of gendisks. New fields - ->bd_part_sem and ->bd_part_count. The latter counts the amount of opened partitions. The former protects said count _and_ is held while we are rereading partition tables. Helpers - dev_part_lock()/dev_part_unlock() (currently taking kdev_t; that will change pretty soon). No more ->open() and ->release() for partitions, all that logics went to generic code. Lock hierachy is currently messy: ->bd_sem for partitions -> ->bd_part_sem -> ->bd_sem for entire disks Ugly, but that'll go away and to get the final variant of locking right now would take _really_ big patch - with a lot of steps glued together. The damn thing is large as it is...
2002-06-11[PATCH] (14/14) resyncAlexander Viro
end_request(int) turned to end_request(req, int); all old callers are converted to end_request(CURRENT, value). Now we can start killing CURRENT/QUEUE - end_request() was the last obstacle to that.
2002-06-11[PATCH] (13/14) resyncAlexander Viro
ditto for DEVICE_INTR/CLEAR_INTR. do_mfm/do_acsi/do_hd/... are explicitly declared in the drivers that use DEVICE_INTR stuff; DEVICE_INTR/CLEAR_INTR is gone from blk.h.
2002-06-11[PATCH] (11/14) resyncAlexander Viro
monstrous cascade of #ifdefs is gone from blk.h. This is the first step of cleanup - we move #define in question into the code that includes blk.h (i.e. DEVICE_NR, DEVICE_NAME and DEVICE_INTR are explicitly set by drivers).
2002-06-02[PATCH] 2.5.19 blk.h and more about the ugly kids.Martin Dalecki
- Remove DEVICE_INTR and associated code from floppy driver. - Savlage s390 xpram code from kernel version dependant compilation disease. - Eliminate SET_INTR code from the places where it was used. - Eliminate bogous support for multiple sbpcd controllers. The driver didn't even compile right now before we could think about further supporting it at all we have to get rid of this hack first. Don't call invalidate_buffers in the release method there. Why should it be necessary? - Resurrect sonycd535 compilation. - Let CURRENT request macro use the same primitive at the remaining QUEUE macro in blk.h, which is still not quite right, but first things first :-).
2002-05-28[PATCH] 2.5.18 QUEUE_EMPTY and the unpleasant friends.Martin Dalecki
- 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...
2002-04-30[PATCH] (4/6) blksize_size[] removalAlexander Viro
- put block size in bdev->bd_block_size, make do_open() and check_partition() to set it (see above), switch set_blocksize() and block_size() to use of ->bd_block_size. Remove manipulations with blksize_size[] from drivers, remove blksize_size[] itself.
2002-04-28[PATCH] get rid of some blk.h cruftDave Jones
Originally by Christoph Hellwig back in February. It recieved no objections when posted to l-k & Jens. o remove DEVICE_REQUEST definitions - never used in blk.h itself. o remove DEVICE_ON() - never used at all. o define LOCAL_END_REQUEST when we do not want end_request() instead of other hacks. o remove DEVICE_OFF() - only used in floppy driver, thus one now has a private end_request(). o use private end_request() functions for drivers not providing randomness. o remove TIMEOUT_VALUE - only ever used in hd.c
2002-03-04[PATCH] (2/3) more kdev_t removalsAlexander Viro
2002-02-25[PATCH] kdev_t search/replaces.Dave Jones
First batch of various kdev_t related changes that have accumulated on linux-kernel, and some that got sent directly to me after you dropped them. Some of these need additional fixes to make them work, Some of them even to make them compile, but this is one step forward.. I have bio-related fixes for some of these also, I'll push those seperately.
2002-02-17[PATCH] PATCH 2.5.5-pre1 dead arrays.Martin Dalecki
Just the usual removal of the dead global arrays and associated cruft. (Thistime not affecting lvm, which BTW. doesn't compile currently anyway ;-).