platform/kernel/linux-rpi.git
18 years ago[SCSI] megaraid_sas: pci_module_init to pci_register_driver conversion
Michal Piotrowski [Thu, 17 Aug 2006 13:28:22 +0000 (13:28 +0000)]
[SCSI] megaraid_sas: pci_module_init to pci_register_driver conversion

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] fc transport: add fc_host system_hostname attribute and u64_to_wwn()
James Smart [Thu, 17 Aug 2006 12:00:43 +0000 (08:00 -0400)]
[SCSI] fc transport: add fc_host system_hostname attribute and u64_to_wwn()

This patch updates the fc transport for the following:

- Addition of a new attribute "system_hostname" which can be
  used to set the fully qualified hostname that the fc_host
  is attached to. The fc_host can then register this string
  as the FDMI-based host name attribute.
  Note: for NPIV, a fc_host could be associated with a system which
    is not the local system.

- Add the inline function u64_to_wwn(), which is the inverse of the
  existing wwn_to_u64() function.

- Slight reorg, just to keep dynamic attributes with each other, etc

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] convert to PCI_DEVICE() macro
Henrik Kretzschmar [Tue, 15 Aug 2006 09:17:21 +0000 (11:17 +0200)]
[SCSI] convert to PCI_DEVICE() macro

Convert the pci_device_id-table of the megaraid_sas-driver to
the PCI_DEVICE-macro, to safe some lines.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] aic7*: cleanup MODULE_PARM_DESC strings
Randy Dunlap [Tue, 15 Aug 2006 06:09:23 +0000 (23:09 -0700)]
[SCSI] aic7*: cleanup MODULE_PARM_DESC strings

Modify beginning string to be more readable.  Remove one trailing newline.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] fc transport: convert fc_host symbolic_name attribute to a dynamic attribute
James Smart [Mon, 14 Aug 2006 12:20:25 +0000 (08:20 -0400)]
[SCSI] fc transport: convert fc_host symbolic_name attribute to a dynamic attribute

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] remove unnecessary includes of linux/config.h from drivers/scsi/
Dave Jones [Fri, 11 Aug 2006 01:41:13 +0000 (21:41 -0400)]
[SCSI] remove unnecessary includes of linux/config.h from drivers/scsi/

kbuild includes this automatically these days.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f
dave wysochanski [Wed, 9 Aug 2006 18:56:32 +0000 (14:56 -0400)]
[SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f

Some targets may return slight variations of PQ and PDT to indicate
no LUN mapped.  USB UFI setting PDT=0x1f but having reserved bits for
PQ is one example, and NetApp targets returning PQ=1 and PDT=0x1f is
another.  Both instances seem like reasonable responses according to
SPC-3 and UFI specs.

The current scsi_probe_and_add_lun() code adds a scsi_device
for targets that return PQ=1 and PDT=0x1f.  This causes LUNs of type
"UNKNOWN" to show up in /proc/scsi/scsi when no LUNs are mapped.
In addition, subsequent rescans fail to recognize LUNs that may be
added on the target, unless preceded by a write to the delete attribute
of the "UNKNOWN" LUN.

This patch addresses this problem by skipping over the scsi_add_lun()
when PQ=1,PDT=0x1f is encountered, and just returns
SCSI_SCAN_TARGET_PRESENT.

Signed-off-by: Dave Wysochanski <davidw@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] aacraid: Reset adapter in recovery timeout
Mark Haverkamp [Thu, 3 Aug 2006 15:03:30 +0000 (08:03 -0700)]
[SCSI] aacraid: Reset adapter in recovery timeout

Received from Mark Salyzyn

If the adapter is in blinkled (Firmware Assert) when error recovery
timeout actions have been triggered, perform an adapter warm reset and
restart the initialization.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] aacraid: Check for unlikely errors
Mark Haverkamp [Thu, 3 Aug 2006 15:03:07 +0000 (08:03 -0700)]
[SCSI] aacraid: Check for unlikely errors

Received from Mark Salyzyn

The enclosed patch cleans up some code fragments, adds some paranoia
(unproven causes of potential driver failures).

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] aacraid: Restart adapter on firmware assert (Update 2)
Mark Haverkamp [Tue, 8 Aug 2006 15:52:14 +0000 (08:52 -0700)]
[SCSI] aacraid: Restart adapter on firmware assert (Update 2)

Received from Mark Salyzyn

If the adapter should be in a blinkled (Firmware Assert) state when the
driver loads, we will perform a warm restart of the Adapter Firmware to
see if we can rescue the adapter. Possible causes of a blinkled can
occur on some early release motherboard BIOSes, transitory PCI bus
problems on embedded systems or non-x86 based architectures, transitory
startup failures of early release drives or transitory hardware
failures; some of which can bite the adapter later at runtime. Future
enhancements will include recovery during runtime.

Fixed extra whitespace space issue.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] aacraid: interruptible ioctl
Mark Haverkamp [Thu, 3 Aug 2006 15:02:24 +0000 (08:02 -0700)]
[SCSI] aacraid: interruptible ioctl

Received from Mark Salyzyn

This patch allows the FSACTL_SEND_LARGE_FIB, FSACTL_SENDFIB and
FSACTL_SEND_RAW_SRB ioctl calls into the aacraid driver to be
interruptible. Only necessary if the adapter and/or the management
software has gone into some sort of misbehavior and the system is being
rebooted, thus permitting the user management software applications to
be killed relatively cleanly. The FIB queue resource is held out of the
free queue until the adapter finally, if ever, completes the command.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] limit recursion when flushing shost->starved_list
Andreas Herrmann [Wed, 9 Aug 2006 15:31:16 +0000 (17:31 +0200)]
[SCSI] limit recursion when flushing shost->starved_list

Attached is a patch that should limit a possible recursion that can
lead to a stack overflow like follows:

