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
53affa1a
Commit
53affa1a
authored
Oct 12, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] mpt fusion update from vendor
parent
75a97cd1
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
274 additions
and
107 deletions
+274
-107
drivers/message/fusion/Config.help
drivers/message/fusion/Config.help
+10
-0
drivers/message/fusion/Config.in
drivers/message/fusion/Config.in
+1
-0
drivers/message/fusion/linux_compat.h
drivers/message/fusion/linux_compat.h
+20
-9
drivers/message/fusion/lsi/mpi.h
drivers/message/fusion/lsi/mpi.h
+3
-2
drivers/message/fusion/lsi/mpi_cnfg.h
drivers/message/fusion/lsi/mpi_cnfg.h
+3
-1
drivers/message/fusion/lsi/mpi_targ.h
drivers/message/fusion/lsi/mpi_targ.h
+6
-1
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptbase.c
+21
-1
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptbase.h
+10
-4
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptctl.c
+5
-5
drivers/message/fusion/mptctl.h
drivers/message/fusion/mptctl.h
+5
-5
drivers/message/fusion/mptlan.c
drivers/message/fusion/mptlan.c
+16
-3
drivers/message/fusion/mptlan.h
drivers/message/fusion/mptlan.h
+4
-0
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.c
+137
-73
drivers/message/fusion/mptscsih.h
drivers/message/fusion/mptscsih.h
+33
-3
No files found.
drivers/message/fusion/Config.help
View file @
53affa1a
...
@@ -42,6 +42,16 @@ CONFIG_FUSION
...
@@ -42,6 +42,16 @@ CONFIG_FUSION
architecture is based on LSI Logic's Message Passing Interface (MPI)
architecture is based on LSI Logic's Message Passing Interface (MPI)
specification.
specification.
Maximum number of scatter gather entries
CONFIG_FUSION_MAX_SGE
This option allows you to specify the maximum number of scatter-
gather entries per I/O. The driver defaults to 40, a reasonable number
for most systems. However, the user may increase this up to 128.
Increasing this parameter will require significantly more memory
on a per controller instance. Increasing the parameter is not
necessary (or recommended) unless the user will be running
large I/O's via the raw interface.
CONFIG_FUSION_ISENSE
CONFIG_FUSION_ISENSE
The isense module (roughly stands for Interpret SENSE data) is
The isense module (roughly stands for Interpret SENSE data) is
completely optional. It simply provides extra English readable
completely optional. It simply provides extra English readable
...
...
drivers/message/fusion/Config.in
View file @
53affa1a
...
@@ -10,6 +10,7 @@ if [ "$CONFIG_FUSION" = "y" -o "$CONFIG_FUSION" = "m" ]; then
...
@@ -10,6 +10,7 @@ if [ "$CONFIG_FUSION" = "y" -o "$CONFIG_FUSION" = "m" ]; then
else
else
define_bool CONFIG_FUSION_BOOT n
define_bool CONFIG_FUSION_BOOT n
fi
fi
int " Maximum number of scatter gather entries" CONFIG_FUSION_MAX_SGE 40
if [ "$CONFIG_MODULES" = "y" ]; then
if [ "$CONFIG_MODULES" = "y" ]; then
# How can we force these options to module or nothing?
# How can we force these options to module or nothing?
...
...
drivers/message/fusion/linux_compat.h
View file @
53affa1a
...
@@ -253,25 +253,36 @@ static __inline__ int __get_order(unsigned long size)
...
@@ -253,25 +253,36 @@ static __inline__ int __get_order(unsigned long size)
#endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#define mptscsih_save_flags(flags) \
#define mptscsih_lock(iocp, flags) \
({ local_irq_save(flags); \
spin_lock_irqsave(&iocp->FreeQlock, flags)
})
#else
#else
#define mptscsih_
save_flags(
flags) \
#define mptscsih_
lock(iocp,
flags) \
({ save_flags(flags); \
({ save_flags(flags); \
cli(); \
cli(); \
})
})
#endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#define mptscsih_restore_flags(flags) \
#define mptscsih_unlock(iocp, flags) \
({ local_irq_enable(); \
spin_unlock_irqrestore(&iocp->FreeQlock, flags)
local_irq_restore(flags); \
#else
})
#define mptscsih_unlock(iocp, flags) restore_flags(flags);
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
#define mpt_work_struct work_struct
#define MPT_INIT_WORK(_task, _func, _data) INIT_WORK(_task, _func, _data)
#else
#else
#define mptscsih_restore_flags(flags) restore_flags(flags);
#define mpt_work_struct tq_struct
#define MPT_INIT_WORK(_task, _func, _data) \
({ (_task)->sync = 0; \
(_task)->routine = (_func); \
(_task)->data = (void *) (_data); \
})
#endif
#endif
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif
/* _LINUX_COMPAT_H */
#endif
/* _LINUX_COMPAT_H */
drivers/message/fusion/lsi/mpi.h
View file @
53affa1a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Title: MPI Message independent structures and definitions
* Title: MPI Message independent structures and definitions
* Creation Date: July 27, 2000
* Creation Date: July 27, 2000
*
*
* MPI.H Version: 01.02.0
6
* MPI.H Version: 01.02.0
7
*
*
* Version History
* Version History
* ---------------
* ---------------
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
* 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
* 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
* 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
* 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
* 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
* 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
* 09-16-02 01.02.07 Bumped value for MPI_HEADER_VERSION_UNIT.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
*/
*/
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
/* Note: The major versions of 0xe0 through 0xff are reserved */
/* Note: The major versions of 0xe0 through 0xff are reserved */
/* versioning for this MPI header set */
/* versioning for this MPI header set */
#define MPI_HEADER_VERSION_UNIT (0x0
7
)
#define MPI_HEADER_VERSION_UNIT (0x0
9
)
#define MPI_HEADER_VERSION_DEV (0x00)
#define MPI_HEADER_VERSION_DEV (0x00)
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
...
...
drivers/message/fusion/lsi/mpi_cnfg.h
View file @
53affa1a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Title: MPI Config message, structures, and Pages
* Title: MPI Config message, structures, and Pages
* Creation Date: July 27, 2000
* Creation Date: July 27, 2000
*
*
* MPI_CNFG.H Version: 01.02.0
8
* MPI_CNFG.H Version: 01.02.0
9
*
*
* Version History
* Version History
* ---------------
* ---------------
...
@@ -127,6 +127,7 @@
...
@@ -127,6 +127,7 @@
* MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE.
* MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE.
* Added new config page: CONFIG_PAGE_SCSI_DEVICE_3.
* Added new config page: CONFIG_PAGE_SCSI_DEVICE_3.
* Modified MPI_FCPORTPAGE5_FLAGS_ defines.
* Modified MPI_FCPORTPAGE5_FLAGS_ defines.
* 09-16-02 01.02.09 Added more MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG define.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
*/
*/
...
@@ -814,6 +815,7 @@ typedef struct _CONFIG_PAGE_SCSI_DEVICE_1
...
@@ -814,6 +815,7 @@ typedef struct _CONFIG_PAGE_SCSI_DEVICE_1
#define MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED (0x00000002)
#define MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED (0x00000002)
#define MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED (0x00000004)
#define MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED (0x00000004)
#define MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE (0x00000008)
#define MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE (0x00000008)
#define MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG (0x00000010)
typedef
struct
_CONFIG_PAGE_SCSI_DEVICE_2
typedef
struct
_CONFIG_PAGE_SCSI_DEVICE_2
...
...
drivers/message/fusion/lsi/mpi_targ.h
View file @
53affa1a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Title: MPI Target mode messages and structures
* Title: MPI Target mode messages and structures
* Creation Date: June 22, 2000
* Creation Date: June 22, 2000
*
*
* MPI_TARG.H Version: 01.02.0
6
* MPI_TARG.H Version: 01.02.0
7
*
*
* Version History
* Version History
* ---------------
* ---------------
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
* 05-31-02 01.02.06 Modified TARGET_MODE_REPLY_ALIAS_MASK to only include
* 05-31-02 01.02.06 Modified TARGET_MODE_REPLY_ALIAS_MASK to only include
* one bit.
* one bit.
* Added AliasIndex field to MPI_TARGET_FCP_CMD_BUFFER.
* Added AliasIndex field to MPI_TARGET_FCP_CMD_BUFFER.
* 09-16-02 01.02.07 Added flags for confirmed completion.
* Added PRIORITY_REASON_TARGET_BUSY.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
*/
*/
...
@@ -138,6 +140,7 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY
...
@@ -138,6 +140,7 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY
#define PRIORITY_REASON_PROTOCOL_ERR (0x06)
#define PRIORITY_REASON_PROTOCOL_ERR (0x06)
#define PRIORITY_REASON_DATA_OUT_PARITY_ERR (0x07)
#define PRIORITY_REASON_DATA_OUT_PARITY_ERR (0x07)
#define PRIORITY_REASON_DATA_OUT_CRC_ERR (0x08)
#define PRIORITY_REASON_DATA_OUT_CRC_ERR (0x08)
#define PRIORITY_REASON_TARGET_BUSY (0x09)
#define PRIORITY_REASON_UNKNOWN (0xFF)
#define PRIORITY_REASON_UNKNOWN (0xFF)
...
@@ -217,6 +220,7 @@ typedef struct _MSG_TARGET_ASSIST_REQUEST
...
@@ -217,6 +220,7 @@ typedef struct _MSG_TARGET_ASSIST_REQUEST
#define TARGET_ASSIST_FLAGS_DATA_DIRECTION (0x01)
#define TARGET_ASSIST_FLAGS_DATA_DIRECTION (0x01)
#define TARGET_ASSIST_FLAGS_AUTO_STATUS (0x02)
#define TARGET_ASSIST_FLAGS_AUTO_STATUS (0x02)
#define TARGET_ASSIST_FLAGS_HIGH_PRIORITY (0x04)
#define TARGET_ASSIST_FLAGS_HIGH_PRIORITY (0x04)
#define TARGET_ASSIST_FLAGS_CONFIRMED (0x08)
#define TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80)
#define TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80)
...
@@ -261,6 +265,7 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST
...
@@ -261,6 +265,7 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST
#define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01)
#define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01)
#define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04)
#define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04)
#define TARGET_STATUS_SEND_FLAGS_CONFIRMED (0x08)
#define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80)
#define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80)
/*
/*
...
...
drivers/message/fusion/mptbase.c
View file @
53affa1a
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
* (mailto:sjralston1@netscape.net)
* (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* (mailto:Pam.Delaney@lsil.com)
*
*
* $Id: mptbase.c,v 1.12
1 2002/07/23 18:56:59
pdelaney Exp $
* $Id: mptbase.c,v 1.12
2 2002/10/03 13:10:11
pdelaney Exp $
*/
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
/*
...
@@ -1416,10 +1416,30 @@ mpt_adapter_install(struct pci_dev *pdev)
...
@@ -1416,10 +1416,30 @@ mpt_adapter_install(struct pci_dev *pdev)
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVICEID_FC929X
)
{
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVICEID_FC929X
)
{
ioc
->
chip_type
=
FC929X
;
ioc
->
chip_type
=
FC929X
;
ioc
->
prod_name
=
"LSIFC929X"
;
ioc
->
prod_name
=
"LSIFC929X"
;
{
/* 929X Chip Fix. Set Split transactions level
* for PCIX. Set bits 5 - 6 to zero, turn on bit 4.
*/
u16
pcixcmd
=
0
;
pci_read_config_word
(
pdev
,
0x6a
,
&
pcixcmd
);
pcixcmd
&=
0xFF9F
;
pcixcmd
|=
0x0010
;
pci_write_config_word
(
pdev
,
0x6a
,
pcixcmd
);
}
}
}
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVICEID_FC919X
)
{
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVICEID_FC919X
)
{
ioc
->
chip_type
=
FC919X
;
ioc
->
chip_type
=
FC919X
;
ioc
->
prod_name
=
"LSIFC919X"
;
ioc
->
prod_name
=
"LSIFC919X"
;
{
/* 919X Chip Fix. Set Split transactions level
* for PCIX. Set bits 5 - 6 to zero, turn on bit 4.
*/
u16
pcixcmd
=
0
;
pci_read_config_word
(
pdev
,
0x6a
,
&
pcixcmd
);
pcixcmd
&=
0xFF9F
;
pcixcmd
|=
0x0010
;
pci_write_config_word
(
pdev
,
0x6a
,
pcixcmd
);
}
}
}
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVID_53C1030
)
{
else
if
(
pdev
->
device
==
MPI_MANUFACTPAGE_DEVID_53C1030
)
{
ioc
->
chip_type
=
C1030
;
ioc
->
chip_type
=
C1030
;
...
...
drivers/message/fusion/mptbase.h
View file @
53affa1a
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* (mailto:sjralston1@netscape.net)
* (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* (mailto:Pam.Delaney@lsil.com)
*
*
* $Id: mptbase.h,v 1.13
3 2002/09/05 22:30:09
pdelaney Exp $
* $Id: mptbase.h,v 1.13
4 2002/10/03 13:10:12
pdelaney Exp $
*/
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
/*
...
@@ -80,8 +80,8 @@
...
@@ -80,8 +80,8 @@
#define COPYRIGHT "Copyright (c) 1999-2002 " MODULEAUTHOR
#define COPYRIGHT "Copyright (c) 1999-2002 " MODULEAUTHOR
#endif
#endif
#define MPT_LINUX_VERSION_COMMON "2.02.01.0
1
"
#define MPT_LINUX_VERSION_COMMON "2.02.01.0
7
"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-2.02.01.0
1
"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-2.02.01.0
7
"
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \
#define show_mptmod_ver(s,ver) \
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
/*
/*
* Fusion MPT(linux) driver configurable stuff...
* Fusion MPT(linux) driver configurable stuff...
*/
*/
#define MPT_MAX_ADAPTERS 1
6
#define MPT_MAX_ADAPTERS 1
8
#define MPT_MAX_PROTOCOL_DRIVERS 16
#define MPT_MAX_PROTOCOL_DRIVERS 16
#define MPT_MAX_BUS 1
#define MPT_MAX_BUS 1
#define MPT_MAX_FC_DEVICES 255
#define MPT_MAX_FC_DEVICES 255
...
@@ -397,8 +397,10 @@ typedef struct _VirtDevice {
...
@@ -397,8 +397,10 @@ typedef struct _VirtDevice {
ScsiCmndTracker
SentQ
;
ScsiCmndTracker
SentQ
;
ScsiCmndTracker
DoneQ
;
ScsiCmndTracker
DoneQ
;
//--- LUN split here?
//--- LUN split here?
#ifdef MPT_SAVE_AUTOSENSE
u8
sense
[
SCSI_STD_SENSE_BYTES
];
/* 18 */
u8
sense
[
SCSI_STD_SENSE_BYTES
];
/* 18 */
u8
rsvd2
[
2
];
/* alignment */
u8
rsvd2
[
2
];
/* alignment */
#endif
u32
luns
;
/* Max LUNs is 32 */
u32
luns
;
/* Max LUNs is 32 */
u8
inq_data
[
SCSI_STD_INQUIRY_BYTES
];
/* 36 */
u8
inq_data
[
SCSI_STD_INQUIRY_BYTES
];
/* 36 */
u8
pad0
[
4
];
u8
pad0
[
4
];
...
@@ -424,7 +426,9 @@ typedef struct _VirtDevice {
...
@@ -424,7 +426,9 @@ typedef struct _VirtDevice {
#define MPT_TARGET_DEFAULT_DV_STATUS 0
#define MPT_TARGET_DEFAULT_DV_STATUS 0
#define MPT_TARGET_FLAGS_VALID_NEGO 0x01
#define MPT_TARGET_FLAGS_VALID_NEGO 0x01
#define MPT_TARGET_FLAGS_VALID_INQUIRY 0x02
#define MPT_TARGET_FLAGS_VALID_INQUIRY 0x02
#ifdef MPT_SAVE_AUTOSENSE
#define MPT_TARGET_FLAGS_VALID_SENSE 0x04
#define MPT_TARGET_FLAGS_VALID_SENSE 0x04
#endif
#define MPT_TARGET_FLAGS_Q_YES 0x08
#define MPT_TARGET_FLAGS_Q_YES 0x08
#define MPT_TARGET_FLAGS_VALID_56 0x10
#define MPT_TARGET_FLAGS_VALID_56 0x10
...
@@ -890,6 +894,8 @@ typedef struct _MPT_SCSI_HOST {
...
@@ -890,6 +894,8 @@ typedef struct _MPT_SCSI_HOST {
MPT_Q_TRACKER
taskQ
;
/* TM request Q */
MPT_Q_TRACKER
taskQ
;
/* TM request Q */
spinlock_t
freedoneQlock
;
spinlock_t
freedoneQlock
;
int
taskQcnt
;
int
taskQcnt
;
int
num_chain
;
/* Number of chain buffers */
int
max_sge
;
/* Max No of SGE*/
u8
numTMrequests
;
u8
numTMrequests
;
u8
tmPending
;
u8
tmPending
;
u8
resetPending
;
u8
resetPending
;
...
...
drivers/message/fusion/mptctl.c
View file @
53affa1a
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
* (mailto:sjralston1@netscape.net)
* (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* (mailto:Pam.Delaney@lsil.com)
*
*
* $Id: mptctl.c,v 1.
59 2002/09/05 22:30:10
pdelaney Exp $
* $Id: mptctl.c,v 1.
60 2002/10/03 13:10:13
pdelaney Exp $
*/
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
/*
...
@@ -627,7 +627,7 @@ mptctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
...
@@ -627,7 +627,7 @@ mptctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
/* Test for Compaq-specific IOCTL's.
/* Test for Compaq-specific IOCTL's.
*/
*/
if
((
cmd
==
CPQFCTS_GETPCIINFO
)
||
(
cmd
==
CPQFCTS_CTLR_STATUS
)
||
if
((
cmd
==
CPQFCTS_GETPCIINFO
)
||
(
cmd
==
CPQFCTS_CTLR_STATUS
)
||
(
cmd
==
CPQFCTS_GETDRIVER
)
||
(
cmd
==
CPQFCTS_SCSI_PASSTHRU
)
||
(
cmd
==
CPQFCTS_GETDRIV
V
ER
)
||
(
cmd
==
CPQFCTS_SCSI_PASSTHRU
)
||
(
cmd
==
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
))
(
cmd
==
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
))
return
mptctl_compaq_ioctl
(
file
,
cmd
,
arg
);
return
mptctl_compaq_ioctl
(
file
,
cmd
,
arg
);
...
@@ -2406,7 +2406,7 @@ mptctl_compaq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
...
@@ -2406,7 +2406,7 @@ mptctl_compaq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case
CPQFCTS_GETPCIINFO
:
case
CPQFCTS_GETPCIINFO
:
ret
=
mptctl_cpq_getpciinfo
(
arg
);
ret
=
mptctl_cpq_getpciinfo
(
arg
);
break
;
break
;
case
CPQFCTS_GETDRIVER
:
case
CPQFCTS_GETDRIV
V
ER
:
ret
=
mptctl_cpq_getdriver
(
arg
);
ret
=
mptctl_cpq_getdriver
(
arg
);
break
;
break
;
case
CPQFCTS_CTLR_STATUS
:
case
CPQFCTS_CTLR_STATUS
:
...
@@ -3180,7 +3180,7 @@ int __init mptctl_init(void)
...
@@ -3180,7 +3180,7 @@ int __init mptctl_init(void)
if
(
++
where
&&
err
)
goto
out_fail
;
if
(
++
where
&&
err
)
goto
out_fail
;
err
=
register_ioctl32_conversion
(
CPQFCTS_CTLR_STATUS
,
NULL
);
err
=
register_ioctl32_conversion
(
CPQFCTS_CTLR_STATUS
,
NULL
);
if
(
++
where
&&
err
)
goto
out_fail
;
if
(
++
where
&&
err
)
goto
out_fail
;
err
=
register_ioctl32_conversion
(
CPQFCTS_GETDRIVER
,
NULL
);
err
=
register_ioctl32_conversion
(
CPQFCTS_GETDRIV
V
ER
,
NULL
);
if
(
++
where
&&
err
)
goto
out_fail
;
if
(
++
where
&&
err
)
goto
out_fail
;
err
=
register_ioctl32_conversion
(
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
,
NULL
);
err
=
register_ioctl32_conversion
(
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
,
NULL
);
if
(
++
where
&&
err
)
goto
out_fail
;
if
(
++
where
&&
err
)
goto
out_fail
;
...
@@ -3234,7 +3234,7 @@ int __init mptctl_init(void)
...
@@ -3234,7 +3234,7 @@ int __init mptctl_init(void)
unregister_ioctl32_conversion
(
MPTCOMMAND32
);
unregister_ioctl32_conversion
(
MPTCOMMAND32
);
unregister_ioctl32_conversion
(
MPTFWDOWNLOAD32
);
unregister_ioctl32_conversion
(
MPTFWDOWNLOAD32
);
unregister_ioctl32_conversion
(
CPQFCTS_GETPCIINFO
);
unregister_ioctl32_conversion
(
CPQFCTS_GETPCIINFO
);
unregister_ioctl32_conversion
(
CPQFCTS_GETDRIVER
);
unregister_ioctl32_conversion
(
CPQFCTS_GETDRIV
V
ER
);
unregister_ioctl32_conversion
(
CPQFCTS_CTLR_STATUS
);
unregister_ioctl32_conversion
(
CPQFCTS_CTLR_STATUS
);
unregister_ioctl32_conversion
(
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
);
unregister_ioctl32_conversion
(
CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS
);
unregister_ioctl32_conversion
(
CPQFCTS_SCSI_PASSTHRU32
);
unregister_ioctl32_conversion
(
CPQFCTS_SCSI_PASSTHRU32
);
...
...
drivers/message/fusion/mptctl.h
View file @
53affa1a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
* (mailto:sjralston1@netscape.net)
* (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* (mailto:Pam.Delaney@lsil.com)
*
*
* $Id: mptctl.h,v 1.1
0 2002/05/28 15:57:16
pdelaney Exp $
* $Id: mptctl.h,v 1.1
1 2002/10/03 13:10:13
pdelaney Exp $
*/
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
/*
...
@@ -319,12 +319,12 @@ struct mpt_ioctl_command32 {
...
@@ -319,12 +319,12 @@ struct mpt_ioctl_command32 {
#define CPQFCTS_IOC_MAGIC 'Z'
#define CPQFCTS_IOC_MAGIC 'Z'
#define CPQFCTS_GETPCIINFO _IOR(CPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
#define CPQFCTS_GETPCIINFO _IOR(CPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
#define CPQFCTS_GETDRIV
ER _IOR(CPQFCTS_IOC_MAGIC, 2
, int)
#define CPQFCTS_GETDRIV
VER _IOR(CPQFCTS_IOC_MAGIC, 9
, int)
#define CPQFCTS_CTLR_STATUS _IOR(CPQFCTS_IOC_MAGIC, 3, struct _cpqfc_ctlr_status)
#define CPQFCTS_CTLR_STATUS _IOR(CPQFCTS_IOC_MAGIC, 3, struct _cpqfc_ctlr_status)
#define CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS _IOR(CPQFCTS_IOC_MAGIC,
4
, struct scsi_fctargaddress)
#define CPQFCTS_SCSI_IOCTL_FC_TARGET_ADDRESS _IOR(CPQFCTS_IOC_MAGIC,
13
, struct scsi_fctargaddress)
#define CPQFCTS_SCSI_PASSTHRU _IOWR(CPQFCTS_IOC_MAGIC,
5
, VENDOR_IOCTL_REQ)
#define CPQFCTS_SCSI_PASSTHRU _IOWR(CPQFCTS_IOC_MAGIC,
11
, VENDOR_IOCTL_REQ)
#if defined(__sparc__) && defined(__sparc_v9__)
#if defined(__sparc__) && defined(__sparc_v9__)
#define CPQFCTS_SCSI_PASSTHRU32 _IOWR(CPQFCTS_IOC_MAGIC,
5
, VENDOR_IOCTL_REQ32)
#define CPQFCTS_SCSI_PASSTHRU32 _IOWR(CPQFCTS_IOC_MAGIC,
11
, VENDOR_IOCTL_REQ32)
#endif
#endif
typedef
struct
{
typedef
struct
{
...
...
drivers/message/fusion/mptlan.c
View file @
53affa1a
...
@@ -132,7 +132,7 @@ struct mpt_lan_priv {
...
@@ -132,7 +132,7 @@ struct mpt_lan_priv {
u32
total_received
;
u32
total_received
;
struct
net_device_stats
stats
;
/* Per device statistics */
struct
net_device_stats
stats
;
/* Per device statistics */
struct
work_struct
post_buckets_task
;
struct
mpt_
work_struct
post_buckets_task
;
unsigned
long
post_buckets_active
;
unsigned
long
post_buckets_active
;
};
};
...
@@ -876,9 +876,22 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
...
@@ -876,9 +876,22 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
if
(
test_and_set_bit
(
0
,
&
priv
->
post_buckets_active
)
==
0
)
{
if
(
test_and_set_bit
(
0
,
&
priv
->
post_buckets_active
)
==
0
)
{
if
(
priority
)
{
if
(
priority
)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
schedule_work
(
&
priv
->
post_buckets_task
);
schedule_work
(
&
priv
->
post_buckets_task
);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,40)
schedule_task
(
&
priv
->
post_buckets_task
);
#else
queue_task
(
&
priv
->
post_buckets_task
,
&
tq_immediate
);
mark_bh
(
IMMEDIATE_BH
);
#endif
}
else
{
}
else
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
schedule_delayed_work
(
&
priv
->
post_buckets_task
,
1
);
schedule_delayed_work
(
&
priv
->
post_buckets_task
,
1
);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,40)
schedule_task
(
&
priv
->
post_buckets_task
);
#else
queue_task
(
&
priv
->
post_buckets_task
,
&
tq_timer
);
#endif
dioprintk
((
KERN_INFO
MYNAM
": post_buckets queued on "
dioprintk
((
KERN_INFO
MYNAM
": post_buckets queued on "
"timer.
\n
"
));
"timer.
\n
"
));
}
}
...
@@ -1364,8 +1377,8 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
...
@@ -1364,8 +1377,8 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
priv
->
mpt_dev
=
mpt_dev
;
priv
->
mpt_dev
=
mpt_dev
;
priv
->
pnum
=
pnum
;
priv
->
pnum
=
pnum
;
memset
(
&
priv
->
post_buckets_task
,
0
,
sizeof
(
struct
work_struct
));
memset
(
&
priv
->
post_buckets_task
,
0
,
sizeof
(
struct
mpt_
work_struct
));
INIT_WORK
(
&
priv
->
post_buckets_task
,
mpt_lan_post_receive_buckets
,
dev
);
MPT_
INIT_WORK
(
&
priv
->
post_buckets_task
,
mpt_lan_post_receive_buckets
,
dev
);
priv
->
post_buckets_active
=
0
;
priv
->
post_buckets_active
=
0
;
dlprintk
((
KERN_INFO
MYNAM
"@%d: bucketlen = %d
\n
"
,
dlprintk
((
KERN_INFO
MYNAM
"@%d: bucketlen = %d
\n
"
,
...
...
drivers/message/fusion/mptlan.h
View file @
53affa1a
...
@@ -20,7 +20,11 @@
...
@@ -20,7 +20,11 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/miscdevice.h>
#include <linux/miscdevice.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
#include <linux/tqueue.h>
#else
#include <linux/workqueue.h>
#include <linux/workqueue.h>
#endif
#include <linux/delay.h>
#include <linux/delay.h>
// #include <linux/trdevice.h>
// #include <linux/trdevice.h>
...
...
drivers/message/fusion/mptscsih.c
View file @
53affa1a
This diff is collapsed.
Click to expand it.
drivers/message/fusion/mptscsih.h
View file @
53affa1a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
* (mailto:netscape.net)
* (mailto:netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* (mailto:Pam.Delaney@lsil.com)
*
*
* $Id: mptscsih.h,v 1.1
8 2002/06/06 15:32:52
pdelaney Exp $
* $Id: mptscsih.h,v 1.1
9 2002/10/03 13:10:15
pdelaney Exp $
*/
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
/*
...
@@ -77,7 +77,22 @@
...
@@ -77,7 +77,22 @@
#define MPT_SCSI_CAN_QUEUE MPT_FC_CAN_QUEUE
#define MPT_SCSI_CAN_QUEUE MPT_FC_CAN_QUEUE
#define MPT_SCSI_CMD_PER_LUN 7
#define MPT_SCSI_CMD_PER_LUN 7
#define MPT_SCSI_MAX_SECTORS 8192
/*
* Set the MAX_SGE value based on user input.
*/
#ifdef CONFIG_FUSION_MAX_SGE
#if CONFIG_FUSION_MAX_SGE < 16
#define MPT_SCSI_SG_DEPTH 16
#elif CONFIG_FUSION_MAX_SGE > 128
#define MPT_SCSI_SG_DEPTH 128
#else
#define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE
#endif
#else
#define MPT_SCSI_SG_DEPTH 40
#define MPT_SCSI_SG_DEPTH 40
#endif
/* To disable domain validation, uncomment the
/* To disable domain validation, uncomment the
* following line. No effect for FC devices.
* following line. No effect for FC devices.
...
@@ -146,25 +161,39 @@ struct mptscsih_driver_setup
...
@@ -146,25 +161,39 @@ struct mptscsih_driver_setup
/*
/*
* tq_scheduler disappeared @ lk-2.4.0-test12
* tq_scheduler disappeared @ lk-2.4.0-test12
* (right when <linux/sched.h> newly defined TQ_ACTIVE)
* (right when <linux/sched.h> newly defined TQ_ACTIVE)
* tq_struct reworked in 2.5.41. Include workqueue.h.
*/
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
# include <linux/sched.h>
# include <linux/workqueue.h>
#define SCHEDULE_TASK(x) \
if (schedule_work(x) == 0) { \
/*MOD_DEC_USE_COUNT*/
; \
}
#else
#define HAVE_TQ_SCHED 1
#define HAVE_TQ_SCHED 1
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
# include <linux/sched.h>
# include <linux/sched.h>
# ifdef TQ_ACTIVE
# ifdef TQ_ACTIVE
# undef HAVE_TQ_SCHED
# undef HAVE_TQ_SCHED
# endif
# endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,40)
# undef HAVE_TQ_SCHED
#endif
#endif
#endif
#ifdef HAVE_TQ_SCHED
#ifdef HAVE_TQ_SCHED
#define SCHEDULE_TASK(x) \
#define SCHEDULE_TASK(x) \
/*MOD_INC_USE_COUNT*/
; \
/*MOD_INC_USE_COUNT*/
; \
schedule_work(x)
(x)->next = NULL; \
queue_task(x, &tq_scheduler)
#else
#else
#define SCHEDULE_TASK(x) \
#define SCHEDULE_TASK(x) \
/*MOD_INC_USE_COUNT*/
; \
/*MOD_INC_USE_COUNT*/
; \
if (schedule_
wor
k(x) == 0) { \
if (schedule_
tas
k(x) == 0) { \
/*MOD_DEC_USE_COUNT*/
; \
/*MOD_DEC_USE_COUNT*/
; \
}
}
#endif
#endif
#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
...
@@ -236,6 +265,7 @@ extern void x_scsi_taskmgmt_bh(void *);
...
@@ -236,6 +265,7 @@ extern void x_scsi_taskmgmt_bh(void *);
can_queue: MPT_SCSI_CAN_QUEUE, \
can_queue: MPT_SCSI_CAN_QUEUE, \
this_id: -1, \
this_id: -1, \
sg_tablesize: MPT_SCSI_SG_DEPTH, \
sg_tablesize: MPT_SCSI_SG_DEPTH, \
max_sectors: MPT_SCSI_MAX_SECTORS, \
cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \
cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \
unchecked_isa_dma: 0, \
unchecked_isa_dma: 0, \
use_clustering: ENABLE_CLUSTERING, \
use_clustering: ENABLE_CLUSTERING, \
...
...
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