safe/jmp/linux-2.6
16 years ago[SCSI] bsg: unexport sg v3 helper functions
FUJITA Tomonori [Sun, 22 Jul 2007 01:06:50 +0000 (10:06 +0900)]
[SCSI] bsg: unexport sg v3 helper functions

blk_fill_sghdr_rq, blk_unmap_sghdr_rq, and blk_complete_sghdr_rq were
exported for bsg, however bsg was changed to support only sg v4.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] bsg: fix bsg_unregister_queue
FUJITA Tomonori [Sat, 21 Jul 2007 04:23:25 +0000 (13:23 +0900)]
[SCSI] bsg: fix bsg_unregister_queue

scsi_sysfs_add_sdev ignores the bsg_register_queue failure, so
bsg_unregister_queue must check whether the queue has a bsg device.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] bsg: make class backlinks
James Bottomley [Fri, 20 Jul 2007 23:22:17 +0000 (18:22 -0500)]
[SCSI] bsg: make class backlinks

Currently, bsg doesn't make class backlinks (a process whereby you'd get
a link to bsg in the device directory in the same way you get one for
sg).  This is because the bsg device is uninitialised, so the class
device has nothing it can attach to.  The fix is to make the bsg device
point to the cdevice of the entity creating the bsg, necessitating
changing the bsg_register_queue() prototype into a form that takes the
generic device.

Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] 3w-9xxx: add support for 9690SA
adam radford [Fri, 20 Jul 2007 22:28:28 +0000 (15:28 -0700)]
[SCSI] 3w-9xxx: add support for 9690SA

The attached patch updates the 3ware 9000 driver:

- Fix dma mask setting to fallback to 32-bit if 64-bit fails.
- Add support for 9690SA controllers.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] bsg: fix bsg_register_queue error path
James Bottomley [Fri, 20 Jul 2007 21:50:10 +0000 (16:50 -0500)]
[SCSI] bsg: fix bsg_register_queue error path

unfortunately, if IS_ERR(class_dev) is true, that means class_dev isn't
null and the check in the error leg is pointless ... it's also asking
for trouble to request unregistration of a device we haven't actually
created (although it works currently).  Fix by using explicit gotos and
unregisters.

Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.
David Miller [Sat, 21 Jul 2007 00:32:45 +0000 (17:32 -0700)]
[SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.

This matches the original driver's value and seems to be
necessary for some disks on sun4c systems.

Reported by Mark Fortescue <mark@mtfhpc.demon.co.uk>

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas: fix scr_read/write users and update the libata documentation
James Bottomley [Fri, 20 Jul 2007 18:11:44 +0000 (13:11 -0500)]
[SCSI] libsas: fix scr_read/write users and update the libata documentation

This fixes up the usage in libsas (which are easy to miss, since they're
only in the scsi-misc tree) ... and also corrects the documentation on
the point of what these two function pointers actually return.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: update Kconfig help
Gwendal Grignou [Fri, 20 Jul 2007 19:38:36 +0000 (12:38 -0700)]
[SCSI] mpt fusion: update Kconfig help

Update help in Kconfig for mptfc driver to indicate the driver supports
Brocade FC 4G HBA.

signed-off-by: Gwendal Grignou <ggrignou@brocade.com>
Acked-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] scsi_transport_sas: add destructor for bsg
James Bottomley [Fri, 20 Jul 2007 16:10:05 +0000 (11:10 -0500)]
[SCSI] scsi_transport_sas: add destructor for bsg

