Commit Graph

285 Commits

Author SHA1 Message Date
Jeff Garzik 443d089703 /spare/repo/libata-dev branch 'upstream-fixes' 2005-08-23 00:59:54 -04:00
Albert Lee 563a6e1fb0 [PATCH] libata handle the case when device returns/needs extra data
PATCH 2/2:  handle the case when device returns/needs extra data

Description:
   Sometimes the device returns/needs extra data than expected.

Changes:
   Modify __atapi_pio_bytes() to handle the case where device returns/needs extra data.
     - for read case, discard trailing data from the device
     - for write case, padding zero data to the device

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-12 02:44:20 -04:00
Albert Lee 6ae4cfb571 [PATCH] libata ata_data_xfer() fix
PATCH 1/2: ata_data_xfer() fix

Changes:
   - Modify ata_mmio_data_xfer() and ata_pio_data_xfer() to handle odd-lengthed buffer.
   - Add some function comments

This patch does not reuse ap->pad as alignment buffer since
using local variable seems good enough.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-12 02:44:20 -04:00
Douglas Gilbert 972dcafb6d [libata scsi] add START STOP UNIT translation 2005-08-11 03:35:53 -04:00
Jeff Garzik 4c71812261 Merge /spare/repo/linux-2.6/ 2005-08-11 03:33:08 -04:00
Linus Torvalds 0893dd327f Merge head 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-08-10 11:56:19 -07:00
Jason Gaston 3db368f71a [PATCH] ahci: AHCI mode SATA patch for Intel ICH7-M DH
Hello,

This patch adds the Intel ICH7-M DH DID to the ahci.c file for AHCI mode SATA support.  This patch was built against the 2.6.13-rc6 kernel.  
If acceptable, please apply.

Thanks,

Jason Gaston

Signed-off-by:  Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-10 13:43:15 -04:00
Jeff Garzik a7144b23da Merge /spare/repo/linux-2.6/ 2005-08-10 13:43:09 -04:00
Tejun Heo 42517438f9 libata: fix EH-related lockup by properly cleaning EH command list
Yet another hack due to the fact that libata is the only user of SCSI's
->eh_strategy_handler() hook.
2005-08-10 13:38:27 -04:00
Tejun Heo fae009847c [PATCH] sata: fix sata_sx4 dma_prep to not use sg->length
sata_sx4 directly references sg->length to calculate total_len in
pdc20621_dma_prep().  This is incorrect as dma_map_sg() could have
merged multiple sg's into one and, in such case, sg->length doesn't
reflect true size of the entry.  This patch makes it use
sg_dma_len(sg).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-10 13:34:58 -04:00
Salyzyn, Mark 5bb8345db8 [SCSI] dpt_i2o pci_request_regions fix
Originally From: Andrew Morton <akpm@osdl.org>

Altered By: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>

There is an additional 'build fix' patch that Andrew Morton submitted on
the kernel list (I have changed out his dpr_i2o with dpt_i2o below
though).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-09 12:09:53 -05:00
James.Smart@Emulex.Com 5c44cd2afa [SCSI] fix target scanning oops with fc transport class
We have some nasty issues with 2.6.12-rc6. Any request to scan on
the lpfc or qla2xxx FC adapters will oops. What is happening is the
system is defaulting to non-transport registered targets, which
inherit the parent of the scan. On this second scan, performed by
the attribute, the parent becomes the shost instead of the rport.
The slave functions in the 2 FC adapters use starget_to_rport()
routines, which incorrectly map the shost as an rport pointer.

Additionally, this pointed out other weaknesses:
- If the target structure is torn down outside of the transport,
  we have no method for it to be regenerated at the proper parent.
- We have race conditions on the target being allocated by both
  the midlayer scan (parent=shost) and by the fc transport
  (parent=rport).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-08 17:14:55 -05:00
James Bottomley 9c472dd919 [SCSI] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup
From: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>

Prevent driver from loading if another driver (i2o) has already claimed
the resources associated with the card. Discussion associated with this
bug can be referenced at http://bugzilla.kernel.org/show_bug.cgi?id=4940
where it was agreed to use pci_request_regions in both the dpt_i2o and
the i2o driver to prevent both drivers loading on the same adapter(s).

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>