Kernel stack overflow.
CPU:    3    Not tainted
Process zfcperp0.0.d819
(pid: 13897, task: 000000003e0d8cc8, ksp: 000000003499dbb8)
Krnl PSW : 0404000180000000 000000000030f8b2 (get_device+0x12/0x48)
Krnl GPRS: 00000000135a1980 000000000030f758 000000003ed6c1e8 0000000000000005
           0000000000000000 000000000044a780 000000003dbf7000 0000000034e15800
           000000003621c048 070000003499c108 000000003499c1a0 000000003ed6c000
           0000000040895000 00000000408ab630 000000003499c0a0 000000003499c0a0
Krnl Code: a7 fb ff e8 a7 19 00 00 b9 02 00 22 e3 e0 f0 98 00 24 a7 84
Call Trace:
([<000000004089edc2>] scsi_request_fn+0x13e/0x650 [scsi_mod])
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
...
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089fa9e>] scsi_run_host_queues+0x196/0x230 [scsi_mod]
 [<00000000409eba28>] zfcp_erp_thread+0x2638/0x3080 [zfcp]
 [<0000000000107462>] kernel_thread_starter+0x6/0xc
 [<000000000010745c>] kernel_thread_starter+0x0/0xc
<0>Kernel panic - not syncing: Corrupt kernel stack, can't continue.

This stack overflow occurred during tests on s390 using zfcp.
Recursion depth for this panic was 19.

Usually recursion between blk_run_queue and a request_fn is avoided
using QUEUE_FLAG_REENTER. But this does not help if the scsi stack
tries to flush the starved_list of a scsi_host.

Limit recursion depth when flushing the starved_list
of a scsi_host.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] fix up short inquiry printing
James Bottomley [Sun, 6 Aug 2006 23:15:22 +0000 (18:15 -0500)]
[SCSI] fix up short inquiry printing

A recent drivers base commit:

3e95637a48820ff8bedb33e6439def96ccff1de5

Caused the bus to be added to dev_printk, so now our SCSI inquiry short
messages print like this:

scsiscsi 2:0:0:0: Direct access     IBM-ESXS ST973401SS       B519 PQ: 0 ANSI: 5

Just remove the "scsi" from the sdev_printk to compensate.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] Improve inquiry printing
Matthew Wilcox [Tue, 4 Jul 2006 18:15:20 +0000 (12:15 -0600)]
[SCSI] Improve inquiry printing

 - Replace scsi_device_types array API with scsi_device_type function API.
   Gets rid of a lot of common code, as well as being easier to use.
 - Add the new device types in SPC4 r05a, and rename some of the older ones.
 - Reformat the printing of inquiry data; now fits on one line and
   includes PQ.

I think I've addressed all the feedback from the previous versions.  My
current test box prints:

scsi 2:0:1:0: Direct access     HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] ipr: Bump driver version to 2.1.4
Brian King [Wed, 2 Aug 2006 19:58:04 +0000 (14:58 -0500)]
[SCSI] ipr: Bump driver version to 2.1.4

Bump the ipr driver version to 2.1.4.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] ipr: Auto sense handling fix
Brian King [Wed, 2 Aug 2006 19:57:58 +0000 (14:57 -0500)]
[SCSI] ipr: Auto sense handling fix

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>
18 years ago[SCSI] ipr: Properly handle IOA recovered errors
Brian King [Wed, 2 Aug 2006 19:57:51 +0000 (14:57 -0500)]
[SCSI] ipr: Properly handle IOA recovered errors

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>
18 years ago[SCSI] ipr: Handle new SAS error codes
Brian King [Wed, 2 Aug 2006 19:57:44 +0000 (14:57 -0500)]
[SCSI] ipr: Handle new SAS error codes

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>
18 years ago[SCSI] ipr: Add some hardware defined types for SATA
Brian King [Wed, 2 Aug 2006 19:57:36 +0000 (14:57 -0500)]
[SCSI] ipr: Add some hardware defined types for SATA

Add some hardware defined types for SATA. This is required
by future patches to add SATA support to ipr.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] mptfc: add additional fc transport attributes
Michael Reed [Mon, 31 Jul 2006 17:19:30 +0000 (12:19 -0500)]
[SCSI] mptfc: add additional fc transport attributes

Add host_supported_speeds, host_maxframe_size, host_speed, host_fabric_name,
host_port_type, host_port_state, and host_symbolic_name transport attributes
to fusion fibre channel.

Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: Moore, Eric <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] scsi_queue_work() documented return value is incorrect
Michael Reed [Fri, 4 Aug 2006 17:09:24 +0000 (12:09 -0500)]
[SCSI] scsi_queue_work() documented return value is incorrect

If you examine the queue_work() routine you'll see that it returns
1 on success, 0 if the work is already queued.

This patch corrects the source code documentation for the
scsi_queue_work function.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] remove SCSI_STATE_ #defines
Christoph Hellwig [Fri, 4 Aug 2006 15:18:30 +0000 (17:18 +0200)]
[SCSI] remove SCSI_STATE_ #defines

These aren't used anymore since the field in scsi_cmnd where it was
stored has been removed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] DAC960: PCI id table fixup
Brian King [Thu, 3 Aug 2006 18:54:59 +0000 (13:54 -0500)]
[SCSI] DAC960: PCI id table fixup

The PCI ID table in the DAC960 driver conflicts with some devices
that use the ipr driver. All ipr adapters that use this chip
have an IBM subvendor ID and all DAC960 adapters that use this
chip have a Mylex subvendor id.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] advansys pci tweaks.
Dave Jones [Wed, 2 Aug 2006 21:11:49 +0000 (17:11 -0400)]
[SCSI] advansys pci tweaks.

