aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pluto.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/pluto.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/scsi/pluto.h')
-rw-r--r--drivers/scsi/pluto.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/scsi/pluto.h b/drivers/scsi/pluto.h
new file mode 100644
index 000000000000..beb844aafccd
--- /dev/null
+++ b/drivers/scsi/pluto.h
@@ -0,0 +1,47 @@
1/* pluto.h: SparcSTORAGE Array SCSI host adapter driver definitions.
2 *
3 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
4 */
5
6#ifndef _PLUTO_H
7#define _PLUTO_H
8
9#include "../fc4/fcp_impl.h"
10
11struct pluto {
12 /* This must be first */
13 fc_channel *fc;
14 char rev_str[5];
15 char fw_rev_str[5];
16 char serial_str[13];
17};
18
19struct pluto_inquiry {
20 u8 dtype;
21 u8 removable:1, qualifier:7;
22 u8 iso:2, ecma:3, ansi:3;
23 u8 aenc:1, trmiop:1, :2, rdf:4;
24 u8 len;
25 u8 xxx1;
26 u8 xxx2;
27 u8 reladdr:1, wbus32:1, wbus16:1, sync:1, linked:1, :1, cmdque:1, softreset:1;
28 u8 vendor_id[8];
29 u8 product_id[16];
30 u8 revision[4];
31 u8 fw_revision[4];
32 u8 serial[12];
33 u8 xxx3[2];
34 u8 channels;
35 u8 targets;
36};
37
38/* This is the max number of outstanding SCSI commands per pluto */
39#define PLUTO_CAN_QUEUE 254
40
41int pluto_detect(Scsi_Host_Template *);
42int pluto_release(struct Scsi_Host *);
43const char * pluto_info(struct Scsi_Host *);
44int pluto_slave_configure(Scsi_Device *);
45
46#endif /* !(_PLUTO_H) */
47
>" LOCK_SECTION_START("") "2:\tcall __down_failed\n\t" "jmp 1b\n" LOCK_SECTION_END :"=m" (sem->count) :"D" (sem) :"memory"); } /* * Interruptible try to acquire a semaphore. If we obtained * it, return zero. If we were interrupted, returns -EINTR */ static inline int down_interruptible(struct semaphore * sem) { int result; might_sleep(); __asm__ __volatile__( "# atomic interruptible down operation\n\t" LOCK "decl %1\n\t" /* --sem->count */ "js 2f\n\t" "xorl %0,%0\n" "1:\n" LOCK_SECTION_START("") "2:\tcall __down_failed_interruptible\n\t" "jmp 1b\n" LOCK_SECTION_END :"=a" (result), "=m" (sem->count) :"D" (sem) :"memory"); return result; } /* * Non-blockingly attempt to down() a semaphore. * Returns zero if we acquired it */ static inline int down_trylock(struct semaphore * sem) { int result; __asm__ __volatile__( "# atomic interruptible down operation\n\t" LOCK "decl %1\n\t" /* --sem->count */ "js 2f\n\t" "xorl %0,%0\n" "1:\n" LOCK_SECTION_START("") "2:\tcall __down_failed_trylock\n\t" "jmp 1b\n" LOCK_SECTION_END :"=a" (result), "=m" (sem->count) :"D" (sem) :"memory","cc"); return result; } /* * Note! This is subtle. We jump to wake people up only if * the semaphore was negative (== somebody was waiting on it). * The default case (no contention) will result in NO * jumps for both down() and up(). */ static inline void up(struct semaphore * sem) { __asm__ __volatile__( "# atomic up operation\n\t" LOCK "incl %0\n\t" /* ++sem->count */ "jle 2f\n" "1:\n" LOCK_SECTION_START("") "2:\tcall __up_wakeup\n\t" "jmp 1b\n" LOCK_SECTION_END :"=m" (sem->count) :"D" (sem) :"memory"); } #endif /* __KERNEL__ */ #endif