Jamie Wellnitz [Wed, 1 Mar 2006 03:33:10 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: Protect NPL lists with host lock
Protect NPL lists with host lock
Symptoms: lpfc_findnode_rpi and lpfc_findnode_did can be called
outside of the discovery thread context. We have to iterate
through the NPL lists under the host lock and all add/del
operations on those lists have to be done under host lock.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 03:33:09 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: Fix deadlock in lpfc_fdmi_tmo_handler
Fix deadlock in lpfc_fdmi_tmo_handler
lpfc_fdmi_tmo_handler was calling lpfc_fdmi_cmd with the host_lock
held. lpfc_fdmi_cmd assumes the host_lock is released as it calls functions
that acquire the host_lock. lpfc_fdmi_tmo_handler acquired the host_lock to
protect access to work_hba_events. This was already checked in the worker
thread so we can remove that code completely and remove access to the
host_lock.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 03:33:05 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: PCI hrd_type should be obtained with pci_read_config_byte() macro
PCI hrd_type should be obtained with pci_read_config_byte() macro
Driver keys off of this field to report the proper adapter type.
The pci subsystem explicitly clears the multiport bit in the copy of
the field given the driver. Thus, to properly name the card, obtain it
from config space.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Sat, 4 Mar 2006 15:10:18 +0000 (09:10 -0600)]
[PATCH] convert aic94xx over to using the sas transport end device
Begin introducing the concept of sas remote devices that have an rphy
embedded. The first one (this) is a simple end device. All that an
end device really does is have port mode page parameters contained.
The next and more complex piece will be expander remote devices.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Thu, 2 Mar 2006 22:01:31 +0000 (16:01 -0600)]
[SCSI] make some sas class properties optional
aic94xx doesn't have a use for the bay or enclosure identifiers.
Also, I think it's not going to need a get_linkerrors(), so wire up
all of these exported properties as conditional on the underlying
function support.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.
Also switch from semaphore-based thread wakeup to wake_up_process.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-By: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Wed, 1 Mar 2006 15:02:49 +0000 (09:02 -0600)]
[SCSI] mptspi: Add transport class Domain Validation
This is the first half of a patch to add the generic domain validation
to mptspi. It also creates a secondary "virtual" channel for raid
component devices since these are now exported with no_uld_attach.
What Eric and I would have really liked is to export all physical
components on channel 0 and all raid components on channel 1.
Unfortunately, this would result in device renumbering on platforms with
mixed RAID/Physical devices which was considered unacceptable for
userland stability reasons.
Still to be done is to plug back the extra parameter setting and DV
pieces on reset and hotplug.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 00:25:23 +0000 (19:25 -0500)]
[SCSI] lpfc 8.1.2: Misc FC Discovery changes :
Misc FC Discovery changes :
- Added FC_BYPASSED_MODE statistic
- Corrected some log message data
- Fix up Discovery infrastructure to support FAN:
Allow Fabric entities to flow thru DSM
Fix up linkup/linkdown unregister login processing for Fabric entities
Clean up Discovery code
Utilize nodev_tmo for Fabric entities
- Use of 3 * ratov for CT handling timeouts
- Fix up DSM to make more appropriate decisions and clean up code.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Thu, 23 Feb 2006 20:27:18 +0000 (14:27 -0600)]
[SCSI] fix scsi process problems and clean up the target reap issues
In order to use the new execute_in_process_context() API, you have to
provide it with the work storage, which I do in SCSI in scsi_device and
scsi_target, but which also means that we can no longer queue up the
target reaps, so instead I moved the target to a state model which
allows target_alloc to detect if we've received a dying target and wait
for it to be gone. Hopefully, this should also solve the target
namespace race.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Thu, 23 Feb 2006 18:43:43 +0000 (12:43 -0600)]
[SCSI] add execute_in_process_context() API
We have several points in the SCSI stack (primarily for our device
functions) where we need to guarantee process context, but (given the
place where the last reference was released) we cannot guarantee this.
This API gets around the issue by executing the function directly if
the caller has process context, but scheduling a workqueue to execute
in process context if the caller doesn't have it.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Wed, 22 Feb 2006 08:11:59 +0000 (02:11 -0600)]
[SCSI] don't call ips_eh_reset in ips_queue to avoid deadlock
When the locking was changed in the eh code ips_eh_reset was changed
so that it was a wraper around __ips_eh_reset and all ips_eh_reset
does is grab the host lock and then calls __ips_eh_reset.
In the queuecommand, ips_queue is called with the host_lock held so if
it calls ips_eh_reset we will have a problem. This patch just has
ips_queue call __ips_eh_reset.
Patch is only compile tested. I do not have the HW.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Hammer, Jack <Jack_Hammer@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Al Viro [Thu, 23 Feb 2006 01:03:16 +0000 (02:03 +0100)]
[SCSI] scsi_lib: fix recognition of cache type of Initio SBP-2 bridges
Regardless what mode page was asked for, Initio INIC-14x0 and
INIC-2430 always return page 6 without mode page headers. Try to
recognise this as a special case in scsi_mode_sense and setting the
mode sense headers accordingly.
Signed-off-by: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Sun, 19 Feb 2006 03:52:31 +0000 (20:52 -0700)]
[SCSI] Improve message printing code
Fix a bug where we would consume one byte too many in the message
printing code.
Add support for 256-byte long messages.
Add support for the Modify Bidirectional Data Pointer message.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Alan Stern [Thu, 9 Feb 2006 20:26:18 +0000 (15:26 -0500)]
[SCSI] Recognize missing LUNs for non-standard devices
Some non-standard SCSI targets or protocols, such as USB UFI, report "no
LUN present" by setting the Peripheral Device Type to 0x1f and the
Peripheral Qualifier to 0 (not 3 as the standard requires) in the INQUIRY
response. This patch (as650b) adds a new target flag and code to
accomodate such targets.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] aic7xxx: semaphore to completion conversion
On Tue, Jan 31, 2006 at 06:20:18PM +0100, Christoph Hellwig wrote:
> switch eh_sem to a completion. due to wait_for_completion_timeout this
> also nicely simplifies the code. Unfortunately it's untested, so if
> someone with the hardware could give it a try that would be nice. Once
> it works the same thing can be applied to aic79xx.
New version that switches to the common onstack completion and just a
pointer in the platform_data struct idiom. This gets rid of all the
flags fiddling.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Salyzyn, Mark <mark_salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] mptsas: add support for enclosure and bay identifier attributes
Adds support to retrieve the enclosure and bay identifiers. This patch
is from Eric with minor modifications from me, rewritten from a buggy
patch of mine, based on the earlier CSMI implementation from Eric..
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Fri, 17 Feb 2006 20:18:41 +0000 (13:18 -0700)]
[SCSI] ncr53c8xx update
Delete unused NAME53C definition
Remove use of the M_* constants; use the common SCSI constants instead
Translate some remaining German
Add a missing changelog entry
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Sun, 5 Feb 2006 15:01:33 +0000 (08:01 -0700)]
[SCSI] fix uninitialized variable error
in __scsi_add_device, sdev may be uninitialised if
scsi_host_scan_allowed() returns false. Fix by initialising at the
top of the routine. Also rely on the fact that
scsi_probe_and_add_lun() only actually fills in the sdev pointer if
the SCSI_SCAN_LUN_PRESENT case (so no need to check the return value).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Linas Vepstas [Fri, 3 Feb 2006 22:52:42 +0000 (16:52 -0600)]
[SCSI] PCI Error Recovery: IPR SCSI device driver
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>
Greg KH [Thu, 19 Jan 2006 00:17:46 +0000 (16:17 -0800)]
[SCSI] Remove devfs support from the SCSI subsystem
As devfs has been disabled from the kernel tree for a number of months
now (5 to be exact), here's a patch against 2.6.16-rc1-git1 that removes
support for it from the SCSI subsystem.
The patch also removes the scsi_disk devfs_name field as it's no longer
needed.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Sun, 26 Feb 2006 23:07:45 +0000 (17:07 -0600)]
[PATCH] fix voyager after topology.c move
Commit 9c869edac591977314323a4eaad5f7633fca684f broke voyager again
rather subtly because it already had its own topology exporting
functions, so now each CPU gets registered twice.
I think we can actually use the generic ones, so I don't propose
reverting it. The attached should eliminate the voyager topology
functions in favour of the generic ones.
I also added a define to ensure voyager is never hotplug CPU (we don't
have the support in the SMP harness).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Brian Magnuson [Mon, 27 Feb 2006 03:02:04 +0000 (04:02 +0100)]
[PATCH] fix build on x86_64 with !CONFIG_HOTPLUG_CPU
The commit e2c0388866dc12bef56b178b958f9b778fe6c687 added
setup_additional_cpus to setup.c but this is only defined if
CONFIG_HOTPLUG_CPU is set. This patch changes the #ifdef to reflect that.
Andi Kleen [Sun, 26 Feb 2006 03:18:52 +0000 (04:18 +0100)]
[PATCH] x86_64: Better ATI timer fix
The previous experiment for using apicmaintimer on ATI systems didn't
work out very well. In particular laptops with C2/C3 support often
don't let it tick during idle, which makes it useless. There were also
some other bugs that made the apicmaintimer often not used at all.
I tried some other experiments - running timer over RTC and some other
things but they didn't really work well neither.
I rechecked the specs now and it turns out this simple change is
actually enough to avoid the double ticks on the ATI systems. We just
turn off IRQ 0 in the 8254 and only route it directly using the IO-APIC.
I tested it on a few ATI systems and it worked there. In fact it worked
on all chipsets (NVidia, Intel, AMD, ATI) I tried it on.
According to the ACPI spec routing should always work through the
IO-APIC so I think it's the correct thing to do anyways (and most of the
old gunk in check_timer should be thrown away for x86-64).
But for 2.6.16 it's best to do a fairly minimal change:
- Use the known to be working everywhere-but-ATI IRQ0 both over 8254
and IO-APIC setup everywhere
- Except on ATI disable IRQ0 in the 8254
- Remove the code to select apicmaintimer on ATI chipsets
- Add some boot options to allow to override this (just paranoia)
In 2.6.17 I hope to switch the default over to this for everybody.
Andi Kleen [Sun, 26 Feb 2006 03:18:49 +0000 (04:18 +0100)]
[PATCH] x86_64: Move the SMP time selection earlier
SMP time selection originally ran after all CPUs were brought up because
it needed to know the number of CPUs to decide if it needs an MP safe
timer or not.
This is not needed anymore because we know present CPUs early.
This fixes a couple of problems:
- apicmaintimer didn't always work because it relied on state that was
set up time_init_gtod too late.
- The output for the used timer in early kernel log was misleading
because time_init_gtod could actually change it later. Now always
print the final timer choice
Andi Kleen [Sun, 26 Feb 2006 03:18:43 +0000 (04:18 +0100)]
[PATCH] x86_64: Disable ACPI blacklist by year for now on x86-64
ACPI is initialized very early on x86-64, before the DMI code is
initialized. This means it would often discover a 0 year and then turn
off ACPI because it thought the BIOS was too old. Some systems don't
boot without ACPI so this was a problem.
I have a full fix by adding new very early DMI detection, but it needs
more testing before it can be merged. For 2.6.16 let's just turn the
check off. It never made much sense anyways because there are no x86-64
systems older than 2002 or so and they generally all have working ACPI.
Andi Kleen [Sun, 26 Feb 2006 03:18:37 +0000 (04:18 +0100)]
[PATCH] x86-64/i386: Use common X86_PM_TIMER option and make it EMBEDDED
This makes x86-64 use the common X86_PM_TIMER Kconfig entry in drivers/acpi
And since PM timer is needed for correct timing on a lot of systems
now (e.g. AMD dual cores) and we often get bug reports from people
who forgot to set it make it depend on CONFIG_EMBEDDED. x86-64 had
this change before and it's a good thing.
I also fixed the description slightly to make this more clear.
Jon Mason [Sun, 26 Feb 2006 03:18:22 +0000 (04:18 +0100)]
[PATCH] x86_64: no_iommu removal in pci-gart.c
In previous versions of pci-gart.c, no_iommu was used to determine if IOMMU was
disabled in the GART DMA mapping functions. This changed in 2.6.16 and now
gart_xxx() functions are only called if gart is enabled. Therefore, uses of
no_iommu in the GART code are no longer necessary and can be removed.
Also, it removes double deceleration of no_iommu and force_iommu in pci.h and
proto.h, by removing the deceleration in pci.h.
Lastly, end_pfn off by one error.
Tested (along with patch 1/2) on dual opteron with gart enabled, iommu=soft,
and iommu=off.
Marc Zyngier [Sun, 26 Feb 2006 11:02:56 +0000 (12:02 +0100)]
[PATCH] Fix Specialix SI probing
As the (probably) last user of a Specialix SI board, I noticed that
recent kernels would fail to probe the sucker. Quick investigation
indicate a few missing braces...
I left the double probing in place, as it looks like it's been here
forever.
Signed-off-by: Marc Zyngier <maz@misterjones.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Sun, 26 Feb 2006 14:34:10 +0000 (08:34 -0600)]
[PATCH] sd: fix memory corruption with broken mode page headers
There's a problem in sd where we blindly believe the length of the
headers and block descriptors. Some devices return insane values for
these and cause our length to end up greater than the actual buffer
size, so check to make sure.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Also removed the buffer size magic number (512) and added DPOFUA of
zero to the defaults
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kumar Gala [Fri, 24 Feb 2006 16:54:52 +0000 (10:54 -0600)]
[PATCH] powerpc: Fix mem= cmdline handling on arch/powerpc for !MULTIPLATFORM
mem= command line option was being ignored in arch/powerpc if we were not
a CONFIG_MULTIPLATFORM (which is handled via prom_init stub). The initial
command line extraction and parsing needed to be moved earlier in the boot
process and have code to actual parse mem= and do something about it.
Zachary Amsden [Fri, 24 Feb 2006 21:04:27 +0000 (13:04 -0800)]
[PATCH] Fix topology.c location
When compiling a non-default subarch, topology.c is missing from the kernel
build. This causes builds with CONFIG_HOTPLUG_CPU to fail. In addition,
on Intel processors with cpuid level > 4, it causes intel_cacheinfo.c to
reference uninitialized data that should have been set up by the initcall
in topology.c which calls register_cpu. This causes a kernel panic on boot
on newer Intel processors. Moving topology.c to arch/i386/kernel fixes
both of these problems.
Thanks to Dan Hecht for finding and fixing this problem.
Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Dan Hecht <dhect@vmware.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- PF_SWAPWRITE needs to be set for RECLAIM_SWAP to be able to write
out pages to swap. Currently RECLAIM_SWAP may not do that.
- remove setting nr_reclaimed pages after slab reclaim since the slab shrinking
code does not use that and the nr_reclaimed pages is just right for the
intended follow up action.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ulrich Drepper [Fri, 24 Feb 2006 21:04:21 +0000 (13:04 -0800)]
[PATCH] flags parameter for linkat
I'm currently at the POSIX meeting and one thing covered was the
incompatibility of Linux's link() with the POSIX definition. The name.
Linux does not follow symlinks, POSIX requires it does.
Even if somebody thinks this is a good default behavior we cannot change this
because it would break the ABI. But the fact remains that some application
might want this behavior.
We have one chance to help implementing this without breaking the behavior.
For this we could use the new linkat interface which would need a new
flags parameter. If the new parameter is AT_SYMLINK_FOLLOW the new
behavior could be invoked.
I do not want to introduce such a patch now. But we could add the
parameter now, just don't use it. The patch below would do this. Can we
get this late patch applied before the release more or less fixes the
syscall API?
[PATCH] au1100fb: replaced io_remap_page_range() with io_remap_pfn_range()
Replaced the no longer existing io_remap_page_range() routine with the
io_remap_pfn_range() routine. Did not have a chance yet to test the
functionality of the driver, but at least the kernel compiles cleanly again.
Martin Michlmayr [Fri, 24 Feb 2006 21:04:16 +0000 (13:04 -0800)]
[PATCH] gbefb: Set default of FB_GBE_MEM to 4 MB
Allocating more than 4 MB memory for the GBE (SGI O2) framebuffer completely
breakfs gbefb support at the moment. According to comments on #mipslinux,
more than 4 MB has never worked correctly in Linux. Therefore, the default
should be 4 MB.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kaj-Michael Lang [Fri, 24 Feb 2006 21:04:15 +0000 (13:04 -0800)]
[PATCH] gbefb: IP32 gbefb depth change fix
The gbefb driver does not update the framebuffer layers visual setting when
depth is changed with fbset, resulting in strange colors (very dark blue in
16-bit, almost black in 24-bit).
Signed-off-by: Kaj-Michael Lang <milang@tal.org> Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
James Bottomley [Fri, 24 Feb 2006 21:04:14 +0000 (13:04 -0800)]
[PATCH] x86: fix broken SMP boot sequence
Recent GDT changes broke the SMP boot sequence if the booting CPU is
numbered anything other than zero. There's also a subtle source of error
in that the boot time CPU now uses cpu_gdt_table (which is actually the GDT
for booting CPUs in head.S). This patch fixes both problems by making GDT
descriptors themselves allocated from a per_cpu area and switching to them
in cpu_init(), which now means that cpu_gdt_table is exclusively used for
booting CPUs again.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Zachary Amsden <zach@vmware.com> Cc: Matt Tolentino <metolent@snoqualmie.dp.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>