Remove a lot of duplicate #defines from the advansys driver,
and make them look like PCI IDs as defined elsewhere in the kernel.
Also add a module table so that it automatically gets picked up
by tools relying on modinfo output (like say, distro installers).

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] arcmsr: fix up sysfs values
James Bottomley [Fri, 28 Jul 2006 22:36:46 +0000 (17:36 -0500)]
[SCSI] arcmsr: fix up sysfs values

The sysfs files in arcmsr are non-standard in that they aren't simple
filename value pairs, the values actually contain preceeding text which
would have to be parsed.  The idea of sysfs files is that the file name
is the description and the contents is a simple value.

Fix up arcmsr to conform to this standard.

Acked-By: Erich Chen <erich@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] areca sysfs fix
Andrew Morton [Sat, 29 Jul 2006 18:14:08 +0000 (11:14 -0700)]
[SCSI] areca sysfs fix

Remove sysfs_remove_bin_file() return-value checking from the areca driver.

There's nothing a driver can do if sysfs file removal fails, so we'll soon be
changing sysfs_remove_bin_file() to internally print a diagnostic and to
return void.

Cc: Erich Chen <erich@areca.com.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] arcmsr: initial driver, version 1.20.00.13
Erich Chen [Wed, 12 Jul 2006 15:59:32 +0000 (08:59 -0700)]
[SCSI] arcmsr: initial driver, version 1.20.00.13

arcmsr is a driver for the Areca Raid controller, a host based RAID
subsystem that speaks SCSI at the firmware level.

This patch is quite a clean up over the initial submission with
contributions from:

Randy Dunlap <rdunlap@xenotime.net>
Christoph Hellwig <hch@lst.de>
Matthew Wilcox <matthew@wil.cx>
Adrian Bunk <bunk@stusta.de>

Signed-off-by: Erich Chen <erich@areca.com.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] mptsas: add parent port backlink
James Bottomley [Wed, 12 Jul 2006 13:51:04 +0000 (09:51 -0400)]
[SCSI] mptsas: add parent port backlink

This takes advantage of the sas class backlink function to show which
port on an expander is used to communicate with the parent.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[SCSI] megaraid: Add support for change_queue_depth
brking@charter.net [Wed, 5 Jul 2006 22:00:01 +0000 (17:00 -0500)]
[SCSI] megaraid: Add support for change_queue_depth

Adds support for change_queue_depth so that device
queue depth can be changed at runtime through sysfs.

Signed-off-by: <brking@charter.net>
Acked-by: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[PATCH] fix compile regression for a few scsi drivers
Christoph Hellwig [Wed, 26 Jul 2006 07:53:23 +0000 (09:53 +0200)]
[PATCH] fix compile regression for a few scsi drivers

This fixes three drivers to compile again after my patch that removes
the data_cmnd member from struct scsi_cmnd.

The fas216 change is trivial, it should have been using ->cmnd all the
time.

NCR53C9 (which seem to be mostly duplicate driver with esp.c!) is doing
something odd, it should only have looked at ->cmnd before not the saved
copy that is kept for the error handlers sake.  Note that it really
should deal with the sync setting themselves but use the generic domain
validation code that get this right - but that's for later let's push
this simple compile fix for now.

And sorry for the late fix for this, I have been busy with OLS and
associated activities last week.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 26 Jul 2006 14:22:36 +0000 (07:22 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SCSI] esp: Fix build.
  [SPARC]: Fix SA_STATIC_ALLOC value.
  [SPARC64]: Explicitly print return PC when the kernel fault PC is bogus.

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 26 Jul 2006 14:22:10 +0000 (07:22 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV4/IPV6]: Setting 0 for unused port field in RAW IP recvmsg().
  [IPV4] ipmr: ip multicast route bug fix.
  [TG3]: Update version and reldate
  [TG3]: Handle tg3_init_rings() failures
  [TG3]: Add tg3_restart_hw()
  [IPV4]: Clear the whole IPCB, this clears also IPCB(skb)->flags.
  [IPV6]: Clean skb cb on IPv6 input.
  [NETFILTER]: Demote xt_sctp to EXPERIMENTAL
  [NETFILTER]: bridge netfilter: add deferred output hooks to feature-removal-schedule
  [NETFILTER]: xt_pkttype: fix mismatches on locally generated packets
  [NETFILTER]: SNMP NAT: fix byteorder confusion
  [NETFILTER]: conntrack: fix SYSCTL=n compile
  [NETFILTER]: nf_queue: handle NF_STOP and unknown verdicts in nf_reinject
  [NETFILTER]: H.323 helper: fix possible NULL-ptr dereference

