ncr.c (80203) | ncr.c (102412) |
---|---|
1/************************************************************************** 2** | 1/************************************************************************** 2** |
3** $FreeBSD: head/sys/pci/ncr.c 80203 2001-07-23 12:05:27Z kris $ | 3** $FreeBSD: head/sys/pci/ncr.c 102412 2002-08-25 13:23:09Z charnier $ |
4** 5** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. 6** 7**------------------------------------------------------------------------- 8** 9** Written for 386bsd and FreeBSD by 10** Wolfgang Stanglmeier <wolf@cologne.de> 11** Stefan Esser <se@mi.Uni-Koeln.de> --- 1289 unchanged lines hidden (view full) --- 1301** 1302** 1303**========================================================== 1304*/ 1305 1306 1307#if !defined(lint) 1308static const char ident[] = | 4** 5** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. 6** 7**------------------------------------------------------------------------- 8** 9** Written for 386bsd and FreeBSD by 10** Wolfgang Stanglmeier <wolf@cologne.de> 11** Stefan Esser <se@mi.Uni-Koeln.de> --- 1289 unchanged lines hidden (view full) --- 1301** 1302** 1303**========================================================== 1304*/ 1305 1306 1307#if !defined(lint) 1308static const char ident[] = |
1309 "\n$FreeBSD: head/sys/pci/ncr.c 80203 2001-07-23 12:05:27Z kris $\n"; | 1309 "\n$FreeBSD: head/sys/pci/ncr.c 102412 2002-08-25 13:23:09Z charnier $\n"; |
1310#endif 1311 1312static const u_long ncr_version = NCR_VERSION * 11 1313 + (u_long) sizeof (struct ncb) * 7 1314 + (u_long) sizeof (struct nccb) * 5 1315 + (u_long) sizeof (struct lcb) * 3 1316 + (u_long) sizeof (struct tcb) * 2; 1317 --- 1805 unchanged lines hidden (view full) --- 3123 ~RELOC_MASK]); 3124 break; 3125 case 0: 3126 /* Don't relocate a 0 address. */ 3127 if (old == 0) { 3128 new = old; 3129 break; 3130 } | 1310#endif 1311 1312static const u_long ncr_version = NCR_VERSION * 11 1313 + (u_long) sizeof (struct ncb) * 7 1314 + (u_long) sizeof (struct nccb) * 5 1315 + (u_long) sizeof (struct lcb) * 3 1316 + (u_long) sizeof (struct tcb) * 2; 1317 --- 1805 unchanged lines hidden (view full) --- 3123 ~RELOC_MASK]); 3124 break; 3125 case 0: 3126 /* Don't relocate a 0 address. */ 3127 if (old == 0) { 3128 new = old; 3129 break; 3130 } |
3131 /* fall through */ | 3131 /* FALLTHROUGH */ |
3132 default: 3133 panic("ncr_script_copy_and_bind: weird relocation %x @ %d\n", old, (int)(src - start)); 3134 break; 3135 } 3136 3137 WRITESCRIPT_OFF(dst, offset, new); 3138 offset += 4; 3139 } --- 1466 unchanged lines hidden (view full) --- 4606 while (cp) { 4607 switch (cp->host_status) { 4608 4609 case HS_IDLE: 4610 break; 4611 4612 case HS_DISCONNECT: 4613 if(DEBUG_FLAGS & DEBUG_TINY) printf ("D"); | 3132 default: 3133 panic("ncr_script_copy_and_bind: weird relocation %x @ %d\n", old, (int)(src - start)); 3134 break; 3135 } 3136 3137 WRITESCRIPT_OFF(dst, offset, new); 3138 offset += 4; 3139 } --- 1466 unchanged lines hidden (view full) --- 4606 while (cp) { 4607 switch (cp->host_status) { 4608 4609 case HS_IDLE: 4610 break; 4611 4612 case HS_DISCONNECT: 4613 if(DEBUG_FLAGS & DEBUG_TINY) printf ("D"); |
4614 /* fall through */ | 4614 /* FALLTHROUGH */ |
4615 4616 case HS_BUSY: 4617 case HS_NEGOTIATE: 4618 if (!code) break; 4619 cp->host_status = code; 4620 | 4615 4616 case HS_BUSY: 4617 case HS_NEGOTIATE: 4618 if (!code) break; 4619 cp->host_status = code; 4620 |
4621 /* fall through */ | 4621 /* FALLTHROUGH */ |
4622 4623 default: 4624 ncr_complete (np, cp); 4625 break; 4626 }; 4627 cp = cp -> link_nccb; 4628 }; 4629} --- 528 unchanged lines hidden (view full) --- 5158 cp->phys.header.launch.l_paddr 5159 = NCB_SCRIPT_PHYS (np, skip); 5160 }; 5161 5162 switch (cp->host_status) { 5163 5164 case HS_BUSY: 5165 case HS_NEGOTIATE: | 4622 4623 default: 4624 ncr_complete (np, cp); 4625 break; 4626 }; 4627 cp = cp -> link_nccb; 4628 }; 4629} --- 528 unchanged lines hidden (view full) --- 5158 cp->phys.header.launch.l_paddr 5159 = NCB_SCRIPT_PHYS (np, skip); 5160 }; 5161 5162 switch (cp->host_status) { 5163 5164 case HS_BUSY: 5165 case HS_NEGOTIATE: |
5166 /* fall through */ | 5166 /* FALLTHROUGH */ |
5167 case HS_DISCONNECT: 5168 cp->host_status=HS_TIMEOUT; 5169 }; 5170 cp->tag = 0; 5171 5172 /* 5173 ** wakeup this nccb. 5174 */ --- 847 unchanged lines hidden (view full) --- 6022 ** or target rejected our message. 6023 ** 6024 ** Remove negotiation request. 6025 ** 6026 **------------------------------------------------------- 6027 */ 6028 OUTB (HS_PRT, HS_BUSY); 6029 | 5167 case HS_DISCONNECT: 5168 cp->host_status=HS_TIMEOUT; 5169 }; 5170 cp->tag = 0; 5171 5172 /* 5173 ** wakeup this nccb. 5174 */ --- 847 unchanged lines hidden (view full) --- 6022 ** or target rejected our message. 6023 ** 6024 ** Remove negotiation request. 6025 ** 6026 **------------------------------------------------------- 6027 */ 6028 OUTB (HS_PRT, HS_BUSY); 6029 |
6030 /* fall through */ | 6030 /* FALLTHROUGH */ |
6031 6032 case SIR_NEGO_PROTO: 6033 /*------------------------------------------------------- 6034 ** 6035 ** Negotiation failed. 6036 ** Target doesn't fetch the answer message. 6037 ** 6038 **------------------------------------------------------- --- 309 unchanged lines hidden (view full) --- 6348*/ 6349 case SIR_STALL_QUEUE: 6350 cp->xerr_status = XE_OK; 6351 cp->host_status = HS_COMPLETE; 6352 cp->s_status = SCSI_STATUS_QUEUE_FULL; 6353 ncr_freeze_devq(np, cp->ccb->ccb_h.path); 6354 ncr_complete(np, cp); 6355 | 6031 6032 case SIR_NEGO_PROTO: 6033 /*------------------------------------------------------- 6034 ** 6035 ** Negotiation failed. 6036 ** Target doesn't fetch the answer message. 6037 ** 6038 **------------------------------------------------------- --- 309 unchanged lines hidden (view full) --- 6348*/ 6349 case SIR_STALL_QUEUE: 6350 cp->xerr_status = XE_OK; 6351 cp->host_status = HS_COMPLETE; 6352 cp->s_status = SCSI_STATUS_QUEUE_FULL; 6353 ncr_freeze_devq(np, cp->ccb->ccb_h.path); 6354 ncr_complete(np, cp); 6355 |
6356 /* FALL THROUGH */ | 6356 /* FALLTHROUGH */ |
6357 6358 case SIR_STALL_RESTART: 6359 /*----------------------------------------------- 6360 ** 6361 ** Enable selecting again, 6362 ** if NO disconnected jobs. 6363 ** 6364 **----------------------------------------------- --- 799 unchanged lines hidden --- | 6357 6358 case SIR_STALL_RESTART: 6359 /*----------------------------------------------- 6360 ** 6361 ** Enable selecting again, 6362 ** if NO disconnected jobs. 6363 ** 6364 **----------------------------------------------- --- 799 unchanged lines hidden --- |