Commit graph

1235 commits

Author SHA1 Message Date
Al Viro
164006da31 [PATCH] bogus asm/delay.h includes
asm/delay.h is non-portable; linux/delay.h should be used in generic code.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:56:41 -05:00
andrew.vasquez@qlogic.com
0d4be1240b [PATCH] qla2xxx: Correct lun assignment during IOCB submission.
4gb products require an IOCB's FCP-LUN to be formatted in
wire-format prior to submission.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:07 -06:00
andrew.vasquez@qlogic.com
247ec457ce [PATCH] qla2xxx: Pass input-buffer length to Get-ID-List mailbox command.
Recent ISP24xx firmwares require that mailbox register 8 be
set to the maximum number of bytes to transfer during DMA
copying of the list.  We safely set this value to zero
(infinite), since the call is *only* made in FCAL
topologies.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:05 -06:00
andrew.vasquez@qlogic.com
f7757a5f0f [PATCH] qla2xxx: Remove bogus debug-code.
Commit 854165f424
inadvertently added some code meant only for testing -- the
driver was ignoring the non-zero function numbers of a
multi-port HBA.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:02 -06:00
andrew.vasquez@qlogic.com
387f96b4d9 [PATCH] qla2xxx: Close window on race between rport removal and fcport transition.
Fcport visibility is recognized during interrupt time, but,
rport removal can only occur during a process
(sleeping)-context.  Return a DID_IMM_RETRY status for
commands submitted within this window to insure I/Os do not
prematurely run-out of retries.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:53:56 -06:00
adam radford
62288f105b [SCSI] 3ware 9000 driver >4GB memory fix
The attached patch fixes a bug in the 3ware 9000 series driver:

- Fix use_sg == 0 mapping on systems with 4GB or higher.

  This fixes REPORT_LUNS (0xa0) failing with 3ware 9000 controllers on systems
  with lots of ram, mentioned in bugzilla # 6009:

      http://bugzilla.kernel.org/show_bug.cgi?id=6009

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-05 17:15:15 -06:00
Eric Dumazet
88a2a4ac6b [PATCH] percpu data: only iterate over possible CPUs
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of
cpudata, instead of allocating memory only for possible cpus.

As a preparation for changing that, we need to convert various 0 -> NR_CPUS
loops to use for_each_cpu().

(The above only applies to users of asm-generic/percpu.h.  powerpc has gone it
alone and is presently only allocating memory for present CPUs, so it's
currently corrupting memory).

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <axboe@suse.de>
Cc: Anton Blanchard <anton@samba.org>
Acked-by: William Irwin <wli@holomorphy.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:51 -08:00
Jenx Axboe
40cdc840dc [SCSI] gdth: don't map zero-length requests
Don't map zero-length requests in gdth, zome architectures don't like
that in their dma mapping routines.

[ I'm pretty sure Jens posted this before, but for some reason it got
  forgotten  --hch ]

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-05 12:59:29 -06:00
Sumant Patro
f9876f0b67 [SCSI] megaraid_sas: support for 1078 type controller added
This patch adds support for 1078 type controller (device id : 0x60).

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:38:41 -06:00
Joshua Giles
122da30223 [SCSI] megaraid_sas: register 16 byte CDB capability
This patch properly registers the 16 byte command length capability of
the megaraid_sas controlled hardware with the scsi midlayer.  All
megaraid_sas hardware supports 16 byte CDB's.

Signed-off-by: Joshua Giles <joshua_giles@dell.com>
Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:37:29 -06:00
Mike Christie
b5b8101653 [SCSI] iscsi update: rm unused sessions list
rm unused sessions list.

This patch is last becuase I was not sure if this patchset was
going to be applied over the kmalloc2kzalloc one by JesS. If it
is then this patch will not apply and can be dropped for now. I will
resend later when things setttle down.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:30:37 -06:00
Mike Christie
28e5554df6 [SCSI] iscsi update: use gfp_t
Use gfp_t. I accidentally removed this in our last update.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:20:12 -06:00
Mike Christie
b36ae07cb7 [SCSI] iscsi update: fix mgmt pool err path release
>From ogerlitz@voltaire.com:

mgmtpool shoild be frees in immdata_alloc_fail label.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:53 -06:00
Mike Christie
351f739e68 [SCSI] iscsi update: set correct state at creation time
>From erezz@voltaire.com:

We are still in ISCSI_STATE_FREE state at create time. The addition
of the first connection puts us in ISCSI_STATE_LOGGED_IN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:31 -06:00
Mike Christie
1fd459e367 [SCSI] iscsi update: rm conn lock
>From erezz@voltaire.com:

rm conn->lock since it is not used anymore. The dataqueue is protected
by the session lock and xmitmutex.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:08 -06:00
Mike Christie
ee7f8e4053 [SCSI] iscsi update: set deamon pid earlier
>From michaelc@cs.wisc.edu:

If the transport lookup fails we set the daemon pid too late.
This can cause us deadlock since the netlink code will think we
meant to call back into our iscsi_if_rx function.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:51 -06:00
Mike Christie
142e301fc8 [SCSI] iscsi update: setup pool before using
>From andmike@us.ibm.com:

 Ensure that pool data is setup prior to calling mempool_create as it will
 call the the alloc function during create.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:27 -06:00
Mike Christie
5b940adf5b [SCSI] iscsi update: pass correct skb to skb_trim
>From da-x@monatomic.org:

Wrong skb is passed to skb_trim in iscsi_if_get_stats.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:09 -06:00
Mike Christie
7b7232f3fb [SCSI] iscsi update: cleanup iscsi class interface
From:
michaelc@cs.wisc.edu
fujita.tomonori@lab.ntt.co.jp
da-x@monatomic.org

and err path fixup from:
ogerlitz@voltaire.com

This patch cleans up that interface by having the lld and class
pass a iscsi_cls_session or iscsi_cls_conn between each other when
the function is used by HW and SW iscsi llds. This way the lld
does not have to remember if it has to send a handle or pointer
and a handle or pointer to connection, session or host.

This also has the class verify the session handle that gets passed from
userspace instead of using the pointer passed into the kernel directly.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:17:03 -06:00
Mark Haverkamp
bb08f92ebd [SCSI] aacraid: use no_uld_attach flag
Received From Mark Salyzyn.

In order to support user tools accessing the array components (SMART,
Mode Page information, Cache page adjustments, WWN determination,
Firmware updates etc), we take advantage of the no_uld_attach flag and
deprecate the code that filters Inquiries to block the requests to array
components. The quirk prevents the sd layer from attaching to the
components.

We also took the opportunity to balance the queue depths based on the
total adapter queue depth to the array devices to reduce the chances of
starvation.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:16:14 -06:00
Mark Haverkamp
bfb35aa850 [SCSI] aacraid: Update global function names
Received from Mark Salyzyn,

Reduce the possibility of namespace collision.  Prefix with aac_.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:16:07 -06:00
Mark Haverkamp
d8a571135a [SCSI] aacraid: reduce device probe warnings
Received from Mark Salyzyn.

This patch sets up some device quirks surrounding arrays to inform the
scsi layer that various mode pages are not supported. This reduces the
severity of the complaints that show up in the logs as the array devices
are enumerated.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:15:56 -06:00
andrew.vasquez@qlogic.com
854165f424 [SCSI] qla2xxx: Add support to retrieve/update HBA option-rom.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:12:41 -06:00
andrew.vasquez@qlogic.com
1b3f63659b [SCSI] qla2xxx: Return correct data-len during NVRAM retrieval.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:12:19 -06:00
andrew.vasquez@qlogic.com
f6df144cca [SCSI] qla2xxx: Add beacon support via class-device attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:11:57 -06:00
andrew.vasquez@qlogic.com
392e2f651c [SCSI] qla2xxx: Add host-statistics FC transport attributes.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:11:35 -06:00
andrew.vasquez@qlogic.com
8d067623ad [SCSI] qla2xxx: Add host port-type FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:10:28 -06:00
andrew.vasquez@qlogic.com
04414013bb [SCSI] qla2xxx: Add port-speed FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:10:07 -06:00
Jeff Garzik
ddef9bb367 [libata sata_mv] do not enable PCI MSI by default
Several bug reports have come in, noting that disabling CONFIG_PCI_MSI
has fixed their problems with this driver.  This may be generic system
issues, but there is also the probability of unimplemented hardware
errata workarounds.  Until this ream of bug reports is sorted out, we
can get them going in non-MSI interrupt mode.

As such, this change adds an 'msi' module option, which defaults to off.
2006-02-02 16:17:06 -05:00
Mikael Pettersson
b62735d9c6 [PATCH] ide-scsi: fix for IDE probe/remove ops changes
Kernel 2.6.16-rc1 broke the ide-scsi driver: ide-scsi loads but fails to
find any devices to bind to.  It also triggers a message "Driver 'ide-scsi'
needs updating - please use bus_type methods" from the driver core.

The IDE core in 2.6.16-rc1 changed the location of an IDE driver's
->probe()/->remove()/->shutdown() methods: they are now in the ide_driver_t
struct not in the gen_driver sub-struct.  drivers/ide/ was updated for this
change but ide-scsi.c wasn't.  Hence the breakage.

This patch repairs ide-scsi and also eliminates the driver core warning.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:09 -08:00
Linus Torvalds
2f4c5416b3 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-01-31 21:22:45 -08:00
Linus Torvalds
e0ae23550f Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-01-31 13:12:41 -08:00
Jack Hammer
a5b3c86e4b [SCSI] ServeRAID: prevent seeing DADSI devices
A critical thing the ServeRAID driver MUST do is hide the physical DASDI
devices from the OS. It does this by intercepting the INQUIRY commands.

In recent 2.6.15 testing, I discovered this to be failing.

The cause was the driver assuming that the INQUIRY response data was in a
simple single buffer, when it was actually a 1 element scatter gather list.

This patch makes ips always look at the correct data when examining an
INQUIRY response.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:43:18 -06:00
Hannes Reinecke
eb22184954 [SCSI] aic79xx: Fix timer handling
Fix the timer handling in aic79xx to use the SCSI-ML provided handling
instead of implementing our own.
It also fixes a deadlock in the command recovery code.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:50 -06:00
Hannes Reinecke
3fb0861264 [SCSI] aic79xx: SLOWCRC fix
This patch introduces the SLOWCRC handling for certain buggy chipsets.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:48 -06:00
Hannes Reinecke
53467e636b [SCSI] aic79xx: sequencer fixes
This patch updates the aic79xx sequencer with latest fixes from adaptec.
The sequencer code now corresponds with adaptec version 2.0.15.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:46 -06:00
Hannes Reinecke
2628ed2b1a [SCSI] aic7xxx: Update aicasm
This patchset updates aicasm code with the latest fixes from adaptec.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:44 -06:00
Moore, Eric
d99ca4180f [SCSI] scsi_transport_sas.c: display port identifier
This patch displays the port identifier on
the folder attribute; located in the middle digit.