18 years ago[PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare
Arjan van de Ven [Wed, 26 Jul 2006 13:40:07 +0000 (15:40 +0200)]
[PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare

The patch below moves the cpu hotplugging higher up in the cpufreq
layering; this is needed to avoid recursive taking of the cpu hotplug
lock and to otherwise detangle the mess.

The new rules are:
1. you must do lock_cpu_hotplug() around the following functions:
   __cpufreq_driver_target
   __cpufreq_governor (for CPUFREQ_GOV_LIMITS operation only)
   __cpufreq_set_policy
2. governer methods (.governer) must NOT take the lock_cpu_hotplug()
   lock in any way; they are called with the lock taken already
3. if your governer spawns a thread that does things, like calling
   __cpufreq_driver_target, your thread must honor rule #1.
4. the policy lock and other cpufreq internal locks nest within
   the lock_cpu_hotplug() lock.

I'm not entirely happy about how the __cpufreq_governor rule ended up
(conditional locking rule depending on the argument) but basically all
callers pass this as a constant so it's not too horrible.

The patch also removes the cpufreq_governor() function since during the
locking audit it turned out to be entirely unused (so no need to fix it)

The patch works on my testbox, but it could use more testing
(otoh... it can't be much worse than the current code)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[IPV4/IPV6]: Setting 0 for unused port field in RAW IP recvmsg().
Tetsuo Handa [Wed, 26 Jul 2006 00:05:35 +0000 (17:05 -0700)]
[IPV4/IPV6]: Setting 0 for unused port field in RAW IP recvmsg().

From: Tetsuo Handa from-linux-kernel@i-love.sakura.ne.jp

The recvmsg() for raw socket seems to return random u16 value
from the kernel stack memory since port field is not initialized.
But I'm not sure this patch is correct.
Does raw socket return any information stored in port field?

[ BSD defines RAW IP recvmsg to return a sin_port value of zero.
  This is described in Steven's TCP/IP Illustrated Volume 2 on
  page 1055, which is discussing the BSD rip_input() implementation. ]

Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] ipmr: ip multicast route bug fix.
Alexey Kuznetsov [Tue, 25 Jul 2006 23:45:12 +0000 (16:45 -0700)]
[IPV4] ipmr: ip multicast route bug fix.

IP multicast route code was reusing an skb which causes use after free
and double free.

From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

Note, it is real skb_clone(), not alloc_skb(). Equeued skb contains
the whole half-prepared netlink message plus room for the rest.
It could be also skb_copy(), if we want to be puristic about mangling
cloned data, but original copy is really not going to be used.

Acked-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Update version and reldate
Michael Chan [Tue, 25 Jul 2006 23:39:12 +0000 (16:39 -0700)]
[TG3]: Update version and reldate

Update version to 3.63.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Handle tg3_init_rings() failures
Michael Chan [Tue, 25 Jul 2006 23:38:29 +0000 (16:38 -0700)]
[TG3]: Handle tg3_init_rings() failures

Handle dev_alloc_skb() failures when initializing the RX rings.
Without proper handling, the driver will crash when using a partial
ring.

Thanks to Stephane Doyon <sdoyon@max-t.com> for reporting the bug and
providing the initial patch.

Howie Xu <howie@vmware.com> also reported the same issue.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add tg3_restart_hw()
Michael Chan [Tue, 25 Jul 2006 23:37:27 +0000 (16:37 -0700)]
[TG3]: Add tg3_restart_hw()

Add tg3_restart_hw() to handle failures when re-initializing the
device.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] cfq-iosched: don't use a hard jiffies value, translate from msecs
Jens Axboe [Tue, 25 Jul 2006 13:05:21 +0000 (15:05 +0200)]
[PATCH] cfq-iosched: don't use a hard jiffies value, translate from msecs

The CIC_SEEKY() test really wants to use the minimum of either:

- 2 msecs (not jiffies)

- or, the pending slice time

So code it like that.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] blktrace: fix read-ahead bit
Milton Miller [Tue, 25 Jul 2006 13:04:13 +0000 (15:04 +0200)]
[PATCH] blktrace: fix read-ahead bit

It should be toggling the same bit on and off, fix it up.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] cciss: fix stall with softirq handling and CFQ
Jens Axboe [Tue, 25 Jul 2006 13:02:48 +0000 (15:02 +0200)]
[PATCH] cciss: fix stall with softirq handling and CFQ

We need to postpone the queue startup until after the softirq
handler has actually finished some requests, otherwise we could
be racing with cciss_softirq_done() and not actually restart
the queue handling.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[IPV4]: Clear the whole IPCB, this clears also IPCB(skb)->flags.
Guillaume Chazarain [Tue, 25 Jul 2006 06:45:16 +0000 (23:45 -0700)]
[IPV4]: Clear the whole IPCB, this clears also IPCB(skb)->flags.

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Clean skb cb on IPv6 input.
Guillaume Chazarain [Tue, 25 Jul 2006 06:44:44 +0000 (23:44 -0700)]
[IPV6]: Clean skb cb on IPv6 input.

Clear the accumulated junk in IP6CB when starting to handle an IPV6
packet.

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Demote xt_sctp to EXPERIMENTAL
Patrick McHardy [Tue, 25 Jul 2006 05:55:29 +0000 (22:55 -0700)]
[NETFILTER]: Demote xt_sctp to EXPERIMENTAL

After the recent problems with all the SCTP stuff it seems reasonable
to mark this as experimental.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: bridge netfilter: add deferred output hooks to feature-removal-schedule
Patrick McHardy [Tue, 25 Jul 2006 05:54:55 +0000 (22:54 -0700)]
[NETFILTER]: bridge netfilter: add deferred output hooks to feature-removal-schedule

Add bridge netfilter deferred output hooks to feature-removal-schedule
and disable them by default. Until their removal they will be
activated by the physdev match when needed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: xt_pkttype: fix mismatches on locally generated packets
Phil Oester [Tue, 25 Jul 2006 05:54:14 +0000 (22:54 -0700)]
[NETFILTER]: xt_pkttype: fix mismatches on locally generated packets

Locally generated broadcast and multicast packets have pkttype set to
PACKET_LOOPBACK instead of PACKET_BROADCAST or PACKET_MULTICAST. This
causes the pkttype match to fail to match packets of either type.

The below patch remedies this by using the daddr as a hint as to
broadcast|multicast. While not pretty, this seems like the only way
to solve the problem short of just noting this as a limitation of the
match.

This resolves netfilter bugzilla #484

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: SNMP NAT: fix byteorder confusion
Patrick McHardy [Tue, 25 Jul 2006 05:53:35 +0000 (22:53 -0700)]
[NETFILTER]: SNMP NAT: fix byteorder confusion

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: conntrack: fix SYSCTL=n compile
Adrian Bunk [Tue, 25 Jul 2006 05:53:12 +0000 (22:53 -0700)]
[NETFILTER]: conntrack: fix SYSCTL=n compile

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: nf_queue: handle NF_STOP and unknown verdicts in nf_reinject
Patrick McHardy [Tue, 25 Jul 2006 05:52:47 +0000 (22:52 -0700)]
[NETFILTER]: nf_queue: handle NF_STOP and unknown verdicts in nf_reinject

