]> git.ipfire.org Git - people/ms/linux.git/commit
libata: support the ata host which implements a queue depth less than 32
authorKevin Hao <haokexin@gmail.com>
Sat, 12 Jul 2014 04:08:24 +0000 (12:08 +0800)
committerJiri Slaby <jslaby@suse.cz>
Wed, 30 Jul 2014 09:15:55 +0000 (11:15 +0200)
commit7e8fe9628fa3b778bf8b00c5faead306e80c0a47
tree5b06089e43972b9a545669efeb2d327d7bbb0ab1
parentb786221fb1e1c1664140d49a46b4bf844afc272c
libata: support the ata host which implements a queue depth less than 32

commit 1871ee134b73fb4cadab75752a7152ed2813c751 upstream.

The sata on fsl mpc8315e is broken after the commit 8a4aeec8d2d6
("libata/ahci: accommodate tag ordered controllers"). The reason is
that the ata controller on this SoC only implement a queue depth of
16. When issuing the commands in tag order, all the commands in tag
16 ~ 31 are mapped to tag 0 unconditionally and then causes the sata
malfunction. It makes no senses to use a 32 queue in software while
the hardware has less queue depth. So consider the queue depth
implemented by the hardware when requesting a command tag.

Fixes: 8a4aeec8d2d6 ("libata/ahci: accommodate tag ordered controllers")
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/ata/libata-core.c