Commit Graph

836 Commits

Author SHA1 Message Date
Jeff Garzik
7bdd720869 [libata] bump versions 2005-11-16 11:06:59 -05:00
Jeff Garzik
c2cd76ff10 [libata ahci] tone down ATAPI errors
ATA devices don't generate many errors, so the preferred method is to
printk() when they occur.

ATAPI devices generate tons of exceptions during the normal course
of operation, so this change skips logging the most common class of
errors.
2005-11-16 09:23:30 -05:00
Albert Lee
75b1f2f865 [PATCH] libata: honor the transfer cycle time speficied by the EIDE device
The following code segment is not functional because the transfer cycle time speficied by
  the EIDE device is later overwritten by ata_timing_quantize():

	/*
	 * If the drive is an EIDE drive, it can tell us it needs extended
	 * PIO/MW_DMA cycle timing.
	 */
	if (adev->id[ATA_ID_FIELD_VALID] & 2) {	/* EIDE drive */
		memset(&p, 0, sizeof(p));
		(snip)
		ata_timing_merge(&p, t, t, ATA_TIMING_CYCLE | ATA_TIMING_CYC8B);
               <== uninitialized "t" is used here
	}

	/*
	 * Convert the timing to bus clock counts.
	 */
	ata_timing_quantize(s, t, T, UT);  <== t is overwritten by quantized s

  The patch has been submitted for ide-timing.h before:
  http://marc.theaimsgroup.com/?l=linux-ide&m=110820013425454&w=2
  Resubmitted for libata.

Changes:
  - Minor fix to honor the following transfer cycle time speficied by the device
    - id[65]: Minimum Multiword DMA transfer cycle time per word
    - id[67]: Minimum PIO transfer cycle time without flow control
    - id[68]: Minimum PIO transfer cycle time with IORDY

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

=======
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-16 07:59:22 -05:00
Tejun Heo
d10cb35a87 [PATCH] sil24: add constants
Adds constants for ATAPI support to sata_sil24.  This patch is
originally from Jeff Garzik <jgarzik@pobox.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-16 07:11:42 -05:00
Jeff Garzik
9f68a24853 [libata ahci] command completion fixes, improved debug msgs
- Fix a regression in command completion, which prevented
  the restart of the DMA engine after the device throws
  an error.
- Pack more hardware info into the port-reset error message.
- Promote "welcome to our timeout" message from debug msg
  to normal printk.
2005-11-15 14:03:47 -05:00
Jeff Garzik
c6e6e666cb [libata] REQUEST SENSE handling fixes
- Move ATAPI check-condition handling out of the timeout handler
- Use multi-qc-issue feature to issue REQUEST SENSE ATAPI PACKET
  command upon receiving an ATAPI check-condition.

This cleans things up a lot, and eliminates a nasty recursion bug.
2005-11-14 14:50:05 -05:00
Jeff Garzik
2c13b7cee0 [libata] minor fixes, new helpers
- in ata_dev_identify(), don't assume that all devices are either
  ATA or ATAPI.  In the future, this code will see port multipliers
  and other devices.
- make a debugging printk less verbose
- add new helper ata_qc_reinit()
- add new helper BPRINTK() and port flag ATA_FLAG_DEBUGMSG, for
  fine-grained debugging use.
2005-11-14 14:14:16 -05:00
Jeff Garzik
e1410f2d95 [libata] fix bugs in ATAPI padding DMA mapping code
The ATAPI pad-to-next-32bit-boundary code modifies the scatterlist's
length variable, sometimes to zero.  x86-64 platform would oops if a
zero-length scatterlist entry was asked to be mapped.  Work around this
by ensuring that we never DMA-map a zero length buffer or SG entry.
2005-11-14 14:06:26 -05:00
Jeff Garzik
ad36d1a533 [libata ahci] error handling fixes
Needed to get ATAPI working.

- dump hardware error bits, if hardware signals an error
- only reset hardware during timeout if a command was active
- call ata_qc_complete() with a fine-grained error mask.
  Needed so that atapi_qc_complete() can distinguish between
  device errors and other errors.
