Le 01.09.2007 06:58, Andrew Morton a écrit :[...] [...] Alan, libata-correct-handling-of-srst-reset-sequences.patch broke 80-wire cable detection on pata_via driver: 2.6.23-rc3-mm1 and 2.6.23-rc4 work fine (ata1 devices are configured for UDMA/100). Few weeks ago, I wrote a patch to solve a wrong cable detection problem after suspend-to-disk/resume, and it solves this problem too. Is it the right way to go ? via_do_set_mode overwrites 80-wire cable detection bits. Let's preserve them. Signed-off-by: Laurent Riffard <laurent.riffard@free.fr> --- drivers/ata/pata_via.c | 7 +++++++ 1 file changed, 7 insertions(+) Index: linux-2.6-mm/drivers/ata/pata_via.c =================================================================== --- linux-2.6-mm.orig/drivers/ata/pata_via.c +++ linux-2.6-mm/drivers/ata/pata_via.c @@ -245,6 +245,7 @@ static void via_do_set_mode(struct ata_p unsigned long T = 1000000000 / via_clock; unsigned long UT = T/tdiv; int ut; + u8 cable80_status; int offset = 3 - (2*ap->port_no) - adev->devno; @@ -294,9 +295,14 @@ static void via_do_set_mode(struct ata_p ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; break; } + + /* Get 80-wire cable detection bit */ + pci_read_config_byte(pdev, 0x50 + offset, &cable80_status); + cable80_status &= 0x10; + /* Set UDMA unless device is not UDMA capable */ if (udma_type) - pci_write_config_byte(pdev, 0x50 + offset, ut); + pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status); } static void via_set_piomode(struct ata_port *ap, struct ata_device *adev) -
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Stephen Rothwell | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Patrick McHardy | Re: [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
