Lines Matching defs:CmdBlkP
81 struct CmdBlk *CmdBlkP;
85 CmdBlkP = RIOGetCmdBlk();
87 if (!CmdBlkP) {
92 CmdBlkP->Packet.dest_unit = MapP->ID;
93 CmdBlkP->Packet.dest_port = BOOT_RUP;
94 CmdBlkP->Packet.src_unit = 0;
95 CmdBlkP->Packet.src_port = BOOT_RUP;
96 CmdBlkP->Packet.len = 0x84;
97 CmdBlkP->Packet.data[0] = IFOAD;
98 CmdBlkP->Packet.data[1] = 0;
99 CmdBlkP->Packet.data[2] = IFOAD_MAGIC & 0xFF;
100 CmdBlkP->Packet.data[3] = (IFOAD_MAGIC >> 8) & 0xFF;
102 if (RIOQueueCmdBlk(HostP, MapP->ID - 1, CmdBlkP) == RIO_FAIL) {
111 struct CmdBlk *CmdBlkP;
115 CmdBlkP = RIOGetCmdBlk();
117 if (!CmdBlkP) {
122 CmdBlkP->Packet.dest_unit = MapP->ID;
123 CmdBlkP->Packet.dest_port = BOOT_RUP;
124 CmdBlkP->Packet.src_unit = 0;
125 CmdBlkP->Packet.src_port = BOOT_RUP;
126 CmdBlkP->Packet.len = 0x84;
127 CmdBlkP->Packet.data[0] = ZOMBIE;
128 CmdBlkP->Packet.data[1] = 0;
129 CmdBlkP->Packet.data[2] = ZOMBIE_MAGIC & 0xFF;
130 CmdBlkP->Packet.data[3] = (ZOMBIE_MAGIC >> 8) & 0xFF;
132 if (RIOQueueCmdBlk(HostP, MapP->ID - 1, CmdBlkP) == RIO_FAIL) {
211 struct CmdBlk *CmdBlkP;
215 CmdBlkP = RIOGetCmdBlk();
217 if (!CmdBlkP) {
222 CmdBlkP->Packet.dest_unit = MapP->ID;
223 CmdBlkP->Packet.dest_port = BOOT_RUP;
224 CmdBlkP->Packet.src_unit = 0;
225 CmdBlkP->Packet.src_port = BOOT_RUP;
226 CmdBlkP->Packet.len = 0x84;
227 CmdBlkP->Packet.data[0] = IDENTIFY;
228 CmdBlkP->Packet.data[1] = 0;
229 CmdBlkP->Packet.data[2] = IdRta.ID;
231 if (RIOQueueCmdBlk(HostP, MapP->ID - 1, CmdBlkP) == RIO_FAIL) {
250 struct CmdBlk *CmdBlkP;
263 CmdBlkP = RIOGetCmdBlk();
265 if (!CmdBlkP) {
270 CmdBlkP->Packet.dest_unit = 0;
271 CmdBlkP->Packet.src_unit = 0;
272 CmdBlkP->Packet.dest_port = BOOT_RUP;
273 CmdBlkP->Packet.src_port = BOOT_RUP;
274 CmdBlkP->Packet.len = 0x84;
275 CmdBlkP->Packet.data[0] = UFOAD;
276 CmdBlkP->Packet.data[1] = KillUnit.Link;
277 CmdBlkP->Packet.data[2] = UFOAD_MAGIC & 0xFF;
278 CmdBlkP->Packet.data[3] = (UFOAD_MAGIC >> 8) & 0xFF;
285 if (RIOQueueCmdBlk(HostP, RTAS_PER_HOST + KillUnit.Link, CmdBlkP) == RIO_FAIL) {
294 CmdBlkP->Packet.dest_unit = ID + 1;
295 if (RIOQueueCmdBlk(HostP, ID, CmdBlkP) == RIO_FAIL) {
303 RIOFreeCmdBlk(CmdBlkP);
309 struct CmdBlk *CmdBlkP;
313 CmdBlkP = RIOGetCmdBlk();
315 if (!CmdBlkP) {
320 CmdBlkP->Packet.dest_unit = ID;
321 CmdBlkP->Packet.dest_port = BOOT_RUP;
322 CmdBlkP->Packet.src_unit = 0;
323 CmdBlkP->Packet.src_port = BOOT_RUP;
324 CmdBlkP->Packet.len = 0x84;
325 CmdBlkP->Packet.data[0] = IWAIT;
326 CmdBlkP->Packet.data[1] = Link;
327 CmdBlkP->Packet.data[2] = IWAIT_MAGIC & 0xFF;
328 CmdBlkP->Packet.data[3] = (IWAIT_MAGIC >> 8) & 0xFF;
330 if (RIOQueueCmdBlk(HostP, ID - 1, CmdBlkP) == RIO_FAIL) {
555 struct CmdBlk *CmdBlkP;
557 CmdBlkP = kzalloc(sizeof(struct CmdBlk), GFP_ATOMIC);
558 return CmdBlkP;
564 void RIOFreeCmdBlk(struct CmdBlk *CmdBlkP)
566 kfree(CmdBlkP);
573 int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP)
581 RIOFreeCmdBlk(CmdBlkP);
593 if ((UnixRupP->CmdsWaitingP == NULL) && (UnixRupP->CmdPendingP == NULL) && (readw(&UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE) && (CmdBlkP->PreFuncP ? (*CmdBlkP->PreFuncP) (CmdBlkP->PreArg, CmdBlkP)
595 rio_dprintk(RIO_DEBUG_CMD, "RUP inactive-placing command straight on. Cmd byte is 0x%x\n", CmdBlkP->Packet.data[0]);
600 HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT));
605 UnixRupP->CmdPendingP = CmdBlkP;
627 rio_dprintk(RIO_DEBUG_CMD, "First try to queue cmdblk %p at %p\n", CmdBlkP, Base);
632 rio_dprintk(RIO_DEBUG_CMD, "Now try to queue cmd cmdblk %p at %p\n", CmdBlkP, Base);
635 rio_dprintk(RIO_DEBUG_CMD, "Will queue cmdblk %p at %p\n", CmdBlkP, Base);
637 *Base = CmdBlkP;
639 CmdBlkP->NextP = NULL;
652 struct CmdBlk *CmdBlkP;
729 if ((CmdBlkP = UnixRupP->CmdPendingP) && /* ASSIGN! */
738 if (CmdBlkP->Packet.dest_port == BOOT_RUP)
739 rio_dprintk(RIO_DEBUG_CMD, "Free Boot %s Command Block '%x'\n", CmdBlkP->Packet.len & 0x80 ? "Command" : "Data", CmdBlkP->Packet.data[0]);
741 rio_dprintk(RIO_DEBUG_CMD, "Command %p completed\n", CmdBlkP);
746 if (CmdBlkP->PostFuncP) {
748 (*CmdBlkP->PostFuncP) (CmdBlkP->PostArg, CmdBlkP);
760 RIOFreeCmdBlk(CmdBlkP);
767 if ((CmdBlkP = UnixRupP->CmdsWaitingP) && /* ASSIGN! */
774 if (!(CmdBlkP->PreFuncP ? (*CmdBlkP->PreFuncP) (CmdBlkP->PreArg, CmdBlkP) : 1)) {
775 rio_dprintk(RIO_DEBUG_CMD, "Not ready to start command %p\n", CmdBlkP);
777 rio_dprintk(RIO_DEBUG_CMD, "Start new command %p Cmd byte is 0x%x\n", CmdBlkP, CmdBlkP->Packet.data[0]);
781 HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT));
786 UnixRupP->CmdsWaitingP = CmdBlkP->NextP;
791 UnixRupP->CmdPendingP = CmdBlkP;
808 int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP)
817 return RIOUnUse(iPortP, CmdBlkP);
820 int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP)
842 return RIOUnUse(iPortP, CmdBlkP);
845 int RIOUnUse(unsigned long iPortP, struct CmdBlk *CmdBlkP)
924 ** PreFuncP is called as (*PreFuncP)(PreArg, CmdBlkP);. PreFuncP must
929 ** as (*PostFuncP)(PostArg, CmdBlkP, txcontrol);. PostFuncP is not expected
934 ** queue by calling RIOQueueCmdBlk( HostP, Rup, CmdBlkP ) where HostP is
936 ** to it!), and CmdBlkP is the pointer to the command block allocated using