2005-11-14 13:56:37 -05:00
Mark Lord
dcc2d1e7f0 [libata passthru] address slave devices correctly 2005-11-13 16:22:06 -05:00
Mark Lord
e12a1be6e8 [PATCH] libata: fix comments on ata_tf_from_fis()
Fix description on comments for ata_tf_from_fis().

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-13 16:19:26 -05:00
Tejun Heo
e9c05afa80 [PATCH] sil24: add missing ata_pad_free()
sil24_port_stop() is missing call to ata_pad_free() thus leaking pad
buffer when a port is stopped.  This patch adds it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-13 10:31:43 -05:00
Jeff Garzik
02eaa66629 [libata ahci] set port ATAPI bit correctly
Although according to the documentation this largely only affects
desktop LED control, let's make sure we set the ATAPI bit when we
have an ATAPI device attached to the port.
2005-11-12 01:32:19 -05:00
Jeff Garzik
828d09de4a [libata ahci, qstor] fix miscount of scatter/gather entries
Don't directly reference qc->n_elem, as that might cause an off-by-one
error for misaligned (padded) ATAPI transfers.
2005-11-12 01:27:07 -05:00
Mike Christie
85837ebdd7 [PATCH] kill libata scsi_wait_req usage (make libata compile with scsi-misc changes)
scsi_wait_req does not exist any more in the SCSI layer.  This patch
makes it so libata can compile again.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-11 14:57:05 -08:00
Linus Torvalds
d72d6f1b56 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-11-11 14:04:37 -08:00
Alan Cox
e99f8b5efe [PATCH] libata: propogate host private data from probe function
This will let me chop the code size of several drivers right down. In
many cases the actual private data is very useful and constant for a
given host controller so being able to just pass it at probe time would
be very useful indeed (eg with the via driver would could pass the udma
clocking and reduce the code size, or with the AMD one the UDMA
multiplier and the offset)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-11 08:19:55 -05:00
Jeff Garzik
29179539da [libata sata_mv] add Adaptec 1420SA PCI ID
Contributed by Jeroen <dekien@pandora.be>
2005-11-11 08:08:03 -05:00
Jeff Garzik
f85272a978 Merge branch 'master' 2005-11-11 05:50:22 -05:00
Jeff Garzik
a5cf8b7dc5 [PATCH] lpfc build fix
Current upstream 'allmodconfig' build is broken.  This is the obvious
patch...

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-10 21:25:04 -08:00
Jeff Garzik
3b7d697dfb [libata] constify PCI ID table in several drivers 2005-11-10 11:04:11 -05:00
James Bottomley
8a87a0b631 Merge by hand (whitespace conflicts in libata.h)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-10 08:29:07 -06:00
Alan Cox
f51750d5ea [PATCH] libata: Note a nasty ATA quirk
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-10 07:30:37 -05:00
Willem Riede
0046b06a36 [PATCH] ide: ide-scsi fails to call idescsi_check_condition for things like "Medium not present"
This patch started life as a response to fedora specific ide subsystem changes
that made error handling of my ATAPI tape drive fail; the specifics are in

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868

The insertion of the statement rq->errors = err; near the end of
ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not
contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c
anymore. Recent mainline kernels now also have this change.

The patch below makes ide-scsi whole.

Signed-off-by: Willem Riede <wrlk@riede.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-09 23:18:22 +01:00
Andrew Vasquez
e6a04466ba [SCSI] qla2xxx: Update version number to 8.01.03-k.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:19:44 -05:00
Andrew Vasquez
335a1cc976 [SCSI] qla2xxx: Correct ISP24xx soft-reset handling.
A driver must wait 100us before attempting an MMIO operation
to the RISC after a soft-reset has been initiated.  A
similar delay was needed with earlier ISPs.

Note: a PCI config-space read is used to flush the MMIO
write to the ISP, since the ISP's state machines are unable
to respond to any MMIO read during the reset process.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:19:23 -05:00
Ravi Anand
8d5708f3b5 [SCSI] qla2xxx: Correct abort issue during loop-down state.
Correct issue where abort I/O command was not being issued
when the loop-state was down.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:19:18 -05:00
Ravi Anand
33135aa2a5 [SCSI] qla2xxx: Correct loop-in-transition issues
When mulitple initiators are coming up in an FCAL topology.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:18:27 -05:00
Andrew Vasquez
dcb36ce9d9 [SCSI] qla2xxx: Correct additional posting issues during NVRAM accesses.
On MMIO relaxed-order platforms, it is possible for the
proper delay during NVRAM access to begin before the request
passes through the PCI bus (via a MMIO write) to the ISP.
Thus, causing a subsequent read to the NVRAM part to fail.
Add a MMIO read, after the MMIO write to insure any posted
writes are flushed.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:17:25 -05:00
Mark Haverkamp
07ce5eba85 [SCSI] aacraid: Fix read capacity 16 return data
Received from Mark Salyzyn.

