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
ad2575f8
Commit
ad2575f8
authored
Feb 26, 2018
by
Corey Minyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipmi:pci: Make the PCI defines consistent with normal Linux ones
Signed-off-by:
Corey Minyard
<
cminyard@mvista.com
>
parent
3b6d082f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
drivers/char/ipmi/ipmi_si_pci.c
drivers/char/ipmi/ipmi_si_pci.c
+14
-17
No files found.
drivers/char/ipmi/ipmi_si_pci.c
View file @
ad2575f8
...
@@ -17,16 +17,12 @@ module_param_named(trypci, si_trypci, bool, 0);
...
@@ -17,16 +17,12 @@ module_param_named(trypci, si_trypci, bool, 0);
MODULE_PARM_DESC
(
trypci
,
"Setting this to zero will disable the"
MODULE_PARM_DESC
(
trypci
,
"Setting this to zero will disable the"
" default scan of the interfaces identified via pci"
);
" default scan of the interfaces identified via pci"
);
#define PCI_ERMC_CLASSCODE 0x0C0700
#define PCI_CLASS_SERIAL_IPMI 0x0c07
#define PCI_ERMC_CLASSCODE_MASK 0xffffff00
#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700
#define PCI_ERMC_CLASSCODE_TYPE_MASK 0xff
#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701
#define PCI_ERMC_CLASSCODE_TYPE_SMIC 0x00
#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702
#define PCI_ERMC_CLASSCODE_TYPE_KCS 0x01
#define PCI_ERMC_CLASSCODE_TYPE_BT 0x02
#define PCI_HP_VENDOR_ID 0x103C
#define PCI_DEVICE_ID_HP_MMC 0x121A
#define PCI_MMC_DEVICE_ID 0x121A
#define PCI_MMC_ADDR_CW 0x10
static
void
ipmi_pci_cleanup
(
struct
si_sm_io
*
io
)
static
void
ipmi_pci_cleanup
(
struct
si_sm_io
*
io
)
{
{
...
@@ -69,28 +65,27 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
...
@@ -69,28 +65,27 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
const
struct
pci_device_id
*
ent
)
const
struct
pci_device_id
*
ent
)
{
{
int
rv
;
int
rv
;
int
class_type
=
pdev
->
class
&
PCI_ERMC_CLASSCODE_TYPE_MASK
;
struct
si_sm_io
io
;
struct
si_sm_io
io
;
memset
(
&
io
,
0
,
sizeof
(
io
));
memset
(
&
io
,
0
,
sizeof
(
io
));
io
.
addr_source
=
SI_PCI
;
io
.
addr_source
=
SI_PCI
;
dev_info
(
&
pdev
->
dev
,
"probing via PCI"
);
dev_info
(
&
pdev
->
dev
,
"probing via PCI"
);
switch
(
class_type
)
{
switch
(
pdev
->
class
)
{
case
PCI_
ERMC_CLASSCODE_TYPE
_SMIC
:
case
PCI_
CLASS_SERIAL_IPMI
_SMIC
:
io
.
si_type
=
SI_SMIC
;
io
.
si_type
=
SI_SMIC
;
break
;
break
;
case
PCI_
ERMC_CLASSCODE_TYPE
_KCS
:
case
PCI_
CLASS_SERIAL_IPMI
_KCS
:
io
.
si_type
=
SI_KCS
;
io
.
si_type
=
SI_KCS
;
break
;
break
;
case
PCI_
ERMC_CLASSCODE_TYPE
_BT
:
case
PCI_
CLASS_SERIAL_IPMI
_BT
:
io
.
si_type
=
SI_BT
;
io
.
si_type
=
SI_BT
;
break
;
break
;
default:
default:
dev_info
(
&
pdev
->
dev
,
"Unknown IPMI
type: %d
\n
"
,
class_type
);
dev_info
(
&
pdev
->
dev
,
"Unknown IPMI
class: %x
\n
"
,
pdev
->
class
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
@@ -138,8 +133,10 @@ static void ipmi_pci_remove(struct pci_dev *pdev)
...
@@ -138,8 +133,10 @@ static void ipmi_pci_remove(struct pci_dev *pdev)
}
}
static
const
struct
pci_device_id
ipmi_pci_devices
[]
=
{
static
const
struct
pci_device_id
ipmi_pci_devices
[]
=
{
{
PCI_DEVICE
(
PCI_HP_VENDOR_ID
,
PCI_MMC_DEVICE_ID
)
},
{
PCI_VDEVICE
(
HP
,
PCI_DEVICE_ID_HP_MMC
)
},
{
PCI_DEVICE_CLASS
(
PCI_ERMC_CLASSCODE
,
PCI_ERMC_CLASSCODE_MASK
)
},
{
PCI_DEVICE_CLASS
(
PCI_CLASS_SERIAL_IPMI_SMIC
,
~
0
)
},
{
PCI_DEVICE_CLASS
(
PCI_CLASS_SERIAL_IPMI_KCS
,
~
0
)
},
{
PCI_DEVICE_CLASS
(
PCI_CLASS_SERIAL_IPMI_BT
,
~
0
)
},
{
0
,
}
{
0
,
}
};
};
MODULE_DEVICE_TABLE
(
pci
,
ipmi_pci_devices
);
MODULE_DEVICE_TABLE
(
pci
,
ipmi_pci_devices
);
...
...
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