]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] libata: fix READ CAPACITY simulation
authorTejun Heo <htejun@gmail.com>
Mon, 20 Nov 2006 02:15:47 +0000 (11:15 +0900)
committerTejun Heo <htejun@gmail.com>
Sun, 3 Dec 2006 08:56:23 +0000 (17:56 +0900)
commit6a36261e63770ab61422550b774fe949ccca5fa9
tree2bbd8271e01f933c6395fb1b836269ab939fca34
parent3d3cca37559e3ab2b574eda11ed5207ccdb8980a
[PATCH] libata: fix READ CAPACITY simulation

* READ CAPACITY (16) implementation fixed.  Result was shifted by two
  bytes.  Carlos Pardo spotted this problem and submitted preliminary
  patch.  Capacity => 2TB is handled correctly now.  (verifid w/ fake
  capacity)

* Use dev->n_sectors instead of re-reading directly from ID data.

* Define and use ATA_SCSI_RBUF_SET() which considers rbuf length.
  This should be done for all simulation functions.  Userland can
  issue any simulated command with arbitrary buffer length.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Carlos Pardo <Carlos.Pardo@siliconimage.com>
drivers/ata/libata-scsi.c