The return data from a read capacity 16 needs to have RTO_EN and PROT_EN
zeroed out.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 16:15:11 -05:00
Christoph Hellwig
f64a181d89 [SCSI] remove Scsi_Device typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:48:20 -05:00
Christoph Hellwig
0a04137e75 [SCSI] remove Scsi_Pointer typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:46:55 -05:00
Christoph Hellwig
d0be4a7d29 [SCSI] remove Scsi_Host_Template typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:44:09 -05:00
Linus Torvalds
19da9b8b6e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-11-09 08:35:50 -08:00
Olaf Hering
733482e445 [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason
This patch removes almost all inclusions of linux/version.h.  The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched.  In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

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-11-09 07:55:57 -08:00
James Bottomley
c0ed79a331 [SCSI] sd: fix issue_flush
sd_issue_flush() is called from atomic context so we can't use the
semaphore based routines to get a reference to the scsi_disk.  Assume
something else already got the reference so we can safely use it.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 09:31:46 -05:00
Albert Lee
7c3983357f [PATCH] libata: if condition fix for ata_dev_identify()
- if condition fix for ata_dev_identify()
  - ata_pio_poll() minor cleanup.

Changes:
   - Use (dev->class == ATA_DEV_ATA) for ata_dev_identify()
     since "qc->tf.command" has been overwritten by the device status
   - Use HSM_ST_TMOUT directly in ata_pio_poll()

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-09 01:23:22 -05:00
Randy Dunlap
8e8b77dd48 [PATCH] libata kernel-doc fixes
Fix all reported kernel-doc errors in libata.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-09 01:10:55 -05:00
Jeff Garzik
a892acacd3 Merge branch 'master' 2005-11-09 01:07:12 -05:00
Alan Stern
2ef8919830 [SCSI] Fix refcount leak in scsi_report_lun_scan
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 16:13:34 -05:00
goggin, edward
34ea80ec6a [SCSI] fix usb storage oops
The problem is that scsi_run_queue is called from scsi_next_command()
after doing a scsi_put_command.  If the command was the only thing
holding the reference on the scsi_device then the resulting device put
will tear down the block queue.  Fix this by taking a reference to the
device and holding it around scsi_run_queue()

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 16:09:53 -05:00
James Bottomley
383f974950 Merge by hand (conflicts between pending drivers and kfree cleanups)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-08 12:50:26 -05:00
Jesper Juhl
c9475cb0c3 [PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:54:01 -08:00
Nishanth Aravamudan
a9a3047dd8 [PATCH] drivers/scsi: fix-up schedule_timeout() usage
Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:59 -08:00
Tim Schmielau
8c65b4a604 [PATCH] fix remaining missing includes
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch.  This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:41 -08:00
Jeff Garzik
193515d51c [libata] eliminate use of drivers/scsi/scsi.h compatibility header/defines 2005-11-07 00:59:37 -05:00
brking@us.ibm.com
13bf50d1f2 [SCSI] ipr: Driver version 2.1.0
Bump the driver version.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:13:11 -06:00
brking@us.ibm.com
dfed823eab [SCSI] ipr: Better handle failure of adapter bringup commands
Some new ipr adapters do not support some of the initialization
commands currently sent to it from the driver. Handle these
commands failing and continue on with the adapter initialization.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:56 -06:00
brking@us.ibm.com
d71a8b0cba [SCSI] ipr: Increase ipr device scanning limits
Increase device scanning limits so that all devices are found.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:32 -06:00
brking@us.ibm.com
86f51436dd [SCSI] ipr: New PCI Ids
Adds support for some new ipr adapters

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06 13:12:10 -06:00