Rejections fixed up and

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-08 11:51:38 -05:00
Linus Torvalds 6fb0caa423 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-08-04 13:08:29 -07:00
James Bottomley fdd0edf2ac [SCSI] fix aic7xxx performance issues since 2.6.12-rc2
Several people noticed we dropped quite a bit on benchmark figures.
OK, it was my fault but unfortunately I discovered I ran out of brown
paper bags a while ago and forgot to reorder them.

The issue is that a construct introduced in the conversion of the
driver to use the transport class keyed off whether the block request
was tagged or not.  However, the aic7xxx driver doesn't properly set
up the block layer TCQ (it uses the wrong API), so the driver now
things all requests are untagged and we keep it to a queue depth of a
single element.  Oops.

The fix is to use the correct TCQ API.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-04 13:38:59 -05:00
James Bottomley 84e66ee7ec [SCSI] aic7xxx: final fixes for DT handling
The aic7xxx can support Data Group transfers at periods > 12.5, so
eliminate that restriction.  Additionally wide is a requirement for DT
so ensure wide is set if users request DT.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-02 10:50:51 -05:00
Olaf Hering f7c80c9f77 [PATCH] aic byteorder fixes after recent cleanup
Rebuild the aic7xxx firmware doesn't work anymore after this change
which appeared int 2.6.13-rc1:

   [SCSI] aic7xxx/aic79xx: remove useless byte order macro cruft

Two files did not include byteorder.h, resulting in aic dying with a panic

	"Unknown opcode encountered in seq program"

This fixes it for me.

Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-02 08:43:59 -07:00
Kai Makisara c2c96f46f4 [SCSI] Fix SCSI tape oops at module removal
Removing the SCSI tape module results in an oops in class_device_destroy if
any devices are present. The patch at the end of this message fixes the bug
by moving class_destroy() later in exit_st() so that the class still exists
when devices are removed. (The bug is old but class_simple_device_remove() did
nothing when the class did not exist.)

The patch also fixes a "class leak" in init_st() error path.

I would like to get this into 2.6.13 but it may be too late?

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-02 10:14:36 -05:00
Jack Hammer c1a15468d5 [SCSI] ServeRAID V7.12.02
I am resubmitting the 2.6 kernel patch for the Version 7.12.02 ips driver.
I have eliminated a couple of inappropriate changes pointed out by Arjan.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-02 10:09:03 -05:00
Mark Haverkamp 43f2f3d343 [PATCH] aacraid: Fix for controller load based timeouts
Martin Drab found that he could get aacraid timeouts with high load on his
controller / disk drive combinations.  After some experimentation Mark
Salyzyn has come up with a patch to reduce the default max_sectors to
something that will keep the controller from being overloaded and will
eliminate the timeout issues.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-01 21:37:59 -07:00
Jeff Garzik 8a60a07129 libata: trim trailing whitespace.
Also, fixup a tabs-to-spaces block of code in ata_piix.
2005-07-31 13:13:24 -04:00
Daniel Drake 541134cfe7 [PATCH] sata_nv: Support MCP51/MCP55 device IDs
This is a multi-part message in MIME format.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-31 01:04:43 -04:00
Adrian Bunk faa725332f [PATCH] SCSI_SATA has to be a tristate
SCSI=m must disallow static drivers.

The problem is that all the SATA drivers depend on SCSI_SATA.

With SCSI=m and SCSI_SATA=y this allows the static enabling of the SATA
drivers with unwanted effects, e.g.:
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y
  -> SCSI_ATA_ADMA is built statically but scsi/built-in.o is not linked
     into the kernel
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y, SCSI_SATA_AHCI=m
  -> SCSI_ATA_ADMA and libata are built statically but
     scsi/built-in.o is not linked into the kernel,
     SCSI_SATA_AHCI is built modular (unresolved symbols due to missing
                                      libata)

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-07-31 00:43:00 -04:00
James Bottomley f7ff898ad3 [SCSI] aic7xxx: fix bug in DT handing
Basically DT isn't reported or handled at all.  The problem is that
lines of code like this:

spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ;

