| 103 | | * FUNCTION: AtapiRead |
| 104 | | * |
| 105 | | * DESCRIPTION: Read data from the drive controller. |
| 106 | | * |
| 107 | | * PARAMETERS: controller - controller of the drive. |
| 108 | | * buffer - buffer to transfer data into. |
| 109 | | * count - number of bytes available. |
| 110 | | * |
| 111 | | * RETURNS: Nothing. |
| 112 | | * |
| 113 | | ***********************************************************************/ |
| 114 | | |
| 115 | | static void AtapiRead(struct AtaDrive* drive, BYTE* buffer, int count) |
| 116 | | { |
| 117 | | if (!count) |
| 118 | | { |
| 119 | | KePrint("AtapiRead: no bytes to read.\n"); |
| 120 | | return; |
| 121 | | } |
| 122 | | |
| 123 | | if (drive->ioFlags & ATA_IO_DWORD) |
| 124 | | insd(CTRL_REG(drive->parent, REG_DATA), buffer, count >> 2); |
| 125 | | else |
| 126 | | insw(CTRL_REG(drive->parent,REG_DATA), buffer, count >> 1); |
| 127 | | } |
| 128 | | |
| 129 | | /*********************************************************************** |
| 130 | | * |