This patch contains the most trivial from Rusty's trivial patches:
- spelling fixes
- remove duplicate includes
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch does a full cleanup of 'NULL checks before vfree', and a partial
cleanup of calls to kfree for all of drivers/ - the kfree bit is partial in
that I only did the files that also had vfree calls in them. The patch
also gets rid of some redundant (void *) casts of pointers being passed to
[vk]free, and a some tiny whitespace corrections also crept in.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This converts the final 20 DEFINE_SPINLOCK holdouts. (another 580 places
are already using DEFINE_SPINLOCK). Build tested on x86.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been
been in the -RT tree for some time.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
libata and msi.c.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ICH6 spec defines the PORT_ bits as:
PORT_ENABLED (R/W):
0 = Disabled. The port is in the off state and cannot detect any
devices.
1 = Enabled. The port can transition between the on, partial, and
slumber states and can detect devices.
PORT_PRESENT (R/O)
The status of this bit may change at any time. This bit is cleared
when the port is disabled via PORT_ENABLED. This bit is not cleared upon
surprise removal of a device.
So from a textual view it is not necessary that PORT_PRESENT _must_ be set,
especially if a device detection has to be done anyway. And, in fact, this
is the view that ACER has been taken with its new Laptops (e.g. Travelmate
4150).
And the definition of PORT_ENABLED / PORT_PRESENT is mixed up, btw.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch adds support for the SiS182 sata chipset. This is a
minimalistic version of the patch from
http://bugme.osdl.org/show_bug.cgi?id=4192. Basically, it add the PCI
IDs and handles the change of the 2nd port adress register.
Signed-Off-By: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
NDEBUG and NDEBUG_ABORT are almost always used as integers in NCR5380; added
define to 0 if they are not defined, switched lone ifdef NDEBUG into if.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This is my libata compatible low level driver for the Marvell SATA
family. Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly. Review,
testing (especially on other flavors of Marvell), comments welcome.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
ata_get_mode_mask() uses bits 3 and 4 in the pio_mask to represent PIO
modes 3 and 4. The value read from the drive, which reports support
for PIO3 and PIO4 in bits 0 and 1, is shifted left by 3 bits and OR'd
with 0x7 (which then corresponds to PIO 2-0 in libata). Thus, the
drivers below need adjustments to comply with the way pio_mask is
used. I changed the masks from the commented values to all support
PIO4-0, since the spec mandates that PIO0-2 are supported and there's
no reason not to support PIO3 IMO.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
scsi_io_completion() can be a bit noisy about certain conditions.
Previously this wasn't a problem for internally generated commands,
since they never hit it. However, since we do all SCSI commands via
bios, now they do. user CD testers like magicdev are now getting not
ready messages every time they touch the CD to see if there's anything
in it.
Fix this by making all scsi_execute commands REQ_QUIET and making
scsi_finish_io() not say anything for REQ_QUIET.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This returns always false with new-style drivers right now. Make it
return always true instead, as a host must be present if we are able
to call the ioctl (without a host attached there would be no device
node to call on..)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
On Fri, Dec 13, 2002 at 12:24:39AM +1100, Anton Blanchard wrote:
> We tested 2.5.51 on a ppc64 box, qlogic 2312 and a fastt700 array. I
> had CONFIG_SCSI_REPORT_LUNS and unfortunately it thought the management
> LUN was a disk:
>
> Vendor: IBM Model: Universal Xport Rev: 0520
> Type: Direct-Access ANSI SCSI revision: 03
>
> ...
>
> SCSI device sdaj: drive cache: write through
> SCSI device sdaj: 40960 512-byte hdwr sectors (21 MB)
> sdaj: unknown partition table
> Attached scsi disk sdaj at scsi2, channel 0, id 0, lun 31
>
> ...
>
> end_request: I/O error, dev sdaj, sector 0
Three years later...
It looks like SGI use the same FC vendor and they already have a
workaround for this issue. The following patch adds the IBM version of
it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This patch adds a delay tailored for USB flash devices that are slow to
initialize their firmware. The symptom is a repeated Unit Attention with
ASC=0x28 (Not Ready to Ready transition). The patch will wait for up to 5
seconds for such devices to become ready. Normal devices won't send the
repeated Unit Attention sense key and hence won't trigger the patch.
This fixes a problem with James Roberts-Thomson's USB device, and I've
seen several reports of other devices exhibiting the same symptoms --
presumably they will be helped as well.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
The problem lies in the way the error handler uses TEST UNIT READY to
tell whether error recovery has succeeded. The scsi_eh_tur function
gives up after one round of retrying; after that it decides that more
error recovery is needed.
However TUR is liable to report sense data indicating a retry is needed
when in fact error recovery has succeeded. A typical example might be
SK=2, ASC=4, ASCQ=1 (Logical unit in process of becoming ready). The mere
fact that we were able to get a sensible reply to the TUR should indicate
that the device is working well enough to stop error recovery.
I ran across a case back in January where this happened. A CD-ROM drive
timed out the INQUIRY command, and a device reset fixed the blockage.
But then the drive kept responding with 2/4/1 -- because it was spinning
up I suppose -- until the error handler gave up and placed it offline.
If the initial INQUIRY had received the 2/4/1 instead, everything would
have worked okay. It doesn't seem reasonable for things to fail just
because the error handler had started running.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
The maximum size of a scatter-gather list that the current IBM VSCSI
Client can handle is 10. This patch adds large scatter-gather support
to the client so that it is capable of handling up to SG_ALL(255)
number of requests in the scatter-gather list.
Signed-off-by: Linda Xie <lxie@us.ibm.com>
Acked by: Dave C Boutcher <sleddog@us.ibm.com>
Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This adds type-checking to pm_message_t, so that people can't confuse it
with int or u32. It also allows us to fix "disk yoyo" during suspend (disk
spinning down/up/down).
[We've tried that before; since that cpufreq problems were fixed and I've
tried make allyes config and fixed resulting damage.]
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
On ISP24xx parts, stop execution of firmware during ISP
tear-down.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
From: Nishanth Aravamudan <nacc@us.ibm.com>
Replace schedule_timeout() with
msleep()/msleep_interruptible() as appropriate, to guarantee the task
delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
fc_remove_host() should only be called after a scsi_host has
been successfully added via scsi_add_host() -- any failures
while qla2xxx probing would result in an incorrect call to
fc_remove_host() during cleanup.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Export additional host information via the shost_attrs member in
the scsi_host template. Attributes include: driver version,
firmware version, ISP serial number, ISP type, ISP product ID,
HBA model name, HBA model description, PCI interconnect
information, and HBA port state.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
In a corner-case failure where the request-q does not
contain enough entries for a given request, pci_unmap_sg()
would be called twice. Remove direct call and let the
failure-path logic handle the unmapping.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Remove unnecessary RISC pause/release barriers during
ISP24xx flash manipulation. The ISP24xx can arbitrate flash
access requests during RISC executions.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Original implementation used an overloaded bit in the EFI
parameters. The correct bit is BIT_4 of the special_options
section of NVRAM.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Remove redundant qla2x00_target_reset() function in favour of
the equivalent qla2x00_device_reset(). Update callers of
old function.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
In an FL topology, limit port recognition to those devices
not within the same area and domain of the ISP. The
firmware will recogonize such devices during local-loop
discovery.
Some devices may respond to a PLOGI before they have
completed their fabric login or they may not be a public
device. In this case they will report:
domain == 00
area == 00
alpa == <XX>
which is valid. Exclude such devices from local loop
discovery.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Export COS information for the fc_host and fc_remote_port
objects added by the driver.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
In order to efficiently utilise the ISP's IOCB
request-queue, use the dma_get_required_mask() function to
determine the use of command-type 2 or 3 IOCBs when queueing
SCSI commands. This applies to ISP2[123]xx chips only, as
the ISP24xx uses command-type 7 IOCBs which use 64bit DSDs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
#include of C files and macro tricks to rename symbols are evil and just
cause trouble. Let's doublicate the two functions as they're going to
go away soon enough anyway.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This was noticed by Doug Bazamic and the fix found by Mark Salyzyn at
Adaptec.
There was an error in the BUG_ON() statement that validated the
calculated fib size which can cause the driver to panic.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>