This source file includes following definitions.
- BusLogic_LockHostAdapter
- BusLogic_UnlockHostAdapter
- BusLogic_LockHostAdapterID
- BusLogic_UnlockHostAdapterID
- BusLogic_WriteControlRegister
- BusLogic_ReadStatusRegister
- BusLogic_WriteCommandParameterRegister
- BusLogic_ReadDataInRegister
- BusLogic_ReadInterruptRegister
- BusLogic_ReadGeometryRegister
- BusLogic_StartMailboxScan
- BusLogic_Delay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 typedef struct pt_regs Registers_T;
18 typedef Scsi_Host_Template SCSI_Host_Template_T;
19 typedef struct Scsi_Host SCSI_Host_T;
20 typedef struct scsi_disk SCSI_Disk_T;
21 typedef struct scsi_cmnd SCSI_Command_T;
22 typedef struct scatterlist SCSI_ScatterList_T;
23 typedef kdev_t KernelDevice_T;
24
25
26
27
28
29
30 const char *BusLogic_DriverInfo(SCSI_Host_T *);
31 int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *);
32 int BusLogic_ReleaseHostAdapter(SCSI_Host_T *);
33 int BusLogic_QueueCommand(SCSI_Command_T *,
34 void (*CompletionRoutine)(SCSI_Command_T *));
35 int BusLogic_AbortCommand(SCSI_Command_T *);
36 int BusLogic_ResetCommand(SCSI_Command_T *);
37 int BusLogic_BIOSDiskParameters(SCSI_Disk_T *, KernelDevice_T, int *);
38
39
40
41
42
43
44 #define BUSLOGIC \
45 { NULL, \
46 NULL, \
47 NULL, \
48 NULL, \
49 "BusLogic", \
50 BusLogic_DetectHostAdapter, \
51 BusLogic_ReleaseHostAdapter, \
52 BusLogic_DriverInfo, \
53 NULL, \
54 BusLogic_QueueCommand, \
55 BusLogic_AbortCommand, \
56 BusLogic_ResetCommand, \
57 NULL, \
58 BusLogic_BIOSDiskParameters, \
59 0, \
60 0, \
61 0, \
62 0, \
63 0, \
64 1, \
65 ENABLE_CLUSTERING }
66
67
68
69
70
71
72 #ifdef BusLogic_DriverVersion
73
74
75
76
77
78
79 #define BusLogic_MaxHostAdapters 10
80
81
82
83
84
85
86 #define BusLogic_IO_MaxProbeAddresses 16
87
88
89
90
91
92
93 #define BusLogic_MaxTargetIDs 16
94
95
96
97
98
99
100
101
102
103
104 #define BusLogic_MailboxCount 32
105
106
107
108
109
110
111
112
113 #define BusLogic_InitialCCBs 32
114
115
116
117
118
119
120
121
122 #define BusLogic_ScatterGatherLimit 128
123
124
125
126
127
128
129
130 #define BusLogic_Concurrency 7
131 #define BusLogic_Concurrency_ISA 1
132
133
134
135
136
137
138
139
140
141 #define BusLogic_DefaultBusSettleTime 2
142
143
144
145
146
147
148 #define BusLogic_TraceProbe 1
149 #define BusLogic_TraceHardReset 2
150 #define BusLogic_TraceConfiguration 4
151 #define BusLogic_TraceErrors 8
152
153
154
155
156
157
158 #define BusLogic_ErrorRecoveryDefault 0
159 #define BusLogic_ErrorRecoveryHardReset 1
160 #define BusLogic_ErrorRecoveryBusDeviceReset 2
161 #define BusLogic_ErrorRecoveryNone 3
162
163 static char
164 *BusLogic_ErrorRecoveryOptions[] =
165 { "Default", "Hard Reset", "Bus Device Reset", "None" },
166 *BusLogic_ErrorRecoveryOptions2[] =
167 { "D", "H", "B", "N" };
168
169
170
171
172
173
174 #define false 0
175 #define true 1
176 typedef unsigned char boolean;
177
178
179
180
181
182
183 #define BusLogic_IO_PortCount 4
184 #define BusLogic_ControlRegister 0
185 #define BusLogic_StatusRegister 0
186 #define BusLogic_CommandParameterRegister 1
187 #define BusLogic_DataInRegister 1
188 #define BusLogic_InterruptRegister 2
189 #define BusLogic_GeometryRegister 3
190
191
192
193
194
195
196 #define BusLogic_ReservedCR 0x0F
197 #define BusLogic_SCSIBusReset 0x10
198 #define BusLogic_InterruptReset 0x20
199 #define BusLogic_SoftReset 0x40
200 #define BusLogic_HardReset 0x80
201
202
203
204
205
206
207 #define BusLogic_CommandInvalid 0x01
208 #define BusLogic_ReservedSR 0x02
209 #define BusLogic_DataInRegisterReady 0x04
210 #define BusLogic_CommandParameterRegisterBusy 0x08
211 #define BusLogic_HostAdapterReady 0x10
212 #define BusLogic_InitializationRequired 0x20
213 #define BusLogic_DiagnosticFailure 0x40
214 #define BusLogic_DiagnosticActive 0x80
215
216
217
218
219
220
221 #define BusLogic_IncomingMailboxLoaded 0x01
222 #define BusLogic_OutgoingMailboxAvailable 0x02
223 #define BusLogic_CommandComplete 0x04
224 #define BusLogic_SCSIResetState 0x08
225 #define BusLogic_ReservedIR 0x70
226 #define BusLogic_InterruptValid 0x80
227
228
229
230
231
232
233 #define BusLogic_Drive0Geometry 0x03
234 #define BusLogic_Drive1Geometry 0x0C
235 #define BusLogic_ReservedGR 0x70
236 #define BusLogic_ExtendedTranslationEnabled 0x80
237
238
239
240
241
242
243 typedef enum
244 {
245 BusLogic_TestCommandCompleteInterrupt = 0x00,
246 BusLogic_InitializeMailbox = 0x01,
247 BusLogic_StartMailboxCommand = 0x02,
248 BusLogic_StartBIOSCommand = 0x03,
249 BusLogic_InquireBoardID = 0x04,
250 BusLogic_EnableOutgoingMailboxAvailableIRQ = 0x05,
251 BusLogic_SetSCSISelectionTimeout = 0x06,
252 BusLogic_SetPreemptTimeOnBus = 0x07,
253 BusLogic_SetTimeOffBus = 0x08,
254 BusLogic_SetBusTransferRate = 0x09,
255 BusLogic_InquireInstalledDevicesID0to7 = 0x0A,
256 BusLogic_InquireConfiguration = 0x0B,
257 BusLogic_SetTargetMode = 0x0C,
258 BusLogic_InquireSetupInformation = 0x0D,
259 BusLogic_WriteAdapterLocalRAM = 0x1A,
260 BusLogic_ReadAdapterLocalRAM = 0x1B,
261 BusLogic_WriteBusMasterChipFIFO = 0x1C,
262 BusLogic_ReadBusMasterChipFIFO = 0x1D,
263 BusLogic_EchoCommandData = 0x1F,
264 BusLogic_HostAdapterDiagnostic = 0x20,
265 BusLogic_SetAdapterOptions = 0x21,
266 BusLogic_InquireInstalledDevicesID8to15 = 0x23,
267 BusLogic_InitializeExtendedMailbox = 0x81,
268 BusLogic_InquireFirmwareVersion3rdDigit = 0x84,
269 BusLogic_InquireFirmwareVersionLetter = 0x85,
270 BusLogic_InquireBoardModelAndRevision = 0x8B,
271 BusLogic_InquireSynchronousPeriod = 0x8C,
272 BusLogic_InquireExtendedSetupInformation = 0x8D,
273 BusLogic_EnableStrictRoundRobinMode = 0x8F,
274 BusLogic_ModifyIOAddress = 0x95,
275 BusLogic_EnableWideModeCCB = 0x96
276 }
277 BusLogic_OperationCode_T;
278
279
280
281
282
283
284 typedef struct BusLogic_BoardID
285 {
286 unsigned char BoardType;
287 unsigned char CustomFeatures;
288 unsigned char FirmwareVersion1stDigit;
289 unsigned char FirmwareVersion2ndDigit;
290 }
291 BusLogic_BoardID_T;
292
293
294
295
296
297
298
299
300
301 typedef unsigned char BusLogic_InstalledDevices8_T[8];
302
303 typedef unsigned char BusLogic_InstalledDevices_T[BusLogic_MaxTargetIDs];
304
305
306
307
308
309
310 typedef struct BusLogic_Configuration
311 {
312 unsigned char :5;
313 boolean DMA_Channel5:1;
314 boolean DMA_Channel6:1;
315 boolean DMA_Channel7:1;
316 boolean IRQ_Channel9:1;
317 boolean IRQ_Channel10:1;
318 boolean IRQ_Channel11:1;
319 boolean IRQ_Channel12:1;
320 unsigned char :1;
321 boolean IRQ_Channel14:1;
322 boolean IRQ_Channel15:1;
323 unsigned char :1;
324 unsigned char HostAdapterID:4;
325 unsigned char :4;
326 }
327 BusLogic_Configuration_T;
328
329
330
331
332
333
334 typedef struct BusLogic_SynchronousValue
335 {
336 unsigned char Offset:4;
337 unsigned char TransferPeriod:3;
338 boolean Synchronous:1;
339 }
340 BusLogic_SynchronousValue_T;
341
342 typedef BusLogic_SynchronousValue_T
343 BusLogic_SynchronousValues8_T[8];
344
345 typedef BusLogic_SynchronousValue_T
346 BusLogic_SynchronousValues_T[BusLogic_MaxTargetIDs];
347
348 typedef struct BusLogic_SetupInformation
349 {
350 boolean SynchronousInitiationEnabled:1;
351 boolean ParityCheckEnabled:1;
352 unsigned char :6;
353 unsigned char BusTransferRate;
354 unsigned char PreemptTimeOnBus;
355 unsigned char TimeOffBus;
356 unsigned char MailboxCount;
357 unsigned char MailboxAddress[3];
358 BusLogic_SynchronousValues8_T SynchronousValuesID0to7;
359 unsigned char DisconnectPermittedID0to7;
360 unsigned char Signature;
361 unsigned char CharacterD;
362 unsigned char BusLetter;
363 unsigned char :8;
364 unsigned char :8;
365 BusLogic_SynchronousValues8_T SynchronousValuesID8to15;
366 unsigned char DisconnectPermittedID8to15;
367 }
368 BusLogic_SetupInformation_T;
369
370
371
372
373
374
375 typedef struct BusLogic_ExtendedMailboxRequest
376 {
377 unsigned char MailboxCount;
378 void *BaseMailboxAddress __attribute__ ((packed));
379 }
380 BusLogic_ExtendedMailboxRequest_T;
381
382
383
384
385
386
387 typedef unsigned char BusLogic_FirmwareVersion3rdDigit_T;
388
389
390
391
392
393
394 typedef unsigned char BusLogic_FirmwareVersionLetter_T;
395
396
397
398
399
400
401 typedef struct BusLogic_ModelAndRevision
402 {
403 unsigned char Model[5];
404 unsigned char Revision;
405 }
406 BusLogic_ModelAndRevision_T;
407
408
409
410
411
412
413
414
415 typedef unsigned char BusLogic_SynchronousPeriod_T[BusLogic_MaxTargetIDs];
416
417
418
419
420
421
422 typedef struct BusLogic_ExtendedSetupInformation
423 {
424 unsigned char BusType;
425 unsigned char BIOS_Address;
426 unsigned short ScatterGatherLimit;
427 unsigned char MailboxCount;
428 void *BaseMailboxAddress __attribute__ ((packed));
429 struct { unsigned char :6;
430 boolean LevelTriggeredInterrupts:1;
431 unsigned char :1; } Misc;
432 unsigned char FirmwareRevision[3];
433 boolean HostWideSCSI:1;
434 boolean HostDifferentialSCSI:1;
435 unsigned char :6;
436 }
437 BusLogic_ExtendedSetupInformation_T;
438
439
440
441
442
443
444 #define BusLogic_AggressiveRoundRobinMode 0x00
445 #define BusLogic_StrictRoundRobinMode 0x01
446
447 typedef unsigned char BusLogic_RoundRobinModeRequest_T;
448
449
450
451
452
453
454
455
456
457 #define BusLogic_ModifyIO_330 0x00
458 #define BusLogic_ModifyIO_334 0x01
459 #define BusLogic_ModifyIO_230 0x02
460 #define BusLogic_ModifyIO_234 0x03
461 #define BusLogic_ModifyIO_130 0x04
462 #define BusLogic_ModifyIO_134 0x05
463 #define BusLogic_ModifyIO_Disable 0x06
464 #define BusLogic_ModifyIO_Disable2 0x07
465
466 typedef unsigned char BusLogic_ModifyIOAddressRequest_T;
467
468
469
470
471
472
473
474 #define BusLogic_NormalModeCCB 0x00
475 #define BusLogic_WideModeCCB 0x01
476
477 typedef unsigned char BusLogic_WideModeCCBRequest_T;
478
479
480
481
482
483
484
485
486 typedef unsigned char BusLogic_RequestedReplyLength_T;
487
488
489
490
491
492
493
494
495 typedef unsigned long BusLogic_Lock_T;
496
497
498
499
500
501
502 typedef enum
503 {
504 BusLogic_OutgoingMailboxFree = 0,
505 BusLogic_MailboxStartCommand = 1,
506 BusLogic_MailboxAbortCommand = 2
507 }
508 BusLogic_ActionCode_T;
509
510
511
512
513
514
515 typedef enum
516 {
517 BusLogic_IncomingMailboxFree = 0,
518 BusLogic_CommandCompletedWithoutError = 1,
519 BusLogic_CommandAbortedAtHostRequest = 2,
520 BusLogic_AbortedCommandNotFound = 3,
521 BusLogic_CommandCompletedWithError = 4
522 }
523 BusLogic_CompletionCode_T;
524
525
526
527
528
529
530 typedef enum
531 {
532 BusLogic_InitiatorCCB = 0x00,
533 BusLogic_TargetCCB = 0x01,
534 BusLogic_InitiatorCCB_ScatterGather = 0x02,
535 BusLogic_InitiatorCCB_ResidualDataLength = 0x03,
536 BusLogic_InitiatorCCB_ScatterGatherResidual = 0x04,
537 BusLogic_SCSIBusDeviceReset = 0x81
538 }
539 BusLogic_CCB_Opcode_T;
540
541
542
543
544
545
546 typedef enum
547 {
548 BusLogic_UncheckedDataTransfer = 0x00,
549 BusLogic_DataInLengthChecked = 0x01,
550 BusLogic_DataOutLengthChecked = 0x02,
551 BusLogic_NoDataTransfer = 0x03
552 }
553 BusLogic_DataDirection_T;
554
555
556
557
558
559
560 typedef enum
561 {
562 BusLogic_CommandCompletedNormally = 0x00,
563 BusLogic_LinkedCommandCompleted = 0x0A,
564 BusLogic_LinkedCommandCompletedWithFlag = 0x0B,
565 BusLogic_SCSISelectionTimeout = 0x11,
566 BusLogic_DataOverUnderRun = 0x12,
567 BusLogic_UnexpectedBusFree = 0x13,
568 BusLogic_InvalidBusPhaseRequested = 0x14,
569 BusLogic_InvalidOutgoingMailboxActionCode = 0x15,
570 BusLogic_InvalidCommandOperationCode = 0x16,
571 BusLogic_LinkedCCBhasInvalidLUN = 0x17,
572 BusLogic_InvalidCommandParameter = 0x1A,
573 BusLogic_AutoRequestSenseFailed = 0x1B,
574 BusLogic_TaggedQueuingMessageRejected = 0x1C,
575 BusLogic_UnsupportedMessageReceived = 0x1D,
576 BusLogic_HostAdapterHardwareFailed = 0x20,
577 BusLogic_TargetFailedResponseToATN = 0x21,
578 BusLogic_HostAdapterAssertedRST = 0x22,
579 BusLogic_OtherDeviceAssertedRST = 0x23,
580 BusLogic_TargetDeviceReconnectedImproperly = 0x24,
581 BusLogic_HostAdapterAssertedBusDeviceReset = 0x25,
582 BusLogic_AbortQueueGenerated = 0x26,
583 BusLogic_HostAdapterSoftwareError = 0x27,
584 BusLogic_HostAdapterHardwareTimeoutError = 0x30,
585 BusLogic_SCSIParityErrorDetected = 0x34
586 }
587 BusLogic_HostAdapterStatus_T;
588
589
590
591
592
593
594 typedef enum
595 {
596 BusLogic_OperationGood = 0x00,
597 BusLogic_CheckCondition = 0x02,
598 BusLogic_DeviceBusy = 0x08
599 }
600 BusLogic_TargetDeviceStatus_T;
601
602
603
604
605
606
607 typedef enum
608 {
609 BusLogic_SimpleQueueTag = 0x00,
610 BusLogic_HeadOfQueueTag = 0x01,
611 BusLogic_OrderedQueueTag = 0x02,
612 BusLogic_ReservedQT = 0x03
613 }
614 BusLogic_QueueTag_T;
615
616
617
618
619
620
621 #define BusLogic_CDB_MaxLength 12
622
623 typedef unsigned char SCSI_CDB_T[BusLogic_CDB_MaxLength];
624
625
626
627
628
629
630 #define BusLogic_SenseDataMaxLength 255
631
632 typedef unsigned char SCSI_SenseData_T[BusLogic_SenseDataMaxLength];
633
634
635
636
637
638
639
640 typedef struct BusLogic_ScatterGatherSegment
641 {
642 unsigned long SegmentByteCount;
643 void *SegmentDataPointer;
644 }
645 BusLogic_ScatterGatherSegment_T;
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660 typedef struct BusLogic_CCB
661 {
662
663
664
665 BusLogic_CCB_Opcode_T Opcode:8;
666 unsigned char :3;
667 BusLogic_DataDirection_T DataDirection:2;
668 boolean WideModeTagEnable:1;
669 BusLogic_QueueTag_T WideModeQueueTag:2;
670 unsigned char CDB_Length;
671 unsigned char SenseDataLength;
672 unsigned long DataLength;
673 void *DataPointer;
674 unsigned char :8;
675 unsigned char :8;
676 BusLogic_HostAdapterStatus_T HostAdapterStatus:8;
677 BusLogic_TargetDeviceStatus_T TargetDeviceStatus:8;
678 unsigned char TargetID;
679 unsigned char LogicalUnit:5;
680 boolean TagEnable:1;
681 BusLogic_QueueTag_T QueueTag:2;
682 SCSI_CDB_T CDB;
683 unsigned char :8;
684 unsigned char :8;
685 unsigned long :32;
686 SCSI_SenseData_T *SenseDataPointer;
687
688
689
690 struct BusLogic_HostAdapter *HostAdapter;
691 SCSI_Command_T *Command;
692 enum { BusLogic_CCB_Free = 0,
693 BusLogic_CCB_Active = 1,
694 BusLogic_CCB_Completed = 2 } Status;
695 BusLogic_CompletionCode_T MailboxCompletionCode;
696 unsigned int SerialNumber;
697 struct BusLogic_CCB *Next;
698 struct BusLogic_CCB *NextAll;
699 BusLogic_ScatterGatherSegment_T
700 ScatterGatherList[BusLogic_ScatterGatherLimit];
701 }
702 BusLogic_CCB_T;
703
704
705
706
707
708
709 typedef struct BusLogic_OutgoingMailbox
710 {
711 BusLogic_CCB_T *CCB;
712 unsigned long :24;
713 BusLogic_ActionCode_T ActionCode:8;
714 }
715 BusLogic_OutgoingMailbox_T;
716
717
718
719
720
721
722 typedef struct BusLogic_IncomingMailbox
723 {
724 BusLogic_CCB_T *CCB;
725 BusLogic_HostAdapterStatus_T HostAdapterStatus:8;
726 BusLogic_TargetDeviceStatus_T TargetDeviceStatus:8;
727 unsigned char :8;
728 BusLogic_CompletionCode_T CompletionCode:8;
729 }
730 BusLogic_IncomingMailbox_T;
731
732
733
734
735
736
737 typedef enum
738 {
739 BusLogic_Unknown_Bus = 0,
740 BusLogic_ISA_Bus = 1,
741 BusLogic_MCA_Bus = 2,
742 BusLogic_EISA_Bus = 3,
743 BusLogic_VESA_Bus = 4,
744 BusLogic_PCI_Bus = 5
745 }
746 BusLogic_BusType_T;
747
748 static char
749 *BusLogic_BusNames[] =
750 { "Unknown", "ISA", "MCA", "EISA", "VESA", "PCI" };
751
752
753
754
755
756
757 typedef struct BusLogic_CommandLineEntry
758 {
759 unsigned short IO_Address;
760 unsigned short Concurrency;
761 unsigned short BusSettleTime;
762 unsigned short TaggedQueuingPermitted;
763 unsigned short TaggedQueuingPermittedMask;
764 unsigned char ErrorRecoveryOption[BusLogic_MaxTargetIDs];
765 }
766 BusLogic_CommandLineEntry_T;
767
768
769
770
771
772
773 typedef struct BusLogic_HostAdapter
774 {
775 SCSI_Host_T *SCSI_Host;
776 unsigned char HostNumber;
777 unsigned char ModelName[6];
778 unsigned char FirmwareVersion[6];
779 unsigned char BoardName[15];
780 unsigned char InterruptLabel[63];
781 unsigned short IO_Address;
782 unsigned char IRQ_Channel;
783 unsigned char DMA_Channel;
784 unsigned char SCSI_ID;
785 BusLogic_BusType_T BusType:3;
786 boolean IRQ_ChannelAcquired:1;
787 boolean DMA_ChannelAcquired:1;
788 boolean SynchronousInitiation:1;
789 boolean ParityChecking:1;
790 boolean ExtendedTranslation:1;
791 boolean LevelTriggeredInterrupts:1;
792 boolean HostWideSCSI:1;
793 boolean HostDifferentialSCSI:1;
794 boolean HostAdapterResetPending:1;
795 volatile boolean HostAdapterCommandCompleted:1;
796 unsigned short HostAdapterScatterGatherLimit;
797 unsigned short DriverScatterGatherLimit;
798 unsigned short MaxTargetIDs;
799 unsigned short MaxLogicalUnits;
800 unsigned short Concurrency;
801 unsigned short BusSettleTime;
802 unsigned short DisconnectPermitted;
803 unsigned short TaggedQueuingPermitted;
804 unsigned long BIOS_Address;
805 BusLogic_InstalledDevices_T InstalledDevices;
806 BusLogic_SynchronousValues_T SynchronousValues;
807 BusLogic_SynchronousPeriod_T SynchronousPeriod;
808 BusLogic_Lock_T Lock;
809 struct BusLogic_HostAdapter *Next;
810 BusLogic_CommandLineEntry_T *CommandLineEntry;
811 BusLogic_CCB_T *All_CCBs;
812 BusLogic_CCB_T *Free_CCBs;
813 unsigned char ErrorRecoveryOption[BusLogic_MaxTargetIDs];
814 unsigned char CommandSuccessfulFlag[BusLogic_MaxTargetIDs];
815 unsigned long ReadWriteOperationCount[BusLogic_MaxTargetIDs];
816 BusLogic_OutgoingMailbox_T *FirstOutgoingMailbox;
817 BusLogic_OutgoingMailbox_T *LastOutgoingMailbox;
818 BusLogic_OutgoingMailbox_T *NextOutgoingMailbox;
819 BusLogic_IncomingMailbox_T *FirstIncomingMailbox;
820 BusLogic_IncomingMailbox_T *LastIncomingMailbox;
821 BusLogic_IncomingMailbox_T *NextIncomingMailbox;
822 BusLogic_OutgoingMailbox_T OutgoingMailboxes[BusLogic_MailboxCount];
823 BusLogic_IncomingMailbox_T IncomingMailboxes[BusLogic_MailboxCount];
824 }
825 BusLogic_HostAdapter_T;
826
827
828
829
830
831
832 typedef struct BIOS_DiskParameters
833 {
834 int Heads;
835 int Sectors;
836 int Cylinders;
837 }
838 BIOS_DiskParameters_T;
839
840
841
842
843
844
845 static inline
846 void BusLogic_LockHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
847 {
848 save_flags(HostAdapter->Lock);
849 cli();
850 }
851
852
853
854
855
856
857 static inline
858 void BusLogic_UnlockHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
859 {
860 restore_flags(HostAdapter->Lock);
861 }
862
863
864
865
866
867
868
869 static inline
870 void BusLogic_LockHostAdapterID(BusLogic_HostAdapter_T *HostAdapter)
871 {
872 }
873
874
875
876
877
878
879
880 static inline
881 void BusLogic_UnlockHostAdapterID(BusLogic_HostAdapter_T *HostAdapter)
882 {
883 }
884
885
886
887
888
889
890
891 static inline
892 void BusLogic_WriteControlRegister(BusLogic_HostAdapter_T *HostAdapter,
893 unsigned char Value)
894 {
895 outb(Value, HostAdapter->IO_Address + BusLogic_ControlRegister);
896 }
897
898 static inline
899 unsigned char BusLogic_ReadStatusRegister(BusLogic_HostAdapter_T *HostAdapter)
900 {
901 return inb(HostAdapter->IO_Address + BusLogic_StatusRegister);
902 }
903
904 static inline
905 void BusLogic_WriteCommandParameterRegister(BusLogic_HostAdapter_T *HostAdapter,
906 unsigned char Value)
907 {
908 outb(Value, HostAdapter->IO_Address + BusLogic_CommandParameterRegister);
909 }
910
911 static inline
912 unsigned char BusLogic_ReadDataInRegister(BusLogic_HostAdapter_T *HostAdapter)
913 {
914 return inb(HostAdapter->IO_Address + BusLogic_DataInRegister);
915 }
916
917 static inline
918 unsigned char BusLogic_ReadInterruptRegister(BusLogic_HostAdapter_T
919 *HostAdapter)
920 {
921 return inb(HostAdapter->IO_Address + BusLogic_InterruptRegister);
922 }
923
924 static inline
925 unsigned char BusLogic_ReadGeometryRegister(BusLogic_HostAdapter_T *HostAdapter)
926 {
927 return inb(HostAdapter->IO_Address + BusLogic_GeometryRegister);
928 }
929
930
931
932
933
934
935
936
937 static inline
938 void BusLogic_StartMailboxScan(BusLogic_HostAdapter_T *HostAdapter)
939 {
940 BusLogic_WriteCommandParameterRegister(HostAdapter,
941 BusLogic_StartMailboxCommand);
942 }
943
944
945
946
947
948
949
950 static inline void BusLogic_Delay(int Seconds)
951 {
952 unsigned long TimeoutJiffies = jiffies + Seconds * HZ;
953 while (jiffies < TimeoutJiffies) ;
954 }
955
956
957
958
959
960
961
962 static void BusLogic_InterruptHandler(int, Registers_T *);
963 static int BusLogic_ResetHostAdapter(BusLogic_HostAdapter_T *,
964 SCSI_Command_T *);
965
966
967 #endif