There's currently no destructor for the bsg components.  If you insert
and remove the module, you see the bsg devices building up and up.  This
patch adds the destructor in the correct place in the transport class so
that the bsg and request queue are removed just before the device
destruction.

Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] iscsi_tcp: buggered kmalloc()
Al Viro [Fri, 20 Jul 2007 15:03:40 +0000 (16:03 +0100)]
[SCSI] iscsi_tcp: buggered kmalloc()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Update version number to 8.02.00-k2.
Andrew Vasquez [Thu, 19 Jul 2007 22:06:04 +0000 (15:06 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.00-k2.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Add ISP25XX support.
Andrew Vasquez [Fri, 20 Jul 2007 03:37:34 +0000 (20:37 -0700)]
[SCSI] qla2xxx: Add ISP25XX support.

Large code-reuse from ISP24xx, consolidate RISC memory
extraction routines during firmware-dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Use pci_try_set_mwi().
Andrew Vasquez [Thu, 19 Jul 2007 22:06:02 +0000 (15:06 -0700)]
[SCSI] qla2xxx: Use pci_try_set_mwi().

As the "must-check" return-value of pci_set_msi() is never
really checked.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.
Andrew Vasquez [Thu, 19 Jul 2007 22:06:01 +0000 (15:06 -0700)]
[SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.

Original from Peter Oruba <peter.oruba@amd.com>.  Additional
cleanups included.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Re-factor isp_operations to static structures.
Andrew Vasquez [Thu, 19 Jul 2007 22:06:00 +0000 (15:06 -0700)]
[SCSI] qla2xxx: Re-factor isp_operations to static structures.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
Shyam Sundar [Thu, 19 Jul 2007 22:05:59 +0000 (15:05 -0700)]
[SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI regis...
Andrew Vasquez [Thu, 19 Jul 2007 22:05:58 +0000 (15:05 -0700)]
[SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Generalize iIDMA support.
Andrew Vasquez [Thu, 19 Jul 2007 22:05:57 +0000 (15:05 -0700)]
[SCSI] qla2xxx: Generalize iIDMA support.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] qla2xxx: Generalize FW-Interface-2 support.
Andrew Vasquez [Thu, 19 Jul 2007 22:05:56 +0000 (15:05 -0700)]
[SCSI] qla2xxx: Generalize FW-Interface-2 support.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] bsg: separate bsg and SCSI (so SCSI can be modular)
James Bottomley [Thu, 19 Jul 2007 15:15:10 +0000 (10:15 -0500)]
[SCSI] bsg: separate bsg and SCSI (so SCSI can be modular)

This patch moves the bsg registration into SCSI so that bsg no longer
has a dependency on the scsi_interface_register API.

This can be viewed as a temporary expedient until we can get universal
bsg binding sorted out properly.  Also use the sdev bus_id as the
generic bsg name (to avoid clashes with the queue name).

Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] Make scsi_host_template::proc_name const char * instead of char *.
Kristian Høgsberg [Wed, 9 May 2007 23:23:12 +0000 (19:23 -0400)]
[SCSI] Make scsi_host_template::proc_name const char * instead of char *.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
collapsed with fw-sbp2 patch "Drop cast to non-const char * in host
template initialization." from Kristian Høgsberg

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] zfcp: code cleanup
Swen Schillig [Wed, 18 Jul 2007 08:55:13 +0000 (10:55 +0200)]
[SCSI] zfcp: code cleanup

improve code for buffer enqueue. easy readability and maintainability.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] zfcp: NULL vs 0 usage
Heiko Carstens [Wed, 18 Jul 2007 08:55:10 +0000 (10:55 +0200)]
[SCSI] zfcp: NULL vs 0 usage

Get rid of two 'warning: Using plain integer as NULL pointer'.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] zfcp: Replace kmalloc/memset with kzalloc
Swen Schillig [Wed, 18 Jul 2007 08:55:08 +0000 (10:55 +0200)]
[SCSI] zfcp: Replace kmalloc/memset with kzalloc

Memory allocated with kmalloc is always initialzed to 0 with memset.
Replace the two calls with kzalloc, that already does both steps.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas: kill unused smp_portal code
FUJITA Tomonori [Sat, 7 Jul 2007 09:11:35 +0000 (18:11 +0900)]
[SCSI] libsas: kill unused smp_portal code

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas: add SAS management protocol handler
FUJITA Tomonori [Mon, 9 Jul 2007 03:52:08 +0000 (12:52 +0900)]
[SCSI] libsas: add SAS management protocol handler

