Adrian Bunk [Fri, 10 Aug 2007 21:50:43 +0000 (14:50 -0700)]
[SCSI] make scsi_decode_sense_buffer and scsi_decode_sense_extras static
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Gabriel C [Fri, 10 Aug 2007 21:50:39 +0000 (14:50 -0700)]
[SCSI] NCR5380: fix NCR53C400_PSEUDO_DMA is not defined
In file included from drivers/scsi/g_NCR5380_mmio.c:9:
drivers/scsi/g_NCR5380.c:559:5: warning: "NCR53C400_PSEUDO_DMA" is not defined
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Adrian Bunk [Fri, 10 Aug 2007 21:50:42 +0000 (14:50 -0700)]
[SCSI] scsi_error.c should #include "scsi_transport_api.h"
Every file should #include the headers containing the prototypes for its
global functions (in this case for scsi_schedule_eh()).
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Morton [Fri, 10 Aug 2007 21:50:30 +0000 (14:50 -0700)]
[SCSI] aacraid: rename check_reset
Too generic, clashes with ISDN.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 14:41:03 +0000 (08:41 -0600)]
[SCSI] advansys: Move documentation to Documentation/scsi
The 700+-line comment at the top of the advansys driver fits more comfortably
in Documentation/scsi.
Delete the sections on:
- kernels supported
- other files modified (obsolete)
- source comments (obsolete)
- tests to run
- release history (that's what a VCS is for)
- contacting connectcom (the domain has expired and the phone number is
now in use by another organisation)
Known problems/fix list is moved down to the section where jejb put his FIXME.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:58:12 +0000 (11:58 -0400)]
[SCSI] advansys: use memcpy instead of open-coded loop
Use memcpy to initialise eep_config instead of a loop. For
AdvInitFrom38C1600EEP where we need to modify the default EEPROM
configuration, do it after the loop, and do it using the structure
definition, not by finding the right byte. I think it was wrong for
big-endian machines.
Also delete some non-useful comments and prototypes.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:56:40 +0000 (11:56 -0400)]
[SCSI] advansys: Move struct device out of the cfg structures
The cfg structures are supposed to be disposable after initialisation;
with the 'dev' used for DMA mapping in there, that's not possible. Move
the dev to the board.
Also inline AscInitFromAscDvcVar into its only caller, remove some
unnecessary prototypes and sort out a few minor formatting issues.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:55:34 +0000 (11:55 -0400)]
[SCSI] advansys: Stop using n_io_port in Scsi_Host structure
n_io_port isn't suitable for advansys because some of the boards have
more than 255 bytes of io port space. There's already a driver-private
replacement, asc_n_io_port, but for some reason the driver was still
setting and occasionally reporting n_io_port.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:55:07 +0000 (11:55 -0400)]
[SCSI] advansys: ioremap no longer needs page-aligned addresses
At some point during Linux 2.1 development, ioremap() gained the ability
to handle addresses which weren't page-aligned. Also expand the CONFIG_PCI
range to encompass that entire section of wide board initialisation, since
all wide boards are PCI.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 14:08:22 +0000 (08:08 -0600)]
[SCSI] advansys: misc reformatting
Remove some useless forward declarations
Reformat some comments, debug messages, and the occasional piece of real code
Removal of unnecessary braces
Remove duplicate setting of shost->irq
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:41:33 +0000 (11:41 -0400)]
[SCSI] advansys: remove INQUIRY sniffing
Use slave_configure() to do all the work that used to be done in
AscInquiryHandling and AdvInquiryHandling. Split slave_configure into
two functions, one for wide and one for narrow controllers.
Remove some unused definitions, duplicate definitions, unnecessary
declarations, and scsireqq, cap_info and inquiry from struct asc_board.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Fri, 27 Jul 2007 03:51:47 +0000 (21:51 -0600)]
[SCSI] advansys: More PCI cleanups
- Remove wrappers around the PCI configuration space accessors
- Call pci_set_master() instead of poking at config space directly
- Move the latency setting into one function called for both narrow and
wide boards.
- Tidy up AdvInitGetConfig() a little.
- Delete a few unused prototypes and definitions.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 14:04:53 +0000 (08:04 -0600)]
[SCSI] advansys: Update resource management
Make sure the resources are reserved and released by all the callers of
advansys_board_found(). This eliminates the check_region-style race.
It also allows us to use the pci_request_regions() API.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 15:18:45 +0000 (09:18 -0600)]
[SCSI] advansys: Convert to ISA driver model
Register two isa_drivers, one for ISA and one for VLB, in order to
preserve detection order. When deleting advansys_detect, we lose the
last vestiges of the code that limited IO port scanning. This code
has been effectively disabled for many years anyway; I'll restore it
in a module_param later. We also lose the code that placed all ISA PnP
cards into WaitForKey state -- drivers shouldn't be doing this anyway.
The asc_host array goes away too. Also remove some IOADR and other
definitions, such as ASC_NUM_BOARD_SUPPORTED.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 15:14:52 +0000 (09:14 -0600)]
[SCSI] advansys: Convert to EISA driver model
- Switch EISA probing to the driver model
- Remove some now-unused macros and functions
- Update the FIXME now that we use the correct driver model probing API
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 03:46:15 +0000 (21:46 -0600)]
[SCSI] advansys: Convert to PCI driver model
- Add a pci_driver interface for the PCI advansys devices (for
ISA/EISA/VLB devices, we still call advansys_detect).
- Many functions are converted from __init to __devinit to allow hotplug
PCI to work.
- Only keep devices found by advansys_detect in the asc_host list.
- Rename asc_board_count to asc_legacy_count. New asc_board_count is only
used to generate a unique name for each device.
- Remove some now-unused macros and struct definitions
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Mon, 30 Jul 2007 15:08:34 +0000 (09:08 -0600)]
[SCSI] advansys: Move to scsi hotplug initialisation model
- Switch from scsi_register/scsi_unregister to scsi_host_alloc,
scsi_add_host, scsi_scan_host and scsi_host_put.
- Rename the scsi_host_template to advansys_template
- Use module_init and module_exit instead of scsi_module.c
- Remove protection against advansys_detect being called twice
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Sun, 29 Jul 2007 23:30:28 +0000 (17:30 -0600)]
[SCSI] advansys: Make advansys_board_found a little more readable
- Put all the error cleanup at the end of the function and goto the
appropriate label
- Split advansys_wide_init_chip out of advansys_board_found
- Split advansys_wide_free_mem out of advansys_board_found. Use it
from advansys_release
- Use GFP_KERNEL, not GFP_ATOMIC, when allocating memory during
initialisation
- Eliminate lots of PROC_FS ifdefs by removing the ifdefs around the prtbuf
struct member
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Sun, 29 Jul 2007 23:27:20 +0000 (17:27 -0600)]
[SCSI] advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host
The interrupt routines used to walk the list of Scsi_Hosts belonging to
this driver to make sure that the scsi_cmnd belonged to one of them.
This is a waste of time and gets in the way of later cleanups, so
delete it.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Sun, 29 Jul 2007 05:11:05 +0000 (23:11 -0600)]
[SCSI] advansys: Improve interrupt handler
Pass the Scsi_Host to the interrupt handler, rather than polling all
hosts for each interrupt.
Return IRQ_NONE if we didn't handle this interrupt
Don't set the IRQF_DISABLED flag; this is not a fast-executing interrupt
handler.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Thu, 26 Jul 2007 15:03:19 +0000 (11:03 -0400)]
[SCSI] advansys: undate version, copyright, etc
Update the version to 3.4
Add my copyright
Add myself to MAINTAINERS
Exercise my right to change the license from dual BSD/GPL to GPL
Don't force the definition of CONFIG_ISA on x86
Always include pci.h
Stop including stat.h
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox [Tue, 26 Jun 2007 21:18:51 +0000 (15:18 -0600)]
[SCSI] Fix async scanning double-add problems
Stress-testing and some thought has revealed some places where
asynchronous scanning needs some more attention to locking.
- Since async_scan is a bit, we need to hold the host_lock while
modifying it to prevent races against other CPUs modifying the word
that bit is in. This is probably a theoretical race for the moment,
but other patches may change that.
- The async_scan bit means not only that this host is being scanned
asynchronously, but that all the devices attached to this host are not
yet added to sysfs. So we must ensure that this bit is always in sync.
I've chosen to do this with the scan_mutex since it's already acquired
in most of the right places.
- If the host changes state to deleted while we're in the middle of
a scan, we'll end up with some devices on the host's list which must
be deleted. Add a check to scsi_sysfs_add_devices() to ensure the
host is still running.
- To avoid the async_scan bit being protected by three locks, the
async_scan_lock now only protects the scanning_list.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Tue, 13 Mar 2007 17:52:29 +0000 (12:52 -0500)]
[SCSI] fix write buffer length in scsi_req_map_sg()
sg's may have setup a the buffer with a different length than
the transfer length so we should be using the bufflen passed
in as the request's data len.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] tgt: move tsk_mgmt_response callback to transport class
This moves tsk_mgmt_response callback in struct scsi_host_template to
struct scsi_transport_template since struct scsi_transport_template is
more suitable for the task management stuff.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport
This converts libsrp and ibmvstgt to use srp transport.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
tgt uses scsi_host as I_T nexus. This works for ibmvstgt because it
creates one scsi_host for one initiator. However, other target drivers
don't work like that.
This adds I_T nexus support, which enable one scsi_host to handle
multiple initiators. New scsi_tgt_it_nexus_create/destroy functions
are expected be called transport classes. For example, ibmvstgt
creates an initiator remote port, then the srp transport calls
tgt_it_nexus_create. tgt doesn't manages I_T nexus, instead it tells
tgtd, user-space daemon, to create a new I_T nexus.
On the receiving the response from tgtd, tgt calls
shost->transportt->it_nexus_response. transports should notify a
lld. The srp transport uses it_nexus_response callback in
srp_function_template to do that.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This adds a 'roles' attribute to rport like transport_fc. The role can
be initiator or target. That is, the initiator driver creates target
remote ports and the target driver creates initiator remote ports.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
FUJITA Tomonori [Wed, 27 Jun 2007 07:32:50 +0000 (16:32 +0900)]
[SCSI] ibmvscsi: convert to use the srp transport class
This converts ibmvscsi to use the srp transport class.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Mon, 13 Aug 2007 17:13:18 +0000 (10:13 -0700)]
[SCSI] qla2xxx: Correct 8GB iIDMA support.
Original implementation manipulated the FC_GS values for
port-speed. Transition the codes to use the driver's own
internal representations as this makes for a reduction in
duplicate 'conversion' codes throughout the driver.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Transitioning link-state via NOS/OLS requires a relogin to a
fabric's Management Server. Request relogin when the firmware
issues a point-to-point asynchronous event (0x8030).
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
[GFS2] Revert remounting w/o acl option leaves acls enabled
[GFS2] Fix setting of inherit jdata attr
[GFS2] Fix incorrect error path in prepare_write()
[GFS2] Fix incorrect return code in rgrp.c
[GFS2] soft lockup in rgblk_search
[GFS2] soft lockup detected in databuf_lo_before_commit
[DLM] fix basts for granted PR waiting CW
[DLM] More othercon fixes
[DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero
[DLM] zero unused parts of sockaddr_storage
[DLM] fix NULL ls usage
[DLM] Clear othercon pointers when a connection is closed
Linus Torvalds [Tue, 14 Aug 2007 16:52:12 +0000 (09:52 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c-s3c2410: Build fix
i2c/menelaus: Build fix
i2c-mv64xxx: Reinitialize hw and driver on I2C bus hang
i2c-mpc: Don't disable I2C module on stop condition
i2c-iop3xx: Set I2C_CLASS_HWMON to adapter class
i2c/isp1301_omap: Build fixes, whitespace
i2c-mpc: Pass correct dev_id to free_irq on error path
i2c-i801: Typo: erroneous
Dale Farnsworth [Tue, 14 Aug 2007 16:37:14 +0000 (18:37 +0200)]
i2c-mv64xxx: Reinitialize hw and driver on I2C bus hang
Under certain conditions, the mv64xxx I2C bus can hang preventing
further operation. To make the driver more robust, we now reset
the I2C hardware and the driver state machine when such hangs are
detected.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Tue, 14 Aug 2007 16:37:14 +0000 (18:37 +0200)]
i2c/isp1301_omap: Build fixes, whitespace
Build fixes for isp1301_omap driver. I think an earlier version
of this must have gotten lost somewhere, or maybe it only went
into the Linux-OMAP tree.
Also, some whitespace fixes to bring this more into sync with the
version of this found in the Linux-OMAP tree. (That version has
updates for the OTG controller on the OMAP 1710 which break that
functionality on OMAP 161x boards like the H2, so merging all of
it is not currently an option.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Linus Torvalds [Tue, 14 Aug 2007 16:31:19 +0000 (09:31 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPVS]: Use IP_VS_WAIT_WHILE when encessary.
[NET]: Share correct feature code between bridging and bonding
[ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
[IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
[DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()
[DCCP]: fix theoretical ccids_{read,write}_lock() race
[XFRM]: Clean up duplicate includes in net/xfrm/
[TIPC]: Clean up duplicate includes in net/tipc/
[SUNRPC]: Clean up duplicate includes in net/sunrpc/
[PKT_SCHED]: Clean up duplicate includes in net/sched/
[IPV6]: Clean up duplicate includes in net/ipv6/
[IPV4]: Clean up duplicate includes in net/ipv4/
[ATM]: Clean up duplicate includes in net/atm/
[ATM]: Clean up duplicate includes in drivers/atm/
[IPCONFIG]: ip_auto_config fix
[ATM]: fore200e_param_bs_queue() must be __devinit
This reverts commit 569a7b6c2e8965ff4908003b925757703a3d649c. The
code was correct originally. The default setting for ACLs after a
remount should be to be the same as before the remount.
Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Due to a mix up between the jdata attribute and inherit jdata attribute
it has not been possible to set the inherit jdata attribute on
directories. This is now fixed and the ioctl will report the inherit
jdata attribute for directories rather than the jdata attribute as it
did previously. This stems from our need to have the one bit in the
ioctl attr flags mean two different things according to whether the
underlying inode is a directory or not.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
[GFS2] Fix incorrect error path in prepare_write()
The error path in prepare_write() was incorrect in the (very rare) event
that the transaction fails to start. The following prevents a NULL
pointer dereference,
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
The following patch fixes a bug where 0 was being used as a return code
to indicate "nothing to do" when in fact 0 was a valid block location
which might be returned by the function.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Bob Peterson [Thu, 12 Jul 2007 21:58:50 +0000 (16:58 -0500)]
[GFS2] soft lockup in rgblk_search
This patch seems to fix the problem described in bugzilla bug 246114.
It was written by Steve Whitehouse with some tweaking by me.
The code was looping in the relatively new section of code designed to
search for and reuse unlinked inodes. In cases where it was finding an
appropriate inode to reuse, it was looping around and finding the same
block over and over because a "<=" check should have been a "<" when
comparing the goal block to the last unlinked block found.
Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Bob Peterson [Wed, 11 Jul 2007 20:55:23 +0000 (15:55 -0500)]
[GFS2] soft lockup detected in databuf_lo_before_commit
This is part 2 of the patch for bug #245832, part 1 of which is already
in the git tree.
The problem was that sdp->sd_log_num_databuf was not always being
protected by the gfs2_log_lock spinlock, but the sd_log_le_databuf
(which it is supposed to reflect) was protected. That meant there
was a timing window during which gfs2_log_flush called
databuf_lo_before_commit and the count didn't match what was
really on the linked list in that window. So when it ran out of
items on the linked list, it decremented total_dbuf from 0 to -1 and
thus never left the "while(total_dbuf)" loop.
The solution is to protect the variable sdp->sd_log_num_databuf so
that the value will always match the contents of the linked list,
and therefore the number will never go negative, and therefore, the
loop will be exited properly.
Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
David Teigland [Tue, 7 Aug 2007 14:44:48 +0000 (09:44 -0500)]
[DLM] fix basts for granted PR waiting CW
Fix a long standing bug where a blocking callback would be missed
when there's a granted lock in PR mode and waiting locks in both
PR and CW modes (and the PR lock was added to the waiting queue
before the CW lock). The logic simply compared the numerical values
of the modes to determine if a blocking callback was required, but in
the one case of PR and CW, the lower valued CW mode blocks the higher
valued PR mode. We just need to add a special check for this PR/CW
case in the tests that decide when a blocking callback is needed.
Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
[DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero
There's a memory leak in fs/dlm/member.c::dlm_add_member().
If "dlm_node_weight(ls->ls_name, nodeid)" returns < 0, then
we'll return without freeing the memory allocated to the (at
that point yet unused) 'memb'.
This patch frees the allocated memory in that case and thus
avoids the leak.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
[DLM] Clear othercon pointers when a connection is closed
This patch clears the othercon pointer and frees the memory when a connnection
is closed. This could cause a small memory leak when nodes leave the cluster.
Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Heiko Carstens [Fri, 10 Aug 2007 22:50:30 +0000 (15:50 -0700)]
[IPVS]: Use IP_VS_WAIT_WHILE when encessary.
For architectures that don't have a volatile atomic_ts constructs like
while (atomic_read(&something)); might result in endless loops since a
barrier() is missing which forces the compiler to generate code that
actually reads memory contents.
Fix this in ipvs by using the IP_VS_WAIT_WHILE macro which resolves to
while (expr) { cpu_relax(); }
(why isn't this open coded btw?)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Fri, 10 Aug 2007 22:47:58 +0000 (15:47 -0700)]
[NET]: Share correct feature code between bridging and bonding
http://bugzilla.kernel.org/show_bug.cgi?id=8797 shows that the
bonding driver may produce bogus combinations of the checksum
flags and SG/TSO.
For example, if you bond devices with NETIF_F_HW_CSUM and
NETIF_F_IP_CSUM you'll end up with a bonding device that
has neither flag set. If both have TSO then this produces
an illegal combination.
The bridge device on the other hand has the correct code to
deal with this.
In fact, the same code can be used for both. So this patch
moves that logic into net/core/dev.c and uses it for both
bonding and bridging.
In the process I've made small adjustments such as only
setting GSO_ROBUST if at least one constituent device
supports it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:23:54 +0000 (15:23 -0700)]
[DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()
There's a memory leak in net/dccp/feat.c::dccp_feat_empty_confirm(). If we
hit the 'default:' case of the 'switch' statement, then we return without
freeing 'opt', thus leaking 'struct dccp_opt_pend' bytes.
The leak is fixed easily enough by adding a kfree(opt); before the return
statement.
The patch also changes the layout of the 'switch' to be more in line with
CodingStyle.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Make sure that spin_unlock_wait() is properly ordered wrt atomic_inc().
(akpm: can't we convert this code to use rwlocks?)
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:20:21 +0000 (15:20 -0700)]
[XFRM]: Clean up duplicate includes in net/xfrm/
This patch cleans up duplicate includes in
net/xfrm/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:19:43 +0000 (15:19 -0700)]
[TIPC]: Clean up duplicate includes in net/tipc/
This patch cleans up duplicate includes in
net/tipc/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:19:09 +0000 (15:19 -0700)]
[SUNRPC]: Clean up duplicate includes in net/sunrpc/
This patch cleans up duplicate includes in
net/sunrpc/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:18:31 +0000 (15:18 -0700)]
[PKT_SCHED]: Clean up duplicate includes in net/sched/
This patch cleans up duplicate includes in
net/sched/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:17:58 +0000 (15:17 -0700)]
[IPV6]: Clean up duplicate includes in net/ipv6/
This patch cleans up duplicate includes in
net/ipv6/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:17:24 +0000 (15:17 -0700)]
[IPV4]: Clean up duplicate includes in net/ipv4/
This patch cleans up duplicate includes in
net/ipv4/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:16:42 +0000 (15:16 -0700)]
[ATM]: Clean up duplicate includes in net/atm/
This patch cleans up duplicate includes in
net/atm/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesper Juhl [Fri, 10 Aug 2007 22:15:55 +0000 (15:15 -0700)]
[ATM]: Clean up duplicate includes in drivers/atm/
This patch cleans up duplicate includes in
drivers/atm/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
makes ip_auto_config fall back to DHCP and complain "IP-Config: Incomplete
network configuration information." depending on if CONFIG_IP_PNP_DHCP is
set or not.
The only way I can make ip_auto_config accept my IP config is to add an
entry for the server IP:
I even checked 2.4.x when it was branched for 2.5.x and the test was the
same at the point in time too.
Looking at the proposed change a bit it appears that it is probably
correct, as it's trying to check that ROOT_DEV is nfs root. But if it is
correct then the UNNAMED_MAJOR comparison in the same code block should be
removed as it becomes superfluous.
I'm happy to apply this patch with that modification made.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Adrian Bunk [Fri, 10 Aug 2007 22:14:18 +0000 (15:14 -0700)]
[ATM]: fore200e_param_bs_queue() must be __devinit
WARNING: drivers/built-in.o(.text+0x6203bb): Section mismatch: reference to .init.text:fore200e_param_bs_queue (between 'fore200e_initialize' and 'fore200e_monitor_putc')
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>