Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109023
b: refs/heads/master
c: d127ea7
h: refs/heads/master
i:
  109021: d323f8c
  109019: e5c950d
  109015: 2d79cfd
  109007: 2395639
  108991: 8ab4eb4
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 22, 2008
1 parent bd1d3cb commit 700dec3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 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: da0e21d3fa2340114fe24821718a1b57123e4664
refs/heads/master: d127ea7b8643a93d14d1f3c542974407f14d3663
10 changes: 5 additions & 5 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5199,15 +5199,14 @@ void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp)
*/
int sata_link_init_spd(struct ata_link *link)
{
u32 scontrol;
u8 spd;
int rc;

rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
rc = sata_scr_read(link, SCR_CONTROL, &link->saved_scontrol);
if (rc)
return rc;

spd = (scontrol >> 4) & 0xf;
spd = (link->saved_scontrol >> 4) & 0xf;
if (spd)
link->hw_sata_spd_limit &= (1 << spd) - 1;

Expand Down Expand Up @@ -5794,9 +5793,10 @@ static void ata_port_detach(struct ata_port *ap)
ata_port_wait_eh(ap);

/* EH is now guaranteed to see UNLOADING - EH context belongs
* to us. Disable all existing devices.
* to us. Restore SControl and disable all existing devices.
*/
ata_port_for_each_link(link, ap) {
__ata_port_for_each_link(link, ap) {
sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);
ata_link_for_each_dev(dev, link)
ata_dev_disable(dev);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ struct ata_link {

unsigned int flags; /* ATA_LFLAG_xxx */

u32 saved_scontrol; /* SControl on probe */
unsigned int hw_sata_spd_limit;
unsigned int sata_spd_limit;
unsigned int sata_spd; /* current SATA PHY speed */
Expand Down

0 comments on commit 700dec3

Please sign in to comment.