[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.
This commit is contained in:
Jeff Garzik
2005-10-30 23:31:48 -05:00
parent e533825447
commit 005a5a06a6
2 changed files with 8 additions and 3 deletions

View File

@@ -4089,8 +4089,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
host->unique_id = ata_unique_id++;
host->max_cmd_len = 12;
scsi_assign_lock(host, &host_set->lock);
ap->flags = ATA_FLAG_PORT_DISABLED;
ap->id = host->unique_id;
ap->host = host;