This patch adds support for SAS Management Protocol (SMP) passthrough
support via bsg. aic94xx can use this.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] transport_sas: add SAS management protocol support
FUJITA Tomonori [Mon, 9 Jul 2007 03:52:06 +0000 (12:52 +0900)]
[SCSI] transport_sas: add SAS management protocol support

The sas transport class attaches one bsg device to every SAS object
(host, device, expander, etc). LLDs can define a function to handle
SMP requests via sas_function_template::smp_handler.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] a4000t, zorro7xx, mvme16x, bvme6000,sim710: xxx_device_remove seems buggy
Matthew Wilcox [Tue, 17 Jul 2007 19:38:03 +0000 (13:38 -0600)]
[SCSI] a4000t, zorro7xx, mvme16x, bvme6000,sim710: xxx_device_remove seems buggy

Fix drivers misusing dev_to_shost

Some drivers were using dev_to_shost to go from a struct device to the
corresponding shost.  Unfortunately, dev_to_shost only looks up the tree
to find an shost (it's designed to go from a scsi_device or a
scsi_target to the parent scsi_host), and these drivers were calling it
with the parent of the scsi_host.

I've fixed this by saving a pointer to the Scsi_Host in the drvdata,
which matches what most scsi drivers do.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aacraid: add vpd to inquiry
Salyzyn, Mark [Tue, 17 Jul 2007 18:01:28 +0000 (14:01 -0400)]
[SCSI] aacraid: add vpd to inquiry

Report VPD inquiry page 0x80 with an unique array creation serial
number (CUID). When an array is created, the metadata stored on the
physical drives gets an unique serial number. This serial number
remains constant through array morphing or migration to other
controllers.  This patch is a forward port and modification to survive
morphing and migration operations, of a similar piece of
(un-attributed author) code added to the SLES10 SP1 aacraid driver.

To test the results of the patch, observe that /dev/disk/by-id/
entries will show up for the arrays resulting from the udev rules.
Also, as per the udev rules, 'scsi_id -g -x -a -s /block/sd? -d
/dev/sd?'  will report the ID_SERIAL as constructed from the inquiry
data.

It was reported to me that the 'ADPT' leading the serial number was bad
form, that the inquiry vendor field was enough to differentiate the
storage uniquely. Subsequent search found that another Adaptec AAC based
driver reported the 8 hex serial number only without such adornments, so
dropped ADPT to match. Resubmitting the patch with this alteration.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aacraid: incorrect dma mapping mask during blinkled recover or user initiated...
Salyzyn, Mark [Tue, 17 Jul 2007 15:15:08 +0000 (11:15 -0400)]
[SCSI] aacraid: incorrect dma mapping mask during blinkled recover or user initiated reset

Incorrect dma mask was used for blinkled (firmware assert) recovery or
user initiated reset during initialization portion. Ensure that all
callers of aac_fib_map_free null out the fib allocation references to
prevent multiple free. Although serious sounding, no reports of these
problems have surfaced...

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aacraid: correct valid container response in management ioctl
Salyzyn, Mark [Tue, 17 Jul 2007 14:59:19 +0000 (10:59 -0400)]
[SCSI] aacraid: correct valid container response in management ioctl

During an Adapter Initiated scan request, the query disk ioctl reports a
value of 2 rather than 1 for the valid field. This presents a problem
for some legacy management applications.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: add support for Brocade branded LSI FC HBA
Prakash, Sathya [Tue, 17 Jul 2007 08:48:41 +0000 (14:18 +0530)]
[SCSI] mpt fusion: add support for Brocade branded LSI FC HBA

Add support for Brocade 410/420 4Gbit FC HBAs.
They are re-branded LSI HBAs [LSI7104EP-LC/LSI7204EP-LC]

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: deregister from transport layer if PCI registration failed
Prakash, Sathya [Mon, 2 Jul 2007 11:34:10 +0000 (17:04 +0530)]
[SCSI] mpt fusion: deregister from transport layer if PCI registration failed

