[PATCH] qla2xxx: Pass input-buffer length to Get-ID-List mailbox command.
Recent ISP24xx firmwares require that mailbox register 8 be
set to the maximum number of bytes to transfer during DMA
copying of the list. We safely set this value to zero
(infinite), since the call is *only* made in FCAL
topologies.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Commit 854165f4245c4a3b4a8cc363ba2050033151e196
inadvertently added some code meant only for testing -- the
driver was ignoring the non-zero function numbers of a
multi-port HBA.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[PATCH] qla2xxx: Close window on race between rport removal and fcport transition.
Fcport visibility is recognized during interrupt time, but,
rport removal can only occur during a process
(sleeping)-context. Return a DID_IMM_RETRY status for
commands submitted within this window to insure I/Os do not
prematurely run-out of retries.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This patch properly registers the 16 byte command length capability of
the megaraid_sas controlled hardware with the scsi midlayer. All
megaraid_sas hardware supports 16 byte CDB's.
Signed-off-by: Joshua Giles <joshua_giles@dell.com> Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Moore, Eric [Fri, 3 Feb 2006 00:19:47 +0000 (17:19 -0700)]
[SCSI] fusion - mptctl - backplane istwi fix
Moving the toolbox call from mptbase.c, over to
mptctl.c, and using the mptctl infastructure to issue
the call. The existing code is hanging on certain HP platforms
when this ioctl is issued, and this patch fix's that.
Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Thu, 2 Feb 2006 03:07:14 +0000 (21:07 -0600)]
[SCSI] iscsi update: rm unused sessions list
rm unused sessions list.
This patch is last becuase I was not sure if this patchset was
going to be applied over the kmalloc2kzalloc one by JesS. If it
is then this patch will not apply and can be dropped for now. I will
resend later when things setttle down.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Thu, 2 Feb 2006 03:07:01 +0000 (21:07 -0600)]
[SCSI] iscsi update: set deamon pid earlier
>From michaelc@cs.wisc.edu:
If the transport lookup fails we set the daemon pid too late.
This can cause us deadlock since the netlink code will think we
meant to call back into our iscsi_if_rx function.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Thu, 2 Feb 2006 03:06:58 +0000 (21:06 -0600)]
[SCSI] iscsi update: setup pool before using
>From andmike@us.ibm.com:
Ensure that pool data is setup prior to calling mempool_create as it will
call the the alloc function during create.
Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This patch cleans up that interface by having the lld and class
pass a iscsi_cls_session or iscsi_cls_conn between each other when
the function is used by HW and SW iscsi llds. This way the lld
does not have to remember if it has to send a handle or pointer
and a handle or pointer to connection, session or host.
This also has the class verify the session handle that gets passed from
userspace instead of using the pointer passed into the kernel directly.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 1 Feb 2006 17:30:44 +0000 (09:30 -0800)]
[SCSI] aacraid: use no_uld_attach flag
Received From Mark Salyzyn.
In order to support user tools accessing the array components (SMART,
Mode Page information, Cache page adjustments, WWN determination,
Firmware updates etc), we take advantage of the no_uld_attach flag and
deprecate the code that filters Inquiries to block the requests to array
components. The quirk prevents the sd layer from attaching to the
components.
We also took the opportunity to balance the queue depths based on the
total adapter queue depth to the array devices to reduce the chances of
starvation.
Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 1 Feb 2006 17:30:31 +0000 (09:30 -0800)]
[SCSI] aacraid: reduce device probe warnings
Received from Mark Salyzyn.
This patch sets up some device quirks surrounding arrays to inform the
scsi layer that various mode pages are not supported. This reduces the
severity of the complaints that show up in the logs as the array devices
are enumerated.
Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Stephen Smalley [Fri, 3 Feb 2006 13:21:12 +0000 (08:21 -0500)]
[PATCH] SELinux: fix size-128 slab leak
Remove private inode tests from security_inode_alloc and security_inode_free,
as we otherwise end up leaking inode security structures for private inodes.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mark Fasheh [Wed, 18 Jan 2006 18:31:47 +0000 (10:31 -0800)]
[PATCH] ocfs2: don't wait on recovery when locking journal
The mount path had incorrectly asked the locking code to wait for recovery
completion, which deadlocks things because recovery waits for mount to
complete first.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Joel Becker [Wed, 25 Jan 2006 21:31:07 +0000 (13:31 -0800)]
configfs: Add permission and ownership to configfs objects.
configfs always made item and attribute ownership root.root and
permissions based on a umask of 022. Add ->setattr() to allow
chown(2)/chmod(2), and persist the changes for the lifetime of the
items and attributes.
Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Arjan van de Ven [Sat, 14 Jan 2006 05:54:23 +0000 (21:54 -0800)]
[PATCH] ocfs2: Semaphore to mutex conversion.
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Thu, 12 Jan 2006 22:24:55 +0000 (14:24 -0800)]
[PATCH] ocfs2/dlm: fixes
* fix a hang which can occur during shutdown migration
* do not allow nodes to join during recovery
* when restarting lock mastery, do not ignore nodes which come up
* more than one node could become recovery master, fix this
* sleep to allow some time for heartbeat state to catch up to network
* extra debug info for bad recovery state problems
* make DLM_RECO_NODE_DATA_DONE a valid state for non-master recovery nodes
* prune all locks from dead nodes on $RECOVERY lock resources
* do NOT automatically add new nodes to mle nodemaps until they have properly
joined the domain
* make sure dlm_pick_recovery_master only exits when all nodes have synced
* properly handle dlmunlock errors in dlm_pick_recovery_master
* do not propagate network errors in dlm_send_begin_reco_message
* dead nodes were not being put in the recovery map sometimes, fix this
* dlmunlock was failing to clear the unlock actions on DLM_DENIED
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
I just purchased a HighPoint Rocket 1520 SATA controller. There seems to
be no libata driver (yet), but there is an ide driver, hpt366. When the
driver gets loaded, it causes a kernel NULL pointer dereference in
pci_bus_clock_list. It seems to be because the driver is waiting for clock
stabilization in init_hpt37x() which never comes. The driver just
continues on with the pci drvdata set to NULL, instead of a valid clock
entry. The following patch prevents the NULL dereference from happening,
but instead exit with an error.
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Fri, 3 Feb 2006 11:04:55 +0000 (03:04 -0800)]
[PATCH] stop CompactFlash devices being marked as removable
This patch stops CompactFlash devices being marked as removable. They are
not removable (as defined by Linux) as the media and device are
inseparable. When a card is removed, the whole device is removed from the
system and never sits in a media-less state.
This stops some nasty udev device creation/destruction loops.
Further, once this change is made, there is no need for ide to can be
removed from ide_drive_t.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andreas Mohr [Fri, 3 Feb 2006 11:04:54 +0000 (03:04 -0800)]
[PATCH] ide Kconfig fixes
CONFIG_BLK_DEV_IDECS docu mentions everything and the kitchen sink, yet
fails to list the most important/widespread (IMHO) device: Compact Flash
PCMCIA adapters.
This incomplete description recently caused me to deselect the ide_cs
module, causing great pain soon thereafter when I realized why I had
actually enabled it some years ago.
Updates:
- make sure to mention Compact Flash adapters
- fix some random typos in ide Kconfig
Signed-off-by: Andreas Mohr <andi@lisas.de> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jayachandran C [Fri, 3 Feb 2006 11:04:51 +0000 (03:04 -0800)]
[PATCH] IPMI: fix issues reported by Coverity in ipmi_msghandler.c
While looking to the report by Coverity in ipmi, I came across the
following issue:
The IPMI message handler relies on two defines which are the same -one in
include/linux/ipmi.h
#define IPMI_NUM_CHANNELS 0x10
and one in drivers/char/ipmi/ipmi_msghandler.
#define IPMI_MAX_CHANNELS 16
These are used interchangeably in ipmi_msghandler.c, but since the array
addr->channels[] is of size IPMI_MAX_CHANNELS, I have made a patch that
uses IPMI_MAX_CHANNELS for all the checks for the array index.
NOTE: You could probably remove the line that defines IPMI_NUM_CHANNELS
from ipmi.h, or move IPMI_MAX_CHANNELS to ipmi.h
Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jayachandran C [Fri, 3 Feb 2006 11:04:50 +0000 (03:04 -0800)]
[PATCH] UDF: Fix issues reported by Coverity in namei.c
This patch fixes an issue in fs/udf/namei.c reported by Coverity:
Error reported(1776)
CID: 1776
Checker: UNUSED_VALUE (help)
File: fs/udf/namei.c
Function: udf_lookup
Description: Pointer returned from "udf_find_entry" is never used
Patch description:
remove unused variable fi.
Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Karsten Keil [Fri, 3 Feb 2006 11:04:48 +0000 (03:04 -0800)]
[PATCH] i4l: warning fixes
drivers/isdn/hisax/hscx_irq.c: In function `hscx_interrupt':
drivers/isdn/hisax/hscx_irq.c:201: warning: comparison is always 1 due to width of bit-field
It's due to
(PACKET_NOACK != bcs->tx_skb->pkt_type)
pkt_type is only three bit wide.
I think this should fix it for the moment, pkt_type 7 is not used yet and
this is only used internal in hisax.
Andrew Morton [Fri, 3 Feb 2006 11:04:47 +0000 (03:04 -0800)]
[PATCH] ip2main.c warning fixes
With Eric's "i386: Add a temporary to make put_user more type safe" patch we
get a pile of warnings out of ip2m1in.c:
drivers/char/ip2main.c: In function `ip2_ipl_ioctl':
drivers/char/ip2main.c:2910: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2911: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2912: warning: assignment makes integer from pointer without a cast
etc.
This ioctl is copying the kernel virtual address of a large number of
functions out to userspace. Heaven knows why.
Rather than fixing the warnings, I think we'll just nuke that code.
The patch also fixes a couple of `defined but not used' warnings.
Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
By including version.h edac_mc was rebuilding on every incremental build.
Which defeats the point of incremental builds.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Fulghum [Fri, 3 Feb 2006 11:04:41 +0000 (03:04 -0800)]
[PATCH] new tty buffering locking fix
Change locking in the new tty buffering facility from using tty->read_lock,
which is currently ignored by drivers and thus ineffective. New locking
uses a new tty buffering specific lock enforced centrally in the tty
buffering code.
Two drivers (esp and cyclades) are updated to use the tty buffering
functions instead of accessing tty buffering internals directly. This is
required for the new locking to work.
Minor checks for NULL buffers added to
tty_prepare_flip_string/tty_prepare_flip_string_flags
Signed-off-by: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix to broken comment to synchronize_rcu() noted by Keith Owens. Also add
sentence noting that synchronize_sched() and synchronize_rcu() are not
necessarily identical.
Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com> Cc: Keith Owens <kaos@sgi.com> Cc: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Poetzl [Fri, 3 Feb 2006 11:04:37 +0000 (03:04 -0800)]
[PATCH] quota: fix error code for ext2_new_inode()
The quota check in ext2_new_inode() returns ENOSPC where it should return
EDQUOT instead.
Signed-off-by: Herbert Pötzl <herbert@13thfloor.at> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zhang, Yanmin [Fri, 3 Feb 2006 11:04:36 +0000 (03:04 -0800)]
[PATCH] Export cpu topology in sysfs
The patch implements cpu topology exportation by sysfs.
Items (attributes) are similar to /proc/cpuinfo.
1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
represent the physical package id of cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
represent the thread siblings to cpu X in the same physical package;
To implement it in an architecture-neutral way, a new source file,
driver/base/topology.c, is to export the 5 attributes.
If one architecture wants to support this feature, it just needs to
implement 4 defines, typically in file include/asm-XXX/topology.h.
The 4 defines are:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)
The type of **_id is int.
The type of siblings is cpumask_t.
To be consistent on all architectures, the 4 attributes should have
deafult values if their values are unavailable. Below is the rule.
1) physical_package_id: If cpu has no physical package id, -1 is the
default value.
2) core_id: If cpu doesn't support multi-core, its core id is 0.
3) thread_siblings: Just include itself, if the cpu doesn't support
HT/multi-thread.
4) core_siblings: Just include itself, if the cpu doesn't support
multi-core and HT/Multi-thread.
So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
If an attribute isn't defined on an architecture, it won't be exported.
Peter Williams [Fri, 3 Feb 2006 11:04:33 +0000 (03:04 -0800)]
[PATCH] lib: Fix bug in int_sqrt() for 64 bit longs
The implementation of int_sqrt() assumes that longs have 32 bits. On
systems that have 64 bit longs this will result in gross errors when the
argument to the function is greater than 2^32 - 1 on such systems. I doubt
whether any such use is currently made of int_sqrt() but the attached patch
fixes the problem anyway.
Signed-off-by: Peter Williams <pwil3058@bigpond.com.au> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Poetzl [Fri, 3 Feb 2006 11:04:32 +0000 (03:04 -0800)]
[PATCH] quota: remove unused sync_dquots_dev()
The already removed sync_dquots_dev(dev,type) is still defined in the
no-quota case.
Signed-off-by: Herbert Pötzl <herbert@13thfloor.at> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
dean gaudet [Fri, 3 Feb 2006 11:04:30 +0000 (03:04 -0800)]
[PATCH] fcntl F_SETFL and read-only IS_APPEND files
There is code in setfl() which attempts to preserve the O_APPEND flag on
IS_APPEND files... however IS_APPEND files could also be opened O_RDONLY
and in that case setfl() should not require O_APPEND...
coreutils 5.93 tail -f attempts to set O_NONBLOCK even on regular files...
unfortunately if you try this on an append-only log file the result is
this:
I offer up the patch below as one way of fixing the problem... i've tested
it fixes the problem with tail -f but haven't really tested beyond that.
(I also reported the coreutils bug upstream... it shouldn't fail imho...
<https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=15473>)
Signed-off-by: dean gaudet <dean@arctic.org> Cc: Al Viro <viro@ftp.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Markus Lidel [Fri, 3 Feb 2006 11:04:29 +0000 (03:04 -0800)]
[PATCH] I2O: fix and workaround for Motorola/Freescale controller
- This controller violates the I2O spec for the I/O registers. The patch
contains a workaround which moves the registers to the proper location.
(originally author: Matthew Starzewski)
- If a message frame is beyond the mapped address range a error is
returned.
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Moyer [Fri, 3 Feb 2006 11:04:27 +0000 (03:04 -0800)]
[PATCH] fix O_DIRECT read of last block in a sparse file
Currently, if you open a file O_DIRECT, truncate it to a size that is not a
multiple of the disk block size, and then try to read the last block in the
file, the read will return 0. The problem is in do_direct_IO, here:
/* Handle holes */
if (!buffer_mapped(map_bh)) {
char *kaddr;
...
if (dio->block_in_file >=
i_size_read(dio->inode)>>blkbits) {
/* We hit eof */
page_cache_release(page);
goto out;
}
We shift off any remaining bytes in the final block of the I/O, resulting
in a 0-sized read. I've attached a patch that fixes this. I'm not happy
about how ugly the math is getting, so suggestions are more than welcome.
I've tested this with a simple program that performs the steps outlined for
reproducing the problem above. Without the patch, we get a 0-sized result
from read. With the patch, we get the correct return value from the short
read.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Suparna Bhattacharya <suparna@in.ibm.com> Cc: Mingming Cao <cmm@us.ibm.com> Cc: Joel Becker <Joel.Becker@oracle.com> Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Fri, 3 Feb 2006 11:04:23 +0000 (03:04 -0800)]
[PATCH] cpuset: fix sparse warning
kernel/cpuset.c:644:38: warning: non-ANSI function declaration of function 'cpuset_update_task_memory_state'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>