In case of an unknown verdict or NF_STOP the packet leaks. Unknown verdicts
can happen when userspace is buggy. Reinject the packet in case of NF_STOP,
drop on unknown verdicts.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: fix possible NULL-ptr dereference
Patrick McHardy [Tue, 25 Jul 2006 05:52:10 +0000 (22:52 -0700)]
[NETFILTER]: H.323 helper: fix possible NULL-ptr dereference

An RCF message containing a timeout results in a NULL-ptr dereference if
no RRQ has been seen before.

Noticed by the "SATURN tool", reported by Thomas Dillig <tdillig@stanford.edu>
and Isil Dillig <isil@stanford.edu>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCSI] esp: Fix build.
David S. Miller [Tue, 25 Jul 2006 05:47:14 +0000 (22:47 -0700)]
[SCSI] esp: Fix build.

The data_cmd[] member got deleted, so do not use it any more.  Scsi
commands do not have their ->cmd[] overwritten temporary to probe for
status after an error before retrying.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Fix SA_STATIC_ALLOC value.
David S. Miller [Sat, 22 Jul 2006 09:05:07 +0000 (02:05 -0700)]
[SPARC]: Fix SA_STATIC_ALLOC value.

It alises IRQF_SHARED which causes all kinds of
problems.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Explicitly print return PC when the kernel fault PC is bogus.
David S. Miller [Sat, 22 Jul 2006 08:12:09 +0000 (01:12 -0700)]
[SPARC64]: Explicitly print return PC when the kernel fault PC is bogus.

That way we'll have at least some debugging info even if
the stack dump explodes.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Correct dev_alloc_skb kerneldoc
Christoph Hellwig [Mon, 24 Jul 2006 22:31:14 +0000 (15:31 -0700)]
[NET]: Correct dev_alloc_skb kerneldoc

dev_alloc_skb is designated for RX descriptors, not TX.  (Some drivers
use it for the latter anyway, but that's a different story)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Remove CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
Christoph Hellwig [Mon, 24 Jul 2006 22:30:28 +0000 (15:30 -0700)]
[NET]: Remove CONFIG_HAVE_ARCH_DEV_ALLOC_SKB

skbuff.h has an #ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB to allow
architectures to reimplement __dev_alloc_skb.  It's not set on any
architecture and now that we have an architecture-overrideable
NET_SKB_PAD there is not point at all to have one either.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[VLAN]: Fix link state propagation
Stefan Rompf [Mon, 24 Jul 2006 20:52:13 +0000 (13:52 -0700)]
[VLAN]: Fix link state propagation

When the queue of the underlying device is stopped at initialization time
or the device is marked "not present", the state will be propagated to the
vlan device and never change. Based on an analysis by Patrick McHardy.

Signed-off-by: Stefan Rompf <stefan@loplof.de>
ACKed-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] xfrm6_tunnel: Delete debugging code.
David S. Miller [Mon, 24 Jul 2006 20:49:06 +0000 (13:49 -0700)]
[IPV6] xfrm6_tunnel: Delete debugging code.

It doesn't compile, and it's dubious in several regards:

1) is enabled by non-Kconfig controlled CONFIG_* value
   (noted by Randy Dunlap)
2) XFRM6_TUNNEL_SPI_MAGIC is defined after it's first use
3) the debugging messages print object pointer addresses
   which have no meaning without context

So let's just get rid of it.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[Bluetooth] Enable SCO support for Broadcom HID proxy dongle
Marcel Holtmann [Tue, 18 Jul 2006 16:32:33 +0000 (18:32 +0200)]
[Bluetooth] Enable SCO support for Broadcom HID proxy dongle

The Broadcom dongles with HID proxy support actually support SCO over
HCI if the SCO buffer size values are corrected. So instead of disabling
the SCO support, mark this dongle with the quirk for the Bluetooth core
to correct the wrong buffer size values.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
18 years ago[Bluetooth] Add quirk for another broken RTX Telecom based dongle
Marcel Holtmann [Tue, 18 Jul 2006 16:04:59 +0000 (18:04 +0200)]
[Bluetooth] Add quirk for another broken RTX Telecom based dongle

This patch disables the ISOC transfers for another broken RTX Telecom
based USB dongle. Starting the USB ISOC transfers only ends in a burst
of error messages for invalid SCO packets on connection handle 0.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
18 years ago[Bluetooth] Correct SCO buffer size for Belkin devices
Marcel Holtmann [Tue, 18 Jul 2006 15:47:40 +0000 (17:47 +0200)]
[Bluetooth] Correct SCO buffer size for Belkin devices

The Belkin F8T012 and F8T013 devices are both based on a Bluetooth chip
from Broadcom and their SCO buffer size values are wrong. The Bluetooth
core should correct these values.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
18 years ago[Bluetooth] Correct SCO buffer size for another Broadcom chip
Marcel Holtmann [Fri, 14 Jul 2006 14:01:52 +0000 (16:01 +0200)]
[Bluetooth] Correct SCO buffer size for another Broadcom chip

The SCO buffer size values on IBM/Lenovo ThinkPad laptops with a
Bluetooth chip from Broadcom are wrong. The USB Bluetooth driver
has to set a quirk to correct the SCO buffer size values.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
18 years ago[Bluetooth] Correct RFCOMM channel MTU for broken implementations
Marcel Holtmann [Fri, 14 Jul 2006 09:42:12 +0000 (11:42 +0200)]
[Bluetooth] Correct RFCOMM channel MTU for broken implementations

