Darrick J. Wong [Tue, 30 Jan 2007 09:18:55 +0000 (01:18 -0800)]
[SCSI] sas_ata: Assign sas_task to scsi_cmnd to enable EH for ATA devices
The SATL should connect the scsi_cmnd to the sas_task (despite the presence
of libata) so that requests to abort scsi_cmnds headed to the ATA device
can be processed by the EH and aborted correctly. The abort status should
still be propagated from sas -> ata -> scsi.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Tue, 30 Jan 2007 09:18:52 +0000 (01:18 -0800)]
[SCSI] libsas: Unknown STP devices should be reported to libata as unknown.
When libsas encounters a STP device whose protocol isn't recognized (i.e.
not ATA or ATAPI), we should set the ata_device's class to ATA_DEV_UNKNOWN
instead of ATA_DEV_ATA.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Tue, 30 Jan 2007 09:18:44 +0000 (01:18 -0800)]
[SCSI] sas_ata: Don't copy aic94xx's sactive to ata_port
Since the aic94xx sequencer assigns its own NCQ tags to ATA commands, it
no longer makes any sense to copy the sactive field in the STP response
to ata_port->sactive, as that will confuse libata. Also, libata seems
to be capable of managing sactive on its own.
The attached patch gets rid of one of the causes of the BUG messages in
ata_qc_new, and seems to work without problems on an IBM x206m.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Tue, 30 Jan 2007 09:18:41 +0000 (01:18 -0800)]
[SCSI] sas_ata: ata_post_internal should abort the sas_task
This patch adds a new field, lldd_task, to ata_queued_cmd so that libata
users such as libsas can associate some data with a qc. The particular
ambition with this patch is to associate a sas_task with a qc; that way,
if libata decides to timeout a command, we can come back (in
sas_ata_post_internal) and abort the sas task.
One question remains: Is it necessary to reset the phy on error, or will
the libata error handler take care of it? (Assuming that one is written,
of course.) This patch, as it is today, works well enough to clean
things up when an ATA device probe attempt fails halfway through the probe,
though I'm not sure this is always the right thing to do.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Tue, 30 Jan 2007 09:18:38 +0000 (01:18 -0800)]
[SCSI] sas_ata: sas_ata_qc_issue should return AC_ERR_*
The sas_ata_qc_issue function was incorrectly written to return error
codes such as -ENOMEM. Since libata OR's qc->err_mask with the
return value, It is necessary to make my code return one of the
AC_ERR_ codes instead. For now, use AC_ERR_SYSTEM because an error
here means that the OS couldn't send the command to the controller.
If anybody has a suggestion for a better AC_ERR_ code to use, please
suggest it.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Tue, 30 Jan 2007 09:18:35 +0000 (01:18 -0800)]
[SCSI] sas_ata: Satisfy libata qc function locking requirements
ata_qc_complete and ata_sas_queuecmd require that the port lock be held
when they are called. sas_ata doesn't do this, leading to BUG messages
about qc tags newly allocated qc tags already being in use. This patch
fixes the locking, which should clean up the rest of those messages.
So far I've tested this against an IBM x206m with two SATA disks with no
BUG messages and no other signs of things going wrong, and the machine
finally passed the pounder stress test.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Sat, 11 Nov 2006 00:59:24 +0000 (16:59 -0800)]
[SCSI] aic94xx: Don't call pci_map_sg for already-mapped scatterlists
It turns out that libata has already dma_map_sg'd the scatterlist
entries that go with an ata_queued_cmd by the time it calls
sas_ata_qc_issue. sas_ata_qc_issue passes this scatterlist to aic94xx.
Unfortunately, aic94xx assumes that any scatterlist passed to it needs
to be pci_map_sg'd... which blows away the mapping that libata created!
This causes (on a x260) Calgary IOMMU table leaks and duplicate frees
when aic94xx and libata try to {pci,dma}_unmap_sg the scatterlist.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Key this check off ATA_PROTOCOL_STP
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Wed, 18 Oct 2006 21:43:37 +0000 (14:43 -0700)]
[SCSI] Migrate libsas ATA code into a separate file
This is a respin of my earlier patch that migrates the ATA support code
into a separate file. For now, the controversial linking bits have
been removed per James Bottomley's request for a patch that contains
only the migration diffs, which means that libsas continues to require
libata. I intend to address that problem in a separate patch.
This patch is against the aic94xx-sas-2.6 git tree, and it has been
sanity tested on my x206m with Seagate SATA and SAS disks without
uncovering any new problems.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Mon, 16 Oct 2006 18:25:30 +0000 (13:25 -0500)]
[SCSI] libsas: fixup NCQ for SATA disks
We actually had two problems: the one with the tag (which is fixed by
zeroing the tag before sending the taskfile to the sequencer) but the
other with the fact that we sent our first NCQ command to the device
before the sequencer had been informed of the NCQ tagging
capabilities. I fixed the latter by moving the rphy_add() to the
correct point in the code after the NCQ capabilities are set up.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Mon, 16 Oct 2006 01:24:35 +0000 (20:24 -0500)]
[SCSI] aic94xx: add SATAPI support
It turns out this is fairly easy to plumb in by recognising the three
command types and copying the CDB. The protocol response path needs to
be amended to cope with SAS_PROTO_RESPONSE.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Fri, 13 Oct 2006 23:56:25 +0000 (16:56 -0700)]
[SCSI] libsas: support NCQ for SATA disks
This patch adds SATAII NCQ support to libsas. Both the use_ncq and the
dma_xfer flags in ata_task must be set for NCQ to work correctly on the
Adaptec SAS controller. The rest of the patch adds ATA_FLAG_NCQ to
sata_port_info and sets up ap->scsi_host so that ata_setup_ncq doesn't
crash. Please note that this patch is against the aic94xx-sas git tree,
not scsi-misc. Thanks also to James Bottomley for providing an earlier
version of this patch from which to work.
I've tested this patch on a x206m with a ST380819AS SATA2 disk plugged
into the Adaptec SAS controller. The drive came up with a queue depth
of 31, and I successfully ran an I/O flood test to coerce libata into
sending multiple commands simultaneously. A kernel probe recorded the
maximum tag number that had been seen before and after the flood test;
before the test it was 2 and after it was 30, as I expected.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Darrick J. Wong [Thu, 5 Oct 2006 22:12:37 +0000 (15:12 -0700)]
[SCSI] aic94xx: SATA tag mask not set correctly
The aic94xx controller has a bitmask establishing which tags are ok to
use with a SATA NCQ disk. When the queue depth is 32, however, the
expression that is used sets the mask to zero, not 0xFFFFFFFF.
This patch widens the width of the integer so that this case is handled
properly.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Tue, 22 Aug 2006 17:39:19 +0000 (12:39 -0500)]
[SCSI] libsas: Add SATA support to STP piece for SATA on SAS expanders
This patch adds support for SATA over SAS expanders to the previous two
SATA support in libsas patches.
There were a couple of nasty non trivial things to sort out before this
one could be made to work.
Firstly, I'd like to thank Doug Gilbert for diagnosing a problem with
the LSI expanders where the REPORT_SATA_PHY command was returning the
D2H FIS in the wrong order (Although, here, I think I have to blame the
SAS standards which specifies the FIS "shall be returned in little
endian format" and later on "which means resp[24] shall be FIS type"
The latter, of course, implying big endian format). Just to make sure,
I put a check for the D2H FIS type being in the wrong position and
reverse the FIS data if it is.
The second is a problem outlined in Annex G of the SAS standard (again,
a technical point with D2H FIS ... necessitating a phy reset on certain
conditions).
With the patch, I can now see my SATA-1 disk in a cascaded expander
configuration.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This is a reimplementation of the zs driver for the serial subsystem. Any
resemblance to the old driver is purely coincidential. ;-) I do hope I got
the handling of modem lines right -- better do not tackle me about the
issue unless you feel too good...
Any users of the old driver: please note the numbers of the serial lines
have now been swapped, i.e. ttyS0 <-> ttyS1 and ttyS2 <-> ttyS3. It has
to do with the modem lines mentioned above; basically the port A in a given
chip has to be initialised before the port B if you want to use the latter
as the serial console (which is usually the case), as operations on modem
lines of the serial line associated with the port B access both ports (see
the comment at the top of the driver for the details of wiring used).
Please update your scripts.
This is also the reason each SCC now requests an IRQ once only (as seen in
"/proc/interrupts") -- the handler takes care of both ports at once as the
line associated with the port B has to take status update interrupts from
both ports (and yet the line of the port A takes its own for itself too).
The old driver never got it right...
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dm: fix memory leak in dm_create_persistent() when starting metadata update thread fails
If, in dm_create_persistent(), the call to create_singlethread_workqueue()
fails then we'll return without freeing the memory allocated to 'ps', thus
leaking sizeof(struct pstore) bytes. This patch fixes the leak.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com Acked-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Mundt [Wed, 18 Jul 2007 00:18:36 +0000 (09:18 +0900)]
slob: Kill off duplicate kzalloc() definition.
With the slab zeroing allocations cleanups Christoph stubbed in a generic
kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and
kill off the __kzalloc() wrapper that SLOB was using.
Reported-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The old IDE driver is not ready to take generic SCSI commands, even if
it uses them for some specific issues (ie the tray open/close ioctls for
IDE CD-ROM's). Pointed out by Bartlomiej.
I'm sure we'll have it fixed properly soon enough, but for now we should
not allow it to cause problems.
Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block:
bsg: fix missing space in version print
Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG
bsg: Kconfig updates
bsg: minor cleanup
bsg: device hash table cleanup
bsg: fix initialization error handling bugs
bsg: mark FUJITA Tomonori as bsg maintainer
bsg: convert to dynamic major
bsg: address various review comments
Merge branch 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
[ISDN] HiSax hfc_pci: minor cleanups
[ISDN] HiSax bkm_a4t: split setup into two smaller functions
[ISDN] HiSax enternow: split setup into 3 smaller functions
[ISDN] HiSax netjet_u: split setup into 3 smaller functions
[ISDN] HiSax netjet_s: code movement, prep for hotplug
[ISDN] HiSax: move card state alloc/setup code into separate functions
[ISDN] HiSax: move card setup into separate function
Merge branch 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()
drivers/*: mark variables with uninitialized_var()
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
[libata] sata_mv: use pci_try_set_mwi()
drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
drivers/net/wan/sbni: kill uninit'd var warning
drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
drivers/telephony/ixj: cleanup and fix gcc warning
drivers/net/wan/pc300_drv: fix bug caught by gcc warning
drivers/usb/misc/auerswald: fix status check, remove redundant check
[netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
[netdrvr] natsemi: Fix device removal bug
kernel/auditfilter: kill bogus uninit'd-var compiler warning
Al Viro [Tue, 17 Jul 2007 21:29:46 +0000 (22:29 +0100)]
smp_call_function_single() should be a macro on UP
... or we end up with header include order problems from hell.
E.g. on m68k this is 100% fatal - local_irq_enable() there
wants preempt_count(), which wants task_struct fields, which
we won't have when we are in smp.h pulled from sched.h.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Garzik [Mon, 16 Jul 2007 01:48:07 +0000 (21:48 -0400)]
[ISDN] HiSax hfc_pci: minor cleanups
* trim trailing whitespace
* remove CONFIG_PCI ifdefs, this driver is always PCI (Kconfig enforced)
* remove return statements at the tail of a function
* remove indentation levels by returning an error code immediately.
Makes the code much more readable, and easier to update to PCI hotplug
API.
Jeff Garzik [Sun, 15 Jul 2007 08:25:35 +0000 (04:25 -0400)]
[ISDN] HiSax netjet_s: code movement, prep for hotplug
1) Remove CONFIG_PCI ifdefs. PCI is required in Kconfig.
2) Break up setup_netjet_s() into three separate internal functions.
This helps facilitate upcoming use of PCI hotplug API, and in addition
makes the code much easier to follow.
No code is changed, just moved around. I even kept the out-of-favor
"return(0)" style used in the current source code.
Fixes the following build error:
CC sound/pci/mixart/mixart_hwdep.o
sound/pci/mixart/mixart_hwdep.c: In function ‘mixart_hwdep_dsp_load’:
sound/pci/mixart/mixart_hwdep.c:610: error: implicit declaration of function ‘vmalloc’
sound/pci/mixart/mixart_hwdep.c:617: error: implicit declaration of function ‘vfree’
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
CC drivers/parisc/hppb.o
drivers/parisc/hppb.c: In function ‘hppb_probe’:
drivers/parisc/hppb.c:73: error: implicit declaration of function ‘ccio_request_resource’
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Garzik [Tue, 17 Jul 2007 09:39:58 +0000 (05:39 -0400)]
drivers/*: mark variables with uninitialized_var()
Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.
Jeff Garzik [Tue, 17 Jul 2007 06:32:21 +0000 (02:32 -0400)]
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
An uninitialized variable warning illuminated an area where indeed the
variable was being used without initialization. Unfortunately, after
verifying all such paths were fixed, the warning still appears. So we
follow the initialization practice of other variables in this function.
Jeff Garzik [Tue, 17 Jul 2007 06:03:49 +0000 (02:03 -0400)]
drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
drivers/infiniband/hw/mthca/mthca_qp.c: In function
‘mthca_tavor_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1594: warning: ‘f0’ may be used
uninitialized in this function
drivers/infiniband/hw/mthca/mthca_qp.c: In function
‘mthca_arbel_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1949: warning: ‘f0’ may be used
uninitialized in this function
Initializing 'f0' is not strictly necessary in either case, AFAICS.
I was considering use of uninitialized_var(), but looking at the
complex flow of control in each function, I feel it is wiser and
safer to simply zero the var and be certain of ourselves.
Jeff Garzik [Tue, 17 Jul 2007 05:35:08 +0000 (01:35 -0400)]
drivers/telephony/ixj: cleanup and fix gcc warning
1) Fix gcc uninit'd var warnings by adding 'default' switch stmt labels
in two cases. It was lightning-strikes unlikely that a problem would
ever arise, but not impossible.
Jeff Garzik [Tue, 17 Jul 2007 05:32:29 +0000 (01:32 -0400)]
drivers/net/wan/pc300_drv: fix bug caught by gcc warning
The warning
drivers/net/wan/pc300_drv.c: In function ‘cpc_open’:
drivers/net/wan/pc300_drv.c:2942: warning: ‘br’ may be used
uninitialized in this function
was valid. Ensure 'br' is initialized in all cases.
Jeff Garzik [Tue, 17 Jul 2007 04:01:09 +0000 (00:01 -0400)]
[netdrvr] natsemi: Fix device removal bug
This episode illustrates how an overused warning can train people to
ignore that warning, which winds up hiding bugs.
The warning
drivers/net/natsemi.c: In function ‘natsemi_remove1’:
drivers/net/natsemi.c:3222: warning: ignoring return value of
‘device_create_file’, declared with attribute warn_unused_result
is oft-ignored, even though at close inspection one notices this occurs
in the /remove/ function, not normally where creation occurs. A quick
s/create/remove/ and we are fixed, with the warning gone.
kernel/auditfilter.c: In function ‘audit_receive_filter’:
kernel/auditfilter.c:1213: warning: ‘ndw’ may be used uninitialized in this function
kernel/auditfilter.c:1213: warning: ‘ndp’ may be used uninitialized in this function
...with a simplification of the code. audit_put_nd() can accept NULL
arguments, just like kfree(). It is cleaner to init two existing vars
to NULL, remove the redundant test variable 'putnd_needed' branches, and call
audit_put_nd() directly.
Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check
Introduce is_owner_or_cap() macro in fs.h, and convert over relevant
users to it. This is done because we want to avoid bugs in the future
where we check for only effective fsuid of the current task against a
file's owning uid, without simultaneously checking for CAP_FOWNER as
well, thus violating its semantics.
[ XFS uses special macros and structures, and in general looked ...
untouchable, so we leave it alone -- but it has been looked over. ]
The (current->fsuid != inode->i_uid) check in generic_permission() and
exec_permission_lite() is left alone, because those operations are
covered by CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH. Similarly operations
falling under the purview of CAP_CHOWN and CAP_LEASE are also left alone.
Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: Al Viro <viro@ftp.linux.org.uk> Acked-by: Serge E. Hallyn <serge@hallyn.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (80 commits)
KVM: Use CPU_DYING for disabling virtualization
KVM: Tune hotplug/suspend IPIs
KVM: Keep track of which cpus have virtualization enabled
SMP: Allow smp_call_function_single() to current cpu
i386: Allow smp_call_function_single() to current cpu
x86_64: Allow smp_call_function_single() to current cpu
HOTPLUG: Adapt thermal throttle to CPU_DYING
HOTPLUG: Adapt cpuset hotplug callback to CPU_DYING
HOTPLUG: Add CPU_DYING notifier
KVM: Clean up #includes
KVM: Remove kvmfs in favor of the anonymous inodes source
KVM: SVM: Reliably detect if SVM was disabled by BIOS
KVM: VMX: Remove unnecessary code in vmx_tlb_flush()
KVM: MMU: Fix Wrong tlb flush order
KVM: VMX: Reinitialize the real-mode tss when entering real mode
KVM: Avoid useless memory write when possible
KVM: Fix x86 emulator writeback
KVM: Add support for in-kernel pio handlers
KVM: VMX: Fix interrupt checking on lightweight exit
KVM: Adds support for in-kernel mmio handlers
...
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Clean away some code inside some non-existent CONFIG ifdefs
[IA64] ar.itc access must really be after xtime_lock.sequence has been read
[IA64] correctly count CPU objects in the ia64/sn hwperf interface
[IA64] arbitary speed tty ioctl support
[IA64] use machvec=dig on hpzx1 platforms
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
missing exports of csum_...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
sparc32 has working dma-mapping only with CONFIG_PCI
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
saner typechecking in generic unaligned.h
Verify that types would match for assignment (under sizeof, so we are safe from
side effects or any code actually getting generated), then explicitly cast
everywhere to the fixed-sized types. Kills a bunch of bogus warnings about
constants being truncated (gcc, sparse), finds a pile of endianness problems
hidden by old noise (sparse).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: change bitmap_unplug and others to void functions
bitmap_unplug only ever returns 0, so it may as well be void. Two callers try
to print a message if it returns non-zero, but that message is already printed
by bitmap_file_kick.
write_page returns an error which is not consistently checked. It always
causes BITMAP_WRITE_ERROR to be set on an error, and that can more
conveniently be checked.
When the return of write_page is checked, an error causes bitmap_file_kick to
be called - so move that call into write_page - and protect against recursive
calls into bitmap_file_kick.
bitmap_update_sb returns an error that is never checked.
So make these 'void' and be consistent about checking the bit.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: check that internal bitmap does not overlap other data
We current completely trust user-space to set up metadata describing an
consistant array. In particlar, that the metadata, data, and bitmap do not
overlap.
But userspace can be buggy, and it is better to report an error than corrupt
data. So put in some appropriate checks.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Don't use 'unsigned' variable to track sync vs non-sync IO, as the only thing
we want to do with them is a signed comparison, and fix up the comment which
had become quite wrong.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: improve message about invalid superblock during autodetect
People try to use raid auto-detect with version-1 superblocks (which is not
supported) and get confused when they are told they have an invalid
superblock.
So be more explicit, and say it it is not a valid v0.90 superblock.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Engelhardt [Tue, 17 Jul 2007 11:06:11 +0000 (04:06 -0700)]
Use menuconfig objects II - MD
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tony Lindgren [Tue, 17 Jul 2007 11:06:09 +0000 (04:06 -0700)]
OMAP: add TI TWL92330/Menelaus Power Management chip driver
Add Texas Instruments TWL92330/Menelaus Power Management chip driver. This
includes voltage regulators, Dual slot memory card tranceivers and
real-time clock(RTC).
The support for RTC is integrated with this driver only; it is not separate
module. Passes 'rtctest' on OMAP H4 EVM, other than lack of "periodic"
(1/N second) IRQs. System wakeup alarms (from suspend-to-RAM) work too.
The battery keeps the RTC active over power off, so once you set clock
(rdate/ntpdate/etc, then "hwclock -w") then RTC_HCTOSYS at boot time will
behave as expected.
Imre Deak [Tue, 17 Jul 2007 11:05:54 +0000 (04:05 -0700)]
OMAP: add TI OMAP framebuffer driver
- Add Texas Instruments OMAP framebuffer driver. This driver is being used
for various OMAP1/2 series based boards and products e.g Nokia N800 Internet
Tablet, H4, H3, Siemens SX1 etc.
- LCD panel registration and controller code is separated in different file
and interfaces.
Signed-off-by: Trilok Soni <soni.trilok@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The Cell Broadband Engine contains a 64-bit PowerPC core with 2 hardware
threads (called PPEs) and 8 Synergistic Processing Engines (called SPEs).
When booting Linux, 2 penguins logos are shown on the graphical console by
the standard frame buffer console logo code.
To emphasize the existence of the SPEs (which can be used under Linux), we
added a second row of (smaller) helper penguin logos, one for each SPE.
A sample screenshot can be found at
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png
(or on the ps3linux T-shirts we wore at OLS :-)
This patch:
Extract the code to draw one line of logos into fb_show_logo_line()
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-By: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
VGA console driver can misunderstand the current mode(Text/Graphic) under
"disable console blanking" setting. When "disable console blank" is set
(blankinterval=0), "do_unblank_screen()" function returns without changing
"blank_state", and when "blank_state" is "blank_off", "do_blank_screen()
function returns without invoking sw->con_blank() function. That's why VGA
console driver can misunderstand the current mode.
Signed-off-by: Nobuhiro Tachino <ntachino@redhat.com> Signed-off-by: Taku Izumi <izumi2005@soft.fujitsu.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: "Luck, Tony" <tony.luck@intel.com> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Mundt [Tue, 17 Jul 2007 11:05:48 +0000 (04:05 -0700)]
fb: epson1355fb: kill off dead sh support
The SH board that was the only user for this code was removed entirely from
the kernel quite some time ago, so there's no reason to leave the stubs in
place. Additionally this driver was completely broken anyways, so there's
not really a lot of point in fixing it up either.
I can't imagine that this driver gets any testing on ARM either, given that
FB_BLANK_UNBLANKING doesn't exist, and kills the build regardless of which
platform is compiling. This fixes that, too.
It wouldn't be a lot of work to finish the platform device conversion and
go with a generic 8-bit read/write_reg and kill off the architecture
dependence completely, should someone have any use for this driver.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>