The mptspi and mptsas drivers are modified to deregister from transport layer
if registration with PCI driver failed

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] add PCI_VENDOR_ID macro for Brocade in pci_ids.h
Prakash, Sathya [Tue, 17 Jul 2007 08:10:10 +0000 (13:40 +0530)]
[SCSI] add PCI_VENDOR_ID macro for Brocade in pci_ids.h

Adds PCI_VENDOR_ID_BROCADE macro in include/linux/pci_ids.h file. This macro
is used in MPT Fusion FC drivers to support Brocade branded FC controllers

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: add sysfs attributes to display IOC parameters
Prakash, Sathya [Tue, 17 Jul 2007 09:09:14 +0000 (14:39 +0530)]
[SCSI] mpt fusion: add sysfs attributes to display IOC parameters

New sysfs scsi_host attributes are added to provide information about Firmware
version, BIOS version, MPI version and other product related information

signed-off-by: Sathya Praksh <sathya.prakash@lsi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] Use menuconfig objects
Jan Engelhardt [Mon, 9 Jul 2007 19:00:08 +0000 (12:00 -0700)]
[SCSI] Use menuconfig objects

Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
so that the user can disable all the options in that menu at once
instead of having to disable each option separately.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] seagate: make seagate_st0x_detect() static
Adrian Bunk [Mon, 9 Jul 2007 19:00:01 +0000 (12:00 -0700)]
[SCSI] seagate: make seagate_st0x_detect() static

seagate_st0x_detect() can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] wd33c93: cleanups
Adrian Bunk [Mon, 9 Jul 2007 19:00:01 +0000 (12:00 -0700)]
[SCSI] wd33c93: cleanups

- #include <asm/irq.h> for getting the prototypes of {dis,en}able_irq()

- make the needlessly global wd33c93_setup() static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] small cleanups
Adrian Bunk [Mon, 9 Jul 2007 18:59:59 +0000 (11:59 -0700)]
[SCSI] small cleanups

This patch contains the following cleanups:
- make needlessly global functions static
- every file should #include the headers containing the prototypes for
  it's global functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas: fix lockdep issue with ATA
James Bottomley [Mon, 16 Jul 2007 18:15:51 +0000 (13:15 -0500)]
[SCSI] libsas: fix lockdep issue with ATA

lockdep noticed that with ATA support the port->dev_list_lock was
entangled at irq context, so it now needs to become IRQ safe

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas, aic94xx: fix dma mapping cockups with ATA
James Bottomley [Mon, 16 Jul 2007 18:41:04 +0000 (13:41 -0500)]
[SCSI] libsas, aic94xx: fix dma mapping cockups with ATA

This one was noticed by Gilbert Wu of Adaptec:

The libata core actually does the DMA mapping for you, so there has to
be an exception in the device drivers that *don't* do dma mapping for
ATA commands.  However, since we've already done this, libsas must now
dma map any ATA commands that it wishes to issue ... and yes, this is a
horrible mess.

Additionally, the test in aic94xx for ATA protocols isn't quite right.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] sas_ata: Implement sas_task_abort for ATA devices
Darrick J. Wong [Tue, 30 Jan 2007 09:18:58 +0000 (01:18 -0800)]
[SCSI] sas_ata: Implement sas_task_abort for ATA devices

ATA devices need special handling for sas_task_abort.  If the ATA command
came from SCSI, then we merely need to tell SCSI to abort the scsi_cmnd.
However, internal commands require a bit more work--we need to fill the qc
with the appropriate error status and complete the command, and eventually
post_internal will issue the actual ABORT TASK.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] sas_ata: Assign sas_task to scsi_cmnd to enable EH for ATA devices
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>
16 years ago[SCSI] libsas: Unknown STP devices should be reported to libata as unknown.
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>
16 years ago[SCSI] libsas: Accept SAM_GOOD for ATAPI devices in sas_ata_task_done
Darrick J. Wong [Tue, 30 Jan 2007 09:18:49 +0000 (01:18 -0800)]
[SCSI] libsas: Accept SAM_GOOD for ATAPI devices in sas_ata_task_done

