Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29279
b: refs/heads/master
c: 3c567b7
h: refs/heads/master
i:
  29277: d6f1ed1
  29275: 873e90e
  29271: 6e8300b
  29263: ee3ac0b
  29247: cbd4c3d
v: v3
  • Loading branch information
Tejun Heo committed May 15, 2006
1 parent d682874 commit b8b5e90
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c44078c03f018c8cc9d7463b0db4c6c7fb316792
refs/heads/master: 3c567b7d1137633f3ff67cd1df94abc5fd497a85
32 changes: 16 additions & 16 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ static int ata_bus_probe(struct ata_port *ap)
tries[dev->devno] = 0;
break;
case -EIO:
ata_down_sata_spd_limit(ap);
sata_down_spd_limit(ap);
/* fall through */
default:
tries[dev->devno]--;
Expand Down Expand Up @@ -1640,20 +1640,20 @@ void ata_port_disable(struct ata_port *ap)
}

/**
* ata_down_sata_spd_limit - adjust SATA spd limit downward
* sata_down_spd_limit - adjust SATA spd limit downward
* @ap: Port to adjust SATA spd limit for
*
* Adjust SATA spd limit of @ap downward. Note that this
* function only adjusts the limit. The change must be applied
* using ata_set_sata_spd().
* using sata_set_spd().
*
* LOCKING:
* Inherited from caller.
*
* RETURNS:
* 0 on success, negative errno on failure
*/
int ata_down_sata_spd_limit(struct ata_port *ap)
int sata_down_spd_limit(struct ata_port *ap)
{
u32 spd, mask;
int highbit;
Expand Down Expand Up @@ -1683,7 +1683,7 @@ int ata_down_sata_spd_limit(struct ata_port *ap)
return 0;
}

static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol)
static int __sata_set_spd_needed(struct ata_port *ap, u32 *scontrol)
{
u32 spd, limit;

Expand All @@ -1699,7 +1699,7 @@ static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol)
}

/**
* ata_set_sata_spd_needed - is SATA spd configuration needed
* sata_set_spd_needed - is SATA spd configuration needed
* @ap: Port in question
*
* Test whether the spd limit in SControl matches
Expand All @@ -1713,7 +1713,7 @@ static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol)
* RETURNS:
* 1 if SATA spd configuration is needed, 0 otherwise.
*/
int ata_set_sata_spd_needed(struct ata_port *ap)
int sata_set_spd_needed(struct ata_port *ap)
{
u32 scontrol;

Expand All @@ -1722,11 +1722,11 @@ int ata_set_sata_spd_needed(struct ata_port *ap)

scontrol = scr_read(ap, SCR_CONTROL);

return __ata_set_sata_spd_needed(ap, &scontrol);
return __sata_set_spd_needed(ap, &scontrol);
}

/**
* ata_set_sata_spd - set SATA spd according to spd limit
* sata_set_spd - set SATA spd according to spd limit
* @ap: Port to set SATA spd for
*
* Set SATA spd of @ap according to sata_spd_limit.
Expand All @@ -1738,15 +1738,15 @@ int ata_set_sata_spd_needed(struct ata_port *ap)
* 0 if spd doesn't need to be changed, 1 if spd has been
* changed. -EOPNOTSUPP if SCR registers are inaccessible.
*/
int ata_set_sata_spd(struct ata_port *ap)
int sata_set_spd(struct ata_port *ap)
{
u32 scontrol;

if (ap->cbl != ATA_CBL_SATA || !ap->ops->scr_read)
return -EOPNOTSUPP;

scontrol = scr_read(ap, SCR_CONTROL);
if (!__ata_set_sata_spd_needed(ap, &scontrol))
if (!__sata_set_spd_needed(ap, &scontrol))
return 0;

scr_write(ap, SCR_CONTROL, scontrol);
Expand Down Expand Up @@ -2464,7 +2464,7 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class)

DPRINTK("ENTER\n");

if (ata_set_sata_spd_needed(ap)) {
if (sata_set_spd_needed(ap)) {
/* SATA spec says nothing about how to reconfigure
* spd. To be on the safe side, turn off phy during
* reconfiguration. This works for at least ICH7 AHCI
Expand All @@ -2474,7 +2474,7 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class)
scontrol = (scontrol & 0x0f0) | 0x302;
scr_write_flush(ap, SCR_CONTROL, scontrol);

ata_set_sata_spd(ap);
sata_set_spd(ap);
}

/* issue phy wake/reset */
Expand Down Expand Up @@ -2657,7 +2657,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
if (probeinit)
probeinit(ap);

if (softreset && !ata_set_sata_spd_needed(ap)) {
if (softreset && !sata_set_spd_needed(ap)) {
rc = ata_do_reset(ap, softreset, postreset, classes);
if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN)
goto done;
Expand All @@ -2677,7 +2677,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
break;
}

if (ata_down_sata_spd_limit(ap))
if (sata_down_spd_limit(ap))
goto done;

printk(KERN_INFO "ata%u: hardreset failed, will retry "
Expand Down Expand Up @@ -5113,7 +5113,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear);
EXPORT_SYMBOL_GPL(ata_bmdma_status);
EXPORT_SYMBOL_GPL(ata_bmdma_stop);
EXPORT_SYMBOL_GPL(ata_port_probe);
EXPORT_SYMBOL_GPL(ata_set_sata_spd);
EXPORT_SYMBOL_GPL(sata_set_spd);
EXPORT_SYMBOL_GPL(sata_phy_reset);
EXPORT_SYMBOL_GPL(__sata_phy_reset);
EXPORT_SYMBOL_GPL(ata_bus_reset);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ extern void ata_port_flush_task(struct ata_port *ap);
extern unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
struct ata_taskfile *tf, const u8 *cdb,
int dma_dir, void *buf, unsigned int buflen);
extern int ata_down_sata_spd_limit(struct ata_port *ap);
extern int ata_set_sata_spd_needed(struct ata_port *ap);
extern int sata_down_spd_limit(struct ata_port *ap);
extern int sata_set_spd_needed(struct ata_port *ap);
extern int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev,
int force_pio0);
extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class)
u32 tmp;

/* sil24 does the right thing(tm) without any protection */
ata_set_sata_spd(ap);
sata_set_spd(ap);

tout_msec = 100;
if (sata_dev_present(ap))
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ extern void ata_port_probe(struct ata_port *);
extern void __sata_phy_reset(struct ata_port *ap);
extern void sata_phy_reset(struct ata_port *ap);
extern void ata_bus_reset(struct ata_port *ap);
extern int ata_set_sata_spd(struct ata_port *ap);
extern int sata_set_spd(struct ata_port *ap);
extern int ata_drive_probe_reset(struct ata_port *ap,
ata_probeinit_fn_t probeinit,
ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
Expand Down

0 comments on commit b8b5e90

Please sign in to comment.