ide: use lock bitops for ports serialization (v2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:49 +0000 (17:20 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:49 +0000 (17:20 +0100)
commit5b31f855f10d0053e738baa6d91fb6a3fad35119
treebdd8125faf6e4b8baf37d86270389b4d6f62f37d
parentefe0397eef544ac4bcca23d39aa8d5db154952e0
ide: use lock bitops for ports serialization (v2)

* Add ->host_busy field to struct ide_host and use it's first bit
  together with lock bitops to provide new ports serialization method.

* Convert core IDE code to use new ide_[un]lock_host() helpers.

  This removes the need for taking hwgroup->lock if host is already
  busy on serialized hosts and makes it possible to merge ide_hwgroup_t
  into ide_hwif_t (done in the later patch).

* Remove no longer needed ide_hwgroup_t.busy and ide_[un]lock_hwgroup().

* Update do_ide_request() documentation.

v2:
* ide_release_lock() should be called inside IDE_HFLAG_SERIALIZE check.

* Add ide_hwif_t.busy flag and ide_[un]lock_port() for serializing
  devices on a port.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
include/linux/ide.h