Linus Torvalds [Fri, 8 Feb 2008 02:22:29 +0000 (18:22 -0800)]
Merge branch 'slub-linus' of git://git./linux/kernel/git/christoph/vm
* 'slub-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
SLUB: fix checkpatch warnings
Use non atomic unlock
SLUB: Support for performance statistics
SLUB: Alternate fast paths using cmpxchg_local
SLUB: Use unique end pointer for each slab page.
SLUB: Deal with annoying gcc warning on kfree()
Ingo Molnar [Wed, 6 Feb 2008 01:57:39 +0000 (17:57 -0800)]
SLUB: fix checkpatch warnings
fix checkpatch --file mm/slub.c errors and warnings.
$ q-code-quality-compare
errors lines of code errors/KLOC
mm/slub.c [before] 22 4204 5.2
mm/slub.c [after] 0 4210 0
no code changed:
text data bss dec hex filename
22195 8634 136 30965 78f5 slub.o.before
22195 8634 136 30965 78f5 slub.o.after
md5:
93cdfbec2d6450622163c590e1064358 slub.o.before.asm
93cdfbec2d6450622163c590e1064358 slub.o.after.asm
[clameter: rediffed against Pekka's cleanup patch, omitted
moves of the name of a function to the start of line]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Nick Piggin [Tue, 8 Jan 2008 07:20:27 +0000 (23:20 -0800)]
Use non atomic unlock
Slub can use the non-atomic version to unlock because other flags will not
get modified with the lock held.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Christoph Lameter [Fri, 8 Feb 2008 01:47:41 +0000 (17:47 -0800)]
SLUB: Support for performance statistics
The statistics provided here allow the monitoring of allocator behavior but
at the cost of some (minimal) loss of performance. Counters are placed in
SLUB's per cpu data structure. The per cpu structure may be extended by the
statistics to grow larger than one cacheline which will increase the cache
footprint of SLUB.
There is a compile option to enable/disable the inclusion of the runtime
statistics and its off by default.
The slabinfo tool is enhanced to support these statistics via two options:
-D Switches the line of information displayed for a slab from size
mode to activity mode.
-A Sorts the slabs displayed by activity. This allows the display of
the slabs most important to the performance of a certain load.
-r Report option will report detailed statistics on
Example (tbench load):
slabinfo -AD ->Shows the most active slabs
Name Objects Alloc Free %Fast
skbuff_fclone_cache 33
111953835 111953835 99 99
:
0000192 2666
5283688 5281047 99 99
:
0001024 849
5247230 5246389 83 83
vm_area_struct 1349 119642 118355 91 22
:
0004096 15 66753 66751 98 98
:
0000064 2067 25297 23383 98 78
dentry 10259 28635 18464 91 45
:
0000080 11004 18950 8089 98 98
:
0000096 1703 12358 10784 99 98
:
0000128 762 10582 9875 94 18
:
0000512 184 9807 9647 95 81
:
0002048 479 9669 9195 83 65
anon_vma 777 9461 9002 99 71
kmalloc-8 6492 9981 5624 99 97
:
0000768 258 7174 6931 58 15
So the skbuff_fclone_cache is of highest importance for the tbench load.
Pretty high load on the 192 sized slab. Look for the aliases
slabinfo -a | grep 000192
:
0000192 <- xfs_btree_cur filp kmalloc-192 uid_cache tw_sock_TCP
request_sock_TCPv6 tw_sock_TCPv6 skbuff_head_cache xfs_ili
Likely skbuff_head_cache.
Looking into the statistics of the skbuff_fclone_cache is possible through
slabinfo skbuff_fclone_cache ->-r option implied if cache name is mentioned
.... Usual output ...
Slab Perf Counter Alloc Free %Al %Fr
--------------------------------------------------
Fastpath
111953360 111946981 99 99
Slowpath 1044 7423 0 0
Page Alloc 272 264 0 0
Add partial 25 325 0 0
Remove partial 86 264 0 0
RemoteObj/SlabFrozen 350 4832 0 0
Total
111954404 111954404
Flushes 49 Refill 0
Deactivate Full=325(92%) Empty=0(0%) ToHead=24(6%) ToTail=1(0%)
Looks good because the fastpath is overwhelmingly taken.
skbuff_head_cache:
Slab Perf Counter Alloc Free %Al %Fr
--------------------------------------------------
Fastpath
5297262 5259882 99 99
Slowpath 4477 39586 0 0
Page Alloc 937 824 0 0
Add partial 0 2515 0 0
Remove partial 1691 824 0 0
RemoteObj/SlabFrozen 2621 9684 0 0
Total
5301739 5299468
Deactivate Full=2620(100%) Empty=0(0%) ToHead=0(0%) ToTail=0(0%)
Descriptions of the output:
Total: The total number of allocation and frees that occurred for a
slab
Fastpath: The number of allocations/frees that used the fastpath.
Slowpath: Other allocations
Page Alloc: Number of calls to the page allocator as a result of slowpath
processing
Add Partial: Number of slabs added to the partial list through free or
alloc (occurs during cpuslab flushes)
Remove Partial: Number of slabs removed from the partial list as a result of
allocations retrieving a partial slab or by a free freeing
the last object of a slab.
RemoteObj/Froz: How many times were remotely freed object encountered when a
slab was about to be deactivated. Frozen: How many times was
free able to skip list processing because the slab was in use
as the cpuslab of another processor.
Flushes: Number of times the cpuslab was flushed on request
(kmem_cache_shrink, may result from races in __slab_alloc)
Refill: Number of times we were able to refill the cpuslab from
remotely freed objects for the same slab.
Deactivate: Statistics how slabs were deactivated. Shows how they were
put onto the partial list.
In general fastpath is very good. Slowpath without partial list processing is
also desirable. Any touching of partial list uses node specific locks which
may potentially cause list lock contention.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Christoph Lameter [Tue, 8 Jan 2008 07:20:30 +0000 (23:20 -0800)]
SLUB: Alternate fast paths using cmpxchg_local
Provide an alternate implementation of the SLUB fast paths for alloc
and free using cmpxchg_local. The cmpxchg_local fast path is selected
for arches that have CONFIG_FAST_CMPXCHG_LOCAL set. An arch should only
set CONFIG_FAST_CMPXCHG_LOCAL if the cmpxchg_local is faster than an
interrupt enable/disable sequence. This is known to be true for both
x86 platforms so set FAST_CMPXCHG_LOCAL for both arches.
Currently another requirement for the fastpath is that the kernel is
compiled without preemption. The restriction will go away with the
introduction of a new per cpu allocator and new per cpu operations.
The advantages of a cmpxchg_local based fast path are:
1. Potentially lower cycle count (30%-60% faster)
2. There is no need to disable and enable interrupts on the fast path.
Currently interrupts have to be disabled and enabled on every
slab operation. This is likely avoiding a significant percentage
of interrupt off / on sequences in the kernel.
3. The disposal of freed slabs can occur with interrupts enabled.
The alternate path is realized using #ifdef's. Several attempts to do the
same with macros and inline functions resulted in a mess (in particular due
to the strange way that local_interrupt_save() handles its argument and due
to the need to define macros/functions that sometimes disable interrupts
and sometimes do something else).
[clameter: Stripped preempt bits and disabled fastpath if preempt is enabled]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Christoph Lameter [Tue, 8 Jan 2008 07:20:29 +0000 (23:20 -0800)]
SLUB: Use unique end pointer for each slab page.
We use a NULL pointer on freelists to signal that there are no more objects.
However the NULL pointers of all slabs match in contrast to the pointers to
the real objects which are in different ranges for different slab pages.
Change the end pointer to be a pointer to the first object and set bit 0.
Every slab will then have a different end pointer. This is necessary to ensure
that end markers can be matched to the source slab during cmpxchg_local.
Bring back the use of the mapping field by SLUB since we would otherwise have
to call a relatively expensive function page_address() in __slab_alloc(). Use
of the mapping field allows avoiding a call to page_address() in various other
functions as well.
There is no need to change the page_mapping() function since bit 0 is set on
the mapping as also for anonymous pages. page_mapping(slab_page) will
therefore still return NULL although the mapping field is overloaded.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Christoph Lameter [Fri, 8 Feb 2008 01:47:41 +0000 (17:47 -0800)]
SLUB: Deal with annoying gcc warning on kfree()
gcc 4.2 spits out an annoying warning if one casts a const void *
pointer to a void * pointer. No warning is generated if the
conversion is done through an assignment.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Linus Torvalds [Fri, 8 Feb 2008 01:30:44 +0000 (17:30 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (48 commits)
[SCSI] aacraid: do not set valid bit in sense information
[SCSI] ses: add new Enclosure ULD
[SCSI] enclosure: add support for enclosure services
[SCSI] sr: fix test unit ready responses
[SCSI] u14-34f: fix data direction bug
[SCSI] aacraid: pci_set_dma_max_seg_size opened up for late model controllers
[SCSI] fix BUG when sum(scatterlist) > bufflen
[SCSI] arcmsr: updates (1.20.00.15)
[SCSI] advansys: make 3 functions static
[SCSI] Small cleanups for scsi_host.h
[SCSI] dc395x: fix uninitialized var warning
[SCSI] NCR53C9x: remove driver
[SCSI] remove m68k NCR53C9x based drivers
[SCSI] dec_esp: Remove driver
[SCSI] kernel-doc: fix scsi docbook
[SCSI] update my email address
[SCSI] add protocol definitions
[SCSI] sd: handle bad lba in sense information
[SCSI] qla2xxx: Update version number to 8.02.00-k8.
[SCSI] qla2xxx: Correct issue where incorrect init-fw mailbox command was used on non-NPIV capable ISPs.
...
Linus Torvalds [Fri, 8 Feb 2008 01:29:02 +0000 (17:29 -0800)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6:
SUNRPC xptrdma: simplify build configuration
NFS: Fix a potential file corruption issue when writing
David Sterba [Thu, 7 Feb 2008 09:57:12 +0000 (10:57 +0100)]
ipwireless: driver for PC Card 3G/UMTS modem
The device is manufactured by IPWireless. In some countries (for
example Czech Republic, T-Mobile ISP) this card is shipped for service
called UMTS 4G.
It's a piece of PCMCIA "4G" UMTS PPP networking hardware that presents
itself as a serial character device (i.e. looks like usual modem to
userspace, accepts AT commands, etc).
Rewieved-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Ben Martel <benm@symmetric.co.nz>
Signed-off-by: Stephen Blackheath <stephen@symmetric.co.nz>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
James Lentini [Mon, 28 Jan 2008 17:09:28 +0000 (12:09 -0500)]
SUNRPC xptrdma: simplify build configuration
Trond and Bruce,
This is a patch for 2.6.25. This is the same version that was sent out
on December 12 for review (no comments to date).
To simplify the RPC/RDMA client and server build configuration, make
SUNRPC_XPRT_RDMA a hidden config option that continues to depend on
SUNRPC and INFINIBAND. The value of SUNRPC_XPRT_RDMA will be:
- N if either SUNRPC or INFINIBAND are N
- M if both SUNRPC and INFINIBAND are on (M or Y) and at least one is M
- Y if both SUNRPC and INFINIBAND are Y
In 2.6.25, all of the RPC/RDMA related files are grouped in
net/sunrpc/xprtrdma and the net/sunrpc/xprtrdma/Makefile builds both
the client and server RPC/RDMA support using this config option.
Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Salyzyn, Mark [Wed, 6 Feb 2008 21:54:12 +0000 (13:54 -0800)]
[SCSI] aacraid: do not set valid bit in sense information
Luben Tuikov [mailto:ltuikov@yahoo.com] sez:
> Just as in your case and Tony's case, which I presume
> uses the same RAID firmware vendor, it would've
> probably been better if the RAID firmware vendor
> fixed the firmware to not set the VALID bit if the
> INFORMATION field is not valid.
Point taken regarding the aacraid driver. Dropped the VALID bit, and
then did some cleanup/simplification of the set_sense procedure and
the associated parameters. Mike did some preliminary tests when the
VALID bit was dropped before the 'Re: [PATCH] [SCSI] sd: make error
handling more robust' patches came on the scene. The change in the
SCSI subsystem does make this enclosed aacraid patch unnecessary, so
this aacraid patch is merely post battle ground cleanup. If the
simplification is an issue, repugnant, too much for a back-port to the
stable trees or clouds the point, this patch could be happily
distilled down to:
diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c 2008-02-06 16:26:45.
834938955 -0500
+++ b/drivers/scsi/aacraid/aachba.c 2008-02-06 16:32:01.
109035329 -0500
@@ -865,7 +865,7 @@
u32 residue)
{
- sense_buf[0] = 0xF0; /* Sense data valid, err code 70h (current error) */
+ sense_buf[0] = 0x70; /* Sense data invalid, err code 70h (current error) */
sense_buf[1] = 0; /* Segment number, always zero */
if (incorrect_length) {
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Trond Myklebust [Thu, 7 Feb 2008 22:24:07 +0000 (17:24 -0500)]
NFS: Fix a potential file corruption issue when writing
If the inode is flagged as having an invalid mapping, then we can't rely on
the PageUptodate() flag. Ensure that we don't use the "anti-fragmentation"
write optimisation in nfs_updatepage(), since that will cause NFS to write
out areas of the page that are no longer guaranteed to be up to date.
A potential corruption could occur in the following scenario:
client 1 client 2
=============== ===============
fd=open("f",O_CREAT|O_WRONLY,0644);
write(fd,"fubar\n",6); // cache last page
close(fd);
fd=open("f",O_WRONLY|O_APPEND);
write(fd,"foo\n",4);
close(fd);
fd=open("f",O_WRONLY|O_APPEND);
write(fd,"bar\n",4);
close(fd);
-----
The bug may lead to the file "f" reading 'fubar\n\0\0\0\nbar\n' because
client 2 does not update the cached page after re-opening the file for
write. Instead it keeps it marked as PageUptodate() until someone calls
invaldate_inode_pages2() (typically by calling read()).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
James Bottomley [Sun, 3 Feb 2008 21:48:56 +0000 (15:48 -0600)]
[SCSI] ses: add new Enclosure ULD
This adds support to SCSI for enclosure services devices. It also makes
use of the enclosure services added in an earlier patch to display the
enclosure topology in sysfs.
At the moment, the enclosures are SAS specific, but if anyone actually
has a non-SAS enclosure that follows the SES-2 standard, we can add that
as well.
On my Vitesse based system, the enclosures show up like this:
sparkweed:~# ls -l /sys/class/enclosure/0\:0\:1\:0/
total 0
-r--r--r-- 1 root root 4096 2008-02-03 15:44 components
lrwxrwxrwx 1 root root 0 2008-02-03 15:44 device -> ../../../devices/pci0000:01/0000:01:02.0/host0/port-0:0/expander-0:0/port-0:0:12/end_device-0:0:12/target0:0:1/0:0:1:0
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 000
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 001
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 002
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 003
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 004
drwxr-xr-x 2 root root 0 2008-02-03 15:44 SLOT 005
lrwxrwxrwx 1 root root 0 2008-02-03 15:44 subsystem -> ../../enclosure
--w------- 1 root root 4096 2008-02-03 15:44 uevent
And the individual occupied slots like this:
sparkweed:~# ls -l /sys/class/enclosure/0\:0\:1\:0/SLOT\ 001/
total 0
-rw-r--r-- 1 root root 4096 2008-02-03 15:45 active
lrwxrwxrwx 1 root root 0 2008-02-03 15:45 device -> ../../../../devices/pci0000:01/0000:01:02.0/host0/port-0:0/expander-0:0/port-0:0:11/end_device-0:0:11/target0:0:0/0:0:0:0
-rw-r--r-- 1 root root 4096 2008-02-03 15:45 fault
-rw-r--r-- 1 root root 4096 2008-02-03 15:45 locate
-rw-r--r-- 1 root root 4096 2008-02-03 15:45 status
lrwxrwxrwx 1 root root 0 2008-02-03 15:45 subsystem -> ../../../enclosure_component
-r--r--r-- 1 root root 4096 2008-02-03 15:45 type
--w------- 1 root root 4096 2008-02-03 15:45 uevent
You can flash the various blinky lights by echoing to the fault and locate files.
>From the device's point of view, you can see it has an enclosure like this:
sparkweed:~# ls /sys/class/scsi_disk/0\:0\:0\:0/device/
block:sda generic queue_depth state
bsg:0:0:0:0 iocounterbits queue_type subsystem
bus iodone_cnt rescan timeout
delete ioerr_cnt rev type
device_blocked iorequest_cnt scsi_device:0:0:0:0 uevent
driver modalias scsi_disk:0:0:0:0 vendor
enclosure_component:SLOT 001 model scsi_generic:sg0
evt_media_change power scsi_level
Note the enclosure_component:SLOT 001 which shows where in the enclosure
this device fits.
The astute will notice that I'm using SCSI VPD Inquiries to identify the
devices. This, unfortunately, won't work for SATA devices unless we do
some really nasty hacking about on the SAT because the only think that
knows the SAS addresses for SATA devices is libsas, not libata where the
SAT resides.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Sun, 3 Feb 2008 21:40:56 +0000 (15:40 -0600)]
[SCSI] enclosure: add support for enclosure services
The enclosure misc device is really just a library providing sysfs
support for physical enclosure devices and their components.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Wed, 6 Feb 2008 19:01:58 +0000 (13:01 -0600)]
[SCSI] sr: fix test unit ready responses
Commit
210ba1d1724f5c4ed87a2ab1a21ca861a915f734 updated sr.c to use
the scsi_test_unit_ready() function. Unfortunately, this has the
wrong characteristic of eating NOT_READY returns which sr.c relies on
for tray status.
Fix by rolling an internal sr_test_unit_ready() that doesn't do this.
Tested-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Roel Kluin [Wed, 6 Feb 2008 18:21:07 +0000 (19:21 +0100)]
[SCSI] u14-34f: fix data direction bug
Direction of data transfer 'DMA_FROM_DEVICE' was tested twice. DTD_OUT
means transfer from host to device. This should occur when the
direction of data transfer (sc_data_direction) is 'DMA_TO_DEVICE'.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Salyzyn, Mark [Wed, 6 Feb 2008 17:00:46 +0000 (09:00 -0800)]
[SCSI] aacraid: pci_set_dma_max_seg_size opened up for late model controllers
This patch ensures that the modern adapters get a maximum sg segment
size on par with the maximum transfer size. Added some localized
janitor fixes to the discussion patch I used with Fujita.
FUJITA Tomonori [mailto:fujita.tomonori@lab.ntt.co.jp] sez:
> I think that setting the proper maximum segment size for the late
> model cards (as you did above) makes sense.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Tony Battersby [Tue, 5 Feb 2008 15:36:10 +0000 (10:36 -0500)]
[SCSI] fix BUG when sum(scatterlist) > bufflen
When sending a SCSI command to a tape drive via the SCSI Generic (sg)
driver, if the command has a data transfer length more than
scatter_elem_sz (32 KB default) and not a multiple of 512, then I either
hit BUG_ON(!valid_dma_direction(direction)) in dma_unmap_sg() or else
the command never completes (depending on the LLDD).
When constructing scatterlists, the sg driver rounds up the scatterlist
element sizes to be a multiple of 512. This can result in
sum(scatterlist lengths) > bufflen. In this case, scsi_req_map_sg()
incorrectly sets bio->bi_size to sum(scatterlist lengths) rather than to
bufflen. When the command completes, req_bio_endio() detects that
bio->bi_size != 0, and so it doesn't call bio_endio(). This causes the
command to be resubmitted, resulting in BUG_ON or the command never
completing.
This patch makes scsi_req_map_sg() set bio->bi_size to bufflen rather
than to sum(scatterlist lengths), which fixes the problem.
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Nick Cheng [Tue, 5 Feb 2008 07:53:24 +0000 (23:53 -0800)]
[SCSI] arcmsr: updates (1.20.00.15)
- add arcmsr_enable_eoi_mode()and readl(reg->iop2drv_doorbell_reg) in
arcmsr_handle_hbb_isr() on adapter Type B in case of the doorbell
interrupt clearance is cached
- add conditional declaration for arcmsr_pci_error_detected() and
arcmsr_pci_slot_reset
- check if the sg list member number exceeds arcmsr default limit in
arcmsr_build_ccb()
- change the returned value type of arcmsr_build_ccb()from "void" to
"int" returns FAILED in arcmsr_queue_command()
- modify arcmsr_drain_donequeue() to ignore unknown command and let
kernel process command timeout. This could handle IO request violating
maximum segments, i.e. Linux XFS over DM-CRYPT. Thanks to Milan Broz's
comments <mbroz@redhat.com>
- fix the release of dma memory for type B in arcmsr_free_ccb_pool()
- fix the arcmsr_polling_hbb_ccbdone()
Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw>
Cc: Milan Broz <mbroz@redhat.com>
Cc: <thenzl@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Adrian Bunk [Tue, 5 Feb 2008 07:53:19 +0000 (23:53 -0800)]
[SCSI] advansys: make 3 functions static
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Pavel Machek [Tue, 5 Feb 2008 07:53:24 +0000 (23:53 -0800)]
[SCSI] Small cleanups for scsi_host.h
Small cleanups in scsi_host.h. Few #defines make me wonder if their
description is still up to date..?
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Morton [Tue, 5 Feb 2008 07:53:26 +0000 (23:53 -0800)]
[SCSI] dc395x: fix uninitialized var warning
drivers/scsi/dc395x.c: In function 'dc395x_init_one':
drivers/scsi/dc395x.c:4270: warning: 'ptr' may be used uninitialized in this function
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Thu, 3 Jan 2008 18:29:03 +0000 (12:29 -0600)]
[SCSI] NCR53C9x: remove driver
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Thu, 3 Jan 2008 18:27:16 +0000 (12:27 -0600)]
[SCSI] remove m68k NCR53C9x based drivers
These drivers depend on the deprecated NCR53C9X core and need to be converted
to the esp_scsi core.
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Thu, 3 Jan 2008 18:21:38 +0000 (12:21 -0600)]
[SCSI] dec_esp: Remove driver
This driver depends on the deprecated NCR53C9X core and needs to be converted
to the esp_scsi core.
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Randy Dunlap [Sun, 3 Feb 2008 23:06:36 +0000 (15:06 -0800)]
[SCSI] kernel-doc: fix scsi docbook
Add missing function parameter descriptions.
Make function short description fit on one line as required.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Sun, 3 Feb 2008 22:00:12 +0000 (16:00 -0600)]
[SCSI] update my email address
This updates steeleye -> hansenpartnership in the documentation since
some email has been going astray because of this.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Sun, 3 Feb 2008 21:32:59 +0000 (15:32 -0600)]
[SCSI] add protocol definitions
A lot of SCSI command replies have a protocol ID field. Add
definitions for the interpretation of that from SPC-3.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Sat, 2 Feb 2008 22:06:23 +0000 (16:06 -0600)]
[SCSI] sd: handle bad lba in sense information
Some devices report medium error locations incorrectly. Add guards to
make sure the reported bad lba is actually in the request that caused
it. Additionally remove the large case statment for sector sizes and
replace it with the proper u64 divisions.
Tested-by: Mike Snitzer <snitzer@gmail.com>
Cc: Stable Tree <stable@kernel.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:54 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Update version number to 8.02.00-k8.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:53 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Correct issue where incorrect init-fw mailbox command was used on non-NPIV capable ISPs.
BIT_2 of the firmware attributes is only valid on FW-interface-2
type HBAs. Code in commit
c48339decceec8e011498b0fc4c7c7d8b2ea06c1 would cause the
incorrect initialize-firmware mailbox command to be issued for
non-NPIV capable ISPs. Correct this by reverting to previously
used (and correct) pre-condition 'if' check.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Seokmann Ju [Thu, 31 Jan 2008 20:33:52 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Access the proper 'physical' port in FC-transport callbacks.
For following fc_host specific attributes, vports rely on the pport.
So, this patch changed way to access the data for those attributes so that
they can access pport's.
- get_host_speed (speed)
- get_host_port_state (port_state)
- get_host_port_type (port_type)
- get_fc_host_stats
Also, added PORT_SPEED_8GB case in the speed attribute for 8Gb HBAs.
Signed-Off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Seokmann Ju [Thu, 31 Jan 2008 20:33:51 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Correct issue where vport-state was not updated during an ISP_ABORT_NEEDED requst.
While running IO simultaneously through physical port and virtual
port, if user changes Data Rate (from scli utility), IO through
virtual port fails. It failed because the vport had not received
the ISP_ABORT_NEEDED notification.
Signed-Off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:50 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Move RISC-interrupt-register modifications to qla2x00_request_irqs().
There's no functional change involved with this update, instead
it simply migrates the "set cleared interrupt state" codes to a
more approprate method, qla2x00_request_irqs(), and cleans-up the
driver's probe() logic.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:49 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Consolidate RISC-parity enablement codes.
Collapse duplicate codes called during probe() and RISC-reset
into qla2x00_setup_chip().
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:48 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Cleanse memory allocation logic during probe.
- Drop loop-till-allocated structure of code within
qla2x00_mem_alloc().
- Properly unwind deallcations of memory during failures.
- Drop qla2x00_allocate_sp_pool() and qla2x00_free_sp_pool()
functions as their implementations can easily be collapsed into
the callers.
- Defer DMA pool allocation of SFP data until requested.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:47 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Clear EFT buffer before firmware reinitialization.
To insure that there is no stale data present during EFT
re-registration.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:46 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Cleanup any outstanding SRB resources during shutdown.
Refactor SRB-failure completion codes in the process. Also,
signal the DPC routine to complete sooner as backend processing
at shutdown-time is superflous.
[jejb: resolve conflicts with pci_enable_device_bars removal]
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:45 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Add MODULE_FIRMWARE hint for ISP25XX firmware.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Andrew Vasquez [Thu, 31 Jan 2008 20:33:44 +0000 (12:33 -0800)]
[SCSI] qla2xxx: Correct resource_size_t usages.
Hmm, it looks like the conversion to resource_size_t usage
(
3776541d8a46347a4924353a192c6ce4a3d04e2e) requires some additional
fixups to cleanup the structure-pointer castings used during IO mapped
accesses to the chip.
There's only a small number of locations, where the driver uses IO
mapped accesses to the hardware, the patch below should take care of
it without introducing to many structural changes to code flow.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:54 +0000 (13:36 -0600)]
[SCSI] iscsi: bump version to 2.0-868
Set iscsi version to 2.0-868
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:53 +0000 (13:36 -0600)]
[SCSI] libiscsi: fix session age rollover and remove cid encoding
The session age mask is only 4 bits, but session->age is 32. When
it gets larger then 15 and we try to or the bits some bits get
dropped and the check for session age in iscsi_verify_itt is useless.
The ISCSI_CID_MASK related bits are also useless since cid is always
one.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:52 +0000 (13:36 -0600)]
[SCSI] iscsi: fix up iscsi printk prefix
Some iscsi class messages have the dev_printk prefix and some libiscsi
and iscsi_tcp messages have "iscsi" or the module name as a prefix which
is normally pretty useless when trying to figure out which session
or connection the message is attached to. This patch adds iscsi lib
and class dev_printks so all messages have a common prefix that
can be used to figure out which object printed it.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:51 +0000 (13:36 -0600)]
[SCSI] iscsi class: fix iscsi conn attr counter
There are 13 iscsi conn attrs, but since the IF/OF markers were not being
used we did not notice that we forgot to increment the ISCSI_CONN_ATTRS
counter.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:50 +0000 (13:36 -0600)]
[SCSI] libiscsi: fix setting of nop timer
If we rollover then we could get a next_timeout of zero, so we need
to set the new timer to that value.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:49 +0000 (13:36 -0600)]
[SCSI] qla4xxx: add async scan support
qla4xxx has the old school startup/probe where it finds presetup sessions
in its flash and then attempts to log into them before returning from the
probe. This however, makes it very simple to add a iscsi class scan finished
helper which the driver can use.
In future patches Dave or I will rip apart the driver to make it more
like qla2xxx, but for now this is a very simple two line patch which
fixes the problem of trying to figure out when the initial sessions
are done being scanned.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:48 +0000 (13:36 -0600)]
[SCSI] iscsi class: add async scan helper
In qla4xxx's probe it will call the iscsi session setup functions
for session that got setup on the initial start. This then makes
it easy for the iscsi class to export a helper which indicates
when those scans are done.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:47 +0000 (13:36 -0600)]
[SCSI] qla4xxx: fix recovery timer and session unblock race
If qla4xxx is resetting up a session and the recovery timer
fires we do not want to just set it to dead, because
the dpc thread could have just set it to online and is in the
middle of resetting it up.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:46 +0000 (13:36 -0600)]
[SCSI] iscsi class: add session scanning
This just adds iscsi session scanning which works like fc rport scanning.
The future patches will hook the drivers into Mathew Wilcox's async
scanning infrastructure, so userspace does not have to special case
iscsi and so userspace does not have to make a extra special case for
hardware iscsi root scanning.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:45 +0000 (13:36 -0600)]
[SCSI] qla4xxx: use iscsi class session state check ready
This has qla4xxx use the iscsi class's check ready function
in the queue command function, so all iscsi drivers return the
same error value for common problems.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:44 +0000 (13:36 -0600)]
[SCSI] qla4xxx: directly call iscsi recovery functions
Qla4xxx can just call the iscsi recovery functions directly.
There is no need for userspace to do this for qla4xxx, because
we do not use the mutex to iterate over devices anymore and iscsi_block
/unblock_session can be called from interrupt context or the dpc thread.
And having userspace do this just creates uneeded headaches for qla4xxx root
situations where the session may experience problems. For example
during the kernel shutdown the scsi layer wants to send sync caches, but at
this time userspace is not up (iscsid is not running), so we cannot
recover from the problem.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie [Thu, 31 Jan 2008 19:36:43 +0000 (13:36 -0600)]
[SCSI] iscsi class, libiscsi: add iscsi sysfs session state file
This adds a iscsi session state file which exports the session
state for both software and hardware iscsi. It also hooks libiscsi
in.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Boaz Harrosh [Sun, 9 Sep 2007 18:31:21 +0000 (21:31 +0300)]
[SCSI] arm: convert to accessors and !use_sg cleanup
- convert to accessors and !use_sg cleanup
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Thu, 3 Jan 2008 18:17:50 +0000 (12:17 -0600)]
[SCSI] mca_53c9x: remove driver
This driver depends on the deprecated NCR53C9X core and needs to be converted
to the esp_scsi core.
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Tony Battersby [Tue, 6 Nov 2007 21:07:04 +0000 (16:07 -0500)]
[SCSI] sym53c8xx: fix resid calculation
This patch fixes the calculation of the data transfer residual for the
case of a command that is supposed to transfer an odd number of bytes on
a wide bus but transfers nothing instead.
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Aegis Lin [Fri, 1 Feb 2008 16:35:13 +0000 (17:35 +0100)]
[SCSI] ps3rom: sector size should be 512 bytes
It should be desired that 64 KiB is available for ATAPI transferrring.
(Historically) in SCSI/block layer sector size is defined as 512 during
sector-byte calculation.
Originally in ps3rom.c CD_FRAMESIZE (2048) was used, which limited
/sys/block/sr0/queue/max_sectors_kb to 16 KiB (32 sectors).
Signed-off-by: Aegis Lin <aegislin@gmail.com>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Thomas Bogendoerfer [Thu, 31 Jan 2008 23:13:34 +0000 (00:13 +0100)]
[SCSI] sun3x_esp: convert to esp_scsi
Converted sun3x_esp driver to use esp_scsi.c
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Adrian Bunk [Mon, 28 Jan 2008 22:11:27 +0000 (00:11 +0200)]
[SCSI] libiscsi: make __iscsi_complete_pdu() static
__iscsi_complete_pdu() can now become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Salyzyn, Mark [Mon, 28 Jan 2008 20:16:52 +0000 (12:16 -0800)]
[SCSI] aacraid: fib context lock for management ioctls (take 2)
The first patch (
a119ee8ee3045bf559d4cf02d72b112f3de2a15b) was a bit
too aggressive and nested the locks (!) unit testing was in
error. This patch was reverted by
203a512f0976e8ba85df36d76b40af6c80239121.
This new patch should fix the locks correctly.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Tony Breeds [Thu, 7 Feb 2008 22:24:52 +0000 (09:24 +1100)]
Fix compilation of powerpc asm-offsets.c with old gcc
Commit
ad7f71674ad7c3c4467e48f6ab9e85516dae2720 ("[POWERPC] Use a
sensible default for clock_getres() in the VDSO") corrected the clock
resolution reported by the VDSO clock_getres() but introduced another
problem in that older versions of gcc (gcc-4.0 and earlier) fail to
compile the new code in arch/powerpc/kernel/asm-offsets.c.
This fixes it by introducing a new MONOTONIC_RES_NSEC define in the
generic code which is equivalent to KTIME_MONOTONIC_RES but is just an
integer constant, not a ktime union.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geert Uytterhoeven [Thu, 7 Feb 2008 22:10:28 +0000 (23:10 +0100)]
m68k: correct setting of struct user.u_ar0
Commit
6e16d89bcd668a95eb22add24c02d80890232b66 ("Sanitize the type of
struct user.u_ar0") forgot to change the m68k setting code, causing the
following compiler warning:
arch/m68k/kernel/process.c:338: warning: assignment makes integer from pointer without a cast
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 7 Feb 2008 21:21:02 +0000 (13:21 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
BKL-removal: Implement a compat_ioctl handler for JFS
BKL-removal: Use unlocked_ioctl for jfs
Linus Torvalds [Thu, 7 Feb 2008 20:57:44 +0000 (12:57 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (34 commits)
Input: i8042 - non-x86 build fix
Input: pxa27x_keypad - also enable on PXA3xx
Input: pxa27x_keypad - add debounce_interval to the keypad platform data
Input: pxa27x_keypad - use device resources for I/O memory mapping and IRQ
Input: pxa27x_keypad - enable rotary encoders and direct keys
Input: pxa27x_keypad - introduce pxa27x_keypad_config()
Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys
Input: pxa27x_keypad - remove pin configuration from the driver
Input: pxa27x_keypad - rename the driver (was pxa27x_keyboard)
Input: constify function pointer tables (seq_operations)
Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list
Input: i8042 - enable DMI quirks on x86-64
Input: i8042 - add Dritek quirk for Acer Aspire 9110
Input: add input event to APM event bridge
Input: mousedev - use BIT_MASK instead of BIT
Input: remove duplicate includes
Input: remove cdev from input_dev structure
Input: remove duplicated headers in drivers/char/keyboard.c
Input: i8042 - add Dritek keyboard extension quirk
Input: add Tosa keyboard driver
...
Linus Torvalds [Thu, 7 Feb 2008 20:46:35 +0000 (12:46 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: Negotiate locking protocol versions.
Linus Torvalds [Thu, 7 Feb 2008 20:45:28 +0000 (12:45 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
sysfs: remove BUG_ON() from sysfs_remove_group()
Driver core: Revert "Fix Firmware class name collision"
Block: Fix whole_disk attribute bug
Andi Kleen [Sun, 27 Jan 2008 23:02:02 +0000 (17:02 -0600)]
BKL-removal: Implement a compat_ioctl handler for JFS
The ioctls were already compatible except for the actual values so this
was fairly easy to do.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Jesse Barnes [Thu, 7 Feb 2008 19:15:20 +0000 (11:15 -0800)]
i915: Fix GR register array size off-by-one bug
Make sure we have enough room for all the GR registers or we'll end up
clobbering the AR index register (which should actually be harmless
unless the BIOS is making an assumption about it).
Noticed-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andi Kleen [Sun, 27 Jan 2008 22:58:51 +0000 (16:58 -0600)]
BKL-removal: Use unlocked_ioctl for jfs
Convert jfs_ioctl over to not use the BKL. The only potential race
I could see was with two ioctls in parallel changing the flags
and losing the updates. Use the i_mutex to protect against this.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Greg Kroah-Hartman [Thu, 7 Feb 2008 16:58:54 +0000 (11:58 -0500)]
sysfs: remove BUG_ON() from sysfs_remove_group()
It's possible that the caller of sysfs_remove_group messed up and passed in an attribute group that was not really registered to this kobject. But don't panic for such a foolish error, spit out a warning about what happened, and continue on our way safely.
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael E Brown [Tue, 29 Jan 2008 21:35:01 +0000 (15:35 -0600)]
Driver core: Revert "Fix Firmware class name collision"
This reverts commit
109f0e93b6b728f03c1eb4af02bc25d71b646c59.
The original patch breaks BIOS updates on all Dell machines. The path to
the firmware file for the dell_rbu driver changes, which breaks all of
the userspace tools which rely on it.
Note that this patch re-introduces a problem with i2c name collision
that was previously fixed by this patch.
Signed-off-by: Michael E Brown <michael_e_brown@dell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 7 Feb 2008 07:33:39 +0000 (23:33 -0800)]
Block: Fix whole_disk attribute bug
The "whole_disk" attribute was not properly converted in the block
device conversion earlier, and if the file is read, bad things can
happen. This patch fixes this, making the attribute an empty one,
preserving the original functionality.
Many thanks to David Miller for finding this, and pointing me in the
proper place within the block code to look.
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Thu, 7 Feb 2008 18:21:26 +0000 (10:21 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC32]: Use regsets in arch_ptrace().
[SPARC64]: Use regsets in arch_ptrace().
[SPARC32]: Use regsets for ELF core dumping.
[SPARC64]: Use regsets for ELF core dumping.
[SPARC64]: Remove unintentional ptrace debugging messages.
[SPARC]: Move over to arch_ptrace().
[SPARC]: Remove PTRACE_SUN* handling.
[SPARC]: Kill DEBUG_PTRACE code.
[SPARC32]: Add user regset support.
[SPARC64]: Add user regsets.
[SPARC64]: Fix booting on non-zero cpu.
Linus Torvalds [Thu, 7 Feb 2008 18:20:31 +0000 (10:20 -0800)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (120 commits)
[MTD] Fix mtdoops.c compilation
[MTD] [NOR] fix startup lock when using multiple nor flash chips
[MTD] [DOC200x] eccbuf is statically defined and always evaluate to true
[MTD] Fix maps/physmap.c compilation with CONFIG_PM
[MTD] onenand: Add panic_write function to the onenand driver
[MTD] mtdoops: Use the panic_write function when present
[MTD] Add mtd panic_write function pointer
[MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support.
[MTD] physmap.c: Add support for multiple resources
[MTD] [NAND] Fix misparenthesization introduced by commit
78b65179...
[MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes
[MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver
[MTD] [NAND] Remove unused variable in plat_nand_remove
[MTD] Unlocking all Intel flash that is locked on power up.
[MTD] [NAND] at91_nand: Make mtdparts option can override board info
[MTD] mtdoops: Various minor cleanups
[MTD] mtdoops: Ensure sequential write to the buffer
[MTD] mtdoops: Perform write operations in a workqueue
[MTD] mtdoops: Add further error return code checking
[MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c
...
Linus Torvalds [Thu, 7 Feb 2008 17:45:58 +0000 (09:45 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits)
ACPI: fix build warning
Revert "cpuidle: build fix for non-x86"
ACPI: update intrd DSDT override console messages
ACPI: update DSDT override documentation
ACPI: Add "acpi_no_initrd_override" kernel parameter
ACPI: its a directory not a folder....
ACPI: misc cleanups
ACPI: add missing prink prefix strings
ACPI: cleanup acpi.h
ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build
ACPI: video: Ignore ACPI video devices that aren't present in hardware
ACPI: video: reset brightness on resume
ACPI: video: call ACPI notifier chain for ACPI video notifications
ACPI: create notifier chain to get hotkey events to graphics driver
ACPI: video: delete unused display switch on hotkey event code
ACPI: video: create "brightness_switch_enabled" modparam
cpuidle: Add a poll_idle method
ACPI: cpuidle: Support C1 idle time accounting
ACPI: enable MWAIT for C1 idle
ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
...
Linus Torvalds [Thu, 7 Feb 2008 17:45:37 +0000 (09:45 -0800)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
backlight: Add OMAP1 PWL backlight driver
backlight: Avoid unecessary driver callbacks
Linus Torvalds [Thu, 7 Feb 2008 17:45:14 +0000 (09:45 -0800)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
leds: Add HP Jornada 6xx driver
leds: Remove the now uneeded ixp4xx driver
leds: Add power LED to the wrap driver
leds: Fix led-gpio active_low default brightness
leds: hw acceleration for Clevo mail LED driver
leds: Add support for hardware accelerated LED flashing
leds: Standardise LED naming scheme
leds: Add clevo notebook LED driver
Geert Uytterhoeven [Thu, 7 Feb 2008 08:10:37 +0000 (09:10 +0100)]
m68k: kill page walker compile warning
The recently introduced page walker (walk_page_range()) calls pgd_offset with a
const struct mm_struct pointer, causing the following compile warning on m68k:
mm/pagewalk.c:111: warning: passing argument 1 of 'pgd_offset' discards qualifiers from pointer target type
Make the `mm' parameter of the inline function pgd_offset() const to shut it
up.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 7 Feb 2008 17:07:16 +0000 (09:07 -0800)]
Merge branch 'drm-patches' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (22 commits)
drm: add initial r500 drm support
radeon: setup the ring buffer fetcher to be less agressive.
drm: fixup some of the ioctl function exit paths
drm: the drm really should call pci_set_master..
i915: Add chipset id for Intel Integrated Graphics Device
drm: cleanup DRM_DEBUG() parameters
drm/i915: add support for E7221 chipset
drm: don't cast a pointer to pointer of list_head
mga_dma: return 'err' not just zero from mga_do_cleanup_dma()
drm: add _DRM_DRIVER flag, and re-order unload.
drm: enable udev node creation
drm: Make DRM_IOCTL_GET_CLIENT return EINVAL when it can't find client #idx.
drm: move drm_mem_init to proper place in startup sequence
drm: call driver load function after initialising AGP
drm: Fix ioc32 compat layer
drm: fd.o bug #11895: Only add the AGP base to map offset if the caller didn't.
i915: add suspend/resume support
drm: update DRM sysfs support
drm: Initialize the AGP structure's base address at init rather than enable.
drm: move two function extern into the correct block
...
Linus Torvalds [Thu, 7 Feb 2008 17:03:00 +0000 (09:03 -0800)]
Merge git://git./linux/kernel/git/davej/cpufreq
* git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Add missing printk levels to e_powersaver
[CPUFREQ] Fix sparse warning in powernow-k8
[CPUFREQ] Support Model D parts and newer in e_powersaver
[CPUFREQ] Powernow-k8: Update to support the latest Turion processors
[CPUFREQ] fix configuration help message
[CPUFREQ] powernow-k8 print pstate instead of fid/did for family 10h
[CPUFREQ] Eliminate cpufreq_userspace scaling_setspeed deadlock
[CPUFREQ] gx-suspmod.c: use boot_cpu_data instead of current_cpu_data
[CPUFREQ] fix incorrect comment on show_available_freqs() in freq_table.c
[CPUFREQ] drivers/cpufreq: Add missing "space"
[CPUFREQ] arch/x86: Add missing "space"
[CPUFREQ] Remove pointless Kconfig dependancy
Linus Torvalds [Thu, 7 Feb 2008 17:02:26 +0000 (09:02 -0800)]
Merge branch 'for-2.6.25' of git://git./linux/kernel/git/paulus/powerpc
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (69 commits)
[POWERPC] Add SPE registers to core dumps
[POWERPC] Use regset code for compat PTRACE_*REGS* calls
[POWERPC] Use generic compat_sys_ptrace
[POWERPC] Use generic compat_ptrace_request
[POWERPC] Use generic ptrace peekdata/pokedata
[POWERPC] Use regset code for PTRACE_*REGS* requests
[POWERPC] Switch to generic compat_binfmt_elf code
[POWERPC] Switch to using user_regset-based core dumps
[POWERPC] Add user_regset compat support
[POWERPC] Add user_regset_view definitions
[POWERPC] Use user_regset accessors for GPRs
[POWERPC] ptrace accessors for special regs MSR and TRAP
[POWERPC] Use user_regset accessors for SPE regs
[POWERPC] Use user_regset accessors for altivec regs
[POWERPC] Use user_regset accessors for FP regs
[POWERPC] mpc52xx: fix compile error introduce when rebasing patch
[POWERPC] 4xx: PCIe indirect DCR spinlock fix.
[POWERPC] Add missing native dcr dcr_ind_lock spinlock
[POWERPC] 4xx: Fix offset value on Warp board
[POWERPC] 4xx: Add 440EPx Sequoia ehci dts entry
...
Jiri Slaby [Thu, 7 Feb 2008 08:16:51 +0000 (00:16 -0800)]
Char: mxser, add support for CP-114UL
Add new card (0x1393:0x1143) support added in 1.11 original driver, also
allow rate change in set_serial_info ioctl (as per 1.11 too).
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:46 +0000 (00:16 -0800)]
Char: mxser, remove it
(Old) mxser is obsoleted by mxser_new and scheduled for removal on Dec 2007.
Remove it by renaming mxser_new to mxser.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:45 +0000 (00:16 -0800)]
Char: mxser, ioctl cleanup
- remove dead MOXA_GET_CONF (always returned -ENXIO)
- remove useless MOXA_GET_CUMAJOR (unused)
- use get/put_user instead of copy_from/to_user for simple types
- cleanup TIOCMIWAIT -- return -ERESTARTSYS on signal, move condition into
separate function
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:44 +0000 (00:16 -0800)]
Char: mxser, simplify mxser_get_serial_info
Initialize temp structure directly with proper values without first zeroing
it and setting later as suggested by Jan.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:43 +0000 (00:16 -0800)]
Char: mxser, reorder mxser_cardinfo fields
Reorder fields to save some memory and code on 64bit due to alignment as
suggested by Jan.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:43 +0000 (00:16 -0800)]
Char: mxser, 0 to NULL in pointer
Don't test a pointer against 0. Use NULL instead.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:42 +0000 (00:16 -0800)]
Char: mxser, remove special baudrate processing
Let the special baudrate processing on the tty layer. Also remove
set/get_special_rate ioctls introduced in commit
f64c84a1668930d1ca2b7dbaa92146c2139cb508, since it is no longer needed.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alan Cox [Thu, 7 Feb 2008 08:16:41 +0000 (00:16 -0800)]
mxser/mxser_new: first pass over termios reporting for the mxser cards
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:41 +0000 (00:16 -0800)]
Char: riscom8, remove wakeup and hangup bottomhalves
Both of them may be called directly from the code, don't add special code
and variables and schedule a work for them.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:40 +0000 (00:16 -0800)]
Char: serial167, remove bottomhalf
- Cy_EVENT_OPEN_WAKEUP is simple wake_up
- Cy_EVENT_HANGUP is wake_up + tty_hangup, which schedules its own work
- Cy_EVENT_WRITE_WAKEUP is tty_wakeup which may be called directly too
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:39 +0000 (00:16 -0800)]
Char: stallion, remove bottomhalf
- tty_hangup schedules a bottomhalf itself, tty_wakeup doesn't need it
- call the CD code (part of work handler previously) directly from the code
(it wakes somebody up or calls tty_hangup at worse)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:39 +0000 (00:16 -0800)]
Char: specialix, remove bottomhalves
- tqueue is used only for tty_wakeup, call it directly from the code
- tqueue_hangup for tty_hangup, it schedules its own work, use it directly
too
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:38 +0000 (00:16 -0800)]
Char: istallion, remove hangup bottomhalf
tty_hangup schedules a work for hangup itself, no need to do it in the driver.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:37 +0000 (00:16 -0800)]
Char: esp, remove hangup and wakeup bottomhalves
There is no need to schedule a bottomhalf for either of them. One is fast
and the another schedules a bottomhalf itself.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:36 +0000 (00:16 -0800)]
Char: riscom8, change rc_init_drivers prototype
Let compiler decide if the rc_init_drivers function will be inlined and
mark it as __init, because it's called only from __init function.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:36 +0000 (00:16 -0800)]
Char: stallion, fix compiler warnings
Don't emit warnings on 64 bit platforms from min(). sizeof() on those
is not uint, neither 2 pointers difference, cast it to uint by min_t in
both cases.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:35 +0000 (00:16 -0800)]
Char: mxser_new, ioaddresses are ulong
To not pass ulong address as int parameter, switch it to ulong.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:34 +0000 (00:16 -0800)]
Char: char/serial, remove SERIAL_TYPE_NORMAL redefines
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Thu, 7 Feb 2008 08:16:33 +0000 (00:16 -0800)]
Char: rocket, remove useless macros
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>