A sas_task sent to an ATAPI devices returns SAM_GOOD if successful.
Therefore, we should treat this the same way we treat ATA commands
that succeed.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] sas_ata: Don't copy aic94xx's sactive to ata_port
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>
16 years ago[SCSI] sas_ata: ata_post_internal should abort the sas_task
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>
16 years ago[SCSI] sas_ata: sas_ata_qc_issue should return AC_ERR_*
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>
16 years ago[SCSI] sas_ata: Satisfy libata qc function locking requirements
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>
16 years ago[SCSI] aic94xx: Don't call pci_map_sg for already-mapped scatterlists
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>
16 years ago[SCSI] Migrate libsas ATA code into a separate file
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>
16 years ago[SCSI] libsas: fixup NCQ for SATA disks
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>
16 years ago[SCSI] libsas: better error handling in sas_ex_discover_end_dev()
James Bottomley [Mon, 16 Oct 2006 15:57:05 +0000 (10:57 -0500)]
[SCSI] libsas: better error handling in sas_ex_discover_end_dev()

This replaces a few BUG_ON() statements with the correct failure error
handling.  There are still many more to do.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aic94xx: add SATAPI support
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>
16 years ago[SCSI] libsas: support NCQ for SATA disks
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>
16 years ago[SCSI] aic94xx: SATA tag mask not set correctly
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>
16 years ago[SCSI] libsas: fix up sas_smp_phy_control()
James Bottomley [Thu, 7 Sep 2006 20:52:09 +0000 (15:52 -0500)]
[SCSI] libsas: fix up sas_smp_phy_control()

The prototype of this has changed for the link speed setting patch.
Need to update the SATA use of this.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] libsas: Add SATA support to STP piece for SATA on SAS expanders
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>
16 years ago[SCSI] Add SATA support to libsas
Darrick J. Wong [Fri, 11 Aug 2006 02:19:47 +0000 (19:19 -0700)]
[SCSI] Add SATA support to libsas

Hook the scsi_host_template functions in libsas to delegate
functionality to libata when appropriate.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Misc code changes and merge fixes and update for libata->drivers/ata
move

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years agozs: move to the serial subsystem
Maciej W. Rozycki [Wed, 18 Jul 2007 07:49:11 +0000 (00:49 -0700)]
zs: move to the serial subsystem

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>
16 years agoserial: add early_serial_setup() back to header file
Yinghai Lu [Wed, 18 Jul 2007 07:49:10 +0000 (00:49 -0700)]
serial: add early_serial_setup() back to header file

early_serial_setup was removed from serial.h, but forgot to put in
serial_8250.h

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: make fb_append_extra_logo() depend on fb=y
Arnd Bergmann [Wed, 18 Jul 2007 07:49:09 +0000 (00:49 -0700)]
fbdev: make fb_append_extra_logo() depend on fb=y

We can't show the extra logo from boot code if FB is built as a module.
Make the FB_LOGO_EXTRA depend on FB=y.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodm: fix memory leak in dm_create_persistent() when starting metadata update thread...
Jesper Juhl [Wed, 18 Jul 2007 07:49:08 +0000 (00:49 -0700)]
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>
16 years agoslob: Kill off duplicate kzalloc() definition.
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>
16 years agoRevert drivers/ide/ide.c scsi_cmd_ioctl() usage changes
Linus Torvalds [Tue, 17 Jul 2007 22:57:42 +0000 (15:57 -0700)]
Revert drivers/ide/ide.c scsi_cmd_ioctl() usage changes

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.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMake the "z/VM unit record device driver" depend on S390
Linus Torvalds [Tue, 17 Jul 2007 22:43:56 +0000 (15:43 -0700)]
Make the "z/VM unit record device driver" depend on S390

