Commit graph

85 commits

Author SHA1 Message Date
Jeff Garzik
0825788ff2 Merge branch 'upstream' 2006-01-17 10:26:28 -05: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
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
Jeff Garzik
02f693c711 Merge branch 'upstream' 2006-01-03 10:59:55 -05:00
Jeff Garzik
a18ceba7b4 Merge branch 'master' 2006-01-03 10:58:53 -05:00
Tony Battersby
fd71da468d [PATCH] fix libata inquiry VPD for ATAPI devices
The following patch prevents libata from incorrectly modifying inquiry
VPD pages and command support data from ATAPI devices.  I have tested
the patch with a SATA ATAPI tape drive on an AHCI controller.

Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied.

Anthony J. Battersby
Cybernetics

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 10:02:24 -05:00
Jeff Garzik
e7fb585940 Merge branch 'upstream' 2005-12-13 22:22:41 -05:00
Jeff Garzik
e508a391a0 Merge branch 'upstream-fixes' 2005-12-13 02:30:04 -05:00
Jeff Garzik
50630195bb [libata] mark certain hardware (or drivers) with a no-atapi flag
Some hardware does not support the PACKET command at all.
Other hardware supports ATAPI, but the driver does something nasty such
as calling BUG() when an ATAPI command is issued.

For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI.

Initial version contributed by Ben Collins.
2005-12-13 02:29:45 -05:00
Jeff Garzik
80c7af4074 Merge branch 'upstream' 2005-12-13 01:46:20 -05:00
Albert Lee
a22e2eb071 [PATCH] libata: move err_mask to ata_queued_cmd
- remove err_mask from the parameter list of the complete functions
  - move err_mask to ata_queued_cmd
  - initialize qc->err_mask when needed
  - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask.

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

===============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06 04:49:22 -05:00
Jeff Garzik
451ec6ab31 Merge branch 'master' 2005-12-06 04:14:13 -05:00
Jeff Garzik
4ef679e6ca Merge branch 'upstream-fixes' 2005-12-03 20:34:14 -05:00
Tejun Heo
9a40525788 [PATCH] libata: fix ata_scsi_pass_thru error handling
This patch makes ata_scsi_pass_thru() properly set result code and
sense data on translation failures.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-03 20:31:16 -05:00
Arjan van de Ven
98ac62defe [PATCH] mark several libata datastructures const
Hi,

the patch below marks several libata (and libata-driver) structures
const so that they end up in the .rodata segment and don't false-share
cachelines with things that get dirtied often.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-01 02:29:35 -05:00
Jeff Garzik
85a07029aa Merge branch 'upstream' 2005-11-18 11:42:40 -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
Mark Lord
dcc2d1e7f0 [libata passthru] address slave devices correctly 2005-11-13 16:22:06 -05:00
Jeff Garzik
0da36b3467 Merge branch 'master' 2005-11-11 23:38:52 -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
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
Jeff Garzik
8006fdd6dc Merge branch 'upstream' 2005-11-09 01:37:34 -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
193515d51c [libata] eliminate use of drivers/scsi/scsi.h compatibility header/defines 2005-11-07 00:59:37 -05:00
Jeff Garzik
18ce920a6e Merge branch 'master' 2005-11-05 15:44:48 -05:00
Jeff Garzik
c4811b151b Merge branch 'upstream' 2005-10-30 23:33:54 -05:00
Jeff Garzik
ce1eeb95fc Merge branch 'upstream' 2005-10-30 23:32:03 -05:00
Jeff Garzik
005a5a06a6 [libata] locking rewrite (== fix)
A lot of power packed into a little patch.

This change eliminates the sharing between our controller-wide spinlock
and the SCSI core's Scsi_Host lock.  As the locking in libata was
already highly compartmentalized, always referencing our own lock, and
never scsi_host::host_lock.

As a side effect, this change eliminates a deadlock from calling
scsi_finish_command() while inside our spinlock.
2005-10-30 23:31:48 -05:00
Jeff Garzik
054ee8fd39 Merge branch 'upstream' 2005-10-30 04:50:22 -05:00
Jeff Garzik
d2927cbe40 Merge branch 'upstream' 2005-10-30 04:46:16 -05:00
Jeff Garzik
a7dac447bb [libata] change ata_qc_complete() to take error mask as second arg
The second argument to ata_qc_complete() was being used for two
purposes: communicate the ATA Status register to the completion
function, and indicate an error.  On legacy PCI IDE hardware, the latter
is often implicit in the former.  On more modern hardware, the driver
often completely emulated a Status register value, passing ATA_ERR as an
indication that something went wrong.

