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
c01c6af8
Commit
c01c6af8
authored
Mar 08, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-davem' of
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6
parents
bf745e88
65f0b417
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
drivers/net/sfc/efx.c
drivers/net/sfc/efx.c
+2
-2
drivers/net/sfc/io.h
drivers/net/sfc/io.h
+9
-4
drivers/net/sfc/mcdi.c
drivers/net/sfc/mcdi.c
+5
-4
No files found.
drivers/net/sfc/efx.c
View file @
c01c6af8
...
@@ -1104,7 +1104,7 @@ static int efx_init_io(struct efx_nic *efx)
...
@@ -1104,7 +1104,7 @@ static int efx_init_io(struct efx_nic *efx)
rc
=
-
EIO
;
rc
=
-
EIO
;
goto
fail3
;
goto
fail3
;
}
}
efx
->
membase
=
ioremap_
nocache
(
efx
->
membase_phys
,
efx
->
membase
=
ioremap_
wc
(
efx
->
membase_phys
,
efx
->
type
->
mem_map_size
);
efx
->
type
->
mem_map_size
);
if
(
!
efx
->
membase
)
{
if
(
!
efx
->
membase
)
{
netif_err
(
efx
,
probe
,
efx
->
net_dev
,
netif_err
(
efx
,
probe
,
efx
->
net_dev
,
...
...
drivers/net/sfc/io.h
View file @
c01c6af8
...
@@ -48,9 +48,9 @@
...
@@ -48,9 +48,9 @@
* replacing the low 96 bits with zero does not affect functionality.
* replacing the low 96 bits with zero does not affect functionality.
* - If the host writes to the last dword address of such a register
* - If the host writes to the last dword address of such a register
* (i.e. the high 32 bits) the underlying register will always be
* (i.e. the high 32 bits) the underlying register will always be
* written. If the collector
does not hold values for the low 96
* written. If the collector
and the current write together do not
*
bits of the register, they will be written as zero. Writing to
*
provide values for all 128 bits of the register, the low 96 bits
*
the last qword does not have this effect and must not be done
.
*
will be written as zero
.
* - If the host writes to the address of any other part of such a
* - If the host writes to the address of any other part of such a
* register while the collector already holds values for some other
* register while the collector already holds values for some other
* register, the write is discarded and the collector maintains its
* register, the write is discarded and the collector maintains its
...
@@ -103,6 +103,7 @@ static inline void efx_writeo(struct efx_nic *efx, efx_oword_t *value,
...
@@ -103,6 +103,7 @@ static inline void efx_writeo(struct efx_nic *efx, efx_oword_t *value,
_efx_writed
(
efx
,
value
->
u32
[
2
],
reg
+
8
);
_efx_writed
(
efx
,
value
->
u32
[
2
],
reg
+
8
);
_efx_writed
(
efx
,
value
->
u32
[
3
],
reg
+
12
);
_efx_writed
(
efx
,
value
->
u32
[
3
],
reg
+
12
);
#endif
#endif
wmb
();
mmiowb
();
mmiowb
();
spin_unlock_irqrestore
(
&
efx
->
biu_lock
,
flags
);
spin_unlock_irqrestore
(
&
efx
->
biu_lock
,
flags
);
}
}
...
@@ -125,6 +126,7 @@ static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase,
...
@@ -125,6 +126,7 @@ static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase,
__raw_writel
((
__force
u32
)
value
->
u32
[
0
],
membase
+
addr
);
__raw_writel
((
__force
u32
)
value
->
u32
[
0
],
membase
+
addr
);
__raw_writel
((
__force
u32
)
value
->
u32
[
1
],
membase
+
addr
+
4
);
__raw_writel
((
__force
u32
)
value
->
u32
[
1
],
membase
+
addr
+
4
);
#endif
#endif
wmb
();
mmiowb
();
mmiowb
();
spin_unlock_irqrestore
(
&
efx
->
biu_lock
,
flags
);
spin_unlock_irqrestore
(
&
efx
->
biu_lock
,
flags
);
}
}
...
@@ -139,6 +141,7 @@ static inline void efx_writed(struct efx_nic *efx, efx_dword_t *value,
...
@@ -139,6 +141,7 @@ static inline void efx_writed(struct efx_nic *efx, efx_dword_t *value,
/* No lock required */
/* No lock required */
_efx_writed
(
efx
,
value
->
u32
[
0
],
reg
);
_efx_writed
(
efx
,
value
->
u32
[
0
],
reg
);
wmb
();
}
}
/* Read a 128-bit CSR, locking as appropriate. */
/* Read a 128-bit CSR, locking as appropriate. */
...
@@ -237,12 +240,14 @@ static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value,
...
@@ -237,12 +240,14 @@ static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value,
#ifdef EFX_USE_QWORD_IO
#ifdef EFX_USE_QWORD_IO
_efx_writeq
(
efx
,
value
->
u64
[
0
],
reg
+
0
);
_efx_writeq
(
efx
,
value
->
u64
[
0
],
reg
+
0
);
_efx_writeq
(
efx
,
value
->
u64
[
1
],
reg
+
8
);
#else
#else
_efx_writed
(
efx
,
value
->
u32
[
0
],
reg
+
0
);
_efx_writed
(
efx
,
value
->
u32
[
0
],
reg
+
0
);
_efx_writed
(
efx
,
value
->
u32
[
1
],
reg
+
4
);
_efx_writed
(
efx
,
value
->
u32
[
1
],
reg
+
4
);
#endif
_efx_writed
(
efx
,
value
->
u32
[
2
],
reg
+
8
);
_efx_writed
(
efx
,
value
->
u32
[
2
],
reg
+
8
);
_efx_writed
(
efx
,
value
->
u32
[
3
],
reg
+
12
);
_efx_writed
(
efx
,
value
->
u32
[
3
],
reg
+
12
);
#endif
wmb
();
}
}
#define efx_writeo_page(efx, value, reg, page) \
#define efx_writeo_page(efx, value, reg, page) \
_efx_writeo_page(efx, value, \
_efx_writeo_page(efx, value, \
...
...
drivers/net/sfc/mcdi.c
View file @
c01c6af8
...
@@ -94,14 +94,15 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd,
...
@@ -94,14 +94,15 @@ static void efx_mcdi_copyin(struct efx_nic *efx, unsigned cmd,
efx_writed
(
efx
,
&
hdr
,
pdu
);
efx_writed
(
efx
,
&
hdr
,
pdu
);
for
(
i
=
0
;
i
<
inlen
;
i
+=
4
)
for
(
i
=
0
;
i
<
inlen
;
i
+=
4
)
{
_efx_writed
(
efx
,
*
((
__le32
*
)(
inbuf
+
i
)),
pdu
+
4
+
i
);
_efx_writed
(
efx
,
*
((
__le32
*
)(
inbuf
+
i
)),
pdu
+
4
+
i
);
/* use wmb() within loop to inhibit write combining */
/* Ensure the payload is written out before the header */
wmb
();
wmb
();
}
/* ring the doorbell with a distinctive value */
/* ring the doorbell with a distinctive value */
_efx_writed
(
efx
,
(
__force
__le32
)
0x45789abc
,
doorbell
);
_efx_writed
(
efx
,
(
__force
__le32
)
0x45789abc
,
doorbell
);
wmb
();
}
}
static
void
efx_mcdi_copyout
(
struct
efx_nic
*
efx
,
u8
*
outbuf
,
size_t
outlen
)
static
void
efx_mcdi_copyout
(
struct
efx_nic
*
efx
,
u8
*
outbuf
,
size_t
outlen
)
...
...
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