/sys/class/sas_rphy/rphy-%x:%x:%x

The port identifier is basically the unique identifier
for each sas domain.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:36 -06:00
Jens Axboe
48bdc8ec4a [LIBATA] Blacklist certain Maxtor firmware revisions for FUA support
It looks like they are either discarding or corrupting data when the FUA
command is used, bad.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-30 16:09:35 +01:00
Jeff Garzik
9220a2d0da [libata ahci] add another JMicron pci id 2006-01-29 12:40:57 -05:00
Sumant Patro
1341c93922 [SCSI] megaraid_sas: new template defined to represent each type of controllers
This patch defines a new template to represent each type of
controllers (identified by the processor used). The template has
members that is set with appropriate values during driver
initialisation. This change is done to support new controllers with
minimal change to existing code. In future, for a new controller
support, a template will be declared and its members initialised
appropriately.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>

Rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29 11:25:30 -06:00
Sumant Patro
cb59aa6a7c [SCSI] megaraid_sas: cleanup queue command path
This patch (originally submitted by Christoph Hellwig) removes code
duplication in megasas_build_cmd.  It also defines
MEGASAS_IOC_FIRMWARE32 to allow 64 bit compiled applications to work.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>

Rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29 11:18:16 -06:00
Jeff Garzik
bd12097c74 [libata ahci] Isolate Intel-ism, add JMicron JMB360 support
Isolate some PCI config register bitbanging to Intel hardware, as it
should have been all along.

Add support for JMicron JMB360.
2006-01-29 02:47:03 -05:00
Jeff Garzik
51e9f2ff83 [libata sata_sil] implement 'slow_down' module parameter
On occasion, a user will submit a patch that enables the "mod15write"
quirk for their device.  Enabling this quirk has the effect of clamping
all ATA commands to no more than 15 sectors.  The intended use of this
quirk is to stop the controller from generating FIS's of unusual size
("but Wesley, what about the FOUS's?"), which in turn works around
problems in a <list> of hard drives.

One side effect of this quirk is greatly decreased performance.  Users
often enable the mod15write quirk to fix various system, power, chip,
and/or driver problems.  For a few rare problematic cases, enabling this
has cured lockups or data corruption.

Rather than add bogus listings to the mod15write quirk list (I get a
patch every month doing such), we add a 'slow_down' module parameter.
This allows users to employ a performance sledgehammer in the hopes
of curing a problem.  It defaults to off (0), of course.
2006-01-27 16:50:27 -05:00
brking@us.ibm.com
bb1d1073a1 [SCSI] Prevent scsi_execute_async from guessing cdb length
When the scsi_execute_async interface was added it ended up reducing
the flexibility of userspace to send arbitrary scsi commands through
sg using SG_IO. The SG_IO interface allows userspace to specify the
CDB length. This is now ignored in scsi_execute_async and it is
guessed using the COMMAND_SIZE macro, which is not always correct,
particularly for vendor specific commands. This patch adds a cmd_len
parameter to the scsi_execute_async interface to allow the caller
to specify the length of the CDB.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 15:13:50 -05:00
Jack Hammer
15084a4a63 [SCSI] ips soft lockup during reset/initialization
Resetting the adapter causes the ServeRAID driver to exceed
the max time allowed by the softlock watchdog. Resetting the
hardware can easily require 30 or more seconds. To avoid the

    "BUG: soft lockup detected on CPU#0!"