Now that previous code changes have eliminated the need to use drv_stat
arg to communicate the ATA Status register value, we can convert it to a
mask of possible error classes.

This will lead to more flexible error handling in the future.
2005-10-30 04:44:42 -05:00
Jeff Garzik
9359ede748 Merge branch 'upstream' 2005-10-30 01:59:10 -05:00
Jeff Garzik
5615ca7906 Merge branch 'upstream' 2005-10-28 21:32:01 -04:00
Douglas Gilbert
00ac37f508 [libata scsi] MODE SELECT, strengthen mode sense
- move default mode pages to the front of libata-scsi.c
    so various functions can access them
  - partial annotation of these pages, point out divergence
    from sat-r06
  - replace various mode page magic numbers with defines
  - strengthen MODE SENSE command decoding: handle DBD
    bit in cdb, yield block descriptor (per sat-r06) and
    handle mode sub pages

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-28 15:58:28 -04:00
Jeff Garzik
96b88fb850 Merge branch 'master' 2005-10-28 12:31:34 -04:00
Jeff Garzik
35ebbae283 Merge branch 'master' 2005-10-28 12:30:29 -04:00
Jeff Garzik
7a9f8f93d2 Merge branch 'master' 2005-10-28 12:29:23 -04:00
Jeff Garzik
057ace5e79 libata: const-ification bombing run
Enforce access rules where appropriate.

If the compiler is smart enough, this may buy us an optimization or two
as a side effect.
2005-10-22 14:27:05 -04:00
Jeff Garzik
b194b4250c Merge branch 'upstream' 2005-10-18 21:52:42 -04:00
Jeff Garzik
77501f3cb6 Merge branch 'upstream' 2005-10-18 18:30:58 -04:00
Albert Lee
c6a33e2464 [PATCH] libata CHS: LBA28/LBA48 optimization (revise #6)
- add lba_28_ok() and lba_48_ok() to ata.h.
     - check ending block number instead of staring block number.
     - use lba_28_ok() for CHS range check
     - LBA28/LBA48 optimization

Suggested by Mark Lord and Alan Cox.

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

=====
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 17:18:16 -04:00
Albert Lee
8cbd6df1f0 [PATCH] libata CHS: calculate read/write commands and protocol on the fly (revise #6)
- merge ata_prot_to_cmd() and ata_dev_set_protocol() as
       ata_rwcmd_protocol()
     - pave road for read/write multiple support
     - remove usage of pre-cached command and protocol values and call
       ata_rwcmd_protocol() instead

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

==============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 17:16:13 -04:00
Albert Lee
07506697d1 [PATCH] libata CHS: move the initialization of taskfile LBA flags (revise #6)
move the initialization of taskfile LBA flags
     "ATA_TFLAG_LBA" and "ATA_TFLAG_LBA48 flags"
   to the SCSI translation functions

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

=============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18 17:16:13 -04:00
Jeff Garzik
c4052da6f0 Merge branch 'upstream' 2005-10-09 11:16:14 -04:00
Jeff Garzik
422fa08e53 [libata passthru] update ATAPI completion for new error handling 2005-10-09 10:49:34 -04:00
Jeff Garzik
ffe75ef650 Merge branch 'upstream' 2005-10-09 10:40:44 -04:00
Douglas Gilbert
ae00651020 [libata scsi] improve scsi error handling with ata_scsi_set_sense()
- change "xlat" and "fill" actors in libata-scsi so
    they are responsible for SCSI status and sense data
    when they return 1. This allows GOOD status or a
    specialized error to be set.
  - yield an error for mode sense requests for saved
    values [sat-r06]
  - remove static inlines for ata_bad_scsiop() and
    ata_bad_cdb() which are no longer used

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-09 09:09:35 -04:00
Douglas Gilbert
845c5834d0 [libata scsi] add ata_scsi_set_sense helper
- add extern ata_scsi_set_sense() to build SCSI
    fixed sense data and corresponding SCSI status

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-09 08:55:41 -04:00
Jeff Garzik
0e5dec478c [libata passthru] add (DRIVER_SENSE << 24) to all check-conditions 2005-10-06 09:40:20 -04:00