|
@@ -977,7 +977,7 @@ static u64 ata_hpa_resize(struct ata_device *dev)
|
|
{
|
|
{
|
|
u64 sectors = dev->n_sectors;
|
|
u64 sectors = dev->n_sectors;
|
|
u64 hpa_sectors;
|
|
u64 hpa_sectors;
|
|
-
|
|
|
|
|
|
+
|
|
if (ata_id_has_lba48(dev->id))
|
|
if (ata_id_has_lba48(dev->id))
|
|
hpa_sectors = ata_read_native_max_address_ext(dev);
|
|
hpa_sectors = ata_read_native_max_address_ext(dev);
|
|
else
|
|
else
|
|
@@ -1588,7 +1588,7 @@ unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd)
|
|
* Check if the current speed of the device requires IORDY. Used
|
|
* Check if the current speed of the device requires IORDY. Used
|
|
* by various controllers for chip configuration.
|
|
* by various controllers for chip configuration.
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+
|
|
unsigned int ata_pio_need_iordy(const struct ata_device *adev)
|
|
unsigned int ata_pio_need_iordy(const struct ata_device *adev)
|
|
{
|
|
{
|
|
/* Controller doesn't support IORDY. Probably a pointless check
|
|
/* Controller doesn't support IORDY. Probably a pointless check
|
|
@@ -1611,7 +1611,7 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev)
|
|
* Compute the highest mode possible if we are not using iordy. Return
|
|
* Compute the highest mode possible if we are not using iordy. Return
|
|
* -1 if no iordy mode is available.
|
|
* -1 if no iordy mode is available.
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+
|
|
static u32 ata_pio_mask_no_iordy(const struct ata_device *adev)
|
|
static u32 ata_pio_mask_no_iordy(const struct ata_device *adev)
|
|
{
|
|
{
|
|
/* If we have no drive specific rule, then PIO 2 is non IORDY */
|
|
/* If we have no drive specific rule, then PIO 2 is non IORDY */
|
|
@@ -2663,7 +2663,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
|
|
t->active += (t->cycle - (t->active + t->recover)) / 2;
|
|
t->active += (t->cycle - (t->active + t->recover)) / 2;
|
|
t->recover = t->cycle - t->active;
|
|
t->recover = t->cycle - t->active;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/* In a few cases quantisation may produce enough errors to
|
|
/* In a few cases quantisation may produce enough errors to
|
|
leave t->cycle too low for the sum of active and recovery
|
|
leave t->cycle too low for the sum of active and recovery
|
|
if so we must correct this */
|
|
if so we must correct this */
|