Changeset 1885
- Timestamp:
- 02/01/09 18:44:33 (3 years ago)
- Location:
- Whitix/trunk/devices/storage/ata
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/devices/storage/ata/ata-cd.c
r1871 r1885 225 225 } 226 226 227 int AtapiReadWrite(struct Request* request, struct AtaDrive* drive,int type)227 int AtapiReadWrite(struct Request* request, struct AtaDrive* drive) 228 228 { 229 229 struct AtaController* control=drive->parent; -
Whitix/trunk/devices/storage/ata/ata-disk.c
r1809 r1885 64 64 65 65 if (request->numSectors > 0) 66 AtaReadWrite(request, drive , request->type);66 AtaReadWrite(request, drive); 67 67 else 68 68 AtaFinishRequest(drive, 0); 69 69 } 70 70 71 int AtaReadWrite(struct Request* request, struct AtaDrive* drive , int type)71 int AtaReadWrite(struct Request* request, struct AtaDrive* drive) 72 72 { 73 73 struct AtaCommand command; … … 82 82 command.driveNum=drive->drive; 83 83 command.ldh=(command.driveNum << 4) | LDH_DEFAULT; 84 command.command=( type == REQUEST_WRITE ? CMD_ATA_WRITE : CMD_ATA_READ);84 command.command=(request->type == REQUEST_WRITE ? CMD_ATA_WRITE : CMD_ATA_READ); 85 85 command.block=request->sector; 86 86 command.count=1; /* For now */ -
Whitix/trunk/devices/storage/ata/ata.c
r1872 r1885 205 205 206 206 if (drive->type & ATA_DISK) 207 err = AtaReadWrite(request, drive , request->type);207 err = AtaReadWrite(request, drive); 208 208 else 209 err = AtapiReadWrite(request, drive , request->type);209 err = AtapiReadWrite(request, drive); 210 210 211 211 /* Set up the timer, which will expire if we happen to miss an interrupt -
Whitix/trunk/devices/storage/ata/ata.h
r1872 r1885 16 16 * 17 17 */ 18 19 /* TODO: ReadWrite function doesn't need type parameter. Remove. */20 18 21 19 #ifndef ATA_H … … 202 200 203 201 /* Drive-specific functions */ 204 int AtaReadWrite(struct Request* request, struct AtaDrive* drive,int type);205 int AtapiReadWrite(struct Request* request, struct AtaDrive* drive,int type);202 int AtaReadWrite(struct Request* request, struct AtaDrive* drive); 203 int AtapiReadWrite(struct Request* request, struct AtaDrive* drive); 206 204 207 205 #endif
