PCI IDE Controller: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
Kevin (talk | contribs)
m Interwiki
Brendan (talk | contribs)
m Added a "serious bugs" warning to the code for "ide_read_buffer()"
Line 297: Line 297:
void ide_read_buffer(unsigned char channel, unsigned char reg, unsigned int buffer,
void ide_read_buffer(unsigned char channel, unsigned char reg, unsigned int buffer,
unsigned int quads) {
unsigned int quads) {
/* WARNING: This code contains a serious bug. The inline assembly trashes ES and
* ESP for all of the code the compiler generates between the inline
* assembly blocks.
*/
if (reg > 0x07 && reg < 0x0C)
if (reg > 0x07 && reg < 0x0C)
ide_write(channel, ATA_REG_CONTROL, 0x80 | channels[channel].nIEN);
ide_write(channel, ATA_REG_CONTROL, 0x80 | channels[channel].nIEN);