Re: SATA status report updated

From: Jeff Garzik
Date: Fri Aug 19 2005 - 19:03:14 EST


Simon Oosthoek wrote:
I know Mandriva is on the ball and a bug with some information and an updated patch is on the kernel bugme...

http://qa.mandriva.com/show_bug.cgi?id=17654
http://bugme.osdl.org/show_bug.cgi?id=4192

I'd say it's important to get some proper fix in a distribution soon (so I can use my new PC ;-)


That's not an updated patch. That's the patch that duplicates kernel infrastructure, implementing things in the driver that should instead be implemented in libata core.

That's how Windows drivers are written: work around the OS, rather than fix it.

Here is a list of problems with the patch. I'll paste this into the bug as well:

1) duplicates SATA phy reset

2) abuses infrastructure to support PATA, rather than doing it properly. doing it properly involves an approach similar to that found in the 'promise-sata-pata' branch of libata-dev.git. Same problem as Promise SATA+PATA, with the same solution.

3) duplicates ATA bus reset, except, does it poorly

4) duplicates ata_busy_sleep()

5) appears to do strange things with PATA devices, when one uses the ->scr_write() and ->scr_read() hooks -- hooks used to talk to SATA PHYs (never PATA devices).

6) [maybe] sets DMA/PIO timings even for SATA devices. This -may- be needed, depending on PATA<->SATA bridge presence in the host controller

7) Pads DMA to 32-bit boundary. Should be done in libata core, this is needed for all host controllers.

8) The DMA pad code is very buggy. It uses the dma_map_single() to map a buffer, but never synchronizes nor flushes the buffer. This can and will lead to data corruption, particularly on x86-64 platform.

Regards,

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/