don't do what you think they do when spi_dt is a single bit variable.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-30 10:44:38 -05:00
Linda Xie 7cd7ae531c [SCSI] scsi/ibmvscsi/srp.h: Fix a wrong type code used for SRP_LOGIN_REJ
This patch fixes srp.h which uses 0x80 for SRP_LOGIN_REJ instead of
0xc2.

Signed-off-by: Linda Xie <lxie@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-30 08:59:04 -05:00
Linus Torvalds 5a90fa71f6 Merge head 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-07-29 09:04:47 -07:00
Greg Felix 7b6dbd6872 libata: Check PCI sub-class code before disabling AHCI
This patch adds functionality to check the PCI sub-class code of an
AHCI capable device before disabling AHCI.  It fixes a bug where an
ICH7 sata controller is being setup by the BIOS as sub-class 1 (ide)
and the AHCI control registers weren't being initialized, thus causing
an IO error in piix_disable_ahci().

Signed-off-by: Gregory Felix <greg.felix@gmail.com>
2005-07-28 15:54:15 -04:00
Andrew Vasquez 577a4f8102 [PATCH] More qla2xxx configuration fixes
This adds the appropriate FW_LOADER pre-requisite and a separate entry
for ISP24xx support.

Thanks to Adrian Bunk and Jesper Juhl for their efforts in fixing this
quirk.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 22:31:35 -07:00
Linus Torvalds e0aa8afd97 Fix up qla2xxx configuration bogosity
If we haven't configured the qla24xx driver, then the Makefile shouldn't
do it for us.

This also means that we can avoid the unnecessary selection of FC_ATTRS.

