summaryrefslogtreecommitdiff
path: root/drivers/block/cpqarray.c
AgeCommit message (Collapse)Author
2006-12-04cpqarray: fix iostatJens Axboe
cpqarray needs to call disk_stat_add() for iostat to work. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-08[PATCH] drivers/block: Use ARRAY_SIZE macroTobias Klauser
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a duplicate of ARRAY_SIZE. Some trailing whitespaces are also removed. drivers/block/acsi* has been left out as it's marked BROKEN. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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>
2006-01-06[BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()Tejun Heo
add @uptodate argument to end_that_request_last() and @error to rq_end_io_fn(). there's no generic way to pass error code to request completion function, making generic error handling of non-fs request difficult (rq->errors is driver-specific and each driver uses it differently). this patch adds @uptodate to end_that_request_last() and @error to rq_end_io_fn(). for fs requests, this doesn't really matter, so just using the same uptodate argument used in the last call to end_that_request_first() should suffice. imho, this can also help the generic command-carrying request jens is working on. Signed-off-by: tejun heo <htejun@gmail.com> Signed-Off-By: Jens Axboe <axboe@suse.de>
2005-03-13[PATCH] drivers/block/cpqarray.c: small cleanupsAdrian Bunk
This patch contains the following cleanups: - make cpqarray_pci_device_id static - merge cpqarray_init_step2 into cpqarray_init and make it static Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-07[PATCH] MODULE_PARM conversionsAndrew Morton
Rusty Russell <rusty@rustcorp.com.au> MODULE_PARM conversions for x86 `allyesconfig'. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-07[PATCH] cpqarray: Correct mailing list address in source codeJames Nelson
Correct mailing list address in cpqarray source code. Signed-off-by: James Nelson <james4765@gmail.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-18Merge kroah.com:/home/greg/linux/BK/bleed-2.6Greg Kroah-Hartman
into kroah.com:/home/greg/linux/BK/pci-2.6
2004-10-18[PATCH] janitor: cpqarray remove unused includeMaximilian Attems
remove unused #include <linux/version.h> Old ifdefs were removed that used it's definition. Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-06[PATCH] PCI: audit all callers of pci_register_driver() to work properly.Greg Kroah-Hartman
No, pci_register_driver() does not return the number of pci devices found, sorry. No, if pci_register_driver() fails, you do not need to call pci_unregister_driver(). Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-05[PATCH] cpqarray iomem annotationsAlexander Viro
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-06-03[PATCH] sparse: cpqarray annotationAlexander Viro
2004-05-31[PATCH] cpqarray.c: seed the random number poolAndrew Morton
From: George France <france@handhelds.org> Teach cpqarray.c to do the add_disk_randomness() thing. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-05-10[PATCH] cpqarray update for 2.6Andrew Morton
From: <mikem@beardog.cca.cpqcorp.net> This patch fixes 2 minor issues that break our Array Configuration utility. my_io was changed to a pointer so the & had to removed when using it with copy_to_user(). Sometime in 2.5 SG_MAX got changed to 31. Maybe to copy cciss? Now I'm changing it back to 32 so our app can work.
2004-03-30[PATCH] double semicolon cleanupAlexander Stohr
This cleans up a larger amount of superfluos ";;" statements in current Linux kernel sources by converting them to the regular single ";" statments. It seems to be a common problem that at the end of a line the semicolon key is producing an echo.
2004-03-16[PATCH] cpqarray: check pci_register_driver() return valueAndrew Morton
From: <mikem@beardog.cca.cpqcorp.net> * Examines rc of pci_register_driver and returns
2004-03-16[PATCH] cpqarray: use PCI APIsAndrew Morton
From: <mikem@beardog.cca.cpqcorp.net> - Change to use pci APIs (change from 2.4.18 to 2.4.19) This also includes eisa detection fix during initialization which was missing from 2.4.19 but fixed in 2.4.25
2004-03-16[PATCH] cpqarray: I/O address fixesAndrew Morton
From: <mikem@beardog.cca.cpqcorp.net> * cpqarray in kernel 2.6.1 seems to be based from 2.4.18 kernel with specific 2.6.x stuff added. * Defines io_mem_addr and io_mem_length to replace ioaddr (change from 2.4.18 to 2.4.19)
2004-03-16[PATCH] cpqarray: rmmod oops fixAndrew Morton
From: <mikem@beardog.cca.cpqcorp.net> * Fix for segmentation fault when calling rmmod
2004-03-16[PATCH] cpqarray: increment version numberAndrew Morton
From: <mikem@beardog.cca.cpqcorp.net> The following patch bumps the driver version to 2.6.0. Please apply in order.
2003-10-03[PATCH] janitor: cpqarray for !CONFIG_PROC_FSRandy Dunlap
From: Luiz Capitulino <lcapitulino@prefeitura.sp.gov.br> Fix cpqarray.c warnings: `proc_array' and `ida_proc_get_info' defined but not used ida_proc_get_info() is only called when CONFIG_PROC_FS=y.
2003-08-30[PATCH] dev_t handling cleanups (10/12)Alexander Viro
new helper - iminor(inode); defined as minor(inode->i_rdev); lots and lots of places in drivers had been switched to it.
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-10[PATCH] cpqarray.c: fix stack usageAndrew Morton
From: Jorn Engel <joern@wohnheim.fh-wedel.de> Reduce stack usage in the cpqarray ioctl byt several hundred bytes.
2003-05-24[PATCH] cpqarray fixesAlexander Viro
This restores the special-case behaviour of open() on the minor 0; cpqarray allows to open that guy for ioctls even if nothing is configured. That got broken when gendisk patches went in. Patch restores the old behaviour by keeping gendisk for the first disk on controller always registered; instead of unregistering it we set size to 0.
2003-04-20[PATCH] irqs: drivers/blockAndrew Morton
update drivers/block for new IRQ API.
2003-04-17[PATCH] devfs: cleanup partition handling interactionChristoph Hellwig
Always pass around the pathnames for the devfs entries / directories instead of the devfs_handle_ts. Cleanes up the code massivly.
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-23[PATCH] devfs_mk_dir simplificationChristoph Hellwig
All arguments except the name are unused - remove them and make the name printf-like to avoid a few snprintf in the surrounding code. (also fixes compilation to due a superflous endif in dvb core)
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.
2003-02-25[PATCH] replace its with it's where appropriate.Steven Cole
This patch replaces its (possessive of it) with it's (it is) in the following cases where "it is" is meant. its a -> it's a its an -> it's an its not -> it's not except for the files arch/cris/boot/rescue/head.S arch/cris/kernel/kgdb.c where the substitution is "its not" -> "it is not" to avoid possible problems with single quotes in assembly comments.
2003-02-05[PATCH] Spelling fixesSteven Cole
OK, here is the diff against 2.5.59-bk2, now up to 880 lines due to an additional misspelling which crept in the -bk2 snapshot. Fixes 'seperate' -> 'separate' and 'definate' -> 'definite'. Kernal codrs cna't spel.
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-12-03[PATCH] cpqarray cleanupAlexander Viro
switched to explicit devfs_remove()
2002-11-17[PATCH] devfs_remove() helperAlexander Viro
All callers of devfs_find_and_unregister() pass 0 in 6th argument. All uses of that function either pass 0 in 3rd and 4th argument (in which case the 5th is ignored) or pass the existing pathname in the 2nd (in which case 3rd, 4th and 5th are ignored). In all cases the first argument can be trivially made NULL. devfs_find_and_unregister() is left as-is. All existing callers converted to new helper - devfs_remove(pathname). Said beast does equivalent of devfs_find_and_unregister(NULL, pathname, 0, 0, 0, 0);
2002-11-17o cpqarray/cciss: fixup after header files cleanups: add include ↵Arnaldo Carvalho de Melo
<linux/interrupt.h> request_irq/free_irq are now in linux/interrupt.h
2002-10-28[PATCH] removed a bunch of gratuitous ->rq_dev usesAlexander Viro
2002-10-17[PATCH] cpqarrayAlexander Viro
* switched to private queues * set ->queue and ->private_data * switched to new methods
2002-10-15[PATCH] 2.5.43: cpqarray compile fixAdam Kropelin
This fixes a recent dyslexicism in cpqarray.
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-08[PATCH] cpqarray SMP deadlock fixAdam Kropelin
This fixes some critical bugs in cpqarray in 2.5. One of the fixes essentially backs out the block queue stop/start behavior that was added recently. This code as it stands is buggy and locks up under even light SMP workloads. Certainly we want the performance benefits of proper block queue plugging, but the driver needs some work before it will fit nicely. Some of these fixes do theoretically hurt performance, but when you consider that the driver is unusable under SMP as-is, I think it is right to get correctness first. Specifically, this patch does the following: * Adds locking to proc queue-walking code for debugging use. Note that the proc registration is still broken and I've left it that way since this stuff should probably migrate to driverfs anyway. * Moves interrupt enabling so queue lock is initialized before interrupts are enabled. Otherwise if we get a quick interrupt we oops the machine. * Removes unconditional IRQ enabling in do_ida_request(). The block layer takes the spinlock with irq_save so if we're going to play this trick then we need to irq_restore. For now, just eliminate the unlocked region. * Remove block queue stop/start logic since it can leave the queue stopped with no outstanding completions to start it again. Plugging logic can come back but it should go hand-in-hand with a cleanup of the driver's request handling algorithm. If nobody screams about this patch I'll go ahead and start making those improvments.
2002-10-07[PATCH] cpqarray reads ->irq before pci_enable_device()Dave Jones
2002-10-07[PATCH] cpqarray compile fixesAdam Kropelin
2002-10-07[PATCH] compile fixesAlexander Viro
cpqarray uses disk_alloc instead of alloc_disk. Same typo is in cciss, rd.c sets ->first_minor to 0 for all units and HD_IRQ definition is needed if CONFIG_BLK_DEV_HD is defined.
2002-10-05[PATCH] cpqarray switched to alloc_disk()Alexander Viro
In addition to usual switch and cleanup, switched the damn thing to use of module_init/module_exit (and removed call from device_init()).
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-17[PATCH] partial bio completion notificationJens Axboe
Make bio->bi_end_io() take bytes_done and actual error as argument. This enables partial completion of bio's, which is important for latency reasons (bio can be huge, for slow media we want page-by-page completions). I think I got most of the bi_end_io() functions out there, but I might have missed a few. For the record, if you don't care about partial completions and just want to be notified when the entire bio completes, add a if (bio->bi_size) return 1; to the top of your bi_end_io(). It should return 0 on completion. bio_endio() will decrement bio->bi_size appropriately, it's recommended for people to go through that. Otherwise they will have to control BIO_UPTODATE and bi_size decrement themselves, there's really no reason to do that. I've deliberately avoided doing any functional changes to any of the end_io functions, as I think that would only make the patch more complex. It's simple right now, but this being i/o paths I prefer (as usual) to be careful and take small steps. The mpage_end_io_read() do-vecs-at-the-time change can come right after this, for instance.
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.