summaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
Commit message (Collapse)AuthorAgeFilesLines
* cciss: Fix pci_driver.shutdown while device is still activeGerald Britton2007-05-191-15/+30
| | | | | | | | | | | | | | | | | Fix an Oops in the cciss driver caused by system shutdown while a filesystem on a cciss device is still active. The cciss_remove_one function only properly removes the device if the device has been cleanly released by its users, which is not the case when the pci_driver.shutdown method is called. This patch adds a new cciss_shutdown function to better match the pattern used by various SCSI drivers: deactivate device interrupts and flush caches. It also alters the cciss_remove_one function to match and readds the __devexit annotation that was removed when cciss_remove_one was serving as the pci_driver.shutdown method. Signed-off-by: Gerald Britton <gbritton@alum.mit.edu> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: include scsi/scsi.h unconditionallyStephen Cameron2007-05-081-0/+1
| | | | | | | | | Make cciss unconditionally include scsi/scsi.h, because of the use of SCSI_IOCTL_GET_IDLUN and SCSI_IOCTL_GET_BUS_NUMBER. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: set rq->errors more correctly in driverMike Miller (OS Dev)2007-05-081-21/+22
| | | | | | | | | | | | | | | | Set rq->errors more correctly in cciss driver. Previously we had set it synonymously with the meaning of the last parameter of end_that_last_request and complete_buffers (the "uptodate" parameter) and had gotten away with it for all this time because nobody ever looked at rq->errors. SCSI_IOCTL_SEND_COMMAND looks at rq->errors, so now it matters that it be right. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: add SG_IO ioctl to ccissMike Miller (OS Dev)2007-05-081-53/+111
| | | | | | | | | | | | | | | | | For all of you that think cciss should be a scsi driver here is the patch that you have been waiting for all these years. This patch actually adds the SG_IO ioctl to cciss. The primary purpose is for clustering and high-availibilty. But now anyone can exploit this ioctl in any manner they wish. Note, SCSI_IOCTL_SEND_COMMAND doesn't work with this patch due to rq->errors being set incorrectly. Subsequent patch fixes that. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: reformat error handlingMike Miller (OS Dev)2007-05-081-85/+89
| | | | | | | | | | | Reformat some error handling code to reduce line lengths a bit. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss: unregister from SCSI before tearing down device resourcesBjorn Helgaas2007-04-131-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must unregister from SCSI before we unmap device resources and unhook the IRQ handler. Otherwise, SCSI may send us more requests, and we won't be able to handle them. I see the following oops during every reboot of my HP DL360: ... Unmounting local filesystems...done. Rebooting... Completed flushing cache on controller 0 BUG: unable to handle kernel paging request at virtual address f8808040 printing eip: c02dc72b *pde = 02120067 *pte = 00000000 Oops: 0002 [#1] SMP Modules linked in: CPU: 1 EIP: 0060:[<c02dc72b>] Not tainted VLI EFLAGS: 00010046 (2.6.21-rc6 #1) EIP is at SA5_submit_command+0xb/0x20 eax: f8808000 ebx: f7a00000 ecx: f79f0000 edx: 37a00000 esi: f79f0000 edi: 00000000 ebp: 00000000 esp: dd717a44 ds: 007b es: 007b fs: 00d8 gs: 0000 ss: 0068 Process khelper (pid: 1427, ti=dd716000 task=c2260a70 task.ti=dd716000) Stack: c02df2c0 f7a00000 f7a00000 00d41008 c02df691 00000000 00000010 00000002 00000001 f79f0000 f7fff844 c1398420 00000000 00000000 00001000 230a3020 69666564 5420656e 50434f49 465f544b 4853554c 44414552 0a312009 66656423 Call Trace: [<c02df2c0>] start_io+0x80/0x120 [<c02df691>] do_cciss_request+0x331/0x350 [<c014242a>] mempool_alloc+0x2a/0xe0 [<c020ad71>] blk_alloc_request+0x61/0x80 [<c020b02e>] get_request+0x15e/0x1e0 [<c01595e0>] cache_alloc_refill+0xb0/0x1e0 [<c021049d>] as_update_rq+0x2d/0x80 [<c0210d28>] as_add_request+0x68/0x90 [<c0207f99>] elv_insert+0x119/0x160 [<c020bd0b>] __make_request+0xcb/0x320 [<c0122ee0>] lock_timer_base+0x20/0x50 [<c0123096>] del_timer+0x56/0x60 [<c020a7b8>] blk_remove_plug+0x38/0x70 [<c020a815>] __generic_unplug_device+0x25/0x30 [<c020a835>] generic_unplug_device+0x15/0x30 ... Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss: add init of drv->cylinders back to cciss_geometry_inquiryMike Miller (OS Dev)2007-04-051-0/+1
| | | | | | | | | This patch adds initialization of drv->cylinders back into the failing case in cciss_geometry_inquiry. I inadvertently removed it in one my 2TB updates. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss endian annotationsAl Viro2007-03-141-5/+5
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss: add struct pci_driver shutdown support (replaces reboot notifier)Mike Miller (OS Dev)2007-03-061-4/+6
| | | | | | | | | | This patch adds support for the struct pci_driver shutdown method to cciss. We require notification of an impending reboot or shutdown so that we can flush the battery backed write cache (BBWC) on the Smart Array controller. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss: fix for 2TB supportMike Miller (OS Dev)2007-03-061-15/+24
| | | | | | | | | | | | | | | | | | | | | This patch changes the way we determine if a logical volume is larger than 2TB. The original test looked for a total_size of 0. Originally we added 1 to the total_size. That would make our read_capacity return size 0 for >2TB lv's. We assumed that we could not have a lv size of 0 so it seemed OK until we were in a clustered system. The backup node would see a size of 0 due to the reservation on the drive. That caused the driver to switch to 16-byte CDB's which are not supported on older controllers. After that everything was broken. It may seem petty but I don't see the value in trying to determine if the LBA is beyond the 2TB boundary. That's why when we switch we use 16-byte CDB's for all read/write operations. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] cciss: build with PROC_FS=nRandy Dunlap2006-12-301-1/+2
| | | | | | | | | | | | | RAID_UNKNOWN is used even when PROC_FS=n, so move it outside of the CONFIG_PROC_FS block. drivers/block/cciss.c:1910: error: 'RAID_UNKNOWN' undeclared (first use in this function) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <mike.miller@hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_requestMike Miller2006-12-181-1/+1
| | | | | | | | | | | | | | | This patch fixes a stupid bug. Sometime during the 2tb enhancement I ended up replacing the macros XFER_READ and XFER_WRITE with h->cciss_read and h->cciss_write respectively. It seemed to work somehow at least on x86_64 and ia64. I don't know how. But people started complaining about command timeouts on older controllers like the 64xx series and only on ia32. This resolves the issue reproduced in our lab. Please consider this for inclusion. Thanks, mikem Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [PATCH] cciss: set default raid level when reading geometry failsMike Miller2006-12-181-0/+1
| | | | | | | | | | | | | | This patch sets a default raid level on a volume that either does not support reading the geometry or reports an invalid geometry for whatever reason. We were always setting some values for heads and sectors but never set a raid level. This caused lots of problems on some buggy firmware. Please consider this for inclusion. Thanks, mikem Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-12-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] Fixup cciss error handling [PATCH] Allow as-iosched to be unloaded [PATCH 2/2] cciss: remove calls to pci_disable_device [PATCH 1/2] cciss: map out more memory for config table [PATCH] Propagate down request sync flag Resolve trivial whitespace conflict in drivers/block/cciss.c manually.
| * [PATCH] Fixup cciss error handlingJens Axboe2006-12-131-1/+1
| | | | | | | | | | | | | | The previous cciss commit removed the err_out_disable_pdev label, but there was still a user of that. Fix that up. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * [PATCH 2/2] cciss: remove calls to pci_disable_devicemike.miller@hp.com2006-12-131-5/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes calls to pci_disable_device except in fail_all_cmds. The pci_disable_device function does something nasty to Smart Array controllers that pci_enable_device does not undo. So if the driver is unloaded it cannot be reloaded. Also, customers can disable any pci device via the ROM Based Setup Utility (RBSU). If the customer has disabled the controller we should not try to blindly enable the card from the driver. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * [PATCH 1/2] cciss: map out more memory for config tablemike.miller@hp.com2006-12-131-1/+1
| | | | | | | | | | | | | | | | | | This patch maps out more memory for our config table. It's required to reach offset 0x214 to disable DMA on the P600. I'm not sure how I lost this hunk. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | [PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day2006-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Karsten Keil <kkeil@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Ian Kent <raven@themaw.net> Cc: Steven French <sfrench@us.ibm.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] cciss: remove calls to pci_disable_deviceMike Miller2006-12-131-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove calls to pci_disable_device except in fail_all_cmds. The pci_disable_device function does something nasty to Smart Array controllers that pci_enable_device does not undo. So if the driver is unloaded it cannot be reloaded. Also, customers can disable any pci device via the ROM Based Setup Utility (RBSU). If the customer has disabled the controller we should not try to blindly enable the card from the driver. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] cciss: map out more memory for config tableMike Miller2006-12-131-1/+1
|/ | | | | | | | | | | Map out more memory for our config table. It's required to reach offset 0x214 to disable DMA on the P600. I'm not sure how I lost this hunk. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] struct path: convert block_driversJosef Sipek2006-12-081-1/+1
| | | | | | Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: cleanup cciss_interrupt modeMike Miller2006-12-071-5/+3Star
| | | | | | | | | A pretty simple cleanup for cciss_interrupt_mode. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: add support for 1024 logical volumesMike Miller2006-12-071-37/+77
| | | | | | | | | | Add the support for a large number of logical volumes. We will soon have hardware that support up to 1024 logical volumes. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: remove unused revalidate_allvol functionMike Miller2006-12-071-73/+1Star
| | | | | | | | | | Remove the no longer used revalidate_allvol function. It was replaced by rebuild_lun_table. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: change cciss_open for consistencyMike Miller2006-12-071-1/+1
| | | | | | | | | | Change our open to test for drv->heads like we do in other places in the driver. Mostly for consistency. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: set sector_size to 2048 for performanceMike Miller2006-12-071-3/+9
| | | | | | | | | | | Change the blk_queue_max_sectors from 512 to 2048. This helps increase performance. [akpm@osdl.org: s/sector_size/max_sectors/] Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: disable DMA prefetch on P600Mike Miller2006-12-071-0/+11
| | | | | | | | | | Unconditionally disable DMA prefetch on the P600 controller. An ASIC bug may result in prefetching beyond the end of physical memory. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: fix pci ssid for the E500 controllerMike Miller2006-12-071-2/+2
| | | | | | | | | | Change the SSID on the E500 as a workaround for a firmware bug. It looks like the original patch was backed out between rc2 and rc4. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: increase number of commands on controllerMike Miller2006-12-071-36/+38
| | | | | | | | | | | | Remove #define NR_CMDS and replace it w/hba[i]->nr_cmds. Most Smart Array controllers can support up to 1024 commands but the E200 family can only support 128. To prevent annoying "fifo full" messages we define nr_cmds on a per controller basis by adding it the product table. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: reference driver supportMike Miller2006-12-071-7/+23
| | | | | | | | | | Add the support to fire up on any HP RAID class device that has a valid cciss signature. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: version changeMike Miller2006-12-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | Change the cciss version number to 3.6.14 to reflect the following functionality changes added by the rest of the set. They include: - Support to fire up on any HP RAID class controller - Increase nr_cmds to 512 for most controllers by adding it to the product table - PCI subsystem ID fix fix was pulled - Disable DMA prefetch for the P600 on IPF platforms - Change from 512 to 2048 sector_size for performance - Fix in cciss_open for consistency - Remove the no longer used revalidate_allvol function - Bug fix for busy configuring - Support for more than 16 logical volumes - Cleanups in cciss_interrupt_mode - Fix for iostats, it's been broken for several kernel releases Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: fix iostatJens Axboe2006-11-151-0/+6
| | | | | | | cciss needs to call disk_stat_add() for iostat to work. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: fix printk format warningRandy Dunlap2006-10-281-4/+4
| | | | | | | | | | | Fix printk format warnings: drivers/block/cciss.c:2000: warning: long long int format, long unsigned int arg (arg 2) drivers/block/cciss.c:2035: warning: long long int format, long unsigned int arg (arg 2) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.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>
* [PATCH] cciss: Fix warnings (and bug on 1TB discs)Matthew Wilcox2006-10-211-13/+9Star
| | | | | | | | | | | | | | CCISS was producing warnings about shifts being greater than the size of the type and pointers being of incompatible type. Turns out this is because it's calling do_div on a 32-bit quantity. Upon further investigation, the sector_t total_size is being assigned to an int, and then we're calling do_div on that int. Obviously, sector_div is called for here, and I took the chance to refactor the code a little. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Remove all inclusions of <linux/config.h>Dave Jones2006-10-041-1/+0Star
| | | | | | kbuild explicitly includes this at build time. Signed-off-by: Dave Jones <davej@redhat.com>
* [PATCH] completions: lockdep annotate on stack completionsPeter Zijlstra2006-10-011-3/+3
| | | | | | | | | | | All on stack DECLARE_COMPLETIONs should be replaced by: DECLARE_COMPLETION_ONSTACK Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: remove unneeded spaces in output for attached volumesMetathronius Galabant2006-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | It removes the awkwards spaces after the "=" when displaying the geometry of the attached volumes. Before: cciss: using DAC cycles blocks= 286734240 block_size= 512 heads= 255, sectors= 32, cylinders= 35139 After: cciss: using DAC cycles blocks=286734240 block_size=512 heads=255, sectors=32, cylinders=35139 Signed-off-by: Metathronius Galabant <m.galabant@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>
* [PATCH] cciss: support for >2TB logical volumesMike Miller (OS Dev)2006-10-011-68/+161
| | | | | | | | | | Add support for logical volumes >2TB. All SAS/SATA controllers support large volumes. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Kill various deprecated/unused block layer defines/functionsJens Axboe2006-09-301-1/+0Star
| | | | Signed-off-by: Jens Axboe <axboe@suse.de>
* [PATCH] cciss: version update, new hwMike Miller2006-09-131-4/+6
| | | | | | | | | | | | | Add support for new hardware and bumps the version to 3.6.10. It seems there were several changes introduced including soft_irq. I decided to bump the major number to reflect these changes. Since we're still supporting older vendor kernels I need some way differentiate between kernel versions <=2.6.10 and newer kernels >=2.6.16. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cciss: fix stall with softirq handling and CFQJens Axboe2006-07-251-41/+45
| | | | | | | | | We need to postpone the queue startup until after the softirq handler has actually finished some requests, otherwise we could be racing with cciss_softirq_done() and not actually restart the queue handling. Signed-off-by: Jens Axboe <axboe@suse.de>
* [PATCH] irq-flags: drivers/block Use the new IRQF_ constantsThomas Gleixner2006-07-021-1/+1
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer neededGreg Kroah-Hartman2006-06-261-1/+0Star
| | | | | | | And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] CCISS: tidy up product table indentationBjorn Helgaas2006-06-251-36/+18Star
| | | | | | | | | | | | Make each one fit on a line so it's easier to read. I re-ordered COMPAQ_CISSC/0x4091, which was out of order. I double-checked these, but it would be good if you'd also check them to make sure I didn't miss any. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] CCISS: run through LindentBjorn Helgaas2006-06-251-1534/+1581
| | | | | | | | | | | | | cciss is full of inconsistent style ("for (" vs. "for(", lines that end with whitespace, lines beginning with a mix of spaces & tabs, etc). This patch changes only whitespace. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] CCISS: remove parens around return valuesBjorn Helgaas2006-06-251-23/+23
| | | | | | | | | | Typical Linux style is "return -EINVAL", not "return(-EINVAL)". Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] CCISS: fix a few spelling errorsBjorn Helgaas2006-06-251-8/+8
| | | | | | | | | | Fix a few spelling errors. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] CCISS: use ARRAY_SIZE without intermediatesBjorn Helgaas2006-06-251-4/+2Star
| | | | | | | | | | | It's easier to verify loop bounds if the array name is mentioned the for() statement that steps through the array. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] CCISS: announce cciss%d devices with PCI address/IRQ/DAC infoBjorn Helgaas2006-06-251-7/+9
| | | | | | | | | | | | | | | | We already print "cciss: using DAC cycles" or similar for every adapter found: why not just identify the device we're talking about and include other useful information? Jeff Garzik <jeff@garzik.org>: Although this patch is correct, I would consider using dev_printk() rather than referencing pci_name() in printk() arguments. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.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>