result, this patch replaces the mdelay() calls in the
initialization/reset routines with msleep().

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:18:23 -05:00
andrew.vasquez@qlogic.com
77427f514f [SCSI] qla2xxx: Drop legacy 'bypass lun scan for tape device' code.
Internal lun discovery has been removed since fc_transport
integration.  Short-circuiting for tape-devices in
qla2x00_update_fcport() could inadvertently result in a
blocked rport timing-out and its targets being reaped.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:17:25 -05:00
andrew.vasquez@qlogic.com
052c40c83b [SCSI] qla2xxx: Correct issue where the rport's upcall was not being made after relogin.
A target can LOGO an initiator at any time (i.e. during I/O,
due to a controller hicup, or as a simple authentication
mechanism after an initial CDB command), when this occurs,
the driver attempts to relogin (PLOGI) to the device via the
DPC thread.  Add code to make the appropriate upcall to the
FC transport layer (fc_remote_port_add()) upon successful
completion of the PLOGI.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:17:00 -05:00
andrew.vasquez@qlogic.com
d97994dc1f [SCSI] qla2xxx: Correct synchronization issues during rport addition/deletion.
The driver can typically detect port-loss during an
interrupt context (i.e. via interrogation of a status IOCB's
completion status [CS_PORT_LOGGED_OUT].  Due to the calling
requirements of the fc_rport APIs, the driver would defer
removal of the device to the default workqueue.  If the
work-item was preceded by an event which caused the port to
obtain visibility (relogin successful, target re-logged into
the topology), deferred removal could inadvertently drop the
rport.  The code also no longer defers removal via the
default workqueue, instead opting for use of the driver's
own DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:16:50 -05:00
Guennadi Liakhovetski
1d12d98d28 [SCSI] dc395x: "fix" virt_addr calculation on AUTO_REQSENSE
The patch below "fixes" calculation of the virt_addr for the AUTO_REQSENSE
case. I put "fixes" in quotes because the real fix would be to completely
remove it, but that's beyond the scope of this patch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:11:13 -05:00
Dave C Boutcher
2b541f8f77 [SCSI] ibmvscsi: handle re-enable firmware message
New versions of the Power5 firmware can send a "re-enable" message to
the virtual scsi adapter.  This fix makes us handle the message
correctly.  Without it, the driver goes catatonic and the system crashes
unpleasantly.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:10:08 -05:00
Jes Sorensen
2dbb04c655 [SCSI] qla1280: remove < 2.6.0 support
Remove support for kernels older than 2.6.0.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:08:26 -05:00
Alan Cox
a1bd9e6857 [PATCH] libata: Code for the IRQ mask flag
Signed-off-by: Alan Cox <alan@redhat.com>

Somewhat cleaner in the resync as someone cleaned up the pio xfer users
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:37:45 -05:00
Alan Cox
9d824d0710 [PATCH] libata: Fix sector lock to apply to both drives not drive 0 twice
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:37:45 -05:00
Alan Cox
8d238e0124 [PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add IRQ flag for next diff
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:37:45 -05:00
Jason Gaston
012b265f76 [PATCH] Intel ICH8 SATA: add PCI device IDs
Signed-off-by: Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 19:31:54 -05:00
Alan Cox
1bc4ccfff8 [PATCH] libata: add a function to decide if we need iordy
This ought to be simple but for PIO2 we have to poke around the drive
data to get it 100% correct.

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 08:25:39 -05:00
Alan Cox
ffa29456cd [PATCH] libata: Pre UDMA EIDE PIO mode selection
I misread the spec when doing the original. I've tested the corrected
version with pre UDMA drives and it now picks the right modes. This is a
specific bug fix rather than an update or new feature item.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 08:25:39 -05:00
Yusuf Iskenderoglu
5a46fe89a7 [libata] sata_promise: add pci id 2006-01-17 08:06:21 -05:00
Oliver Weihe
88b52877fa [libata] sata_svw: add pci id 2006-01-17 07:58:42 -05:00
Jason Gaston
f285757cab [PATCH] ahci: AHCI mode SATA patch for Intel ICH8
This patch adds the Intel ICH8 DID's to the ahci.c file for AHCI mode
SATA support.

Signed-off-by: Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17 07:54:42 -05:00
Linus Torvalds
3f02d072d4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-15 16:43:29 -08:00
Arjan van de Ven
858119e159 [PATCH] Unlinline a bunch of other functions
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:06 -08:00
Alexey Dobriyan
3235798804 Fix "stuct", "strut", "struc" typos
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15 02:12:54 +01:00
Adrian Bunk
575c968718 spelling: s/appropiate/appropriate/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15 02:00:17 +01:00
Linus Torvalds
12dbf3fc4d Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-01-14 12:16:07 -08:00
andrew.vasquez@qlogic.com
fc091e0382 [SCSI] qla2xxx: Update version number to 8.01.04-k.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:40 -06:00
andrew.vasquez@qlogic.com
79f89a4296 [SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.
Given the semantic changes in both the device-model and
fc-transport APIs, the driver's handling of port-type RSCNs
via a series of ADISCs and PLOGIs can cause series of
badness ranging from unexpectedly device loss to devices not
being discovered.

In the interim, disable (via a module-parameter) this
feature and allow RSCN management to continue to occur
within the driver's DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:39 -06:00
andrew.vasquez@qlogic.com
fdd52dfa3c [SCSI] qla2xxx: Kconfig update: Add URL to download firmware images.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:37 -06:00
andrew.vasquez@qlogic.com
c0eb875526 [SCSI] qla2xxx: Correct setting of FDMI supported/current port speed.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:36 -06:00
andrew.vasquez@qlogic.com
bc8fb3cb9e [SCSI] qla2xxx: Correct execution-throttle setting for ISP24xx.
Similarly to other ISPs, set execution throttle to maximum
allowed value since 'throttling' is done on a per-lun basis
via queue-depth.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:35 -06:00
andrew.vasquez@qlogic.com
590f98e5e8 [SCSI] qla2xxx: Collapse load RISC RAM implementations.
Simplify essentially duplicate load RISC RAM implementation
in qla2x00_load_ram_ext() and qla2x00_load_ram().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:34 -06:00
andrew.vasquez@qlogic.com
f94097edf2 [SCSI] qla2xxx: Correct swing/emphasis settings for ISP24XX.
Swing/emphasis settings in NVRAM were not being honoured due
to the driver not converting the serial-link options from LE
to host-endian format.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:33 -06:00
andrew.vasquez@qlogic.com
c9d02acf39 [SCSI] qla2xxx: Correct issue where portstate does not transition during loop-resync.
If the Get Port Database call fails during local-loop
update, then schedule the DPC routine to perform a rescan as
the firmware would have updated the Get ID List port-entries
of their new state.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:31 -06:00
andrew.vasquez@qlogic.com
210d53507e [SCSI] qla2xxx: Update firmware-dump procedure for ISP24xx.
Small changes to register retrieval and order as per latest
firmware specification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:30 -06:00
andrew.vasquez@qlogic.com
e978010ceb [SCSI] qla2xxx: Re-enable flash-part write protection on ISP24xx boards.
Driver would not correctly re-enable the write-protection
bits of the flash part after updates.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:29 -06:00
andrew.vasquez@qlogic.com
5998983113 [SCSI] qla2xxx: Correct excessive delay during LOAD-RISC-RAM mailbox command.
Problem report (against 2.4.x driver) from Jeff Layton
<jlayton@redhat.com>:

An OEM noticed that the U6 qla2200 driver would hang for
around 2 minutes at boot time and then proceed normally. I
found that the delay was occurring when loading the new
firmware into the card, and was due to a
schedule_timeout(10) added to the bottom of the polling
loop.

Some testing showed that the load ram operation on the card
was very quick (on the order of a couple of jiffies), but
the sleep in the polling loop was making each operation take
around 25-30.

The attached patch corrects this by making it skip sleeping
during the load ram operation, since I believe we only do
that when the module is plugged in. It also skips sleeping
if the mbox_int flag got set during the current loop.

This corrected the hang on my test setup, and OEM also
confirmed that it corrected the problem for them.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:28 -06:00
andrew.vasquez@qlogic.com
03ab2eabed [SCSI] qla2xxx: Use msleep() as delay during ISP polling.
Mailbox commands are polled for completion during ISP
initialization.  During potentially 'long' mailbox commands
(i.e. fabric login), we really don't want a busy-wait delay
to potentially trigger a (benign) soft-lockup BUG().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:27 -06:00
andrew.vasquez@qlogic.com
e038a1be22 [SCSI] qla2xxx: Drop noisy 'UNDERRUN' status message.
There's no point in displaying the message during a valid
underrun case.  Limit the message to potentially problematic
cases.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:26 -06:00
andrew.vasquez@qlogic.com
9403688e9b [SCSI] qla2xxx: Correct FC4 feature assignment during RFF_ID.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:24 -06:00
andrew.vasquez@qlogic.com
dad9c8c15d [SCSI] qla2xxx: Reference proper node/port names in fc_host class.
The initial-control-block references are not always correct
as the use-node-name qualifier during NVRAM configuration
will cause the firmware to use the portname as a base for
the nodename.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:23 -06:00
Mike Christie
a1e80c20e1 [SCSI] iscsi: use pageslab
From: FUJITA Tomonori <tomof@acm.org> and zhenyu.z.wang@intel.com:

We cannot handle filesystems like XFS becuase of the pages they
are sending us. We had thought page_count could be used to
work around this, but the correct test is for PageSlab.

The proper solution is to figure out what type of pages
filesystems can use so we do not have to add tests like
this or handle it in the block layer for all network block drivers
but the issue still has not been resolved on fs-devel
so we are sending this patch as a temporary fix.

This is last patch just in case it is Nakd with the explanation
that we need to push the correct fix through fs-devel, mm
or the block layer. The rest of the patchset can live without
the patch, but the driver will not work with filesystems like
XFS.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:22 -06:00
Mike Christie
55e3299d9e [SCSI] iscsi: fix 4k stack iscsi setups
When we run the xmit code from queuecomand the stack trace
gets too deep. The patch runs the xmit code from the scsi_host
work queue. This fixes 4k stack and xfs support and should
fix the st and sg stack usage bugs.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:21 -06:00
Mike Christie
7b8631b53b [SCSI] iscsi: seperate iscsi interface from setup functions
This is the second version of the patch to address Christoph's comments.
Instead of doing the lib, I just kept everything in scsi_trnapsort_iscsi.c
like the FC and SPI class. This was becuase the driver model and sysfs
class is tied to the session and connection setup so separating did not
buy very much at this time.

The reason for this patch was becuase HW iscsi LLDs like qla4xxx cannot
use the iscsi class becuase the scsi_host was tied to the interface and
class code. This patch just seperates the session from scsi host so
that LLDs that allocate the host per some resource like pci device
can still use the class.

This is also fixes a couple refcount bugs that can be triggered
when users have a sysfs file open, close the session, then
read or write to the file.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:20 -06:00
Mike Christie
7cae5159dd [SCSI] iscsi: add high mem support
From Mike Christie <michaelc@cs.wisc.edu> and FUJITA Tomonori <tomof@acm.org>:

We cannot use page_address becuase some pages could be highmem.
Instead, we can use sock_no_sendpage which does kmap for us.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:18 -06:00
FUJITA Tomonori
56851698c2 [SCSI] iscsi: data digest page cache usage fix
Users can write to a page while we are sending it and making
digest calculations. This ends up causing us to retry the command
when a digest error is later reported. By using sock_no_sendpage
when data digests are calculated we can avoid a lot of (not all but it
helps) the retries becuase sock_no_sendpage is not zero copy.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:17 -06:00
zhenyu.z.wang@intel.com
3e97c7e6cd [SCSI] iscsi: host locking fix
We should be taking the host_lock instead of the conn lock when
checking host_busy.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:16 -06:00
zhenyu.z.wang@intel.com
bf310b8f58 [SCSI] iscsi: data under/over flow fix
We need to check the ISCSI_FLAG_DATA_* flags.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:15 -06:00
FUJITA Tomonori
42f72aa9e5 [SCSI] iscsi: whitespace cleanup
Remove extra whitespaces.

Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:14 -06:00
Jes Sorensen
a12e25bd59 [SCSI] sem2mutex 3w-[x9]xxx
Convert a the 3w-9xxx.c and 3w-xxxx.c drivers to use mutexes instead
of semaphores. Untested, but compiles and looks obviously correct.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:12 -06:00
Moore, Eric
e6bc863cf2 [SCSI] scsi_transport_sas: mapping the rphy channel equal to the port identifier
We will be mapping the RAID volumes in mptsas to a reserved
channel that
is one larger than the anticapated number of ports on the direct
attached host
adapter.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:09 -06:00
Christoph Hellwig
e02f3f5922 [SCSI] remove target parent limitiation
When James Smart fixed the issue of the userspace scan atributes
crashing the system with the FC transport class he added a patch to
let the transport class check if the parent is valid for a given
transport class.

When adding support for the integrated raid of fusion sas devices
we ran into a problem with that, as it didn't allow adding virtual
raid volumes without the transport class knowing about it.

So this patch adds a user_scan attribute instead, that takes over from
scsi_scan_host_selected if the transport class sets it and thus lets
the transport class control the user-initiated scanning.  As this
plugs the hole about user-initiated scanning the target_parent hook
goes away and we rely on callers of the scanning routines to do
something sensible.

For SAS this meant I had to switch from a spinlock to a mutex to
synchronize the topology linked lists, in FC they were completely
unsynchronized which seems wrong.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:05 -06:00
Jes Sorensen
d158d26167 [SCSI] sem2mutex: scsi_transport_spi.c
Convert the SCSI transport class code to use a mutex rather than a
semaphore.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:01 -06:00
Salyzyn, Mark
9638d89a75 [SCSI] I2O: move pci_request_regions() just behind pci_enable_device()
The problem in dpt_i2o could be the pci config space accesses it
triggers as it loads, dangerous to do if there is any I/O activity going
on in the other driver (probable if a boot driver I guess).

I approve this patch to dpt_i2o.c, and am applying it to the Adaptec
branch of the driver.

Thanks for the investigation Ryoji.

---

In linux 2.6.15, data transfer does hang when both dpt_i2o
and i2o_block drivers are loaded.
It seems that location of pci_request_regions() are wrong.
I moved it just behind pci_enable_device() like other drivers,
and it becomes fine.

Signed-off-by: Ryoji Kamei <kamei@miraclelinux.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:54 -06:00
Jack Hammer
560c26c834 [SCSI] ips: Mode Sense (Caching Page ) fix
To avoid the "sda: got wrong page" message, the ServeRAID driver
should be setting flags indicating that the Mode Sense commands are
not supported.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:53 -06:00
Andreas Herrmann
6b7281d0a0 [SCSI] fc transport: add permanent_port_name fc_host attribute
Add fc_host attribute permanent_port_name which is
used to show the port name of the primary port -
the port that initially logged into the fabric.

For a virtual port (registered via the primary port with
FDISC command) it is useful to know not only its (virtual)
port name but also the permanent port name.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:48 -06:00
Christoph Hellwig
a09c631121 [SCSI] sr: split sr_audio_ioctl into specific helpers
split each ioctl handled in sr_audio_ioctl into a function of it's own.
This cleans the code up nicely, and allows various places in sr_ioctl
to call these helpers directly instead of going through the multiplexer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:46 -06:00
Christoph Hellwig
776b23a036 [SCSI] always handle REQ_BLOCK_PC requests in common code
LLDDs should never see REQ_BLOCK_PC requests, we can handle them just
fine in the core code.  There is a small behaviour change in that some
check in sr's rw_intr are bypassed, but I consider the old behaviour
a bug.

Mike found this cleanup opportunity and provdided early patches, so all
the credit goes to him, even if I redid the patches from scratch beause
that was easier than forward-porting the old patches.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:45 -06:00
Christoph Hellwig
d405423992 [SCSI] sas: fix removal of devices behind expanders
We need to iterate over all children when removing and expander, else
stale objects will be around after host removal.  This fixes the oops
Eric Moore saw when removing and reloading mptsas.

Also don't try the scsi_remove_target call unless operating on an end
device.  The current unconditional call is harmless but confusing.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:54:44 -06:00
Russell King
bbbe3a41f7 [PATCH] Add Pseudo LLD bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-13 11:26:10 -08:00
Petr Vandrovec
745caf71d9 [SCSI] Pass proper device from BusLogic to SCSI layer
While trying to get SUSE's SLES9 working on system with more than 4GB we've
noticed that SCSI layer happilly passes addresses over 4GB to the buslogic
driver, which is quite a big problem as buslogic can generate only 32bit
busmastering cycles.

Fortunately in the current kernels this problem does not exist anymore as
SCSI layer now assumes 4GB capable device by default, but it is still good
idea to pass correct device structure to the SCSI layer.  If nothing else,
/sys/block/sda/device now points to
/sys/devices/pci0000:00/0000:00:10.0/host0/...  instead of
/sys/devices/platform/host0/...  like it did in the past.

Change does nothing for ISA based BusLogic adapters, they'll still end
under platform (and they are probably broken for long time as I do not see
anything forcing ISA 16MB limit for them).

Signed-off-by: Petr Vandrovec <petr@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 15:26:13 -06:00
James Bottomley
cd2f1e6980 [SCSI] aic79xx: bump version to 3.0
This takes us past the old 1.x version of the SCSI driver and the 2.x
version of the aic website version to reflect the full incorporation
of both branches.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 12:07:13 -06:00
Hannes Reinecke
11668bb673 [SCSI] aic79xx: Sequencer update
Update sequencer code to Adaptec version 2.0.12-6.3.9.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 12:03:50 -06:00
Hannes Reinecke
ba62cd2d01 [SCSI] aic79xx: Sanitize inb/outb handling
This patch coalesces inb/outb calls to the approriate word or long form.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 12:01:09 -06:00
Hannes Reinecke
66a0683e46 [SCSI] aic79xx: Use struct map_node
Use struct map_node instead of separate variables.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 12:00:34 -06:00
Hannes Reinecke
5e46631b04 [SCSI] aic7xxx/aic79xx: New device ids
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:59:56 -06:00
Chuck Ebbert
bcc1e382bc [SCSI] Mask capabilities for SCSI-1 CD drive
SCSI-1 CD drives can't do MRW or be opened for writing, so mask off
those capabilities.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:56:01 -06:00
Mark Haverkamp
6171b5eff2 [SCSI] aacraid: README update
Received From Mark Salyzyn.

Move the README from the driver directory to the Documentation directory.
Updated the documentation, added descriptions for cards that
were missing.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:55:16 -06:00
Mark Haverkamp
db39363c02 [SCSI] aacraid: 17 element sg performance update
Received From Mark Salyzyn.

The Jaguar and Corsair class of adapters (2410, 2810, 2610, 21610, CERC)
perform better (about 10% better read performance, write performance
neutral) with current Firmware if the OS limits the number of scatter
gather elements to 17 per request.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:55:01 -06:00
Mark Haverkamp
7686f13265 [SCSI] aacraid: better sysfs adapter information
Received from Mark Salyzyn.

Provide more accurate adapter information.

Allows the Adapter Firmware to override the Adapter product
information.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:54:45 -06:00
Mark Haverkamp
6e289a9023 [SCSI] aacraid: Fix default FIB size
Received from Mark Salyzyn.

If the adapter has not instructed us otherwise that it can handle a
'large' FIB, then it can handle at most a 2KB FIB.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:54:29 -06:00
Christoph Hellwig
33b114e935 [SCSI] sas: clear parent->rphy in sas_rphy_delete
We need to clear the backpointer on rphy removal, else we'll run into
problems with host removal after a device has been hot unplugged.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:53:54 -06:00
Arjan van de Ven
0b95067238 [SCSI] turn most scsi semaphores into mutexes
the scsi layer is using semaphores in a mutex way, this patch converts
these into using mutexes instead

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:53:11 -06:00
James Bottomley
dacee84b07 [SCSI] aic7xxx: fix timer handling bug
The driver is doing a rather stupid mod_timer allegedly to "give
request sense more time to complete".  This is illegal and pointless,
so just eliminate it.  Also eliminate all the other uses of struct
timer_list in the driver, which are mostly bogus.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:49:07 -06:00
Andrew Vasquez
8e0df4a757 [SCSI] qla2xxx: Kconfig: two fixes
Original From: Adrian Bunk

Here's a composite patch with Adrian's original additions and
help-text with the new Kconfig variable SCSI_QLA_FC.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:46:19 -06:00
Adrian Bunk
455c53ec61 [SCSI] lpfc_scsi.c: make lpfc_get_scsi_buf() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:36:37 -06:00
Adrian Bunk
bdd70f2ceb [SCSI] scsi_transport_spi.c: make print_nego() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:35:35 -06:00
Moore, Eric
8e32ca49ef [SCSI] raid_class.c - adding RAID10 and RAID10 defines
Adding defines for RAID10 and RAID50 levels, in preparation
of adding RAID Transport support in the mpt fusion drivers.
(BTW: IME is RAID10, and IM is RAID1).

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:35:15 -06:00
Al Viro
3c9757b7c2 [PATCH] m68k: fix PIO case in esp
we always set ->SCp.ptr to physical address of buffer; for DMA that's
just what we need, but we end up using it as virtual address in PIO
case of esp_do_data(), with obvious breakage as soon as memory mapping
becomes non-trivial.  The fix is obvious.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:05 -08:00
Al Viro
a5d361fc24 [PATCH] m68k: NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:04 -08:00
Al Viro
6419406114 [PATCH] m68k: oktagon makefile fix
oktagon_esp is described as modular.  However, drivers/scsi/Makefile doesn't
handle it right - it's multi-object module, with one of the parts being built
from .S.  Current makefile tries to declare each part a module of its own;
that not only wouldn't work (oktagon_io.o doesn't have the right parts for
that), it actually doesn't even build since kbuild doesn't believe in
single-object modules built from .S.  Turned into proper multi-object
module...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:00 -08:00
Al Viro
b4290a23cf [PATCH] m68k: namespace pollution fix (custom->amiga_custom)
in amigahw.h custom renamed to amiga_custom, in drivers with few instances the
same replacement, in the rest - #define custom amiga_custom in driver itself

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:00 -08:00
Christoph Hellwig
7ff92053dd [PATCH] don't include ioctl32.h in drivers
These days ioctl32.h is only used for communication of fs/compat.c and
fs/compat_ioctl.c and doesn't contain anything of interest to drivers.

Remove inclusion in various drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:34 -08:00
Linus Torvalds
3995f4c532 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-09 15:09:30 -08:00
Hugh Dickins
41ed16fa47 [PATCH] Fix sg_page_malloc() memset
sg_page_malloc should clear the data buffer, not that extent of mem_map.

This fixes Jesper's sg_page_free "Bad page states"

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09 12:57:05 -08:00
Russell King
0a3a98f6dd Merge Linus' tree. 2006-01-09 19:18:33 +00:00
Linus Torvalds
6150c32589 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-01-09 10:03:44 -08:00
Linus Torvalds
8b78e83bfb Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-01-09 09:39:55 -08:00
Andrew Chew
b887030aec [PATCH] sata_nv, spurious interrupts at system startup with MAXTOR 6H500F0 drive
This patch works around a problem with spurious interrupts seen at boot time when
a MAXTOR 6H500F0 drive is present.  An ATA interrupt condition is mysteriously
present at start of day.  If we took too long in issuing the first command,
the kernel would basically get tired of the spurious interrupts and turn the interrupt
off.  Issuing the first command essentially causes the interrupt condition to
get acknowledged.

I haven't seen this happen with any other drives.

What I basically do is ack ATA status by reading it regardless of whether we're
expecting to have to handle an interrupt.  This clears the start-of-day anomalous
interrupt condition, and keeps the kernel from disabling that interrupt due to
too many spurious interrupts.

Also, I fixed a bug where hotplug interrupts weren't getting acknowledged as handled
in the ISR.  This was not the cause of the spurious interrupts, but it's the right
thing to do anyway.

Signed-Off-By: Andrew Chew

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-09 10:42:06 -05:00
Jens Axboe
1aea6434ee [SCSI] Kill the SCSI softirq handling
This patch moves the SCSI softirq handling to the block layer version.
There should be no functional changes.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-09 16:03:03 +01:00
Russell King
e9368f8288 [ARM] Remove asm/irq.h includes from ARM drivers
Many ARM drivers do not need to include asm/irq.h - remove this
unnecessary include from some ARM drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-09 13:56:42 +00:00
Christoph Hellwig
a885c8c431 [PATCH] Add block_device_operations.getgeo block device method
HDIO_GETGEO is implemented in most block drivers, and all of them have to
duplicate the code to copy the structure to userspace, as well as getting
the start sector.  This patch moves that to common code [1] and adds a
->getgeo method to fill out the raw kernel hd_geometry structure.  For many
drivers this means ->ioctl can go away now.

[1] the s390 block drivers are odd in this respect.  xpram sets ->start
    to 4 always which seems more than odd, and the dasd driver shifts
    the start offset around, probably because of it's non-standard
    sector size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@suse.de>
Cc: <mike.miller@hp.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:54 -08:00
Benjamin Herrenschmidt
cc5d0189b9 [PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally
gone. Remove the dodgy heuristics that did that parsing at boot and
remove the fields themselves since we now have a good replacement with
the new OF parsing code. This patch also fixes a bunch of drivers to use
the new code instead, so that at least pmac32, pseries, iseries and g5
defconfigs build.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 14:53:55 +11:00
Linus Torvalds
d99cf9d679 Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block
Manual fixup for merge with Jens' "Suspend support for libata", commit
ID 9b84754866.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 09:01:25 -08:00
Jens Axboe
9b84754866 [PATCH] Suspend support for libata
This patch adds suspend patch to libata, and ata_piix in particular. For
most low level drivers, they should just need to add the 4 hooks to
work. As I can only test ata_piix, I didn't enable it for more
though.

Suspend support is the single most important feature on a notebook, and
most new notebooks have sata drives. It's quite embarrassing that we
_still_ do not support this. Right now, it's perfectly possible to
suspend the drive in mid-transfer.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:36:09 -08:00
Marko Kohtala
6a19b41b35 [PATCH] parport: Kconfig dependency fixes
Make drivers that use directly PC parport HW depend on PARPORT_PC rather than
HW independent PARPORT.

Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:57 -08:00
Martin Schwidefsky
347a8dc3b8 [PATCH] s390: cleanup Kconfig
Sanitize some s390 Kconfig options.  We have ARCH_S390, ARCH_S390X,
ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT.  Replace these 6 options by
S390, 64BIT and COMPAT.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:53 -08:00
Jens Axboe
e650c305ec [SCSI] scsi_end_async() needs to take an uptodate parameter
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 12:38:30 +01:00
Tejun Heo
9a3dccc425 [BLOCK] add FUA support to libata
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:56:18 +01:00
Tejun Heo
93c9338713 [BLOCK] update libata to use new blk_ordered for barriers
Reflect changes in SCSI midlayer and updated to use new
ordered request implementation

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:55:00 +01:00
Tejun Heo
007365ad60 [BLOCK] scsi: add FUA support to sd
Add FUA support for barriers to SCSI disk.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:53:52 +01:00
Tejun Heo
461d4e90c8 [BLOCK] update SCSI to use new blk_ordered for barriers
All ordered request related stuff delegated to HLD.  Midlayer
now doens't deal with ordered setting or prepare_flush
callback.  sd.c updated to deal with blk_queue_ordered
setting.  Currently, ordered tag isn't used as SCSI midlayer
cannot guarantee request ordering.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:52:55 +01:00
Tejun Heo
8ffdc6550c [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()
add @uptodate argument to end_that_request_last() and @error
to rq_end_io_fn().  there's no generic way to pass error code
to request completion function, making generic error handling
of non-fs request difficult (rq->errors is driver-specific and
each driver uses it differently).  this patch adds @uptodate
to end_that_request_last() and @error to rq_end_io_fn().

for fs requests, this doesn't really matter, so just using the
same uptodate argument used in the last call to
end_that_request_first() should suffice.  imho, this can also
help the generic command-carrying request jens is working on.

Signed-off-by: tejun heo <htejun@gmail.com>
Signed-Off-By: Jens Axboe <axboe@suse.de>
2006-01-06 09:49:03 +01:00
Dominik Brodowski
f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski
b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski
cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski
98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Linus Torvalds
db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Linus Torvalds
25c862cc9e Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-01-04 16:36:52 -08:00
Linus Torvalds
1cb9e8e01d Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-01-04 16:32:33 -08:00