Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
00492e8c
Commit
00492e8c
authored
Feb 03, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
ba5ce248
45c20ae5
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
114 additions
and
87 deletions
+114
-87
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+10
-0
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+1
-0
drivers/fc4/fc.c
drivers/fc4/fc.c
+12
-14
drivers/scsi/esp.c
drivers/scsi/esp.c
+46
-46
drivers/scsi/fcal.c
drivers/scsi/fcal.c
+4
-3
drivers/scsi/pluto.c
drivers/scsi/pluto.c
+9
-7
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.c
+17
-17
include/asm-sparc/delay.h
include/asm-sparc/delay.h
+1
-0
include/asm-sparc64/delay.h
include/asm-sparc64/delay.h
+14
-0
No files found.
arch/sparc/kernel/entry.S
View file @
00492e8c
...
...
@@ -1808,6 +1808,15 @@ C_LABEL(fpload):
retl
nop
.
globl
C_LABEL
(
ndelay
)
C_LABEL
(
ndelay
):
save
%
sp
,
-
REGWIN_SZ
,
%
sp
mov
%
i0
,
%
o0
call
.
umul
mov
5
,
%
o1
ba
delay_continue
nop
.
globl
C_LABEL
(
udelay
)
C_LABEL
(
udelay
):
save
%
sp
,
-
REGWIN_SZ
,
%
sp
...
...
@@ -1815,6 +1824,7 @@ C_LABEL(udelay):
sethi
%
hi
(
0x10c6
),
%
o1
call
.
umul
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
delay_continue
:
#ifndef CONFIG_SMP
sethi
%
hi
(
C_LABEL
(
loops_per_jiffy
)),
%
o3
call
.
umul
...
...
arch/sparc/kernel/sparc_ksyms.c
View file @
00492e8c
...
...
@@ -151,6 +151,7 @@ EXPORT_SYMBOL(__cpu_logical_map);
#endif
EXPORT_SYMBOL
(
udelay
);
EXPORT_SYMBOL
(
ndelay
);
EXPORT_SYMBOL
(
mostek_lock
);
EXPORT_SYMBOL
(
mstk48t02_regs
);
#if CONFIG_SUN_AUXIO
...
...
drivers/fc4/fc.c
View file @
00492e8c
...
...
@@ -74,7 +74,7 @@
#endif
#define FCP_CMND(SCpnt) ((fcp_cmnd *)&(SCpnt->SCp))
#define FC_SCMND(SCpnt) ((fc_channel *)(SCpnt->host->hostdata[0]))
#define FC_SCMND(SCpnt) ((fc_channel *)(SCpnt->
device->
host->hostdata[0]))
#define SC_FCMND(fcmnd) ((Scsi_Cmnd *)((long)fcmnd - (long)&(((Scsi_Cmnd *)0)->SCp)))
static
int
fcp_scsi_queue_it
(
fc_channel
*
,
Scsi_Cmnd
*
,
fcp_cmnd
*
,
int
);
...
...
@@ -449,7 +449,7 @@ static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hd
}
if
(
status_byte
(
rsp_status
)
==
QUEUE_FULL
)
{
printk
(
"%s: (%d,%d) Received rsp_status 0x%x
\n
"
,
fc
->
name
,
SCpnt
->
channel
,
SCpnt
->
target
,
rsp_status
);
printk
(
"%s: (%d,%d) Received rsp_status 0x%x
\n
"
,
fc
->
name
,
SCpnt
->
device
->
channel
,
SCpnt
->
device
->
id
,
rsp_status
);
}
SCpnt
->
result
=
(
host_status
<<
16
)
|
(
rsp_status
&
0xff
);
...
...
@@ -771,10 +771,10 @@ static void fcp_scsi_done (Scsi_Cmnd *SCpnt)
{
unsigned
long
flags
;
spin_lock_irqsave
(
SCpnt
->
host
->
host_lock
,
flags
);
spin_lock_irqsave
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
if
(
FCP_CMND
(
SCpnt
)
->
done
)
FCP_CMND
(
SCpnt
)
->
done
(
SCpnt
);
spin_unlock_irqrestore
(
SCpnt
->
host
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
}
static
int
fcp_scsi_queue_it
(
fc_channel
*
fc
,
Scsi_Cmnd
*
SCpnt
,
fcp_cmnd
*
fcmd
,
int
prepare
)
...
...
@@ -799,8 +799,8 @@ static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i
fc
->
cmd_slots
[
fcmd
->
token
]
=
fcmd
;
if
(
SCpnt
->
device
->
tagged_supported
)
{
if
(
jiffies
-
fc
->
ages
[
SCpnt
->
channel
*
fc
->
targets
+
SCpnt
->
target
]
>
(
5
*
60
*
HZ
))
{
fc
->
ages
[
SCpnt
->
channel
*
fc
->
targets
+
SCpnt
->
target
]
=
jiffies
;
if
(
jiffies
-
fc
->
ages
[
SCpnt
->
device
->
channel
*
fc
->
targets
+
SCpnt
->
device
->
id
]
>
(
5
*
60
*
HZ
))
{
fc
->
ages
[
SCpnt
->
device
->
channel
*
fc
->
targets
+
SCpnt
->
device
->
id
]
=
jiffies
;
fcp_cntl
=
FCP_CNTL_QTYPE_ORDERED
;
}
else
fcp_cntl
=
FCP_CNTL_QTYPE_SIMPLE
;
...
...
@@ -916,9 +916,9 @@ int fcp_scsi_abort(Scsi_Cmnd *SCpnt)
unsigned
long
flags
;
SCpnt
->
result
=
DID_ABORT
;
spin_lock_irqsave
(
SCpnt
->
host
->
host_lock
,
flags
);
spin_lock_irqsave
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
fcmd
->
done
(
SCpnt
);
spin_unlock_irqrestore
(
SCpnt
->
host
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
printk
(
"FC: soft abort
\n
"
);
return
SUCCESS
;
}
else
{
...
...
@@ -932,7 +932,7 @@ void fcp_scsi_reset_done(Scsi_Cmnd *SCpnt)
fc_channel
*
fc
=
FC_SCMND
(
SCpnt
);
fc
->
rst_pkt
->
eh_state
=
SCSI_STATE_FINISHED
;
up
(
fc
->
rst_pkt
->
host
->
eh_action
);
up
(
fc
->
rst_pkt
->
device
->
host
->
eh_action
);
}
#define FCP_RESET_TIMEOUT (2*HZ)
...
...
@@ -955,9 +955,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
cmd
=
fc
->
scsi_cmd_pool
+
0
;
FCD
((
"Preparing rst packet
\n
"
))
fc
->
encode_addr
(
SCpnt
,
cmd
->
fcp_addr
,
fc
,
fcmd
);
fc
->
rst_pkt
->
channel
=
SCpnt
->
channel
;
fc
->
rst_pkt
->
target
=
SCpnt
->
target
;
fc
->
rst_pkt
->
lun
=
0
;
fc
->
rst_pkt
->
device
=
SCpnt
->
device
;
fc
->
rst_pkt
->
cmd_len
=
0
;
fc
->
cmd_slots
[
0
]
=
fcmd
;
...
...
@@ -989,7 +987,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
* Set up the semaphore so we wait for the command to complete.
*/
fc
->
rst_pkt
->
host
->
eh_action
=
&
sem
;
fc
->
rst_pkt
->
device
->
host
->
eh_action
=
&
sem
;
fc
->
rst_pkt
->
request
->
rq_status
=
RQ_SCSI_BUSY
;
fc
->
rst_pkt
->
done
=
fcp_scsi_reset_done
;
...
...
@@ -997,7 +995,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
down
(
&
sem
);
fc
->
rst_pkt
->
host
->
eh_action
=
NULL
;
fc
->
rst_pkt
->
device
->
host
->
eh_action
=
NULL
;
del_timer
(
&
fc
->
rst_pkt
->
eh_timeout
);
/*
...
...
drivers/scsi/esp.c
View file @
00492e8c
This diff is collapsed.
Click to expand it.
drivers/scsi/fcal.c
View file @
00492e8c
...
...
@@ -292,11 +292,12 @@ static int fcal_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmn
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
/* FC-PLDA tells us... */
memset
(
addr
,
0
,
8
);
f
=
(
struct
fcal
*
)
SCpnt
->
host
->
hostdata
;
if
(
!
f
->
map
[
SCpnt
->
target
])
return
-
EINVAL
;
f
=
(
struct
fcal
*
)
SCpnt
->
device
->
host
->
hostdata
;
if
(
!
f
->
map
[
SCpnt
->
device
->
id
])
return
-
EINVAL
;
/* Now, determine DID: It will be Native Identifier, so we zero upper
2 bytes of the 3 byte DID, lowest byte will be AL-PA */
fcmd
->
did
=
target2alpa
[
SCpnt
->
target
];
fcmd
->
did
=
target2alpa
[
SCpnt
->
device
->
id
];
FCALD
((
"trying DID %06x
\n
"
,
fcmd
->
did
))
return
0
;
}
...
...
drivers/scsi/pluto.c
View file @
00492e8c
...
...
@@ -156,12 +156,12 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
pluto
->
fc
=
fc
;
SCpnt
->
host
=
host
;
SCpnt
->
cmnd
[
0
]
=
INQUIRY
;
SCpnt
->
cmnd
[
4
]
=
255
;
/* FC layer requires this, so that SCpnt->device->tagged_supported is initially 0 */
SCpnt
->
device
=
&
dev
;
dev
.
host
=
host
;
SCpnt
->
cmd_len
=
COMMAND_SIZE
(
INQUIRY
);
...
...
@@ -325,16 +325,18 @@ const char *pluto_info(struct Scsi_Host *host)
*/
static
int
pluto_encode_addr
(
Scsi_Cmnd
*
SCpnt
,
u16
*
addr
,
fc_channel
*
fc
,
fcp_cmnd
*
fcmd
)
{
PLND
((
"encode addr %d %d %d
\n
"
,
SCpnt
->
channel
,
SCpnt
->
target
,
SCpnt
->
cmnd
[
1
]
&
0xe0
))
PLND
((
"encode addr %d %d %d
\n
"
,
SCpnt
->
device
->
channel
,
SCpnt
->
device
->
id
,
SCpnt
->
cmnd
[
1
]
&
0xe0
))
/* We don't support LUNs - neither does SSA :) */
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
if
(
!
SCpnt
->
channel
)
{
if
(
SCpnt
->
target
)
return
-
EINVAL
;
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
if
(
!
SCpnt
->
device
->
channel
)
{
if
(
SCpnt
->
device
->
id
)
return
-
EINVAL
;
memset
(
addr
,
0
,
4
*
sizeof
(
u16
));
}
else
{
addr
[
0
]
=
1
;
addr
[
1
]
=
SCpnt
->
channel
-
1
;
addr
[
2
]
=
SCpnt
->
target
;
addr
[
1
]
=
SCpnt
->
device
->
channel
-
1
;
addr
[
2
]
=
SCpnt
->
device
->
id
;
addr
[
3
]
=
0
;
}
/* We're Point-to-Point, so target it to the default DID */
...
...
drivers/scsi/qlogicpti.c
View file @
00492e8c
...
...
@@ -1004,16 +1004,16 @@ static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
memset
(
cmd
,
0
,
sizeof
(
struct
Command_Entry
));
cmd
->
hdr
.
entry_cnt
=
1
;
cmd
->
hdr
.
entry_type
=
ENTRY_COMMAND
;
cmd
->
target_id
=
Cmnd
->
target
;
cmd
->
target_lun
=
Cmnd
->
lun
;
cmd
->
target_id
=
Cmnd
->
device
->
id
;
cmd
->
target_lun
=
Cmnd
->
device
->
lun
;
cmd
->
cdb_length
=
Cmnd
->
cmd_len
;
cmd
->
control_flags
=
0
;
if
(
Cmnd
->
device
->
tagged_supported
)
{
if
(
qpti
->
cmd_count
[
Cmnd
->
target
]
==
0
)
qpti
->
tag_ages
[
Cmnd
->
target
]
=
jiffies
;
if
((
jiffies
-
qpti
->
tag_ages
[
Cmnd
->
target
])
>
(
5
*
HZ
))
{
if
(
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
==
0
)
qpti
->
tag_ages
[
Cmnd
->
device
->
id
]
=
jiffies
;
if
((
jiffies
-
qpti
->
tag_ages
[
Cmnd
->
device
->
id
])
>
(
5
*
HZ
))
{
cmd
->
control_flags
=
CFLAG_ORDERED_TAG
;
qpti
->
tag_ages
[
Cmnd
->
target
]
=
jiffies
;
qpti
->
tag_ages
[
Cmnd
->
device
->
id
]
=
jiffies
;
}
else
cmd
->
control_flags
=
CFLAG_SIMPLE_TAG
;
}
...
...
@@ -1097,7 +1097,7 @@ static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
cmd
->
handle
=
in_ptr
;
qpti
->
cmd_slots
[
in_ptr
]
=
Cmnd
;
qpti
->
cmd_count
[
Cmnd
->
target
]
++
;
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
++
;
sbus_writew
(
in_ptr
,
qpti
->
qregs
+
MBOX4
);
qpti
->
req_in_ptr
=
in_ptr
;
...
...
@@ -1118,8 +1118,8 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
*/
static
void
ourdone
(
Scsi_Cmnd
*
Cmnd
)
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
int
tgt
=
Cmnd
->
target
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
int
tgt
=
Cmnd
->
device
->
id
;
void
(
*
done
)
(
Scsi_Cmnd
*
);
/* This grot added by DaveM, blame him for ugliness.
...
...
@@ -1170,7 +1170,7 @@ static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *));
static
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
unsigned
long
flags
;
/*
...
...
@@ -1229,7 +1229,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
* and can rock on..
*/
if
(
qpti
==
NULL
)
Cmnd
->
host
->
hostt
->
queuecommand
=
qlogicpti_queuecommand
;
Cmnd
->
device
->
host
->
hostt
->
queuecommand
=
qlogicpti_queuecommand
;
spin_unlock_irqrestore
(
&
qpti
->
lock
,
flags
);
...
...
@@ -1246,7 +1246,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
*/
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
Command_Entry
*
cmd
;
unsigned
long
flags
;
...
...
@@ -1431,7 +1431,7 @@ static Scsi_Cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
Cmnd
->
request_bufflen
,
scsi_to_sbus_dma_dir
(
Cmnd
->
sc_data_direction
));
}
qpti
->
cmd_count
[
Cmnd
->
target
]
--
;
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
--
;
sbus_writew
(
out_ptr
,
qpti
->
qregs
+
MBOX5
);
Cmnd
->
host_scribble
=
(
unsigned
char
*
)
done_queue
;
done_queue
=
Cmnd
;
...
...
@@ -1468,7 +1468,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
static
int
qlogicpti_abort
(
Scsi_Cmnd
*
Cmnd
)
{
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
...
...
@@ -1476,7 +1476,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
int
i
;
printk
(
KERN_WARNING
"qlogicpti : Aborting cmd for tgt[%d] lun[%d]
\n
"
,
(
int
)
Cmnd
->
target
,
(
int
)
Cmnd
->
lun
);
(
int
)
Cmnd
->
device
->
id
,
(
int
)
Cmnd
->
device
->
lun
);
spin_lock_irqsave
(
&
qpti
->
lock
,
flags
);
...
...
@@ -1491,7 +1491,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
cmd_cookie
=
i
;
param
[
0
]
=
MBOX_ABORT
;
param
[
1
]
=
(((
u_short
)
Cmnd
->
target
)
<<
8
)
|
Cmnd
->
lun
;
param
[
1
]
=
(((
u_short
)
Cmnd
->
device
->
id
)
<<
8
)
|
Cmnd
->
device
->
lun
;
param
[
2
]
=
cmd_cookie
>>
16
;
param
[
3
]
=
cmd_cookie
&
0xffff
;
if
(
qlogicpti_mbox_command
(
qpti
,
param
,
0
)
||
...
...
@@ -1510,7 +1510,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
static
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
{
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
...
...
include/asm-sparc/delay.h
View file @
00492e8c
...
...
@@ -21,5 +21,6 @@ extern __inline__ void __delay(unsigned long loops)
/* This is too messy with inline asm on the Sparc. */
extern
void
udelay
(
unsigned
long
usecs
);
extern
void
ndelay
(
unsigned
long
usecs
);
#endif
/* defined(__SPARC_DELAY_H) */
include/asm-sparc64/delay.h
View file @
00492e8c
...
...
@@ -45,6 +45,19 @@ static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
__delay
(
usecs
*
HZ
);
}
extern
__inline__
void
__ndelay
(
unsigned
long
usecs
,
unsigned
long
lps
)
{
usecs
*=
0x0000000000000005UL
;
/* 2**32 / 10000 */
__asm__
__volatile__
(
" mulx %1, %2, %0
\n
"
" srlx %0, 32, %0
\n
"
:
"=r"
(
usecs
)
:
"r"
(
usecs
),
"r"
(
lps
));
__delay
(
usecs
*
HZ
);
}
#ifdef CONFIG_SMP
#define __udelay_val cpu_data[smp_processor_id()].udelay_val
#else
...
...
@@ -52,6 +65,7 @@ static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val)
#define ndelay(usecs) __ndelay((usecs),__udelay_val)
#endif
/* !__ASSEMBLY__ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment