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
nexedi
linux
Commits
59265656
Commit
59265656
authored
Jan 13, 2003
by
Rusty Russell
Committed by
Linus Torvalds
Jan 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Janitoring drivers_acorn_scsi_fas216.c
From: Pablo Menichini <pablo@menichini.com.ar>
parent
bdf27737
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
222 additions
and
157 deletions
+222
-157
drivers/acorn/scsi/fas216.c
drivers/acorn/scsi/fas216.c
+222
-157
No files found.
drivers/acorn/scsi/fas216.c
View file @
59265656
/*
/*
* linux/
arch/arm/drivers
/scsi/fas216.c
* linux/
drivers/acorn
/scsi/fas216.c
*
*
* Copyright (C) 1997-2000 Russell King
* Copyright (C) 1997-2000 Russell King
*
*
...
@@ -308,11 +308,12 @@ static void print_debug_list(void)
...
@@ -308,11 +308,12 @@ static void print_debug_list(void)
static
void
fas216_done
(
FAS216_Info
*
info
,
unsigned
int
result
);
static
void
fas216_done
(
FAS216_Info
*
info
,
unsigned
int
result
);
/* Function: int fas216_clockrate(unsigned int clock)
/**
* Purpose : calculate correct value to be written into clock conversion
* fast216_clockrate - calculate clock conversion factor
* factor register.
* @clock: clock speed in MHz
* Params : clock - clock speed in MHz
*
* Returns : CLKF_ value
* Calculate correct value to be written into clock conversion factor
* register. Returns CLKF_ value.
*/
*/
static
int
fas216_clockrate
(
int
clock
)
static
int
fas216_clockrate
(
int
clock
)
{
{
...
@@ -326,10 +327,12 @@ static int fas216_clockrate(int clock)
...
@@ -326,10 +327,12 @@ static int fas216_clockrate(int clock)
return
clock
;
return
clock
;
}
}
/* Function: unsigned short fas216_get_last_msg(FAS216_Info *info, int pos)
/**
* Purpose : retrieve a last message from the list, using position in fifo
* fas216_get_last_msg - retrive last message from the list
* Params : info - interface to search
* @info: interface to search
* : pos - current fifo position
* @pos: current fifo position
*
* Retrieve a last message from the list, using position in fifo.
*/
*/
static
inline
unsigned
short
static
inline
unsigned
short
fas216_get_last_msg
(
FAS216_Info
*
info
,
int
pos
)
fas216_get_last_msg
(
FAS216_Info
*
info
,
int
pos
)
...
@@ -356,12 +359,13 @@ fas216_get_last_msg(FAS216_Info *info, int pos)
...
@@ -356,12 +359,13 @@ fas216_get_last_msg(FAS216_Info *info, int pos)
return
packed_msg
;
return
packed_msg
;
}
}
/* Function: int fas216_syncperiod(FAS216_Info *info, int ns)
/**
* Purpose : Calculate value to be loaded into the STP register
* fas216_syncperiod - calculate STP register value
* for a given period in ns
* @info: state structure for interface connected to device
* Params : info - state structure for interface connected to device
* @ns: period in ns (between subsequent bytes)
* : ns - period in ns (between subsequent bytes)
*
* Returns : Value suitable for REG_STP
* Calculate value to be loaded into the STP register for a given period
* in ns. Returns a value suitable for REG_STP.
*/
*/
static
int
fas216_syncperiod
(
FAS216_Info
*
info
,
int
ns
)
static
int
fas216_syncperiod
(
FAS216_Info
*
info
,
int
ns
)
{
{
...
@@ -377,10 +381,12 @@ static int fas216_syncperiod(FAS216_Info *info, int ns)
...
@@ -377,10 +381,12 @@ static int fas216_syncperiod(FAS216_Info *info, int ns)
return
value
&
31
;
return
value
&
31
;
}
}
/* Function: void fas216_set_sync(FAS216_Info *info, int target)
/**
* Purpose : Correctly setup FAS216 chip for specified transfer period.
* fas216_set_sync - setup FAS216 chip for specified transfer period.
* Params : info - state structure for interface
* @info: state structure for interface connected to device
* : target - target
* @target: target
*
* Correctly setup FAS216 chip for specified transfer period.
* Notes : we need to switch the chip out of FASTSCSI mode if we have
* Notes : we need to switch the chip out of FASTSCSI mode if we have
* a transfer period >= 200ns - otherwise the chip will violate
* a transfer period >= 200ns - otherwise the chip will violate
* the SCSI timings.
* the SCSI timings.
...
@@ -419,10 +425,12 @@ static void fas216_set_sync(FAS216_Info *info, int target)
...
@@ -419,10 +425,12 @@ static void fas216_set_sync(FAS216_Info *info, int target)
* we have synchronous transfers disabled for this device.
* we have synchronous transfers disabled for this device.
*/
*/
/* Function: void fas216_handlesync(FAS216_Info *info, char *msg)
/**
* Purpose : Handle a synchronous transfer message from the target
* fas216_handlesync - Handle a synchronous transfer message
* Params : info - state structure for interface
* @info: state structure for interface
* : msg - message from target
* @ms: message from target
*
* Handle a synchronous transfer message from the target
*/
*/
static
void
fas216_handlesync
(
FAS216_Info
*
info
,
char
*
msg
)
static
void
fas216_handlesync
(
FAS216_Info
*
info
,
char
*
msg
)
{
{
...
@@ -530,10 +538,12 @@ static void fas216_handlesync(FAS216_Info *info, char *msg)
...
@@ -530,10 +538,12 @@ static void fas216_handlesync(FAS216_Info *info, char *msg)
}
}
}
}
/* Function: void fas216_handlewide(FAS216_Info *info, char *msg)
/**
* Purpose : Handle a wide transfer message from the target
* fas216_handlewide - Handle a wide transfer message
* Params : info - state structure for interface
* @info: state structure for interface
* : msg - message from target
* @msg: message from target
*
* Handle a wide transfer message from the target
*/
*/
static
void
fas216_handlewide
(
FAS216_Info
*
info
,
char
*
msg
)
static
void
fas216_handlewide
(
FAS216_Info
*
info
,
char
*
msg
)
{
{
...
@@ -627,10 +637,12 @@ static void fas216_handlewide(FAS216_Info *info, char *msg)
...
@@ -627,10 +637,12 @@ static void fas216_handlewide(FAS216_Info *info, char *msg)
}
}
}
}
/* Function: void fas216_updateptrs(FAS216_Info *info, int bytes_transferred)
/**
* Purpose : update data pointers after transfer suspended/paused
* fas216_updateptrs - update data pointers after transfer suspended/paused
* Params : info - interface's local pointer to update
* @info: interface's local pointer to update
* bytes_transferred - number of bytes transferred
* @bytes_transferred: number of bytes transferred
*
* Update data pointers after transfer suspended/paused
*/
*/
static
void
fas216_updateptrs
(
FAS216_Info
*
info
,
int
bytes_transferred
)
static
void
fas216_updateptrs
(
FAS216_Info
*
info
,
int
bytes_transferred
)
{
{
...
@@ -664,11 +676,13 @@ static void fas216_updateptrs(FAS216_Info *info, int bytes_transferred)
...
@@ -664,11 +676,13 @@ static void fas216_updateptrs(FAS216_Info *info, int bytes_transferred)
SCp
->
ptr
=
NULL
;
SCp
->
ptr
=
NULL
;
}
}
/* Function: void fas216_pio(FAS216_Info *info, fasdmadir_t direction)
/**
* Purpose : transfer data off of/on to card using programmed IO
* fas216_pio - transfer data off of/on to card using programmed IO
* Params : info - interface to transfer data to/from
* @info: interface to transfer data to/from
* direction - direction to transfer data (DMA_OUT/DMA_IN)
* @direction: direction to transfer data (DMA_OUT/DMA_IN)
* Notes : this is incredibly slow
*
* Transfer data off of/on to card using programmed IO.
* Notes: this is incredibly slow.
*/
*/
static
void
fas216_pio
(
FAS216_Info
*
info
,
fasdmadir_t
direction
)
static
void
fas216_pio
(
FAS216_Info
*
info
,
fasdmadir_t
direction
)
{
{
...
@@ -730,11 +744,12 @@ static void fas216_cleanuptransfer(FAS216_Info *info)
...
@@ -730,11 +744,12 @@ static void fas216_cleanuptransfer(FAS216_Info *info)
info
->
dma
.
transfer_type
=
fasdma_none
;
info
->
dma
.
transfer_type
=
fasdma_none
;
}
}
/* Function: void fas216_starttransfer(FAS216_Info *info,
/**
* fasdmadir_t direction)
* fas216_starttransfer - Start a DMA/PIO transfer off of/on to card
* Purpose : Start a DMA/PIO transfer off of/on to card
* @info: interface from which device disconnected from
* Params : info - interface from which device disconnected from
* @direction: transfer direction (DMA_OUT/DMA_IN)
* direction - transfer direction (DMA_OUT/DMA_IN)
*
* Start a DMA/PIO transfer off of/on to card
*/
*/
static
void
fas216_starttransfer
(
FAS216_Info
*
info
,
fasdmadir_t
direction
)
static
void
fas216_starttransfer
(
FAS216_Info
*
info
,
fasdmadir_t
direction
)
{
{
...
@@ -824,9 +839,11 @@ static void fas216_starttransfer(FAS216_Info *info, fasdmadir_t direction)
...
@@ -824,9 +839,11 @@ static void fas216_starttransfer(FAS216_Info *info, fasdmadir_t direction)
}
}
}
}
/* Function: void fas216_stoptransfer(FAS216_Info *info)
/**
* Purpose : Stop a DMA transfer onto / off of the card
* fas216_stoptransfer - Stop a DMA transfer onto / off of the card
* Params : info - interface from which device disconnected from
* @info: interface from which device disconnected from
*
* Stop a DMA transfer onto / off of the card
*/
*/
static
void
fas216_stoptransfer
(
FAS216_Info
*
info
)
static
void
fas216_stoptransfer
(
FAS216_Info
*
info
)
{
{
...
@@ -856,9 +873,11 @@ static void fas216_aborttransfer(FAS216_Info *info)
...
@@ -856,9 +873,11 @@ static void fas216_aborttransfer(FAS216_Info *info)
fas216_cmd
(
info
,
CMD_FLUSHFIFO
);
fas216_cmd
(
info
,
CMD_FLUSHFIFO
);
}
}
/* Function: void fas216_disconnected_intr(FAS216_Info *info)
/**
* Purpose : handle device disconnection
* fas216_disconnected_intr - handle device disconnection
* Params : info - interface from which device disconnected from
* @info: interface from which device disconnected from
*
* Handle device disconnection
*/
*/
static
void
fas216_disconnect_intr
(
FAS216_Info
*
info
)
static
void
fas216_disconnect_intr
(
FAS216_Info
*
info
)
{
{
...
@@ -905,9 +924,11 @@ static void fas216_disconnect_intr(FAS216_Info *info)
...
@@ -905,9 +924,11 @@ static void fas216_disconnect_intr(FAS216_Info *info)
}
}
}
}
/* Function: void fas216_reselected_intr(FAS216_Info *info)
/**
* Purpose : Start reconnection of a device
* fas216_reselected_intr - start reconnection of a device
* Params : info - interface which was reselected
* @info: interface which was reselected
*
* Start reconnection of a device
*/
*/
static
void
static
void
fas216_reselected_intr
(
FAS216_Info
*
info
)
fas216_reselected_intr
(
FAS216_Info
*
info
)
...
@@ -1018,9 +1039,11 @@ fas216_reselected_intr(FAS216_Info *info)
...
@@ -1018,9 +1039,11 @@ fas216_reselected_intr(FAS216_Info *info)
fas216_cmd
(
info
,
CMD_MSGACCEPTED
);
fas216_cmd
(
info
,
CMD_MSGACCEPTED
);
}
}
/* Function: void fas216_finish_reconnect(FAS216_Info *info)
/**
* Purpose : finish reconnection sequence for device
* fas216_finish_reconnect - finish reconnection sequence for device
* Params : info - interface which caused function done interrupt
* @info: interface which caused function done interrupt
*
* Finish reconnection sequence for device
*/
*/
static
void
static
void
fas216_finish_reconnect
(
FAS216_Info
*
info
)
fas216_finish_reconnect
(
FAS216_Info
*
info
)
...
@@ -1258,9 +1281,11 @@ static int fas216_get_msg_byte(FAS216_Info *info)
...
@@ -1258,9 +1281,11 @@ static int fas216_get_msg_byte(FAS216_Info *info)
return
-
3
;
return
-
3
;
}
}
/* Function: void fas216_message(FAS216_Info *info)
/**
* Purpose : handle a function done interrupt from FAS216 chip
* fas216_message - handle a function done interrupt from FAS216 chip
* Params : info - interface which caused function done interrupt
* @info: interface which caused function done interrupt
*
* Handle a function done interrupt from FAS216 chip
*/
*/
static
void
fas216_message
(
FAS216_Info
*
info
)
static
void
fas216_message
(
FAS216_Info
*
info
)
{
{
...
@@ -1326,9 +1351,11 @@ static void fas216_message(FAS216_Info *info)
...
@@ -1326,9 +1351,11 @@ static void fas216_message(FAS216_Info *info)
return
;
return
;
}
}
/* Function: void fas216_send_command(FAS216_Info *info)
/**
* Purpose : send a command to a target after all message bytes have been sent
* fas216_send_command - send command after all message bytes have been sent
* Params : info - interface which caused bus service
* @info: interface which caused bus service
*
* Send a command to a target after all message bytes have been sent
*/
*/
static
void
fas216_send_command
(
FAS216_Info
*
info
)
static
void
fas216_send_command
(
FAS216_Info
*
info
)
{
{
...
@@ -1348,10 +1375,12 @@ static void fas216_send_command(FAS216_Info *info)
...
@@ -1348,10 +1375,12 @@ static void fas216_send_command(FAS216_Info *info)
info
->
scsi
.
phase
=
PHASE_COMMAND
;
info
->
scsi
.
phase
=
PHASE_COMMAND
;
}
}
/* Function: void fas216_send_messageout(FAS216_Info *info, int start)
/**
* Purpose : handle bus service to send a message
* fas216_send_messageout - handle bus service to send a message
* Params : info - interface which caused bus service
* @info: interface which caused bus service
* Note : We do not allow the device to change the data direction!
*
* Handle bus service to send a message.
* Note: We do not allow the device to change the data direction!
*/
*/
static
void
fas216_send_messageout
(
FAS216_Info
*
info
,
int
start
)
static
void
fas216_send_messageout
(
FAS216_Info
*
info
,
int
start
)
{
{
...
@@ -1382,11 +1411,13 @@ static void fas216_send_messageout(FAS216_Info *info, int start)
...
@@ -1382,11 +1411,13 @@ static void fas216_send_messageout(FAS216_Info *info, int start)
info
->
scsi
.
phase
=
PHASE_MSGOUT
;
info
->
scsi
.
phase
=
PHASE_MSGOUT
;
}
}
/* Function: void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigned int ssr)
/**
* Purpose : handle a bus service interrupt from FAS216 chip
* fas216_busservice_intr - handle bus service interrupt from FAS216 chip
* Params : info - interface which caused bus service interrupt
* @info: interface which caused bus service interrupt
* stat - Status register contents
* @stat: Status register contents
* ssr - SCSI Status register contents
* @ssr: SCSI Status register contents
*
* Handle a bus service interrupt from FAS216 chip
*/
*/
static
void
fas216_busservice_intr
(
FAS216_Info
*
info
,
unsigned
int
stat
,
unsigned
int
ssr
)
static
void
fas216_busservice_intr
(
FAS216_Info
*
info
,
unsigned
int
stat
,
unsigned
int
ssr
)
{
{
...
@@ -1589,11 +1620,13 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
...
@@ -1589,11 +1620,13 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
fas216_done
(
info
,
DID_ERROR
);
fas216_done
(
info
,
DID_ERROR
);
}
}
/* Function: void fas216_funcdone_intr(FAS216_Info *info, unsigned int stat, unsigned int ssr)
/**
* Purpose : handle a function done interrupt from FAS216 chip
* fas216_funcdone_intr - handle a function done interrupt from FAS216 chip
* Params : info - interface which caused function done interrupt
* @info: interface which caused function done interrupt
* stat - Status register contents
* @stat: Status register contents
* ssr - SCSI Status register contents
* @ssr: SCSI Status register contents
*
* Handle a function done interrupt from FAS216 chip
*/
*/
static
void
fas216_funcdone_intr
(
FAS216_Info
*
info
,
unsigned
int
stat
,
unsigned
int
ssr
)
static
void
fas216_funcdone_intr
(
FAS216_Info
*
info
,
unsigned
int
stat
,
unsigned
int
ssr
)
{
{
...
@@ -1681,9 +1714,11 @@ static void fas216_bus_reset(FAS216_Info *info)
...
@@ -1681,9 +1714,11 @@ static void fas216_bus_reset(FAS216_Info *info)
wake_up
(
&
info
->
eh_wait
);
wake_up
(
&
info
->
eh_wait
);
}
}
/* Function: void fas216_intr(struct Scsi_Host *instance)
/**
* Purpose : handle interrupts from the interface to progress a command
* fas216_intr - handle interrupts to progress a command
* Params : instance - interface to service
* @instance: interface to service
*
* Handle interrupts from the interface to progress a command
*/
*/
void
fas216_intr
(
struct
Scsi_Host
*
instance
)
void
fas216_intr
(
struct
Scsi_Host
*
instance
)
{
{
...
@@ -1954,10 +1989,12 @@ static void fas216_do_bus_device_reset(FAS216_Info *info, Scsi_Cmnd *SCpnt)
...
@@ -1954,10 +1989,12 @@ static void fas216_do_bus_device_reset(FAS216_Info *info, Scsi_Cmnd *SCpnt)
fas216_cmd
(
info
,
CMD_SELECTATNSTOP
);
fas216_cmd
(
info
,
CMD_SELECTATNSTOP
);
}
}
/* Function: void fas216_kick(FAS216_Info *info)
/**
* Purpose : kick a command to the interface - interface should be idle
* fas216_kick - kick a command to the interface
* Params : info - our host interface to kick
* @info: our host interface to kick
* Notes : Interrupts are always disabled!
*
* kick a command to the interface, interface should be idle.
* Notes: Interrupts are always disabled!
*/
*/
static
void
fas216_kick
(
FAS216_Info
*
info
)
static
void
fas216_kick
(
FAS216_Info
*
info
)
{
{
...
@@ -2052,11 +2089,13 @@ fas216_devicereset_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result
...
@@ -2052,11 +2089,13 @@ fas216_devicereset_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result
wake_up
(
&
info
->
eh_wait
);
wake_up
(
&
info
->
eh_wait
);
}
}
/* Function: void fas216_rq_sns_done(info, SCpnt, result)
/**
* Purpose : Finish processing automatic request sense command
* fas216_rq_sns_done - Finish processing automatic request sense command
* Params : info - interface that completed
* @info: interface that completed
* SCpnt - command that completed
* @SCpnt: command that completed
* result - driver byte of result
* @result: driver byte of result
*
* Finish processing automatic request sense command
*/
*/
static
void
static
void
fas216_rq_sns_done
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
,
unsigned
int
result
)
fas216_rq_sns_done
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
,
unsigned
int
result
)
...
@@ -2083,11 +2122,13 @@ fas216_rq_sns_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result)
...
@@ -2083,11 +2122,13 @@ fas216_rq_sns_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result)
SCpnt
->
scsi_done
(
SCpnt
);
SCpnt
->
scsi_done
(
SCpnt
);
}
}
/* Function: void fas216_std_done(info, SCpnt, result)
/**
* Purpose : Finish processing of standard command
* fas216_std_done - finish processing of standard command
* Params : info - interface that completed
* @info: interface that completed
* SCpnt - command that completed
* @SCpnt: command that completed
* result - driver byte of result
* @result: driver byte of result
*
* Finish processing of standard command
*/
*/
static
void
static
void
fas216_std_done
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
,
unsigned
int
result
)
fas216_std_done
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
,
unsigned
int
result
)
...
@@ -2188,10 +2229,12 @@ fas216_std_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result)
...
@@ -2188,10 +2229,12 @@ fas216_std_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result)
info
->
reqSCpnt
=
SCpnt
;
info
->
reqSCpnt
=
SCpnt
;
}
}
/* Function: void fas216_done(FAS216_Info *info, unsigned int result)
/**
* Purpose : complete processing for current command
* fas216_done - complete processing for current command
* Params : info - interface that completed
* @info: interface that completed
* result - driver byte of result
* @result: driver byte of result
*
* Complete processing for current command
*/
*/
static
void
fas216_done
(
FAS216_Info
*
info
,
unsigned
int
result
)
static
void
fas216_done
(
FAS216_Info
*
info
,
unsigned
int
result
)
{
{
...
@@ -2251,12 +2294,14 @@ static void fas216_done(FAS216_Info *info, unsigned int result)
...
@@ -2251,12 +2294,14 @@ static void fas216_done(FAS216_Info *info, unsigned int result)
info
->
host
->
host_no
);
info
->
host
->
host_no
);
}
}
/* Function: int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
/**
* Purpose : queue a command for adapter to process.
* fas216_queue_command - queue a command for adapter to process.
* Params : SCpnt - Command to queue
* @SCpnt: Command to queue
* done - done function to call once command is complete
* @done: done function to call once command is complete
* Returns : 0 - success, else error
*
* Notes : io_request_lock is held, interrupts are disabled.
* Queue a command for adapter to process.
* Returns: 0 in success, else error.
* Notes: io_request_lock is held, interrupts are disabled.
*/
*/
int
fas216_queue_command
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
int
fas216_queue_command
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
...
@@ -2304,9 +2349,11 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
...
@@ -2304,9 +2349,11 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
return
result
;
return
result
;
}
}
/* Function: void fas216_internal_done(Scsi_Cmnd *SCpnt)
/**
* Purpose : trigger restart of a waiting thread in fas216_command
* fas216_internal_done - trigger restart of a waiting thread in fas216_command
* Params : SCpnt - Command to wake
* @SCpnt: Command to wake
*
* Trigger restart of a waiting thread in fas216_command
*/
*/
static
void
fas216_internal_done
(
Scsi_Cmnd
*
SCpnt
)
static
void
fas216_internal_done
(
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2317,11 +2364,13 @@ static void fas216_internal_done(Scsi_Cmnd *SCpnt)
...
@@ -2317,11 +2364,13 @@ static void fas216_internal_done(Scsi_Cmnd *SCpnt)
info
->
internal_done
=
1
;
info
->
internal_done
=
1
;
}
}
/* Function: int fas216_command(Scsi_Cmnd *SCpnt)
/**
* Purpose : queue a command for adapter to process.
* fas216_command - queue a command for adapter to process.
* Params : SCpnt - Command to queue
* @SCpnt: Command to queue
* Returns : scsi result code
*
* Notes : io_request_lock is held, interrupts are disabled.
* Qqueue a command for adapter to process.
* Returns: scsi result code.
* Notes: io_request_lock is held, interrupts are disabled.
*/
*/
int
fas216_command
(
Scsi_Cmnd
*
SCpnt
)
int
fas216_command
(
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2394,11 +2443,12 @@ enum res_find {
...
@@ -2394,11 +2443,12 @@ enum res_find {
res_hw_abort
/* command on disconnected dev */
res_hw_abort
/* command on disconnected dev */
};
};
/*
/**
* Prototype: enum res_find fas216_do_abort(FAS216_Info *info, Scsi_Cmnd *SCpnt)
* fas216_do_abort - decide how to abort a command
* Purpose : decide how to abort a command
* @SCpnt: command to abort
* Params : SCpnt - command to abort
*
* Returns : abort status
* Decide how to abort a command.
* Returns: abort status
*/
*/
static
enum
res_find
fas216_find_command
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
)
static
enum
res_find
fas216_find_command
(
FAS216_Info
*
info
,
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2459,11 +2509,13 @@ static enum res_find fas216_find_command(FAS216_Info *info, Scsi_Cmnd *SCpnt)
...
@@ -2459,11 +2509,13 @@ static enum res_find fas216_find_command(FAS216_Info *info, Scsi_Cmnd *SCpnt)
return
res
;
return
res
;
}
}
/* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt)
/**
* Purpose : abort this command
* fas216_eh_abort - abort this command
* Params : SCpnt - command to abort
* @SCpnt: command to abort
* Returns : FAILED if unable to abort
*
* Notes : io_request_lock is taken, and irqs are disabled
* Abort this command.
* Returns: FAILED if unable to abort
* Notes: io_request_lock is taken, and irqs are disabled
*/
*/
int
fas216_eh_abort
(
Scsi_Cmnd
*
SCpnt
)
int
fas216_eh_abort
(
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2513,11 +2565,13 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt)
...
@@ -2513,11 +2565,13 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt)
return
result
;
return
result
;
}
}
/* Function: int fas216_eh_device_reset(Scsi_Cmnd *SCpnt)
/**
* Purpose : Reset the device associated with this command
* fas216_eh_device_reset - Reset the device associated with this command
* Params : SCpnt - command specifing device to reset
* @SCpnt: command specifing device to reset
* Returns : FAILED if unable to reset
*
* Notes : We won't be re-entered, so we'll only have one device
* Reset the device associated with this command.
* Returns: FAILED if unable to reset.
* Notes: We won't be re-entered, so we'll only have one device
* reset on the go at one time.
* reset on the go at one time.
*/
*/
int
fas216_eh_device_reset
(
Scsi_Cmnd
*
SCpnt
)
int
fas216_eh_device_reset
(
Scsi_Cmnd
*
SCpnt
)
...
@@ -2593,11 +2647,13 @@ int fas216_eh_device_reset(Scsi_Cmnd *SCpnt)
...
@@ -2593,11 +2647,13 @@ int fas216_eh_device_reset(Scsi_Cmnd *SCpnt)
return
res
;
return
res
;
}
}
/* Function: int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt)
/**
* Purpose : Reset the bus associated with the command
* fas216_eh_bus_reset - Reset the bus associated with the command
* Params : SCpnt - command specifing bus to reset
* @SCpnt: command specifing bus to reset
* Returns : FAILED if unable to reset
*
* Notes : Further commands are blocked.
* Reset the bus associated with the command.
* Returns: FAILED if unable to reset.
* Notes: Further commands are blocked.
*/
*/
int
fas216_eh_bus_reset
(
Scsi_Cmnd
*
SCpnt
)
int
fas216_eh_bus_reset
(
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2670,9 +2726,11 @@ int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt)
...
@@ -2670,9 +2726,11 @@ int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt)
return
info
->
rst_bus_status
==
1
?
SUCCESS
:
FAILED
;
return
info
->
rst_bus_status
==
1
?
SUCCESS
:
FAILED
;
}
}
/* Function: void fas216_init_chip(FAS216_Info *info)
/**
* Purpose : Initialise FAS216 state after reset
* fas216_init_chip - Initialise FAS216 state after reset
* Params : info - state structure for interface
* @info: state structure for interface
*
* Initialise FAS216 state after reset
*/
*/
static
void
fas216_init_chip
(
FAS216_Info
*
info
)
static
void
fas216_init_chip
(
FAS216_Info
*
info
)
{
{
...
@@ -2686,11 +2744,13 @@ static void fas216_init_chip(FAS216_Info *info)
...
@@ -2686,11 +2744,13 @@ static void fas216_init_chip(FAS216_Info *info)
outb
(
info
->
scsi
.
cfg
[
0
],
REG_CNTL1
(
info
));
outb
(
info
->
scsi
.
cfg
[
0
],
REG_CNTL1
(
info
));
}
}
/* Function: int fas216_eh_host_reset(Scsi_Cmnd *SCpnt)
/**
* Purpose : Reset the host associated with this command
* fas216_eh_host_reset - Reset the host associated with this command
* Params : SCpnt - command specifing host to reset
* @SCpnt: command specifing host to reset
* Returns : FAILED if unable to reset
*
* Notes : io_request_lock is taken, and irqs are disabled
* Reset the host associated with this command.
* Returns: FAILED if unable to reset.
* Notes: io_request_lock is taken, and irqs are disabled
*/
*/
int
fas216_eh_host_reset
(
Scsi_Cmnd
*
SCpnt
)
int
fas216_eh_host_reset
(
Scsi_Cmnd
*
SCpnt
)
{
{
...
@@ -2826,9 +2886,11 @@ static int fas216_detect_type(FAS216_Info *info)
...
@@ -2826,9 +2886,11 @@ static int fas216_detect_type(FAS216_Info *info)
return
TYPE_NCR53C9x
;
return
TYPE_NCR53C9x
;
}
}
/* Function: void fas216_reset_state(FAS216_Info *info)
/**
* Purpose : Initialise driver internal state
* fas216_reset_state - Initialise driver internal state
* Params : info - state to initialise
* @info: state to initialise
*
* Initialise driver internal state
*/
*/
static
void
fas216_reset_state
(
FAS216_Info
*
info
)
static
void
fas216_reset_state
(
FAS216_Info
*
info
)
{
{
...
@@ -2864,10 +2926,12 @@ static void fas216_reset_state(FAS216_Info *info)
...
@@ -2864,10 +2926,12 @@ static void fas216_reset_state(FAS216_Info *info)
info
->
origSCpnt
=
NULL
;
info
->
origSCpnt
=
NULL
;
}
}
/* Function: int fas216_init(struct Scsi_Host *instance)
/**
* Purpose : initialise FAS/NCR/AMD SCSI ic.
* fas216_init - initialise FAS/NCR/AMD SCSI ic.
* Params : instance - a driver-specific filled-out structure
* @instance: a driver-specific filled-out structure
* Returns : 0 on success
*
* Initialise FAS/NCR/AMD SCSI ic.
* Returns: 0 on success
*/
*/
int
fas216_init
(
struct
Scsi_Host
*
instance
)
int
fas216_init
(
struct
Scsi_Host
*
instance
)
{
{
...
@@ -2937,11 +3001,12 @@ int fas216_init(struct Scsi_Host *instance)
...
@@ -2937,11 +3001,12 @@ int fas216_init(struct Scsi_Host *instance)
return
0
;
return
0
;
}
}
/* Function: int fas216_release(struct Scsi_Host *instance)
/**
* Purpose : release all resources and put everything to bed for
* fas216_release - release all resources for FAS/NCR/AMD SCSI ic.
* FAS/NCR/AMD SCSI ic.
* @instance: a driver-specific filled-out structure
* Params : instance - a driver-specific filled-out structure
*
* Returns : 0 on success
* release all resources and put everything to bed for FAS/NCR/AMD SCSI ic,
* Returns: 0 on success.
*/
*/
int
fas216_release
(
struct
Scsi_Host
*
instance
)
int
fas216_release
(
struct
Scsi_Host
*
instance
)
{
{
...
@@ -2956,13 +3021,13 @@ int fas216_release(struct Scsi_Host *instance)
...
@@ -2956,13 +3021,13 @@ int fas216_release(struct Scsi_Host *instance)
return
0
;
return
0
;
}
}
/*
/*
*
*
Function: int fas216_info(FAS216_Info *info, char *buffer)
*
fas216_info - generate a string containing information about host.
*
Purpose : generate a string containing information about this
*
@info: FAS216 host information
*
host.
*
@buffer: string buffer to build string
*
Params : info - FAS216 host information
*
*
buffer - string buffer to build string
*
Generate a string containing information about this host.
* Returns
: size of built string
* Returns: size of built string
*/
*/
int
fas216_info
(
FAS216_Info
*
info
,
char
*
buffer
)
int
fas216_info
(
FAS216_Info
*
info
,
char
*
buffer
)
{
{
...
...
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