I really don't see anybody else wanting to select it ;)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:29:33 +0000 (15:29 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Fix broken logic, SIGA flags must be bitwise ORed
  [S390] cio: Dont print trailing \0 in modalias_show().
  [S390] Simplify stack trace.
  [S390] z/VM unit record device driver
  [S390] vmcp cleanup
  [S390] qdio: output queue stall on FCP and network devices
  [S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.
  [S390] Update default configuration.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 17 Jul 2007 22:28:18 +0000 (15:28 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (21 commits)
  [WATCHDOG] at32ap700x_wdt.c - Fix compilation warnings
  [WATCHDOG] at32ap700x_wdt.c - Add spinlock support
  [WATCHDOG] at32ap700x_wdt.c - Add nowayout + MAGICCLOSE features
  [WATCHDOG] at32ap700x_wdt.c - timeout module parameter patch
  [WATCHDOG] at32ap700x_wdt.c - checkpatch.pl-0.05 clean-up's
  [WATCHDOG] change s3c2410_wdt to using dev_() macros for output
  [WATCHDOG] s3c2410_wdt announce initialisation
  [WATCHDOG] at32ap700x-wdt: add iounmap if probe function fails
  [WATCHDOG] at32ap700x-wdt: add missing iounmap in _remove
  [WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix-2
  [WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix
  [WATCHDOG] Watchdog driver for AT32AP700X devices
  [WATCHDOG] Mixcom Watchdog - CodingStyle clean-up
  [WATCHDOG] Mixcom Watchdog - clean-up printk's
  [WATCHDOG] Mixcom Watchdog - clean-up printk's
  [WATCHDOG] Mixcom Watchdog - checkcard part 2
  [WATCHDOG] Mixcom Watchdog - checkcard
  [WATCHDOG] Mixcom Watchdog - get rid of port offset's
  [WATCHDOG] Mixcom Watchdog - update "Documentation"
  [WATCHDOG] Remove the redundant check for pwrite() in EP93XXX watchdog.
  ...

16 years agoMerge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Tue, 17 Jul 2007 22:26:31 +0000 (15:26 -0700)]
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

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Tue, 17 Jul 2007 22:23:50 +0000 (15:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix debug compilation error

16 years agoMerge branch 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 17 Jul 2007 22:23:37 +0000 (15:23 -0700)]
Merge branch 'isdn-cleanup' of /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

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:19:27 +0000 (15:19 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().
  [SPARC64]: Update defconfig.
  [SPARC64]: Kill explicit %gl register reference.

16 years agoMerge branch 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 17 Jul 2007 22:19:06 +0000 (15:19 -0700)]
Merge branch 'uninit-var' of /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()

16 years agoMerge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:18:33 +0000 (15:18 -0700)]
Merge branch 'warnings' of /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

16 years agosmp_call_function_single() should be a macro on UP
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>
16 years ago[SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().
Oleg Nesterov [Tue, 17 Jul 2007 21:37:54 +0000 (14:37 -0700)]
[SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().

From: Oleg Nesterov <oleg@tv-sign.ru>

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ISDN] HiSax hfc_pci: minor cleanups
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax bkm_a4t: split setup into two smaller functions
Jeff Garzik [Sun, 15 Jul 2007 23:58:24 +0000 (19:58 -0400)]
[ISDN] HiSax bkm_a4t: split setup into two smaller functions

No behavior changes, just code movement.  Prep for PCI hotplug API.

Well, CONFIG_PCI useless ifdef was removed.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax enternow: split setup into 3 smaller functions
Jeff Garzik [Sun, 15 Jul 2007 23:25:45 +0000 (19:25 -0400)]
[ISDN] HiSax enternow: split setup into 3 smaller functions

No behavior changes, just code movement.  Prep for PCI hotplug API.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax netjet_u: split setup into 3 smaller functions
Jeff Garzik [Sun, 15 Jul 2007 20:59:01 +0000 (16:59 -0400)]
[ISDN] HiSax netjet_u: split setup into 3 smaller functions

No behavior changes, just code movement.  Prep for PCI hotplug API.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax netjet_s: code movement, prep for hotplug
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax: move card state alloc/setup code into separate functions
Jeff Garzik [Tue, 17 Jul 2007 21:14:23 +0000 (17:14 -0400)]
[ISDN] HiSax: move card state alloc/setup code into separate functions

Just code movement.  No code changes or cleanups besides that which
is required to call the new functions from the old code site.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[ISDN] HiSax: move card setup into separate function
Jeff Garzik [Sun, 15 Jul 2007 01:58:34 +0000 (21:58 -0400)]
[ISDN] HiSax: move card setup into separate function

No behavior changes, just code movement.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agomixart: Add missing vmalloc.h include
Frank Lichtenheld [Tue, 17 Jul 2007 17:50:53 +0000 (19:50 +0200)]
mixart: Add missing vmalloc.h include

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>
16 years agohppb: Add missing dma-mapping.h include
Frank Lichtenheld [Tue, 17 Jul 2007 17:30:38 +0000 (19:30 +0200)]
hppb: Add missing dma-mapping.h include

This fixes the following build-error:

 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>
16 years agoarch/i386/* fs/* ipc/*: mark variables with uninitialized_var()
Jeff Garzik [Tue, 17 Jul 2007 09:40:59 +0000 (05:40 -0400)]
arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()

Mark variables with uninitialized_var() if such a warning appears,
and analysis proves that the var is initialized properly on all paths
it is used.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/*: mark variables with uninitialized_var()
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/atm/ambassador: kill uninit'd var warning, and fix bug
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[libata] sata_mv: use pci_try_set_mwi()
Jeff Garzik [Tue, 17 Jul 2007 06:21:50 +0000 (02:21 -0400)]
[libata] sata_mv: use pci_try_set_mwi()

Because sometimes in life, it's ok to fail.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/net/wan/sbni: kill uninit'd var warning
Jeff Garzik [Tue, 17 Jul 2007 05:56:32 +0000 (01:56 -0400)]
drivers/net/wan/sbni: kill uninit'd var warning

It's actually convenient in the code to initialize this and a sister
variable to zero.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
Jeff Garzik [Tue, 17 Jul 2007 05:49:56 +0000 (01:49 -0400)]
drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/telephony/ixj: cleanup and fix gcc warning
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.

2) Tighten the scope of 'blankword' in two cases.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/net/wan/pc300_drv: fix bug caught by gcc warning
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/usb/misc/auerswald: fix status check, remove redundant check
Jeff Garzik [Tue, 17 Jul 2007 05:08:29 +0000 (01:08 -0400)]
drivers/usb/misc/auerswald: fix status check, remove redundant check

1) We should only set 'actual_length' output variable if usb length is
known to be good.

2) No need to check actual_length for NULL.  The only caller always
passes non-NULL value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
Jeff Garzik [Tue, 17 Jul 2007 04:15:54 +0000 (00:15 -0400)]
[netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[netdrvr] natsemi: Fix device removal bug
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agokernel/auditfilter: kill bogus uninit'd-var compiler warning
Jeff Garzik [Tue, 17 Jul 2007 01:25:01 +0000 (21:25 -0400)]
kernel/auditfilter: kill bogus uninit'd-var compiler warning

Kill this warning...

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.

As a desired side effect, the warning goes away.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[SPARC64]: Update defconfig.
David S. Miller [Tue, 17 Jul 2007 08:20:17 +0000 (01:20 -0700)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Kill explicit %gl register reference.
David S. Miller [Tue, 17 Jul 2007 04:33:19 +0000 (21:33 -0700)]
[SPARC64]: Kill explicit %gl register reference.

Older binutils can't handle it.  Use SET_GL() instead,
which is explicitly for this purpose.

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