Debugged by James Bottomley
2005-07-27 17:08:21 -07:00
Jesper Juhl 77933d7276 [PATCH] clean up inline static vs static inline
`gcc -W' likes to complain if the static keyword is not at the beginning of
the declaration.  This patch fixes all remaining occurrences of "inline
static" up with "static inline" in the entire kernel tree (140 occurrences in
47 files).

While making this change I came across a few lines with trailing whitespace
that I also fixed up, I have also added or removed a blank line or two here
and there, but there are no functional changes in the patch.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:26:20 -07:00
Olaf Hering 44456d37b5 [PATCH] turn many #if $undefined_string into #ifdef $undefined_string
turn many #if $undefined_string into #ifdef $undefined_string to fix some
warnings after -Wno-def was added to global CFLAGS

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:26:08 -07:00
Alan Stern b24b103345 [PATCH] scsi_scan: check return code from scsi_sysfs_add_sdev
Adds a missing check for an error return code from scsi_sysfs_add_sdev.
This resolves entry #4863 in the OSDL bugzilla.  Although in that bug
report the failure occurred because of a confusion over scanning vs.
rescanning, in general add_sdev can fail for a number of reasons (the
simplest being insufficient memory) and the caller should cope properly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:25:51 -07:00
Linus Torvalds db776a14f3 Fix compiler warning in qla_iocb.c
Remove bogus initialization that was re-done (correctly) later.
2005-07-26 14:50:02 -07:00
Andrew Morton a6fa657b9d [PATCH] qla2xxx: Kconfig dependency fix
*** Warning: "fc_remote_port_block" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "scsi_is_fc_rport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_unblock" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_rolechg" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_release_transport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remove_host" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_add" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_attach_transport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:34:18 -07:00
Andrew Morton 9a168bddc2 [PATCH] qla: remove anonymous union
Older gcc's dont support anonymous unions, so this driver gets hundreds of
error.

Fortunately the fix is easy...

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:34:18 -07:00
Linus Torvalds 2d986010ad Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-07-26 13:28:47 -07:00
Chen, Kenneth W 7fce2cf62e [SCSI] Redundant this_count check in sd_init_command()
I was going over the scsi I/O submit path, when sd_init_command
construct the scsi command, this_count is already checked in the
previous else if clause.  Why does it need to check it again in
the last else block?

Patch to delete the spurious check.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:25:17 -04:00
Chen, Kenneth W 0f34e3f533 [SCSI] Redundant memset in scsi_alloc_sgtable
scsi_init_io calls scsi_alloc_sgtable and then calls blk_rq_map_sg
to initialize the scatterlist structure.  blk_rq_map_sg() already
memset the structure for every new segment.  That makes the memset
in scsi_alloc_sgtable unnecessary.

Patch to delete the extra memset in scsi_alloc_sgtable.  Tested on
a x86_64 machine.  Looks stable to me.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:24:12 -04:00
James.Smart@Emulex.Com 2f4701d827 [SCSI] add int_to_scsilun() function
One of the issues we had was reverting the midlayers lun value
into the 8byte lun value that we wanted to send to the device.
Historically, there's been some combination of byte swapping,
setting high/low, etc. There's also been no common thread between
how our driver did it and others.  I also got very confused as
to why byteswap routines were being used.

Anyway, this patch is a LLDD-callable function that reverts the
midlayer's lun value, stored in an int, to the 8-byte quantity
(note: this is not the real 8byte quantity, just the same amount
that scsilun_to_int() was able to convert and store originally).

This also solves the dilemma of the thread:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112116767118981&w=2

A patch for the lpfc driver to use this function will be along
in a few days (batched with other patches).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:21:27 -04:00
Andrew Vasquez 77d7414361 [SCSI] qla2xxx: Cleanup FC remote port registration.
Cleanup FC remote port registration.

Due to the inherent behaviour (an immediate scan) of adding
a 'target'-role-capable rport via fc_remote_port_add(),
split the registration into two steps -- addition as
unknown-type role, then use fc_remote_port_rolchg() with
appropriate role (based on PLOGI/PRLI bits).  This allows
for a more cleaner rport->dd_data management as can be seen
with the simplified qla2xxx_slave_alloc() function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:15:55 -04:00
Andrew Vasquez 88c2666351 [SCSI] qla2xxx: Consolidate ISP24xx chip reset logic.
Consolidate ISP24xx chip reset logic.

Consolidate near-duplicate RISC reset logic from
qla24xx_reset_chip() and qla24xx_chip_diag().  Also, after
initiating a soft-reset, insure the firmware has completed
all NVRAM accesses before continuing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:15:31 -04:00
Andrew Vasquez f0883ac6a7 [SCSI] qla2xxx: Add firmware version number to qla24xx_fw_version_str().
Add firmware version number to qla24xx_fw_version_str().

Original code was accidently trimmed during port.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:15:10 -04:00
Mark Haverkamp 84e29308ed [SCSI] aacraid: Fix sgmap error
The wrong sgmap structure is being assigned in aac_send_raw_srb.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:14:45 -04:00
Andrew Vasquez 97cbe08ff8 [SCSI] qla2xxx: Update version number to 8.01.00b5-k.
Update version number to 8.01.00b5-k.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:13:36 -04:00
Andrew Vasquez cc4731f5b4 [SCSI] qla2xxx: Correct maximum supported lun and target-id definitions.
Correct maximum supported lun and target-id definitions.

The driver uses command-IOCBs which support a maximum lun
value of 0xffff -- correct #define to reflect the change.
Also, remove superfluous MAX_TARGET definition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:13:11 -04:00
Andrew Vasquez ae91193cd5 [SCSI] qla2xxx: Update copyright banner.
Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:12:12 -04:00
Andrew Vasquez f04a311fdc [SCSI] qla2xxx: Firmware updates.
Firmware updates.

Resync with latest 21xx firmware      -- 1.19.25.
Resync with latest 22xx firmware      -- 2.02.08.
Resync with latest 23xx/63xx firmware -- 3.03.15.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:09:05 -04:00
Andrew Vasquez fa2a1ce53d [SCSI] qla2xxx: Code scrubbing.
Code scrubbing.

 - Remove trailing whitespace from driver files.
 - Remove unused #defines and inlines.
 - Standardize on C comments (// -> /* */)

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:03:15 -04:00
Andrew Vasquez ba5140b48e [SCSI] qla2xxx: NVRAM id-list updates.
NVRAM id-list updates.

Resync with latest NVRAM subsystem ID list.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:02:48 -04:00
Andrew Vasquez fca2970371 [SCSI] qla2xxx: Add OS initialization codes for ISP24xx recognition.
Add OS initialization codes for ISP24xx recognition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:02:23 -04:00