aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2005-11-06[SCSI] ipr: Generic adapter error cleaupbrking@us.ibm.com1-3/+0
The generic ipr adapter error log currently logs 2 lines of useless data. Delete these lines. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Physical resource error logging macrobrking@us.ibm.com1-29/+6
Adds a macro in the ipr driver for logging a physical device location. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Cleanup error structuresbrking@us.ibm.com1-21/+16
Simplify the ipr error structures a bit by removing some duplication. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] ipr: Disk array rescanning fixbrking@us.ibm.com1-0/+1
IPR RAID arrays show up on a virtual scsi bus, with a scsi bus number of 255, which is generated by the adapter microcode. For the initial scan of the host, we manually scan this bus since it does not obey SAM in regards to sparse LUNs and the disk array devices do not have a consistent product id to use scsi core's blacklist. If /proc/scsi/scsi or sysfs is used to delete one of these devices, the device will not be able to get added back by rescanning the host since scsi core will see ipr's max_channel as 4, rather than 255. Update max_channel after the initial scan so that ipr raid arrays can get re-added if they get deleted. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28[PATCH] PCI: ipr: Block config access during BISTBrian King1-0/+2
IPR scsi adapter have an exposure today in that they issue BIST to the adapter to reset the card. If, during the time it takes to complete BIST, userspace attempts to access PCI config space, the host bus bridge will master abort the access since the ipr adapter does not respond on the PCI bus for a brief period of time when running BIST. On PPC64 hardware, this master abort results in the host PCI bridge isolating that PCI device from the rest of the system, making the device unusable until Linux is rebooted. This patch makes use of some newly added PCI layer APIs that allow for protection from userspace accessing config space of a device in scenarios such as this. Signed-off-by: Brian King <brking@us.ibm.com> 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: Greg Kroah-Hartman <gregkh@suse.de> drivers/scsi/ipr.c | 2 ++ 1 file changed, 2 insertions(+)
2005-06-27[PATCH] PCI: make drivers use the pci shutdown callback instead of the driver core callback.Greg Kroah-Hartman1-6/+4
Now we can change the pci core to always set this pointer, as pci drivers should use it, not the driver core callback. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacksYani Ioannou1-1/+1
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-17[SCSI] allow sleeping in ->eh_host_reset_handler()Jeff Garzik1-1/+12
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17[SCSI] allow sleeping in ->eh_device_reset_handler()Jeff Garzik1-1/+12
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17[SCSI] allow sleeping in ->eh_abort_handler()Jeff Garzik1-12/+12
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] ipr: Fix ipr PCI hotplug hang with CDROM attachbrking@us.ibm.com1-2/+1
Currently, during PCI hotplug remove, if the upper layer drivers of the attached devices send commands down as part of the remove action, like a CDROM, the hotplug action will hang forever due to the ipr driver returning SCSI_MLQUEUE_HOST_BUSY. Patch fixes this. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] ipr: Array error logging fixbrking@us.ibm.com1-1/+1
Bugme 4547. The following patch fixes a bug in ipr's error logging. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+6083
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!