aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-12-07[PATCH] slab: remove SLAB_KERNELChristoph Lameter1-1/+1
SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Howells1-52/+261
Conflicts: drivers/pcmcia/ds.c Fix up merge failures with Linus's head and fix new compile failures. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22[SCSI] ipr: Make ipr_ioctl staticAdrian Bunk1-1/+1
This patch makes ipr_ioctl static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: Reduce default error log sizeBrian King1-5/+9
Since the default error log size has increased on SAS adapters, prevent ipr from logging this additional data unless requested to do so by the user set log level in order to prevent flooding the logs. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: Add support for logging SAS fabric errorsBrian King1-7/+218
Adds support for logging SAS fabric errors logged by the ipr firmware. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: Remove debug trace points from dump codeBrian King1-2/+0
Remove some debug trace points that clutter up the log when ipr debugging is turned on. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: Remove ipr_scsi_timed_outBrian King1-36/+4
Remove ipr's usage of the scsi transport eh_timed_out for handling SATA timeouts. This was only needed in order to set some flags on the qc prior to calling ata_do_eh. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: PCI IDs for new SAS adaptersBrian King1-1/+17
Adds PCI IDs for some new ipr SAS adapters. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: Stop issuing cancel all to disk arraysBrian King1-1/+1
The ipr disk array devices do not support a cancel all requests primitive, so change the ipr driver to never send it. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22[SCSI] ipr: SATA reset - wait for host reset completionBrian King1-0/+12
If an ipr adapter hits a fatal microcode error requiring a reset while a SATA device is going through EH, it can result in a command getting issued to the ipr adapter while it is getting reset, which can cause PCI bus errors. Wait for any outstanding adapter reset to finish prior to issuing a SATA device reset. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22WorkStruct: make allyesconfigDavid Howells1-4/+5
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-2/+1
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-09-26[SCSI] Signedness issue in drivers/scsi/ipr.cEric Sesterhenn1-1/+1
gcc 4.1 with some extra warnings show the following: drivers/scsi/ipr.c:6361: warning: comparison of unsigned expression < 0 is always false drivers/scsi/ipr.c:6385: warning: comparison of unsigned expression < 0 is always false drivers/scsi/ipr.c:6415: warning: comparison of unsigned expression < 0 is always false The problem is that rc is of the type u32, which can never be smaller than zero, therefore all three error handling checks get useless. This patch changes it to a normal int, because all usages / all functions it get used with expect an int. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Acked-by: Brian King <brking@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26[SCSI] pci_module_init conversion in scsi subsystemHenrik Kretzschmar1-1/+1
Converts pci_module_init() to pci_register_driver() in the scsi subsys on 23 drivers which only return the value of pci_module_init(). Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26[SCSI] ipr: Support attaching SATA devicesBrian King1-18/+665
Adds support to attach SATA devices to ipr SAS adapters. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06[SCSI] ipr: Auto sense handling fixBrian King1-2/+1
Fix up a logic error in the checking for valid sense data. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06[SCSI] ipr: Properly handle IOA recovered errorsBrian King1-1/+2
The ipr driver currently translates adapter recovered errors to DID_ERROR. This patch fixes this to translate these errors to success instead. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06[SCSI] ipr: Handle new SAS error codesBrian King1-0/+28
Add definitions for some SAS error codes that can be logged by ipr SAS adapters. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-02[PATCH] irq-flags: scsi: Use the new IRQF_ constantsThomas Gleixner1-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: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-10[SCSI] remove scsi_request infrastructureChristoph Hellwig1-1/+0
With Achim patch the last user (gdth) is switched away from scsi_request so we an kill it now. Also disables some code in i2o_scsi that was broken since the sg driver stopped using scsi_requests. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13[SCSI] ipr: Reset device cleanupBrian King1-17/+41
Encapsulate some more of the device reset processing in preparation for SATA support. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13[SCSI] ipr: printk macro cleanup/removalBrian King1-7/+8
Remove some unused printk macros, make some more robust, and convert some to use standard printk macros when possible. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13[SCSI] ipr: Simplify status area dumpingBrian King1-35/+4
Simplify the dumping of the command status area by removing some device specific information that has proven to not be worthwhile. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13[SCSI] ipr: Fixup device type checkBrian King1-2/+2
Fixup a check used by the ipr driver to determine if a given device is a SCSI disk. Due to the addition of support for attaching SATA devices, this check needs to be more robust. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13[SCSI] ipr: Disk remove path cleanupBrian King1-3/+3
Instead of NULLing the resource entry pointer when a disk goes away to prevent any new commands being sent to it, set the adapter resource handle to an invalid value so new ops getting sent to it will fail with a selection timeout response. This patch is needed for future SATA patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] PCI Error Recovery: IPR SCSI device driverLinas Vepstas1-0/+109
Various PCI bus errors can be signaled by newer PCI controllers. This patch adds the PCI error recovery callbacks to the IPR SCSI device driver. The patch has been tested, and appears to work well. Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-12[SCSI] ipr: Fix adapter initialization failureBrian King1-44/+5
Since scsi core is always sending scatterlists now, remove some code which was written with the bad assumption that a small transfer would not be sent down in a scatterlist. Without this fix, the ipr driver ends up sending garbage data to the adapter following a reset, causing it to fail the reset and take the adapter offline. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds1-1/+1
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04[PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers1-1/+1
Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04[PATCH] merge kobject_uevent and kobject_hotplugKay Sievers1-1/+1
The distinction between hotplug and uevent does not make sense these days, netlink events are the default. udev depends entirely on netlink uevents. Only during early boot and in initramfs, /sbin/hotplug is needed. So merge the two functions and provide only one interface without all the options. The netlink layer got a nice generic interface with named slots recently, which is probably a better facility to plug events for subsystem specific events. Also the new poll() interface to /proc/mounts is a nicer way to notify about changes than sending events through the core. The uevents should only be used for driver core related requests to userspace now. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-12-13[SCSI] ipr: Driver initialization fix for kexec/kdumpbrking@us.ibm.com1-1/+16
When kexec booting a kernel when the previous kernel did not call ipr's shutdown method, the ipr adapter does not get properly initialized, which can result in the ipr adapter completing commands issued by the previous kernel. Fix ipr to detect this scenario by reading the adapter's interrupt mask register and the microprocessor interrupt register. If the interrupt mask register indicates that interrupts are enabled or the reset alert bit is set when the card is probed, this means the card is in an unknown state and we hard reset the card. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Better handle failure of adapter bringup commandsbrking@us.ibm.com1-9/+50
Some new ipr adapters do not support some of the initialization commands currently sent to it from the driver. Handle these commands failing and continue on with the adapter initialization. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: New PCI Idsbrking@us.ibm.com1-1/+21
Adds support for some new ipr adapters Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Support device reset to RAID disksbrking@us.ibm.com1-1/+1
Support now exists in some ipr adapters to issue a device reset to an Advanced Function disk. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Support new device queueing modelbrking@us.ibm.com1-11/+48
New ipr adapters support a new device queueing model in the adapter firmware. The queueing model is the NACA queueing model, but it does not mean use of NACA is required. The new model removes some of the adapter firmware queue state that made handling QERR=0 almost impossible. The queueing model on older adapters included the concept of a queue frozen state, which would freeze the response queue in the adapter when a check condition occurred, requiring a a primitive to resume the queue. The new queueing model removes this complexity. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: New adapter error typesbrking@us.ibm.com1-0/+175
Handle some new types of ipr errors that can be returned by the adapter. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Module parm to disable RAID 0 auto createbrking@us.ibm.com1-0/+5
Some ipr adapters will automatically create single device RAID 0 arrays for all unconfigured RAID capable devices found at adapter initialization time. This patch adds a module parameter to disable this behavior. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Runtime resetbrking@us.ibm.com1-1/+3
Some IPR RAID adapter will automatically create single device RAID arrays for all attached devices when the card is initialized. Setting the RUNTIME_RESET doorbell bit will prevent this from occurring, since we only want this behavior the first time the card is initialized and not each time the card happens to get reset. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: handle new adapter errorsbrking@us.ibm.com1-12/+71
Add support for handling some new errors that may be returned by ipr adapters. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Provide reset_adapter retry method for offlined adaptersbrking@us.ibm.com1-0/+69
If an ipr adapter repeatedly fails its initialization the ipr driver will take the adapter offline and never talk to it again. This provides a method for the user to manually try the initialization again through sysfs. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Runtime debugging optionsbrking@us.ibm.com1-0/+3
Make some compile time debugging options runtime module options. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Fix adapter microcode update DMA mapping leakbrking@us.ibm.com1-49/+55
If the write buffer command that is issued to the ipr adapter to update its microcode fails for some reason, the DMA buffer will never get unmapped. Move the pci_map/unmap out of the IOA reset job so that the buffer is always clearly mapped and unmapped. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Convert to use kzallocbrking@us.ibm.com1-14/+4
Convert appropriate kmalloc/memset calls to use kzalloc. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Write caching state host attributebrking@us.ibm.com1-9/+192
Adds a scsi_host sysfs attribute and module parm to enable/disable the write cache on an ipr adapter. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: slave_alloc optimizationbrking@us.ibm.com1-2/+4
Optimize ipr's slave_alloc to return -ENXIO for devices that do not exist. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Prevent upper layer driver bindingbrking@us.ibm.com1-1/+3
Set the no_uld_attach for devices ipr does not want upper layer drivers to attach to. These devices are only reported for RAID management and only sg should be used to talk to them. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Include all disks in supported listbrking@us.ibm.com1-1/+1
Fix ipr to include all disks in the supported device list, not just disks formatted to advanced function format. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Error logging cleanupbrking@us.ibm.com1-3/+3
Simplify error logging path, sanitize error length returned by the adapter. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Handle unknown errorsbrking@us.ibm.com1-5/+1
Better handle errors received which are not known to the device driver. Just dump the hex data so that we have a hope of figuring out what went wrong. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>