Some Bluetooth RFCOMM implementations try to negotiate a bigger channel
MTU than we can support for a particular session. The maximum MTU for
a RFCOMM session is limited through the L2CAP layer. So if the other
side proposes a channel MTU that is bigger than the underlying L2CAP
MTU, we should reduce it to the L2CAP MTU of the session minus five
bytes for the RFCOMM headers.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
18 years ago[PKT_SCHED]: Fix regression in PSCHED_TADD{,2}.
Guillaume Chazarain [Mon, 24 Jul 2006 06:37:24 +0000 (23:37 -0700)]
[PKT_SCHED]: Fix regression in PSCHED_TADD{,2}.

In PSCHED_TADD and PSCHED_TADD2, if delta is less than tv.tv_usec (so,
less than USEC_PER_SEC too) then tv_res will be smaller than tv. The
affectation "(tv_res).tv_usec = __delta;" is wrong.  The fix is to
revert to the original code before
4ee303dfeac6451b402e3d8512723d3a0f861857 and change the 'if' in
'while'.

[Shuya MAEDA: "while (__delta >= USEC_PER_SEC){ ... }" instead of
"while (__delta > USEC_PER_SEC){ ... }"]

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Fix default sequence window size
Ian McDonald [Mon, 24 Jul 2006 06:33:28 +0000 (23:33 -0700)]
[DCCP]: Fix default sequence window size

When using the default sequence window size (100) I got the following in
my logs:

Jun 22 14:24:09 localhost kernel: [ 1492.114775] DCCP: Step 6 failed for
DATA packet, (LSWL(6279674225) <= P.seqno(6279674749) <=
S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
P.ackno(1125899906842620) <= S.AWH(18798206548), sending SYNC...
Jun 22 14:24:09 localhost kernel: [ 1492.115147] DCCP: Step 6 failed for
DATA packet, (LSWL(6279674225) <= P.seqno(6279674750) <=
S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
P.ackno(1125899906842620) <= S.AWH(18798206549), sending SYNC...

I went to alter the default sysctl and it didn't take for new sockets.
Below patch fixes this.

I think the default is too low but it is what the DCCP spec specifies.

As a side effect of this my rx speed using iperf goes from about 2.8 Mbits/sec
to 3.5. This is still far too slow but it is a step in the right direction.

Compile tested only for IPv6 but not particularly complex change.

Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoIB/mthca: Initialize max_cmds before debug code prints it
Roland Dreier [Mon, 24 Jul 2006 16:36:50 +0000 (09:36 -0700)]
IB/mthca: Initialize max_cmds before debug code prints it

Read the max_cmds value from the response to the QUERY_FW command
before printing out the value, so that the real value goes into the
debug output.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipoib: Fix packet loss after hardware address update
Michael S. Tsirkin [Wed, 19 Jul 2006 14:44:37 +0000 (17:44 +0300)]
IB/ipoib: Fix packet loss after hardware address update

The neighbour ha field may get updated without destroying the
neighbour.  In this case, the ha field gets out of sync with the
address handle stored in ipoib_neigh->ah, with the result that
the ah field would point to an incorrect path, resulting in all
packets being lost.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipoib: Fix oops with ipoib_debug_mcast set
Or Gerlitz [Mon, 24 Jul 2006 07:42:00 +0000 (10:42 +0300)]
IB/ipoib: Fix oops with ipoib_debug_mcast set

Need to set mcast->ah before debug code dereferences it.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mad: Validate MADs for spec compliance
Sean Hefty [Thu, 20 Jul 2006 08:25:50 +0000 (11:25 +0300)]
IB/mad: Validate MADs for spec compliance

Validate MADs sent by userspace clients for spec compliance with
C13-18.1.1 (prevent duplicate requests and responses sent on the
same port).  Without this, RMPP transactions get aborted because
of duplicate packets.

This patch is similar to that provided by Jack Morgenstein.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: ipath_skip_sge() can break if num_sge > 1
Ralph Campbell [Tue, 18 Jul 2006 01:21:24 +0000 (18:21 -0700)]
IB/ipath: ipath_skip_sge() can break if num_sge > 1

ipath_skip_sge() doesn't exactly duplicate the side effects of
ipath_copy_sge() if num_sge > 1 since it doesn't decrement ss->num_sge.
This could result in the sg_list being accessed out of bounds.
Since ipath_skip_sge() is almost always called with num_sge == 1,
the original "optimization" is almost never used.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix ib_ipath driver to work with SRP
Ralph Campbell [Tue, 18 Jul 2006 01:19:54 +0000 (18:19 -0700)]
IB/ipath: Fix ib_ipath driver to work with SRP

I am still working on a proposal to remove the phys_to_virt() calls
in the ib_ipath driver.  In the mean time, this patch allows SRP
to work by fixing the R_Key check and conversion from IB address
to kernel virtual address.  It also returns the correct page size
for FMRs.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Fix a data corruption
Ralph Campbell [Tue, 18 Jul 2006 01:18:36 +0000 (18:18 -0700)]
IB/ipath: Fix a data corruption

This patch fixes a problem where certain error packets are passed
to the InfiniBand layer for processing even though the packet
actually was received with an error.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix SRQ limit event range check
Dotan Barak [Thu, 13 Jul 2006 08:05:49 +0000 (11:05 +0300)]
IB/mthca: Fix SRQ limit event range check

Mem-free HCAs always keep one spare SRQ WQE, so the SRQ limit cannot
be set beyond srq->max - 1.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Fix lockdep warnings
Roland Dreier [Sun, 23 Jul 2006 22:16:04 +0000 (15:16 -0700)]
IB/uverbs: Fix lockdep warnings

Lockdep warns because uverbs is trying to take uobj->mutex when it
already holds that lock.  This is because there are really multiple
types of uobjs even though all of their locks are initialized in
common code.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Fix unlocking in error paths
Michael S. Tsirkin [Mon, 17 Jul 2006 15:20:51 +0000 (18:20 +0300)]
IB/uverbs: Fix unlocking in error paths

ib_uverbs_create_ah() and ib_uverbs_create_srq() did not release the
PD's read lock in their error paths, which lead to deadlock when
destroying the PD.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[PATCH] Cpuset: fix ABBA deadlock with cpu hotplug lock
Paul Jackson [Sun, 23 Jul 2006 18:36:08 +0000 (11:36 -0700)]
[PATCH] Cpuset: fix ABBA deadlock with cpu hotplug lock

Fix ABBA deadlock between lock_cpu_hotplug() and the cpuset
callback_mutex lock.

It only happens on cpu_exclusive cpusets, due to the dynamic
sched domain code trying to take the cpu hotplug lock inside
the cpuset callback_mutex lock.

This bug has apparently been here for several months, but didn't
get hit until the right customer load on a large system.

This fix appears right from inspection, but it will take a few
more days running it on that customers workload to be confident
we nailed it.  We don't have any other reproducible test case.

The cpu_hotplug_lock() tends to cover large runs of code.
The other places that hold both that lock and the cpuset callback
mutex lock always nest the cpuset lock inside the hotplug lock.
This place tries to do the reverse, risking an ABBA deadlock.

This is in the cpuset_rmdir() code, where we:
  * take the callback_mutex lock
  * mark the cpuset CS_REMOVED
  * call update_cpu_domains for cpu_exclusive cpusets
  * in that call, take the cpu_hotplug lock if the
    cpuset is marked for removal.

Thanks to Jack Steiner for identifying this deadlock.

The fix is to tear down the dynamic sched domain before we grab
the cpuset callback_mutex lock.  This way, the two locks are
serialized, with the hotplug lock taken and released before
trying for the cpuset lock.

I suspect that this bug was introduced when I changed the
cpuset locking from one lock to two.  The dynamic sched domain
dependency on cpu_exclusive cpusets and its hotplug hooks were
added to this code earlier, when cpusets had only a single lock.
It may well have been fine then.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agocpu hotplug: simplify and hopefully fix locking
Linus Torvalds [Sun, 23 Jul 2006 19:12:16 +0000 (12:12 -0700)]
cpu hotplug: simplify and hopefully fix locking

The CPU hotplug locking was quite messy, with a recursive lock to
handle the fact that both the actual up/down sequence wanted to
protect itself from being re-entered, but the callbacks that it
called also tended to want to protect themselves from CPU events.

This splits the lock into two (one to serialize the whole hotplug
sequence, the other to protect against the CPU present bitmaps
changing). The latter still allows recursive usage because some
subsystems (ondemand policy for cpufreq at least) had already gotten
too used to the lax locking, but the locking mistakes are hopefully
now less fundamental, and we now warn about recursive lock usage
when we see it, in the hope that it can be fixed.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[cpufreq] ondemand: make shutdown sequence more robust
Linus Torvalds [Sun, 23 Jul 2006 19:05:00 +0000 (12:05 -0700)]
[cpufreq] ondemand: make shutdown sequence more robust

Shutting down the ondemand policy was fraught with potential
problems, causing issues for SMP suspend (which wants to hot-
unplug) all but the last CPU.

This should fix at least the worst problems (divide-by-zero
and infinite wait for the workqueue to shut down).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 21 Jul 2006 23:44:45 +0000 (16:44 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  [TIPC]: Removing useless casts
  [IPV4]: Fix nexthop realm dumping for multipath routes
  [DUMMY]: Avoid an oops when dummy_init_one() failed
  [IFB] After ifb_init_one() failed, i is increased. Decrease
  [NET]: Fix reversed error test in netif_tx_trylock
  [MAINTAINERS]: Mark LAPB as Oprhan.
  [NET]: Conversions from kmalloc+memset to k(z|c)alloc.
  [NET]: sun happymeal, little pci cleanup
  [IrDA]: Use alloc_skb() in IrDA TX path
  [I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine
  [I/OAT]: net/core/user_dma.c should #include <net/netdma.h>
  [SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed
  [SCTP]: Set chunk->data_accepted only if we are going to accept it.
  [SCTP]: Verify all the paths to a peer via heartbeat before using them.
  [SCTP]: Unhash the endpoint in sctp_endpoint_free().
  [SCTP]: Check for NULL arg to sctp_bucket_destroy().
  [PKT_SCHED] netem: Fix slab corruption with netem (2nd try)
  [WAN]: Converted synclink drivers to use netif_carrier_*()
  [WAN]: Cosmetic changes to N2 and C101 drivers
  [WAN]: Added missing netif_dormant_off() to generic HDLC
  ...

18 years ago[TIPC]: Removing useless casts
Panagiotis Issaris [Fri, 21 Jul 2006 22:52:20 +0000 (15:52 -0700)]
[TIPC]: Removing useless casts

Removing useless casts

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: Fix nexthop realm dumping for multipath routes
Patrick McHardy [Fri, 21 Jul 2006 22:09:55 +0000 (15:09 -0700)]
[IPV4]: Fix nexthop realm dumping for multipath routes

Routing realms exist per nexthop, but are only returned to userspace
for the first nexthop. This is due to the fact that iproute2 only
allows to set the realm for the first nexthop and the kernel refuses
multipath routes where only a single realm is present.

Dump all realms for multipath routes to enable iproute to correctly
display them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DUMMY]: Avoid an oops when dummy_init_one() failed
Nicolas Dichtel [Fri, 21 Jul 2006 22:09:07 +0000 (15:09 -0700)]
[DUMMY]: Avoid an oops when dummy_init_one() failed

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IFB] After ifb_init_one() failed, i is increased. Decrease
Nicolas Dichtel [Fri, 21 Jul 2006 21:56:02 +0000 (14:56 -0700)]
[IFB] After ifb_init_one() failed, i is increased. Decrease

It before entering in the loop for freeing the other ifb devices.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Fix reversed error test in netif_tx_trylock
Herbert Xu [Fri, 21 Jul 2006 21:55:38 +0000 (14:55 -0700)]
[NET]: Fix reversed error test in netif_tx_trylock

A non-zero return value indicates success from spin_trylock,
not error.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[MAINTAINERS]: Mark LAPB as Oprhan.
David S. Miller [Fri, 21 Jul 2006 21:55:17 +0000 (14:55 -0700)]
[MAINTAINERS]: Mark LAPB as Oprhan.

Maintainer email not longer exists.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Panagiotis Issaris [Fri, 21 Jul 2006 21:51:30 +0000 (14:51 -0700)]
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: sun happymeal, little pci cleanup
Jiri Slaby [Fri, 21 Jul 2006 21:51:02 +0000 (14:51 -0700)]
[NET]: sun happymeal, little pci cleanup

Use pci_register_driver instead of pci_module_init. Use PCI_DEVICE macro.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IrDA]: Use alloc_skb() in IrDA TX path
Samuel Ortiz [Fri, 21 Jul 2006 21:50:41 +0000 (14:50 -0700)]
[IrDA]: Use alloc_skb() in IrDA TX path

As pointed out by Christoph Hellwig, dev_alloc_skb() is not intended to be
used for allocating TX sk_buff. The IrDA stack was exclusively calling
dev_alloc_skb() on the TX path, and this patch fixes that.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine
Henrik Kretzschmar [Fri, 21 Jul 2006 21:50:13 +0000 (14:50 -0700)]
[I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine

Changes pci_module_init() to pci_register_driver().

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[I/OAT]: net/core/user_dma.c should #include <net/netdma.h>
Adrian Bunk [Fri, 21 Jul 2006 21:49:49 +0000 (14:49 -0700)]
[I/OAT]: net/core/user_dma.c should #include <net/netdma.h>

Every file should #include the headers containing the prototypes for
its global functions.

Especially in cases like this one where gcc can tell us through a
compile error that the prototype was wrong...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed
Sridhar Samudrala [Fri, 21 Jul 2006 21:49:25 +0000 (14:49 -0700)]
[SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed

This implements Rules D1 and D4 of Sec 4.3 in the ADDIP draft.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Set chunk->data_accepted only if we are going to accept it.
Sridhar Samudrala [Fri, 21 Jul 2006 21:49:07 +0000 (14:49 -0700)]
[SCTP]: Set chunk->data_accepted only if we are going to accept it.

Currently there is a code path in sctp_eat_data() where it is possible
to set this flag even when we are dropping this chunk.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Verify all the paths to a peer via heartbeat before using them.
Sridhar Samudrala [Fri, 21 Jul 2006 21:48:50 +0000 (14:48 -0700)]
[SCTP]: Verify all the paths to a peer via heartbeat before using them.

This patch implements Path Initialization procedure as described in
Sec 2.36 of RFC4460.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Unhash the endpoint in sctp_endpoint_free().
Vlad Yasevich [Fri, 21 Jul 2006 21:48:26 +0000 (14:48 -0700)]
[SCTP]: Unhash the endpoint in sctp_endpoint_free().

This prevents a race between the close of a socket and receive of an
incoming packet.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Check for NULL arg to sctp_bucket_destroy().
Sridhar Samudrala [Fri, 21 Jul 2006 21:45:47 +0000 (14:45 -0700)]
[SCTP]: Check for NULL arg to sctp_bucket_destroy().

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKT_SCHED] netem: Fix slab corruption with netem (2nd try)
Guillaume Chazarain [Fri, 21 Jul 2006 21:45:25 +0000 (14:45 -0700)]
[PKT_SCHED] netem: Fix slab corruption with netem (2nd try)

CONFIG_DEBUG_SLAB found the following bug:
netem_enqueue() in sch_netem.c gets a pointer inside a slab object:
struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb;
But then, the slab object may be freed:
skb = skb_unshare(skb, GFP_ATOMIC)
cb is still pointing inside the freed skb, so here is a patch to
initialize cb later, and make it clear that initializing it sooner
is a bad idea.

[From Stephen Hemminger: leave cb unitialized in order to let gcc
complain in case of use before initialization]

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[WAN]: Converted synclink drivers to use netif_carrier_*()
Krzysztof Halasa [Fri, 21 Jul 2006 21:44:55 +0000 (14:44 -0700)]
[WAN]: Converted synclink drivers to use netif_carrier_*()

WAN: Converted synclink drivers to use netif_carrier_*() instead
of hdlc_set_carrier().

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[WAN]: Cosmetic changes to N2 and C101 drivers
Krzysztof Halasa [Fri, 21 Jul 2006 21:41:36 +0000 (14:41 -0700)]
[WAN]: Cosmetic changes to N2 and C101 drivers

WAN: Cosmetic changes to N2 and C101 drivers

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[WAN]: Added missing netif_dormant_off() to generic HDLC
Krzysztof Halasa [Fri, 21 Jul 2006 21:41:01 +0000 (14:41 -0700)]
[WAN]: Added missing netif_dormant_off() to generic HDLC

WAN: Fixed a problem with PPP/raw HDLC/X.25 protocols not doing
netif_dormant_off() at startup.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: Get rid of redundant IPCB->opts initialisation
Herbert Xu [Fri, 21 Jul 2006 21:29:53 +0000 (14:29 -0700)]
[IPV4]: Get rid of redundant IPCB->opts initialisation

Now that we always zero the IPCB->opts in ip_rcv, it is no longer
necessary to do so before calling netif_rx for tunneled packets.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Update defconfig.
David S. Miller [Fri, 21 Jul 2006 21:19:45 +0000 (14:19 -0700)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>