Changeset 63
- Timestamp:
- Dec 18, 2010, 3:10:02 PM (15 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/atapi.c
r61 r63 93 93 AP_SGLIST, io->pSGList + sg_indx, (u16) sg_cnt, 94 94 AP_DEVICE, 0x4000, 95 AP_FEATURES, 0x0001, 95 96 AP_END); 96 97 … … 155 156 pt->ControllerCmdLen, 156 157 AP_SGLIST, pt->pSGList, pt->cSGList, 158 AP_FEATURES, 0x0001, 157 159 AP_END); 158 160 159 if (rc == 0) { 160 add_workspace(iorb)->blocks = pt->cSGList; 161 /* no pp func needed */ 162 163 } else if (rc > 0) { 164 iorb_seterr(iorb, IOERR_CMD_SGLIST_BAD); 165 166 } else { 167 iorb_seterr(iorb, IOERR_CMD_ADD_SOFTWARE_FAILURE); 161 if (rc) { 162 iorb_seterr(iorb, IOERR_DEVICE_NONSPECIFIC); 168 163 } 169 164 … … 184 179 { 185 180 ADD_WORKSPACE _far *aws = add_workspace(iorb); 186 ATAPI_CDB_ REQ_SENSEcdb;181 ATAPI_CDB_6 cdb; 187 182 int rc; 188 183 … … 198 193 memset(&cdb, 0x00, sizeof(cdb)); 199 194 cdb.cmd = ATAPI_CMD_REQUEST_SENSE; 195 cdb.trans_len = (u8) ATAPI_SENSE_LEN; 196 200 197 aws->ppfunc = atapi_req_sense_pp; 201 198 rc = ata_cmd(ad_infos + iorb_unit_adapter(iorb), -
trunk/src/os2ahci/atapi.h
r62 r63 120 120 * ATAPI_CDB_10 - describes layout of generic 10 byte ATAPI command 121 121 */ 122 typedef struct _ATAPI_C MD_10 {122 typedef struct _ATAPI_CDB_10 { 123 123 u8 cmd; /* SCSI/ATAPI command code */ 124 124 u8 flags; /* flags (DPO, FUA) */ … … 131 131 * ATAPI_CDB_12 - describes layout of generic 12 byte ATAPI command 132 132 */ 133 typedef struct _ATAPI_C MD_12 {133 typedef struct _ATAPI_CDB_12 { 134 134 u8 cmd; /* SCSI/ATAPI command code */ 135 135 u8 flags; /* flags (DPO, FUA) */ … … 141 141 142 142 /******************************************************************************Ã 143 * ATAPI_CDB_ REQ_SENSE - describes request sensecommand143 * ATAPI_CDB_6 - describes 6 byte ATAPI command 144 144 */ 145 typedef struct _ATAPI_C MD_REQ_SENSE{146 u8 cmd; /* command code (0x03)*/145 typedef struct _ATAPI_CDB_6 { 146 u8 cmd; /* command code */ 147 147 u8 lun; /* SCSI lun (ignored) */ 148 148 u8 resvd[2]; 149 u8 buffer_len; /* sense buffer length */149 u8 trans_len; /* trasnfer length */ 150 150 u8 control; 151 } ATAPI_CDB_ REQ_SENSE;151 } ATAPI_CDB_6; 152 152 153 153 -
trunk/src/os2ahci/ctxhook.c
r13 r63 120 120 ccs = (int) ((readl(port_mmio + PORT_CMD) >> 8) & 0x0f); 121 121 122 122 for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) { 123 123 ADD_WORKSPACE _far *aws = add_workspace(iorb); 124 124 next = iorb->pNxtIORB; 125 125 126 126 if (aws->queued_hw) { 127 if (ai->ports[p].ncq_cmds != 0) {127 if (ai->ports[p].ncq_cmds & (1UL << aws->cmd_slot)) { 128 128 /* NCQ commands active; force non-NCQ mode and trigger port reset */ 129 ai->ports[p].ncq_cmds &= ~(1UL << aws->cmd_slot); 129 130 aws->no_ncq = 1; 130 131 need_reset = 1; 131 132 } else if (aws->cmd_slot == ccs) { 132 133 /* this is the non-NCQ comand that failed */ 134 ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot); 133 135 problem_iorb = iorb; 134 136 } 135 137 iorb_requeue(iorb); 136 137 /* remove requeued command from the issued command bitmaps */138 ai->ports[p].ncq_cmds &= ~(1UL << p);139 ai->ports[p].reg_cmds &= ~(1UL << p);140 138 } 141 139 } -
trunk/src/os2ahci/os2ahci.def
r60 r63 1 1 library os2ahci 2 Description '$@#thi.guten (www.thiguten.de):1.00.2010121 6#@OS/2 AHCI Adapter Device Driver'2 Description '$@#thi.guten (www.thiguten.de):1.00.20101218#@OS/2 AHCI Adapter Device Driver' 3 3 protmode 4 4
Note:
See TracChangeset
for help on using the changeset viewer.