]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[libata] More robust parsing for IDENTIFY DEVICE multi_count field
authorMark Lord <liml@rtr.ca>
Thu, 19 Mar 2009 17:32:21 +0000 (13:32 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 25 Mar 2009 02:40:05 +0000 (22:40 -0400)
commite18086d69cb5bb864749a0637f6ac573aa89d5ea
tree2d3e541787eb30743693dd45c96ebabb9be0f0a6
parent000b344f4ca7828ee43940255c8bbb32e2c7dbec
[libata] More robust parsing for IDENTIFY DEVICE multi_count field

Make libata more robust when parsing the multi_count
field from a drive's identify data.  This prevents us from
attempting to use dubious multi_count values ad infinitum.

Reset dev->multi_count to zero and reprobe it each time
through this routine, as it can change on device reset.

Also ensure that the reported "maximum" value is valid
and is a power of two, and that the reported "count" value
is valid and also a power of two.  And that the "count"
value is not greater than the "maximum" value.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c